query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Notifies the turtle's observers that the turtle has changed.
@Override public void notifyAllObservers() { myTurtle.notifyObservers(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onTurtleUpdated(AbstractTurtle t)\n {\n // Fire paint event\n this.repaint();\n }", "public void updateTurtleOnView()\n\t{\n\t\t// update turtle info to View\n\t\tsetInfoParamsOfTurtleAndLine();\n\t\t\n\t\tif (this.isVisible() == 1)\n\t\t{\n\t\t\t// make turtle visible, then update turtle movement\n\t\t\tthis.myTurtleView.showTurtle(true);\n\t\t\tthis.myTurtleView.rotateAndMoveTurtle(this.getTurtleLocation(), this.getTurtleOrientation());\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// tell view to make turtle invisible\n\t\t\tthis.myTurtleView.showTurtle(false);\n\t\t}\n\t}", "abstract public void setTurtle(TurtleModel t);", "public void removeTurtles()\n {\n // Stop observing every turtle\n for(AbstractTurtle t : this.turtles)\n {\n t.removeObserver(this);\n }\n\n // And remove them from the vivarium\n this.turtles.clear();\n\n // Then, fire paint event\n this.repaint();\n }", "private void change() {\n\t\tsetChanged();\n\t\t//NotifyObservers calls on the update-method in the GUI\n\t\tnotifyObservers();\n\t}", "public void notifyChange()\r\n {\r\n setChanged();\r\n notifyObservers();\r\n }", "public void addTurtles(Set<AbstractTurtle> turtles)\n {\n // Start observing every turtle\n for(AbstractTurtle t : turtles)\n {\n t.addObserver(this);\n }\n\n // And remove them from the vivarium\n this.turtles.addAll(turtles);\n\n // Then, fire paint event\n this.repaint();\n }", "public final synchronized void setChanged() {\n\t\tsuper.setChanged ();\n }", "public void updateObserver();", "public void markChanged()\n \t{\n \t\tbChanged=true;\n \t}", "public synchronized void setChanged() {\n super.setChanged();\n }", "public void notifyObservers(int strokes, int par);", "private static void fireMazeChanged() {\r\n\t\tfor (ATEListener l : listeners) {\r\n\t\t\tl.mazeChanged(currentMaze);\r\n\t\t}\r\n\t}", "protected synchronized void setChanged() {\n changed = true;\n }", "public void addTurtle(AbstractTurtle t)\n {\n // Add the turtle to the vivarium and observe it\n this.turtles.add(t);\n t.addObserver(this);\n\n // Then, fire paint event\n this.repaint();\n }", "@Override\n\tpublic void setChanged() {\n\t\tthis.changed = true;\n\t}", "protected void stateChanged() {\r\n\t\tsetChanged();\r\n\t\tnotifyObservers();\r\n\t}", "void onChanged(RulerWheel wheel, int oldValue, int newValue);", "@Override\n\tpublic void update(IObservable observable, Object args) {\n\t\tthis.repaint();\n\t}", "public void update(){\n\t\tSystem.out.println(\"Return From Observer Pattern: \\n\" + theModel.getObserverState() \n\t\t+ \"\\n\");\n\t}", "public void addObservable (TurtleScene turtleScene, SlogoScene scene) {\n CurrentTurtleState currTurtState = myGuiManager.getMyCurrTurtState();\n\n scene.addObserver(turtleScene);\n scene.addObserver(currTurtState);\n\n Prompt prompt = myGuiManager.getMyPrompt();\n scene.addObserver(prompt);\n\n }", "public void mazeChanged(Maze maze);", "public void removeTurtle(AbstractTurtle t)\n {\n // Remove the turtle from the vivarium and stop observing it\n this.turtles.remove(t);\n t.removeObserver(this);\n\n // Then, fire paint event\n this.repaint();\n }", "public void notifyObservers()\n\t{\n\t\tsetChanged();\n\t\tnotifyObservers(new GameWorldProxy(this));\n\t}", "public abstract void setTurtleRecursive(TurtleModel value);", "private void notifyUpdated() {\n if (mChanged) {\n mChanged = false;\n mObserver.onChanged(this);\n }\n }", "public void onUpdate(T oldValue, T newValue);", "public void firePropertyChange(String propertyName, Object oldValue, Object newValue);", "void\n notifyChange() {\n this.notifyChange = true;\n synchronized (this.changeMonitor) {\n this.changeMonitor.notifyAll();\n }\n }", "void onPropertyChange(String name, String newValue);", "public void isChanged()\n\t{\n\t\tchange = true;\n\t}", "public void setChangeListener();", "public void notifyObservers() {\n for (int i = 0; i < observers.size(); i++) {\n Observer observer = (Observer)observers.get(i);\n observer.update(this.durum);\n }\n }", "@Override\r\n\tpublic void update(Observable arg0, Object arg1) {\n\t\trepaint();\r\n\t}", "@Override\n\t\t\tpublic void onChanged(ListChangeListener.Change<? extends PR1Model.Shape> e) { \n\t\t\t\t\n\t\t\t\trepaint(); \n\t\t\t\treTable();\n\t\t\t\tviewState.set(ViewState.MODIFIED);\n\t\t\t\t\n\t\t\t}", "@Override\r\n\tpublic void notifyObservers() {\n\t for(Observer o : observers){\r\n\t\t o.update();\r\n\t }\r\n\t}", "@Override\r\n\tpublic void notifyObservers() {\n\t\tfor (Observer o : this.observers) {\r\n\t\t\to.update();\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic void notifyObservers() {\n\t\tEnumeration<Observer> enumo = vector.elements();\r\n\t\twhile(enumo.hasMoreElements()){\r\n\t\t\tenumo.nextElement().update();\r\n\t\t}\r\n\t}", "void valueChanged(T oldValue, T newValue);", "@Override\n\tpublic void notifyObservers() {\n\t\tfor (Observer obs : this.observers)\n\t\t{\n\t\t\tobs.update();\n\t\t}\n\t}", "void firePropertyChange() {\n java.util.Vector targets;\n synchronized (this) {\n if (listeners == null) {\n return;\n }\n targets = (java.util.Vector) listeners.clone();\n }\n\n PropertyChangeEvent evt = new PropertyChangeEvent(this, null, null, null);\n\n for (int i = 0; i < targets.size(); i++) {\n PropertyChangeListener target = (PropertyChangeListener)targets.elementAt(i);\n target.propertyChange(evt);\n }\n }", "private void firePlotListChanged() {\n firePlotListChanged(this, null);\n }", "public void setMobHasChanged() {\r\n\t\t// method that informs the view(the observer) of the changes\r\n\t\tthis.setChanged();\r\n\t\tthis.notifyObservers();\r\n\t\r\n\t}", "@Override\r\n\tpublic void update() {\n\t\tSystem.out.println(\"Observer1 has received update!\");\r\n\t}", "@Override\r\n\tpublic void notifyObservers() {\n\t\t\r\n\t}", "@Override\n\tpublic void update(Observable o, Object arg) {\n\t\tthis.repaint(); // Schedule a call to paintComponent\n\t}", "public void setTurtleStep(int step)\n\t{\n\t\tturt.setStepLength(step);\n\t\trepaint();\n\t}", "@Override\r\n\tpublic void update(Observable o, Object arg) {\r\n\t\t// Not exactly how MVC works, but similar.\r\n\t\tthis.repaint(); // Schedule a call to paintComponent\r\n\t}", "@Override\n public void notifyUnitObservers() {\n for(UnitObserver unitObserver : unitObservers){\n unitObserver.update(entities.returnUnitRenderInformation());\n entities.setUnitObserver(unitObserver);\n }\n }", "protected final void firePropertyChange(String propertyName, double oldValue, double newValue) {\n firePropertyChange(propertyName, Double.valueOf(oldValue), Double.valueOf(newValue));\n }", "@Override\n void notifys() {\n for (Observer o : observers) {\n o.update();\n }\n }", "public void afterPropertyChange(T obj, String propertyName, Object oldValue, Object newValue);", "@Override\r\n\t\t\tpublic void onPropertyChange(String... paths) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\tpublic void update() {\n\t\tSystem.out.println(\"Observer3 has received update!\");\r\n\t}", "@Override\n\tpublic void NotifyObserver() {\n\n\t}", "public void notifyObservers() {}", "public void update(){\n\t\tsetChanged();\n\t\trender();\n\t\tprintTimer();\n\t}", "protected final void firePropertyChange(String propertyName, float oldValue, float newValue) {\n firePropertyChange(propertyName, Float.valueOf(oldValue), Float.valueOf(newValue));\n }", "public void notifyChangementJoueurs();", "@Override\r\n\tpublic void notifyObservers(){\r\n\t\tfor(IObserver obs : observers){\r\n\t\t\tobs.update(this, selectedEntity);\r\n\t\t}\r\n\t\tselectedEntity = null;\r\n\t}", "@Override\n\tpublic void roadChanged() {\n\t\tthis.from_x=this.from.getX();\n\t\tthis.from_y=this.from.getY();\n\t\tthis.to_x=this.to.getX();\n\t\tthis.to_y=this.to.getY();\n\t\tthis.getTopLevelAncestor().repaint();\n\t\tthis.repaint();\n//\t\tthis.getParent().repaint();\n\t}", "public void notifyObservers();", "public void notifyObservers();", "public void notifyObservers();", "private void setModelToChanged() {\n\t\tsetChanged();\r\n\t\tnotifyObservers();\r\n\t}", "private void notifyObservers() {\n\t\tIterator<Observer> i = observers.iterator();\r\n\t\twhile( i.hasNext() ) {\r\n\t\t\tObserver o = ( Observer ) i.next();\r\n\t\t\to.update( this );\r\n\t\t}\r\n\t}", "@Override\n\tpublic void Notify() {\n\t\tfor (Observer observer : obs) {\n\t\t\tobserver.update();\n\t\t}\n\t}", "public void notifyObservers() {\r\n for (Observer observer: this.observers) {\r\n observer.update(this);\r\n }\r\n\r\n// System.out.println(this);\r\n }", "@Override\n\tpublic void update(Subject subject) {\n\t\tobserverState = ((ConcreteSubject)subject).getSubjectState();\n\t}", "@Override\n public void actionPerformed (ActionEvent e) {\n fireChanged();\n }", "@Override\r\n\tpublic void update() {\n\t\tSystem.out.println(\"Observer2 has received update!\");\r\n\t}", "void notifyObservers();", "void notifyObservers();", "@Override\n\tpublic void notifys() {\n\t\tfor(Observer observer : observers) {\n\t\t\tobserver.update(this);\n\t\t}\n\t}", "@Override\n public void changed(ObservableValue<? extends Number> observable, Number oldValue, Number newValue) {\n gc.setLineWidth(newValue.doubleValue());\n }", "public void changed() {\n this.fireContentsChanged(this, 0, this.getSize() - 1);\n }", "@Override\n\tpublic void notifyObserver() {\n\t\tEnumeration<ObserverListener> enumd = vector.elements();\n\t\twhile (enumd.hasMoreElements()) {\n\t\t\tObserverListener observerListener = enumd\n\t\t\t\t\t.nextElement();\n\t\t\tobserverListener.observer();\n\t\t\tobserverListener.obsupdata();\n\t\t}\n\t}", "protected void PropertyChanged()\r\n { }", "private void reafficher() {\n\t\tthis.setChanged();\n\t\tthis.notifyObservers();\n\t}", "protected void notifyObservers() {\n os.notify(this, null);\n }", "public void onSensorChanged() {\n\t\tsensorChanged();\n\t}", "public void update(){\n \tSystem.out.println(model.toString());\n\t\tnumberofsteps.setText(model.toString());\n\t\tint selectedColor = model.getCurrentSelectedColor();\n\t\t\n\t\t// Update dots\n\t\tfor (int i = 0; i < size; i++){\n\t\t\tfor (int j = 0; j < size; j++){\n\t\t\t\t// Assign captured dots to correct colour\n\t\t\t\tif (model.isCaptured(i, j))\n\t\t\t\t\tdots[i][j].setColor(selectedColor);\n\t\t\t}\n\t\t}\n\t\t\n }", "public void stateChanged(ChangeEvent e){\n\r\n repaint(); // at the moment we're being pretty crude with this, redrawing all the shapes\r\n\r\n\r\n\r\n if (fDeriverDocument!=null) // if this drawing has a journal, set it for saving\r\n fDeriverDocument.setDirty(true);\r\n\r\n\r\n\r\n }", "@Override\n public void notifyObserver() {\n for(Observer o:list){\n o.update(w);\n }\n }", "@Override\n\tpublic void update(Observable observable, Object object) {\n\t\tif (object.equals(true)) gui.switchScreen(\"Win\");\n\t\telse if (object.equals(\"Create\")) makeMaze();\n\t\telse repaint();\n\t}", "private void notifyObservors() {\n this.obervors.forEach(Obervor::modelChanged);\n }", "public void update(Observable arg0, Object arg1) {\r\n this.repaint();\r\n }", "private void notifyListeners() {\n\t\tfor(ModelListener l:listeners) {\n\t\t\tl.update();\t// Tell the listener that something changed\n\t\t}\n\t}", "@Override\n public void update(Observable o, Object arg) {\n printGraphModel();\n }", "public void changeLocationOfTurtle(Point2D newLoc){ //WORKS\n\t\tsetTurtleLocToViewTurtleLoc();\n\t\tPoint2D locOrig = myTurtle.getLoc();\n\t\tmyTurtle.setLocation(newLoc);\n\t\tPoint2D locNew = myTurtle.getLoc();\n\t\tthis.moveTurtleImageAndDraw(locOrig, locNew);\n\t\tsetTurtleLocToViewTurtleLoc();\n\t\tthis.updateTurtleOnView();\n\t}", "public void atacar() {\n notifyObservers();\n }", "void addPropertyChangedObserver(PropertyChangeObserver observer);", "protected void indicateModified() {\n invalidationListenerManager.callListeners(this);\n }", "public void update(Observable o, Object arg) {\n paintArea.repaint();\n thicknessDisplay.setText(model.getThickness() + \"\");\n lengthDisplay.setText(model.getLength() + \"\");\n lengthAdjuster.setValue(model.getLength());\n }", "public void change(GeometricalObject object);", "void notifyObserver();", "public void secondsChanged() {\n\t\tsetChanged();\n\t\tnotifyObservers();\n\t}", "private void changed() {\n // Ok to have a race here, see the field javadoc.\n if (!changed)\n changed = true;\n }", "public void visitorStateChanged (CityMap sender) {\n repaint ();\n }", "@Override\r\n\tpublic void update() {\n\t\tthis.repaint();\r\n\t}" ]
[ "0.77753365", "0.66415936", "0.6017858", "0.6006258", "0.5948843", "0.59374917", "0.5922741", "0.5884626", "0.58596814", "0.58519727", "0.5805771", "0.5793045", "0.5766591", "0.5729466", "0.5722094", "0.57142603", "0.57078844", "0.56677943", "0.5664126", "0.56604034", "0.5641962", "0.56417", "0.5627659", "0.55537796", "0.551948", "0.55014956", "0.54869694", "0.5467282", "0.5456907", "0.54367495", "0.54235256", "0.5417848", "0.5411164", "0.54059833", "0.5404389", "0.53973573", "0.53899246", "0.53891623", "0.53850424", "0.5372663", "0.53639287", "0.53617036", "0.53550714", "0.5351424", "0.53378564", "0.53368825", "0.5336571", "0.5321328", "0.532105", "0.5318391", "0.5302834", "0.53024304", "0.5300039", "0.52988875", "0.5297305", "0.52937233", "0.52862954", "0.52736014", "0.5272809", "0.5272479", "0.52688265", "0.5265492", "0.5265492", "0.5265492", "0.5254904", "0.5249183", "0.52440745", "0.52302295", "0.5226598", "0.5215249", "0.51961464", "0.5192788", "0.5192788", "0.5189346", "0.51784253", "0.5173422", "0.5157062", "0.5155928", "0.5153895", "0.51484156", "0.51404095", "0.51396215", "0.5137063", "0.51352364", "0.51286167", "0.5126674", "0.5124495", "0.51139355", "0.51115626", "0.5109174", "0.5108", "0.51053244", "0.5104444", "0.51006657", "0.5097252", "0.5088598", "0.5074538", "0.50656027", "0.5062866", "0.50619704" ]
0.74530447
1
Creates new form CadastroDeEmpresa
public CadastroDeEmpresa() { initComponents(); preencherTabela("select * from empresa order by id"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public creacionempresa() {\n initComponents();\n mostrardatos();\n }", "public void carregarCadastro() {\n\n try {\n\n if (codigo != null) {\n\n ClienteDao fdao = new ClienteDao();\n\n cliente = fdao.buscarCodigo(codigo);\n\n } else {\n cliente = new Cliente();\n\n }\n } catch (RuntimeException e) {\n JSFUtil.AdicionarMensagemErro(\"ex.getMessage()\");\n e.printStackTrace();\n }\n\n }", "public FrmCrearEmpleado() {\n initComponents();\n tFecha.setDate(new Date());\n }", "public SalidaCajaForm() {\n\t\tinicializarComponentes();\n }", "public FrmNuevoEmpleado() {\n initComponents();\n }", "public FormEmpresa() {\n initComponents();\n this.getComboBox();\n this.buscaDadosEmpresa();\n \n }", "public de_gestionar_contrato_añadir() {\n initComponents();\n lbl_error_nombre_cliente.setVisible(false);\n lbl_error_numero_contrato.setVisible(false);\n lbl_error_fecha_inicio.setVisible(false);\n lbl.setVisible(false);\n lbl_fecha_expira_contrato.setVisible(false);\n\n // detectar cambio en jdateChoser (fecha de inicio en agregar contrato)\n fecha_inicio_contrato.getDateEditor().addPropertyChangeListener(\n new PropertyChangeListener() {\n @Override\n public void propertyChange(PropertyChangeEvent e) {\n if (\"date\".equals(e.getPropertyName())) {\n System.out.println(e.getPropertyName()\n + \": \" + (Date) e.getNewValue());\n if(fecha_inicio_contrato.getDate()!=null){\n lbl_fecha_expira_contrato.setText(toma_fecha(fecha_inicio_contrato).substring(0,6)+String.valueOf(Integer.parseInt(toma_fecha(fecha_inicio_contrato).substring(6))+1));\n lbl.setVisible(true);\n lbl_fecha_expira_contrato.setVisible(true);\n }\n }else{\n lbl_fecha_expira_contrato.setText(\"\");\n lbl_error_fecha_inicio.setVisible(false);\n lbl.setVisible(false);\n lbl_fecha_expira_contrato.setVisible(false);\n }\n }\n });\n this.add(fecha_inicio_contrato);\n \n deshabilitarPegar();\n }", "public FrmCadastro() {\n initComponents();\n \n lblNumeroConta.setText(\"Número da conta: \" + Agencia.getProximaConta());\n \n List<Integer> agencias = Principal.banco.retornarNumeroAgencias();\n for(int i : agencias){\n cmbAgencias.addItem(\"Agência \" + i);\n }\n }", "public CadastroProdutoNew() {\n initComponents();\n }", "public FormularioCliente() {\n initComponents();\n }", "public ViewCreatePagamento() {\n initComponents();\n clientesDAO cDAO = DaoFactory.createClientesDao(); \n matriculaDAO mDAO = DaoFactory.createMatriculaDao();\n \n cmbIDClientes.addItem(null);\n cDAO.findAll().forEach((p) -> {\n cmbIDClientes.addItem(p.getNome());\n });\n \n \n txtDataAtual.setText(DateFormat.getDateInstance().format(new Date()));\n }", "public VistaCrearPedidoAbonado() {\n initComponents();\n errorLabel.setVisible(false);\n controlador = new CtrlVistaCrearPedidoAbonado(this);\n }", "public void adicionar() {\n String sql = \"insert into empresa(empresa, cnpj, endereco, telefone, email) values (?,?,?,?,?)\";\n try {\n pst = conexao.prepareStatement(sql);\n pst.setString(1, txtEmpNome.getText());\n pst.setString(2, txtEmpCNPJ.getText());\n pst.setString(3, txtEmpEnd.getText());\n pst.setString(4, txtEmpTel.getText());\n pst.setString(5, txtEmpEmail.getText());\n // validacao dos campos obrigatorios\n if ((txtEmpNome.getText().isEmpty()) || (txtEmpCNPJ.getText().isEmpty())) {\n JOptionPane.showMessageDialog(null, \"Preencha todos os campos obrigatórios\");\n } else {\n //a linha abaixo atualiza a tabela usuarios com os dados do formulario\n // a esttrutura abaixo confirma a inserção na tabela\n int adicionado = pst.executeUpdate();\n if (adicionado > 0) {\n JOptionPane.showMessageDialog(null, \"Empresa adicionada com sucesso\");\n txtEmpNome.setText(null);\n txtEmpEnd.setText(null);\n txtEmpTel.setText(null);\n txtEmpEmail.setText(null);\n txtEmpCNPJ.setText(null);\n }\n }\n\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, e);\n }\n }", "@FXML\n public void insereCidade(){\n try{ \t\n \tif(txtNome.getText().equals(\"\"))\n \t\tthrow new NullPointerException();\n \t\n \tif(txtNome.getText().matches(\".*\\\\d+.*\"))\n \t\tthrow new TemNumeroException();\n \t\n \tif(txtUf.getSelectionModel().isEmpty())\n \t\tthrow new NullPointerException();\n\n \tCidade c = new Cidade();\n \tc.setNome(txtNome.getText());\n \tc.setUf(txtUf.getSelectionModel().getSelectedItem());\n \tc.insere(conn);\n \tattTblCidade();\n \tlimpaCidade();\n \tMensagens.msgInformacao(\"Parabéns\",\"Cidade cadastrada com sucesso\");\n \t\n \t}catch (TemNumeroException e){\n \t\tMensagens.msgErro(\"FALHA\",\"O campo destacado não pode conter números\"); \n \t\t}catch (NullPointerException e){\n \t\t\tMensagens.msgErro(\"FALHA\",\"Preencha todos os campos\"); \n \t}catch (Exception e) {\n \t\te.printStackTrace();\n \t}\n }", "public MostraVenta(String idtrasp, Object[][] clienteM1, Object[][] vendedorM1, String idmarc, String responsable,ListaTraspaso panel)\n{\n this.padre = panel;\n this.clienteM = clienteM1;\n this.vendedorM = vendedorM1;\n this.idtraspaso= idtrasp;\n this.idmarca=idmarc;\n//this.tipoenvioM = new String[]{\"INGRESO\", \"TRASPASO\"};\n String tituloTabla =\"Detalle Venta\";\n // padre=panel;\n String nombreBoton1 = \"Registrar\";\n String nombreBoton2 = \"Cancelar\";\n // String nombreBoton3 = \"Eliminar Empresa\";\n\n setId(\"win-NuevaEmpresaForm1\");\n setTitle(tituloTabla);\n setWidth(400);\n setMinWidth(ANCHO);\n setHeight(250);\n setLayout(new FitLayout());\n setPaddings(WINDOW_PADDING);\n setButtonAlign(Position.CENTER);\n setCloseAction(Window.CLOSE);\n setPlain(true);\n\n but_aceptar = new Button(nombreBoton1);\n but_cancelar = new Button(nombreBoton2);\n // addButton(but_aceptarv);\n addButton(but_aceptar);\n addButton(but_cancelar);\n\n formPanelCliente = new FormPanel();\n formPanelCliente.setBaseCls(\"x-plain\");\n //formPanelCliente.setLabelWidth(130);\n formPanelCliente.setUrl(\"save-form.php\");\n formPanelCliente.setWidth(ANCHO);\n formPanelCliente.setHeight(ALTO);\n formPanelCliente.setLabelAlign(Position.LEFT);\n\n formPanelCliente.setAutoWidth(true);\n\n\ndat_fecha1 = new DateField(\"Fecha\", \"d-m-Y\");\n fechahoy = new Date();\n dat_fecha1.setValue(fechahoy);\n dat_fecha1.setReadOnly(true);\n\ncom_vendedor = new ComboBox(\"Vendedor al que enviamos\", \"idempleado\");\ncom_cliente = new ComboBox(\"Clientes\", \"idcliente\");\n//com_tipo = new ComboBox(\"Tipo Envio\", \"idtipo\");\n initValues1();\n\n\n\n formPanelCliente.add(dat_fecha1);\n// formPanelCliente.add(com_tipo);\n// formPanelCliente.add(tex_nombreC);\n// formPanelCliente.add(tex_codigoBarra);\n // formPanelCliente.add(tex_codigoC);\nformPanelCliente.add(com_vendedor);\n formPanelCliente.add(com_cliente);\n add(formPanelCliente);\nanadirListenersTexfield();\n addListeners();\n\n }", "@GetMapping(\"/cliente/new\")\n\tpublic String newCliente(Model model) {\n\t\tmodel.addAttribute(\"cliente\", new Cliente());\n\t\tControllerHelper.setEditMode(model, false);\n\t\t\n\t\t\n\t\treturn \"cadastro-cliente\";\n\t\t\n\t}", "public CrearPedidos() {\n initComponents();\n }", "public TelaEmpresa() {\n initComponents();\n conexao = ModuloConexao.conector();\n }", "public FrmDepartamentos() {\n initComponents();\n setLocationRelativeTo(this);\n this.jTexCodigo.requestFocus();\n }", "public String nuevo() {\n\n\t\tLOG.info(\"Submitado formulario, accion nuevo\");\n\t\tString view = \"/alumno/form\";\n\n\t\t// las validaciones son correctas, por lo cual los datos del formulario estan en\n\t\t// el atributo alumno\n\n\t\t// TODO simular index de la bbdd\n\t\tint id = this.alumnos.size();\n\t\tthis.alumno.setId(id);\n\n\t\tLOG.debug(\"alumno: \" + this.alumno);\n\n\t\t// TODO comprobar edad y fecha\n\n\t\talumnos.add(alumno);\n\t\tview = VIEW_LISTADO;\n\t\tmockAlumno();\n\n\t\t// mensaje flash\n\t\tFacesContext facesContext = FacesContext.getCurrentInstance();\n\t\tExternalContext externalContext = facesContext.getExternalContext();\n\t\texternalContext.getFlash().put(\"alertTipo\", \"success\");\n\t\texternalContext.getFlash().put(\"alertMensaje\", \"Alumno \" + this.alumno.getNombre() + \" creado con exito\");\n\n\t\treturn view + \"?faces-redirect=true\";\n\t}", "private void insertar() {\n try {\n cvo.setNombre_cliente(vista.txtNombre.getText());\n cvo.setApellido_cliente(vista.txtApellido.getText());\n cvo.setDireccion_cliente(vista.txtDireccion.getText());\n cvo.setCorreo_cliente(vista.txtCorreo.getText());\n cvo.setClave_cliente(vista.txtClave.getText());\n cdao.insertar(cvo);\n vista.txtNombre.setText(\"\");\n vista.txtApellido.setText(\"\");\n vista.txtDireccion.setText(\"\");\n vista.txtCorreo.setText(\"\");\n vista.txtClave.setText(\"\");\n JOptionPane.showMessageDialog(null, \"Registro Ingresado\");\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Debe ingresar Datos para guardar registro!\");\n }\n }", "public String crea() {\n c.setId(0);\n clienteDAO.crea(c); \n //Post-Redirect-Get\n return \"visualiza?faces-redirect=true&id=\"+c.getId();\n }", "public ManterCliente() {\n try {\n initComponents();\n BloquearCampos();\n bt_salvar.setEnabled(false);\n bt_editar.setEnabled(false);\n txt_codigo.setEditable(true);\n mascaraCNPJ = new MaskFormatter(\"###.###.###/####-##\");\n mascaraCPF = new MaskFormatter(\"###.###.###-##\");\n } catch (ParseException ex) {\n JOptionPane.showMessageDialog(null, \"Erro ao carregar formulário. Contate o suporte.\");\n }\n }", "public crud_empleados() {\n initComponents();\n txt_usuario1.setEditable(false);\n Mostrar();\n \n\n\n }", "private void azzeraInsertForm() {\n\t\tviewInserimento.getCmbbxTipologia().setSelectedIndex(-1);\n\t\tviewInserimento.getTxtFieldDataI().setText(\"\");\n\t\tviewInserimento.getTxtFieldValore().setText(\"\");\n\t\tviewInserimento.getTxtFieldDataI().setBackground(Color.white);\n\t\tviewInserimento.getTxtFieldValore().setBackground(Color.white);\n\t}", "public void crear() {\n con = new Conexion();\n con.setInsertar(\"insert into lenguajes_programacion (nombre, fecha_creacion, estado) values ('\"+this.getNombre()+\"', '\"+this.getFecha_creacion()+\"', 'activo')\");\n }", "public static void create(Formulario form){\n daoFormulario.create(form);\n }", "public FrmInsertar() {\n initComponents();\n }", "public void SalvarNovaPessoa(){\r\n \r\n\t\tpessoaModel.setUsuarioModel(this.usuarioController.GetUsuarioSession());\r\n \r\n\t\t//INFORMANDO QUE O CADASTRO FOI VIA INPUT\r\n\t\tpessoaModel.setOrigemCadastro(\"I\");\r\n \r\n\t\tpessoaRepository.SalvarNovoRegistro(this.pessoaModel);\r\n \r\n\t\tthis.pessoaModel = null;\r\n \r\n\t\tUteis.MensagemInfo(\"Registro cadastrado com sucesso\");\r\n \r\n\t}", "public frmMantEmpresas() {\n initComponents();\n this.presentarDatos();\n ClaseUtil.activarComponente(jPanelDatos, false);\n ClaseUtil.activarComponente(jPanelTabla, true);\n ClaseUtil.activarComponente(jPanelAcciones, false);\n }", "public AnadirCompra() {\n\t\tsetLayout(null);\n\t\t\n\t\tJPanel pCompra = new JPanel();\n\t\tpCompra.setBackground(SystemColor.text);\n\t\tpCompra.setBounds(0, 0, 772, 643);\n\t\tadd(pCompra);\n\t\tpCompra.setLayout(null);\n\t\t\n\t\tlblNewLabel = new JLabel(\"Compras\");\n\t\tlblNewLabel.setFont(new Font(\"Tahoma\", Font.PLAIN, 18));\n\t\tlblNewLabel.setBounds(684, 13, 76, 16);\n\t\tpCompra.add(lblNewLabel);\n\t\t\n\t\tlblNewLabel_1 = new JLabel(\"Personal\");\n\t\tlblNewLabel_1.setBounds(142, 130, 56, 16);\n\t\tpCompra.add(lblNewLabel_1);\n\t\t\n\t\tcmbPersonal = new JComboBox();\n\t\tcmbPersonal.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tcargaPersonal();\n\t\t\t}\n\t\t});\n\t\tcmbPersonal.setBounds(291, 127, 409, 22);\n\t\tpCompra.add(cmbPersonal);\n\t\t\n\t\tlblFechaSolicitado = new JLabel(\"Fecha solicitado\");\n\t\tlblFechaSolicitado.setBounds(142, 184, 91, 16);\n\t\tpCompra.add(lblFechaSolicitado);\n\t\t\n\t\ttextField = new JTextField();\n\t\ttextField.setBounds(291, 181, 409, 22);\n\t\tpCompra.add(textField);\n\t\ttextField.setColumns(10);\n\t\t\n\t\tlblEstado = new JLabel(\"Estado\");\n\t\tlblEstado.setBounds(142, 231, 91, 16);\n\t\tpCompra.add(lblEstado);\n\t\t\n\t\ttextField_1 = new JTextField();\n\t\ttextField_1.setBounds(291, 228, 409, 22);\n\t\tpCompra.add(textField_1);\n\t\ttextField_1.setColumns(10);\n\t\t\n\t\tlblFechaEntrega = new JLabel(\"Fecha entrega\");\n\t\tlblFechaEntrega.setBounds(142, 276, 91, 16);\n\t\tpCompra.add(lblFechaEntrega);\n\t\t\n\t\tlblFechaRequerido = new JLabel(\"Fecha requerido\");\n\t\tlblFechaRequerido.setBounds(142, 318, 108, 16);\n\t\tpCompra.add(lblFechaRequerido);\n\t\t\n\t\ttextField_2 = new JTextField();\n\t\ttextField_2.setColumns(10);\n\t\ttextField_2.setBounds(291, 273, 409, 22);\n\t\tpCompra.add(textField_2);\n\t\t\n\t\ttextField_3 = new JTextField();\n\t\ttextField_3.setColumns(10);\n\t\ttextField_3.setBounds(291, 315, 409, 22);\n\t\tpCompra.add(textField_3);\n\t\t\n\t\tlblFechaAnulado = new JLabel(\"Fecha anulado\");\n\t\tlblFechaAnulado.setBounds(142, 364, 91, 16);\n\t\tpCompra.add(lblFechaAnulado);\n\t\t\n\t\ttextField_4 = new JTextField();\n\t\ttextField_4.setColumns(10);\n\t\ttextField_4.setBounds(291, 361, 409, 22);\n\t\tpCompra.add(textField_4);\n\t\t\n\t\ttextField_5 = new JTextField();\n\t\ttextField_5.setColumns(10);\n\t\ttextField_5.setBounds(291, 405, 409, 22);\n\t\tpCompra.add(textField_5);\n\t\t\n\t\tlblValor = new JLabel(\"Valor\");\n\t\tlblValor.setBounds(142, 408, 91, 16);\n\t\tpCompra.add(lblValor);\n\t\t\n\t\tlabel = new JLabel(\"Productos\");\n\t\tlabel.setBounds(142, 453, 56, 16);\n\t\tpCompra.add(label);\n\t\t\n\t\tbtnAadirCompra = new JButton(\"A\\u00F1adir Compra\");\n\t\tbtnAadirCompra.setBackground(SystemColor.textHighlight);\n\t\tbtnAadirCompra.setBounds(216, 605, 388, 25);\n\t\tpCompra.add(btnAadirCompra);\n\t\t\n\t\tlist = new JList();\n\t\tlist.addListSelectionListener(new ListSelectionListener() {\n\t\t\tpublic void valueChanged(ListSelectionEvent arg0) {\n\t\t\t\tcargaProducto();\n\t\t\t}\n\t\t});\n\t\tlist.setBackground(SystemColor.controlHighlight);\n\t\tlist.setBounds(291, 452, 409, 84);\n\t\tpCompra.add(list);\n\t\tlist.setModel(jList);\n\t\t\n\t\tbutton = new JButton(\"< ATR\\u00C1S\");\n\t\tbutton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t//scrollPaneles.setViewportView(pgCompra);\n\t\t\t\thacerInvisible();\n\t\t\t}\n\t\t});\n\t\tbutton.setBackground(SystemColor.textHighlight);\n\t\tbutton.setBounds(12, 11, 106, 25);\n\t\tpCompra.add(button);\n\t\t\n\t\tscrollPaneles = new JScrollPane();\n\t\tscrollPaneles.setBounds(0, 0, 773, 643);\n\t\tadd(scrollPaneles);\n\n\t}", "public telaCadastro() {\n initComponents();\n populaTabela();\n }", "public TelaCadastroCliente() {\n initComponents();\n }", "public TelaCadastroCliente() {\n initComponents();\n }", "public FrmCadastro() {\n initComponents();\n\n }", "public DCrearDisco( InterfazDiscotienda id ){\r\n super( id, true );\r\n principal = id;\r\n\r\n panelDatos = new PanelCrearDisco( );\r\n panelBotones = new PanelBotonesDisco( this );\r\n\r\n getContentPane( ).add( panelDatos, BorderLayout.CENTER );\r\n getContentPane( ).add( panelBotones, BorderLayout.SOUTH );\r\n\r\n setTitle( \"Crear Disco\" );\r\n pack();\r\n }", "public void salvaCliente() {\n \n \n \n \n String nome = view.getjTextNome().getText(); //Tive que criar getter e setter pra poder acessar os campos da view\n String telefone = view.getjTextTelefone().getText();\n String cpf = view.getjTextCpf().getText();\n String endereco = view.getjTextEndereco().getText();\n\n \n Cliente client = new Cliente( nome, telefone, cpf, endereco);\n \n \n \n try {\n Connection conexao = new Conexao().getConnection();\n ClienteDAO clientedao = new ClienteDAO(conexao);\n clientedao.insert(client);\n \n JOptionPane.showMessageDialog(null, \"Cliente Cadastrado!\");\n \n } catch (SQLException ex) {\n //Logger.getLogger(CadCliente.class.getName()).log(Level.SEVERE, null, ex);\n JOptionPane.showMessageDialog(null, \"Erro ao cadastrar!\"+ex);\n }\n }", "public FormCadastroAutomovel() {\n initComponents();\n }", "public frmOrdenacao() {\n initComponents();\n setResizable(false);\n ordenacaoControle = new OrdenacaoControle();\n }", "public VistaCrearEmpleado() {\n\t\tsetClosable(true);\n\t\tsetFrameIcon(new ImageIcon(VistaCrearEmpleado.class.getResource(\"/com/mordor/mordorLloguer/recursos/account_circle24dp.png\")));\n\t\tsetBounds(100, 100, 467, 435);\n\t\tgetContentPane().setLayout(new MigLayout(\"\", \"[152px][235px]\", \"[19px][19px][19px][19px][19px][19px][45px][24px][19px][25px]\"));\n\t\t\n\t\tJLabel lblDni = new JLabel(\"DNI: \");\n\t\tgetContentPane().add(lblDni, \"cell 0 0,growx,aligny center\");\n\t\t\n\t\ttxtDNI = new JTextField();\n\t\tgetContentPane().add(txtDNI, \"cell 1 0,growx,aligny top\");\n\t\ttxtDNI.setColumns(10);\n\t\t\n\t\tJLabel lblNombre = new JLabel(\"Nombre: \");\n\t\tgetContentPane().add(lblNombre, \"cell 0 1,growx,aligny center\");\n\t\t\n\t\ttxtNombre = new JTextField();\n\t\tgetContentPane().add(txtNombre, \"cell 1 1,growx,aligny top\");\n\t\ttxtNombre.setColumns(10);\n\t\t\n\t\tJLabel lblApellidos = new JLabel(\"Apellidos: \");\n\t\tgetContentPane().add(lblApellidos, \"cell 0 2,growx,aligny center\");\n\t\t\n\t\ttxtApellidos = new JTextField();\n\t\tgetContentPane().add(txtApellidos, \"cell 1 2,growx,aligny top\");\n\t\ttxtApellidos.setColumns(10);\n\t\t\n\t\tJLabel lblDomicilio = new JLabel(\"Domicilio:\");\n\t\tgetContentPane().add(lblDomicilio, \"cell 0 3,growx,aligny center\");\n\t\t\n\t\ttxtDomicilio = new JTextField();\n\t\tgetContentPane().add(txtDomicilio, \"cell 1 3,growx,aligny top\");\n\t\ttxtDomicilio.setColumns(10);\n\t\t\n\t\tJLabel lblCp = new JLabel(\"CP:\");\n\t\tgetContentPane().add(lblCp, \"cell 0 4,growx,aligny center\");\n\t\t\n\t\ttxtCp = new JTextField();\n\t\tgetContentPane().add(txtCp, \"cell 1 4,growx,aligny top\");\n\t\ttxtCp.setColumns(10);\n\t\t\n\t\tJLabel lblEmail = new JLabel(\"Email:\");\n\t\tgetContentPane().add(lblEmail, \"cell 0 5,growx,aligny center\");\n\t\t\n\t\ttxtEmail = new JTextField();\n\t\tgetContentPane().add(txtEmail, \"cell 1 5,growx,aligny top\");\n\t\ttxtEmail.setColumns(10);\n\t\t\n\t\tJLabel lblFechaDeNacimiento = new JLabel(\"Fecha de Nacimiento:\");\n\t\tgetContentPane().add(lblFechaDeNacimiento, \"cell 0 6,alignx left,aligny center\");\n\t\t\n\t\ttxtDate = new WebDateField();\n\t\tgetContentPane().add(txtDate, \"cell 1 6,growx,aligny top\");\n\t\t\n\t\tJLabel lblCargo = new JLabel(\"Cargo:\");\n\t\tgetContentPane().add(lblCargo, \"cell 0 7,growx,aligny center\");\n\t\t\n\t\tcomboBoxCargo= new JComboBox<String> ();\n\t\tgetContentPane().add(comboBoxCargo, \"cell 1 7,growx,aligny top\");\n\t\t\n\t\tJLabel lblContrasea = new JLabel(\"Contraseña:\");\n\t\tgetContentPane().add(lblContrasea, \"cell 0 8,growx,aligny center\");\n\t\t\n\t\tpasswordField = new JPasswordField();\n\t\tgetContentPane().add(passwordField, \"cell 1 8,growx,aligny top\");\n\t\t\n\t\tbtnAdd = new JButton(\"Add\");\n\t\tgetContentPane().add(btnAdd, \"cell 0 9,growx,aligny top\");\n\t\t\n\t\tbtnCancel = new JButton(\"Cancel\");\n\t\tbtnCancel.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tdispose();\n\t\t\t}\n\t\t});\n\t\tgetContentPane().add(btnCancel, \"cell 1 9,growx,aligny top\");\n\n\t}", "@GetMapping(value = \"/create\") // https://localhost:8080/etiquetasTipoDisenio/create\n\tpublic String create(Model model) {\n\t\tetiquetasTipoDisenio etiquetasTipoDisenio = new etiquetasTipoDisenio();\n\t\tmodel.addAttribute(\"title\", \"Registro de una nuev entrega\");\n\t\tmodel.addAttribute(\"etiquetasTipoDisenio\", etiquetasTipoDisenio); // similar al ViewBag\n\t\treturn \"etiquetasTipoDisenio/form\"; // la ubicacion de la vista\n\t}", "public GestaoFormando() {\n \n initComponents();\n listarEquipamentos();\n listarmapainscritos();\n }", "public frmClienteIncobrable() {\n initComponents();\n \n //CARGAR PROVINCIAS\n ArrayList<clsComboBox> dataProvincia = objProvincia.consultarTipoIncobrable(); \n for(int i=0;i<dataProvincia.size();i=i+1)\n {\n clsComboBox oItem = new clsComboBox(dataProvincia.get(i).getCodigo(), dataProvincia.get(i).getDescripcion());\n cmbTipoIncobrable.addItem(oItem); \n } \n \n \n //CARGAR AUTOCOMPLETAR\n List<String> dataCedula = objCliente.consultarCedulas(); \n SelectAllUtils.install(txtCedula);\n ListDataIntelliHints intellihints = new ListDataIntelliHints(txtCedula, dataCedula); \n intellihints.setCaseSensitive(false);\n \n Date fechaActual = new Date();\n txtFecha.setDate(fechaActual);\n }", "public GestorAhorcadoManagedBean() {\r\n ahorcado = new Ahorcado();\r\n }", "public Empleado() { }", "public void crearEntidad() throws EntidadNotFoundException {\r\n\t\tif (validarCampos(getNewEntidad())) {\r\n\t\t\tif (validarNomNitRepetidoEntidad(getNewEntidad())) {\r\n\t\t\t\tFacesContext.getCurrentInstance().addMessage(null,\r\n\t\t\t\t\t\tnew FacesMessage(FacesMessage.SEVERITY_WARN, \"Advertencia: \", \"Nombre, Nit o Prejifo ya existe en GIA\"));\r\n\t\t\t} else {\r\n\t\t\t\tif (entidadController.crearEntidad(getNewEntidad())) {\r\n\t\t\t\t\tmensajeGrow(\"Entidad Creada Satisfactoriamente\", getNewEntidad());\r\n\t\t\t\t\tRequestContext.getCurrentInstance().execute(\"PF('entCrearDialog').hide()\");\r\n\t\t\t\t\tsetNewEntidad(new EntidadDTO());\r\n\t\t\t\t\tresetCodigoBUA();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tmensajeGrow(\"Entidad No Fue Creada\", getNewEntidad());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tlistarEntidades();\r\n\t\t\t// newEntidad = new EntidadDTO();\r\n\t\t\t// fechaActual();\r\n\t\t}\r\n\r\n\t}", "public FrmCrearFotoEmpresa() {\n initComponents();\n }", "public FrmClienteEsc() {\n initComponents();\n }", "private void criaCabecalho() {\r\n\t\tJLabel cabecalho = new JLabel(\"Cadastro de Homem\");\r\n\t\tcabecalho.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tcabecalho.setFont(new Font(\"Arial\", Font.PLAIN, 16));\r\n\t\tcabecalho.setForeground(Color.BLACK);\r\n\t\tcabecalho.setBounds(111, 41, 241, 33);\r\n\t\tpainelPrincipal.add(cabecalho);\r\n\t}", "public frmCliente() {\n initComponents();\n CargarProvinciasRes();\n CargarProvinciasTra();\n ManejadorCliente objCli = new ManejadorCliente();\n }", "@RequestMapping(value = { \"/new\" }, method = RequestMethod.POST)\n\tpublic String saveEntity(@Valid ENTITY tipoConsumo, BindingResult result, ModelMap model,\n\t\t\t@RequestParam(required = false) Integer idEstadia) {\n\t\ttry{\n\t\n\t\t\tif (result.hasErrors()) {\n\t\t\t\treturn viewBaseLocation + \"/form\";\n\t\t\t}\n\t\n\t\t\tabm.guardar(tipoConsumo);\n\t\n\t\t\tif(idEstadia != null){\n\t\t\t\tmodel.addAttribute(\"idEstadia\", idEstadia);\n\t\t\t}\n\t\n\t\t\tmodel.addAttribute(\"success\", \"La creaci&oacuten se realiz&oacute correctamente.\");\n\t\t\t\n\t\t} catch(Exception e) {\n\t\t\tmodel.addAttribute(\"success\", \"La creaci&oacuten no pudo realizarse.\");\n\t\t}\n\t\tmodel.addAttribute(\"loggedinuser\", getPrincipal());\n\t\treturn \"redirect:list\";\n\t}", "public CadastroCliente() {\n initComponents();\n }", "public CadastroCompra() {\n initComponents();\n txtDescProduto.setEditable(false);\n txtValor.setEditable(false);\n txtQtdItens.setEditable(false);\n txtPrecoTotal.setEditable(false);\n txtFornecedor.setEditable(false);\n }", "public FormInserir() {\n initComponents();\n }", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n String nombre = request.getParameter(\"nombre\");\n String descripcion = request.getParameter(\"descripcion\");\n String cantidad = request.getParameter(\"cantidad\");\n String precio = request.getParameter(\"precio\");\n String pago = request.getParameter(\"pago\");\n \n //creando objeto del costructor\n modelo.ventas venta = new modelo.ventas();\n //almacenando datos en las variables con el constructor \n venta.setNombre(nombre);\n venta.setDescripcion(descripcion);\n venta.setCantidad(Integer.parseInt(cantidad));\n venta.setPrecio(Double.parseDouble(precio));\n venta.setPago(Integer.parseInt(pago));\n \n //creando objeto para guardar cliente\n modelo.addVenta addventa = new modelo.addVenta();\n try {\n addventa.agrega(venta);\n } catch (SQLException ex) {\n Logger.getLogger(formVenta.class.getName()).log(Level.SEVERE, null, ex);\n }\n response.sendRedirect(\"ventas\");//si se guarda exitosamente se redirecciona a membresia\n }", "private void insertar() {\n String nombre = edtNombre.getText().toString();\n String telefono = edtTelefono.getText().toString();\n String correo = edtCorreo.getText().toString();\n // Validaciones\n if (!esNombreValido(nombre)) {\n TextInputLayout mascaraCampoNombre = (TextInputLayout) findViewById(R.id.mcr_edt_nombre_empresa);\n mascaraCampoNombre.setError(\"Este campo no puede quedar vacío\");\n } else {\n mostrarProgreso(true);\n String[] columnasFiltro = {Configuracion.COLUMNA_EMPRESA_NOMBRE, Configuracion.COLUMNA_EMPRESA_TELEFONO\n , Configuracion.COLUMNA_EMPRESA_CORREO, Configuracion.COLUMNA_EMPRESA_STATUS};\n String[] valorFiltro = {nombre, telefono, correo, estado};\n Log.v(\"AGET-ESTADO\", \"ENVIADO: \" + estado);\n resultado = new ObtencionDeResultadoBcst(this, Configuracion.INTENT_EMPRESA_CLIENTE, columnasFiltro, valorFiltro, tabla, null, false);\n if (ID.isEmpty()) {\n resultado.execute(Configuracion.PETICION_EMPRESA_REGISTRO, tipoPeticion);\n } else {\n resultado.execute(Configuracion.PETICION_EMPRESA_MODIFICAR_ELIMINAR + ID, tipoPeticion);\n }\n }\n }", "public Cliente ddCliente(String modo){\n ClienteDAO cd = new ClienteDAO();\n Cliente c = null;\n String rz = txtCliRz.getText()+\"\";\n String nFantasia = txtCliNFant.getText()+\"\";\n String DDDTel = txtCliDDD.getText()+\"\";\n String tel = txtCliTel.getText()+\"\";\n String DDDCel = txtCliDDDTel2.getText()+\"\";\n String cel = txtCliTel2.getText()+\"\";\n String rsp = txtCliResp.getText()+\"\"; \n String cnpj = txtCliCNPJ.getText()+\"\";\n c = new Cliente();\n \n if(modo.equalsIgnoreCase(\"a\")){ \n int cod = Integer.parseInt(txtCliCod.getText());\n c.setId(cod);\n } \n \n c.setCNPJ(cnpj);\n c.setRSocial(rz);\n c.setNFantasia(nFantasia);\n c.setDDDCel(DDDCel);\n c.setTel2(cel);\n c.setRsp(rsp);\n c.setDDDTel(DDDTel);\n c.setTel(tel);\n \n return c;\n }", "public ControladorPrueba() {\r\n }", "public void insertar() {\r\n if (vista.jTNombreempresa.getText().equals(\"\") || vista.jTTelefono.getText().equals(\"\") || vista.jTRFC.getText().equals(\"\") || vista.jTDireccion.getText().equals(\"\")) {\r\n JOptionPane.showMessageDialog(null, \"Faltan Datos: No puedes dejar cuadros en blanco\");//C.P.M Verificamos si las casillas esta vacia si es asi lo notificamos\r\n } else {//C.P.M de lo contrario prosegimos\r\n modelo.setNombre(vista.jTNombreempresa.getText());//C.P.M mandamos las variabes al modelo \r\n modelo.setDireccion(vista.jTDireccion.getText());\r\n modelo.setRfc(vista.jTRFC.getText());\r\n modelo.setTelefono(vista.jTTelefono.getText());\r\n \r\n Error = modelo.insertar();//C.P.M Ejecutamos el metodo del modelo \r\n if (Error.equals(\"\")) {//C.P.M Si el modelo no regresa un error es que todo salio bien\r\n JOptionPane.showMessageDialog(null, \"Se guardo exitosamente la configuracion\");//C.P.M notificamos a el usuario\r\n vista.dispose();//C.P.M y cerramos la vista\r\n } else {//C.P.M de lo contrario \r\n JOptionPane.showMessageDialog(null, Error);//C.P.M notificamos a el usuario el error\r\n }\r\n }\r\n }", "public FrmAbmAfiliado() {\n initComponents();\n }", "public frmTelaVendas() {\n initComponents();\n this.carrinho = new CarrinhoDeCompras();\n listaItens.setModel(this.lista);\n }", "public ContactoFormBean() {\r\n setContexto();\r\n }", "public void createAgendamento() {\n\n if (tbagendamento.getTmdataagendamento().after(TimeControl.getDateIni())) {\n if (agendamentoLogic.createTbagendamento(tbagendamento)) {\n AbstractFacesContextUtils.redirectPage(PagesUrl.URL_AGENDAMENTO_LIST);\n AbstractFacesContextUtils.addMessageInfo(\"Agendamento cadastrado com sucesso.\");\n } else {\n AbstractFacesContextUtils.addMessageWarn(\"Falhar ao realizado cadastro do agendamento.\");\n }\n } else {\n AbstractFacesContextUtils.addMessageWarn(\"verifique se a data de agendamento esta correta.\");\n }\n }", "public FrmNuevoAlumno() {\n initComponents();\n obtenerCarreras();\n comboCarrera.setSelectedIndex(-1);\n obtenerDependencias();\n comboPlantel.setSelectedIndex(-1);\n mostrarAlumnos();\n deshabilitar();\n lblId.setVisible(false);\n }", "@RequestMapping(value=\"/formpaciente\")\r\n\tpublic String crearPaciente(Map<String, Object> model) {\t\t\r\n\t\t\r\n\t\tPaciente paciente = new Paciente();\r\n\t\tmodel.put(\"paciente\", paciente);\r\n\t\tmodel.put(\"obrasociales\",obraSocialService.findAll());\r\n\t\t//model.put(\"obrasPlanesForm\", new ObrasPlanesForm());\r\n\t\t//model.put(\"planes\", planService.findAll());\r\n\t\tmodel.put(\"titulo\", \"Formulario de Alta de Paciente\");\r\n\t\t\r\n\t\treturn \"formpaciente\";\r\n\t}", "@Override\n\tpublic void create(Empleado e) {\n\t\tSystem.out.println(\"Graba el empleado \" + e + \" en la BBDD.\");\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n nome = new javax.swing.JTextField();\n cep = new javax.swing.JTextField();\n cidade = new javax.swing.JTextField();\n endereco = new javax.swing.JTextField();\n codigo = new javax.swing.JTextField();\n dependencia = new javax.swing.JComboBox<>();\n bairro = new javax.swing.JTextField();\n jLabel2 = new javax.swing.JLabel();\n salvar = new javax.swing.JButton();\n deletar = new javax.swing.JButton();\n atualizar = new javax.swing.JButton();\n pesquisar = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"Cadastro Escola\");\n setResizable(false);\n setSize(new java.awt.Dimension(0, 0));\n getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n nome.setBorder(null);\n getContentPane().add(nome, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 200, 390, 30));\n\n cep.setBorder(null);\n cep.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n cepActionPerformed(evt);\n }\n });\n getContentPane().add(cep, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 420, 390, 30));\n\n cidade.setBorder(null);\n getContentPane().add(cidade, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 350, 390, 30));\n\n endereco.setBorder(null);\n getContentPane().add(endereco, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 490, 380, 30));\n\n codigo.setBorder(null);\n getContentPane().add(codigo, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 560, 140, 30));\n\n dependencia.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Estadual\", \"Municipal\", \"Particular\" }));\n getContentPane().add(dependencia, new org.netbeans.lib.awtextra.AbsoluteConstraints(450, 560, 130, 30));\n\n bairro.setBorder(null);\n getContentPane().add(bairro, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 272, 390, 30));\n\n jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/imgs/tela.png\"))); // NOI18N\n jLabel2.setText(\"jLabel2\");\n getContentPane().add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 660, -1));\n\n salvar.setText(\"Salvar\");\n salvar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n salvarActionPerformed(evt);\n }\n });\n getContentPane().add(salvar, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 640, 150, 50));\n\n deletar.setText(\"Excluir\");\n deletar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n deletarActionPerformed(evt);\n }\n });\n getContentPane().add(deletar, new org.netbeans.lib.awtextra.AbsoluteConstraints(500, 640, 150, 50));\n\n atualizar.setText(\"Alterar\");\n atualizar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n atualizarActionPerformed(evt);\n }\n });\n getContentPane().add(atualizar, new org.netbeans.lib.awtextra.AbsoluteConstraints(180, 640, 140, 50));\n\n pesquisar.setText(\"Pesquisar\");\n pesquisar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n pesquisarActionPerformed(evt);\n }\n });\n getContentPane().add(pesquisar, new org.netbeans.lib.awtextra.AbsoluteConstraints(340, 640, 150, 50));\n\n pack();\n setLocationRelativeTo(null);\n }", "public vistaEjemplo() {\n initComponents();\n con=new Conexion();\n data = new Datas(con);\n usuario = new Usuario();\n jTApellido.setEnabled(false);\n jTMail.setEnabled(false);\n jTNombre.setEnabled(false);\n jTPassword.setEnabled(false);\n JdcFechaDeEntrada.setEnabled(false);\n jBPdf.setEnabled(false);\n }", "@GetMapping(\"/createRegistro\")\n\tpublic String crearValidacion(Model model) {\n\t\tList<Barrio> localidades = barrioService.obtenerBarrios();\n\t\tmodel.addAttribute(\"localidades\",localidades);\n\t\tmodel.addAttribute(\"persona\",persona);\n\t\tmodel.addAttribute(\"validacion\",validacion);\n\t\tmodel.addAttribute(\"registro\",registro);\n\t\tmodel.addAttribute(\"barrio\",barrio);\n\t\treturn \"RegistroForm\";\n\t}", "public Cliente(){\r\n this.nome = \"\";\r\n this.email = \"\";\r\n this.endereco = \"\";\r\n this.id = -1;\r\n }", "public JFrmCadDeclaAcompanhante1() {\n initComponents();\n int diaSelecionado;\n }", "public frmAfiliado() {\n initComponents();\n \n }", "@Override\n protected void carregaObjeto() throws ViolacaoRegraNegocioException {\n entidade.setNome( txtNome.getText() );\n entidade.setDescricao(txtDescricao.getText());\n entidade.setTipo( txtTipo.getText() );\n entidade.setValorCusto(new BigDecimal((String) txtCusto.getValue()));\n entidade.setValorVenda(new BigDecimal((String) txtVenda.getValue()));\n \n \n }", "public FrmCadUsuario() {\n initComponents();\n Connection conexao = new Conexao().getConnection();\n\n txtId.setEnabled(false);\n lista = usuarioController.getUsuarios();\n if (lista.isEmpty()) {\n JOptionPane.showMessageDialog(null, \"Ainda não foram cadastrados usuários\");\n } else {\n mostrarDados();\n }\n }", "public FrmNuevoProveedor() {\n initComponents();\n }", "public TelaAgendaConsulta() {\n initComponents();\n }", "public CrearQuedadaVista() {\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n etiquetaTitulo = new javax.swing.JLabel();\n jScrollPane1 = new javax.swing.JScrollPane();\n tablaCuentas = new javax.swing.JTable();\n etiquetaLeyenda = new javax.swing.JLabel();\n jPanel2 = new javax.swing.JPanel();\n etiquetaCodigo = new javax.swing.JLabel();\n campoCodigo = new javax.swing.JTextField();\n etiquetaDescripcion = new javax.swing.JLabel();\n campoDescripcion = new javax.swing.JTextField();\n comboCuentaTitulo = new javax.swing.JComboBox<>();\n etiquetaCuentaTitulo = new javax.swing.JLabel();\n botonAceptar = new javax.swing.JButton();\n etiquetaNivel = new javax.swing.JLabel();\n campoNivel = new javax.swing.JTextField();\n etiquetaTitulo2 = new javax.swing.JLabel();\n botonVolver = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n\n etiquetaTitulo.setFont(new java.awt.Font(\"Tahoma\", 1, 13)); // NOI18N\n etiquetaTitulo.setText(\"Crear una nueva Cuenta o Titulo\");\n\n tablaCuentas = new javax.swing.JTable() {\n public boolean isCellEditable(int rowIndex, int colIndex){\n return false;\n }\n };\n tablaCuentas.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null}\n },\n new String [] {\n \"Codigo\", \"Descripcion\", \"Tipo\", \"Nro Cuenta\"\n }\n ));\n jScrollPane1.setViewportView(tablaCuentas);\n\n etiquetaLeyenda.setText(\"Seleccione bajo que titulo se crea la nueva cuenta o titulo\");\n\n etiquetaCodigo.setText(\"Codigo:\");\n\n etiquetaDescripcion.setText(\"Descripcion:\");\n\n comboCuentaTitulo.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Titulo\", \"Cuenta\" }));\n\n etiquetaCuentaTitulo.setText(\"Cuenta o Titulo:\");\n\n botonAceptar.setText(\"Aceptar\");\n\n etiquetaNivel.setText(\"Nivel:\");\n\n campoNivel.setEnabled(false);\n\n etiquetaTitulo2.setText(\"Datos de la nueva Cuenta\");\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(22, 22, 22)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(botonAceptar)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(etiquetaCodigo)\n .addComponent(etiquetaDescripcion)\n .addComponent(etiquetaCuentaTitulo))\n .addGap(18, 18, 18)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(campoDescripcion, javax.swing.GroupLayout.PREFERRED_SIZE, 257, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(comboCuentaTitulo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(34, 34, 34)\n .addComponent(etiquetaNivel)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(campoNivel, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(campoCodigo, javax.swing.GroupLayout.PREFERRED_SIZE, 257, javax.swing.GroupLayout.PREFERRED_SIZE)))))\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(99, 99, 99)\n .addComponent(etiquetaTitulo2)))\n .addContainerGap(38, Short.MAX_VALUE))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(etiquetaTitulo2)\n .addGap(33, 33, 33)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(campoCodigo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(etiquetaCodigo))\n .addGap(40, 40, 40)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(etiquetaDescripcion)\n .addComponent(campoDescripcion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(59, 59, 59)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(comboCuentaTitulo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(etiquetaCuentaTitulo)\n .addComponent(etiquetaNivel)\n .addComponent(campoNivel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(61, 61, 61)\n .addComponent(botonAceptar)\n .addContainerGap(52, Short.MAX_VALUE))\n );\n\n botonVolver.setText(\"Volver\");\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(39, 39, 39)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(etiquetaLeyenda)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(50, 50, 50)\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(87, 87, 87)\n .addComponent(botonVolver))))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(317, 317, 317)\n .addComponent(etiquetaTitulo)))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(24, 24, 24)\n .addComponent(etiquetaTitulo)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 26, Short.MAX_VALUE)\n .addComponent(etiquetaLeyenda)\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 531, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(33, 33, 33))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(botonVolver)\n .addGap(67, 67, 67))))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n pack();\n }", "public void inseriEmpresa() throws IOException {\n\t\tString r;\n\t\tthis.vetEmpreas[this.nEmpresas] = new Empresa();\n\t\t\n\t\tSystem.out.println(\"Inseri o nome \");\n\t\tr = EntradaTeclado.leString();\n\t\tthis.vetEmpreas[this.nEmpresas].setNome(r);\n\n\t\tSystem.out.println(\"Inseri o CNPJ \");\n\t\tr = EntradaTeclado.leString();\n\t\tthis.vetEmpreas[this.nEmpresas].setCnpj(r);\n\t\t\n\t\tSystem.out.println(\"Inseri o endereco \");\n\t\tr = EntradaTeclado.leString();\n\t\tthis.vetEmpreas[this.nEmpresas].setEndereco(r);\n\t\t\n\t\tSystem.out.println(\"Inseri o email \");\n\t\tr = EntradaTeclado.leString();\n\t\tthis.vetEmpreas[this.nEmpresas].setEmail(r);\n\t\t\n\t\tSystem.out.println(\"Inseri InscricaoEstadual \");\n\t\tr = EntradaTeclado.leString();\n\t\tthis.vetEmpreas[this.nEmpresas].setInscricaoEstadual(r);\n\t\t\n\t\tSystem.out.println(\"Inseri Razao Social \");\n\t\tr = EntradaTeclado.leString();\n\t\tthis.vetEmpreas[this.nEmpresas].setRazaoSocial(r);\n\t\t\n\t\tthis.nEmpresas +=1;\n\t}", "public VentanaEmpleado()\n\t{\n\t\tinitComponents();\n\t\tm = ( DefaultTableModel ) tblEmpleado.getModel();\n\n\t\tcargarTablaDesdeBD();\n\t}", "public JanelaTipoContato() {\r\n initComponents();\r\n try {\r\n\r\n List<TipoContato> tipoContatos = (List<TipoContato>) (Object) tipoContatoDao.pesquisarTodos();\r\n adicionarListaTipoContatosTabela(tipoContatos);\r\n } catch (Exception exception) {\r\n }\r\n }", "public void createEmp(Empresa p) throws ClassNotFoundException {\r\n\r\n java.sql.Connection con = ConnectionFactory.getConnection();\r\n PreparedStatement stmt = null;\r\n\r\n try {\r\n stmt = con.prepareStatement(\"INSERT INTO tbempresas(codEmp,nomeEmp)\" + \"VALUES(?,?)\");\r\n stmt.setInt(1, p.getCodEmp());\r\n stmt.setString(2, p.getNomeEmp());\r\n\r\n stmt.executeUpdate();\r\n\r\n JOptionPane.showMessageDialog(null, \"salvo com sucesso\");\r\n } catch (SQLException ex) {\r\n System.out.println(ex);\r\n } finally {\r\n ConnectionFactory.closeConnection((com.mysql.jdbc.Connection) con, stmt);\r\n }\r\n }", "public void crearEmpresa (Empresa empresa) throws Exception{\r\n\t\tEmpresa emp = daoEmpresa.buscarEmpresa(empresa.getId());\r\n\t\tif(emp == null){\r\n\t\t\tdaoEmpresa.crearEmpresa(empresa);\r\n\t\t}else{\r\n\t\t\tthrow new ExcepcionNegocio(\"La empresa ya esta registrada\");\r\n\t\t}\r\n\t}", "public frmSecoes(int cod) {\n initComponents();\n bd = new BD();\n secaodao = new SecaoDAO();\n secoes = secaodao.Abrir(cod);\n secoesapagar = new LinkedList<>();\n adicionasecaotable();\n }", "public CadastroUsuario() {\n initComponents();\n }", "public RegistrarCompra() {\n initComponents();\n tabelaFornecedor.setModel(modelFornecedor);\n\n }", "public Empresa()\n\t{\n\t\tclientes = new HashMap<String, Cliente>();\n\t\tplanes = new ArrayList<Plan>();\n\t\t\n\t}", "public FrmCadastroVenda(JDesktopPane desktop, int permissao, int op, String nota) {\r\n\t\tsuper();\r\n\t\tthis.desk = desktop;\r\n\t\tthis.permissao = permissao;\r\n\t\tthis.op = op;\r\n\t\tinitialize();\r\n\t\ttxtCnpjCliente.setEditable(false);\r\n\t\ttxtCnpjRepresentada.setEditable(false);\r\n\t\ttxtVendedor.setEditable(false);\r\n\t\tchkComissionado.setEnabled(false);\r\n\t\ttxtVlFinal.setEditable(false);\r\n\t\ttxtVlFinal2.setEditable(false);\r\n\t\tif(getOp()==0){//Novo cadastro\r\n\r\n\t\t}else{//Exibir dados\r\n\t\t\tif(getPermissao()==1){\r\n\t\t\t\tabaPrincipal.addTab(\"Comissão\", null, abaComissao, null);\t\r\n\t\t\t\tajustaDados(nota);\r\n\t\t\t\tdesabilitaCampos();\r\n\t\t\t\tif(txtComissao.getText().equals(\"R$ 0,00\")){\r\n\t\t\t\t\ttxtComissao.setEditable(true);\t\r\n\t\t\t\t}else{\r\n\t\t\t\t\ttxtComissao.setEditable(false);\r\n\t\t\t\t}\t\t\t\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\tajustaDados(nota);\r\n\t\t\t\tdesabilitaCampos();\t\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public ClienteModel(String nome,\n String email,\n String cpf,\n String sexo,\n String nascimento,\n String estadoCivil,\n String celular,\n String telefone,\n String endereco) {\n\n clientesCadastrados++;\n this.id = clientesCadastrados;\n this.nome = nome;\n this.email = email;\n this.cpf = cpf;\n this.nascimento = nascimento;\n this.sexo = sexo;\n this.estadoCivil = estadoCivil;\n this.celular = celular;\n this.telefone = telefone;\n this.endereco = endereco;\n }", "public void makeClient() {\n try {\n clienteFacade.create(cliente);\n FacesContext.getCurrentInstance().addMessage(\"messages\", new FacesMessage(FacesMessage.SEVERITY_INFO, \"Cliente creado exitosamente\", null));\n } catch (Exception e) {\n System.err.println(\"Error en la creacion del usuario: \" + e.getMessage());\n FacesContext.getCurrentInstance().addMessage(\"messages\", new FacesMessage(FacesMessage.SEVERITY_FATAL, e.getMessage(), null));\n }\n }", "Compuesta createCompuesta();", "public Empleado(String nombre, String departamento, String posicion, int salario)\n {\n // initialise instance variables\n this.nombre=nombre;\n this.departamento=departamento;\n this.posicion=posicion;\n this.salario=salario;\n \n }", "public FrmDatosMiembro(int Id, String nombres, String apellidos,\n String usuario, String cedula, String rol){\n \n initComponents();;\n ID = Id;\n this.TxtNombres.setText(nombres);\n this.TxtApellidos.setText(apellidos);\n this.TxtUsuario.setText(usuario);\n this.TxtCedula.setText(cedula);\n \n llenarComboBox();\n tipoMiembro(rol);\n }", "public frmAddIncidencias() {\n initComponents();\n }", "private void insert(HttpServletRequest request)throws Exception {\n\t\tPedido p = new Pedido();\r\n\t\tCliente c = new Cliente();\r\n\t\tCancion ca = new Cancion();\r\n\t\tp.setCod_pedido(request.getParameter(\"codigo\"));\r\n\t\tca.setCod_cancion(request.getParameter(\"cod_cancion\"));\r\n\t\tc.setCod_cliente(request.getParameter(\"cod_cliente\"));\r\n\t\tp.setCan(ca);\r\n\t\tp.setCl(c);\r\n\t\t\r\n\t\tpdmodel.RegistrarPedido(p);\r\n\t\t\r\n\t}", "public InformeCobranzasView() {\n super();\n setLocationRelativeTo(this);\n initComponents();\n estadoInicial();\n\n estilosFecha();\n Utilidad.soloNumeros(txHasta);\n Utilidad.soloNumeros(txDesde);\n \n cbOpcion.setSelectedIndex(0);\n\n }", "public void abrirDialogoCustodio(){\n\t\tif(aut_empleado.getValor()!=null){\n\t\t\ttab_tarspaso_Custodio.limpiar();\n\t\t\ttab_tarspaso_Custodio.insertar();\n\t\t\t//tab_direccion.limpiar();\n\t\t//\ttab_direccion.insertar();\n\t\t\tdia_traspaso_custodio.dibujar();\n\t\t}\n\t\telse{\n\t\t\tutilitario.agregarMensaje(\"Inserte un Custodio\", \"\");\n\t\t}\n\n\t}", "public Pn_Nuevo_Empleado() {\n initComponents();\n RowApariencia();\n RowHeaderApariencia();\n \n\n aparenciaTabs();\n bloquearComponentes();\n ComponenteNoEditable();\n cbIndexInicial();\n cargarTabla();\n cargarDepartamentos();\n cargarCargos();\n cargarHorarios();\n tamañoTabla();\n\n }", "public void limpiarCamposFormBusqueda() {\n\t}", "@PostMapping(\"/agregarCliente\")\r\n public @ResponseBody\r\n Map<String, Object> agregarCliente(\r\n @RequestParam(\"tipoDocumento\") String tipoDocumento,\r\n @RequestParam(\"documento\") String documento,\r\n @RequestParam(\"nombre\") String nombre,\r\n @RequestParam(\"pais\") String pais,\r\n @RequestParam(\"ciudad\") String ciudad,\r\n @RequestParam(\"direccion\") String direccion,\r\n @RequestParam(\"telefono\") String telefono,\r\n @RequestParam(\"correo\") String correo) {\r\n try {\r\n\r\n Cliente CL = new Cliente();\r\n\r\n CL.setTipoDocumento(tipoDocumento);\r\n CL.setDocumento(documento);\r\n CL.setNombre(nombre);\r\n CL.setPais(pais);\r\n CL.setCiudad(ciudad);\r\n CL.setDireccion(direccion);\r\n CL.setTelefono(telefono);\r\n CL.setCorreo(correo.toLowerCase());\r\n CL.setUser(usuario());\r\n\r\n clienteRepository.save(CL);\r\n\r\n return ResponseUtil.mapOK(CL);\r\n } catch (Exception e) {\r\n return ResponseUtil.mapError(\"Error en el proceso \" + e);\r\n }\r\n }" ]
[ "0.729816", "0.71782535", "0.70170325", "0.68061644", "0.6788415", "0.6667447", "0.6573997", "0.6547248", "0.65434855", "0.6525495", "0.6506535", "0.6506328", "0.6484427", "0.6458931", "0.64523524", "0.644074", "0.6418615", "0.63980365", "0.6383084", "0.6363214", "0.6360747", "0.63538194", "0.63524604", "0.6348202", "0.63216513", "0.6318775", "0.6315714", "0.63086283", "0.6294343", "0.6291164", "0.6290654", "0.62704694", "0.6262481", "0.6262481", "0.62608695", "0.626037", "0.6256966", "0.6249844", "0.62354356", "0.6232564", "0.62320274", "0.6231807", "0.6230459", "0.6226867", "0.62018675", "0.6196071", "0.6175612", "0.6174055", "0.61626774", "0.6155471", "0.6154103", "0.6145291", "0.6133304", "0.6132967", "0.61325276", "0.61325", "0.61240333", "0.61240244", "0.6114611", "0.609993", "0.60641044", "0.606127", "0.6059704", "0.60541075", "0.60526973", "0.60407996", "0.6032743", "0.60264844", "0.60262406", "0.6023228", "0.6021538", "0.60191005", "0.6014066", "0.6014064", "0.6008575", "0.6006997", "0.6003149", "0.6001464", "0.5998208", "0.5986882", "0.59858614", "0.5977274", "0.59677696", "0.59667087", "0.5963969", "0.59576225", "0.595758", "0.59571326", "0.5954644", "0.5951261", "0.59490854", "0.594836", "0.5938593", "0.5934585", "0.5934205", "0.593226", "0.592937", "0.5929327", "0.59277123", "0.5927588" ]
0.71244735
2
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jLabel2 = new javax.swing.JLabel(); jTextFieldPesquisar = new javax.swing.JTextField(); jScrollPane1 = new javax.swing.JScrollPane(); jTableEmpresaFornecedora = new javax.swing.JTable(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jTextFieldId = new javax.swing.JTextField(); jLabel6 = new javax.swing.JLabel(); jButtonFechar = new javax.swing.JButton(); jLabel7 = new javax.swing.JLabel(); jTextFieldEmail = new javax.swing.JTextField(); jLabel5 = new javax.swing.JLabel(); jTextFieldContacto = new javax.swing.JTextField(); jButtonNovo = new javax.swing.JButton(); jButtonEditar = new javax.swing.JButton(); jTextFieldLocalizacao = new javax.swing.JTextField(); jButtonCancelar = new javax.swing.JButton(); jButtonExcluir = new javax.swing.JButton(); jButtonSalvar = new javax.swing.JButton(); jTextFieldFornecedora = new javax.swing.JTextField(); jButtonPesquisar = new javax.swing.JButton(); jLabel1 = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); getContentPane().setLayout(null); jLabel2.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N jLabel2.setForeground(new java.awt.Color(255, 255, 255)); jLabel2.setText("Cadastro De Empresa Fornecedora"); getContentPane().add(jLabel2); jLabel2.setBounds(0, 10, 330, 40); jTextFieldPesquisar.setBackground(new java.awt.Color(0, 0, 0)); jTextFieldPesquisar.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N jTextFieldPesquisar.setForeground(new java.awt.Color(255, 255, 255)); getContentPane().add(jTextFieldPesquisar); jTextFieldPesquisar.setBounds(510, 0, 270, 30); jTableEmpresaFornecedora.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { {}, {}, {}, {} }, new String [] { } )); jTableEmpresaFornecedora.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { jTableEmpresaFornecedoraMouseClicked(evt); } }); jScrollPane1.setViewportView(jTableEmpresaFornecedora); getContentPane().add(jScrollPane1); jScrollPane1.setBounds(60, 270, 720, 140); jLabel3.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N jLabel3.setForeground(new java.awt.Color(255, 255, 255)); jLabel3.setText("Fornecedora"); getContentPane().add(jLabel3); jLabel3.setBounds(60, 120, 100, 30); jLabel4.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N jLabel4.setForeground(new java.awt.Color(255, 255, 255)); jLabel4.setText("ID"); getContentPane().add(jLabel4); jLabel4.setBounds(60, 70, 20, 30); jTextFieldId.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N jTextFieldId.setEnabled(false); getContentPane().add(jTextFieldId); jTextFieldId.setBounds(80, 70, 40, 30); jLabel6.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N jLabel6.setForeground(new java.awt.Color(255, 255, 255)); jLabel6.setText("Contacto"); getContentPane().add(jLabel6); jLabel6.setBounds(470, 120, 80, 30); jButtonFechar.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N jButtonFechar.setText("X"); jButtonFechar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonFecharActionPerformed(evt); } }); getContentPane().add(jButtonFechar); jButtonFechar.setBounds(790, 0, 40, 30); jLabel7.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N jLabel7.setForeground(new java.awt.Color(255, 255, 255)); jLabel7.setText("Email"); getContentPane().add(jLabel7); jLabel7.setBounds(470, 190, 80, 30); jTextFieldEmail.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N jTextFieldEmail.setEnabled(false); getContentPane().add(jTextFieldEmail); jTextFieldEmail.setBounds(550, 190, 230, 30); jLabel5.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N jLabel5.setForeground(new java.awt.Color(255, 255, 255)); jLabel5.setText("Localização"); getContentPane().add(jLabel5); jLabel5.setBounds(60, 190, 90, 30); jTextFieldContacto.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N jTextFieldContacto.setEnabled(false); getContentPane().add(jTextFieldContacto); jTextFieldContacto.setBounds(550, 120, 230, 30); jButtonNovo.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N jButtonNovo.setText("Novo"); jButtonNovo.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonNovoActionPerformed(evt); } }); getContentPane().add(jButtonNovo); jButtonNovo.setBounds(60, 240, 80, 23); jButtonEditar.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N jButtonEditar.setText("Editar"); jButtonEditar.setEnabled(false); jButtonEditar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonEditarActionPerformed(evt); } }); getContentPane().add(jButtonEditar); jButtonEditar.setBounds(280, 240, 90, 23); jTextFieldLocalizacao.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N jTextFieldLocalizacao.setEnabled(false); getContentPane().add(jTextFieldLocalizacao); jTextFieldLocalizacao.setBounds(160, 190, 250, 30); jButtonCancelar.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N jButtonCancelar.setText("Cancelar"); jButtonCancelar.setEnabled(false); jButtonCancelar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonCancelarActionPerformed(evt); } }); getContentPane().add(jButtonCancelar); jButtonCancelar.setBounds(510, 240, 90, 23); jButtonExcluir.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N jButtonExcluir.setText("Excluir"); jButtonExcluir.setEnabled(false); jButtonExcluir.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonExcluirActionPerformed(evt); } }); getContentPane().add(jButtonExcluir); jButtonExcluir.setBounds(400, 240, 80, 23); jButtonSalvar.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N jButtonSalvar.setText("Salvar"); jButtonSalvar.setEnabled(false); jButtonSalvar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonSalvarActionPerformed(evt); } }); getContentPane().add(jButtonSalvar); jButtonSalvar.setBounds(160, 240, 90, 23); jTextFieldFornecedora.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N jTextFieldFornecedora.setEnabled(false); getContentPane().add(jTextFieldFornecedora); jTextFieldFornecedora.setBounds(160, 120, 250, 30); jButtonPesquisar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ImagemProjecto/search_24px.png"))); // NOI18N jButtonPesquisar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonPesquisarActionPerformed(evt); } }); getContentPane().add(jButtonPesquisar); jButtonPesquisar.setBounds(480, 0, 30, 30); jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ImagemProjecto/FundoParaTodasTelasRegistro.jpg"))); // NOI18N getContentPane().add(jLabel1); jLabel1.setBounds(0, 0, 840, 410); setSize(new java.awt.Dimension(845, 446)); setLocationRelativeTo(null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n initComponents();\n }", "public AdjointForm() {\n initComponents();\n setDefaultCloseOperation(HIDE_ON_CLOSE);\n }", "public FormListRemarking() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n \n }", "public FormPemilihan() {\n initComponents();\n }", "public GUIForm() { \n initComponents();\n }", "public FrameForm() {\n initComponents();\n }", "public TorneoForm() {\n initComponents();\n }", "public FormCompra() {\n initComponents();\n }", "public muveletek() {\n initComponents();\n }", "public Interfax_D() {\n initComponents();\n }", "public quanlixe_form() {\n initComponents();\n }", "public SettingsForm() {\n initComponents();\n }", "public RegistrationForm() {\n initComponents();\n this.setLocationRelativeTo(null);\n }", "public Soru1() {\n initComponents();\n }", "public FMainForm() {\n initComponents();\n this.setResizable(false);\n setLocationRelativeTo(null);\n }", "public soal2GUI() {\n initComponents();\n }", "public EindopdrachtGUI() {\n initComponents();\n }", "public MechanicForm() {\n initComponents();\n }", "public AddDocumentLineForm(java.awt.Frame parent) {\n super(parent);\n initComponents();\n myInit();\n }", "public BloodDonationGUI() {\n initComponents();\n }", "public quotaGUI() {\n initComponents();\n }", "public PatientUI() {\n initComponents();\n }", "public Customer_Form() {\n initComponents();\n setSize(890,740);\n \n \n }", "public Oddeven() {\n initComponents();\n }", "public myForm() {\n\t\t\tinitComponents();\n\t\t}", "public Magasin() {\n initComponents();\n }", "public intrebarea() {\n initComponents();\n }", "public RadioUI()\n {\n initComponents();\n }", "public NewCustomerGUI() {\n initComponents();\n }", "public ZobrazUdalost() {\n initComponents();\n }", "public FormUtama() {\n initComponents();\n }", "public p0() {\n initComponents();\n }", "public INFORMACION() {\n initComponents();\n this.setLocationRelativeTo(null); \n }", "public ProgramForm() {\n setLookAndFeel();\n initComponents();\n }", "public AmountReleasedCommentsForm() {\r\n initComponents();\r\n }", "public form2() {\n initComponents();\n }", "public MainForm() {\n\t\tsuper(\"Hospital\", List.IMPLICIT);\n\n\t\tstartComponents();\n\t}", "public kunde() {\n initComponents();\n }", "public LixeiraForm() {\n initComponents();\n setLocationRelativeTo(null);\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n setRequestFocusEnabled(false);\n setVerifyInputWhenFocusTarget(false);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 465, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 357, Short.MAX_VALUE)\n );\n }", "public MusteriEkle() {\n initComponents();\n }", "public frmMain() {\n initComponents();\n }", "public frmMain() {\n initComponents();\n }", "public DESHBORDPANAL() {\n initComponents();\n }", "public frmVenda() {\n initComponents();\n }", "public GUIForm() {\n initComponents();\n inputField.setText(NO_FILE_SELECTED);\n outputField.setText(NO_FILE_SELECTED);\n progressLabel.setBackground(INFO);\n progressLabel.setText(SELECT_FILE);\n }", "public Botonera() {\n initComponents();\n }", "public FrmMenu() {\n initComponents();\n }", "public OffertoryGUI() {\n initComponents();\n setTypes();\n }", "public JFFornecedores() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setBackground(new java.awt.Color(255, 255, 255));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 983, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 769, Short.MAX_VALUE)\n );\n\n pack();\n }", "public EnterDetailsGUI() {\n initComponents();\n }", "public vpemesanan1() {\n initComponents();\n }", "public Kost() {\n initComponents();\n }", "public FormHorarioSSE() {\n initComponents();\n }", "public frmacceso() {\n initComponents();\n }", "public UploadForm() {\n initComponents();\n }", "public HW3() {\n initComponents();\n }", "public Managing_Staff_Main_Form() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(null);\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }", "public sinavlar2() {\n initComponents();\n }", "public P0405() {\n initComponents();\n }", "public IssueBookForm() {\n initComponents();\n }", "public MiFrame2() {\n initComponents();\n }", "public Choose1() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n\n String oldAuthor = prefs.get(\"AUTHOR\", \"\");\n if(oldAuthor != null) {\n this.authorTextField.setText(oldAuthor);\n }\n String oldBook = prefs.get(\"BOOK\", \"\");\n if(oldBook != null) {\n this.bookTextField.setText(oldBook);\n }\n String oldDisc = prefs.get(\"DISC\", \"\");\n if(oldDisc != null) {\n try {\n int oldDiscNum = Integer.parseInt(oldDisc);\n oldDiscNum++;\n this.discNumberTextField.setText(Integer.toString(oldDiscNum));\n } catch (Exception ex) {\n this.discNumberTextField.setText(oldDisc);\n }\n this.bookTextField.setText(oldBook);\n }\n\n\n }", "public GUI_StudentInfo() {\n initComponents();\n }", "public Lihat_Dokter_Keseluruhan() {\n initComponents();\n }", "public JFrmPrincipal() {\n initComponents();\n }", "public bt526() {\n initComponents();\n }", "public Pemilihan_Dokter() {\n initComponents();\n }", "public Ablak() {\n initComponents();\n }", "@Override\n\tprotected void initUi() {\n\t\t\n\t}", "@SuppressWarnings(\"unchecked\")\n\t// <editor-fold defaultstate=\"collapsed\" desc=\"Generated\n\t// Code\">//GEN-BEGIN:initComponents\n\tprivate void initComponents() {\n\n\t\tlabel1 = new java.awt.Label();\n\t\tlabel2 = new java.awt.Label();\n\t\tlabel3 = new java.awt.Label();\n\t\tlabel4 = new java.awt.Label();\n\t\tlabel5 = new java.awt.Label();\n\t\tlabel6 = new java.awt.Label();\n\t\tlabel7 = new java.awt.Label();\n\t\tlabel8 = new java.awt.Label();\n\t\tlabel9 = new java.awt.Label();\n\t\tlabel10 = new java.awt.Label();\n\t\ttextField1 = new java.awt.TextField();\n\t\ttextField2 = new java.awt.TextField();\n\t\tlabel14 = new java.awt.Label();\n\t\tlabel15 = new java.awt.Label();\n\t\tlabel16 = new java.awt.Label();\n\t\ttextField3 = new java.awt.TextField();\n\t\ttextField4 = new java.awt.TextField();\n\t\ttextField5 = new java.awt.TextField();\n\t\tlabel17 = new java.awt.Label();\n\t\tlabel18 = new java.awt.Label();\n\t\tlabel19 = new java.awt.Label();\n\t\tlabel20 = new java.awt.Label();\n\t\tlabel21 = new java.awt.Label();\n\t\tlabel22 = new java.awt.Label();\n\t\ttextField6 = new java.awt.TextField();\n\t\ttextField7 = new java.awt.TextField();\n\t\ttextField8 = new java.awt.TextField();\n\t\tlabel23 = new java.awt.Label();\n\t\ttextField9 = new java.awt.TextField();\n\t\ttextField10 = new java.awt.TextField();\n\t\ttextField11 = new java.awt.TextField();\n\t\ttextField12 = new java.awt.TextField();\n\t\tlabel24 = new java.awt.Label();\n\t\tlabel25 = new java.awt.Label();\n\t\tlabel26 = new java.awt.Label();\n\t\tlabel27 = new java.awt.Label();\n\t\tlabel28 = new java.awt.Label();\n\t\tlabel30 = new java.awt.Label();\n\t\tlabel31 = new java.awt.Label();\n\t\tlabel32 = new java.awt.Label();\n\t\tjButton1 = new javax.swing.JButton();\n\n\t\tlabel1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel1.setText(\"It seems that some of the buttons on the ATM machine are not working!\");\n\n\t\tlabel2.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel2.setText(\"Unfortunately these numbers are exactly what Professor has to use to type in his password.\");\n\n\t\tlabel3.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel3.setText(\n\t\t\t\t\"If you want to eat tonight, you have to help him out and construct the numbers of the password with the working buttons and math operators.\");\n\n\t\tlabel4.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tlabel4.setText(\"Denver's Password: 2792\");\n\n\t\tlabel5.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel5.setText(\"import java.util.Scanner;\\n\");\n\n\t\tlabel6.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel6.setText(\"public class ATM{\");\n\n\t\tlabel7.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel7.setText(\"public static void main(String[] args){\");\n\n\t\tlabel8.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel8.setText(\"System.out.print(\");\n\n\t\tlabel9.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel9.setText(\" -\");\n\n\t\tlabel10.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel10.setText(\");\");\n\n\t\ttextField1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\ttextField1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tlabel14.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel14.setText(\"System.out.print( (\");\n\n\t\tlabel15.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel15.setText(\"System.out.print(\");\n\n\t\tlabel16.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel16.setText(\"System.out.print( ( (\");\n\n\t\tlabel17.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel17.setText(\")\");\n\n\t\tlabel18.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel18.setText(\" +\");\n\n\t\tlabel19.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel19.setText(\");\");\n\n\t\tlabel20.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel20.setText(\" /\");\n\n\t\tlabel21.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel21.setText(\" %\");\n\n\t\tlabel22.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel22.setText(\" +\");\n\n\t\tlabel23.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel23.setText(\");\");\n\n\t\tlabel24.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel24.setText(\" +\");\n\n\t\tlabel25.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel25.setText(\" /\");\n\n\t\tlabel26.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel26.setText(\" *\");\n\n\t\tlabel27.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n\t\tlabel27.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel27.setText(\")\");\n\n\t\tlabel28.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel28.setText(\")\");\n\n\t\tlabel30.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel30.setText(\"}\");\n\n\t\tlabel31.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel31.setText(\"}\");\n\n\t\tlabel32.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel32.setText(\");\");\n\n\t\tjButton1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tjButton1.setText(\"Check\");\n\t\tjButton1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\tjButton1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tjavax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n\t\tlayout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(28).addGroup(layout\n\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING).addComponent(getDoneButton()).addComponent(jButton1)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, 774, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addGap(92).addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15, GroupLayout.PREFERRED_SIZE, 145,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(2)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(37))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(174)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(7)))\n\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label23, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20).addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(23).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel10, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16, GroupLayout.PREFERRED_SIZE, 177,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));\n\t\tlayout.setVerticalGroup(\n\t\t\t\tlayout.createParallelGroup(Alignment.LEADING).addGroup(layout.createSequentialGroup().addContainerGap()\n\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup().addGroup(layout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(19)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(78)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(76)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(75)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(27))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel23,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(29)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))))\n\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t.addGap(30)\n\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(25)\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(26).addComponent(jButton1).addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(getDoneButton()).addContainerGap(23, Short.MAX_VALUE)));\n\t\tthis.setLayout(layout);\n\n\t\tlabel16.getAccessibleContext().setAccessibleName(\"System.out.print( ( (\");\n\t\tlabel17.getAccessibleContext().setAccessibleName(\"\");\n\t\tlabel18.getAccessibleContext().setAccessibleName(\" +\");\n\t}", "public Pregunta23() {\n initComponents();\n }", "public FormMenuUser() {\n super(\"Form Menu User\");\n initComponents();\n }", "public AvtekOkno() {\n initComponents();\n }", "public busdet() {\n initComponents();\n }", "public ViewPrescriptionForm() {\n initComponents();\n }", "public Ventaform() {\n initComponents();\n }", "public Kuis2() {\n initComponents();\n }", "public CreateAccount_GUI() {\n initComponents();\n }", "public POS1() {\n initComponents();\n }", "public Carrera() {\n initComponents();\n }", "public EqGUI() {\n initComponents();\n }", "public JFriau() {\n initComponents();\n this.setLocationRelativeTo(null);\n this.setTitle(\"BuNus - Budaya Nusantara\");\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setBackground(new java.awt.Color(204, 204, 204));\n setMinimumSize(new java.awt.Dimension(1, 1));\n setPreferredSize(new java.awt.Dimension(760, 402));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 750, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n }", "public nokno() {\n initComponents();\n }", "public dokter() {\n initComponents();\n }", "public ConverterGUI() {\n initComponents();\n }", "public hitungan() {\n initComponents();\n }", "public Modify() {\n initComponents();\n }", "public frmAddIncidencias() {\n initComponents();\n }", "public CovidGUI(){\n initComponents();\n }" ]
[ "0.73206544", "0.7291311", "0.7291311", "0.7291311", "0.7286492", "0.7249181", "0.7213362", "0.72085494", "0.71965617", "0.7190475", "0.7184897", "0.7159234", "0.71483016", "0.7094075", "0.7081491", "0.70579433", "0.6987627", "0.69776064", "0.69552463", "0.69549114", "0.69453007", "0.69439274", "0.69369227", "0.6932056", "0.6927733", "0.6925948", "0.69254535", "0.69121534", "0.6911907", "0.6894101", "0.6892413", "0.68919593", "0.6891924", "0.6889863", "0.6884052", "0.6883223", "0.688166", "0.68787736", "0.68764126", "0.68745583", "0.68721986", "0.68595314", "0.685675", "0.68565613", "0.6855288", "0.6854687", "0.6854457", "0.685303", "0.685303", "0.68448347", "0.6837389", "0.6837193", "0.6829965", "0.6829964", "0.68275386", "0.68249714", "0.6823691", "0.6818224", "0.68173605", "0.6811417", "0.6809674", "0.680964", "0.6809329", "0.68085754", "0.6802194", "0.67955625", "0.67938477", "0.6793322", "0.679176", "0.67900634", "0.6789749", "0.67888486", "0.6781942", "0.6767308", "0.6766431", "0.6765252", "0.67573947", "0.6756327", "0.6753509", "0.67520833", "0.6741834", "0.6740361", "0.6737793", "0.67370224", "0.6734898", "0.6727867", "0.6727453", "0.67214817", "0.6716735", "0.67162156", "0.6715855", "0.6709997", "0.6707508", "0.67042965", "0.6702483", "0.67014945", "0.67007315", "0.6699097", "0.669545", "0.6692102", "0.6690473" ]
0.0
-1
HTML parsing utilities recursively collect nodes that match filter
private static NodeList getNodes(Node n, NodeFilter filter) throws ParserException { NodeList list = new NodeList(); n.collectInto(list, filter); NodeList c = n.getChildren(); if (null != c) { for (NodeIterator e = c.elements(); e.hasMoreNodes();) { e.nextNode().collectInto(list, filter); } } return list; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static List<String> getText(Node n, String filter) throws ParserException\n\t{\n\t\tList<String> strArray = new ArrayList<String>();\n\t\tString parentTag = \"\";\n\t\tTagNode parent = (TagNode) n.getParent();\n\t\tif (parent != null)\n\t\t{\n\t\t\tparentTag = parent.getTagName();\n\t\t}\n\t\tif (n instanceof TextNode)\n\t\t{ // text\n\t\t\tTextNode tn = (TextNode) n;\n\t\t\tSystem.out.println(parentTag + \":\" + tn.getText().trim());\n\t\t\tSystem.out.println(((TagNode) n).getTagName());\n\t\t\tif (filter.equals(\"\") || filter.equalsIgnoreCase(parentTag))\n\t\t\t{\n\t\t\t\tString text = tn.getText().trim();\n\t\t\t\ttext = text.replace(\"&nbsp;\", \" \"); // remove non-breaking spaces\n\t\t\t\tif (text.length() > 0 && !text.matches(\"\\\\s+\"))\n\t\t\t\t{\n\t\t\t\t\tstrArray.add(text);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{ // a tag or remark\n\t\t\tNodeList nl = n.getChildren();\n\t\t\tif (null != nl)\n\t\t\t{\n\t\t\t\tfor (NodeIterator ni = nl.elements(); ni.hasMoreNodes();)\n\t\t\t\t{\n\t\t\t\t\tstrArray.addAll(getText(ni.nextNode(), filter));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn strArray;\n\t}", "public static NodeFilter makeFilter()\n\t{\n\t\tNodeFilter[] fa = new NodeFilter[3];\n\t\tfa[0] = new HasAttributeFilter(\"HREF\");\n\t\tfa[1] = new TagNameFilter(\"A\");\n\t\tfa[2] = new HasParentFilter(new TagNameFilter(\"H3\"));\n\t\tNodeFilter filter = new AndFilter(fa);\n\t\treturn filter;\n\t}", "public void filterNodes(String filter) {\n\n\n tree_graphs.getChildren().clear();\n populate(universe, filter, this.showNodes, this.showEdges,\n this.showHyperEdges);\n\n\n tree_nodes.getChildren().clear();\n for (INode node : universe.getNodes()) {\n if (node.getID().contains(filter)) {\n parseNode(node, tree_nodes, filter);\n }\n }\n\n }", "private Set<String> extracLinks(String url, LinkFilter filter) {\n\n\t\tSet<String> links = new HashSet<String>();\n\t\ttry {\n\t\t\tParser parser = new Parser(url);\n\t\t\tparser.setEncoding(\"UTF-8\");\n\t\t\t// linkFilter filter <a> tag\n\t\t\tNodeClassFilter linkFilter = new NodeClassFilter(LinkTag.class);\n\t\t\t// get all filtered links\n\t\t\tNodeList list = parser.extractAllNodesThatMatch(linkFilter);\n\t\t\tfor (int i = 0; i < list.size(); i++) {\n\t\t\t\tNode tag = list.elementAt(i);\n\t\t\t\tif (tag instanceof LinkTag)// <a> tag\n\t\t\t\t{\n\t\t\t\t\tLinkTag link = (LinkTag) tag;\n\t\t\t\t\tString linkUrl = link.getLink();// url\n\t\t\t\t\tif (filter.accept(linkUrl)) {\n\t\t\t\t\t\t// change bbsdoc to bbstdoc\n\t\t\t\t\t\tString stlink = linkUrl.replace(\"bbsdoc\", \"bbstdoc\");\n\t\t\t\t\t\tlinks.add(stlink);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (ParserException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn links;\n\t}", "protected void extract() {\n\t\tfor (ITSState nodeState : doc.iterNodes()) {\n\t\t\tNode node = nodeState.node;\n\t\t\tRuleResolver resolver = resolvers.get(node.getNodeName()); \n\t\t\tif (resolver != null) {\n\t\t\t\tGlobalRule rule = resolver.extractRule(attrReader, parameters, nodeState.node);\n\t\t\t\tapplyRule(resolver, rule);\n\t\t\t}\n\t\t\t\n\t\t\tif (node.getNodeName().equals(\"its:param\")) {\n\t\t\t\tString name = node.getAttributes().getNamedItem(\"name\").getNodeValue();\n\t\t\t\tString value = node.getTextContent();\n\t\t\t\tparameters.add(name, value);\n\t\t\t} else if (attrReader.dialect.isRules(node)) { \n\t\t\t\t// we have external link (xlink:href or link href)\n\t\t\t\tString external = attrReader.dialect.getExternalRules(node);\n\t\t\t\tif (external != null) {\n\t\t\t\t\textractExternalRules(external);\n\t\t\t\t}\n\t\t\t} else if (node.getNodeName().equals(\"script\")) {\n\t\t\t\t// we have embedded\n\t\t\t\tif (node.hasAttributes()) {\n\t\t\t\t\tif (node.getAttributes().getNamedItem(\"type\").getNodeValue().equals(\"application/its+xml\")) {\n\t\t\t\t\t\textractEmbeddedRules(node.getTextContent());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!nodeState.nodePath.contains(\"its:rules\")) {\n\t\t\t\t// unless we're in rules, look at local annotations\n\t\t\t\t// LOCAL\n\t\t\t\textractLocal(nodeState);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// process inheritance\n\t\tfor (ITSState nodeState : doc.iterNodes()) {\n\t\t\t// Elements: handle inheritance \n\t\t\tITSData parentData = getParentState(nodeState);\n\t\t\tif (parentData != null) {\n\t\t\t\t// inherit from parent\n\t\t\t\tITSData thisData = nodeItsData.get(nodeState.nodePath);\n\t\t\t\tif (thisData == null) {\n\t\t\t\t\tthisData = new ITSData();\n\t\t\t\t\tapplyRuleToNode(nodeState.nodePath, thisData);\n\t\t\t\t} \n\t\t\t\tthisData.inherit(parentData);\t\t\t\t\n\t\t\t}\t\n\t\t\t\t\t\t\n\t\t} \n\t\t\n\t\t\n\t}", "public static List<String> getLinks(String url, NodeFilter filter) throws ParserException\n\t{\n\t\tParser parser = getParser(url);\n\t\tNodeList list = new NodeList();\n\t\tfor (NodeIterator e = parser.elements(); e.hasMoreNodes();)\n\t\t{\n\t\t\tlist.add(getNodes(e.nextNode(), filter));\n\t\t}\n\t\tList<String> strings = new ArrayList<String>();\n\t\tfor (NodeIterator i = list.elements(); i.hasMoreNodes();)\n\t\t{\n\t\t\tNode n = i.nextNode();\n\t\t\tif (n instanceof LinkTag)\n\t\t\t{ // text\n\t\t\t\tString link = ((LinkTag) n).extractLink();\n\t\t\t\tif (!strings.contains(link))\n\t\t\t\t{\n\t\t\t\t\tstrings.add(((LinkTag) n).extractLink());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn strings;\n\t}", "public static List<String> HTMLStrings(String url, String filter) throws ParserException\n\t{\n\t\tList<String> strings = new ArrayList<String>();\n\t\tParser parser = getParser(url);\n\t\tfor (NodeIterator i = parser.elements(); i.hasMoreNodes();)\n\t\t{\n\t\t\tstrings.addAll(getText(i.nextNode(), filter.toUpperCase()));\n\t\t}\n\t\treturn strings;\n\t}", "public static Set<String> parser(String html){\r\n\r\n\t\tSet<String> urls = new HashSet<String>();\r\n\t\tString regex = \"<a.*?/a>\";\r\n\t\tPattern pt = Pattern.compile(regex);\r\n\t\tMatcher matcher = pt.matcher(html);\r\n\t\twhile(matcher.find()){\r\n\t\t\t//获取网址\r\n//\t\t\tSystem.out.println(\"Group:\"+matcher.group());\r\n\t\t\tMatcher myurl = Pattern.compile(\"href=\\\".*?\\\">\").matcher(matcher.group());\r\n\t\t\tif(myurl.find()){\r\n\t\t\t\tdo{\r\n\t\t\t\t\tString temp = myurl.group();\r\n\t\t\t\t\tif(!temp.startsWith(\"javascript\") && !temp.startsWith(\"/\") && ! temp.startsWith(\"#\")){\r\n\t\t\t\t\t\tString url = myurl.group().replaceAll(\"href=\\\"|\\\">\",\"\");\r\n\t\t\t\t\t\tif(url.contains(\"http\")){\r\n\t\t\t\t\t\t\tif(url.contains(\"\\\"\")){\r\n\t\t\t\t\t\t\t\turl = url.substring(0, url.indexOf(\"\\\"\"));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif(!url.contains(\"$\") && !url.contains(\" \")){\r\n\t\t\t\t\t\t\t\turls.add(url);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}while(myurl.find());\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn urls;\r\n\t}", "private void filter(Node<Context> node) {\n if (node != null && node.parent != null) {\n Node<Context> parent = tree.getNode(node.parent);\n FilterInfo filterInfo = new FilterInfo(parent, node);\n filterStack.add(filterInfo);\n filter(filterInfo);\n tree.openNode(MODEL_BROWSER_ROOT, () -> tree.selectNode(MODEL_BROWSER_ROOT));\n }\n }", "<E extends CtElement> List<E> getElements(Filter<E> filter);", "private static Set<String> scrapeHTML(String html) {\n\t\tSet<String> set = new HashSet<String>();\n\t\tint skipLength = 0;\n\t\tint counter = 0;\n\t\t// the subtraction of 15 is because of the number of characters in \n\t\t// \"<a href=\\\"/wiki/\", to avoid a index out of bounds error\n\t\tfor(int i = 0; i < html.length()-15; i++) {\n\t\t\tif(html.substring(i, i+15).equals(\"<a href=\\\"/wiki/\")) {\n\t\t\t\t// if format matches starts to check the following characters\n\t\t\t\t// to check if it does not contain a : or a #\n\t\t\t\tchar ch = html.charAt(i+15);\n\t\t\t\tString str = \"\";\n\t\t\t\tint count = 0;\n\t\t\t\twhile(html.charAt(i+count+15) != '\"'){\n\t\t\t\t\tif(html.charAt(i+count+15) == ':' || html.charAt(i+count+15) == '#') {\n\t\t\t\t\t\tstr = \"\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tch = html.charAt(count+i+15);\n\t\t\t\t\tstr += ch;\n\t\t\t\t\tcount++;\n\t\t\t}\n\t\t\t\t// adds if the page name is not empty\n\t\t\t\tif(str != \"\")\n\t\t\t\tset.add(str);\n\t\t\t\tskipLength = str.length();\n\t\t\t\tcount = 0;\n\t\t}\n\t\t\ti += skipLength;\n\t\t\tskipLength = 0;\n\t\t\tcounter++;\n\t\n\t}\n\treturn set;\n}", "public void parseNode(INode node, TreeItem<Object> root, String filter) {\n\n TreeItem<Object> nodeItem = new TreeItem<>(node);\n root.getChildren().add(nodeItem);\n\n if (this.showEdges) {\n\n TreeItem<Object> edgeTI = new TreeItem<>(node + \"Edges (\"\n + node.getEdges().size() + \")\");\n nodeItem.getChildren().add(edgeTI);\n\n for (IEdge edge : node.getEdges()) {\n\n this.parseEdge(edge, edgeTI, filter);\n }\n }\n if (this.showHyperEdges) {\n TreeItem<Object> hyperItem = new TreeItem<>(node\n + \"HyperEdges (\" + node.getHyperEdges().size() + \")\");\n nodeItem.getChildren().add(hyperItem);\n \n for (IHyperEdge he : node.getHyperEdges()) {\n \n this.parseHyperEdge(he, hyperItem, filter);\n }\n }\n\n }", "public JodeList search(Predicate<Jode> filter) {\n List<Node> ret = new ArrayList<>();\n if (filter.test(this)) {\n ret.add(this.extend());\n }\n for (Jode j : this.children()) {\n JodeList subResult = j.search(filter);\n for (Jode subJ : subResult) {\n ret.add(subJ.extend());\n }\n }\n return new JodeList(ret);\n }", "WhileChildFilter(Node root){\n\t\t\tthis.root = root;\n\t\t}", "private List<Node> findNextElements(){\n\t\tNodeList nl = doc.getElementsByTagName(\"mo\");\n\t\tList<Node> elements = new ArrayList<Node>();\n\t\t\n\t\tfor (int i = 0; i < nl.getLength(); i++) {\n\t\t\tNode next = nl.item(i);\n\t\t\tboolean complete = false;\n\t\t\t\n\t\t\tif(next.getTextContent().equalsIgnoreCase(\"|\")) {\n\t\t\t\telements.add(next);\n\t\t\t\tnext = next.getNextSibling();\n\t\t\t\twhile(next != null) {\n\t\t\t\t\tif(next.getTextContent().equalsIgnoreCase(\"|\")) {\n\t\t\t\t\t\telements.add(next);\n\t\t\t\t\t\tnext = null;\n\t\t\t\t\t\tcomplete = true;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\telements.add(next);\n\t\t\t\t\t\tnext = next.getNextSibling();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(complete) return elements;\n\t\t\t}else if(next.getTextContent().equalsIgnoreCase(\"&#x2308;\")) {\n\t\t\t\telements.add(next);\n\t\t\t\tnext = next.getNextSibling();\n\t\t\t\twhile(next != null) {\n\t\t\t\t\telements.add(next);\n\t\t\t\t\tif(next.getTextContent().equalsIgnoreCase(\"&#x2309;\")) {\n\t\t\t\t\t\tnext = null;\n\t\t\t\t\t\tcomplete = true;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tnext = next.getNextSibling();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(complete) return elements;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn null;\n\t}", "public static List<Node> getChildren(Element sourceElement, boolean returnTextNodes) {\r\n ArrayList<Node> children = new ArrayList<Node>();\r\n NodeList nodeList = sourceElement.getChildNodes();\r\n for (int i = 0; i < nodeList.getLength(); i++) {\r\n Node child = nodeList.item(i);\r\n if ((child instanceof Element && !child.getNodeName().equals(\"f:facet\")) //$NON-NLS-1$ \r\n \t\t|| (returnTextNodes && (null != child.getNodeValue()) && (child.getNodeValue().trim().length() > 0))) {\r\n children.add(child);\r\n }\r\n }\r\n return children;\r\n }", "public void addNodeFilter (INodeFilter filter);", "@DISPID(-2147417077)\n @PropGet\n ms.html.IHTMLFiltersCollection filters();", "@VTID(9)\n void treeFilter(\n IUIAutomationCondition filter);", "public void parseGraph(IGraph graph, TreeItem<Object> root, String filter) {\n\n\n TreeItem<Object> graphItem = new TreeItem<>(graph\n // .getID()\n );\n\n root.getChildren().add(graphItem);\n if (this.showNodes) {\n TreeItem<Object> nodeTI = new TreeItem<>(graph + \" Nodes (\"\n + graph.getNodes().size() + \")\");\n graphItem.getChildren().add(nodeTI);\n\n for (INode node : graph.getNodes()) {\n\n if (node.getID().contains(filter)) {\n\n this.parseNode(node, nodeTI, filter);\n }\n }\n }\n\n if (this.showEdges) {\n\n TreeItem<Object> edgeTI = new TreeItem<>(graph + \" Edges (\"\n + graph.getEdges().size() + \")\");\n graphItem.getChildren().add(edgeTI);\n\n for (IEdge edge : graph.getEdges()) {\n\n if (edge.toString().contains(filter)) {\n\n this.parseEdge(edge, edgeTI, filter);\n }\n }\n }\n if (this.showHyperEdges) {\n TreeItem<Object> hyperTI = new TreeItem<>(graph\n + \"Hyperedges (\" + graph.getHyperEdges().size() + \")\");\n graphItem.getChildren().add(hyperTI);\n for (IHyperEdge he : graph.getHyperEdges()) {\n\n if (he.getID().contains(filter)) {\n\n this.parseHyperEdge(he, hyperTI, filter);\n }\n }\n }\n }", "public List<Element> filter(Predicate<Element> p)\n\t{\n\t\treturn recursive_filter(new ArrayList<Element>(), p, group);\n\t}", "private void walk(Node node) {\n\n // check element nodes for license URL\n if (node instanceof Element) {\n findLicenseUrl((Element) node);\n }\n\n // check comment nodes for license RDF\n if (node instanceof Comment) {\n findRdf(((Comment) node).getData());\n }\n\n // recursively walk child nodes\n NodeList children = node.getChildNodes();\n for (int i = 0; children != null && i < children.getLength(); i++) {\n walk(children.item(i));\n }\n }", "private void filter(TreeItem<FilePath> root, String filter, TreeItem<FilePath> filteredRoot) {\n\n for (TreeItem<FilePath> child : root.getChildren()) {\n\n TreeItem<FilePath> filteredChild = new TreeItem<>(child.getValue());\n filteredChild.setExpanded(true);\n\n filter(child, filter, filteredChild);\n\n if (!filteredChild.getChildren().isEmpty() || isMatch(filteredChild.getValue(),\n filter)) {\n filteredRoot.getChildren().add(filteredChild);\n }\n\n }\n }", "@Override public List<Node> visitText(@NotNull XQueryParser.TextContext ctx) {\n\t\tfor(int i = 0; i < r.size(); ){\n\t\t\tif(r.get(i).getNodeType() != Node.TEXT_NODE ){\n\t\t\t\tr.remove(i);\n\t\t\t} else i++;\n\t\t}\n\t\treturn visitChildren(ctx);\n\t}", "public Object[] getFilteredSuccessorNodes (Object node) throws InvalidComponentException;", "public static String HTMLLinkString(String root, int level, String filter) throws Exception\n\t{\n\t\tString urls = \"\";\n\t\tif (0 == level)\n\t\t{\n\t\t\treturn urls;\n\t\t}\n\t\turls = HTMLLinkString(root, filter);\n\t\tfor (String u : urls.split(\"\\\\s+\"))\n\t\t{\n\t\t\tif (u.contains(filter))\n\t\t\t{\n\t\t\t\turls = urls + \" \" + HTMLLinkString(u, level - 1, filter);\n\t\t\t}\n\t\t}\n\t\treturn urls.trim();\n\t}", "public static ArrayList<Node> getFacets(Element sourceElement, boolean returnTextNode) {\r\n ArrayList<Node> facets = new ArrayList<Node>();\r\n NodeList children = sourceElement.getChildNodes();\r\n for (int i = 0; i < children.getLength(); i++) {\r\n Node node = children.item(i);\r\n if (node instanceof Element && \"f:facet\".equals(node.getNodeName())) { //$NON-NLS-1$\r\n Element element = (Element) node;\r\n NodeList childNodes = element.getChildNodes();\r\n Text textNode = null;\r\n for (int j = 0; j < childNodes.getLength(); j++) {\r\n Node child = childNodes.item(j);\r\n if (child instanceof Element) {\r\n facets.add(child);\r\n break;\r\n } else if (child instanceof Text) {\r\n textNode = (Text) child;\r\n }\r\n }\r\n if (returnTextNode && facets.isEmpty()) {\r\n facets.add(textNode);\r\n }\r\n }\r\n }\r\n return facets;\r\n }", "public JodeList children(Predicate<Jode> filter) {\n return this.children().filter(filter);\n }", "private List<Elements> extractHTMLInfo(String url) throws IOException {\r\n\r\n //All required info to be collected is within the <section> tag\r\n Element sectionTag = Jsoup.connect(url).get().select(\"section\").get(0);\r\n\r\n List<Elements> list = new ArrayList();\r\n\r\n //Banner img Tag\r\n list.add(sectionTag.select(\"img\"));\r\n\r\n //TimeTag\r\n list.add(sectionTag.select(\"header\").select(\"time\"));\r\n\r\n //Article Title\r\n list.add(sectionTag.select(\"header\").select(\"h2 a\"));\r\n\r\n //Author\r\n list.add(sectionTag.select(\"header\").select(\"p a\"));\r\n\r\n //Content Body HTML\r\n list.add(sectionTag.select(\"article\").select(\"div\"));\r\n\r\n return list;\r\n }", "private static void loopNodes(NodeList childNodes) throws JSONException {\n for (int i = 0; i < childNodes.getLength(); ++i) {\n HashMap<String, String> tempHashMap = new HashMap<>();\n Node node = childNodes.item(i);\n String nodeName = node.getNodeName();\n if (!\"#text\".equals(nodeName)) {\n\n Attr attr = (Attr) node.getAttributes().getNamedItem(\"displayname\");\n String attribute = null;\n if (attr != null) {\n attribute = attr.getValue();\n }\n\n if (attribute != null) {\n tempHashMap.put(node.getNodeName(), attribute);\n elementStack.push(tempHashMap);\n } else {\n tempHashMap.put(node.getNodeName(), null);\n elementStack.push(tempHashMap);\n }\n\n if (node.hasChildNodes()) {\n loopNodes(node.getChildNodes());\n } else {\n addPathToCategories();\n }\n\n if (elementStack.size() > 0) {\n elementStack.pop();\n }\n\n }\n }\n\n }", "private static ArrayList<FragmentNode> htmlToNodes( final String html, Font font, Color color, double superscriptScale, double subscriptScale ) {\n\n ArrayList<FragmentNode> nodeList = new ArrayList<FragmentNode>();\n\n String s = new String( html ); // operate on a copy\n\n // strip off html tags\n if ( s.startsWith( HTML_BEGIN_TAG ) ) {\n s = s.substring( HTML_BEGIN_TAG.length() );\n }\n if ( s.endsWith( HTML_END_TAG ) ) {\n s = s.substring( 0, s.length() - HTML_END_TAG.length() );\n }\n\n // convert html to nodes\n boolean done = false;\n String token = null;\n while ( !done ) {\n\n // look for the next tag of interest\n int index;\n final int subIndex = s.indexOf( SUBSCRIPT_BEGIN_TAG );\n final int supIndex = s.indexOf( SUPERSCRIPT_BEGIN_TAG );\n if ( subIndex == -1 ) {\n index = supIndex;\n }\n else if ( supIndex == -1 ) {\n index = subIndex;\n }\n else {\n index = Math.min( supIndex, subIndex );\n }\n\n if ( index == -1 ) {\n // if no tag, any remaining text appears on the normal line of text\n if ( s.length() > 0 ) {\n nodeList.add( new NormalNode( s, font, color ) );\n }\n done = true;\n }\n else {\n\n // anything before the tag of interest appears on the normal line of text\n token = s.substring( 0, index );\n if ( token.length() > 0 ) {\n nodeList.add( new NormalNode( token, font, color ) );\n }\n s = s.substring( index, s.length() );\n\n if ( s.startsWith( SUPERSCRIPT_BEGIN_TAG ) ) {\n // superscript\n index = s.indexOf( SUPERSCRIPT_END_TAG );\n if ( index == -1 ) {\n throw new UnsupportedOperationException( \"malformed HTML, missing \" + SUPERSCRIPT_END_TAG + \": \" + s );\n }\n else {\n token = s.substring( SUPERSCRIPT_BEGIN_TAG.length(), index );\n nodeList.add( new SuperscriptNode( token, font, color, superscriptScale ) );\n s = s.substring( index + SUPERSCRIPT_END_TAG.length(), s.length() );\n }\n }\n else if ( s.startsWith( SUBSCRIPT_BEGIN_TAG ) ) {\n // subscript\n index = s.indexOf( SUBSCRIPT_END_TAG );\n if ( index == -1 ) {\n throw new UnsupportedOperationException( \"malformed HTML, missing \" + SUBSCRIPT_END_TAG + \": \" + s );\n }\n else {\n token = s.substring( SUBSCRIPT_BEGIN_TAG.length(), index );\n nodeList.add( new SubscriptNode( token, font, color, subscriptScale ) );\n s = s.substring( index + SUBSCRIPT_END_TAG.length(), s.length() );\n }\n }\n else {\n // unrecognized tags (eg, <i>) are skipped and included in the next token\n s = s.substring( index + 1, s.length() );\n }\n }\n }\n\n return nodeList;\n }", "public void filterEdges(String filter) {\n\n\n tree_graphs.getChildren().clear();\n populate(universe, filter, this.showNodes, this.showEdges,\n this.showHyperEdges);\n\n\n tree_edges.getChildren().clear();\n for (IEdge edge : universe.getEdges()) {\n if (edge.toString().contains(filter)) {\n parseEdge(edge, tree_edges, filter);\n }\n }\n\n }", "public List<AST> getChildNodes ();", "public Object visit(ProcessInstanceFilter filter, Object context)\n {\n if (filter.isIncludingSubprocesses())\n {\n return new Node(new HashSet(filter.getOids()), null);\n }\n else\n {\n return new Node(null, new HashSet(filter.getOids()));\n }\n }", "public List<JsonNode> findAllCriteria(JsonNode element) {\n List<JsonNode> criteria = new ArrayList<>();\n Stack<JsonNode> fringe = new Stack<>();\n fringe.push(element);\n\n while (!fringe.isEmpty()) {\n JsonNode currentElement = fringe.pop();\n if (currentElement.get(\"content\").get(\"type\").asText().equals(Type.SECTION.toString())) {\n for (JsonNode e: currentElement.get(\"children\")) {\n fringe.push(e);\n }\n } else {\n criteria.add(currentElement);\n }\n }\n\n return criteria;\n }", "public static String HTMLText(String url, String filter) throws ParserException\n\t{\n\t\tString text = \"\";\n\t\tList<String> sList;\n\t\tParser parser = getParser(url);\n\t\tfor (NodeIterator i = parser.elements(); i.hasMoreNodes();)\n\t\t{\n\t\t\tsList = getText(i.nextNode(), filter.toUpperCase());\n\t\t\tIterator<String> it = sList.iterator();\n\t\t\twhile (it.hasNext())\n\t\t\t{\n\t\t\t\ttext = text + \" \" + it.next();\n\t\t\t}\n\t\t}\n\t\treturn text;\n\t}", "public List<T> wantedNodesRecursive(Predicate<T> p) {\n return wantedNodesRecursive(p, root);\n }", "private int searchByTextContent(Node node) {\n\t\tif(hashtableIgnoreTags.get(node.getClass().getName()) != null) return 0;\n\t\t\n// \tSystem.out.println( node.getClass().getName());\n// \tSystem.out.println( \"<\" + node.getText() + \">\");\n \t\n \tif( 0 == compareHTMLText(node, strSearchText))\n \t{\n \t\tSystem.out.println( \"MATCH!\");\n \t\tint iret = analyseMatchLocation(node);\n \t\treturn 1;\n \t}\n \t\n \t// if this node text is not matched then search recursively \n \t// under this node using depth-first approach\n \tNodeList nodes = node.getChildren();\n \t\n \tif(nodes == null) return 0; // reached end of the tree nodes so go back and try your luck elsewhere\n \t\n \tint size = nodes.size();\n \t\n \tNode nextnode;\n \t\n \tfor (int i = 0; i < size; i++)\n \t{\n \t\tnextnode = nodes.elementAt(i);\n \t\t\n \t\tString strTagPattern = \"\";\n \t\t\n \t\t// RECURSION\n \t\tint iret = searchByTextContent(nextnode);\n \t\tif(1 == iret) \n \t\t{\n \t\t\tstrTagPattern = HTMLParser.getTagMatchPattern(nextnode);\n \t\t\t\n \t\t\t// There is a match so we need to log all the steps backwards to root node\n \t\t\t// to learn how to access this element in general from the HTML as a rule\n \t\t\t// Append the element number to the match string for each level of the hierarchy\n \t\t\tmatchPath = strTagPattern + \"#\" + String.valueOf(i) + \":\" + matchPath;\n \t\t\treturn 1; // Indicate there was a match indeed!\n \t\t}\n \t}\n \t\t\t\n\t\treturn 0;\n\t}", "public static List<nsIDOMNode> getChildren(nsIDOMElement visualElement, boolean returnTextNodes) {\r\n ArrayList<nsIDOMNode> children = new ArrayList<nsIDOMNode>();\r\n nsIDOMNodeList nodeList = visualElement.getChildNodes();\r\n for (int i = 0; i < nodeList.getLength(); i++) {\r\n nsIDOMNode child = nodeList.item(i);\r\n if ((child instanceof nsIDOMElement || returnTextNodes) && (!child.getNodeName().equals(\"f:facet\"))) { //$NON-NLS-1$\r\n children.add(child);\r\n }\r\n }\r\n return children;\r\n }", "private void commonLoadTestForHtml(){\n\t\tWebElement tree = getElement(\"id=tree\");\n\t\tlog(\"Found Element for id=tree \" + tree.toString());\n\n\t\t//Make sure News attributes are correct\n\t\tWebElement news = getElement(\"{\\\"element\\\":\\\"#tree\\\",\\\"subId\\\":\\\"oj-tree-node['#news']['title']\\\"}\");\n\t\tAssert.assertNotNull(news);\n\t\tnews.click();\n\n\t\tString content = getText(RESULTS_CONTAINER);\n\t\tlog(\"content\"+content);\n waitForText(RESULTS_CONTAINER, \"id=news\");\n\n\n\t\t// Finds the blogs node and make sure its not null\n\t\twaitForElementVisible(\"{\\\"element\\\":\\\"#tree\\\",\\\"subId\\\":\\\"oj-tree-node['#blogs']['disclosure']\\\"}\");\n\t\tWebElement blogs = getElement(\"{\\\"element\\\":\\\"#tree\\\",\\\"subId\\\":\\\"oj-tree-node['#blogs']['disclosure']\\\"}\");\n\n\t\tlog(\"Node: \" + blogs);\n\n\t\tAssert.assertNotNull(blogs);\n\n\t\tblogs.click(); // This should expand the node blogs\n\n\t\t//Find the children of blogs node: Today\n\t\tWebElement today = getElement(\"{\\\"element\\\":\\\"#tree\\\",\\\"subId\\\":\\\"oj-tree-node['#today']['title']\\\"}\");\n\n\t\t//Find the children of blogs node: Previous\n\t\tWebElement previous = getElement(\"{\\\"element\\\":\\\"#tree\\\",\\\"subId\\\":\\\"oj-tree-node['#prev']['title']\\\"}\");\n\n\t\tWebElement previousDiscIcon = getElement(\"{\\\"element\\\":\\\"#tree\\\",\\\"subId\\\":\\\"oj-tree-node['#prev']['disclosure']\\\"}\");\n\n\t\tAssert.assertNotNull(previousDiscIcon);\n\n\t\t//Click on Previous Node\n\t\twaitForElementVisible(\"{\\\"element\\\":\\\"#tree\\\",\\\"subId\\\":\\\"oj-tree-node['#prev']['disclosure']\\\"}\");\n\t\tpreviousDiscIcon.click();\n\n\t\t//Find the children of previous node: Yesterday\n\t\tWebElement yesterday = getElement(\"{\\\"element\\\":\\\"#tree\\\",\\\"subId\\\":\\\"oj-tree-node['#yesterday']['title']\\\"}\");\n\n\t\t//Find the children of previous node: 2DaysBack\n\t\tWebElement twodaysback = getElement(\"{\\\"element\\\":\\\"#tree\\\",\\\"subId\\\":\\\"oj-tree-node['#daysback2']['title']\\\"}\");\n\n\n\n\n\t}", "private void listChildren(Node current) {\n if(current instanceof Element){ //finds the element tags in the XML document with XOM parser\n Element temp = (Element) current;\n switch(temp.getQualifiedName()) {\n case (\"grapes\"): //grapes tag doesn't do anything in particular except instantiating the file\n break;\n\n case (\"grape\"):\n createGrape(temp);\n break;\n\n case (\"seed\"):\n createSeed(temp);\n break;\n\n default:\n throw new IllegalArgumentException(\"Invalid input in XML \" ); //any other element type is not supported in our XML formatted file\n }\n }\n\n for (int i = 0; i < current.getChildCount(); i++) {\n listChildren(current.getChild(i)); //recursive call traverses the XML document in preorder\n }\n\n }", "public interface INodeWalker {\n\t\n\t/**\n\t * adds a filter to the list of filters through which nodes will be passed when \n\t * successor nodes are retrieved via the <code>getFilteredSuccessorNodes</code> method. \n\t * If an identical filter is already in the list of filters, this method does nothing.\n\t * \n\t * @param filter\n\t * @see #getFilteredSuccessorNodes(Object)\n\t */\n\tpublic void addNodeFilter (INodeFilter filter);\n\t\n\t/**\n\t * removes the specified filter from the list of filters through which a node is passed when \n\t * <code>getFilteredSuccessorNodes</code> is called.\n\t * \n\t * @param filter\n\t * @see #getFilteredSuccessorNodes(Object)\n\t */\n\tpublic void removeNodeFilter (INodeFilter filter);\n\t\n\t/**\n\t * removes all filters from this walker\n\t * \n\t * @return all removed filters\n\t */\n\tpublic INodeFilter[] removeAllFilters ();\n\t\n\t/**\n\t * get the starting nodes of the graph. These are the nodes of the graph that have\n\t * no predecessors.\n\t *\n\t * @return starting nodes of graph\n\t */\n\tpublic Object[] getStartNodes ();\n\n\t/**\n\t * retreave the direct predecessors of the given element. The direct predecessors of the\n\t * given element are those elements that are connected to the given element via a single edge and\n\t * serve as heads on that edge, permitting the given element to serve as the tail.\n\t *\n\t * @param node - node for which direct predecessors are desired\n\t * @return direct predecessors of given node or empty array if no predecessors are present\n\t */\n\tpublic Object[] getPredecessorNodes (Object node) throws InvalidComponentException;\n\n\t/**\n\t * retreave the direct successors of the given element. The direct successors of the\n\t * given element are those elements that are connected to the given element via a single edge and\n\t * serve as tails on that edge, permitting the given element to serve as the head.\n\t *\n\t * @param node - node for which direct successors are desired\n\t * @return direct successors of given node or empty array if no successors are present\n\t */\n\tpublic Object[] getSuccessorNodes (Object node) throws InvalidComponentException;\n\n\t/**\n\t * retrieve the direct successors of the given element that pass each of the node filters added via the\n\t * <code>addNodeFilter</code> method. The direct successors of the\n\t * given element are those elements that are connected to the given element via a single edge and\n\t * serve as tails on that edge, permitting the given element to serve as the head.\n\t * \n\t * <p>If no filters have been added or if all filters pass all successor nodes, then this method is \n\t * equivalent to <code>getSuccessorNodes</code>.\n\t *\n\t * @param node - node for which direct successors are desired\n\t * @return direct successors of given node (filtered) or empty array if no successors are present\n\t * @see #addNodeFilter(INodeFilter)\n\t */\n\tpublic Object[] getFilteredSuccessorNodes (Object node) throws InvalidComponentException;\n\n}", "FeatureHolder filter(FeatureFilter fc, boolean recurse);", "public static List<String> extract(Document document) {\n Elements links = document.select(\"a[href]\");\n Elements media = document.select(\"[src]\");\n Elements imports = document.select(\"link[href]\");\n\n List<String> allLinks = new ArrayList<>();\n populateLinks(allLinks, media, \"abs:src\");\n populateLinks(allLinks, imports, \"abs:href\");\n populateLinks(allLinks, links, \"abs:href\");\n return allLinks;\n }", "public List<T> wantedNodesIterative(Predicate<T> p) {\n //PART 4 \n if(root == null){\n return null;\n }\n LinkedList<TreeNode<T>> stack = new LinkedList<>();\n stack.add(root);\n \n List<T> wantedNodes =new LinkedList<>();\n TreeNode<T> current;\n \n while(!stack.isEmpty()){\n current = stack.pop();\n if(p.check(current.data)){\n wantedNodes.add(current.data);\n }\n if(current.right != null){\n stack.addFirst(current.right);\n }\n if(current.left != null){\n stack.addFirst(current.left);\n }\n }\n return wantedNodes;\n }", "private List<Element> selectDiv(){\n\t\tElements allDiv = htmlParsed.select(\"div\");\n\t\treturn allDiv.stream().filter(div -> div.children().select(\"div\").isEmpty()).collect(Collectors.toList());\n\t}", "private void parseChildNodes(Publication publication, Node node) {\n NodeList childNodes = node.getChildNodes();\n Map<String,String> nodesMap = new HashMap<String, String>();\n for(int i = 0; i < childNodes.getLength(); i++){\n nodesMap.put(childNodes.item(i).getNodeName(), childNodes.item(i).getTextContent());\n }\n setNodeValuesInBeans(publication, nodesMap, node);\n }", "public void filter(Filter filter) throws NoTestsRemainException {\n childrenLock.lock();\n try {\n List<T> children = new ArrayList<T>(getFilteredChildren());\n for (Iterator<T> iter = children.iterator(); iter.hasNext(); ) {\n T each = iter.next();\n if (shouldRun(filter, each)) {\n try {\n filter.apply(each);\n } catch (NoTestsRemainException e) {\n iter.remove();\n }\n } else {\n iter.remove();\n }\n }\n filteredChildren = Collections.unmodifiableCollection(children);\n if (filteredChildren.isEmpty()) {\n throw new NoTestsRemainException();\n }\n } finally {\n childrenLock.unlock();\n }\n }", "@VTID(8)\n IUIAutomationCondition treeFilter();", "private void recursiveFilterUniversalSelector(Selector selector)\n\t{\n\t\tif(selector instanceof PseudoElementSelectorImpl)\n\t\t{\n\t\t\tString selectorText = selector.toString();\n\t\t\tif(selectorText.contains(\"*\"))\n\t\t\t{\n\t\t\t\tfilterUniversalSelector(selectorText);\n\t\t\t}\n\t\t}\n\t\telse if(selector instanceof SimpleSelector)\n\t\t{\n\t\t\tString selectorText = selector.toString();\n\t\t\tif(selectorText.contains(\"*\") && !selectorText.equals(\"*\") && !selectorText.contains(\"[\"))\n\t\t\t{\n\t\t\t\tfilterUniversalSelector(selectorText);\n\t\t\t}\n\t\t}\n\t\telse if (selector instanceof DescendantSelector)\n\t\t{\n\t\t\tDescendantSelector dSelector = (DescendantSelector)selector;\n\t\t\trecursiveFilterUniversalSelector(dSelector.getSimpleSelector());\n\t\t\trecursiveFilterUniversalSelector(dSelector.getAncestorSelector());\n\t\t}\n\t\telse if (selector instanceof SiblingSelector)\n\t\t{\n\t\t\tSiblingSelector dSelector = (SiblingSelector)selector;\n\t\t\trecursiveFilterUniversalSelector(dSelector.getSelector());\n\t\t\trecursiveFilterUniversalSelector(dSelector.getSiblingSelector());\n\t\t}\n\t}", "public ArrayList<String> soupThatSite(String url) throws IOException {\n\n ArrayList<String> parsedDoc = new ArrayList<>();\n Document doc = Jsoup.connect(url).get();\n\n if (url.contains(\"cnn.com\")) {\n\n doc.select(\"h1\").stream().filter(Element::hasText).forEach(element1 -> {\n String str = element1.text();\n String clean = Jsoup.clean(str, Whitelist.basic());\n parsedDoc.add(clean);\n });\n\n doc.select(\".zn-body__paragraph\").stream().filter(Element::hasText).forEach(element1 -> {\n String str = element1.text();\n String clean = Jsoup.clean(str, Whitelist.basic());\n parsedDoc.add(clean);\n });\n\n } else {\n\n doc.select(\"h1\").stream().filter(Element::hasText).forEach(element1 -> {\n String str = element1.text();\n String clean = Jsoup.clean(str, Whitelist.basic());\n parsedDoc.add(clean);\n });\n\n doc.select(\"p\").stream().filter(Element::hasText).forEach(element -> {\n String str = element.text();\n String clean = Jsoup.clean(str, Whitelist.basic());\n parsedDoc.add(clean);\n });\n }\n\n return parsedDoc;\n }", "@Override\n\tpublic List<TagInstance> searchTags(List<TagType> tags) {\n List<MarkedUpText> texts = getDescendantTexts();\n \n List<TagInstance> tagInstances = new LinkedList<TagInstance>();\n for(MarkedUpText t: texts) {\n tagInstances.addAll(t.searchTags(tags));\n }\n return tagInstances;\n\t}", "@Override\n public ParseResult filter(Content content, ParseResult parseResult,\n HTMLMetaTags metaTags, DocumentFragment doc) {\n\n // get parse obj\n Parse parse = parseResult.get(content.getUrl());\n\n // construct base url\n URL base;\n try {\n base = new URL(content.getBaseUrl());\n } catch (MalformedURLException e) {\n Parse emptyParse = new ParseStatus(e).getEmptyParse(getConf());\n parseResult.put(content.getUrl(), new ParseText(emptyParse.getText()),\n emptyParse.getData());\n return parseResult;\n }\n\n try {\n // extract license metadata\n Walker.walk(doc, base, parse.getData().getParseMeta(), getConf());\n } catch (ParseException e) {\n Parse emptyParse = new ParseStatus(e).getEmptyParse(getConf());\n parseResult.put(content.getUrl(), new ParseText(emptyParse.getText()),\n emptyParse.getData());\n return parseResult;\n }\n\n return parseResult;\n }", "void visit(Element node);", "@Override\n\tpublic Object visit(ASTFilterNot node, Object data) {\n\t\tSystem.out.print(\"not \");\n\t\tnode.childrenAccept(this, data);\n\t\treturn null;\n\t}", "void getNodes(List<Node> lNode, List<Node> lSelNode, List<Node> lExistNode, boolean blank) {\n\n switch (type()) {\n\n case FILTER:\n // get exists {} nodes\n // draft\n getExistNodes(getFilter().getExp(), lExistNode);\n break;\n\n case NODE:\n add(lNode, getNode(), blank);\n break;\n\n case EDGE:\n case PATH:\n case XPATH:\n case EVAL:\n for (int i = 0; i < nbNode(); i++) {\n Node node = getNode(i);\n add(lNode, node, blank);\n }\n break;\n\n case ACCEPT:\n //use case: join() check connection, need all variables\n add(lNode, getNode());\n break;\n\n case VALUES:\n for (Node var : getNodeList()) {\n add(lNode, var);\n }\n break;\n\n case MINUS:\n // second argument does not bind anything: skip it\n if (first() != null) {\n first().getNodes(lNode, lSelNode, lExistNode, blank);\n }\n break;\n\n case BIND:\n add(lSelNode, getNode());\n break;\n\n case QUERY:\n\n // use case: select * where { {select ?y fun() as ?var where {}} }\n // we want ?y & ?var for select *\t\t\t\n for (Exp ee : getQuery().getSelectFun()) {\n add(lSelNode, ee.getNode());\n }\n break;\n\n default:\n for (Exp ee : this) {\n ee.getNodes(lNode, lSelNode, lExistNode, blank);\n }\n }\n\n }", "Iterator<CtElement> descendantIterator();", "public Node[] getNodes(String nodeType, NodeFilter nf)\r\n {\r\n final ArrayList<Node> nodes = new ArrayList<Node>();\r\n for (final Node n : ntMap.get(nodeType).getNodes())\r\n if (nf.accept(n))\r\n nodes.add(n);\r\n return nodes.toArray(new Node[nodes.size()]);\r\n }", "private void populateFilter() throws TransformerConfigurationException\r\n\t{\r\n\t\tthis.filter = new AddressSet(\"./filtered.xml\");\r\n\t\tthis.filter.addElement(\"postmaster\");\r\n\t\tthis.filter.addElement(\"uucp\");\r\n\t\tthis.filter.addElement(\"mailer-daemon\");\r\n\t\tthis.filter.addElement(\"maildaemon\");\r\n\t\tthis.filter.addElement(\"majordomo\");\r\n\t\tthis.filter.addElement(\"mailerdaemon\");\r\n\t\tthis.filter.addElement(\"abuse@\");\r\n\t\tthis.filter.addElement(\"-relay\");\r\n\t\tthis.filter.addElement(\"-request@\");\r\n\t}", "public Vector<Node> GetAdditionalSubNodes();", "public LinkedList<Article> filterArticleList(int filter)\n\t{\n\t\treturn null;\n\t}", "private List<EObject> getElements(ISelector s) {\n\t\tList<EObject> result = new ArrayList<EObject>();\n\t\t\n\t\tfor (EObject next : charStartMap.keySet()) {\n\t\t\tint start = charStartMap.get(next);\n\t\t\tint end = charEndMap.get(next);\n\t\t\tif (s.accept(start, end)) {\n\t\t\t\tresult.add(next);\n\t\t\t}\n\t\t}\n\t\tCollections.sort(result, new Comparator<EObject>() {\n\t\t\tpublic int compare(EObject objectA, EObject objectB) {\n\t\t\t\tint lengthA = getCharEnd(objectA) - getCharStart(objectA);\n\t\t\t\tint lengthB = getCharEnd(objectB) - getCharStart(objectB);\n\t\t\t\treturn lengthA - lengthB;\n\t\t\t}\n\t\t});\n\t\treturn result;\n\t}", "Collection<Element> getElementTreeFromPlainList() {\n Map<String, Element> values = new HashMap<String, Element>();\n for (String[] s : data) {\n values.put(s[0], new Element(s[2], s[1]));\n }\n\n // creates a result list\n Collection<Element> result = new ArrayList<Element>();\n\n // for each element in the result list that has a parent, put it into it\n // otherwise it is added to the result list\n for (Element e : values.values()) {\n if (e.parent != null) {\n values.get(e.parent).getChildren().add(e);\n } else {\n result.add(e);\n }\n }\n\n return result;\n }", "Collection<Element> getElementTreeFromPlainList() {\n Map<String, Element> values = new HashMap<String, Element>();\n for (String[] s : data) {\n values.put(s[0], new Element(s[2], s[1]));\n }\n\n // creates a result list\n Collection<Element> result = new ArrayList<Element>();\n\n // for each element in the result list that has a parent, put it into it\n // otherwise it is added to the result list\n for (Element e : values.values()) {\n if (e.parent != null) {\n values.get(e.parent).getChildren().add(e);\n } else {\n result.add(e);\n }\n }\n\n return result;\n }", "private void processCss() throws MalformedURLException, IOException {\r\n\r\n\t\tcssList = fullList.extractAllNodesThatMatch(new NodeClassFilter(\r\n\t\t\t\tTagNode.class), true);\r\n\t\tthePageCss = new HashMap<String, String>();\r\n\r\n\t\tfor (SimpleNodeIterator nodeIter = cssList.elements(); nodeIter\r\n\t\t\t\t.hasMoreNodes();) {\r\n\t\t\tTagNode tempNode = (TagNode) nodeIter.nextNode();\r\n\t\t\tString tagText = tempNode.getAttribute(\"type\");\r\n\r\n\t\t\tif ((tagText != null) && (tagText.contains(\"text/css\"))) {\r\n\r\n\t\t\t\tif (tempNode instanceof StyleTag) {\r\n\t\t\t\t\tprocessImportTypeCss(tempNode);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tprocessLinkTypeCss(tempNode);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n public R visit(NodeList n, A argu) {\n R _ret = null;\n for (Enumeration<Node> e = n.elements(); e.hasMoreElements();) {\n e.nextElement().accept(this, argu);\n }\n return _ret;\n }", "private List<AxiomTreeNode> getChildNodeList(AxiomTreeNode t) {\n\n List<AxiomTreeNode> list = new ArrayList<AxiomTreeNode>();\n\n for (int i = 0; i < t.getChildCount(); i++) {\n\n list.add((AxiomTreeNode) t.getChildAt(i));\n }\n\n return list;\n }", "public void parseHyperEdge(IHyperEdge hyperedge, TreeItem<Object> root,\n String filter) {\n\n TreeItem<Object> hyperEdgeItem = new TreeItem<>(hyperedge);\n root.getChildren().add(hyperEdgeItem);\n\n }", "private Stream<String> processLines(Stream<String> lines) {\n System.out.println(\"processlines\" + Thread.currentThread().getName());\n Pattern pattern = Pattern.compile(\"<a href=\\\"([^\\\\/]*\\\\/)\\\".*\");\n\n return lines\n .map(s -> pattern.matcher(s))\n .filter(m -> m.matches())\n .map(m -> m.group(1))\n .filter(s -> !\"../\".equals(s));\n }", "public abstract void filter();", "@Override\n public R visit(Filter n, A argu) {\n R _ret = null;\n n.nodeToken.accept(this, argu);\n n.constraint.accept(this, argu);\n return _ret;\n }", "@Override\n\tpublic Object visit(ASTRelFilter node, Object data) {\n\t\treturn null;\n\t}", "@Override\n\tpublic Set<HtmlTag> getChildren()\n\t{\n\t\tImmutableSet.Builder<HtmlTag> childrenBuilder = ImmutableSet.builder();\n\t\tfor(TreeNode<? extends HtmlTag> child : node.getChildren())\n\t\t{\n\t\t\tchildrenBuilder.add(child.getValue());\n\t\t}\n\t\treturn childrenBuilder.build();\n\t}", "public ResultMap<BaseNode> listChildren();", "private void extractAllCitations() {\r\n try {\r\n // gets all matched objects for extracting All Citations.\r\n Matcher matcherObject = matcher.patternMatcher(\"AllCitations\");\r\n\r\n\r\n while (matcherObject.find()) {\r\n allMatches.add(matcherObject.group(1));\r\n }\r\n\r\n // add all citations from allMatches, add it to outputResult\r\n if (!allMatches.isEmpty()) {\r\n format.Formatter(2, allMatches.get(0));\r\n }\r\n \r\n\r\n } catch (Exception e) {\r\n System.out.println(\"Error has occured in extractAllCitations method\");\r\n }\r\n }", "protected void page () throws HTMLParseException {\r\n while (block.restSize () == 0) {\r\n switch (nextToken) {\r\n case END:\r\n return;\r\n case LT:\r\n lastTagStart = tagStart;\r\n tagmode = true;\r\n match (LT);\r\n tag (lastTagStart);\r\n break;\r\n case COMMENT:\r\n //block.addToken (new Token (pagepart, Token.COMMENT, tagStart, stringLength));\r\n // 2009.05.28 by in-koo cho\r\n addTokenCheck(new Token (pagepart, Token.COMMENT, tagStart, stringLength));\r\n match (COMMENT);\r\n break;\r\n case SCRIPT:\r\n //block.addToken (new Token (pagepart, Token.SCRIPT, tagStart, stringLength));\r\n addTokenCheck(new Token (pagepart, Token.SCRIPT, tagStart, stringLength));\r\n match (SCRIPT);\r\n break;\r\n case STRING:\r\n if(stringLength > -1){\r\n //block.addToken (new Token (pagepart, Token.TEXT, tagStart, stringLength));\r\n // 2009.05.28 by in-koo cho\r\n addTokenCheck(new Token (pagepart, Token.TEXT, tagStart, stringLength));\r\n }\r\n match (nextToken);\r\n break;\r\n case MT:\r\n if(!tagmode) {\r\n scanString();\r\n }\r\n default:\r\n if(stringLength > -1){\r\n //block.addToken (new Token (pagepart, Token.TEXT, tagStart, stringLength));\r\n // 2009.05.28 by in-koo cho\r\n addTokenCheck(new Token (pagepart, Token.TEXT, tagStart, stringLength));\r\n }\r\n match (nextToken);\r\n }\r\n }\r\n }", "public ArrayList<String> getTags(String url) {\n // Use hashset to remove duplicates\n Collection<String> tags = new HashSet<>();\n try {\n String page = connectAndGetPage(url);\n Pattern p = Pattern.compile(\"<[^>]*>\");\n Matcher m = p.matcher(page);\n while (m.find()) {\n // Get match and add to hashset if not a comment or closing tag.\n String match = m.group(0);\n String characterAfterStart = String.valueOf(match.charAt(1));\n if (!characterAfterStart.equals(\"/\") && !characterAfterStart.equals(\"!\")) {\n tags.add(match.trim());\n }\n }\n } catch (IOException e) {\n System.out.println(\"IOException\");\n }\n return sortTags(tags);\n\n }", "void startCrawler() throws ParserConfigurationException, SAXException, IOException;", "void countTagStatistics(){\t\n\t\thtmlParsed.traverse(new NodeVisitor() {\n\t\t\tdouble count = 0.;\n\t\t\tString tagName = \"\";\n\t\t public void head(Node node, int depth) {\n\t\t \tif (node instanceof Element) {\n\t\t \t\ttagName = ((Element) node).tagName();\n\t\t \t\tif(countTags.containsKey(tagName)){\n\t\t \t\t\tcount = countTags.get(tagName) + 1.;\n\t\t \t\t\tcountTags.put(tagName, count);\n\t\t \t\t}\n\t\t \t\telse if(tagName.matches(\"^[a-zA-Z:]+\"))\n\t\t \t\t\t\tcountTags.put(tagName, 1.);\n\t\t \t}\n\t\t }\n\t\t public void tail(Node node, int depth) {\n\t\t }\n\t\t});\t\n\t\t\t\n\t}", "public void removeNodeFilter (INodeFilter filter);", "private static void visitChildNodes(NodeList nList)\r\n {\r\n for (int temp = 0; temp < nList.getLength(); temp++)\r\n {\r\n Node node = nList.item(temp);\r\n if (node.getNodeType() == Node.ELEMENT_NODE)\r\n {\r\n System.out.println(node.getNodeName() + \" \" + node.getTextContent());\r\n //Check all attributes\r\n if (node.hasAttributes()) {\r\n // get attributes names and values\r\n NamedNodeMap nodeMap = node.getAttributes();\r\n for (int i = 0; i < nodeMap.getLength(); i++)\r\n {\r\n Node tempNode = nodeMap.item(i);\r\n System.out.println(\"Phone name : \" + tempNode.getNodeValue());\r\n }\r\n if (node.hasChildNodes()) {\r\n //We got more childs; Let's visit them as well\r\n visitChildNodes(node.getChildNodes());\r\n }\r\n }\r\n }\r\n }\r\n }", "private static void nekoTest() {\n\t\t\t\t DOMParser parser = new DOMParser();\n\t\t\t\t try {\n\t\t\t\t parser\n\t\t\t\t .setFeature(\n\t\t\t\t \"http://cyberneko.org/html/features/scanner/allow-selfclosing-iframe\",\n\t\t\t\t true);\n\t\t\t\t parser.setFeature(\"http://cyberneko.org/html/features/augmentations\",\n\t\t\t\t true);\n\t\t//\t\t parser.setProperty(\n\t\t//\t\t \"http://cyberneko.org/html/properties/default-encoding\",\n\t\t//\t\t defaultCharEncoding);\n\t\t\t\t parser\n\t\t\t\t .setFeature(\n\t\t\t\t \"http://cyberneko.org/html/features/scanner/ignore-specified-charset\",\n\t\t\t\t true);\n\t\t\t\t parser\n\t\t\t\t .setFeature(\n\t\t\t\t \"http://cyberneko.org/html/features/balance-tags/ignore-outside-content\",\n\t\t\t\t false);\n\t\t\t\t parser.setFeature(\n\t\t\t\t \"http://cyberneko.org/html/features/balance-tags/document-fragment\",\n\t\t\t\t true);\n\t\t//\t\t parser.setFeature(\"http://cyberneko.org/html/features/report-errors\",\n\t\t\t\t\t\tString url=\"http://et.21cn.com/movie/xinwen/huayu/2004/05/20/1571743.shtml\";\n\t\t\t\t Document document = Jsoup.connect(url).get();\n\t\t\t\t W3CDom wad= new W3CDom();\n\t\t\t\t org.w3c.dom.Document fromJsoup = wad.fromJsoup(document);\n\t\t//\t\t parser.parse(new InputSource(new StringReader(document.html())));\n\t\t//\t\t org.w3c.dom.Document document2 = parser.getDocument();\n\t\t\t\t XpathV3Selector selector = XpathV3Selector.selector(new DOMSource(fromJsoup));\n\t\t\t\t \tString string = selector.evaluate(\"//div[@class='texttit_m1']\");\n\t\t\t\t\tSystem.out.println(string);\n\t\t//\t\t DOMSource\n\t\t\t\t } catch (Exception e) {\n\t\t\t\t \te.printStackTrace();\n\t\t\t\t }\n\t}", "public LinkedList <AbsAttraction> filter(ISelect s){\r\n return new LinkedList <AbsAttraction>(); \r\n }", "public final Object [] getVisibleElements() {\r\n\t\tfinal List<XElementNode> roots = new ArrayList<XElementNode>();\t\t\t\t\r\n\t\tStringBuffer paths = new StringBuffer();\r\n\r\n\t\t//if right side is empty, we take selection of left side:\r\n\t\tif(targetHierarchyTree.isEmpty()) {\r\n//\t\t\tfinal Map <FastMSTreeItem, XElementNode> parents = new HashMap<FastMSTreeItem, XElementNode>();\r\n\t\t\tfinal LinkedHashSet <FastMSTreeItem> currentSelection = sourceHierarchyTree.getSelection(); \r\n\t\t\tfor (FastMSTreeItem it: currentSelection) {\r\n\t\t\t\tpaths.append(it.getModel().getPath());\r\n\t\t\t\tpaths.append(\",\");\r\n\t\t\t}\r\n\t\t\tsourceHierarchyTree.traverse(new FastMSTreeItemVisitor() {\r\n\t\t\t\tpublic boolean visit(FastMSTreeItem item, FastMSTreeItem parent) {\r\n\t\t\t\t\tXElementNode elNode = getElementNodeCopyFrom(item);\r\n//\t\t\t\t\telNode.removeChildren();\r\n//\t\t\t\t\tparents.put(item, elNode);\r\n\t\t\t\t\titem.setElementNode(elNode);\r\n\t\t\t\t\tXElementNode xParent = getParent(parent); //, parents); //parents.get(parent);\r\n\t\t\t\t\tif(xParent == null)\r\n\t\t\t\t\t\troots.add(elNode);\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\txParent.forceAddChild(elNode);\r\n\t\t\t\t\t\telNode.setParent(xParent);\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\txAxisHierarchy.addProperty(\"filterPaths\", paths.toString());\r\n\t\t} else {\r\n\t\t\tfinal Map<FastMSTreeItem, XElementNode> parents = new HashMap<FastMSTreeItem, XElementNode>();\r\n\t\t\tfinal List <String> filterPaths = new ArrayList <String>();\r\n\t\t\ttargetHierarchyTree.traverse(new FastMSTreeItemVisitor(){\r\n\t\t\t\tpublic boolean visit(FastMSTreeItem item, FastMSTreeItem parent) {\r\n\t\t\t\t\tXObjectModel node = item.getXObjectModel();\r\n\t\t\t\t\tString path = node.get(\"filterPath\");\r\n\t\t\t\t\tif (path != null) {\r\n\t\t\t\t\t\tfilterPaths.add(path);\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn item.getChildCount() > 0;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tfor (String f: filterPaths) {\r\n\t\t\t\tpaths.append(f);\r\n\t\t\t\tpaths.append(\",\");\r\n\t\t\t}\r\n\t\t\ttargetHierarchyTree.traverse(new FastMSTreeItemVisitor() {\r\n\t\t\t\tpublic boolean visit(FastMSTreeItem item, FastMSTreeItem parent) {\r\n\t\t\t\t\tXElementNode elNode = getElementNodeCopyFrom(item);\r\n\t\t\t\t\telNode.removeChildren();\r\n\t\t\t\t\titem.setElementNode(elNode);\r\n\t\t\t\t\tXElementNode xParent = getParent(parent); //parents.get(parent);\r\n\t\t\t\t\tif(xParent == null)\r\n\t\t\t\t\t\troots.add(elNode);\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\txParent.forceAddChild(elNode);\r\n\t\t\t\t\t\telNode.setParent(xParent);\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t});\t\t\t\r\n\t\t\txAxisHierarchy.addProperty(\"filterPaths\", paths.toString());\r\n\t\t}\r\n\t\treturn new Object [] {roots.toArray(new XElementNode[0]), paths.toString()};\r\n\t}", "@SuppressWarnings(\"static-method\")\n\tprotected ReferenceContext extractReferencableElements(String text) {\n\t\tfinal ReferenceContext context = new ReferenceContext();\n\n\t\t// Visit the links and record the transformations\n\t\tfinal MutableDataSet options = new MutableDataSet();\n\t\tfinal Parser parser = Parser.builder(options).build();\n\t\tfinal Node document = parser.parse(text);\n\t\tfinal Pattern pattern = Pattern.compile(SECTION_PATTERN_AUTONUMBERING);\n\t\tNodeVisitor visitor = new NodeVisitor(\n\t\t\t\tnew VisitHandler<>(Paragraph.class, it -> {\n\t\t\t\t\tfinal CharSequence paragraphText = it.getContentChars();\n\t\t\t\t\tfinal Matcher matcher = pattern.matcher(paragraphText);\n\t\t\t\t\tif (matcher.find()) {\n\t\t\t\t\t\tfinal String number = matcher.group(2);\n\t\t\t\t\t\tfinal String title = matcher.group(3);\n\t\t\t\t\t\tfinal String key1 = computeHeaderId(number, title);\n\t\t\t\t\t\tfinal String key2 = computeHeaderId(null, title);\n\t\t\t\t\t\tcontext.registerSection(key1, key2, title);\n\t\t\t\t\t}\n\t\t\t\t}));\n\t\tvisitor.visitChildren(document);\n\n\t\tfinal Pattern pattern1 = Pattern.compile(SECTION_PATTERN_TITLE_EXTRACTOR_WITHOUT_MD_PREFIX);\n\t\tvisitor = new NodeVisitor(\n\t\t\t\tnew VisitHandler<>(Heading.class, it -> {\n\t\t\t\t\tString key = it.getAnchorRefId();\n\t\t\t\t\tString title = it.getText().toString();\n\t\t\t\t\t// Sometimes, the title already contains the section number.\n\t\t\t\t\t// It should be removed.\n\t\t\t\t\tfinal Matcher matcher = pattern1.matcher(title);\n\t\t\t\t\tif (matcher.find()) {\n\t\t\t\t\t\tfinal String number = matcher.group(1);\n\t\t\t\t\t\ttitle = matcher.group(2);\n\t\t\t\t\t\tif (Strings.isEmpty(key)) {\n\t\t\t\t\t\t\tkey = computeHeaderId(number, title);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tfinal String key2 = computeHeaderId(null, title);\n\t\t\t\t\tif (Strings.isEmpty(key)) {\n\t\t\t\t\t\tkey = key2;\n\t\t\t\t\t}\n\t\t\t\t\tcontext.registerSection(key, key2, title);\n\t\t\t\t}));\n\t\tvisitor.visitChildren(document);\n\n\t\treturn context;\n\t}", "@Override\n\tpublic Object visit(ASTFilterIs node, Object data) {\n\t\tSystem.out.print(node.jjtGetChild(0).jjtAccept(this, data));\n\t\tSystem.out.print(\" is \");\n\t\tSystem.out.print(node.jjtGetChild(1).jjtAccept(this, data));\n\t\treturn null;\n\t}", "private void readEntries(ArrayList<TextFinder> lst, NodeList nodes)\n throws VDDException {\n for (int k = 0; k < nodes.getLength(); k++) {\n Node node = nodes.item(k);\n if (node.getNodeType() != Node.ELEMENT_NODE) {\n continue;\n }\n if (!node.getNodeName().toLowerCase().equals(\"regex\")) {\n throw new VDDException(\"Unknown assert page entry type '\" +\n node.getNodeName() + \"'\");\n }\n\n lst.add(new TextFinder(node.getTextContent()));\n }\n }", "private void parse(final Chain<Bunny, Lexi> b) {\n\t\tfor (boolean again = true; again;) {\n\t\t\tagain = false;\n\t\t\tfinal List<Lexi> directives = new ArrayList<>();\n\t\t\tfinal List<Matcher> matchers = new ArrayList<>();\n\t\t\tfinal List<Anchor> anchors = new ArrayList<>();\n\t\t\tfinal List<Anchor> satiatedAnchors = new ArrayList<>();\n\t\t\tb.printChain();\n\t\t\tfor (final Chain<Bunny, Lexi>.Node node : b) {\n\t\t\t\tif (node.get() instanceof Lexi) {\n\t\t\t\t\tdirectives.add((Lexi) node.get());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (node.get() instanceof TriviaBunny) {\n\t\t\t\t\tfeedTrivia(matchers, node.get());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (!(node.get() instanceof TriviaBunny))\n\t\t\t\t\tstartNewMatchers(b, directives, matchers, anchors, node);\n\t\t\t\tfinal List<Matcher> satiatedMatchers = feedAndGetSatiated(matchers, node);\n\t\t\t\tsatiatedAnchors.addAll(azListAnchor(feedAndGetSatiated(anchors, node)));\n\t\t\t\tfor (final Anchor a : satiatedAnchors)\n\t\t\t\t\tif (matchers.stream().filter(m -> m.lexi == a.lexi && m.startsBeforeOrTogether(a)).count() == 0)\n\t\t\t\t\t\ta.explode();\n\t\t\t\tif (!satiatedMatchers.isEmpty()) {\n\t\t\t\t\tapplyLexi(getRuller(satiatedMatchers));\n\t\t\t\t\tagain = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!again && !satiatedAnchors.isEmpty())\n\t\t\t\tsatiatedAnchors.get(0).explode();\n\t\t}\n\t}", "public static String HTMLLinkString(String url, String filter) throws Exception\n\t{\n\t\tURL[] links = HTMLLinks(url);\n\t\tString urls = \"\";\n\t\tfor (URL link : links)\n\t\t{\n\t\t\tString slink = link.toString();\n\t\t\tif (slink.contains(filter))\n\t\t\t{\n\t\t\t\turls = urls + slink + \" \";\n\t\t\t}\n\t\t}\n\t\treturn urls.trim();\n\t}", "public Collection<String> parse(Reader page)\r\n\t{\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\t\r\n\t\t\t//create an input source to parse from the stream\r\n\t\t\tInputSource pageInputSource = new InputSource(page);\r\n\t\t\t\r\n\t\t\t// parse page\r\n\t\t\tp.parse(pageInputSource);\r\n\t\t\t\r\n\t\t\treturn linkContextHandler.removeLinkStrings();\r\n\t\t} catch (IOException e)\r\n\t\t{\r\n\r\n\t\t\tLogger.log(0, this.getClass().getSimpleName(), \"parse\",\r\n\t\t\t\t\t\"input error, couldn't parse page: \" + e.toString());\r\n\t\t} catch (SAXException e)\r\n\t\t{\r\n\t\t\tLogger.log(0, this.getClass().getSimpleName(), \"parse\",\r\n\t\t\t\t\t\"SAX exception, tag soup couldn't parse page: \"\r\n\t\t\t\t\t\t\t+ e.toString());\r\n\t\t}\r\n\r\n\t\treturn null;\r\n\t}", "public Link buildForFilter() {\n isSubTreeFiltered = true;\n return new DefaultLink(this);\n }", "public ResultMap<BaseNode> listChildren(Pagination pagination);", "private ArrayList<ContentNode> findDescendants(Node currentNode, ArrayList<ContentNode> allNodes) throws RepositoryException {\n NodeIterator iterator = currentNode.getNodes();\n\n while (iterator.hasNext()) {\n Node nextNode = iterator.nextNode();\n\n if (nextNode.isNode() && !nextNode.isNodeType(\"hippofacnav:facetnavigation\")) {\n if (!nextNode.getNodes().hasNext()) {\n allNodes.add(new ContentNode(nextNode.getName(), nextNode.getProperties()));\n log.info(\"Added descendant node; \" + nextNode.getName());\n }\n findDescendants(nextNode, allNodes);\n }\n }\n\n return allNodes;\n }", "private void init()\n\t{\n\t\t_matchedElements = new ArrayList<>();\n\t\t_nonStructuralPseudoClasses = new LinkedHashMap<>();\n\t\t_structuralPseudoClasses = new LinkedHashMap<>();\n\t\t_keyPseudoClass = \"\";\n\t\t_keyPseudoElement = \"\";\n\n\t\t_isIgnored = _selectorText.contains(\":not\") || _selectorText.contains(\"[disabled]\") || !_w3cError.isEmpty();\n\t\tif(_isIgnored)\n\t\t{\n\t\t\t_isMatched = true;\n\t\t\t_declarations.forEach(p -> p.setEffective(true));\n\t\t\t_selectorText = _selectorText.replace(\"*\",\"\");\n\t\t}\n\t\telse\n\t\t{\n\n\t\t\ttry\n\t\t\t{\n\t\t\t\trecursiveFilterUniversalSelector(_selector);\n\t\t\t}\n\t\t\tcatch (Exception ex)\n\t\t\t{\n\t\t\t\tLogHandler.error(ex, \"[MSelector] Error in filtering universal selectors in selector '%s':\", _selector);\n\t\t\t}\n\n\t\t\ttry\n\t\t\t{\n\t\t\t\tdeterminePseudo();\n\t\t\t}\n\t\t\tcatch (Exception ex)\n\t\t\t{\n\t\t\t\tLogHandler.error(ex, \"[MSelector] Error in determining pseudo presence in selector '%s':\", _selector);\n\t\t\t}\n\t\t}\n\n\t\t_specificity = new SpecificityCalculator().computeSpecificity(_selectorText,\n\t\t\t\t(_nonStructuralPseudoClasses.size() + _structuralPseudoClasses.size()),\n\t\t\t\t_hasPseudoElement);\n\t}", "public void iterateThroughtEachElement(){\r\n ArrayList<String> links = examineHTML.getHrefOffers();\r\n \r\n int index = 0;\r\n \r\n for(String link:links){\r\n getHTMLOffer(link, index);\r\n ++index;\r\n }\r\n /*for(int i = 0; i < 10; i++){\r\n getHTMLOffer(links.get(i), index);\r\n ++index;\r\n }*/\r\n \r\n analyzeEachOffer();\r\n }", "public static void main(String[] args) throws IOException {\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\n Pattern pattern = Pattern.compile(\"<a\\\\s+(href=[^>]+)>([^<]+)<\\\\/a>\");\n\n StringBuilder sb = new StringBuilder();\n String currentLine = reader.readLine();\n\n while (!\"END\".equals(currentLine)) {\n sb.append(currentLine).append(System.getProperty(\"line.separator\"));\n currentLine = reader.readLine();\n }\n\n Matcher matcher = pattern.matcher(sb);\n\n while (matcher.find()) {\n // group 1 = <a da stane => [URL\n // group 3 = > da stane => ]\n // group 5 = </a> da stane => [/URL]\n\n int startIndex = matcher.start();\n int endIndex = matcher.end();\n\n String replacedTag = \"[URL \" + matcher.group(1) + \"]\" + matcher.group(2) + \"[/URL]\";\n sb.replace(startIndex, endIndex, replacedTag);\n matcher = pattern.matcher(sb);\n\n }\n\n\n\n\n System.out.println(sb);\n\n\n }", "public DefaultLink processSubtreeFiltering(Link appInstance, boolean isSelectAllSchemaChild) {\n LinkBuilder subTreeFilteringResultBuilder = new LinkBuilder();\n BitSet isAnySelectOrContainmentNode = new BitSet();\n if (!processLeafSubtreeFiltering(appInstance, subTreeFilteringResultBuilder, isAnySelectOrContainmentNode,\n isSelectAllSchemaChild)) {\n return null;\n }\n if (!processChildNodesSubTreeFiltering(appInstance, subTreeFilteringResultBuilder,\n isAnySelectOrContainmentNode, isSelectAllSchemaChild)) {\n return null;\n }\n if (yangAugmentedInfoMap.isEmpty()) {\n Set<Map.Entry<Class<?>, Object>> augment = appInstance.yangAugmentedInfoMap().entrySet();\n if (augment != null && !augment.isEmpty()) {\n Iterator<Map.Entry<Class<?>, Object>> augItr = augment.iterator();\n while (augItr.hasNext()) {\n Map.Entry<Class<?>, Object> aug = augItr.next();\n Class<?> augClass = aug.getKey();\n String augClassName = augClass.getName();\n int index = augClassName.lastIndexOf('.');\n String classPackage = augClassName.substring(0, index) +\n \".\" + \"Default\" + augClass.getSimpleName() + \"$\"\n + augClass.getSimpleName() + \"Builder\";\n ClassLoader classLoader = augClass.getClassLoader();\n try {\n Class<?> builderClass;\n builderClass = classLoader.loadClass(classPackage);\n Object builderObj = builderClass.newInstance();\n Method method = builderClass.getMethod(\"build\");\n Object defaultObj = method.invoke(builderObj);\n Class<?> defaultClass = defaultObj.getClass();\n method = defaultClass.getMethod\n (\"processSubtreeFiltering\", augClass,\n boolean.class);\n Object result = method.invoke(defaultObj, aug.getValue(),\n true);\n subTreeFilteringResultBuilder\n .addYangAugmentedInfo(result, augClass);\n } catch (ClassNotFoundException | InstantiationException\n | NoSuchMethodException |\n InvocationTargetException | IllegalAccessException e) {\n e.printStackTrace();\n }\n }\n }\n } else {\n Set<Map.Entry<Class<?>, Object>> augment = yangAugmentedInfoMap\n .entrySet();\n Iterator<Map.Entry<Class<?>, Object>> augItr = augment.iterator();\n while (augItr.hasNext()) {\n Map.Entry<Class<?>, Object> aug = augItr.next();\n Class<?> augClass = aug.getKey();\n Object appInstanceInfo = appInstance.yangAugmentedInfo(augClass);\n if (appInstanceInfo == null) {\n subTreeFilteringResultBuilder.addYangAugmentedInfo\n (aug.getValue(), aug.getKey());\n } else {\n Object processSubtreeFiltering;\n try {\n processSubtreeFiltering = aug.getValue().getClass()\n .getMethod(\"processSubtreeFiltering\",\n aug.getKey(), boolean.class)\n .invoke(aug.getValue(),\n appInstanceInfo, true);\n if (processSubtreeFiltering != null) {\n subTreeFilteringResultBuilder\n .addYangAugmentedInfo(processSubtreeFiltering, aug.getKey());\n }\n } catch (NoSuchMethodException | InvocationTargetException | IllegalAccessException e) {\n e.printStackTrace();\n }\n }\n }\n }\n if (!isSelectAllSchemaChild && !isAnySelectOrContainmentNode.get(0)) {\n return processSubtreeFiltering(appInstance, true);\n }\n return (DefaultLink) subTreeFilteringResultBuilder.buildForFilter();\n }", "private static ArrayList<Publication> getParserAuthor() {\n\t\n\t ArrayList<Publication> list= new ArrayList<Publication>(); \n //获取DOM解析器 \n DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); \n DocumentBuilder builder; \n try { \n builder = factory.newDocumentBuilder(); \n Document doc; \n doc = builder.parse(new File(\"Myxml.xml\")); \n //得到一个element根元素,获得根节点 \n Element root = doc.getDocumentElement(); \n System.out.println(\"根元素:\"+root.getNodeName()); \n \n //子节点 \n NodeList personNodes = root.getElementsByTagName(\"publication\"); \n for(int i = 0; i<personNodes.getLength();i++){ \n Element personElement = (Element) personNodes.item(i); \n Publication publication = new Publication(); \n NodeList childNodes = personElement.getChildNodes(); \n //System.out.println(\"*****\"+childNodes.getLength()); \n \n for (int j = 0; j < childNodes.getLength(); j++) { \n if(childNodes.item(j).getNodeType()==Node.ELEMENT_NODE){ \n if(\"authors\".equals(childNodes.item(j).getNodeName())){ \n publication.setAuthors(childNodes.item(j).getFirstChild().getNodeValue()); \n }else if(\"id\".equals(childNodes.item(j).getNodeName())){ \n publication.setId(childNodes.item(j).getFirstChild().getNodeValue()); \n } \n } \n } \n list.add(publication); \n } \n for(Publication publication2 : list){ //为了查看数据是否正确,进行打印结果 \n System.out.println(publication2.toString()); \n } \n } catch (SAXException e) { \n e.printStackTrace(); \n } catch (IOException e) { \n e.printStackTrace(); \n } catch (ParserConfigurationException e) { \n e.printStackTrace(); \n } \n return list;\n}", "private boolean parseHTML(Webpage webpage) {\n Document doc;\n try {\n doc = Jsoup.parse(webpage.getHTML());\n } catch (Throwable t) {\n if(this.DEBUG)\n System.out.println(\"-> ERROR: Jsoup failed to parse the HTML file from \" + webpage.getWARCname() + \", skipping it.\");\n return true;\n }\n\n Elements elements = doc.getAllElements();\n\n //Extract number of HTML elements\n webpage.setNumHTMLelem(elements.size());\n\n //Extract DOCTYPE\n webpage.setDoctype(getDocumentType(doc));\n\n //Go through every HTML element\n for (Element element : elements) {\n //Add comments' information for all child elements\n webpage = addComments(webpage, element);\n\n //Add textual content to the pile, so we can get its total size later\n if (element.ownText() != null && !element.ownText().equals(\"\"))\n webpage.addTextContent(element.ownText());\n\n //Get HTML tag name\n String tag = Utils.removeLineBreaks(element.tagName().toLowerCase());\n\n //Add tag occurrence to the total of this page\n if (webpage.hasElement(tag))\n webpage.incrementElement(tag);\n else\n webpage.addElement(tag);\n\n //Process attributes for this element\n if (element.attributes().size() > 0) {\n webpage = processElementAttributes(webpage, element, tag);\n }\n\n //Process hyperlinks\n if (tag.equals(\"a\") || tag.equals(\"area\"))\n webpage = processHyperlinks(webpage, element);\n\n //Process images\n if (tag.equals(\"img\"))\n webpage = processImages(webpage, element);\n }\n\n return false;\n }", "@Override\n\tpublic void visitTag(Tag tag){\n\t\t\n if (tag instanceof Div) { \n Div div = (Div) tag; \n String attr = div.getAttribute(\"class\"); //detailed_rig\n //System.out.println(\"attr:\" + attr);\n if(\"detailed_rig\".equals(attr)){ //小区div\n \t\n \t//System.out.println(\"=========================\"+div.toHtml());\n \tSpanVisitor sv = new SpanVisitor();\n \t//LinkVisitor lv = new LinkVisitor();\n \t//div.accept(lv);\n \t//link = lv.getLink();\n \tdiv.accept(sv);\n \tCommunity com = new Community(sv.getName(), sv.getLink()+\"esf/\", sv.getPrice());\n \tcommunityList.add(com);\n// \tSystem.out.println(\"name:\"+name +\" price:\"+price + \" link:\"+link);\n }\n if(\"fanye\".equals(attr)){\n \tNextPageVisitor np = new NextPageVisitor();\n \tdiv.accept(np);\n \tnextPageLink =np.getLink();\n \t//System.out.println(\"link:\" +np.getLink() );\n }\n //line = textnode.toPlainTextString().trim(); \n //line = textnode.getText(); \n } \t\t\n\t}" ]
[ "0.6025907", "0.5554776", "0.5498049", "0.54585713", "0.542941", "0.5426294", "0.54057837", "0.5273076", "0.52155507", "0.52069354", "0.5166722", "0.5130625", "0.51160985", "0.510389", "0.5088445", "0.5083981", "0.5082831", "0.5050331", "0.5027139", "0.50142026", "0.5005685", "0.4988874", "0.49853325", "0.49565524", "0.4948332", "0.49450102", "0.49275067", "0.49223664", "0.49141076", "0.49067783", "0.4860601", "0.4843655", "0.48024976", "0.47913855", "0.4771696", "0.4770859", "0.47499618", "0.47262445", "0.47227836", "0.47212267", "0.47207582", "0.47115755", "0.47100228", "0.47057894", "0.46965933", "0.4682188", "0.46757478", "0.46533984", "0.4638036", "0.463482", "0.46301296", "0.4610161", "0.4602932", "0.46013615", "0.4600883", "0.45993388", "0.45949268", "0.4586356", "0.45779303", "0.4558146", "0.455082", "0.4541341", "0.45333835", "0.45333835", "0.45311257", "0.4525194", "0.4522998", "0.45044488", "0.45041084", "0.4495983", "0.44955286", "0.4487431", "0.4478656", "0.4477436", "0.44763023", "0.44761625", "0.44533098", "0.4451223", "0.44501504", "0.44461048", "0.44408584", "0.443685", "0.44285208", "0.44266862", "0.4426633", "0.44153917", "0.44151682", "0.440915", "0.43972266", "0.43910503", "0.4387788", "0.43870336", "0.43864638", "0.4386448", "0.4380049", "0.43715248", "0.43679312", "0.43659222", "0.43645653", "0.43604505" ]
0.63850105
0
Returns a fully formed url
public static String formURL(String url) { String newurl; if (url.contains("http://") || url.contains("https://")) { newurl = url; } else { newurl = "http://" + url; } return newurl; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String url();", "@Override\n public String getUrl() {\n StringBuilder sb = new StringBuilder(baseUrl);\n if (mUrlParams.size() > 0) {\n sb.append(\"?\");\n for (String key : mUrlParams.keySet()) {\n sb.append(key);\n sb.append(\"=\");\n sb.append(mUrlParams.get(key));\n sb.append(\"&\");\n }\n }\n String result = sb.substring(0, sb.length() - 1);\n return result;\n }", "FullUriTemplateString baseUri();", "public String toQueryUrl() {\n StringBuilder urlBuilder = new StringBuilder();\n Set<Map.Entry<String, Object>> entrySet = params.entrySet();\n int i = entrySet.size();\n for (Map.Entry<String, Object> entry : entrySet) {\n try {\n if (null != entry.getValue()) {\n urlBuilder.append(entry.getKey()).append('=')\n .append(URLEncoder.encode(String.valueOf(entry.getValue()), DEFAULT_ENC));\n if (i > 1) {\n urlBuilder.append('&');\n }\n }\n i--;\n } catch (UnsupportedEncodingException e) {\n throw new RuntimeException(e);\n }\n }\n \n return urlBuilder.toString();\n }", "java.lang.String getUrl();", "java.lang.String getUrl();", "java.lang.String getUrl();", "java.lang.String getUrl();", "java.lang.String getUrl();", "java.lang.String getUrl();", "Uri getUrl();", "String getUrl();", "String getUrl();", "String getUrl();", "String getUrl();", "String getUrl();", "java.lang.String getUri();", "java.lang.String getUri();", "public static URL buildUrl() {\n Uri builtUri = Uri.parse(CONTENT_JSON_URL).buildUpon()\n .build();\n\n URL url = null;\n try {\n url = new URL(builtUri.toString());\n } catch (MalformedURLException e) {\n e.printStackTrace();\n }\n return url;\n }", "private String getOriginUrl() {\n Uri.Builder builder = url.buildUpon();\n for (Param p : queryParams) {\n builder.appendQueryParameter(p.key, p.value);\n }\n return builder.build().toString();\n }", "URI uri();", "String getUri( );", "String getBaseUri();", "String getUri();", "public String formURL(){\n String target = feedURL + \"?s=\" + marketInformation.getTickers().stream().reduce( (a, b) -> a + \",\" + b).get();\n // p0 is just the prices ordered the same as the request\n target += \"&f=p0\";\n return target;\n }", "String getQueryRequestUrl();", "String getRequestURL();", "String getJoinUrl();", "URL getUrl();", "private String getURL() {\n\t\t// TODO : Generate URL\n\t\treturn null;\n\t}", "URL format(ShortLink shortLink);", "public String getAbsoluteUrl() throws MalformedURLException {\r\n URL webUrl = new URL(webAbsluteUrl);\r\n URL urlRequest = new URL(webUrl.toString() + url);\r\n return urlRequest.toString();\r\n }", "String getURI();", "String getURI();", "String getURI();", "@Override\r\n public String getFriendlyURI() {\r\n return createURI(false, false);\r\n }", "private String makeUrlFromInput(String bookQueryText) {\n\n // Replace white spaces with a + symbol to make it compatible to be used in the JSON\n // request URL\n bookQueryText.replaceAll(\" \", \"+\");\n\n StringBuilder urlBuilder = new StringBuilder();\n urlBuilder = urlBuilder.append(GBOOKS_REQUEST_URL_PART1)\n .append(bookQueryText)\n .append(GBOOKS_REQUEST_URL_PART2);\n\n // First encode into UTF-8, then back to a form easily processed by the API\n // This is mainly to avoid issues with spaces and other special characters in the URL\n String finalUrl = Uri.encode(urlBuilder.toString()).replaceAll(\"\\\\+\", \"%20\")\n .replaceAll(\"\\\\%21\", \"!\")\n .replaceAll(\"\\\\%3A\", \":\")\n .replaceAll(\"\\\\%2F\", \"/\")\n .replaceAll(\"\\\\%3F\", \"?\")\n .replaceAll(\"\\\\%26\", \"&\")\n .replaceAll(\"\\\\%3D\", \"=\")\n .replaceAll(\"\\\\%27\", \"'\")\n .replaceAll(\"\\\\%28\", \"(\")\n .replaceAll(\"\\\\%29\", \")\")\n .replaceAll(\"\\\\%20\", \"\\\\+\")\n .replaceAll(\"\\\\%7E\", \"~\");\n return finalUrl;\n }", "private static URL buildURL(List<String> args) throws MalformedURLException {\n\n\t\tfinal String IDList = args.stream().map(id -> id.toString() + \",\").reduce(\"\", String::concat);\n\n\t\treturn new URL(String.format(BASE_URL, IDList));\n\t}", "public String getUrl();", "public String getUrl();", "public String getUrl();", "public String getUrl();", "public URL makeFullUrl(String scrapedString, URL base);", "public StringBuffer getRequestURL() {\n return new StringBuffer(url);\n }", "URI createURI();", "@Nonnull public URL buildURL() throws MalformedURLException {\n installTrustStore();\n \n if (disableNameChecking) {\n final HostnameVerifier allHostsValid = new HostnameVerifier() {\n public boolean verify(final String hostname, final SSLSession session) {\n return true;\n }\n }; \n HttpsURLConnection.setDefaultHostnameVerifier(allHostsValid); \n }\n \n final StringBuilder builder = new StringBuilder(getURL());\n if (getPath() != null) {\n builder.append(getPath());\n }\n\n return new URL(doBuildURL(builder).toString());\n }", "protected abstract String getUrl();", "private String get_url() {\n File file = new File(url);\n return file.getAbsolutePath();\n }", "private String initUrlParameter() {\n StringBuffer url = new StringBuffer();\n url.append(URL).append(initPathParameter());\n return url.toString();\n }", "java.lang.String getBookingURL();", "String createUrl() throws JspException {\n\t\tAssert.state(this.value != null, \"No value set\");\n\t\tHttpServletRequest request = (HttpServletRequest) this.pageContext.getRequest();\n\t\tHttpServletResponse response = (HttpServletResponse) this.pageContext.getResponse();\n\n\t\tStringBuilder url = new StringBuilder();\n\t\tif (this.type == UrlType.CONTEXT_RELATIVE) {\n\t\t\t// add application context to url\n\t\t\tif (this.context == null) {\n\t\t\t\turl.append(request.getContextPath());\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (this.context.endsWith(\"/\")) {\n\t\t\t\t\turl.append(this.context, 0, this.context.length() - 1);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\turl.append(this.context);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (this.type != UrlType.RELATIVE && this.type != UrlType.ABSOLUTE && !this.value.startsWith(\"/\")) {\n\t\t\turl.append('/');\n\t\t}\n\t\turl.append(replaceUriTemplateParams(this.value, this.params, this.templateParams));\n\t\turl.append(createQueryString(this.params, this.templateParams, (url.indexOf(\"?\") == -1)));\n\n\t\tString urlStr = url.toString();\n\t\tif (this.type != UrlType.ABSOLUTE) {\n\t\t\t// Add the session identifier if needed\n\t\t\t// (Do not embed the session identifier in a remote link!)\n\t\t\turlStr = response.encodeURL(urlStr);\n\t\t}\n\n\t\t// HTML and/or JavaScript escape, if demanded.\n\t\turlStr = htmlEscape(urlStr);\n\t\turlStr = (this.javaScriptEscape ? JavaScriptUtils.javaScriptEscape(urlStr) : urlStr);\n\n\t\treturn urlStr;\n\t}", "private static URL buildURL(Calendar calendar) throws MalformedURLException {\r\n\t\tStringBuilder builder = new StringBuilder();\r\n\t\tbuilder.append(\"http://gapi.ereality.ru/events/\");\r\n\t\tbuilder.append(trueFormat.format(calendar.getTime()));\r\n\t\tbuilder.append(\".txt\");\r\n\t\treturn new URL(builder.toString());\r\n\t}", "public String getURL();", "private String getURL() {\n String url = profileLocation.getText().toString();\n if (url == null || url.length() == 0) {\n return url;\n }\n // if it's not the last (which should be \"Raw\") choice, we'll use the prefix\n if (!url.contains(\"://\")) { // if there is no (http|jr):// prefix, we'll assume it's a http://bit.ly/ URL\n url = \"http://bit.ly/\" + url;\n }\n return url;\n }", "@Override\n\tpublic String buildURL(String string) {\n\t\treturn null;\n\t}", "protected static String toExternalForm(PURL u) {\n\n\t// pre-compute length of StringBuffer\n\tint len = u.getProtocol().length() + 1;\n\tif (u.getAuthority() != null && u.getAuthority().length() > 0)\n\t len += 2 + u.getAuthority().length();\n\tif (u.getPath() != null) {\n\t len += u.getPath().length();\n\t}\n\tif (u.getQuery() != null) {\n\t len += 1 + u.getQuery().length();\n\t}\n\tif (u.getRef() != null) \n\t len += 1 + u.getRef().length();\n\n\tStringBuffer result = new StringBuffer(len);\n\tresult.append(u.getProtocol());\n result.append(\":\");\n if (u.getAuthority() != null && u.getAuthority().length() > 0) {\n result.append(\"//\");\n result.append(u.getAuthority());\n }\n if (u.getPath() != null) {\n result.append(u.getPath());\n }\n if (u.getQuery() != null) {\n result.append('?');\n result.append(u.getQuery());\n }\n\tif (u.getRef() != null) {\n\t result.append(\"#\");\n result.append(u.getRef());\n\t}\n\treturn result.toString();\n }", "public abstract String toURLParam();", "public final String getURL(final String id) {\n\t\tString url = \"\";\n\t\turl += \"http://\";\n\t\turl += CONFIGURATION.PENTAHO_IP;\n\t\turl += \":\";\n\t\turl += CONFIGURATION.PENTAHO_PORTNUMBER;\n\t\turl += CONFIGURATION.CDASOLUTION_ADDRESS;\n\t\turl += CONFIGURATION.CDA_METHOD;\n\t\turl += \"?\";\n\t\turl += \"solution=\";\n\t\turl += CONFIGURATION.CDA_SOLUTION;\n\t\turl += \"&\";\n\t\turl += \"path=\";\n\t\turl += CONFIGURATION.CDA_PATH.replace(\"/\", \"%2F\");\n\t\turl += \"&\";\n\t\turl += \"file=\";\n\t\turl += CONFIGURATION.CDA_FILEFULLNAME;\n\t\turl += \"&\";\n\t\turl += \"dataAccessId=\";\n\t\turl += id;\n\t\treturn url;\n\t}", "WebURL createURL()\n {\n String url = getDir().getURL().getString() + \"!/\" + _cmt._rev.getId().getName();\n return WebURL.getURL(url);\n }", "public Uri getUrl() {\n return Uri.parse(urlString);\n }", "java.lang.String getFormUri();", "@Nullable\n public abstract String url();", "public String getURL()\n {\n return getURL(\"http\");\n }", "public String getUri();", "java.net.URL getUrl();", "public abstract String encodeURL(CharSequence url);", "public String toString(boolean encode) {\n StringBuilder url = new StringBuilder();\n boolean addSlash = true;\n\n //Protocol\n url.append(super.getProtocol());\n\n //Media-Type\n if(mediaType != null){\n url.append(mediaType);\n }\n\n //Base64\n if(base64){\n url.append(\";base64\");\n }\n\n //Data\n //# Throw an error if the data is null or empty\n if(data == null || data.isEmpty())\n throw new URLBuildException(\"Data is null or empty. Data must be set to build a data url.\");\n\n String dataPrepared = data;\n\n if(base64)\n dataPrepared = Base64.getEncoder().encodeToString(dataPrepared.getBytes());\n\n if(encode && !base64)\n dataPrepared = encode(dataPrepared);\n\n url.append(\",\").append(dataPrepared);\n\n return url.toString();\n }", "private static String getBaseUrl() {\n StringBuilder url = new StringBuilder();\n url.append(getProtocol());\n url.append(getHost());\n url.append(getPort());\n url.append(getVersion());\n url.append(getService());\n Log.d(TAG, \"url_base: \" + url.toString());\n return url.toString();\n }", "public final static String getFullRequestUrl(final HttpServletRequest req) {\n return req.getRequestURL().toString() + (StringUtils.hasText(req.getQueryString()) ? \"?\"+req.getQueryString() : \"\");\n }", "public String getUrl() {\n return _Web_search.getBaseUrl() + getQuery();\n }", "public abstract String getUrl();", "String makePlanCommunityUrl();", "abstract String getUri();", "public URL getUrl() {\n try {\n StringBuilder completeUrlBuilder = new StringBuilder();\n completeUrlBuilder.append(getBaseEndpointPath());\n completeUrlBuilder.append(path);\n if (requestType == HttpRequest.NetworkOperationType.GET && parameters != null) {\n boolean first = true;\n for (String key : parameters.keySet()) {\n if (first) {\n first = false;\n completeUrlBuilder.append(\"?\");\n } else {\n completeUrlBuilder.append(\"&\");\n }\n completeUrlBuilder.append(key).append(\"=\").append(parameters.get(key));\n }\n }\n return new URL(completeUrlBuilder.toString());\n } catch (MalformedURLException exception) {\n LocalizableLog.error(exception);\n return null;\n }\n }", "URI getUri();", "public java.lang.String getUrl() {\n java.lang.Object ref = url_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n url_ = s;\n }\n return s;\n }\n }", "public java.lang.String getUrl() {\n java.lang.Object ref = url_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n url_ = s;\n }\n return s;\n }\n }", "private String makeServerUrl(){\n\t\tURL url = null;\n\t\t\n\t\t//Make sure we have a valid url\n\t\tString complete = this.preferences.getString(\"server\", \"\");\n\t\ttry {\n\t\t\turl = new URL( complete );\n\t\t} catch( Exception e ) {\n\t\t\tonCreateDialog(DIALOG_INVALID_URL).show();\n\t\t\treturn null;\n\t\t}\n\t\treturn url.toExternalForm();\n\t}", "public java.lang.String getUrl() {\n java.lang.Object ref = url_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n url_ = s;\n }\n return s;\n }\n }", "@java.lang.Override\n public java.lang.String getUrl() {\n java.lang.Object ref = url_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n url_ = s;\n return s;\n }\n }", "public String url() {\n return server.baseUri().toString();\n }", "public java.lang.String getUrl() {\n java.lang.Object ref = url_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n url_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getUrl() {\n java.lang.Object ref = url_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n url_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "protected String toExternalForm(URL paramURL) {\n/* 483 */ int i = paramURL.getProtocol().length() + 1;\n/* 484 */ if (paramURL.getAuthority() != null && paramURL.getAuthority().length() > 0)\n/* 485 */ i += 2 + paramURL.getAuthority().length(); \n/* 486 */ if (paramURL.getPath() != null) {\n/* 487 */ i += paramURL.getPath().length();\n/* */ }\n/* 489 */ if (paramURL.getQuery() != null) {\n/* 490 */ i += 1 + paramURL.getQuery().length();\n/* */ }\n/* 492 */ if (paramURL.getRef() != null) {\n/* 493 */ i += 1 + paramURL.getRef().length();\n/* */ }\n/* 495 */ StringBuffer stringBuffer = new StringBuffer(i);\n/* 496 */ stringBuffer.append(paramURL.getProtocol());\n/* 497 */ stringBuffer.append(\":\");\n/* 498 */ if (paramURL.getAuthority() != null && paramURL.getAuthority().length() > 0) {\n/* 499 */ stringBuffer.append(\"//\");\n/* 500 */ stringBuffer.append(paramURL.getAuthority());\n/* */ } \n/* 502 */ if (paramURL.getPath() != null) {\n/* 503 */ stringBuffer.append(paramURL.getPath());\n/* */ }\n/* 505 */ if (paramURL.getQuery() != null) {\n/* 506 */ stringBuffer.append('?');\n/* 507 */ stringBuffer.append(paramURL.getQuery());\n/* */ } \n/* 509 */ if (paramURL.getRef() != null) {\n/* 510 */ stringBuffer.append(\"#\");\n/* 511 */ stringBuffer.append(paramURL.getRef());\n/* */ } \n/* 513 */ return stringBuffer.toString();\n/* */ }", "private static String buildUrlString(String base, Map<String, String> params) {\n if (params == null || params.isEmpty()) return API_URL + base;\n //construct get parameters list\n StringBuilder get = new StringBuilder();\n boolean first = true;\n for (String param : params.keySet()) {\n if (!first) get.append('&'); else first = false;\n //add the parameter\n get.append(param);\n String value = params.get(param);\n if (value != null) {\n get.append('=');\n get.append(value);\n }\n }\n //return the full string\n if (get.length() == 0) return API_URL + base;\n return API_URL + base + \"?\" + get.toString();\n }", "public abstract String getURL();", "String getServerUrl();", "public String getUrl() {\n Object ref = url_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n url_ = s;\n }\n return s;\n }\n }", "public abstract String toUrl(Object inNode);", "private String buildURL(String[] components) {\n\t\tfinal String BASE_URL = \"http://www.campusdish.com/en-US/CSMA/WilliamMary/Menus/\";\n\t\tfinal String ORG_ID = \"&OrgID=231624\";\n\t\tfinal String STATIC_PARAMS = \"&ShowPrice=False&ShowNutrition=True\";\n\t\t\n\t\tHashMap<String, String> location_map = new HashMap<String, String>();\n\t\tHashMap<String, Integer> time_map = new HashMap<String, Integer>();\n\t\t\n\t\tlocation_map.put(\"Sadler\", \"SadlerCenterRFoC.htm?LocationName=Sadler%20Center%20RFoC\");\n\t\tlocation_map.put(\"Commons\", \"CommonsFreshFoodCompany.htm?LocationName=Commons%20Fresh%20Food%20Company\");\n\t\tlocation_map.put(\"Marketplace\", \"Marketplace.htm?LocationName=Marketplace\");\n\t\ttime_map.put(\"Breakfast\", 1);\n\t\ttime_map.put(\"Lunch\", 16);\n\t\ttime_map.put(\"Dinner\", 17);\n\t\t\t\n\t\treturn BASE_URL + location_map.get(components[0]) + ORG_ID + \"&Date=\" + components[1] + \"&MealID=\" + time_map.get(components[2]) + STATIC_PARAMS;\n\t}", "public String createQueryString() {\r\n\t\tStringBuffer sb = new StringBuffer();\r\n\r\n\t\tSet<Map.Entry<String, Object>> set = queryParams.entrySet();\r\n\t\tEnumeration<Map.Entry<String, Object>> en = Collections.enumeration(set);\r\n\t\ttry\r\n\t\t{\r\n\t\t\twhile (en.hasMoreElements())\r\n\t\t\t{\r\n\t\t\t\tMap.Entry<String, Object> entry = en.nextElement();\r\n\t\t\t\tString key = entry.getKey();\r\n\t\t\t\tObject val = entry.getValue();\r\n\t\t\t\tif (val instanceof String)\r\n\t\t\t\t{\r\n\t\t\t\t\tString s = null;\r\n\t\t\t\t\ts = (String) val;\r\n\t\t\t\t\ts = URLEncoder.encode(s, \"US-ASCII\");\r\n\t\t\t\t\tsb.append(\"&\").append(key).append(\"=\").append(s);\r\n\t\t\t\t}\r\n\t\t\t\telse if (val instanceof String[])\r\n\t\t\t\t\tsb.append(\"&\").append(getNameValueString(key, (String[]) val));\r\n\t\t\t}\r\n\t\t} catch (UnsupportedEncodingException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tthrow new RuntimeException(e);\r\n\t\t}\r\n\r\n\t\treturn sb.substring(1);\r\n\t}", "Uri mo1686a();", "URL toURL() throws IOException;", "public static String formulateQueryURL(String keyphrase) {\n StringBuilder query = new StringBuilder();\n query.append(mBaseRequestURL);\n query.append(\"\\\"\" + keyphrase + \"\\\"\");\n\n return query.toString();\n }", "public String toString() {\n return getURLString();\n }", "public String toString()\n {\n return url.toString();\n }", "@Override\n public String encodeUrl(String arg0) {\n return null;\n }", "public java.lang.String getUrl() {\n java.lang.Object ref = url_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n url_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getUrl() {\n java.lang.Object ref = url_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n url_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getURL() {\r\n\t\treturn dURL.toString();\r\n\t}" ]
[ "0.71697545", "0.6968472", "0.6960241", "0.6926229", "0.69224", "0.69224", "0.69224", "0.69224", "0.69224", "0.69224", "0.6791271", "0.6756164", "0.6756164", "0.6756164", "0.6756164", "0.6756164", "0.67511874", "0.67511874", "0.6654882", "0.6623269", "0.65963835", "0.6589046", "0.6576366", "0.6510427", "0.6467166", "0.6464849", "0.646047", "0.64389193", "0.643781", "0.6429034", "0.64029", "0.6371956", "0.6367266", "0.6367266", "0.6367266", "0.6347399", "0.63435733", "0.6329425", "0.62920076", "0.62920076", "0.62920076", "0.62920076", "0.6274058", "0.6256361", "0.62540656", "0.6247585", "0.62452406", "0.62087405", "0.6201466", "0.61810803", "0.6180805", "0.6180227", "0.61727023", "0.6166532", "0.6138076", "0.61124617", "0.61031616", "0.60921645", "0.6090325", "0.6089866", "0.6086628", "0.6072647", "0.60607666", "0.6057013", "0.60546035", "0.60519445", "0.60468286", "0.60461926", "0.60391086", "0.6027177", "0.60206926", "0.60204494", "0.6011335", "0.6001259", "0.59902084", "0.5985169", "0.5985169", "0.59781", "0.5972487", "0.5970973", "0.59596246", "0.59591943", "0.59591943", "0.59569293", "0.59531844", "0.5950314", "0.5947767", "0.592584", "0.59206057", "0.59128356", "0.5911966", "0.59008425", "0.58912927", "0.5889171", "0.5886983", "0.587879", "0.5875529", "0.5868889", "0.5868889", "0.58621764" ]
0.6037902
69
Return a list/Array of text strings from a webpage inside tag "filter"
public static List<String> getLinks(String url, NodeFilter filter) throws ParserException { Parser parser = getParser(url); NodeList list = new NodeList(); for (NodeIterator e = parser.elements(); e.hasMoreNodes();) { list.add(getNodes(e.nextNode(), filter)); } List<String> strings = new ArrayList<String>(); for (NodeIterator i = list.elements(); i.hasMoreNodes();) { Node n = i.nextNode(); if (n instanceof LinkTag) { // text String link = ((LinkTag) n).extractLink(); if (!strings.contains(link)) { strings.add(((LinkTag) n).extractLink()); } } } return strings; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static List<String> HTMLStrings(String url, String filter) throws ParserException\n\t{\n\t\tList<String> strings = new ArrayList<String>();\n\t\tParser parser = getParser(url);\n\t\tfor (NodeIterator i = parser.elements(); i.hasMoreNodes();)\n\t\t{\n\t\t\tstrings.addAll(getText(i.nextNode(), filter.toUpperCase()));\n\t\t}\n\t\treturn strings;\n\t}", "private static List<String> getText(Node n, String filter) throws ParserException\n\t{\n\t\tList<String> strArray = new ArrayList<String>();\n\t\tString parentTag = \"\";\n\t\tTagNode parent = (TagNode) n.getParent();\n\t\tif (parent != null)\n\t\t{\n\t\t\tparentTag = parent.getTagName();\n\t\t}\n\t\tif (n instanceof TextNode)\n\t\t{ // text\n\t\t\tTextNode tn = (TextNode) n;\n\t\t\tSystem.out.println(parentTag + \":\" + tn.getText().trim());\n\t\t\tSystem.out.println(((TagNode) n).getTagName());\n\t\t\tif (filter.equals(\"\") || filter.equalsIgnoreCase(parentTag))\n\t\t\t{\n\t\t\t\tString text = tn.getText().trim();\n\t\t\t\ttext = text.replace(\"&nbsp;\", \" \"); // remove non-breaking spaces\n\t\t\t\tif (text.length() > 0 && !text.matches(\"\\\\s+\"))\n\t\t\t\t{\n\t\t\t\t\tstrArray.add(text);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{ // a tag or remark\n\t\t\tNodeList nl = n.getChildren();\n\t\t\tif (null != nl)\n\t\t\t{\n\t\t\t\tfor (NodeIterator ni = nl.elements(); ni.hasMoreNodes();)\n\t\t\t\t{\n\t\t\t\t\tstrArray.addAll(getText(ni.nextNode(), filter));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn strArray;\n\t}", "public static String HTMLText(String url, String filter) throws ParserException\n\t{\n\t\tString text = \"\";\n\t\tList<String> sList;\n\t\tParser parser = getParser(url);\n\t\tfor (NodeIterator i = parser.elements(); i.hasMoreNodes();)\n\t\t{\n\t\t\tsList = getText(i.nextNode(), filter.toUpperCase());\n\t\t\tIterator<String> it = sList.iterator();\n\t\t\twhile (it.hasNext())\n\t\t\t{\n\t\t\t\ttext = text + \" \" + it.next();\n\t\t\t}\n\t\t}\n\t\treturn text;\n\t}", "<E extends CtElement> List<E> getElements(Filter<E> filter);", "public static String HTMLLinkString(String url, String filter) throws Exception\n\t{\n\t\tURL[] links = HTMLLinks(url);\n\t\tString urls = \"\";\n\t\tfor (URL link : links)\n\t\t{\n\t\t\tString slink = link.toString();\n\t\t\tif (slink.contains(filter))\n\t\t\t{\n\t\t\t\turls = urls + slink + \" \";\n\t\t\t}\n\t\t}\n\t\treturn urls.trim();\n\t}", "@DISPID(-2147417077)\n @PropGet\n ms.html.IHTMLFiltersCollection filters();", "@GET\n @Path(\"/filter\")\n @Produces(\"text/plain\")\n public String getFilterWordList() throws JsonProcessingException {\n ObjectMapper mapper = new ObjectMapper();\n return mapper.writeValueAsString(FilterImpl.getList());\n }", "private Set<String> extracLinks(String url, LinkFilter filter) {\n\n\t\tSet<String> links = new HashSet<String>();\n\t\ttry {\n\t\t\tParser parser = new Parser(url);\n\t\t\tparser.setEncoding(\"UTF-8\");\n\t\t\t// linkFilter filter <a> tag\n\t\t\tNodeClassFilter linkFilter = new NodeClassFilter(LinkTag.class);\n\t\t\t// get all filtered links\n\t\t\tNodeList list = parser.extractAllNodesThatMatch(linkFilter);\n\t\t\tfor (int i = 0; i < list.size(); i++) {\n\t\t\t\tNode tag = list.elementAt(i);\n\t\t\t\tif (tag instanceof LinkTag)// <a> tag\n\t\t\t\t{\n\t\t\t\t\tLinkTag link = (LinkTag) tag;\n\t\t\t\t\tString linkUrl = link.getLink();// url\n\t\t\t\t\tif (filter.accept(linkUrl)) {\n\t\t\t\t\t\t// change bbsdoc to bbstdoc\n\t\t\t\t\t\tString stlink = linkUrl.replace(\"bbsdoc\", \"bbstdoc\");\n\t\t\t\t\t\tlinks.add(stlink);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (ParserException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn links;\n\t}", "public final List<String> getText() {\n ArrayList<String> al = new ArrayList<String>();\n for (Iterator<Element> i = texts.iterator(); i.hasNext();) {\n al.add(i.next().getTextContent());\n }\n return al;\n }", "List<String> getFilters();", "public static String[] evaluateContentAsStringArray(final Document doc, final String xpathQuery, String separator, String filter) throws XPathExpressionException{\n\t\t\n\t\txpath.setNamespaceContext(new DefaultNamespaceContextResolver(doc));\n\t\t\n\t\t// aggiunta dei criteri per filtrare i risultati delle query xpath\n\t\tString query = (filter!=null && !filter.equalsIgnoreCase(\"\")) ? String.format(\"%s[%s]\", xpathQuery, filter) : xpathQuery;\n\t\t\n\t\tfinal NodeList elements = (NodeList) xpath.evaluate(query, doc, XPathConstants.NODESET);\n\t\tfinal ArrayList<String> list = new ArrayList<String>();\n\t\tfor(int i=0; i<elements.getLength();i++){\n\t\t\tNode node = elements.item(i);\n\t\t\t\n\t\t\tif(node==null) continue;\n\t\t\tStringBuffer sb = new StringBuffer();\n\t\t\tNodeList testi = (NodeList) xpath.evaluate(\".//*|.//following-sibling::text()\", node, XPathConstants.NODESET);\n\t\t\t\n\t\t\tboolean hasSeparator = false; \n\t\t\tfor(int j=0; j<testi.getLength();j++){\n\t\t\t\tNode item = testi.item(j);\n\n\t\t\t\tString testo;\n\t\t\t\tif(item.getNodeType()==Node.TEXT_NODE){\n\t\t\t\t\tText text = (Text) item;\n\t\t\t\t\ttesto = text.getNodeValue();\n\t\t\t\t}else{\n\t\t\t\t\t testo = xpath.evaluate(\"normalize-space(./text())\", item).trim();\n\t\t\t\t}\n\t\t\t\tif((!testo.trim().equals(\"\")) && (testo!=null)){\n\t\t\t\t\tif(hasSeparator) sb.append(separator);\n\t\t\t\t\tsb.append(testo);\n\t\t\t\t\thasSeparator = true;\n\t\t\t\t}else{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\tsb.trimToSize();\n\t\t\tlist.add(sb.toString());\n\t\t}\n\t\treturn list.toArray(new String[list.size()]);\n\t}", "String getFilter();", "public ArrayList<String> getStringListFromHtmlText(@NotNull String htmlText, @NotNull String startTag, @NotNull String endTag) {\n final ArrayList<String> list = new ArrayList<>();\n try {\n String completeRegex = startTag + \"(.+?)\" + endTag;\n Pattern TAG_REGEX = Pattern.compile(completeRegex, Pattern.DOTALL);\n final Matcher matcher = TAG_REGEX.matcher(htmlText);\n while (matcher.find()) {\n list.add(matcher.group(1));\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return list;\n }", "public ArrayList<String> soupThatSite(String url) throws IOException {\n\n ArrayList<String> parsedDoc = new ArrayList<>();\n Document doc = Jsoup.connect(url).get();\n\n if (url.contains(\"cnn.com\")) {\n\n doc.select(\"h1\").stream().filter(Element::hasText).forEach(element1 -> {\n String str = element1.text();\n String clean = Jsoup.clean(str, Whitelist.basic());\n parsedDoc.add(clean);\n });\n\n doc.select(\".zn-body__paragraph\").stream().filter(Element::hasText).forEach(element1 -> {\n String str = element1.text();\n String clean = Jsoup.clean(str, Whitelist.basic());\n parsedDoc.add(clean);\n });\n\n } else {\n\n doc.select(\"h1\").stream().filter(Element::hasText).forEach(element1 -> {\n String str = element1.text();\n String clean = Jsoup.clean(str, Whitelist.basic());\n parsedDoc.add(clean);\n });\n\n doc.select(\"p\").stream().filter(Element::hasText).forEach(element -> {\n String str = element.text();\n String clean = Jsoup.clean(str, Whitelist.basic());\n parsedDoc.add(clean);\n });\n }\n\n return parsedDoc;\n }", "@DISPID(5) //= 0x5. The runtime will prefer the VTID if present\n @VTID(11)\n java.lang.String getFilterText();", "@Test\n\tpublic void stringFilterTest(){\n\t\t\n\t\tList<IElement> result = filter.process(elements);\n\t\t\n\t\tAssert.assertNotNull(\"The result of filter is null!\",result);\n\t\tAssert.assertEquals(\"More results than expected, filter execution fail.\",\n\t\t\t\texpectedResultNum.intValue(),result.size());\n\t\t\n\t\t\n\t}", "public String[] parseSrc()\n {\n String [] values;\n\n String src = driver.getPageSource();\n int begin = src.indexOf(\"496px;\\\"><\") + 8;\n int endScope = src.indexOf(\"id=\\\"dialog\\\"\");\n src = src.substring(begin, endScope);\n int end = src.indexOf(\"</span></div>\");\n src = src.substring(0, end);\n\n values = src.split(\"</span>\");\n\n return values;\n }", "java.lang.String getFilter();", "public String getFilter();", "public void filterList(String text) {\n filter.filter(text);\n }", "public static List<String> getElementsText(List<WebElement> list){\n List<String> elementTexts = new ArrayList<>();\n for (WebElement el : list ){\n elementTexts.add(el.getText());\n }\n return elementTexts;\n }", "@Override\n public List runFilter(String filter) {\n return runFilter(\"\", filter);\n }", "List<List<String>> getFilters(String resource);", "public String[] list(String text, String von, String bis) throws RemoteException;", "public List<String> getSearchResults() {\n List<String> searchResultsStringList = new ArrayList<>();\n for (WebElement searchResult : searchResultsList){\n String searchResultText = searchResult.getText();\n searchResultsStringList.add(searchResultText);\n }\n return searchResultsStringList;\n }", "public ArrayList<String> getTags(String url) {\n // Use hashset to remove duplicates\n Collection<String> tags = new HashSet<>();\n try {\n String page = connectAndGetPage(url);\n Pattern p = Pattern.compile(\"<[^>]*>\");\n Matcher m = p.matcher(page);\n while (m.find()) {\n // Get match and add to hashset if not a comment or closing tag.\n String match = m.group(0);\n String characterAfterStart = String.valueOf(match.charAt(1));\n if (!characterAfterStart.equals(\"/\") && !characterAfterStart.equals(\"!\")) {\n tags.add(match.trim());\n }\n }\n } catch (IOException e) {\n System.out.println(\"IOException\");\n }\n return sortTags(tags);\n\n }", "public static ArrayList<Node> getFacets(Element sourceElement, boolean returnTextNode) {\r\n ArrayList<Node> facets = new ArrayList<Node>();\r\n NodeList children = sourceElement.getChildNodes();\r\n for (int i = 0; i < children.getLength(); i++) {\r\n Node node = children.item(i);\r\n if (node instanceof Element && \"f:facet\".equals(node.getNodeName())) { //$NON-NLS-1$\r\n Element element = (Element) node;\r\n NodeList childNodes = element.getChildNodes();\r\n Text textNode = null;\r\n for (int j = 0; j < childNodes.getLength(); j++) {\r\n Node child = childNodes.item(j);\r\n if (child instanceof Element) {\r\n facets.add(child);\r\n break;\r\n } else if (child instanceof Text) {\r\n textNode = (Text) child;\r\n }\r\n }\r\n if (returnTextNode && facets.isEmpty()) {\r\n facets.add(textNode);\r\n }\r\n }\r\n }\r\n return facets;\r\n }", "@Override\n public ArrayList<String> fetchData(String html) {\n ArrayList<String> data = new ArrayList<>();\n// Document document = Jsoup.parse(html);\n// Element content = document.selectFirst(\"div\").child(1).child(1).child(2);\n// data.add(content.selectFirst(\"h3\").text());\n// data.add(content.selectFirst(\"em\").text());\n// data.add(content.selectFirst(\"h4\").nextElementSibling().nextElementSibling().text());\n// try {\n// data.add(content.select(\"h4\").get(1).nextElementSibling().nextElementSibling().text());\n// }\n// catch (Exception ex) {}\n return data;\n }", "String filter(String value);", "public List<String> getTexts(List<WebElement> webElementList) {\n if (webElementList.isEmpty()) {\n logger.error(\"Error: no elements in the input list. Can not be converted to List<String>\");\n return null;\n }\n ArrayList<String> stringArrayList = new ArrayList<String>();\n for (WebElement wE :webElementList) {\n stringArrayList.add(wE.getText());\n }\n return stringArrayList;\n }", "@SuppressWarnings({ \"rawtypes\", \"unchecked\" })\n\tpublic Vector getFilteredList(String text) {\n\t\tVector v = new Vector();\n\n\t\tif (text.length() > 2) {\n\t\t\tFuncaoDAOImpl funcaoDao = new FuncaoDAOImpl();\n\t\t\tList<Funcao> lista = funcaoDao.getListByStrDescriptor(text);\n\t\t\tfor (Funcao funcao : lista) {\n\t\t\t\tv.add(funcao.getStrFuncaoVerbo() + \" \"\n\t\t\t\t\t\t+ funcao.getStrFuncaoObjeto());\n\t\t\t}\n\t\t}\n\n\t\treturn v;\n\t}", "private List<Elements> extractHTMLInfo(String url) throws IOException {\r\n\r\n //All required info to be collected is within the <section> tag\r\n Element sectionTag = Jsoup.connect(url).get().select(\"section\").get(0);\r\n\r\n List<Elements> list = new ArrayList();\r\n\r\n //Banner img Tag\r\n list.add(sectionTag.select(\"img\"));\r\n\r\n //TimeTag\r\n list.add(sectionTag.select(\"header\").select(\"time\"));\r\n\r\n //Article Title\r\n list.add(sectionTag.select(\"header\").select(\"h2 a\"));\r\n\r\n //Author\r\n list.add(sectionTag.select(\"header\").select(\"p a\"));\r\n\r\n //Content Body HTML\r\n list.add(sectionTag.select(\"article\").select(\"div\"));\r\n\r\n return list;\r\n }", "public static String filter(String text)\n { StringBuffer buffer = new StringBuffer();\n for (int i=0; i<text.length(); i++)\n { char c = text.charAt(i);\n if (c == '<') buffer.append(\"&lt;\");\n else if (c == '>') buffer.append(\"&gt;\");\n else if (c == '\"') buffer.append(\"quot;\");\n else if (c == '&') buffer.append(\"amp;\");\n else buffer.append(c);\n }\n return buffer.toString();\n }", "public List<String> Description() {\n XPathFactory xpath = XPathFactory.instance();\n XPathExpression<Element> expr = xpath.compile(\"//item/description\", Filters.element());\n List<Element> news = expr.evaluate(this.data);\n List<String> description = new ArrayList<String>();\n news.forEach(post -> description.add(post.getValue().trim()));\n return description;\n }", "public List<String> getFileFilters() {\n/* 420 */ List<String> retval = null;\n/* 421 */ COSBase filters = this.stream.getDictionaryObject(COSName.F_FILTER);\n/* 422 */ if (filters instanceof COSName) {\n/* */ \n/* 424 */ COSName name = (COSName)filters;\n/* 425 */ retval = new COSArrayList<String>(name.getName(), (COSBase)name, (COSDictionary)this.stream, COSName.F_FILTER);\n/* */ \n/* */ }\n/* 428 */ else if (filters instanceof COSArray) {\n/* */ \n/* */ \n/* 431 */ retval = COSArrayList.convertCOSNameCOSArrayToList((COSArray)filters);\n/* */ } \n/* 433 */ return retval;\n/* */ }", "List<String> getActiveFilters();", "public static Set<String> parser(String html){\r\n\r\n\t\tSet<String> urls = new HashSet<String>();\r\n\t\tString regex = \"<a.*?/a>\";\r\n\t\tPattern pt = Pattern.compile(regex);\r\n\t\tMatcher matcher = pt.matcher(html);\r\n\t\twhile(matcher.find()){\r\n\t\t\t//获取网址\r\n//\t\t\tSystem.out.println(\"Group:\"+matcher.group());\r\n\t\t\tMatcher myurl = Pattern.compile(\"href=\\\".*?\\\">\").matcher(matcher.group());\r\n\t\t\tif(myurl.find()){\r\n\t\t\t\tdo{\r\n\t\t\t\t\tString temp = myurl.group();\r\n\t\t\t\t\tif(!temp.startsWith(\"javascript\") && !temp.startsWith(\"/\") && ! temp.startsWith(\"#\")){\r\n\t\t\t\t\t\tString url = myurl.group().replaceAll(\"href=\\\"|\\\">\",\"\");\r\n\t\t\t\t\t\tif(url.contains(\"http\")){\r\n\t\t\t\t\t\t\tif(url.contains(\"\\\"\")){\r\n\t\t\t\t\t\t\t\turl = url.substring(0, url.indexOf(\"\\\"\"));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif(!url.contains(\"$\") && !url.contains(\" \")){\r\n\t\t\t\t\t\t\t\turls.add(url);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}while(myurl.find());\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn urls;\r\n\t}", "private static NodeList getNodes(Node n, NodeFilter filter) throws ParserException\n\t{\n\t\tNodeList list = new NodeList();\n\t\tn.collectInto(list, filter);\n\t\tNodeList c = n.getChildren();\n\t\tif (null != c)\n\t\t{\n\t\t\tfor (NodeIterator e = c.elements(); e.hasMoreNodes();)\n\t\t\t{\n\t\t\t\te.nextNode().collectInto(list, filter);\n\t\t\t}\n\t\t}\n\t\treturn list;\n\t}", "public ArrayList<String> findLinks(Text value) throws CharacterCodingException{\n\t\tint start = value.find(\"<text\");\n\t\tstart = value.find(\">\", start);\n\t\tint end = value.find(\"</text>\", start);\n\t\t//start+=1;\n\t\tString textBlock=new String();\n\t\ttry{\n\t\tif(end < value.getLength())\n\t\t\ttextBlock = Text.decode(value.getBytes(), start, end-start);\n\t\telse\n\t\t\ttextBlock = Text.decode(value.getBytes(), start, value.getLength()-start);\n\t\t} catch(Exception e){\n\t\t\treturn null;\n\t\t}\n\t\tArrayList<String> List = new ArrayList<String>();\n\t\t\n\t\tPattern wikiLinkRegEx = Pattern.compile(\"\\\\[\\\\[(?:[^|\\\\]]*\\\\|)?([^\\\\]]+)\\\\]\\\\]\");\n\t\tMatcher patternMatcher = wikiLinkRegEx.matcher(textBlock);\n\t\twhile(patternMatcher.find()) {\n\t\t\tint flag=0;\n\t\t\tint startIndex = patternMatcher.start();\n\t\t\tint endIndex = patternMatcher.end();\n\t\t\tString wikiLink = textBlock.substring(startIndex+2, endIndex-2);\n\t\t\twikiLink = wikiLink.replace(\" \", \"_\");\n\n\t\t\t//Checking for the occurrence of '|'\n\t\t\tif(wikiLink.contains(\"|\")){\n\t\t\t\tint pipeIndex = wikiLink.indexOf(\"|\");\n\t\t\t\twikiLink = wikiLink.substring(0, pipeIndex);\n\t\t\t}\n\t\t\t\n\t\t\t//Flagging all the invalid WikiLinks \n\t\t\t//if(wikiLink.contains(\":\") || wikiLink.contains(\"#\") || wikiLink.contains(\"/\") ){\n\t\t\t//\tflag=1;\n\t\t\t//}\n\t\t\t\n\t\t\t// Add the valid WikiLinks in the List\n\t\t\tif(flag==0){\n\t\t\t\twikiLink = wikiLink.replace(\"&amp;\", \"&\");\n\t\t\t\tList.add(wikiLink);\n\t\t\t}\n\t }\n\t\treturn List;\n\t}", "public List<String> getStyleTagsForText(String requirementId, String text){\n\t\tList<String> tags = new ArrayList<String>();\n\t\t\n\t\tWebElement p = driver.findElement(By.xpath(\"//div[starts-with(@id,'WikiPageContent\"+requirementId+\"') and contains(@class,'wysiwyg')]//*[contains(.,'\"+text+\"')]\"));\n\t\tString tag = p.getTagName();\n\t\twhile (!tag.equals(\"p\")) {\n\t\t\t tags.add(tag);\n\t p=p.findElement(By.xpath(\"./..\"));\n\t tag = p.getTagName();\n\t\t}\n\t\treturn tags;\n\t}", "java.util.List<java.lang.String> getAnnotationFiltersList();", "@Nullable\n public static Elements getContentsList(String contentHtml) {\n Document document = Jsoup.parse(contentHtml);\n Elements elements = document.select(\".widget-progress-enabled\");\n Elements contents = new Elements();\n contents.add(elements.first());\n contents.addAll(elements.get(1).select(\"li\"));\n return contents;\n }", "public List<COSName> getFilters() {\n/* 312 */ List<COSName> retval = null;\n/* 313 */ COSBase filters = this.stream.getFilters();\n/* 314 */ if (filters instanceof COSName) {\n/* */ \n/* 316 */ COSName name = (COSName)filters;\n/* 317 */ retval = new COSArrayList<COSName>(name, (COSBase)name, (COSDictionary)this.stream, COSName.FILTER);\n/* */ }\n/* 319 */ else if (filters instanceof COSArray) {\n/* */ \n/* 321 */ retval = ((COSArray)filters).toList();\n/* */ } \n/* 323 */ return retval;\n/* */ }", "FilterResults performFiltering(CharSequence charSequence) { // Aplicamos el filtro\n String charString = charSequence.toString(); // String con el filtro\n if (charString.isEmpty()) { // Si esta vacio\n filteredSites = allSites; // No hay filtro y se muestran todas las instalaciones\n } else { // Si no\n ArrayList<ULLSiteSerializable> auxFilteredList = new ArrayList<>();\n for (ULLSiteSerializable site : allSites) { // Para todas las instalaciones \n // Se comprueba si el nombre la filtro coincide con la instalacion\n if (site.getName().toLowerCase().contains(charString.toLowerCase())) \n auxFilteredList.add(site); // Si coincide se agregan a la lista\n // auxiliar\n }\n filteredSites = auxFilteredList; // La lista auxiliar es igual a la de \n } // las instalaciones filtradas a mostrar\n FilterResults filterResults = new FilterResults();\n filterResults.values = filteredSites;\n return filterResults; // Se devuelve el resultado del filtro\n }", "private static Set<String> scrapeHTML(String html) {\n\t\tSet<String> set = new HashSet<String>();\n\t\tint skipLength = 0;\n\t\tint counter = 0;\n\t\t// the subtraction of 15 is because of the number of characters in \n\t\t// \"<a href=\\\"/wiki/\", to avoid a index out of bounds error\n\t\tfor(int i = 0; i < html.length()-15; i++) {\n\t\t\tif(html.substring(i, i+15).equals(\"<a href=\\\"/wiki/\")) {\n\t\t\t\t// if format matches starts to check the following characters\n\t\t\t\t// to check if it does not contain a : or a #\n\t\t\t\tchar ch = html.charAt(i+15);\n\t\t\t\tString str = \"\";\n\t\t\t\tint count = 0;\n\t\t\t\twhile(html.charAt(i+count+15) != '\"'){\n\t\t\t\t\tif(html.charAt(i+count+15) == ':' || html.charAt(i+count+15) == '#') {\n\t\t\t\t\t\tstr = \"\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tch = html.charAt(count+i+15);\n\t\t\t\t\tstr += ch;\n\t\t\t\t\tcount++;\n\t\t\t}\n\t\t\t\t// adds if the page name is not empty\n\t\t\t\tif(str != \"\")\n\t\t\t\tset.add(str);\n\t\t\t\tskipLength = str.length();\n\t\t\t\tcount = 0;\n\t\t}\n\t\t\ti += skipLength;\n\t\t\tskipLength = 0;\n\t\t\tcounter++;\n\t\n\t}\n\treturn set;\n}", "private String[] extractTags(HttpServletRequest request)\n throws ServletException, IOException {\n String tagline = request.getParameter(\"tags\").toLowerCase();\n String[] tags = {};\n if (!tagline.isEmpty())\n tags = tagline.split(\" \");\n return tags;\n }", "public Set<String> getFilterTerms() {\n\t\tSet<String> filterTerms = new HashSet<String>();\n\t\tfor(String filters : sessionBean.getFilters()) {\n\t\t\t// split by 0 or more spaces, followed by either 'and','or', comma or more spaces\n\t\t\tString[] filterTermsArray = filters.split(\"\\\\s*(and|or|,)\\\\s*\");\n\t\t\tCollections.addAll(filterTerms, filterTermsArray);\n\t\t}\n\t\treturn filterTerms;\n\t}", "public abstract void filter();", "public List getElements(String kind) {\r\n kind = kind.toLowerCase();\r\n ArrayList result = new ArrayList();\r\n for (int i = 0; i < pageList.size(); i++) {\r\n LetterElement keep = (LetterElement)pageList.get(i);\r\n if (keep.kindOfElement.equals(kind)) {\r\n result.add(keep);\r\n }\r\n }\r\n return result;\r\n }", "public static List<Node> getChildren(Element sourceElement, boolean returnTextNodes) {\r\n ArrayList<Node> children = new ArrayList<Node>();\r\n NodeList nodeList = sourceElement.getChildNodes();\r\n for (int i = 0; i < nodeList.getLength(); i++) {\r\n Node child = nodeList.item(i);\r\n if ((child instanceof Element && !child.getNodeName().equals(\"f:facet\")) //$NON-NLS-1$ \r\n \t\t|| (returnTextNodes && (null != child.getNodeValue()) && (child.getNodeValue().trim().length() > 0))) {\r\n children.add(child);\r\n }\r\n }\r\n return children;\r\n }", "List<WebURL> Filter(List<WebURL> urls){\n return null;\n }", "public static String pagefilter(String content){\n //String p = System.getProperty(\"line.separator\") ; //\\r\\n in windows jp\n\n content = content.replaceAll(\"&\",\"&amp;\"); \n content = content.replaceAll(\"<\",\"&lt;\");\n content = content.replaceAll(\">\",\"&gt;\"); \n content = content.replaceAll(\"\\n\",\"<br/>\");\n content = content.replaceAll(\" \",\"&nbsp;\");\n \n \n return content;\n }", "java.util.List<java.lang.String> getContentsList();", "public static String HTMLLinkString(String root, int level, String filter) throws Exception\n\t{\n\t\tString urls = \"\";\n\t\tif (0 == level)\n\t\t{\n\t\t\treturn urls;\n\t\t}\n\t\turls = HTMLLinkString(root, filter);\n\t\tfor (String u : urls.split(\"\\\\s+\"))\n\t\t{\n\t\t\tif (u.contains(filter))\n\t\t\t{\n\t\t\t\turls = urls + \" \" + HTMLLinkString(u, level - 1, filter);\n\t\t\t}\n\t\t}\n\t\treturn urls.trim();\n\t}", "public String[] retrieveResultStrings(Text[] texts);", "private List<String> getFilteredWords() {\r\n\t\tArrayList<String> filteredWords = new ArrayList<String>(16);\r\n\t\t\r\n\t\tfor (String word : allWords) {\r\n\t\t\tif (matchesFilter(word) == true) {\r\n\t\t\t\tfilteredWords.add(word);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn filteredWords;\r\n\t}", "public String askArrFilter();", "public static void main(String[] args) throws MalformedURLException, IOException{\n TagStripper ts = new TagStripper();\n\n // open an url connection to the specified adress\n URL url = new URL(\"http://sv.wikipedia.org/wiki/Henrik_VIII_av_England\");\n InputStreamReader input = new InputStreamReader(url.openConnection().getInputStream());\n\n // use the tag stripper to strip most of the tags\n String result = ts.stripHTML(input);\n\n //print the result\n System.out.println(result);\n }", "private void filter(String text) {\n ArrayList<ChildItem> filterdNames = new ArrayList<>();\n\n //looping through existing elements\n for (ChildItem s : dataParent ) {\n\n //if the existing elements contains the search input\n if (s.getKode_barang().toLowerCase().contains(text.toLowerCase())) {\n //adding the element to filtered list\n filterdNames.add(s);\n }\n }\n\n //calling a method of the adapter class and passing the filtered list\n adapter.filterList(filterdNames);\n }", "public List<String> getListFromZipCodeElementList(List<WebElement> element);", "private @NotNull List<String> getAllLinks(final String text, final String urlStart) {\n List<String> links = new ArrayList<>();\n\n int i = 0;\n while (text.indexOf(urlStart, i) != -1) {\n int linkStart = text.indexOf(urlStart, i);\n int linkEnd = text.indexOf(\" \", linkStart);\n if (linkEnd != -1) {\n String link = text.substring(linkStart, linkEnd);\n links.add(link);\n } else {\n String link = text.substring(linkStart);\n links.add(link);\n }\n i = text.indexOf(urlStart, i) + urlStart.length();\n }\n\n return links;\n }", "@Override\n\tpublic Collection<URL> getUrlsToFilter() {\n\t\tSet<URL> filterSet = new HashSet<URL>();\n\t\tString url=\"http://www.infoq.com/news/2012/11/Panel-WinRT-Answers;jsessionid=91AB81A159E85692E6F1199644E2053C \";\n\t\tfilterSet.add(URL.valueOf(url));\n\t\treturn filterSet;\n\t}", "private String [] lista(){\n String [] lista=new String[jTFs.length];\n for(int i=0;i<jTFs.length;i++)lista[i]=jTFs[i].getText();\n return lista;\n }", "private static String filterMessage(String message) {\n\t\treturn Jsoup.parse(message).text();\n\t}", "public String getFilter() {\n\t\treturn url.getFilter();\n }", "public ArrayList<String> search(String url) {\n Pattern msnPattern = Pattern.compile(\".*msn.com.*\");\n Pattern foolPattern = Pattern.compile(\".*fool.com.*\");\n Matcher foolMatcher = foolPattern.matcher(url);\n Matcher msnMatcher = msnPattern.matcher(url);\n\n ArrayList<String> stockArticles = new ArrayList<String>();\n if (foolMatcher.matches()) {\n Connection connection = Jsoup.connect(\"https://www.fool.com/market-movers/\");\n try {\n Document htmlDocument = connection.get();\n Elements linksOnPage = htmlDocument.select(\"h4\");\n for (Element link : linksOnPage) {\n stockArticles.add(link.text());\n }\n }\n catch (IOException e) {\n System.out.println(e);\n }\n } else if (msnMatcher.matches()) {\n Connection connection2 = Jsoup.connect(\"http://www.msn.com/en-us/money/investing\");\n try {\n Document htmlDocument2 = connection2.get();\n Elements linksOnPage2 = htmlDocument2.select(\"h3\");\n for (Element link : linksOnPage2) {\n stockArticles.add(link.text());\n }\n }\n catch (IOException e) {\n System.out.println(e);\n }\n } else {\n Connection connection3 = Jsoup.connect(\"https://www.nytimes.com/topic/organization/new-york-stock-exchange\");\n try {\n Document htmlDocument3 = connection3.get();\n Elements linksOnPage3 = htmlDocument3.select(\"h2\");\n for (Element link : linksOnPage3) {\n stockArticles.add(link.text());\n }\n }\n catch (IOException e) {\n System.out.println(e);\n }\n }\n return stockArticles;\n }", "public static List<String> extract(Document document) {\n Elements links = document.select(\"a[href]\");\n Elements media = document.select(\"[src]\");\n Elements imports = document.select(\"link[href]\");\n\n List<String> allLinks = new ArrayList<>();\n populateLinks(allLinks, media, \"abs:src\");\n populateLinks(allLinks, imports, \"abs:href\");\n populateLinks(allLinks, links, \"abs:href\");\n return allLinks;\n }", "ArrayList<Match> getMatchList( Filter filter ) {\n return list;\n }", "private ArrayList<String> parseEarningYears() {\n // Gewinn Jahresangaben\n\n Pattern gewinnJahresPattern = Pattern.compile(\"<table><thead><tr><th>\\\\s*Gewinn\\\\s*((?!</tr>).)*</tr></thead><tbody>\");\n matcher = gewinnJahresPattern.matcher(html);\n ArrayList<String> gewinnJahresArray = new ArrayList<>();\n\n while (matcher.find()) {\n log.info(\"Matches gefunden!\");\n\n log.info(matcher.group(0));\n String jahresOut = matcher.group(0);\n gewinnJahresPattern = Pattern.compile(\"(\\\\s*<th class=\\\"ZAHL\\\">(((?!</).)*)</th>\\\\s*)\");\n matcher = gewinnJahresPattern.matcher(jahresOut);\n while (matcher.find()) {\n log.debug(matcher.group(2));\n gewinnJahresArray.add(matcher.group(2).trim());\n }\n }\n\n log.info(gewinnJahresArray.toString());\n return gewinnJahresArray;\n }", "private static List<String> getWord(String urlname) {\n\t\tList<String> returnWord = new ArrayList<String>();\n\t\tBufferedReader reader;\n\t\ttry {\n\t\t\tURL url = new URL(urlname);\n\t\t\tInputStream in = url.openStream();\n\t\t\treader = new BufferedReader(new InputStreamReader(in));\n\t\t\twhile (true) {\n\t\t\t\tString word = reader.readLine();\n\t\t\t\tif (word == null)\n\t\t\t\t\tbreak;\n\t\t\t\treturnWord.add(word);\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(e.getMessage());\n\t\t}\n\t\treturn returnWord;\n\t}", "public List<String> sourceString() {\n // Processing is done here\n return Arrays.asList(\"tomato\", \"carrot\", \"cabbage\");\n }", "Object[] getElements() {\n\tif (this.results == null) {\n\t\tinitResults();\n\t\tif (this.filterAdvancedScenarios != null) {\n\t\t\tthis.results.setFingerprints(this.filterAdvancedScenarios.isChecked());\n\t\t}\n\t}\n\treturn this.results.getElements();\n}", "public static String[] filter(String[] args)\n {\n ArrayList<String> output = new ArrayList<String>();\n\n for (String s : args)\n {\n if (s != null)\n {\n output.add(s);\n }\n }\n\n return output.toArray(new String[output.size()]);\n }", "private List<String> extractFeatures() {\n List<String> result = new ArrayList<String>();\n\n int startPoint = -1;\n\n List<TextPosition> featureItem;\n for (int i = 0; i < infoBlock.size(); i++) {\n // To get index of the text in the information block, if the text does not exist, the index will be -1.\n int index = CommonUtils.collectTextBuffer(infoBlock.get(i)).indexOf(FEATURE_KEY);\n if (index != -1) {\n startPoint = i + 1;\n\n // To locate the PDF object from the text feature to the end of the information block.\n featureItem = infoBlock.get(i).subList(index, index + FEATURE_KEY.length());\n\n // To extract information vertically. startPoint now is where the information block next to the\n // one that contains text feature.\n if (startPoint != -1) {\n result = filterTextBuffersVerical(featureItem, infoBlock, startPoint, 10);\n/*\t\t\t\t\t\tfor(String item: result)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tSystem.out.println(item);\n\t\t\t\t\t\t}*/\n }\n\n break;\n }\n }\n\n return result;\n }", "public List getTags();", "private List<EObject> getElements(ISelector s) {\n\t\tList<EObject> result = new ArrayList<EObject>();\n\t\t\n\t\tfor (EObject next : charStartMap.keySet()) {\n\t\t\tint start = charStartMap.get(next);\n\t\t\tint end = charEndMap.get(next);\n\t\t\tif (s.accept(start, end)) {\n\t\t\t\tresult.add(next);\n\t\t\t}\n\t\t}\n\t\tCollections.sort(result, new Comparator<EObject>() {\n\t\t\tpublic int compare(EObject objectA, EObject objectB) {\n\t\t\t\tint lengthA = getCharEnd(objectA) - getCharStart(objectA);\n\t\t\t\tint lengthB = getCharEnd(objectB) - getCharStart(objectB);\n\t\t\t\treturn lengthA - lengthB;\n\t\t\t}\n\t\t});\n\t\treturn result;\n\t}", "private String filterScriptMarkup(HttpServletRequest request, HttpServletResponse response, CMAbstractCode code) {\n //construct xmlFilters to strip RichText from <div> and <p> tags\n Markup unfilteredCode = code.getCode();\n List<XMLFilter> filters = new ArrayList<>();\n filters.addAll(xmlFilterFactory.createFilters(request, response, unfilteredCode, \"script\"));\n filters.add(new ScriptFilter());\n\n //strip <div> and <p> from markup\n StringWriter writer = new StringWriter();\n ScriptSerializer handler = new ScriptSerializer(writer);\n unfilteredCode.writeOn(filters, handler);\n return writer.getBuffer().toString();\n }", "@Test\n public void regularExpressionTest() throws Exception {\n /* Navigate to the Challenging Dom section */\n driver.findElement(By.xpath(\"//*[@id=\\\"content\\\"]/ul/li[4]/a\")).click();\n\n /* Using the standard devtools */\n ArrayList<WebElement> ItemsListStandard = new ArrayList<>();\n for(int i=1; i<11 ; i++){\n ItemsListStandard.add(driver.findElement(By.xpath(\"//*[@id='content']/div/div/div/div[2]/table/tbody/tr[\"+i+\"]/td[4]\")));\n }\n\n /* Using the selenium OIC and the regular expressions */\n ArrayList<WebElement> ItemsListWithRegEx = new ArrayList<>();\n ItemsListWithRegEx.addAll(driver.findElements(By.visibleText(Pattern.compile(\"^Definiebas*\"))));\n\n /* Check results */\n System.out.println(\"size of ItemsListStandard \" + ItemsListStandard.size());\n System.out.println(\"size of ItemsListWithRegEx \" + ItemsListWithRegEx.size());\n\n /* This test demonstrates the by visible text value combined with regular expression power :\n * Enhance Readability (easy to see what is tested)\n * Enhance code writing ease\n * Enhance Maintainability (the xpath is not used n times as it is in the for loop)\n * */\n\n }", "public String[] getTags(IEntry entry);", "private static List<String> getAllMatches(final String page, final String pattern, final int group)\n {\n if (page == null || page.length() == 0)\n {\n return Collections.emptyList();\n }\n\n final List<String> trimmedMatches = new ArrayList<String>();\n final List<String> matches = RegExUtils.getAllMatches(page, \"(?is)\" + pattern, group);\n\n for (int i = 0; i < matches.size(); i++)\n {\n final String s = matches.get(i);\n\n final String trimmed = s.trim();\n if (trimmed.length() > 0)\n {\n trimmedMatches.add(trimmed);\n }\n }\n\n return trimmedMatches;\n }", "List<JSONObject> getFilteredItems();", "java.lang.String getDataItemFilter();", "public List<T> getPageElementsList();", "@NonNull\n private void splitHTMLIntoArrays() {\n String[] splitted = postBodyHTMLContent.split(Data.BR_MATCHER);\n\n // create List of array that can be modified using linkedList\n splittedPostComponent = new LinkedList<String>(Arrays.asList(splitted));\n }", "public List<String> linkTexts()\n\t{\n\t\t\n\t\tList<String> links=new ArrayList<String>();\n\t\tlinks.add(linkString);\n\t\tlinks.add(\"Facebook.com\");\n\t\tlinks.add(\"google.com;\");\n\t\tlinks.add(\"gmail.com\");\n\t\tlinks.add(\"shine.com\");\n\t\tlinks.add(\"nukari.com\");\n\t\t\n\t\t// Like the above we have to add number of link text are passed to achieve the DataDriven approach through BBD \n\t\t\t\n\t\treturn links;\n\t\t\n\t}", "private ArrayList<String> findChampions() {\n\t\tString searchContents = search.getText();\n\t\tArrayList<String> result = new ArrayList<String>();\n\t\tfor (String c : CHAMPIONLIST) {\n\t\t\tif (c.toLowerCase().contains(searchContents.toLowerCase())) {\n\t\t\t\tresult.add(c);\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "ObservableList<Link> getFilteredLinkList();", "private ArrayList<String> parseBalanceSheetYears() {\n // Bilanz Jahresangaben\n\n Pattern bilanzJahresPattern = Pattern.compile(\"<table><thead><tr><th>\\\\s*Bilanz\\\\s*((?!</tr>).)*</tr></thead><tbody>\");\n matcher = bilanzJahresPattern.matcher(html);\n ArrayList<String> balanceSheetArray = new ArrayList<>();\n\n while (matcher.find()) {\n log.info(\"Matches gefunden!\");\n\n log.info(matcher.group(0));\n String bilanzJahresOut = matcher.group(0);\n bilanzJahresPattern = Pattern.compile(\"(\\\\s*<th class=\\\"ZAHL\\\">(((?!</).)*)</th>\\\\s*)\");\n matcher = bilanzJahresPattern.matcher(bilanzJahresOut);\n while (matcher.find()) {\n log.debug(matcher.group(2));\n balanceSheetArray.add(matcher.group(2).trim());\n }\n }\n\n log.info(balanceSheetArray.toString());\n return balanceSheetArray;\n }", "public static void main(String[] args) {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"C:\\\\eclipse\\\\chromedriver.exe\");\n\t\tWebDriver driver=new ChromeDriver();\n\t\tdriver.get(\"https://rahulshettyacademy.com/seleniumPractise/#/offers\");\n\t\tdriver.findElement(By.xpath(\"//input[@id='search-field']\")).sendKeys(\"Rice\");\n\t\tList<WebElement> items = driver.findElements(By.xpath(\"//tr/td[1]\"));\n\t\t\n\tList<WebElement> veggies=items.stream().filter(veggie->veggie.getText().contains(\"Rice\")).collect(Collectors.toList());\nAssert.assertEquals(items.size(), veggies.size());\n\t}", "public List<Element> monitorMainPage(){\n\t\tSystem.out.println(\"monitor main Page\");\n\t\tDocument document;\n\t\tList<Element> results = new ArrayList<Element>();\n\t\t// se connecte au site\n\t\tdocument = connectToPage(\"https://www.supremenewyork.com/shop/all\");\n\t\t// liste tous les éléments de la classe inner-article (i.e. tout ce qu'il y a sur la page\n\t\tElements elements = document.getElementsByClass(\"inner-article\");\n\t\tList<Element> articlesGeneral = new ArrayList<Element>();\n\t\tfor (Element element : elements) {\n\t\t\t// extrait chaque link a des articles \n\t\t\tElement link = element.select(\"a\").first();\n\t\t\tarticlesGeneral.add(link);\n\t\t}\n\t\tresults = articlesGeneral;\t\t\n\n\t\treturn results;\n\n\t}", "public static void main(String[] args) {\n String msg = \"hello everyone$<script>, fuck\";\n Request req = new Request();\n req.setResquestString(msg);\n Response res = new Response();\n res.setResponseString(\"reponse\");\n \n FilterChain fc = new FilterChain();\n \n \n fc.addFilter(new HtmlFilter())\n .addFilter(new SensitiveFilter())\n .addFilter(new FaceFilter());\n \n fc.doFilter(req, res,fc);\n System.out.println(req.getResquestString());\n System.out.println(res.getResponseString());\n\n\t}", "public List<Element> filter(Predicate<Element> p)\n\t{\n\t\treturn recursive_filter(new ArrayList<Element>(), p, group);\n\t}", "public ContentList filterContentList(ContentDatabaseFilter filter) throws DatabaseException;", "@Override\n\tpublic String dofilter(String str) {\n\t\tfor(Filter f : filters){\n\t\t\tstr = f.dofilter(str);\n\t\t}\t\t\n\t\treturn str;\n\t}", "public void filter(String text) {\n price_list.clear();\n if (text.length() == 0) {\n price_list.addAll(orginal_list);\n } else {\n for (Price_dto dto : orginal_list) {\n if (dto.getProduct().startsWith(text))\n price_list.add(0, dto);\n else if (dto.getProduct().contains(text)) {\n price_list.add(dto);\n }\n }\n }\n\n notifyDataSetChanged();\n }", "public static List<NLText> processTexts(List<String> texts) {\n// IProtocolClient api = ProtocolFactory.getHttpClient(Locale.ENGLISH, \"ui.disi.unitn.it\", 8092);\n LOG.warn(\"TODO - USING HARDCODED ENGLISH when creating sweb client in processTexts\");\n IProtocolClient api = ProtocolFactory.getHttpClient(Locale.ENGLISH);\n\t\tPipelineClient pipelineClient = new PipelineClient(api);\n NLPInput input = new NLPInput();\n input.setText(texts);\n //input.setNlpParameters(params);\n\n// NLText[] result = pipelineClient.run(\"KeywordTextPipeline\", input, 1l);\n NLText[] result = pipelineClient.run(\"ODHPipeline\", input, 1l);\n \n\t\treturn Arrays.asList(result);\n\t}", "private List<Tag> getTags(String text, boolean orderAlpha) {\r\n\t\tif (text != null)\r\n\t\t\tparseText(text);\r\n\t\tList<Tag> tags = new ArrayList<Tag>();\r\n\t\t// remplissage de la Liste des Tags\r\n\t\tEnumeration e = words.keys();\r\n\t\twhile (e.hasMoreElements()) {\r\n\t\t\tObject key = e.nextElement();\r\n\t\t\tString name = (String) key;\r\n\t\t\tint frequency = ((Integer) words.get(key)).intValue();\r\n\r\n\t\t\tTag tag = new Tag(frequency, frequency, name, name);\r\n\t\t\ttags.add(tag);\r\n\r\n\t\t}\r\n\t\twords = null;\r\n\r\n\t\tremovePlurals(tags);\r\n\t\tsortByFrequencyDesc(tags);\r\n\t\treduceToMaxNumbOfTags(tags);\r\n\t\tallocateClasses(tags);\r\n\t\tif (orderAlpha)\r\n\t\t\tsortTagNamesAsc(tags);\r\n\t\treturn tags;\r\n\r\n\t}", "private String[] extractPure(String data) throws Exception {\n\t\tString[] result1 = this.extractBetween(data.toString(), \"<title>\", \"</title>\", true, true);\n\t\t\n\t\t// remove search title bar\n\t\tresult1[1] = this.replaceBetween(result1[1], \"<div class=\\\"lotusTitleBar2\\\">\", \"<div class=\\\"lotusMain\\\">\", \"\");\n\t\t\n\t\t// remove left column\n\t\tresult1[1] = this.replaceBetween(result1[1], \"<div class=\\\"lotusColLeft\\\"\", \"<div class=\\\"lotusContent\\\"\", \"\");\n\t\t\n\t\t// remove body\n\t\tString[] result2 = this.extractBetween(result1[1], \"<div class=\\\"lotusContent\\\" role=\\\"main\\\">\", \"</table></div></div>\", true, true);\n\t\tresult2[1] = result2[1].substring(8);\n\t\t\n\t\t// return\n\t\treturn new String[]{result1[0], result2[0], result2[1]};\n\t\t\n\t}", "public static NodeFilter makeFilter()\n\t{\n\t\tNodeFilter[] fa = new NodeFilter[3];\n\t\tfa[0] = new HasAttributeFilter(\"HREF\");\n\t\tfa[1] = new TagNameFilter(\"A\");\n\t\tfa[2] = new HasParentFilter(new TagNameFilter(\"H3\"));\n\t\tNodeFilter filter = new AndFilter(fa);\n\t\treturn filter;\n\t}", "public String[] getStringArray(String subExpression) {\n String[] result = null;\n String expression = contextNode + \"/\" + subExpression;\n try {\n NodeList nl = (NodeList)xp.evaluate(contextNode + \"/\" + subExpression, source, XPathConstants.NODESET);\n int n = nl.getLength();\n if (n > 0) {\n result = new String[n];\n for (int i = 0; i < n; i++) result[i] = nl.item(i).getTextContent();\n }\n } catch(Exception e) {\n Util.log(\"XML error: can't read node \" + expression + \".\");\n Util.logException(e);\n }\n return result;\n }" ]
[ "0.7602772", "0.67731565", "0.637029", "0.626846", "0.60541785", "0.58817273", "0.5854474", "0.5852924", "0.5742344", "0.56671953", "0.56547475", "0.5622836", "0.5620824", "0.56089026", "0.55061877", "0.54685444", "0.5456923", "0.5445219", "0.5408328", "0.53989774", "0.5397915", "0.53826314", "0.5379418", "0.53656775", "0.53577983", "0.5341253", "0.53355557", "0.53012204", "0.52780193", "0.52738285", "0.52485377", "0.5193437", "0.5188139", "0.51743984", "0.51727545", "0.5171302", "0.5156572", "0.5153558", "0.5153524", "0.51280963", "0.5111528", "0.5097788", "0.50921685", "0.50896454", "0.5081628", "0.50785136", "0.5059445", "0.5052852", "0.5047227", "0.50423354", "0.5028694", "0.501967", "0.5015163", "0.5002648", "0.4988101", "0.49832737", "0.49827662", "0.49807703", "0.49788582", "0.49720055", "0.49647537", "0.49602142", "0.494925", "0.49458116", "0.49351692", "0.4917605", "0.49166515", "0.49135908", "0.4912627", "0.4906562", "0.48853308", "0.48742905", "0.48725638", "0.48724577", "0.48714355", "0.48688838", "0.48685318", "0.48679322", "0.48536396", "0.4846074", "0.48390839", "0.48389658", "0.4835909", "0.48354566", "0.4830594", "0.48294216", "0.4826675", "0.48210272", "0.47977895", "0.47961766", "0.4791267", "0.4789618", "0.47884524", "0.4783478", "0.47831544", "0.4765204", "0.47634706", "0.47604638", "0.47489324", "0.47450823" ]
0.6191048
4
Create a node filter
public static NodeFilter makeFilter() { NodeFilter[] fa = new NodeFilter[3]; fa[0] = new HasAttributeFilter("HREF"); fa[1] = new TagNameFilter("A"); fa[2] = new HasParentFilter(new TagNameFilter("H3")); NodeFilter filter = new AndFilter(fa); return filter; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addNodeFilter (INodeFilter filter);", "public void filterNodes(String filter) {\n\n\n tree_graphs.getChildren().clear();\n populate(universe, filter, this.showNodes, this.showEdges,\n this.showHyperEdges);\n\n\n tree_nodes.getChildren().clear();\n for (INode node : universe.getNodes()) {\n if (node.getID().contains(filter)) {\n parseNode(node, tree_nodes, filter);\n }\n }\n\n }", "private void filter(Node<Context> node) {\n if (node != null && node.parent != null) {\n Node<Context> parent = tree.getNode(node.parent);\n FilterInfo filterInfo = new FilterInfo(parent, node);\n filterStack.add(filterInfo);\n filter(filterInfo);\n tree.openNode(MODEL_BROWSER_ROOT, () -> tree.selectNode(MODEL_BROWSER_ROOT));\n }\n }", "public Object visit(ProcessInstanceFilter filter, Object context)\n {\n if (filter.isIncludingSubprocesses())\n {\n return new Node(new HashSet(filter.getOids()), null);\n }\n else\n {\n return new Node(null, new HashSet(filter.getOids()));\n }\n }", "private NodeRecordFilter makeNodeNameFilterHandler() {\n\t\tfinal WindowReference windowReference = _mainWindowReference;\n\t\t\n\t\tfinal JTextField nodeFilterField = (JTextField)windowReference.getView( \"NodeFilterField\" );\n\t\tfinal NodeRecordNameFilter nameFilter = new NodeRecordNameFilter();\n\t\t\n\t\tfinal FreshProcessor nodeFilterProcessor = new FreshProcessor();\n\t\tnodeFilterField.getDocument().addDocumentListener( new DocumentListener() {\n\t\t\t public void changedUpdate( final DocumentEvent event ) {\n\t\t\t\t\tnodeFilterProcessor.post( new NodeNameFilterOperation( nodeFilterField.getText(), nameFilter) );\n\t\t\t }\n\t\t\t public void insertUpdate( final DocumentEvent event ) {\n\t\t\t\t\tnodeFilterProcessor.post( new NodeNameFilterOperation( nodeFilterField.getText(), nameFilter) );\n\t\t\t }\n\t\t\t public void removeUpdate( final DocumentEvent event ) {\n\t\t\t\t\tnodeFilterProcessor.post( new NodeNameFilterOperation( nodeFilterField.getText(), nameFilter) );\n\t\t\t }\n\t\t});\n\t\t\n\t\t\n\t\tfinal JButton clearButton = (JButton)windowReference.getView( \"NodeNameFilterClearButton\" );\n\t\tclearButton.addActionListener( new ActionListener() {\n\t\t\tpublic void actionPerformed( final ActionEvent event ) {\n\t\t\t\tnodeFilterField.setText( \"\" );\n\t\t\t}\n\t\t});\n\t\t\n\t\treturn nameFilter;\n\t}", "PolynomialNode filter(Predicate test);", "public void setNodeAttributeFilter( AttributeFilter filter )\n \t{\n \t\tnodeAttributeFilter = filter;\n \t}", "private static NodeList getNodes(Node n, NodeFilter filter) throws ParserException\n\t{\n\t\tNodeList list = new NodeList();\n\t\tn.collectInto(list, filter);\n\t\tNodeList c = n.getChildren();\n\t\tif (null != c)\n\t\t{\n\t\t\tfor (NodeIterator e = c.elements(); e.hasMoreNodes();)\n\t\t\t{\n\t\t\t\te.nextNode().collectInto(list, filter);\n\t\t\t}\n\t\t}\n\t\treturn list;\n\t}", "public void removeNodeFilter (INodeFilter filter);", "public void filterEdges(String filter) {\n\n\n tree_graphs.getChildren().clear();\n populate(universe, filter, this.showNodes, this.showEdges,\n this.showHyperEdges);\n\n\n tree_edges.getChildren().clear();\n for (IEdge edge : universe.getEdges()) {\n if (edge.toString().contains(filter)) {\n parseEdge(edge, tree_edges, filter);\n }\n }\n\n }", "private static void filterwf(JobContext jobContext) throws Exception {\n\n Workflow wf = new Workflow();\n\n // NODE IDS HAVE TO BE UNIQUE\n\n // structured node\n NodeDatasetStructured structured = new NodeDatasetStructured(1, \"csv1 node\", \"data/cars.csv\", DatasetType.CSV, \",\",\n \"id label f1 f2\", \"double double double double\",\n \"numeric numeric numeric numeric\");\n wf.addNode(structured);\n\n // column filter node\n NodeColumnFilter filter = new NodeColumnFilter(5, \"filter node\", \"f1 f2\");\n wf.addLink(structured, filter);\n\n // concat columns node\n NodeTestConcatColumns concatColumns = new NodeTestConcatColumns(10, \"concat columns node\", \"f1 f2\", \"f1f2\", \"|\");\n wf.addLink(filter, concatColumns);\n\n // print first 10 rows\n NodePrintFirstNRows printFirstNRows = new NodePrintFirstNRows(15, \"print first rows\", 10);\n wf.addLink(concatColumns, printFirstNRows);\n\n // execute the workflow\n wf.execute(jobContext);\n\n }", "FeatureHolder filter(FeatureFilter filter);", "public void parseNode(INode node, TreeItem<Object> root, String filter) {\n\n TreeItem<Object> nodeItem = new TreeItem<>(node);\n root.getChildren().add(nodeItem);\n\n if (this.showEdges) {\n\n TreeItem<Object> edgeTI = new TreeItem<>(node + \"Edges (\"\n + node.getEdges().size() + \")\");\n nodeItem.getChildren().add(edgeTI);\n\n for (IEdge edge : node.getEdges()) {\n\n this.parseEdge(edge, edgeTI, filter);\n }\n }\n if (this.showHyperEdges) {\n TreeItem<Object> hyperItem = new TreeItem<>(node\n + \"HyperEdges (\" + node.getHyperEdges().size() + \")\");\n nodeItem.getChildren().add(hyperItem);\n \n for (IHyperEdge he : node.getHyperEdges()) {\n \n this.parseHyperEdge(he, hyperItem, filter);\n }\n }\n\n }", "public FilterNode(final Filter filterComponent,\n final int pos) {\n super(pos);\n this.filterComponent = filterComponent;\n }", "public GraphEdgeFilter() {\r\n this(true);\r\n }", "private static Filter newFilter()\r\n {\r\n Filter filter = new Filter(\"filter1\", new Source(\"display1\", \"name1\", \"server\", \"key1\"));\r\n filter.getOtherSources().add(filter.getSource());\r\n Group group = new Group();\r\n group.addFilterCriteria(new Criteria(\"field1\", Conditional.EQ, \"123\"));\r\n Group group2 = new Group();\r\n group2.addFilterCriteria(new Criteria(\"field1\", Conditional.EQ, \"124\"));\r\n group.addFilterGroup(group2);\r\n filter.setFilterGroup(group);\r\n return filter;\r\n }", "public void addFilterToCreator(ViewerFilter filter);", "protected abstract Graph filterGraph();", "@Override\n\tpublic Object visit(ASTRelFilter node, Object data) {\n\t\treturn null;\n\t}", "@Override\n public R visit(Filter n, A argu) {\n R _ret = null;\n n.nodeToken.accept(this, argu);\n n.constraint.accept(this, argu);\n return _ret;\n }", "public Filter () {\n\t\tsuper();\n\t}", "public Link buildForFilter() {\n isSubTreeFiltered = true;\n return new DefaultLink(this);\n }", "@Override\n\tpublic Object visit(ASTFilterIs node, Object data) {\n\t\tSystem.out.print(node.jjtGetChild(0).jjtAccept(this, data));\n\t\tSystem.out.print(\" is \");\n\t\tSystem.out.print(node.jjtGetChild(1).jjtAccept(this, data));\n\t\treturn null;\n\t}", "public AxisFilter(AxisIterator base, NodeTest test) {\n this.base = base;\n this.nodeTest = test;\n position = 0;\n }", "public Filter (Filter filter) {\n this.name = filter.name;\n this.type = filter.type;\n this.pred = new FilterPred(filter.pred);\n this.enabled = filter.enabled;\n }", "private Filter readFilter() {\n final Stack<Node> expressionStack = new Stack<Node>();\n\n // Employ the shunting-yard algorithm to parse into reverse polish notation,\n // where the operands are filter components and the operators are the\n // logical AND and OR operators. This algorithm ensures that operator\n // precedence and parentheses are respected.\n final List<Node> reversePolish = new ArrayList<Node>();\n for (String word = readWord(); word != null; word = readWord()) {\n if (word.equalsIgnoreCase(\"and\") || word.equalsIgnoreCase(\"or\")) {\n final OperatorNode currentOperator;\n if (word.equalsIgnoreCase(\"and\")) {\n currentOperator = new OperatorNode(Operator.AND, markPos);\n } else {\n currentOperator = new OperatorNode(Operator.OR, markPos);\n }\n while (!expressionStack.empty() && (expressionStack.peek() instanceof OperatorNode)) {\n final OperatorNode previousOperator = (OperatorNode) expressionStack.peek();\n if (previousOperator.getPrecedence() < currentOperator.getPrecedence()) {\n break;\n }\n reversePolish.add(expressionStack.pop());\n }\n expressionStack.push(currentOperator);\n } else if (word.equals(\"(\")) {\n expressionStack.push(new LeftParenthesisNode(markPos));\n } else if (word.equals(\")\")) {\n while (!expressionStack.empty() && !(expressionStack.peek() instanceof LeftParenthesisNode)) {\n reversePolish.add(expressionStack.pop());\n }\n if (expressionStack.empty()) {\n final String msg =\n String.format(\"No opening parenthesis matching closing \" +\n \"parenthesis at position %d\", markPos);\n throw new IllegalArgumentException(msg);\n }\n expressionStack.pop();\n } else {\n rewind();\n final int pos = currentPos;\n final Filter filterComponent = readFilterComponent();\n reversePolish.add(new FilterNode(filterComponent, pos));\n }\n }\n\n while (!expressionStack.empty()) {\n final Node node = expressionStack.pop();\n if (node instanceof LeftParenthesisNode) {\n final String msg =\n String.format(\"No closing parenthesis matching opening \" +\n \"parenthesis at position %d\", node.getPos());\n throw new IllegalArgumentException(msg);\n }\n reversePolish.add(node);\n }\n\n // Evaluate the reverse polish notation to create a single complex filter.\n final Stack<FilterNode> filterStack = new Stack<FilterNode>();\n for (final Node node : reversePolish) {\n if (node instanceof OperatorNode) {\n final FilterNode rightOperand = filterStack.pop();\n final FilterNode leftOperand = filterStack.pop();\n final OperatorNode operatorNode = (OperatorNode)node;\n if (operatorNode.getOperator().equals(Operator.AND)) {\n final Filter filter = createAndFilter(\n Arrays.asList(leftOperand.getFilterComponent(),\n rightOperand.getFilterComponent()));\n filterStack.push(new FilterNode(filter, leftOperand.getPos()));\n } else {\n final Filter filter = createOrFilter(\n Arrays.asList(leftOperand.getFilterComponent(),\n rightOperand.getFilterComponent()));\n filterStack.push(new FilterNode(filter, leftOperand.getPos()));\n }\n } else {\n filterStack.push((FilterNode)node);\n }\n }\n\n if (filterStack.size() == 0) {\n final String msg = String.format(\"Empty filter expression\");\n throw new IllegalArgumentException(msg);\n }\n else if (filterStack.size() > 1) {\n final String msg = String.format(\n \"Unexpected characters at position %d\", expressionStack.get(1).pos);\n throw new IllegalArgumentException(msg);\n }\n\n return filterStack.get(0).filterComponent;\n }", "@Override\n public JsonNode visit(JmesPathFilter filter, JsonNode input) throws InvalidTypeException {\n JsonNode filterExpression = filter.getLhsExpr().accept(this, input);\n if (filterExpression.isArray()) {\n Iterator<JsonNode> elements = filterExpression.elements();\n ArrayNode projectedArrayNode = ObjectMapperSingleton.getObjectMapper().createArrayNode();\n while (elements.hasNext()) {\n JsonNode element = elements.next();\n if (filter.getComparator().accept(this, element).equals(BooleanNode.TRUE)) {\n JsonNode projectedElement = filter.getRhsExpr().accept(this, element);\n if (projectedElement != null) {\n projectedArrayNode.add(projectedElement);\n }\n }\n }\n return projectedArrayNode;\n }\n return NullNode.getInstance();\n }", "@Override\n\tpublic Object visit(ASTFilterNot node, Object data) {\n\t\tSystem.out.print(\"not \");\n\t\tnode.childrenAccept(this, data);\n\t\treturn null;\n\t}", "private void createLeafNodePanel() {\n\t\tLeafNode<ListFilter> leaf = (LeafNode<ListFilter>) getHierarchy();\n\t\tfinal ListFilter item = leaf.getItem();\n\t\tfinal String token = HistoryUtils.UTILS.serializeListFilter(item);\n\t\tcreateAnchor(getHierarchy().getName(), token, new ClickHandler() {\n\t\t\tfinal HyperlinkImpl impl = GWT.create(HyperlinkImpl.class);\n\n\t\t\tpublic void onClick(ClickEvent event) {\n\t\t\t\tif (impl.handleAsClick(Event.as(event.getNativeEvent()))) {\n\t\t\t\t\tHistoryManager.HISTORY.setListFilter(item, token);\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t}\n\t\t}, null);\n\n\t\tString detailTooltip =\n\t\t\tI18n.getHierarchyTreeConstants().detailListFilterTooltip();\n\t\tcreateImage(HierarchyResources.INSTANCE.detail(), new ClickHandler() {\n\t\t\tpublic void onClick(ClickEvent event) {\n\t\t\t\tListFilterDialog.DIALOG.showDialog(item);\n\t\t\t}\n\t\t}, detailTooltip);\n\t}", "Filter getFilter();", "public Filter() {\n }", "public abstract Filter<T> filter();", "public DDataFilter() {\n filters = new ArrayList<>();\n operator = null;\n value = null;\n externalData = false;\n valueTo = null;\n attribute = ROOT_FILTER;\n }", "FeatureHolder filter(FeatureFilter fc, boolean recurse);", "public void visitNodes(final Filter<Node<T>> filter,\n final Comparator<Node<T>> comparator, final Visitor<Node<T>> visitor) {\n final List<Node<T>> nodes = new LinkedList<Node<T>>();\n if (filter == null) {\n nodes.addAll(getNodes());\n } else {\n for (final Node<T> node : getNodes()) {\n if (filter.accept(node)) {\n nodes.add(node);\n }\n }\n }\n if (comparator != null) {\n Collections.sort(nodes, comparator);\n }\n\n final NodeEventListener<T> listener = new NodeEventListener<T>() {\n @Override\n public void nodeEvent(final NodeEvent<T> nodeEvent) {\n final Node<T> node = nodeEvent.getNode();\n final String action = nodeEvent.getAction();\n if (action.equals(NodeEvent.NODE_ADDED)) {\n nodes.add(node);\n if (comparator == null) {\n Collections.sort(nodes);\n } else {\n Collections.sort(nodes, comparator);\n }\n } else if (action.equals(NodeEvent.NODE_REMOVED)) {\n nodes.remove(node);\n }\n }\n };\n this.nodeListeners.add(listener);\n try {\n while (!nodes.isEmpty()) {\n final Node<T> node = nodes.remove(0);\n if (!node.isRemoved()) {\n if (!visitor.visit(node)) {\n return;\n }\n }\n }\n } finally {\n this.nodeListeners.remove(listener);\n }\n }", "public abstract void filter();", "public void addFilterToAttributes(ViewerFilter filter);", "public LinkedList <AbsAttraction> filter(ISelect s){\r\n return new LinkedList <AbsAttraction>(); \r\n }", "@VTID(9)\n void treeFilter(\n IUIAutomationCondition filter);", "void generateFileList(File node, FileFilter filter) {\n\n //add file only\n if (node.isFile()) {\n fileList.add(generateZipEntry(node.getAbsoluteFile().toString()));\n }\n\n if (node.isDirectory()) {\n File[] subNote = node.listFiles(filter);\n assert subNote != null;\n for (File file : subNote) {\n generateFileList(new File(node, file.getName()), filter);\n }\n }\n\n }", "BuildFilter defaultFilter();", "public PipelineFilter()\n {\n }", "public Object[] getFilteredSuccessorNodes (Object node) throws InvalidComponentException;", "@Override\n\tpublic Object visit(ASTFilterAnd node, Object data) {\n\t\tSystem.out.print(node.jjtGetChild(0).jjtAccept(this, data));\n\t\tSystem.out.print(\" and \");\n\t\tSystem.out.print(node.jjtGetChild(1).jjtAccept(this, data));\n\t\treturn null;\n\t}", "public static Filter buildFromDOM (Element element) throws FilterConstructionException { \r\n Filter filter = null;\r\n\r\n // check if root element's name equals 'filter'\r\n if (!element.getLocalName().equals (\"Filter\"))\r\n throw new FilterConstructionException (\"Name of element does not equal 'Filter'!\"); \r\n \r\n // determine type of Filter (FeatureFilter / ComplexFilter) \r\n Element firstElement = null;\r\n NodeList children = element.getChildNodes (); \r\n for (int i = 0; i < children.getLength (); i++) {\r\n if (children.item (i).getNodeType () == Node.ELEMENT_NODE) {\r\n firstElement = (Element) children.item (i);\r\n }\r\n }\r\n if (firstElement == null) throw new FilterConstructionException (\"Filter Node is empty!\");\r\n \r\n if (firstElement.getLocalName().equals (\"FeatureId\")) {\r\n // must be a FeatureFilter\r\n FeatureFilter fFilter = new FeatureFilter ();\r\n children = element.getChildNodes ();\r\n for (int i = 0; i < children.getLength (); i++) {\r\n if (children.item(i).getNodeType () == Node.ELEMENT_NODE) {\r\n Element fid = (Element) children.item (i);\r\n if (!fid.getLocalName().equals (\"FeatureId\"))\r\n throw new FilterConstructionException (\"Unexpected Element encountered: \" + fid.getLocalName());\r\n fFilter.addFeatureId (FeatureId.buildFromDOM (fid));\r\n }\r\n }\r\n filter = fFilter;\r\n }\r\n else {\r\n // must be a ComplexFilter\r\n children = element.getChildNodes ();\r\n boolean justOne = false;\r\n for (int i = 0; i < children.getLength (); i++) {\r\n if (children.item(i).getNodeType () == Node.ELEMENT_NODE) {\r\n Element operator = (Element) children.item (i);\r\n if (justOne)\r\n throw new FilterConstructionException (\"Unexpected element encountered: \" + operator.getLocalName());\r\n ComplexFilter cFilter = new ComplexFilter (AbstractOperation.buildFromDOM (operator));\r\n filter = cFilter;\r\n justOne = true;\r\n }\r\n }\r\n }\r\n return filter;\r\n }", "void filterChanged(String filter) {\n if (filter.isEmpty()) {\n treeView.setRoot(rootTreeItem);\n } else {\n TreeItem<FilePath> filteredRoot = createTreeRoot();\n filter(rootTreeItem, filter, filteredRoot);\n treeView.setRoot(filteredRoot);\n }\n }", "CompiledFilter() {\n }", "public void addFilterToIncomingLinks(ViewerFilter filter);", "public ConcatFilter() {\n super();\n }", "@SuppressWarnings(\"unused\")\n\tprivate Filter() {\n\n\t}", "private void populateFilter() throws TransformerConfigurationException\r\n\t{\r\n\t\tthis.filter = new AddressSet(\"./filtered.xml\");\r\n\t\tthis.filter.addElement(\"postmaster\");\r\n\t\tthis.filter.addElement(\"uucp\");\r\n\t\tthis.filter.addElement(\"mailer-daemon\");\r\n\t\tthis.filter.addElement(\"maildaemon\");\r\n\t\tthis.filter.addElement(\"majordomo\");\r\n\t\tthis.filter.addElement(\"mailerdaemon\");\r\n\t\tthis.filter.addElement(\"abuse@\");\r\n\t\tthis.filter.addElement(\"-relay\");\r\n\t\tthis.filter.addElement(\"-request@\");\r\n\t}", "@Override\n\tpublic Object visit(ASTFilterOr node, Object data) {\n\t\tSystem.out.print(node.jjtGetChild(0).jjtAccept(this, data));\n\t\tSystem.out.print(\" or \");\n\t\tSystem.out.print(node.jjtGetChild(1).jjtAccept(this, data));\n\t\treturn null;\n\t}", "public interface FilterFactory<K, G> extends Serializable\n{\n\t/**\n\t * Creates a set of filters for the given token,tag, and tag-of-previous-token.\n\t * The convention is as follows:\n\t * Let each feature f be a feature that <B>might</B> return non-zero for the given token,tag,previous-tag.\n\t * That feature is encapsulated with a {@link Filter} in a {@link CrfFilteredFeature}. Let's call this filter \"t\".\n\t * For that filter there exist one filter in the set returned by this function, name it \"t'\", such that \"t'\" equals to \"t\".\n\t * \n\t * \n\t * @param sequence A sequence of tokens\n\t * @param tokenIndex An index of a token in that sequence\n\t * @param currentTag A tag for that token\n\t * @param previousTag A tag for the token which immediately precedes that token.\n\t * @return A set of filters as described above.\n\t */\n\tpublic Set<Filter<K, G>> createFilters(K[] sequence, int tokenIndex, G currentTag, G previousTag);\n}", "FilterCondition createFilterCondition(int clueNum);", "public Filter createFilter(String filter) throws InvalidSyntaxException {\n \t\tcheckValid();\n \n \t\treturn FilterImpl.newInstance(filter);\n \t}", "StandardFilterBuilder standardFilter(int count);", "void edgeFilter() {\n for (int i = 0; i < size(); i++) {\n Exp f = get(i);\n if (f.isFilter() && f.size() > 0 && f.get(0).type() == TEST\n && i >= 1 && get(i - 1).isEdge()) {\n Exp edge = get(i - 1);\n if (match(edge, f)) {\n edge.add(f);\n }\n }\n }\n }", "public ObjectFilter()\n\t{\n\t}", "public SubsetFilter createFilter(Dimension dimension);", "public Element getFilterElement() {\n\t\tElement result = new Element(TAG_FILTER);\n\t\t\n\t\tElement desc = new Element(TAG_DESCRIPTION);\n\t\tdesc.setText(this.description);\n\t\tresult.addContent(desc);\n\t\t\n\t\tElement logdata = new Element(TAG_LOGDATA);\n\t\tlogdata.setText(\"\" + this.logData);\n\t\tresult.addContent(logdata);\n\t\t\n\t\tElement accepted = new Element(TAG_ACCEPTEDTYPES);\n\t\tif (acceptedEventTypes != null) {\n\t\t Set<String> keys = acceptedEventTypes.keySet();\n\t\t\t// sort output by event type name\n\t\t\tLinkedList<String> sortedKeyList = new LinkedList<String>(keys);\n\t\t\tCollections.sort(sortedKeyList);\n\t\t\tfor (String key : sortedKeyList) {\n\t\t\t\t// only save event types which are actually set for logging\n\t\t\t\tif (getEventTypePriority(key) != PRIORITY_OFF) {\n\t\t\t\t\tElement type = new Element(TAG_CLASS);\n\t\t\t\t\ttype.setText(key);\n\t\t\t\t\ttype.setAttribute(TAG_PRIORITY, \"\" + getEventTypePriorityString(key));\n\t\t\t\t\taccepted.addContent(type);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tresult.addContent(accepted);\n\t\t\n\t\treturn result;\n\t}", "private static TreeFilter createPathFilter(Collection<String> paths) {\n\t\tList<TreeFilter> filters = new ArrayList<TreeFilter>(paths.size());\n\t\tfor (String path : paths) {\n\t\t\tif (path.length() == 0)\n\t\t\t\treturn null;\n\t\t\tfilters.add(PathFilter.create(path));\n\t\t}\n\t\tif (filters.size() == 1)\n\t\t\treturn filters.get(0);\n\t\treturn OrTreeFilter.create(filters);\n\t}", "public JodeList search(Predicate<Jode> filter) {\n List<Node> ret = new ArrayList<>();\n if (filter.test(this)) {\n ret.add(this.extend());\n }\n for (Jode j : this.children()) {\n JodeList subResult = j.search(filter);\n for (Jode subJ : subResult) {\n ret.add(subJ.extend());\n }\n }\n return new JodeList(ret);\n }", "public void addBusinessFilterToCreator(ViewerFilter filter);", "String getFilter();", "public static interface Filter\n\t\t{\n\t\t/**\n\t\t * Accept a frame? if false then all particles will be discarded\n\t\t */\n\t\tpublic boolean acceptFrame(EvDecimal frame);\n\t\t\n\t\t/**\n\t\t * Accept a particle?\n\t\t */\n\t\tpublic boolean acceptParticle(int id, ParticleInfo info);\n\t\t}", "public Filter spawn(String x);", "@Test\n public void testNondeterministicFilter() throws Exception {\n String query = \"A =LOAD 'file.txt' AS (name, cuisines:bag{ t : ( cuisine ) }, num:int );\" +\n \"B = FOREACH A GENERATE name, flatten(cuisines), num;\" +\n \"C = FILTER B BY RANDOM(num) > 5;\" +\n \"D = STORE C INTO 'empty';\" ;\n\n LogicalPlan newLogicalPlan = buildPlan( query );\n\n newLogicalPlan.explain(System.out, \"text\", true);\n\n // Expect Filter to not be pushed, so it should be load->foreach-> filter\n Operator load = newLogicalPlan.getSources().get( 0 );\n Assert.assertTrue( load instanceof LOLoad );\n Operator fe1 = newLogicalPlan.getSuccessors( load ).get( 0 );\n Assert.assertTrue( fe1 instanceof LOForEach );\n Operator fe2 = newLogicalPlan.getSuccessors( fe1 ).get( 0 );\n Assert.assertTrue( fe2 instanceof LOForEach );\n Operator filter = newLogicalPlan.getSuccessors( fe2 ).get( 0 );\n Assert.assertTrue( filter instanceof LOFilter );\n }", "static ObjectInputFilter createFilter(String param2String, boolean param2Boolean) {\n/* 448 */ Global global = new Global(param2String, param2Boolean);\n/* 449 */ return global.isEmpty() ? null : global;\n/* */ }", "private FilterPipeline createPipeline() {\n Filter filterZero = createDefaultPatternFilter(0);\n Filter filterTwo = createDefaultPatternFilter(2); \n Sorter sorter = new ShuttleSorter();\n Filter[] filters = new Filter[] {filterZero, filterTwo, sorter};\n FilterPipeline pipeline = new FilterPipeline(filters);\n return pipeline;\n }", "private void initFilter() {\r\n if (filter == null) {\r\n filter = new VocabularyConceptFilter();\r\n }\r\n filter.setVocabularyFolderId(vocabularyFolder.getId());\r\n filter.setPageNumber(page);\r\n filter.setNumericIdentifierSorting(vocabularyFolder.isNumericConceptIdentifiers());\r\n }", "@Override\n\tpublic void filterChange() {\n\t\t\n\t}", "void setFilter(Filter f);", "@Override\n\tpublic Object visit(ASTFilterRelPath node, Object data) {\n\t\treturn null;\n\t}", "@Override\n public void visit(final OpFilter opFilter) {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"Starting visiting OpFilter\");\n }\n addOp(OpFilter.filterBy(opFilter.getExprs(), rewriteOp1(opFilter)));\n }", "public FileFilter() {\n this.filterExpression = \"\";\n }", "public void addFilterToAnotations(ViewerFilter filter);", "public void addFilterToAnotations(ViewerFilter filter);", "public Filter(Predicate p, OpIterator child) {\n\t\t// some code goes here\n\t\tpred = p;\n\t\tchildOperator = child;\n\t}", "private JsonNode experimentWithCustomUserTypeFilter(ExperimentSnapshot experiment) {\n JsonNode jsonNode = ObjectMapperFactory.makeObjectMapper().valueToTree(experiment);\n ((ObjectNode)jsonNode).putArray(\"filters\").addObject().put(\"filter-type\", \"UserType\");\n return jsonNode;\n }", "public void addFilterToParentLayer(ViewerFilter filter);", "protected FilterImpl() {\n this(SparkUtils.ALL_PATHS);\n }", "FilterInfo addFilter(String filtercode, String filter_type, String filter_name, String disableFilterPropertyName, String filter_order);", "void addRecipeFilter(RecipeFilter recipeFilter);", "protected IUIFilterable createFilterable() {\n \t\treturn new UIFilterable();\n \t}", "static ObjectInputFilter createFilter(String param2String, boolean param2Boolean) {\n/* 446 */ Global global = new Global(param2String, param2Boolean);\n/* 447 */ return global.isEmpty() ? null : global;\n/* */ }", "public void parseGraph(IGraph graph, TreeItem<Object> root, String filter) {\n\n\n TreeItem<Object> graphItem = new TreeItem<>(graph\n // .getID()\n );\n\n root.getChildren().add(graphItem);\n if (this.showNodes) {\n TreeItem<Object> nodeTI = new TreeItem<>(graph + \" Nodes (\"\n + graph.getNodes().size() + \")\");\n graphItem.getChildren().add(nodeTI);\n\n for (INode node : graph.getNodes()) {\n\n if (node.getID().contains(filter)) {\n\n this.parseNode(node, nodeTI, filter);\n }\n }\n }\n\n if (this.showEdges) {\n\n TreeItem<Object> edgeTI = new TreeItem<>(graph + \" Edges (\"\n + graph.getEdges().size() + \")\");\n graphItem.getChildren().add(edgeTI);\n\n for (IEdge edge : graph.getEdges()) {\n\n if (edge.toString().contains(filter)) {\n\n this.parseEdge(edge, edgeTI, filter);\n }\n }\n }\n if (this.showHyperEdges) {\n TreeItem<Object> hyperTI = new TreeItem<>(graph\n + \"Hyperedges (\" + graph.getHyperEdges().size() + \")\");\n graphItem.getChildren().add(hyperTI);\n for (IHyperEdge he : graph.getHyperEdges()) {\n\n if (he.getID().contains(filter)) {\n\n this.parseHyperEdge(he, hyperTI, filter);\n }\n }\n }\n }", "protected NullFilterImpl() {\n }", "public LinkedList<Article> filterArticleList(int filter)\n\t{\n\t\treturn null;\n\t}", "void setFilter(String filter);", "public JodeList children(Predicate<Jode> filter) {\n return this.children().filter(filter);\n }", "void onFilterChanged(ArticleFilter filter);", "public void addFilterToParentModule(ViewerFilter filter);", "public void createWhereUsedNode() {\n whereUsedProvider = new FieldWhereUsedInCdsElementInfoProvider(destinationProvider.getDestinationId(),\n baseEntityName, baseFieldName, false, SearchAndAnalysisPlugin.getDefault()\n .getPreferenceStore()\n .getBoolean(FieldAnalysisView.SEARCH_DB_VIEWS_WHERE_USED_PREF_KEY));\n whereUsedNode = new FieldHierarchyViewerNode(new LazyLoadingFolderNode(baseFieldName, whereUsedProvider, null,\n null));\n }", "public String getFilter();", "private static Filter createFilter(final BundleContext bundleContext, final Class<?>... classes) {\r\n\t\tfinal StringBuilder filter = new StringBuilder();\r\n\t\tif (classes != null) {\r\n\t\t\tif (classes.length > 1) {\r\n\t\t\t\tfilter.append(\"(|\");\r\n\t\t\t}\r\n\t\t\tfor (Class<?> clazz : classes) {\r\n\t\t\t\tfilter.append(\"(\").append(Constants.OBJECTCLASS).append(\"=\").append(clazz.getName()).append(\")\");\r\n\t\t\t}\r\n\t\t\tif (classes.length > 1) {\r\n\t\t\t\tfilter.append(\")\");\r\n\t\t\t}\r\n\t\t}\r\n\t\ttry {\r\n\t\t\treturn bundleContext.createFilter(filter.toString());\r\n\t\t} catch (InvalidSyntaxException e) {\r\n\t\t\tthrow new IllegalArgumentException(\"Unexpected InvalidSyntaxException: \" + e.getMessage());\r\n\t\t}\r\n\t}", "public abstract AisPacketStream filter(Predicate<? super AisPacket> predicate);", "public interface Filter extends Predicate<Element> {\n\n}", "public void addFilterToMethods(ViewerFilter filter);", "public Input filterBy(Filter filter) {\n JsonArray filters = definition.getArray(FILTERS);\n if (filters == null) {\n filters = new JsonArray();\n definition.putArray(FILTERS, filters);\n }\n filters.add(Serializer.serialize(filter));\n return this;\n }", "public interface Filter {\n\n /**\n * Determines whether or not a word may pass through this filter.\n * @param word test word\n * @return TRUE if word may pass, FALSE otherwise\n */\n public boolean pass(String word);\n\n /**\n * Generates a new filter based on the provided\n * definition.\n * @param x definition\n * @return reference to newly-generated filter\n */\n public Filter spawn(String x);\n\n}" ]
[ "0.7552683", "0.707209", "0.6695975", "0.6579747", "0.64996827", "0.6435909", "0.64338887", "0.63746226", "0.6369636", "0.62641513", "0.6107765", "0.60524505", "0.60016006", "0.5997159", "0.597225", "0.5966522", "0.59472877", "0.592962", "0.58730376", "0.5867088", "0.585783", "0.5847362", "0.57780427", "0.57637924", "0.5714655", "0.5679623", "0.5641309", "0.5635252", "0.56156296", "0.5610537", "0.5598977", "0.55970824", "0.558524", "0.5583079", "0.55719656", "0.55374306", "0.5518686", "0.5515961", "0.5505814", "0.5489635", "0.5484909", "0.54719394", "0.54625237", "0.54565114", "0.54464906", "0.54428476", "0.5441856", "0.54389596", "0.54039395", "0.53933287", "0.53879225", "0.5383881", "0.5374415", "0.53613925", "0.5357775", "0.5336561", "0.5319967", "0.5319069", "0.53179973", "0.5314273", "0.5299307", "0.5295364", "0.5293806", "0.52933806", "0.5291794", "0.52908635", "0.52849317", "0.52816033", "0.52697325", "0.52672225", "0.5251594", "0.5244635", "0.5241494", "0.523558", "0.52275574", "0.5220288", "0.5220288", "0.5211314", "0.52072865", "0.5206365", "0.5199592", "0.5197064", "0.51957303", "0.51931345", "0.5192066", "0.51844305", "0.5183923", "0.5182204", "0.51731217", "0.5162927", "0.5156132", "0.5146954", "0.5139986", "0.5130947", "0.512146", "0.5115761", "0.5102329", "0.50993407", "0.5099122", "0.50935286" ]
0.76175374
0
Stem a word eliminating stop words from list
public static String stemNSW(String word) { return isNSW(getRoot(word.toLowerCase())); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Stem> stem(String word) {\n return stem(word.toCharArray(), word.length());\n }", "String stemOf (String word);", "public List<String> stem(List<String> terms) {\r\n\t\tPaiceHuskStemmer stemmer = null;\r\n\t\ttry {\r\n\t\t\tstemmer = PaiceHuskStemmer.getInstance(SVMClassifier.class.getClassLoader().getResource(\"stemrules.txt\").openStream());\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tstemmer.setPreStrip(false);\r\n\t\tfor (int i = 0; i < terms.size(); i++) {\r\n\t\t\tString w = terms.get(i);\r\n\t\t\tterms.set(i, stemmer.stripAffixes(w));\r\n\t\t}\r\n\t\treturn terms;\r\n\t}", "public static String preprocessStemAndTokenize(String data) {\n\n\t\tSet<String> transformedSet = new HashSet<String>(); //Set will make sure only unique terms are kept\n\t\tStringBuilder strBuilder = new StringBuilder();\n\t\tTokenizer analyzer = new Tokenizer(Version.LUCENE_30);\n\t\tTokenStream tokenStream = analyzer.tokenStream(\"\", new StringReader(data));\n\t\tTermAttribute termAttribute;\n\t\tString term;\n\t\t//System.out.println(\"The value of data in tokenizeAndStem: \"+ data);\n\t\ttry {\n\t\t\twhile (tokenStream.incrementToken()) {\n\t\t\t\ttermAttribute = tokenStream.getAttribute(TermAttribute.class);\n\t\t\t\tterm = termAttribute.term(); \n\t\t\t\tif (stopwords.contains(term)){ //ignore stopwords\n\t\t\t\t\t//System.out.println(\"Contains stopword: \"+ term);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (digitPattern.matcher(term).find()) //ignore digits\n\t\t\t\t\tcontinue;\n\t\t\t\tif(term.length() <= 1) //ignore 1 letter words\n\t\t\t\t\tcontinue;\n\t\t\t\t\n\t\t\t\tif (!digitPattern.matcher(term).find()){ //ignore digits\n\t\t\t\t\tstemmer.setCurrent(term);\n\t\t\t\t\tstemmer.stem();\n\t\t\t\t\ttransformedSet.add(stemmer.getCurrent());\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t//System.out.println(\"transormed set size in tokenizeAndStem: \"+ transformedSet.size());\n\t\tfor(Object token: transformedSet.toArray()){\n\t\t\tstrBuilder.append(token).append(\" \");\n\t\t}\n\t\t//System.out.println(\"String returned in tokenizeAndStem:\"+ strBuilder.toString());\n\t\treturn strBuilder.toString();\n\t}", "private static String removeStopWords(String str) {\n for(int i=0; i<stopWords.size(); i++) {\n String temp = stopWords.get(i);\n if(temp.equalsIgnoreCase(str)) {\n str = \"\";\n }\n }\n return str;\n }", "public List<Stem> stem(char word[], int length) {\n List<Stem> stems = new ArrayList<Stem>();\n if (dictionary.lookupWord(word, 0, length) != null) {\n stems.add(new Stem(word, length));\n }\n stems.addAll(stem(word, length, null, 0));\n return stems;\n }", "List<String> tokenize0(String doc) {\r\n List<String> res = new ArrayList<String>();\r\n\r\n for (String s : doc.split(\"\\\\s+\")) {\r\n // implement stemming algorithm if ToStem == true\r\n if (ToStem == true) {\r\n Stemmer st = new Stemmer();\r\n st.add(s.toCharArray(), s.length());\r\n st.stem();\r\n s = st.toString();\r\n }\r\n res.add(s);\r\n }\r\n return res;\r\n }", "protected String stem(String term) {\r\n\t\tStemmer stemmer = new Stemmer();\r\n\t\tfor(char a : term.toCharArray()){\r\n\t\t\tstemmer.add(a);\r\n\t\t}\r\n\t\tstemmer.stem();\r\n\t\treturn stemmer.toString();\r\n\t}", "private static String analyzeTerm(String term) {\n String ret = term.toLowerCase();\n if (stopWords.contains(ret) || ret.isEmpty())\n return \"\";\n return stemmer.stem(ret);\n }", "public static String stem(String word){\n Stemmer s = new Stemmer();\n s.add(word.toCharArray(), word.length());\n s.stem();\n return s.toString();\n }", "public static String preprocessStemAndTokenizeReturnDistinctTokens(String data) {\n\t\t//System.out.println(\"Preprocess data, remove stop words, stem, tokenize ..\");\n\t\tSet<String> transformedSet = new LinkedHashSet<String>();\n\t\tList<String> stemmedList = new ArrayList<String>();\n\n\t\tTokenizer analyzer = new Tokenizer(Version.LUCENE_30);\n\t\tTokenStream tokenStream = analyzer.tokenStream(\"\", new StringReader(data));\n\t\tTermAttribute termAttribute;\n\t\tString term;\n\t\ttry {\n\t\t\twhile (tokenStream.incrementToken()) {\n\t\t\t\ttermAttribute = tokenStream.getAttribute(TermAttribute.class);\n\t\t\t\tterm = termAttribute.term();\n\t\t\t\tif (digitPattern.matcher(term).find()) //ignore digits\n\t\t\t\t\tcontinue;\n\t\t\t\tif (stopwords.contains(term)) //ignore stopwords\n\t\t\t\t\tcontinue;\n\t\t\t\tif (term.length() <= 1) //ignore single letter words\n\t\t\t\t\tcontinue;\n\t\t\t\tstemmer.setCurrent(term);\n\t\t\t\tstemmer.stem();\n\t\t\t\tstemmedList.add(stemmer.getCurrent());\n\t\t\t}\n\t\t\ttransformedSet.addAll(stemmedList);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tstemmedList.clear();\n\t\tstemmedList = null;\n\t\t\n\t\treturn StringUtils.join(transformedSet.toArray(), \" \");\n\t}", "public static List<TokenCanonic> stemWords(String wordList) {\n List<TokenCanonic> result = new ArrayList<TokenCanonic>(); \n String [] tokens = wordList.split(\"\\\\s+\");\n for (String t : tokens) {\n if (t.trim().equals(\"\")) continue;\n TokenCanonic tc = new TokenCanonic(); \n tc.token = t; tc.canonic = stemWord(t);\n result.add(tc);\n }\n return result;\n }", "private ArrayList<String> stemTokens(ArrayList<String> tokens) {\n ArrayList<String> stemmedTokens = new ArrayList<>();\n for (String token : tokens) {\n Stemmer stemmer = new Stemmer();\n // Add each character into the stemmer\n for (int i = 0; i < token.length(); i++) {\n stemmer.add(token.charAt(i));\n }\n\n // Stem the token\n stemmer.stem();\n\n // Retrieve the stemmed token\n String stemmedToken = stemmer.toString();\n\n stemmedTokens.add(stemmedToken);\n }\n\n return stemmedTokens;\n }", "public String remove_stop_words(String text) {\n\t\tfor (String w : stop_words) {\n\t\t\ttext = text.replaceAll(\"\\\\s*\\\\b\" + w + \"\\\\b\\\\s*\", \" \");\n\t\t}\n\n\t\treturn text;\n\t}", "public String stem(String str) {\n\n if (str.length() <= 2) {\n return str;\n }\n String stemmed = super.stem(str);\n while (!stemmed.equals(str)) {\n str = stemmed;\n stemmed = super.stem(stemmed);\n }\n return stemmed;\n }", "private String processWord(String word){\r\n\t\tString lword = word.toLowerCase();\r\n\t\tfor (int i = 0;i<word.length();++i){\r\n\t\t\tstemmer.add(lword.charAt(i));\r\n\t\t}\r\n\t\tstemmer.stem();\r\n\t\treturn stemmer.toString();\r\n\t}", "private String removeStopWords(String str) throws IOException{\n String stopwords = \"!! ?! ?? !? ` `` '' -lrb- -rrb- -lsb- -rsb- , . : ; \\\" ' ? < > { } [ ] + - ( ) & % $ @ ! ^ # * .. ... 'll 's 'm a about above after again against all am an and any are aren't as at be because been before being below between both but by can can't cannot could couldn't did didn't do does doesn't doing don't down during each few for from further had hadn't has hasn't have haven't having he he'd he'll he's her here here's hers herself him himself his how how's i i'd i'll i'm i've if in into is isn't it it's its itself let's me more most mustn't my myself no nor not of off on once only or other ought our ours ourselves out over own same shan't she she'd she'll she's should shouldn't so some such than that that's the their theirs them themselves then there there's these they they'd they'll they're they've this those through to too under until up very was wasn't we we'd we'll we're we've were weren't what what's when when's where where's which while who who's whom why why's with won't would wouldn't you you'd you'll you're you've your yours yourself yourselves ### return arent cant couldnt didnt doesnt dont hadnt hasnt havent hes heres hows im isnt its lets mustnt shant shes shouldnt thats theres theyll theyre theyve wasnt were werent whats whens wheres whos whys wont wouldnt youd youll youre youve\";\n String[] allWords = str.toLowerCase().split(\" \");\n StringBuilder builder = new StringBuilder();\n for(String word : allWords) {\n if(!stopwords.contains(word)) {\n builder.append(word);\n builder.append(' ');\n } \n }\n String result = builder.toString().trim();\n return result;\n }", "private List<Stem> stem(char word[], int length, char[] flags, int recursionDepth) {\n List<Stem> stems = new ArrayList<Stem>();\n\n for (int i = 0; i < length; i++) {\n List<HunspellAffix> suffixes = dictionary.lookupSuffix(word, i, length - i);\n if (suffixes == null) {\n continue;\n }\n\n for (HunspellAffix suffix : suffixes) {\n if (hasCrossCheckedFlag(suffix.getFlag(), flags)) {\n int deAffixedLength = length - suffix.getAppend().length();\n // TODO: can we do this in-place?\n String strippedWord = new StringBuilder().append(word, 0, deAffixedLength).append(suffix.getStrip()).toString();\n\n List<Stem> stemList = applyAffix(strippedWord.toCharArray(), strippedWord.length(), suffix, recursionDepth);\n for (Stem stem : stemList) {\n stem.addSuffix(suffix);\n }\n\n stems.addAll(stemList);\n }\n }\n }\n\n for (int i = length - 1; i >= 0; i--) {\n List<HunspellAffix> prefixes = dictionary.lookupPrefix(word, 0, i);\n if (prefixes == null) {\n continue;\n }\n\n for (HunspellAffix prefix : prefixes) {\n if (hasCrossCheckedFlag(prefix.getFlag(), flags)) {\n int deAffixedStart = prefix.getAppend().length();\n int deAffixedLength = length - deAffixedStart;\n\n String strippedWord = new StringBuilder().append(prefix.getStrip())\n .append(word, deAffixedStart, deAffixedLength)\n .toString();\n\n List<Stem> stemList = applyAffix(strippedWord.toCharArray(), strippedWord.length(), prefix, recursionDepth);\n for (Stem stem : stemList) {\n stem.addPrefix(prefix);\n }\n\n stems.addAll(stemList);\n }\n }\n }\n\n return stems;\n }", "public static Set<String> preprocessStemAndTokenizeAddBigramsInSet(String data) {\n\t\t//System.out.println(\"Preprocess data, remove stop words, stem, tokenize and get bi-grams ..\");\n\n\t\tSet<String> transformedSet = new LinkedHashSet<String>();\n\t\tList<String> stemmedList = new ArrayList<String>();\n\n\t\t//System.out.println(\"Stop words length:\" + stopwords.size());\n\t\tTokenizer analyzer = new Tokenizer(Version.LUCENE_30);\n\t\tTokenStream tokenStream = analyzer.tokenStream(\"\", new StringReader(data));\n\t\tTermAttribute termAttribute;\n\t\tString term;\n\t\ttry {\n\t\t\twhile (tokenStream.incrementToken()) {\n\t\t\t\ttermAttribute = tokenStream.getAttribute(TermAttribute.class);\n\t\t\t\tterm = termAttribute.term();\n\t\t\t\tif (digitPattern.matcher(term).find()) //ignore digits\n\t\t\t\t\tcontinue;\n\t\t\t\tif (stopwords.contains(term)) //ignore stopwords\n\t\t\t\t\tcontinue;\n\t\t\t\tif (term.length() <= 1) //ignore single letter words\n\t\t\t\t\tcontinue;\n\t\t\t\tstemmer.setCurrent(term);\n\t\t\t\tstemmer.stem();\n\t\t\t\tstemmedList.add(stemmer.getCurrent());\n\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tString[] ds = stemmedList.toArray(new String[0]);\n\n\t\t/*for(int i=0; i<stemmedList.size(); i++)\n\t\t\tSystem.out.print(ds[i]+\"\\t\");*/\n\n\t\t//add bi-grams\n\t\tfinal int size = 2;\n\t\tfor (int i = 0; i < ds.length; i++) {\n\t\t\ttransformedSet.add(ds[i]); //add single words\n\t\t\tif (i + size <= ds.length) {\n\t\t\t\tString t = \"\";\n\t\t\t\tfor (int j = i; j < i + size; j++) {\n\t\t\t\t\tt += \" \" + ds[j];\n\t\t\t\t}\n\t\t\t\tt = t.trim().replaceAll(\"\\\\s+\", \"_\");\n\t\t\t\ttransformedSet.add(t); //add bi-gram combined with \"_\"\n\t\t\t}\n\t\t}\n\t\t//System.out.println(\" \")\n\t\tstemmedList.clear();\n\t\tstemmedList = null;\n\t\tds = null;\n\t\treturn transformedSet;\n\t}", "public static void Stemmingmethod()throws Exception\n{\n char[] w = new char[501];\n Stemmer s = new Stemmer();\n String prcessedtxt=\"\";\n ArrayList<String> finalsen= new ArrayList();\n BufferedWriter writer = new BufferedWriter(new FileWriter(\"fullyprocessed.txt\"));\n\n String u=null;\n \n {\n FileInputStream in = new FileInputStream(\"stopwordsremoved.txt\");\n\n while(true)\n\n { int ch = in.read();\n if (Character.isLetter((char) ch))\n {\n int j = 0;\n while(true)\n { ch = Character.toLowerCase((char) ch);\n w[j] = (char) ch;\n if (j < 500) j++;\n ch = in.read();\n if (!Character.isLetter((char) ch))\n {\n \n s.add(w, j); \n\n s.stem();\n { \n\n u = s.toString();\n finalsen.add(u);\n /* to test getResultBuffer(), getResultLength() : */\n /* u = new String(s.getResultBuffer(), 0, s.getResultLength()); */\n\n System.out.print(u);\n }\n break;\n }\n }\n }\n if (ch < 0) break;\n System.out.print((char)ch);\n finalsen.add(\"\"+(char)ch);\n\n\n }\n }\n \n \n \n for(String word:finalsen){\n prcessedtxt=prcessedtxt+\"\"+ word;\n }\n writer.write(prcessedtxt+\"\\n\"); \n prcessedtxt=\"\";\n finalsen.clear();\n writer.close();\n\n\n \n}", "public List<Stem> uniqueStems(char word[], int length) {\n List<Stem> stems = new ArrayList<Stem>();\n CharArraySet terms = new CharArraySet(dictionary.getVersion(), 8, dictionary.isIgnoreCase());\n if (dictionary.lookupWord(word, 0, length) != null) {\n stems.add(new Stem(word, length));\n terms.add(word);\n }\n List<Stem> otherStems = stem(word, length, null, 0);\n for (Stem s : otherStems) {\n if (!terms.contains(s.stem)) {\n stems.add(s);\n terms.add(s.stem);\n }\n }\n return stems;\n }", "@Override\r\n public String stem(String word) {\r\n List<String> lemmas = new LinkedList<String>();\r\n // Create an empty Annotation just with the given text\r\n Annotation document = new Annotation(word);\r\n // run all Annotators on this text\r\n this.pipeline.annotate(document);\r\n // Iterate over all of the sentences found\r\n List<CoreMap> sentences = document.get(CoreAnnotations.SentencesAnnotation.class);\r\n for (CoreMap sentence : sentences) {\r\n // Iterate over all tokens in a sentence\r\n for (CoreLabel token : sentence.get(CoreAnnotations.TokensAnnotation.class)) {\r\n // Retrieve and add the lemma for each word into the\r\n // list of lemmas\r\n lemmas.add(token.get(CoreAnnotations.LemmaAnnotation.class));\r\n }\r\n }\r\n return lemmas.get(0);\r\n\r\n }", "public List<String> removeStopWords2(List<String> tokenizedWords) {\n\n List<String> res = new ArrayList<>();\n for(String word : tokenizedWords) {\n if(!this.stopwords.contains(word)) {\n res.add(word);\n }\n }\n return res;\n }", "List<String> tokenize2(String doc) {\n String stemmed = StanfordLemmatizer.stemText(doc);\n List<String> res = new ArrayList<String>();\n\n for (String s : stemmed.split(\"[\\\\p{Punct}\\\\s]+\"))\n res.add(s);\n return res;\n }", "public String stem(String input) {\n String output = \"\";\n // create an empty Annotation just with the given text\n document = new Annotation(input);\n // run all Annotators on this text\n pipeline.annotate(document);\n // traverse words in the document\n for (CoreLabel token : document.get(CoreAnnotations.TokensAnnotation.class)) {\n output = output + token.lemma() + \" \";\n }\n\n return output.trim();\n }", "public abstract boolean isStopWord(String term);", "public static String stemWord(String word) {\n if (word.matches(\".*\\\\s.*\")) throw \n new IllegalArgumentException(\"argument is not a single word: \" + word); \n EnglishStemmer stemmer = new EnglishStemmer();\n stemmer.setCurrent(word);\n stemmer.stem();\n return stemmer.getCurrent();\n // slow way of doing it with jcas\n// List<TokenCanonic> c = getCanonicForms(word, CanonicForm.STEM);\n// return c.get(0).canonic;\n }", "@Test\n\tpublic void testRemoveAllStopWords() {\n\t\tString result;\n\t\ttry {\n\t\t\tresult = sp.removeStopWords(stopWords);\n\t\t\tassertEquals(\"Strings not equal. They should be empty.\", \"\", result);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n\tpublic String getStemming(String phrase) {\n\t\treturn null;\n\t}", "public static String stemWordPorter(String word) {\n Stemmer st = new Stemmer();\n st.add(word.toCharArray(), word.length());\n st.stem();\n return st.toString();\n }", "public void stem()\n\t { k = i - 1;\n\t if (k > 1) { step1(); step2(); step3(); step4(); step5(); step6(); }\n\t i_end = k+1; i = 0;\n\t }", "private static void splitWord() {\n\t\tint i = 1;\r\n\t\tfor(String doc : DocsTest) {\r\n\t\t\tArrayList<String> wordAll = new ArrayList<String>();\r\n\t\t\tfor (String word : doc.split(\"[,.() ; % : / \\t -]\")) {\r\n\t\t\t\tword = word.toLowerCase();\r\n\t\t\t\tif(word.length()>1 && !mathMethod.isNumeric(word)) {\r\n\t\t\t\t\twordAll.add(word);\r\n\t\t\t\t\tif(!wordList.contains(word)) {\r\n\t\t\t\t\t\twordList.add(word);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\twordAll.removeAll(stopword);\r\n\t\t\tDoclist.put(i, wordAll);\r\n\t\t\ti++;\r\n\t\t}\r\n\t\twordList.removeAll(stopword);\r\n\t}", "public boolean isStopWord(String word);", "default String getStem() {\n return meta(\"nlpcraft:nlp:stem\");\n }", "public static String preprocessStemAndTokenizeAddBigramsInString(String data) {\n\t\t//System.out.println(\"Preprocess data, remove stop words, stem, tokenize and get bi-grams ..\");\n\n\t\tSet<String> transformedSet = new LinkedHashSet<String>();\n\t\tList<String> stemmedList = new ArrayList<String>();\n\n\t\tTokenizer analyzer = new Tokenizer(Version.LUCENE_30);\n\t\tTokenStream tokenStream = analyzer.tokenStream(\"\", new StringReader(data));\n\t\tTermAttribute termAttribute;\n\t\tString term;\n\t\ttry {\n\t\t\twhile (tokenStream.incrementToken()) {\n\t\t\t\ttermAttribute = tokenStream.getAttribute(TermAttribute.class);\n\t\t\t\tterm = termAttribute.term();\n\t\t\t\tif (digitPattern.matcher(term).find()) //ignore digits\n\t\t\t\t\tcontinue;\n\t\t\t\tif (stopwords.contains(term)) //ignore stopwords\n\t\t\t\t\tcontinue;\n\t\t\t\tif (term.length() <= 1) //ignore stopwords\n\t\t\t\t\tcontinue;\n\t\t\t\tstemmer.setCurrent(term);\n\t\t\t\tstemmer.stem();\n\t\t\t\tstemmedList.add(stemmer.getCurrent());\n\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tString[] ds = stemmedList.toArray(new String[0]);\n\n\t\t/*for(int i=0; i<stemmedList.size(); i++)\n\t\t\tSystem.out.print(ds[i]+\"\\t\");*/\n\n\t\t//add bi-grams\n\t\tfinal int size = 2;\n\t\tfor (int i = 0; i < ds.length; i++) {\n\t\t\ttransformedSet.add(ds[i]); //add single words\n\t\t\tif (i + size <= ds.length) {\n\t\t\t\tString t = \"\";\n\t\t\t\tfor (int j = i; j < i + size; j++) {\n\t\t\t\t\tt += \" \" + ds[j];\n\t\t\t\t}\n\t\t\t\tt = t.trim().replaceAll(\"\\\\s+\", \"_\");\n\t\t\t\ttransformedSet.add(t); //add bi-gram combined with \"_\"\n\t\t\t}\n\t\t}\n\t\t//System.out.println(transformedSet.toArray(new String[transformedSet.size()]).toString());\n\t\treturn StringUtils.join( transformedSet.toArray(new String[transformedSet.size()]), \" \");\n\t\t\n\t}", "@Override\r\n\t\t\tpublic boolean isStopWord(String term) {\n\t\t\t\treturn false;\r\n\t\t\t}", "public String Stem( String word )\n {\n // check if we already know the word\n String stemmedword = AllWords.get(word);\n if ( stemmedword != null )\n return stemmedword; // return it if we already know it\n\n // don't check words with digits in them\n // if ( containsNumbers (word) == true )\n // stemmedword = null;\n // else\t// unknown word: try to stem it\n stemmedword = StemWordWithWordNet (word);\n\n if ( stemmedword != null )\n {\n // word was recognized and stemmed with wordnet:\n // add it to hashmap and return the stemmed word\n AllWords.put( word, stemmedword );\n return stemmedword;\n }\n // word could not be stemmed by wordnet,\n // thus it is no correct english word\n // just add it to the list of known words so\n // we won't have to look it up again\n AllWords.put( word, word );\n return word;\n }", "public char[] getStem() {\n return stem;\n }", "public RemoverStopWords() {\n\t\tBufferedReader br = null;\n\t\ttry {\n\t\t\tbr = new BufferedReader(new FileReader(\"stopwords_en.txt\"));\n\t\t\tString line;\n\n\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t\tstop_words.add(line.trim());\n\t\t\t}\n\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (br != null) {\n\t\t\t\t\tbr.close();\n\t\t\t\t}\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "private String stemmingForAWord(String identifiedWord) {\n String word;\n if (identifiedWord.contains(\"_\")) {\n word = identifiedWord;\n } else {\n word = morphology.stem(identifiedWord);\n }\n return word;\n }", "private String getStemming(String line) throws IOException {\n\t\treturn line;\n\t\t// return Stemmer.processTweets(line);\n\t}", "public static void removeStopwords() throws Exception\n {\n //converting sentence to lowercase \n String[] stopwords=getstopwords(\"Stopwords.txt\");\n //FileWriter f=new FileWriter(\"output.txt\");\n String line=\"\";\n String prcessedtxt=\"\";\n Scanner scanner = new Scanner(new File(\"Sentence.txt\"));\n Scanner newscanner = new Scanner(new File(\"Sentence.txt\"));\n\n BufferedWriter writer = new BufferedWriter(new FileWriter(\"stopwordsremoved.txt\"));\n FileInputStream fstream = new FileInputStream(\"Sentence.txt\");\n BufferedReader br = new BufferedReader(new InputStreamReader(fstream));\n LineNumberReader lineNumberReader =\n new LineNumberReader(br);\n //BufferedReader br = new BufferedReader(new FileReader(\"Sentence.txt\"));\n\n int counter=0;\n int subc=0;\n ArrayList<String> wordList= new ArrayList();\n br.mark(3);\n \n\n HashMap<String, String> capitalCities = new HashMap<String, String>();\n \n\n while (scanner.hasNextLine()) {\n\n line = scanner.nextLine().trim();\n line=line.replaceAll(\"\\\\p{Punct}\", \"\");\n\n line=\"\"+line;\n\n\n \n wordList.addAll(Arrays.asList(line.split(\"[\\\\t, ]\")));\n String title=wordList.get(0);\n wordList.remove(0);\n wordList.add(0,\"\\t\");\n \n List<String> StopwordList= new ArrayList();\n //adding stop words in another array.\n StopwordList.addAll(Arrays.asList(stopwords));\n //removing stopwords from sentence.\n wordList.removeAll(StopwordList);\n \n for(String word:wordList){\n prcessedtxt=prcessedtxt+\" \"+ word;\n }\n writer.write(title+prcessedtxt+\"\\n\"); \n // System.out.print(wordList.toString());\n prcessedtxt=\"\";\n wordList.clear();\n\n\n counter++;\n \n \n\n} \n \n writer.close();\n \nStemmingmethod();\n}", "@Test\n public void tweakingEnglishStopwordsAndStemming() throws IOException {\n\n LanguageComponents english = LanguageComponents.load(\"English\");\n\n // Pass-through of all suppliers to English defaults.\n LinkedHashMap<Class<?>, Supplier<?>> componentSuppliers = new LinkedHashMap<>();\n for (Class<?> clazz : english.components()) {\n componentSuppliers.put(clazz, () -> english.get(clazz));\n }\n\n // Now override the suppliers of Stemmer and LexicalData interfaces. These suppliers should be\n // thread-safe, but the instances of corresponding components will not be reused across threads.\n\n // Override the Stemmer supplier.\n componentSuppliers.put(\n Stemmer.class,\n (Supplier<Stemmer>) () -> (word) -> word.toString().toLowerCase(Locale.ROOT));\n\n // Override the default lexical data.\n LexicalData lexicalData =\n new LexicalData() {\n Set<String> ignored = new HashSet<>(Arrays.asList(\"from\", \"what\"));\n\n @Override\n public boolean ignoreLabel(CharSequence labelCandidate) {\n // Ignore any label that has a substring 'data' in it; example.\n return labelCandidate.toString().toLowerCase(Locale.ROOT).contains(\"data\");\n }\n\n @Override\n public boolean ignoreWord(CharSequence word) {\n return word.length() <= 3 || ignored.contains(word.toString());\n }\n };\n componentSuppliers.put(LexicalData.class, () -> lexicalData);\n\n // The custom set of language components can be reused for multiple clustering requests.\n LanguageComponents customLanguage =\n new LanguageComponents(\"English (customized)\", componentSuppliers);\n\n LingoClusteringAlgorithm algorithm = new LingoClusteringAlgorithm();\n algorithm.desiredClusterCount.set(10);\n List<Cluster<Document>> clusters =\n algorithm.cluster(ExamplesData.documentStream(), customLanguage);\n System.out.println(\"Clusters:\");\n ExamplesCommon.printClusters(clusters);\n }", "public List<String> stopTermRemoval(List<String> terms) {\r\n\t\tif(swr == null)\r\n\t\t\ttry {\r\n\t\t\t\tswr = new StopTermRemoval(SVMClassifier.class.getClassLoader().getResource(\"stopwords.txt\").openStream());\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\tswr.removeSymbolTerms(terms);\r\n\t\tswr.removeStopTerms(terms);\r\n\t\treturn terms;\r\n\t}", "public StopWordRemover( ) {\n\t\t// Load and store the stop words from the fileinputstream with appropriate data structure.\n\t\t// NT: address of stopword.txt is Path.StopwordDir\n\t}", "public List < Stem > getSelectedStem() {\r\n\r\n List < Stem > result = new ArrayList < Stem >();\r\n List < Sortable > selected = this.stemSearch.getSelected();\r\n for (Sortable sortable : selected) {\r\n result.add((Stem) sortable);\r\n }\r\n return result;\r\n }", "public static ArrayList<String> getTerms(String comment){\n\n\t\tString[] terms = comment.split(\"[^a-zA-Z]+\");\n\t\t//if(terms.length == 0) System.out.println(\"error: \" + comment);\n\t\tArrayList<String> termsarray = new ArrayList<String>();\n\t\tfor(int i=0;i<terms.length;i++){\n\t\t\t\n\t\t\tString iterm = terms[i].toLowerCase();\n\t\t\tboolean isStopWord = false;\n\t\t\tfor(String s : stopWord){\n\t\t\t\tif(iterm.equals(s)){\n\t\t\t\t\tisStopWord = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(isStopWord == true)\n\t\t\t\tcontinue;\n\t\t\t\n\t\t\tStemmer stemmer = new Stemmer();\n\t\t\tstemmer.add(iterm.toCharArray(), iterm.length());\n\t\t\tstemmer.stem();\n\t\t\titerm = stemmer.toString();\n\t\t\t\n\t\t\t//System.out.println(iterm);\n\t\t\tif(iterm.length() >=2 && !termsarray.contains(iterm))termsarray.add(iterm);\n\t\t}\n\t\n\t\treturn termsarray;\n\t}", "public Set<String> getStopwords() {\n return stopwords;\n }", "private StopWords() {\r\n\t\tPath source = Paths.get(\"./dat/zaustavne_rijeci.txt\");\r\n\t\ttry {\r\n\t\t\tbody = new String(Files.readAllBytes(source),\r\n\t\t\t\t\tStandardCharsets.UTF_8);\r\n\t\t} catch (IOException ignorable) {\r\n\t\t}\r\n\t\twords = new LinkedHashSet<>();\r\n\t\tfillSet();\r\n\t}", "public static String removeStopWords(String textFile) throws Exception {\n\t //CharArraySet stopWords = EnglishAnalyzer.getDefaultStopSet();\n\t\t\n\t\tStandardAnalyzer analyser = new StandardAnalyzer();\n\t TokenStream tokenStream = new StandardTokenizer(new StringReader(textFile.trim()));\n\t tokenStream = new StopFilter(tokenStream, analyser.STOP_WORDS_SET);\n\t \n\t BufferedReader br = new BufferedReader(new FileReader(\"stopwords.txt\"));\n\t String line = null;\n\t List<String> stopw = new ArrayList<String>();\n\t int i =0;\n\t line = br.readLine();\n\t while(line != null){\n\t\t stopw.add(line);\n\t\t line = br.readLine();\n\t\t}\n\t \n\t tokenStream = new StopFilter(tokenStream, StopFilter.makeStopSet(stopw));\n\t \n\t StringBuilder sb = new StringBuilder();\n\t CharTermAttribute charTermAttribute = tokenStream.addAttribute(CharTermAttribute.class);\n\t tokenStream.reset();\n\t while (tokenStream.incrementToken()) {\n\t String term = charTermAttribute.toString();\n\t if(term.length() > 2)\n\t \tsb.append(term + \" \");\n\t }\n\t return sb.toString();\n\t}", "public StemSearch getStemSearch() {\r\n return this.stemSearch;\r\n }", "public void setStem (Glyph stem)\r\n {\r\n this.stem = stem;\r\n }", "public static List<String> devideSentenceIntoWords(String sentence) {\n\n String[] wordArray = sentence.toLowerCase().split(\" \");\n return Arrays.stream(wordArray)\n .map(String::trim)\n .filter(w -> !w.replace(CharacterUtils.WORD_DEVIDER, \"\").trim().isEmpty())\n .collect(Collectors.toList());\n }", "public List<Trie> findStemDescending(String stem) {\n if (stem == null)\n return new ArrayList<>();\n Trie start = find(stem);\n if (start == null)\n return new ArrayList<>();\n return start.getAll();\n }", "@Override\r\n\t\t\tpublic Set<String> getStopWords() {\n\t\t\t\treturn null;\r\n\t\t\t}", "public Set<String> getStopWords() throws Exception{\n\tFile file = new File(\"stopWords/stopwords.txt\");\n\tHashSet<String> stopwords = new HashSet<>();\n\tBufferedReader br = new BufferedReader(new FileReader(file));\n\tString line;\n\twhile((line=br.readLine())!=null){\n\t\tString[] tokens = line.split(\" \");\n\t\tfor(String token : tokens){\n\t\t\tif(!stopwords.contains(token)){\n\t\t\t\tstopwords.add(token);\n\t\t\t}\n\t\t}\n\t}\n\tbr.close();\n\treturn stopwords;\n\t}", "public String SnowballStemmingDemo(String token) {\n\t\tSnowballStemmer stemmer = new englishStemmer();\n\t\tstemmer.setCurrent(token);\n\t\tif (stemmer.stem())\n\t\t\treturn stemmer.getCurrent();\n\t\telse\n\t\t\treturn token;\n\t}", "SList evenWords();", "public boolean isStem() {\n return this.type == Type.STEM;\n }", "protected void affixStem(\r\n String word, Collection analyses, AnalyserContext context)\r\n {\r\n ConsumerManager cm = context.getConsumerManager();\r\n\r\n AffixCache affixCache = cm.getAffixCache();\r\n String[] splits = affixCache.getSplit();\r\n\r\n int start, until, inc;\r\n boolean suffix = context.suffix();\r\n\r\n if (suffix)\r\n {\r\n start = (splits.length - 1) / 2;\r\n until = 0;\r\n inc = -1;\r\n if (start < until)\r\n {\r\n return;\r\n }\r\n }\r\n else\r\n {\r\n start = 1;\r\n until = (splits.length - 1) / 2;\r\n inc = 1;\r\n\r\n if (start > until)\r\n {\r\n return;\r\n }\r\n }\r\n\r\n String[] lowerCaseSplits = affixCache.getLowerCaseSplit();\r\n\r\n List[] cache = affixCache.getCache();\r\n List[] crossCache = affixCache.getCrossableCache();\r\n\r\n BooleanResults conditionResults = context.getConditionResults();\r\n\r\n AffixConsumer consumer = cm.getAffixConsumer();\r\n consumer.setStems(analyses);\r\n\r\n AffixEntries rulemap = context.getAffixEntries();\r\n AffixEntries previous = null;\r\n \r\n // list of applicable affix maps\r\n List rulesMap = new LinkedList();\r\n\r\n int ll = 0;\r\n int i;\r\n\r\n boolean shortestFirst = context.shortestAffixFirst();\r\n // index of dash; on dash affix do not check affix \r\n int dash = -1;\r\n \r\n for(i = start; i != until; i += inc)\r\n {\r\n char c = lowerCaseSplits[i + i].charAt(suffix ? 0 : ll++);\r\n if ((rulemap = rulemap.getMap(c)) == null)\r\n {\r\n if (previous != null &&\r\n Character.getType(c) == Character.DASH_PUNCTUATION)\r\n {\r\n dash = i;\r\n if (shortestFirst)\r\n {\r\n rulesMap.add(0, previous);\r\n }\r\n else\r\n {\r\n rulesMap.add(previous);\r\n }\r\n i += inc;\r\n }\r\n break;\r\n }\r\n previous = rulemap; \r\n if (shortestFirst)\r\n {\r\n rulesMap.add(0, rulemap);\r\n }\r\n else\r\n {\r\n rulesMap.add(rulemap);\r\n }\r\n }\r\n\r\n if (shortestFirst)\r\n {\r\n i = start;\r\n inc = -inc;\r\n }\r\n else\r\n {\r\n i -= inc;\r\n }\r\n \r\n ListIterator rit = rulesMap.listIterator(rulesMap.size());\r\n\r\n outer: for(; rit.hasPrevious(); i -= inc)\r\n {\r\n Map rules = ((AffixEntries)rit.previous()).getByStrip();\r\n if (rules == null)\r\n {\r\n continue;\r\n }\r\n \r\n // check if remainder satisfies any of rules;\r\n // remainder is the word after append/prepend has been cut off\r\n int j = i + i + 1;\r\n String remainder = splits[j];\r\n String lower = lowerCaseSplits[j];\r\n \r\n // tell conditionResults this is a new check round\r\n conditionResults.nextRound();\r\n Iterator it = rules.values().iterator();\r\n while (it.hasNext())\r\n {\r\n Object o = it.next();\r\n if (o instanceof Collection) // multiple rules with the same strip\r\n {\r\n boolean sub = false;\r\n consumer.clearCases();\r\n // eit runs on rules by strip\r\n Iterator eit = ((Collection)o).iterator();\r\n while (eit.hasNext())\r\n { \r\n AffixEntry affix = (AffixEntry)eit.next();\r\n // do not try an affix with flags'nd case occurring\r\n // in cases - the analysis wouldn't be new\r\n if (consumer.affixDone(affix))\r\n {\r\n continue;\r\n }\r\n\r\n if (dash == i || affix.admitStem(lower, conditionResults))\r\n {\r\n consumer.setAffix(affix, true);\r\n // as we're running on affixes with the same strip,\r\n // stem and entries don't change after strip added to\r\n // remainder first\r\n if (!sub)\r\n {\r\n sub = true;\r\n if (affix.same())\r\n {\r\n if (affixSame(word, affixCache.getLowerCaseWord(),\r\n context, consumer))\r\n {\r\n return;\r\n }\r\n }\r\n else if (dash != i && affix.getStripLength() != 0)\r\n {\r\n String stem = affix.addStrip(remainder);\r\n if (affixStem(\r\n stem, stem.toLowerCase(), context, consumer))\r\n {\r\n return;\r\n }\r\n }\r\n else if (affixStem(remainder, lower, context, consumer))\r\n {\r\n return;\r\n }\r\n }\r\n // affix has changed on consumer!\r\n else if (!consumer.continueStemming(word))\r\n {\r\n return;\r\n }\r\n\r\n cache[i].add(affix);\r\n if (context.top() && affix.crossable())\r\n {\r\n crossCache[i].add(affix);\r\n }\r\n } // end of if affix admits remainder\r\n } // end of iterator on rule collection\r\n } // end of if collection\r\n else // single affix rule\r\n {\r\n AffixEntry affix = (AffixEntry)o;\r\n if (dash == i || affix.admitStem(lower, conditionResults))\r\n {\r\n consumer.setAffix(affix, false);\r\n if (affix.same())\r\n {\r\n if (affixSame(word, affixCache.getLowerCaseWord(),\r\n context, consumer))\r\n {\r\n return;\r\n }\r\n }\r\n else if (dash != i && affix.getStripLength() != 0)\r\n {\r\n // add strip to remainder to get stem\r\n String stem = affix.addStrip(remainder);\r\n if (affixStem(stem, stem.toLowerCase(), context, consumer))\r\n {\r\n return;\r\n }\r\n }\r\n else if (affixStem(remainder, lower, context, consumer))\r\n {\r\n return;\r\n }\r\n\r\n cache[i].add(affix);\r\n // recall that crossStem is called only on top context\r\n if (context.top() && affix.crossable())\r\n {\r\n crossCache[i].add(affix);\r\n }\r\n } // end of if affix admits remainder\r\n } // end of single affix rule\r\n } // end of iterator on rules\r\n } // end of iterator on splits\r\n }", "@Override\n public Builder stopWords(@NonNull List<String> stopList) {\n super.stopWords(stopList);\n return this;\n }", "public String PorterStemmingDemo(String token) {\n\t\tporterStemmer stemmer = new porterStemmer();\n\t\tstemmer.setCurrent(token);\n\t\tif (stemmer.stem())\n\t\t\treturn stemmer.getCurrent();\n\t\telse\n\t\t\treturn token;\n\t}", "@Override\r\n public boolean isStem ()\r\n {\r\n return getShape() == Shape.STEM;\r\n }", "public synchronized Set<String> getStopWords() throws Exception {\r\n\t\t\r\n\t\tif(stopWords == null){\r\n\t\t\tMTDArquivoEnum enumerado = MTDArquivoEnum.STOP_WORDS;\r\n\t\t\tstopWords = new HashSet<String>();\r\n\t\t\tMTDIterator<String> it = enumerado.lineIterator();\r\n\t\t\twhile (it.hasNext()) {\r\n\t\t\t\tstopWords.add(it.next());\r\n\t\t\t}\r\n\t\t\tit.close();\r\n\t\t}\r\n \r\n return stopWords;\r\n }", "public Removalstops()\n {\n stopWords.add(\"am\");\n stopWords.add(\"my\");\nstopWords.add(\"at\");\nstopWords.add(\"a\");\nstopWords.add(\"i\");\nstopWords.add(\"is\");\nstopWords.add(\"of\");\nstopWords.add(\"have\");\nstopWords.add(\"--\");\nstopWords.add(\"do\");\nstopWords.add(\"the\");\nstopWords.add(\"was\");\nstopWords.add(\"iam\");\nstopWords.add(\"there\");\nstopWords.add(\"what\");\nstopWords.add(\"for\");\nstopWords.add(\"in\");\nstopWords.add(\"very\");\nstopWords.add(\"and\");\nstopWords.add(\"to\");\nstopWords.add(\"often\");\nstopWords.add(\"because\");\nstopWords.add(\"in\");\nstopWords.add(\"an\");\nstopWords.add(\"can\");\nstopWords.add(\"via\");\nstopWords.add(\"even\");\nstopWords.add(\"as\");\nstopWords.add(\"best\");\nstopWords.add(\"been\");\nstopWords.add(\"into\");\nstopWords.add(\"by\");\nstopWords.add(\"around\");\nstopWords.add(\"being\");\nstopWords.add(\"from\");\nstopWords.add(\"etc\");\nstopWords.add(\"his\");\nstopWords.add(\"do\");\nstopWords.add(\"have\");\nstopWords.add(\"had\"); \nstopWords.add(\"able\");\nstopWords.add(\"about\");\nstopWords.add(\"above\");\nstopWords.add(\"abroad\");\nstopWords.add(\"according\");\nstopWords.add(\"accordingly\");\nstopWords.add(\"across\");\nstopWords.add(\"actually\");\nstopWords.add(\"adj\");\nstopWords.add(\"after\");\nstopWords.add(\"afterwards\");\nstopWords.add(\"again\");\nstopWords.add(\"against\");\nstopWords.add(\"ago\");\nstopWords.add(\"ahead\");\nstopWords.add(\"ain't\");\nstopWords.add(\"all\");\nstopWords.add(\"allow\");\nstopWords.add(\"allows\");\nstopWords.add(\"almost\");\nstopWords.add(\"alone\");\nstopWords.add(\"along\");\nstopWords.add(\"alongside\");\nstopWords.add(\"already\");\nstopWords.add(\"also\");\nstopWords.add(\"although\");\nstopWords.add(\"always\");\nstopWords.add(\"am\");\nstopWords.add(\"amid\");\nstopWords.add(\"amidst\");\nstopWords.add(\"among\");\nstopWords.add(\"amongst\");\nstopWords.add(\"an\");\nstopWords.add(\"and\");\nstopWords.add(\"another\");\nstopWords.add(\"any\");\nstopWords.add(\"anybody\");\nstopWords.add(\"anyhow\");\nstopWords.add(\"anyone\");\nstopWords.add(\"anything\");\nstopWords.add(\"anyway\");\nstopWords.add(\"anyways\");\nstopWords.add(\"anywhere\");\nstopWords.add(\"apart\");\nstopWords.add(\"appear\");\nstopWords.add(\"appreciate\");\nstopWords.add(\"appropriate\");\nstopWords.add(\"are\");\nstopWords.add(\"aren't\");\nstopWords.add(\"around\");\nstopWords.add(\"as\");\nstopWords.add(\"a's\");\nstopWords.add(\"aside\");\nstopWords.add(\"ask\");\nstopWords.add(\"asking\");\nstopWords.add(\"associated\");\nstopWords.add(\"at\");\nstopWords.add(\"available\");\nstopWords.add(\"away\");\nstopWords.add(\"awfully\");\nstopWords.add(\"back\");\nstopWords.add(\"backward\");\nstopWords.add(\"backwards\");\nstopWords.add(\"be\");\nstopWords.add(\"became\");\nstopWords.add(\"beacause\");\nstopWords.add(\"become\");\nstopWords.add(\"becomes\");\nstopWords.add(\"becoming\");\nstopWords.add(\"been\");\nstopWords.add(\"before\");\nstopWords.add(\"beforehand\");\nstopWords.add(\"begin\");\nstopWords.add(\"behind\");\nstopWords.add(\"being\");\nstopWords.add(\"believe\");\nstopWords.add(\"below\");\nstopWords.add(\"beside\");\nstopWords.add(\"besides\");\nstopWords.add(\"best\");\nstopWords.add(\"better\");\nstopWords.add(\"between\");\nstopWords.add(\"beyond\");\nstopWords.add(\"both\");\nstopWords.add(\"brief\");\nstopWords.add(\"but\");\nstopWords.add(\"by\");\nstopWords.add(\"came\");\nstopWords.add(\"can\");\nstopWords.add(\"cannot\");\nstopWords.add(\"cant\");\nstopWords.add(\"can't\");\nstopWords.add(\"caption\");\nstopWords.add(\"cause\");\nstopWords.add(\"causes\");\nstopWords.add(\"certain\");\nstopWords.add(\"cetrainly\");\nstopWords.add(\"changes\");\nstopWords.add(\"clearly\");\nstopWords.add(\"c'mon\");\nstopWords.add(\"co\");\nstopWords.add(\"co.\");\nstopWords.add(\"com\");\nstopWords.add(\"come\");\nstopWords.add(\"comes\");\nstopWords.add(\"concerning\");\nstopWords.add(\"consequently\");\nstopWords.add(\"consider\");\nstopWords.add(\"considering\");\nstopWords.add(\"could\");\nstopWords.add(\"couldn't\");\nstopWords.add(\"c's\");\nstopWords.add(\"currently\");\nstopWords.add(\"dare\");\nstopWords.add(\"daren't\");\nstopWords.add(\"definitely\");\nstopWords.add(\"described\");\nstopWords.add(\"despite\");\nstopWords.add(\"did\");\nstopWords.add(\"didn't\");\nstopWords.add(\"different\");\nstopWords.add(\"directly\");\nstopWords.add(\"do\");\nstopWords.add(\"does\");\nstopWords.add(\"doesn't\");\nstopWords.add(\"doing\");\nstopWords.add(\"done\");\nstopWords.add(\"don't\");\nstopWords.add(\"down\");\nstopWords.add(\"downwards\");\nstopWords.add(\"during\");\nstopWords.add(\"each\");\nstopWords.add(\"edu\");\nstopWords.add(\"eg\");\nstopWords.add(\"eight\");\nstopWords.add(\"eighty\");\nstopWords.add(\"either\");\nstopWords.add(\"else\");\nstopWords.add(\"elsewhere\");\nstopWords.add(\"end\");\nstopWords.add(\"ending\");\nstopWords.add(\"enough\");\nstopWords.add(\"entirely\");\nstopWords.add(\"especially\");\nstopWords.add(\"et\");\nstopWords.add(\"etc\");\nstopWords.add(\"even\");\nstopWords.add(\"evenmore\");\nstopWords.add(\"every\");\nstopWords.add(\"everybody\");\nstopWords.add(\"everyone\");\nstopWords.add(\"everything\");\nstopWords.add(\"everywhere\");\nstopWords.add(\"ex\");\nstopWords.add(\"exactly\");\nstopWords.add(\"example\");\nstopWords.add(\"except\");\nstopWords.add(\"fairly\");\nstopWords.add(\"far\");\nstopWords.add(\"farhter\");\nstopWords.add(\"few\");\nstopWords.add(\"fewer\");\nstopWords.add(\"fifth\");\nstopWords.add(\"first\");\nstopWords.add(\"five\");\nstopWords.add(\"followed\");\nstopWords.add(\"following\");\nstopWords.add(\"follows\");\nstopWords.add(\"for\");\nstopWords.add(\"forever\");\nstopWords.add(\"former\");\nstopWords.add(\"formerly\");\nstopWords.add(\"forth\");\nstopWords.add(\"forward\");\nstopWords.add(\"found\");\nstopWords.add(\"four\");\nstopWords.add(\"from\");\nstopWords.add(\"further\");\nstopWords.add(\"furthermore\");\nstopWords.add(\"get\");\nstopWords.add(\"gets\");\nstopWords.add(\"getting\");\nstopWords.add(\"given\");\nstopWords.add(\"gives\");\nstopWords.add(\"go\");\nstopWords.add(\"goes\");\nstopWords.add(\"going\");\nstopWords.add(\"gone\");\nstopWords.add(\"got\");\nstopWords.add(\"gotten\");\nstopWords.add(\"greetings\");\nstopWords.add(\"had\");\nstopWords.add(\"hadn't\");\nstopWords.add(\"half\");\nstopWords.add(\"happens\");\nstopWords.add(\"hardly\");\nstopWords.add(\"has\");\nstopWords.add(\"hasn't\");\nstopWords.add(\"have\");\nstopWords.add(\"haven't\");\nstopWords.add(\"having\");\nstopWords.add(\"he\");\nstopWords.add(\"he'd\");\nstopWords.add(\"he'll\");\nstopWords.add(\"hello\");\nstopWords.add(\"help\");\nstopWords.add(\"hence\");\nstopWords.add(\"her\");\nstopWords.add(\"here\");\nstopWords.add(\"hereafter\");\nstopWords.add(\"hereby\");\nstopWords.add(\"herein\");\nstopWords.add(\"here's\");\nstopWords.add(\"hereupon\");\nstopWords.add(\"hers\");\nstopWords.add(\"herself\");\nstopWords.add(\"he's\");\nstopWords.add(\"hi\");\nstopWords.add(\"him\");\nstopWords.add(\"himself\");\nstopWords.add(\"his\");\nstopWords.add(\"hither\");\nstopWords.add(\"hopefully\");\nstopWords.add(\"how\");\nstopWords.add(\"howbeit\");\nstopWords.add(\"however\");\nstopWords.add(\"however\");\nstopWords.add(\"hundred\");\nstopWords.add(\"i'd\");\nstopWords.add(\"ie\");\nstopWords.add(\"if\");\nstopWords.add(\"ignored\");\nstopWords.add(\"i'll\");\nstopWords.add(\"i'm\");\nstopWords.add(\"immediate\");\nstopWords.add(\"in\");\nstopWords.add(\"iansmuch\");\nstopWords.add(\"inc\");\nstopWords.add(\"inc.\");\nstopWords.add(\"indeed\");\nstopWords.add(\"indicate\");\nstopWords.add(\"indicated\");\nstopWords.add(\"indicates\");\nstopWords.add(\"inner\");\nstopWords.add(\"inside\");\nstopWords.add(\"insofar\");\nstopWords.add(\"into\");\nstopWords.add(\"inward\");\nstopWords.add(\"is\");\nstopWords.add(\"isn't\");\nstopWords.add(\"it\");\nstopWords.add(\"it'd\");\nstopWords.add(\"it'll\");\nstopWords.add(\"its\");\nstopWords.add(\"it's\");\nstopWords.add(\"itself\");\nstopWords.add(\"i've\");\nstopWords.add(\"just\");\nstopWords.add(\"k\");\nstopWords.add(\"keep\");\nstopWords.add(\"keeps\");\nstopWords.add(\"kept\");\nstopWords.add(\"know\");\nstopWords.add(\"knows\");\nstopWords.add(\"known\");\nstopWords.add(\"last\");\nstopWords.add(\"lately\");\nstopWords.add(\"later\");\nstopWords.add(\"latter\");\nstopWords.add(\"latterly\");\nstopWords.add(\"least\");\nstopWords.add(\"less\");\nstopWords.add(\"let\");\nstopWords.add(\"let's\");\nstopWords.add(\"like\");\nstopWords.add(\"liked\");\nstopWords.add(\"likely\");\nstopWords.add(\"likewise\");\nstopWords.add(\"little\");\nstopWords.add(\"look\");\nstopWords.add(\"looks\");\nstopWords.add(\"low\");\nstopWords.add(\"lower\");\nstopWords.add(\"ltd\");\nstopWords.add(\"made\");\nstopWords.add(\"mainly\");\nstopWords.add(\"make\");\nstopWords.add(\"makes\");\nstopWords.add(\"many\");\nstopWords.add(\"may\");\nstopWords.add(\"maybe\");\nstopWords.add(\"mayn't\");\nstopWords.add(\"me\");\nstopWords.add(\"mean\");\nstopWords.add(\"meanwhile\");\nstopWords.add(\"merely\");\nstopWords.add(\"might\");\nstopWords.add(\"mightn't\");\nstopWords.add(\"mine\");\nstopWords.add(\"minus\");\nstopWords.add(\"miss\");\nstopWords.add(\"more\");\nstopWords.add(\"moreover\");\nstopWords.add(\"most\");\nstopWords.add(\"mostly\");\nstopWords.add(\"mr\");\nstopWords.add(\"mrs\");\nstopWords.add(\"much\");\nstopWords.add(\"must\");\nstopWords.add(\"mustn't\");\nstopWords.add(\"my\");\nstopWords.add(\"myself\");\nstopWords.add(\"name\");\nstopWords.add(\"namely\");\nstopWords.add(\"nd\");\nstopWords.add(\"near\");\nstopWords.add(\"nearly\");\nstopWords.add(\"necessary\");\nstopWords.add(\"need\");\nstopWords.add(\"needn't\");\nstopWords.add(\"needs\");\nstopWords.add(\"neither\");\nstopWords.add(\"never\");\nstopWords.add(\"neverf\");\nstopWords.add(\"neverless\");\nstopWords.add(\"nevertheless\");\nstopWords.add(\"new\");\nstopWords.add(\"next\");\nstopWords.add(\"nine\");\nstopWords.add(\"ninety\");\nstopWords.add(\"no\");\nstopWords.add(\"nobody\");\nstopWords.add(\"non\");\nstopWords.add(\"none\");\nstopWords.add(\"nonetheless\");\nstopWords.add(\"noone\");\nstopWords.add(\"no-one\");\nstopWords.add(\"nor\");\nstopWords.add(\"normally\");\nstopWords.add(\"not\");\nstopWords.add(\"nothing\");\nstopWords.add(\"notwithstanding\");\nstopWords.add(\"novel\");\nstopWords.add(\"now\");\nstopWords.add(\"nowwhere\");\nstopWords.add(\"obviously\");\nstopWords.add(\"of\");\nstopWords.add(\"off\");\nstopWords.add(\"often\");\nstopWords.add(\"oh\");\nstopWords.add(\"ok\");\nstopWords.add(\"okay\");\nstopWords.add(\"old\");\nstopWords.add(\"on\");\nstopWords.add(\"once\");\nstopWords.add(\"one\");\nstopWords.add(\"ones\");\nstopWords.add(\"one's\");\nstopWords.add(\"only\");\nstopWords.add(\"onto\");\nstopWords.add(\"opposite\");\nstopWords.add(\"or\");\nstopWords.add(\"other\");\nstopWords.add(\"others\");\nstopWords.add(\"otherwise\");\nstopWords.add(\"ought\");\nstopWords.add(\"oughtn't\");\nstopWords.add(\"our\");\nstopWords.add(\"ourselves\");\nstopWords.add(\"out\");\nstopWords.add(\"outside\");\nstopWords.add(\"over\");\nstopWords.add(\"overall\");\nstopWords.add(\"own\");\nstopWords.add(\"particular\");\nstopWords.add(\"particularly\");\nstopWords.add(\"past\");\nstopWords.add(\"per\");\nstopWords.add(\"perhaps\");\nstopWords.add(\"placed\");\nstopWords.add(\"please\");\nstopWords.add(\"plus\");\nstopWords.add(\"possible\");\nstopWords.add(\"presumably\");\nstopWords.add(\"probably\");\nstopWords.add(\"provided\");\nstopWords.add(\"provides\");\nstopWords.add(\"que\");\nstopWords.add(\"quite\");\nstopWords.add(\"qv\");\nstopWords.add(\"rather\");\nstopWords.add(\"rd\");\nstopWords.add(\"re\");\nstopWords.add(\"really\");\nstopWords.add(\"reasonably\");\nstopWords.add(\"recent\");\nstopWords.add(\"recently\");\nstopWords.add(\"regarding\");\nstopWords.add(\"regardless\");\nstopWords.add(\"regards\");\nstopWords.add(\"relatively\");\nstopWords.add(\"respectively\");\nstopWords.add(\"right\");\nstopWords.add(\"round\");\nstopWords.add(\"said\");\nstopWords.add(\"same\");\nstopWords.add(\"saw\");\nstopWords.add(\"say\");\nstopWords.add(\"saying\");\nstopWords.add(\"says\");\nstopWords.add(\"second\");\nstopWords.add(\"secondly\");\nstopWords.add(\"see\");\nstopWords.add(\"seeing\");\nstopWords.add(\"seem\");\nstopWords.add(\"seemed\");\nstopWords.add(\"seeming\");\nstopWords.add(\"seems\");\nstopWords.add(\"seen\");\nstopWords.add(\"self\");\nstopWords.add(\"selves\");\nstopWords.add(\"sensible\");\nstopWords.add(\"sent\");\nstopWords.add(\"serious\");\nstopWords.add(\"seriously\");\nstopWords.add(\"seven\");\nstopWords.add(\"several\");\nstopWords.add(\"shall\");\nstopWords.add(\"shan't\");\nstopWords.add(\"she\");\nstopWords.add(\"she'd\");\nstopWords.add(\"she'll\");\nstopWords.add(\"she's\");\nstopWords.add(\"should\");\nstopWords.add(\"shouldn't\");\nstopWords.add(\"since\");\nstopWords.add(\"six\");\nstopWords.add(\"so\");\nstopWords.add(\"some\");\nstopWords.add(\"somebody\");\nstopWords.add(\"someday\");\nstopWords.add(\"somehow\");\nstopWords.add(\"someone\");\nstopWords.add(\"something\");\nstopWords.add(\"sometime\");\nstopWords.add(\"sometimes\");\nstopWords.add(\"somewhat\");\nstopWords.add(\"somewhere\");\nstopWords.add(\"soon\");\nstopWords.add(\"sorry\");\nstopWords.add(\"specified\");\nstopWords.add(\"specify\");\nstopWords.add(\"specifying\");\nstopWords.add(\"still\");\nstopWords.add(\"sub\");\nstopWords.add(\"such\");\nstopWords.add(\"sup\");\nstopWords.add(\"sure\");\nstopWords.add(\"take\");\nstopWords.add(\"taken\");\nstopWords.add(\"taking\");\nstopWords.add(\"tell\");\nstopWords.add(\"tends\");\nstopWords.add(\"th\");\nstopWords.add(\"than\");\nstopWords.add(\"thank\");\nstopWords.add(\"thanks\");\nstopWords.add(\"thanx\");\nstopWords.add(\"that\");\nstopWords.add(\"that'll\");\nstopWords.add(\"thats\");\nstopWords.add(\"that've\");\nstopWords.add(\"the\");\nstopWords.add(\"their\");\nstopWords.add(\"theirs\");\nstopWords.add(\"them\");\nstopWords.add(\"themselves\");\nstopWords.add(\"then\");\nstopWords.add(\"thence\");\nstopWords.add(\"there\");\nstopWords.add(\"thereafter\");\nstopWords.add(\"thereby\");\nstopWords.add(\"there'd\");\nstopWords.add(\"therefore\");\nstopWords.add(\"therein\");\nstopWords.add(\"ther'll\");\nstopWords.add(\"there're\");\nstopWords.add(\"theres\");\nstopWords.add(\"there's\");\nstopWords.add(\"thereupon\");\nstopWords.add(\"there've\");\nstopWords.add(\"these\");\nstopWords.add(\"they\");\nstopWords.add(\"they'd\");\nstopWords.add(\"they'll\");\nstopWords.add(\"they're\");\nstopWords.add(\"they've\");\nstopWords.add(\"thing\");\nstopWords.add(\"things\");\nstopWords.add(\"think\");\nstopWords.add(\"third\");\nstopWords.add(\"thirty\");\nstopWords.add(\"this\");\nstopWords.add(\"thorough\");\nstopWords.add(\"thoroughly\");\nstopWords.add(\"those\");\nstopWords.add(\"though\");\nstopWords.add(\"throughout\");\nstopWords.add(\"thru\");\nstopWords.add(\"thus\");\nstopWords.add(\"till\");\nstopWords.add(\"to\");\nstopWords.add(\"together\");\nstopWords.add(\"too\");\nstopWords.add(\"took\");\nstopWords.add(\"toward\");\nstopWords.add(\"towards\");\nstopWords.add(\"tried\");\nstopWords.add(\"tries\");\nstopWords.add(\"truly\");\nstopWords.add(\"try\");\nstopWords.add(\"trying\");\nstopWords.add(\"t's\");\nstopWords.add(\"twice\");\nstopWords.add(\"two\");\nstopWords.add(\"un\");\nstopWords.add(\"under\");\nstopWords.add(\"underneath\");\nstopWords.add(\"undoing\");\nstopWords.add(\"unfortunately\");\nstopWords.add(\"unless\");\nstopWords.add(\"unlike\");\nstopWords.add(\"unlikely\");\nstopWords.add(\"untill\");\nstopWords.add(\"unto\");\nstopWords.add(\"up\");\nstopWords.add(\"upon\");\nstopWords.add(\"upwards\");\nstopWords.add(\"us\");\nstopWords.add(\"use\");\nstopWords.add(\"used\");\nstopWords.add(\"useful\");\nstopWords.add(\"uses\");\nstopWords.add(\"using\");\nstopWords.add(\"usually\");\nstopWords.add(\"v\");\nstopWords.add(\"value\");\nstopWords.add(\"various\");\nstopWords.add(\"versus\");\nstopWords.add(\"very\");\nstopWords.add(\"via\");\nstopWords.add(\"viz\");\nstopWords.add(\"vs\");\nstopWords.add(\"want\");\nstopWords.add(\"wants\");\nstopWords.add(\"was\");\nstopWords.add(\"wasn't\");\nstopWords.add(\"way\");\nstopWords.add(\"we\");\nstopWords.add(\"we'd\");\nstopWords.add(\"welcome\");\nstopWords.add(\"well\");\nstopWords.add(\"we'll\");\nstopWords.add(\"went\");\nstopWords.add(\"were\");\nstopWords.add(\"we're\");\nstopWords.add(\"weren't\");\nstopWords.add(\"we've\");\nstopWords.add(\"what\");\nstopWords.add(\"whatever\");\nstopWords.add(\"what'll\");\nstopWords.add(\"what's\");\nstopWords.add(\"what've\");\nstopWords.add(\"when\");\nstopWords.add(\"whence\");\nstopWords.add(\"whenever\");\nstopWords.add(\"where\");\nstopWords.add(\"whereafter\");\nstopWords.add(\"whereas\");\nstopWords.add(\"whereby\");\nstopWords.add(\"wherein\");\nstopWords.add(\"where's\");\nstopWords.add(\"whereupon\");\nstopWords.add(\"whereever\");\nstopWords.add(\"whether\");\nstopWords.add(\"which\");\nstopWords.add(\"whichever\");\nstopWords.add(\"while\");\nstopWords.add(\"whilst\");\nstopWords.add(\"whither\");\nstopWords.add(\"who\");\nstopWords.add(\"who'd\");\nstopWords.add(\"whoever\");\nstopWords.add(\"whole\");\nstopWords.add(\"who'll\");\nstopWords.add(\"whom\");\nstopWords.add(\"whomever\");\nstopWords.add(\"who's\");\nstopWords.add(\"whose\");\nstopWords.add(\"why\");\nstopWords.add(\"will\");\nstopWords.add(\"willing\");\nstopWords.add(\"wish\");\nstopWords.add(\"with\");\nstopWords.add(\"within\");\nstopWords.add(\"without\");\nstopWords.add(\"wonder\");\nstopWords.add(\"won't\");\nstopWords.add(\"would\");\nstopWords.add(\"wouldn't\");\nstopWords.add(\"yes\");\nstopWords.add(\"yet\");\nstopWords.add(\"you\");\nstopWords.add(\"you'd\");\nstopWords.add(\"you'll\");\nstopWords.add(\"your\");\nstopWords.add(\"you're\");\nstopWords.add(\"yours\");\nstopWords.add(\"yourself\");\nstopWords.add(\"you've\");\nstopWords.add(\"zero\");\n\n \n \n }", "public String stemming(String stopWordRemovalFile, String stemmingFilePath) throws IOException{\n\t\t\n\t\t//Use a for loop to go through each data file\n\t\tfor (int i = 1; i <= numOfFiles; i++) {\n\t\t\t//Use FileInputStream to get the file path and use BufferedReader and InputStreamReader to read the files\n\t\t\tFileInputStream files = new FileInputStream(stopWordRemovalFile + \"/a\" + i + \".txt\");\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(files));\n\t\t\t\n\t\t\t//Use FileWriter to indicate the path to where the data will be outputed and BufferedWriter to write to the indicated files\n\t\t\tFileWriter fileStream = new FileWriter(stemmingFilePath + \"/a\" + i + \".txt\"); \n\t BufferedWriter outputStream = new BufferedWriter(fileStream);\n\t\t\t\n\t //Add each line of the files into an temporary stemmer arraylist to output the words into their root form\n\t\t\tString readStopwordDoc;\n\t\t\twhile((readStopwordDoc = reader.readLine()) != null) {\n\t\t\t\ttempStemmer.add(readStopwordDoc);\n\t\t\t}\n\t\t\t//Use the for loop to get the size of the temporary stemmer arraylist and stem the words\n\t\t\tfor(int j = 0; j < tempStemmer.size(); j++) {\n\t\t\t\tstemming.setCurrent(tempStemmer.get(j).toString());\n\t\t\t\tstemming.stem();\n\t\t\t\toutputStream.write(stemming.getCurrent() + \"\\n\");\n\t\t\t}\n\t\t\ttempStemmer.clear();\n\t\t\t\n\t\t\toutputStream.close();\n\t\t}\n\t\tSystem.out.println(\"See Stemming Folder for to view the results\");\n\t\treturn stemmingFilePath;\n\t}", "public String normalize(String word);", "public static void filterNonWords(final List<String> tokens) {\n\tfor (int i = 0; i < tokens.size(); i++) {\n\t if (StringUtils.isComposedOf(tokens.get(i), ALL_DELIMS)) {\n\t\ttokens.remove(i);\n\t }\n\t}\n }", "public void remove(T word);", "@Override\n public Builder stopWords(@NonNull Collection<VocabWord> stopList) {\n super.stopWords(stopList);\n return this;\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"nam(s) of edit(s), typ as indic in th latic book. if ther is als an author field, then th edit field giv th edit of th bok or cllect in which th refer appear.\");\n assertEquals(\"nam(s) of edit(s), typ as ind in th lat book. if ther is al an author field, then th edit field giv th edit of th bok or cllect in which th refer appear.\", string0);\n }", "@Test\n // Test that the preprocessor removes the relevant stop words\n void removeStopWords01() {\n List<String> stop_words = new ArrayList<>();\n List<String> words = new ArrayList<>(stop_words);\n words.add(\"vigtig\");\n assertEquals(\"vigtig\", preprocessor.removeStopWords(words).get(0));\n }", "default boolean isStopWord() {\n return meta(\"nlpcraft:nlp:stopword\");\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"sort arra (doubl): uad\");\n assertEquals(\"sort ar (doubl): uas\", string0);\n }", "public static List<String> validStems(List<String> words)\n\t{\n\t\tStemmer stemmer = new Stemmer();\n\t\tArrayList<String> goodWords = new ArrayList<String>();\n\t\tfor (String word : words)\n\t\t{\n\t\t\tString stem = stemmer.stem(word);\n\t\t\tif (dictUtils.dict.containsKey(stem))\n\t\t\t{\n\t\t\t\tgoodWords.add(stem);\n\t\t\t}\n\t\t}\n\t\treturn goodWords;\n\t}", "@Override\n\tprotected boolean isStopword(String word) {\n\t\treturn this.stopwords.contains(word);\n\t}", "public PorterStopWords()\r\n\t{\r\n\t\tstopWordsSet.addAll( porterStopWordsSet );\r\n\t}", "public void removeWord(String word) throws WordException;", "static public ArrayList<String> simplifyString(String [] stringList,\n Map<String,String> stemMap, Porter stemmer,\n ElsevierPapersFilter epf,\n String showProcessPrefixString){\n// String sep=\"\\t\";\n// String [] stringList = inputString.split(\"\\\\s+\"); // split at white space of any length\n String sep=\"\\t\";\n ArrayList<String> stemList=new ArrayList();\n boolean makeMap = (stemMap==null?false:true);\n String w0;\n String w;\n boolean showProcess=(showProcessPrefixString.isEmpty()?false: true);\n if (showProcess) System.out.print(showProcessPrefixString);\n for (int i=0; i<stringList.length; i++){\n w0 = stringList[i];\n StringBuilder sb =ElsevierPapersFilter.clean(w0);\n w=sb.toString();\n if (showProcess && (w.length()!=w0.length())) System.out.println(w0+\" -> \"+w);\n if (showProcess) System.out.print(sep + w0+\"->\"+w);\n if(!epf.isAcceptableElseRemember(w)) continue;\n String stem = stemmer.stem(w);\n if(epf.isAcceptableStemElseRemember(stem)) {\n stemList.add(stem);\n if ((showProcess) && (stem.length() != w.length())) {\n System.out.print(\"->\" + stem);\n }\n if (makeMap && (stem.length() != w.length())) stemMap.put(w, stem);\n } // eo if acceptable\n else if (showProcess) System.out.print(w + \"<-### \"+sep);\n }//eoln\n if (showProcess) System.out.println();\n return stemList;\n }", "public Term[] getStopWords() {\n List<Term> allStopWords = new ArrayList<Term>();\n for (String fieldName : stopWordsPerField.keySet()) {\n Set<String> stopWords = stopWordsPerField.get(fieldName);\n for (String text : stopWords) {\n allStopWords.add(new Term(fieldName, text));\n }\n }\n return allStopWords.toArray(new Term[allStopWords.size()]);\n\t}", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"weka.core.stemmers.lovinsstemmeryt\");\n assertEquals(\"wek.cor.stemmer.lovinsstemmerys\", string0);\n }", "public int removings(String s)\n{\n if(stopWords.contains(s))\n {\n return 1;\n }\n else\n {\n return 0;\n }\n}", "@Override\r\n\tpublic String getName() {\r\n\t\treturn \"StemMethodAnalyzer\";\r\n\t}", "public void removeWord(int id);", "public static String stemvString(String raws)\n\t{\n\t\tString os = \"\";\n\t\tfor (String w : raws.split(\"\\\\s+\"))\n\t\t{\n\t\t\tos = os + dictUtils.getStemWord(w) + \" \";\n\t\t}\n\t\treturn os;\n\t}", "@Test(timeout = 4000)\n public void test37() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stem(\"v<l<6c/XVopp\");\n assertEquals(\"v<l<6c/xvop\", string0);\n }", "public ArrayList<String> processText(String text)\r\n\t{\r\n\t\tArrayList<String> terms = new ArrayList<>();\r\n\r\n\t\t// P2\r\n\t\t// Tokenizing, normalizing, stopwords, stemming, etc.\r\n\t\tArrayList<String> tokens = tokenize(text);\r\n\t\tfor(String term: tokens){\r\n\t\t\tString norm = normalize(term);\r\n\t\t\tif(!isStopWord(norm)){\r\n\t\t\t\tString stem = stem(norm);\r\n\t\t\t\tterms.add(stem);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn terms;\r\n\t}", "public boolean isStopword( char[] word ) {\n\t\t// Return true if the input word is a stopword, or false if not.\n\t\treturn false;\n\t}", "SList oddWords();", "public static void main(String[] args) throws IOException {\n \n String s = \" Today's is sunny. She is a sunny girl. To be or not to be. She is in Berlin\\r\\n\"\n\t\t\t\t+ \"today. Sunny Berlin! Berlin is always exciting!\"\n\t\t\t\t+ \"\";\n \n PorterStemmer stemmer = new PorterStemmer();\n Tokenizer tokenizer = new StandardTokenizer();\n Tokenizer wt = new WhitespaceTokenizer();\n\t\t\n final List<String> stop_Words = Arrays.asList(\"is\", \"was\", \"in\", \"to\", \"be\");\n\t\tfinal CharArraySet stopSet = new CharArraySet(stop_Words, true);\n\t\t\n\t\t\n\t\ttokenizer.setReader(new StringReader(s));\n\t\tTokenStream tok = tokenizer;\n\t\t\n\t\ttok = new StopFilter(tok, stopSet);\n\t\ttok.reset();\n\t\t\n\t\tCharTermAttribute attr = tok.addAttribute(CharTermAttribute.class);\n\t\t\n\t\t\n\t\twhile(tok.incrementToken()) {\n\t\t // Grab the term\n\t\t String term = attr.toString();\n\n\t\t System.out.println(term);\n\t\t \n\t\t}\n\t\t\n\t}", "public void removeWordsOfLength(int len){\n for(int i=0;i<size();i++)\n if(get(i).length()==len){\n \tremove(i--);\n }\n }", "public List<Word> getWordsEndingAt(int end);", "private static void printStemResults(String originalWord, List<Stem> stems) {\n StringBuilder builder = new StringBuilder().append(\"stem(\").append(originalWord).append(\")\").append(\"\\n\");\n\n for (Stem stem : stems) {\n builder.append(\"- \").append(stem.getStem()).append(\": \");\n\n for (HunspellAffix prefix : stem.getPrefixes()) {\n builder.append(prefix.getAppend()).append(\"+\");\n\n if (hasText(prefix.getStrip())) {\n builder.append(prefix.getStrip()).append(\"-\");\n }\n }\n\n builder.append(stem.getStem());\n\n for (HunspellAffix suffix : stem.getSuffixes()) {\n if (hasText(suffix.getStrip())) {\n builder.append(\"-\").append(suffix.getStrip());\n }\n \n builder.append(\"+\").append(suffix.getAppend());\n }\n builder.append(\"\\n\");\n }\n\n System.out.println(builder);\n }", "public static void main(String[] args) throws Exception {\n\t\tString[] stopwords=getstopwords(\"Stopwords.txt\");\n //CALLING METHOD TO REMOVE STOPWORDS\n\t\tremoveStopwords();\n\t\t \n}", "private static List<Pair<String, Integer>> splitWords(String line) {\n // This is kinda silly: we read and parse the stop words file once for each chunk, but this is the way the book\n // does it, so better stay in line with that.\n Set<String> stopWords = Arrays.stream(readFile(\"../stop_words.txt\").split(\",\")).\n collect(Collectors.toCollection(HashSet::new));\n return Arrays.stream(line.replaceAll(\"[^a-zA-Z\\\\d\\\\s]\", \" \").toLowerCase().split(\" \")).\n filter(w -> w.length() >= 2 && !stopWords.contains(w)).\n map(w -> new Pair<>(w, 1)).\n collect(Collectors.toList());\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"20l}V*vRPT!yP9\");\n assertEquals(\"20l}v*vrb!yp9\", string0);\n }", "StemChange(String _old, String _new) {\n\t\tthis(_old, _new, TenseType.PRESENT, (Pronoun[]) null);\n\t}", "@Test(timeout = 4000)\n public void test45() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"th nam of a ser or ses of book. when cit an entir book, th th titl field giv it titl and an opt ser field giv th nam of a ser or mult-volum ses in which th book is publ.\");\n assertEquals(\"th nam of a ser or se of book. when cit an entir book, th th titl field giv it titl and an opt ser field giv th nam of a ser or mult-vol se in which th book is publ.\", string0);\n }", "@Test(timeout = 4000)\n public void test40() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"usu th addres of th publishes or other typ of institut. for major publish hous, van leun recommens omis th inform entir. for smal publishes, on th other hand, you &an help th reader by giv th comples addres.\");\n assertEquals(\"usu th addr of th publish or other typ of institut. for major publ hous, van leun recommen om th inform entir. for smal publish, on th other hand, you &an help th reader by giv th compl addr.\", string0);\n }", "public static Set<String> getNonStopTrigrams(String value) {\n\t\tSet<String> trigrams = new HashSet<>(value.length());\n\t\tfor (int i =0; i < value.length() - 2; ++i) {\n\t\t\tString trigram = value.substring(i,i+3);\n\t\t\tif (!Tools.stop3grams.contains(trigram)) { //this excludes stop-trigrams\n\t\t\t\ttrigrams.add(value.substring(i,i+3));\n\t\t\t}\n\t\t}\t\t\n\t\treturn trigrams;\n\t}" ]
[ "0.72643495", "0.70898354", "0.7028978", "0.69251746", "0.68300486", "0.65712386", "0.6539928", "0.65030485", "0.6498164", "0.64688635", "0.64676255", "0.64443", "0.6397395", "0.6382749", "0.6364182", "0.63262385", "0.6299397", "0.6283659", "0.6280013", "0.627231", "0.62445086", "0.6199235", "0.61928546", "0.6158167", "0.6104001", "0.60959315", "0.6089278", "0.6079498", "0.6050581", "0.60467637", "0.597334", "0.59682447", "0.5957177", "0.5952708", "0.5932173", "0.5897093", "0.5871647", "0.58233494", "0.5810827", "0.57780564", "0.5718792", "0.56980014", "0.569446", "0.5671363", "0.5668791", "0.5656375", "0.56421095", "0.56188565", "0.55986124", "0.5585657", "0.5552101", "0.5551697", "0.5509934", "0.55005056", "0.54677874", "0.5447588", "0.5428554", "0.540381", "0.54022557", "0.5399981", "0.5390592", "0.5380638", "0.53794676", "0.53742903", "0.5363106", "0.5358269", "0.53504395", "0.53488123", "0.53477645", "0.53420216", "0.5331972", "0.5329876", "0.5327414", "0.5322803", "0.5321593", "0.52979094", "0.5290842", "0.527249", "0.5269506", "0.5266792", "0.52502656", "0.5248667", "0.5216882", "0.5215298", "0.5207001", "0.51985455", "0.5197479", "0.519049", "0.5183555", "0.5171516", "0.51654536", "0.5150146", "0.51459366", "0.5137442", "0.5133138", "0.51193255", "0.511904", "0.51183885", "0.51072574", "0.510042" ]
0.5348245
68
give the stem of a word (may not be valid English word)
public static String getRoot(String word) { return (new Stemmer()).stem(word); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String stemOf (String word);", "public static String stem(String word){\n Stemmer s = new Stemmer();\n s.add(word.toCharArray(), word.length());\n s.stem();\n return s.toString();\n }", "public static String stemWord(String word) {\n if (word.matches(\".*\\\\s.*\")) throw \n new IllegalArgumentException(\"argument is not a single word: \" + word); \n EnglishStemmer stemmer = new EnglishStemmer();\n stemmer.setCurrent(word);\n stemmer.stem();\n return stemmer.getCurrent();\n // slow way of doing it with jcas\n// List<TokenCanonic> c = getCanonicForms(word, CanonicForm.STEM);\n// return c.get(0).canonic;\n }", "protected String stem(String term) {\r\n\t\tStemmer stemmer = new Stemmer();\r\n\t\tfor(char a : term.toCharArray()){\r\n\t\t\tstemmer.add(a);\r\n\t\t}\r\n\t\tstemmer.stem();\r\n\t\treturn stemmer.toString();\r\n\t}", "public List<Stem> stem(String word) {\n return stem(word.toCharArray(), word.length());\n }", "public String stem(String str) {\n\n if (str.length() <= 2) {\n return str;\n }\n String stemmed = super.stem(str);\n while (!stemmed.equals(str)) {\n str = stemmed;\n stemmed = super.stem(stemmed);\n }\n return stemmed;\n }", "public String Stem( String word )\n {\n // check if we already know the word\n String stemmedword = AllWords.get(word);\n if ( stemmedword != null )\n return stemmedword; // return it if we already know it\n\n // don't check words with digits in them\n // if ( containsNumbers (word) == true )\n // stemmedword = null;\n // else\t// unknown word: try to stem it\n stemmedword = StemWordWithWordNet (word);\n\n if ( stemmedword != null )\n {\n // word was recognized and stemmed with wordnet:\n // add it to hashmap and return the stemmed word\n AllWords.put( word, stemmedword );\n return stemmedword;\n }\n // word could not be stemmed by wordnet,\n // thus it is no correct english word\n // just add it to the list of known words so\n // we won't have to look it up again\n AllWords.put( word, word );\n return word;\n }", "public static String stemWordPorter(String word) {\n Stemmer st = new Stemmer();\n st.add(word.toCharArray(), word.length());\n st.stem();\n return st.toString();\n }", "default String getStem() {\n return meta(\"nlpcraft:nlp:stem\");\n }", "private String processWord(String word){\r\n\t\tString lword = word.toLowerCase();\r\n\t\tfor (int i = 0;i<word.length();++i){\r\n\t\t\tstemmer.add(lword.charAt(i));\r\n\t\t}\r\n\t\tstemmer.stem();\r\n\t\treturn stemmer.toString();\r\n\t}", "@Override\r\n public String stem(String word) {\r\n List<String> lemmas = new LinkedList<String>();\r\n // Create an empty Annotation just with the given text\r\n Annotation document = new Annotation(word);\r\n // run all Annotators on this text\r\n this.pipeline.annotate(document);\r\n // Iterate over all of the sentences found\r\n List<CoreMap> sentences = document.get(CoreAnnotations.SentencesAnnotation.class);\r\n for (CoreMap sentence : sentences) {\r\n // Iterate over all tokens in a sentence\r\n for (CoreLabel token : sentence.get(CoreAnnotations.TokensAnnotation.class)) {\r\n // Retrieve and add the lemma for each word into the\r\n // list of lemmas\r\n lemmas.add(token.get(CoreAnnotations.LemmaAnnotation.class));\r\n }\r\n }\r\n return lemmas.get(0);\r\n\r\n }", "private String stemmingForAWord(String identifiedWord) {\n String word;\n if (identifiedWord.contains(\"_\")) {\n word = identifiedWord;\n } else {\n word = morphology.stem(identifiedWord);\n }\n return word;\n }", "public String stem(String input) {\n String output = \"\";\n // create an empty Annotation just with the given text\n document = new Annotation(input);\n // run all Annotators on this text\n pipeline.annotate(document);\n // traverse words in the document\n for (CoreLabel token : document.get(CoreAnnotations.TokensAnnotation.class)) {\n output = output + token.lemma() + \" \";\n }\n\n return output.trim();\n }", "private static String analyzeTerm(String term) {\n String ret = term.toLowerCase();\n if (stopWords.contains(ret) || ret.isEmpty())\n return \"\";\n return stemmer.stem(ret);\n }", "public char[] getStem() {\n return stem;\n }", "public List<Stem> stem(char word[], int length) {\n List<Stem> stems = new ArrayList<Stem>();\n if (dictionary.lookupWord(word, 0, length) != null) {\n stems.add(new Stem(word, length));\n }\n stems.addAll(stem(word, length, null, 0));\n return stems;\n }", "public static String stemNSW(String word)\n\t{\n\t\treturn isNSW(getRoot(word.toLowerCase()));\n\t}", "@Override\n\tpublic String getStemming(String phrase) {\n\t\treturn null;\n\t}", "public void setStem (Glyph stem)\r\n {\r\n this.stem = stem;\r\n }", "public Glyph getStem ()\r\n {\r\n return stem;\r\n }", "public void stem()\n\t { k = i - 1;\n\t if (k > 1) { step1(); step2(); step3(); step4(); step5(); step6(); }\n\t i_end = k+1; i = 0;\n\t }", "public String SnowballStemmingDemo(String token) {\n\t\tSnowballStemmer stemmer = new englishStemmer();\n\t\tstemmer.setCurrent(token);\n\t\tif (stemmer.stem())\n\t\t\treturn stemmer.getCurrent();\n\t\telse\n\t\t\treturn token;\n\t}", "public static String preprocessStemAndTokenize(String data) {\n\n\t\tSet<String> transformedSet = new HashSet<String>(); //Set will make sure only unique terms are kept\n\t\tStringBuilder strBuilder = new StringBuilder();\n\t\tTokenizer analyzer = new Tokenizer(Version.LUCENE_30);\n\t\tTokenStream tokenStream = analyzer.tokenStream(\"\", new StringReader(data));\n\t\tTermAttribute termAttribute;\n\t\tString term;\n\t\t//System.out.println(\"The value of data in tokenizeAndStem: \"+ data);\n\t\ttry {\n\t\t\twhile (tokenStream.incrementToken()) {\n\t\t\t\ttermAttribute = tokenStream.getAttribute(TermAttribute.class);\n\t\t\t\tterm = termAttribute.term(); \n\t\t\t\tif (stopwords.contains(term)){ //ignore stopwords\n\t\t\t\t\t//System.out.println(\"Contains stopword: \"+ term);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (digitPattern.matcher(term).find()) //ignore digits\n\t\t\t\t\tcontinue;\n\t\t\t\tif(term.length() <= 1) //ignore 1 letter words\n\t\t\t\t\tcontinue;\n\t\t\t\t\n\t\t\t\tif (!digitPattern.matcher(term).find()){ //ignore digits\n\t\t\t\t\tstemmer.setCurrent(term);\n\t\t\t\t\tstemmer.stem();\n\t\t\t\t\ttransformedSet.add(stemmer.getCurrent());\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t//System.out.println(\"transormed set size in tokenizeAndStem: \"+ transformedSet.size());\n\t\tfor(Object token: transformedSet.toArray()){\n\t\t\tstrBuilder.append(token).append(\" \");\n\t\t}\n\t\t//System.out.println(\"String returned in tokenizeAndStem:\"+ strBuilder.toString());\n\t\treturn strBuilder.toString();\n\t}", "private String getStemming(String line) throws IOException {\n\t\treturn line;\n\t\t// return Stemmer.processTweets(line);\n\t}", "public String PorterStemmingDemo(String token) {\n\t\tporterStemmer stemmer = new porterStemmer();\n\t\tstemmer.setCurrent(token);\n\t\tif (stemmer.stem())\n\t\t\treturn stemmer.getCurrent();\n\t\telse\n\t\t\treturn token;\n\t}", "public String StemWordWithWordNet ( String word )\n {\n if ( !IsInitialized )\n return word;\n if ( word == null ) return null;\n if ( morph == null ) morph = dic.getMorphologicalProcessor();\n\n IndexWord w;\n try\n {\n w = morph.lookupBaseForm( POS.VERB, word );\n if ( w != null )\n return w.getLemma().toString ();\n w = morph.lookupBaseForm( POS.NOUN, word );\n if ( w != null )\n return w.getLemma().toString();\n w = morph.lookupBaseForm( POS.ADJECTIVE, word );\n if ( w != null )\n return w.getLemma().toString();\n w = morph.lookupBaseForm( POS.ADVERB, word );\n if ( w != null )\n return w.getLemma().toString();\n }\n catch ( JWNLException e )\n {\n }\n return null;\n }", "public StemSearch getStemSearch() {\r\n return this.stemSearch;\r\n }", "public static String stemvString(String raws)\n\t{\n\t\tString os = \"\";\n\t\tfor (String w : raws.split(\"\\\\s+\"))\n\t\t{\n\t\t\tos = os + dictUtils.getStemWord(w) + \" \";\n\t\t}\n\t\treturn os;\n\t}", "public interface Stemmer {\r\n/**\r\n * <li>Get the stem of a word.\r\n * @return java.lang.String Stem\r\n * @param word java.lang.String Word\r\n */\r\nString stemOf (String word);\r\n}", "private ArrayList<String> stemTokens(ArrayList<String> tokens) {\n ArrayList<String> stemmedTokens = new ArrayList<>();\n for (String token : tokens) {\n Stemmer stemmer = new Stemmer();\n // Add each character into the stemmer\n for (int i = 0; i < token.length(); i++) {\n stemmer.add(token.charAt(i));\n }\n\n // Stem the token\n stemmer.stem();\n\n // Retrieve the stemmed token\n String stemmedToken = stemmer.toString();\n\n stemmedTokens.add(stemmedToken);\n }\n\n return stemmedTokens;\n }", "public Scope getStemScope() {\r\n if (StringUtils.isBlank(this.stemScopeString)) {\r\n return Scope.SUB;\r\n }\r\n return Scope.valueOfIgnoreCase(this.stemScopeString, true);\r\n }", "@Override\r\n\tpublic String getName() {\r\n\t\treturn \"StemMethodAnalyzer\";\r\n\t}", "public String normalize(String word);", "@Override\r\n public boolean isStem ()\r\n {\r\n return getShape() == Shape.STEM;\r\n }", "List<String> tokenize0(String doc) {\r\n List<String> res = new ArrayList<String>();\r\n\r\n for (String s : doc.split(\"\\\\s+\")) {\r\n // implement stemming algorithm if ToStem == true\r\n if (ToStem == true) {\r\n Stemmer st = new Stemmer();\r\n st.add(s.toCharArray(), s.length());\r\n st.stem();\r\n s = st.toString();\r\n }\r\n res.add(s);\r\n }\r\n return res;\r\n }", "public static NoteDuration getStemDuration(NoteDuration dur)\n\t{\n\t\tif (dur == NoteDuration.DottedHalf )\n\t\t return NoteDuration.Half;\n\t\telse if (dur == NoteDuration.DottedQuarter)\n\t\t return NoteDuration.Quarter;\n\t\telse if (dur == NoteDuration.DottedEighth )\n\t\t return NoteDuration.Eighth;\n\t\telse\n\t\t return dur;\n\t}", "private List<Stem> stem(char word[], int length, char[] flags, int recursionDepth) {\n List<Stem> stems = new ArrayList<Stem>();\n\n for (int i = 0; i < length; i++) {\n List<HunspellAffix> suffixes = dictionary.lookupSuffix(word, i, length - i);\n if (suffixes == null) {\n continue;\n }\n\n for (HunspellAffix suffix : suffixes) {\n if (hasCrossCheckedFlag(suffix.getFlag(), flags)) {\n int deAffixedLength = length - suffix.getAppend().length();\n // TODO: can we do this in-place?\n String strippedWord = new StringBuilder().append(word, 0, deAffixedLength).append(suffix.getStrip()).toString();\n\n List<Stem> stemList = applyAffix(strippedWord.toCharArray(), strippedWord.length(), suffix, recursionDepth);\n for (Stem stem : stemList) {\n stem.addSuffix(suffix);\n }\n\n stems.addAll(stemList);\n }\n }\n }\n\n for (int i = length - 1; i >= 0; i--) {\n List<HunspellAffix> prefixes = dictionary.lookupPrefix(word, 0, i);\n if (prefixes == null) {\n continue;\n }\n\n for (HunspellAffix prefix : prefixes) {\n if (hasCrossCheckedFlag(prefix.getFlag(), flags)) {\n int deAffixedStart = prefix.getAppend().length();\n int deAffixedLength = length - deAffixedStart;\n\n String strippedWord = new StringBuilder().append(prefix.getStrip())\n .append(word, deAffixedStart, deAffixedLength)\n .toString();\n\n List<Stem> stemList = applyAffix(strippedWord.toCharArray(), strippedWord.length(), prefix, recursionDepth);\n for (Stem stem : stemList) {\n stem.addPrefix(prefix);\n }\n\n stems.addAll(stemList);\n }\n }\n }\n\n return stems;\n }", "public boolean isStem() {\n return this.type == Type.STEM;\n }", "public static String stemSentNSW(String raw)\n\t{\n\t\tString os = \"\";\n\t\tfor (String w : raw.split(\"\\\\s+\"))\n\t\t{\n\t\t\tos = os + dictUtils.stemNSW(w) + \" \";\n\t\t}\n\t\treturn os;\n\t}", "public List<String> stem(List<String> terms) {\r\n\t\tPaiceHuskStemmer stemmer = null;\r\n\t\ttry {\r\n\t\t\tstemmer = PaiceHuskStemmer.getInstance(SVMClassifier.class.getClassLoader().getResource(\"stemrules.txt\").openStream());\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tstemmer.setPreStrip(false);\r\n\t\tfor (int i = 0; i < terms.size(); i++) {\r\n\t\t\tString w = terms.get(i);\r\n\t\t\tterms.set(i, stemmer.stripAffixes(w));\r\n\t\t}\r\n\t\treturn terms;\r\n\t}", "public Stem(char stem[], int stemLength) {\n this.stem = stem;\n this.stemLength = stemLength;\n }", "List<String> tokenize2(String doc) {\n String stemmed = StanfordLemmatizer.stemText(doc);\n List<String> res = new ArrayList<String>();\n\n for (String s : stemmed.split(\"[\\\\p{Punct}\\\\s]+\"))\n res.add(s);\n return res;\n }", "public static List<TokenCanonic> stemWords(String wordList) {\n List<TokenCanonic> result = new ArrayList<TokenCanonic>(); \n String [] tokens = wordList.split(\"\\\\s+\");\n for (String t : tokens) {\n if (t.trim().equals(\"\")) continue;\n TokenCanonic tc = new TokenCanonic(); \n tc.token = t; tc.canonic = stemWord(t);\n result.add(tc);\n }\n return result;\n }", "public static String preprocessStemAndTokenizeReturnDistinctTokens(String data) {\n\t\t//System.out.println(\"Preprocess data, remove stop words, stem, tokenize ..\");\n\t\tSet<String> transformedSet = new LinkedHashSet<String>();\n\t\tList<String> stemmedList = new ArrayList<String>();\n\n\t\tTokenizer analyzer = new Tokenizer(Version.LUCENE_30);\n\t\tTokenStream tokenStream = analyzer.tokenStream(\"\", new StringReader(data));\n\t\tTermAttribute termAttribute;\n\t\tString term;\n\t\ttry {\n\t\t\twhile (tokenStream.incrementToken()) {\n\t\t\t\ttermAttribute = tokenStream.getAttribute(TermAttribute.class);\n\t\t\t\tterm = termAttribute.term();\n\t\t\t\tif (digitPattern.matcher(term).find()) //ignore digits\n\t\t\t\t\tcontinue;\n\t\t\t\tif (stopwords.contains(term)) //ignore stopwords\n\t\t\t\t\tcontinue;\n\t\t\t\tif (term.length() <= 1) //ignore single letter words\n\t\t\t\t\tcontinue;\n\t\t\t\tstemmer.setCurrent(term);\n\t\t\t\tstemmer.stem();\n\t\t\t\tstemmedList.add(stemmer.getCurrent());\n\t\t\t}\n\t\t\ttransformedSet.addAll(stemmedList);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tstemmedList.clear();\n\t\tstemmedList = null;\n\t\t\n\t\treturn StringUtils.join(transformedSet.toArray(), \" \");\n\t}", "public abstract boolean isStopWord(String term);", "public void setStemScope(Scope scope) {\r\n if (scope != null && scope == Scope.ONE) {\r\n this.stemScopeString = scope.name();\r\n } else {\r\n this.stemScopeString = null;\r\n }\r\n }", "public List<Stem> uniqueStems(char word[], int length) {\n List<Stem> stems = new ArrayList<Stem>();\n CharArraySet terms = new CharArraySet(dictionary.getVersion(), 8, dictionary.isIgnoreCase());\n if (dictionary.lookupWord(word, 0, length) != null) {\n stems.add(new Stem(word, length));\n terms.add(word);\n }\n List<Stem> otherStems = stem(word, length, null, 0);\n for (Stem s : otherStems) {\n if (!terms.contains(s.stem)) {\n stems.add(s);\n terms.add(s.stem);\n }\n }\n return stems;\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"nam(s) of edit(s), typ as indic in th latic book. if ther is als an author field, then th edit field giv th edit of th bok or cllect in which th refer appear.\");\n assertEquals(\"nam(s) of edit(s), typ as ind in th lat book. if ther is al an author field, then th edit field giv th edit of th bok or cllect in which th refer appear.\", string0);\n }", "public List<Trie> findStemDescending(String stem) {\n if (stem == null)\n return new ArrayList<>();\n Trie start = find(stem);\n if (start == null)\n return new ArrayList<>();\n return start.getAll();\n }", "java.lang.String getWord();", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"sort arra (doubl): uad\");\n assertEquals(\"sort ar (doubl): uas\", string0);\n }", "public void setStemmer( /*CustomFrenchStemmer*/ PaiceHuskFrenchStemmer stemmer ) {\r\n\t\tif ( stemmer != null ) {\r\n\t\t\tthis.stemmer = stemmer;\r\n\t\t}\r\n\t}", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"weka.core.stemmers.lovinsstemmeryt\");\n assertEquals(\"wek.cor.stemmer.lovinsstemmerys\", string0);\n }", "StemChange(String _old, String _new) {\n\t\tthis(_old, _new, TenseType.PRESENT, (Pronoun[]) null);\n\t}", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"w(FZNn>R/Iv6?tO\");\n assertEquals(\"w(fzn>r/iv6?to\", string0);\n }", "public String getBestMatch(String stem) {\n if (stem == null || stem.length() == 0)\n return null;\n Trie root = find(stem);\n if (root == null)\n return null;\n return root.findBest().item;\n }", "@Test(timeout = 4000)\n public void test57() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"us for alphabes, cros refer, and creat a label when th ``author'' inform is mis. th field should not be confus with th key that appear in th cit command and at th begin of th databas entr.\");\n assertEquals(\"us for alphab, cro refer, and creat a label when th ``author'' inform is mi. th field should not be confus with th key that appear in th cit command and at th begin of th datab entr.\", string0);\n }", "public int getStemDir ()\r\n {\r\n if (stem == null) {\r\n return 0;\r\n } else {\r\n return Integer.signum(getHeadLocation().y - getTailLocation().y);\r\n }\r\n }", "@Test(timeout = 4000)\n public void test31() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"The edition of a book---for example, ``Second''. This should be an ordinal, and should have the first letter capitalized, as shown here; the standard styles convert to lower case when necessary.\");\n assertEquals(\"th edit of a book---for exampl, ``second''. th should be an ordin, and should hav th first letter capital, as shown hes; th standard styl convers to lower cas when neces.\", string0);\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"20l}V*vRPT!yP9\");\n assertEquals(\"20l}v*vrb!yp9\", string0);\n }", "@Test(timeout = 4000)\n public void test37() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stem(\"v<l<6c/XVopp\");\n assertEquals(\"v<l<6c/xvop\", string0);\n }", "@Test(timeout = 4000)\n public void test31() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stem(\"istr\");\n assertEquals(\"ister\", string0);\n }", "@Test(timeout = 4000)\n public void test45() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"th nam of a ser or ses of book. when cit an entir book, th th titl field giv it titl and an opt ser field giv th nam of a ser or mult-volum ses in which th book is publ.\");\n assertEquals(\"th nam of a ser or se of book. when cit an entir book, th th titl field giv it titl and an opt ser field giv th nam of a ser or mult-vol se in which th book is publ.\", string0);\n }", "private static void printStemResults(String originalWord, List<Stem> stems) {\n StringBuilder builder = new StringBuilder().append(\"stem(\").append(originalWord).append(\")\").append(\"\\n\");\n\n for (Stem stem : stems) {\n builder.append(\"- \").append(stem.getStem()).append(\": \");\n\n for (HunspellAffix prefix : stem.getPrefixes()) {\n builder.append(prefix.getAppend()).append(\"+\");\n\n if (hasText(prefix.getStrip())) {\n builder.append(prefix.getStrip()).append(\"-\");\n }\n }\n\n builder.append(stem.getStem());\n\n for (HunspellAffix suffix : stem.getSuffixes()) {\n if (hasText(suffix.getStrip())) {\n builder.append(\"-\").append(suffix.getStrip());\n }\n \n builder.append(\"+\").append(suffix.getAppend());\n }\n builder.append(\"\\n\");\n }\n\n System.out.println(builder);\n }", "@Test(timeout = 4000)\n public void test16() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"a stemmer bas on th lovin stemmer, describ hes:\\n\\njuli beth lovin (1968). developm of a stem algorithm. mechan transl and comput lingu. 11:22-31.ond\");\n assertEquals(\"a stemmer ba on th lovin stemmer, describ he:\\n\\njl beth lovin (1968). developm of a stem algorithm. mechan transl and comput lingu. 11:22-31.ons\", string0);\n }", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stem(\"ations\");\n assertEquals(\"ation\", string0);\n }", "public boolean isStopWord(String word);", "@Test(timeout = 4000)\n public void test46() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stem(\"ionals\");\n assertEquals(\"ion\", string0);\n }", "public String getKeyword(String word) {\n\t\tboolean foundPunct = false;\n String returnStr = \"\";\n for(int inc = 0; inc < word.length(); inc++) {\n char testChar = word.charAt(inc);\n if(Character.isLetter(testChar) == true) {\n if(foundPunct == true) {return null;}\n else{returnStr = returnStr + Character.toString(testChar).toLowerCase();}}\n else {foundPunct = true;}}\n if(noiseWords.contains(returnStr) == true) {\n return null;}\n if(returnStr == \"\") {\n return null;}\n return returnStr;\n\t}", "public static void Stemmingmethod()throws Exception\n{\n char[] w = new char[501];\n Stemmer s = new Stemmer();\n String prcessedtxt=\"\";\n ArrayList<String> finalsen= new ArrayList();\n BufferedWriter writer = new BufferedWriter(new FileWriter(\"fullyprocessed.txt\"));\n\n String u=null;\n \n {\n FileInputStream in = new FileInputStream(\"stopwordsremoved.txt\");\n\n while(true)\n\n { int ch = in.read();\n if (Character.isLetter((char) ch))\n {\n int j = 0;\n while(true)\n { ch = Character.toLowerCase((char) ch);\n w[j] = (char) ch;\n if (j < 500) j++;\n ch = in.read();\n if (!Character.isLetter((char) ch))\n {\n \n s.add(w, j); \n\n s.stem();\n { \n\n u = s.toString();\n finalsen.add(u);\n /* to test getResultBuffer(), getResultLength() : */\n /* u = new String(s.getResultBuffer(), 0, s.getResultLength()); */\n\n System.out.print(u);\n }\n break;\n }\n }\n }\n if (ch < 0) break;\n System.out.print((char)ch);\n finalsen.add(\"\"+(char)ch);\n\n\n }\n }\n \n \n \n for(String word:finalsen){\n prcessedtxt=prcessedtxt+\"\"+ word;\n }\n writer.write(prcessedtxt+\"\\n\"); \n prcessedtxt=\"\";\n finalsen.clear();\n writer.close();\n\n\n \n}", "@Test(timeout = 4000)\n public void test47() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"th sponsor institut of a techn report.uas\");\n assertEquals(\"th spons institut of a techn report.ua\", string0);\n }", "@Test(timeout = 4000)\n public void test39() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"Name(s) of editor(s), typed as indicated in the LaTeX book. If there is also an author field, then the editor field gives the editor of the bok or cllection in which the reference appears.\");\n assertEquals(\"nam(s) of edit(s), typ as indic in th latic book. if ther is als an author field, then th edit field giv th edit of th bok or cllect in which th refer appear.\", string0);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"end\");\n assertEquals(\"ens\", string0);\n }", "@Test(timeout = 4000)\n public void test49() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"3flar`^lu\");\n assertEquals(\"3fl`^lu\", string0);\n }", "public static String getWord(String sentence, char word) {\n\t\tString[] words;\n\t\twords = sentence.split(\" \");\n\t\tString cleanedWord=\"\";\n\t\t\n\t\tif(word=='f') {//return the first word\n\t\t\tString temp = words[0];\n\t\t\t\n\t\t\tfor(int i=0; i < temp.length(); i++) {\n\t\t\t\tif(Character.isLetter(temp.charAt(i))) {\n\t\t\t\t\tcleanedWord+= Character.toString(temp.charAt(i));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}else {//return the last word\n\t\t\tString temp = words[words.length -1];\n\t\t\t\n\t\t\tfor(int i=0; i < temp.length(); i++) {\n\t\t\t\tif(Character.isLetter(temp.charAt(i))) {\n\t\t\t\t\tcleanedWord+= Character.toString(temp.charAt(i));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\treturn cleanedWord;\n\t}", "@Test(timeout = 4000)\n public void test03() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stem(\"\");\n assertEquals(\"\", string0);\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stem(\"\");\n assertEquals(\"\", string0);\n }", "public static List<Chord> getStemChords (Measure measure,\r\n Glyph stem)\r\n {\r\n List<Chord> chords = new ArrayList<>();\r\n\r\n for (TreeNode node : measure.getChords()) {\r\n Chord chord = (Chord) node;\r\n\r\n if (chord.getStem() == stem) {\r\n chords.add(chord);\r\n }\r\n }\r\n\r\n return chords;\r\n }", "@Test(timeout = 4000)\n public void test52() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"z*[1qTsB`EWYYSum,\");\n assertEquals(\"z*[1qtsb`ewyysum,\", string0);\n }", "@Test(timeout = 4000)\n public void test53() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"ation\");\n assertEquals(\"ation\", string0);\n }", "@Test(timeout = 4000)\n public void test37() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"volum\");\n assertEquals(\"vol\", string0);\n }", "@Override\r\n\t\t\tpublic boolean isStopWord(String term) {\n\t\t\t\treturn false;\r\n\t\t\t}", "public static String preprocessStemAndTokenizeAddBigramsInString(String data) {\n\t\t//System.out.println(\"Preprocess data, remove stop words, stem, tokenize and get bi-grams ..\");\n\n\t\tSet<String> transformedSet = new LinkedHashSet<String>();\n\t\tList<String> stemmedList = new ArrayList<String>();\n\n\t\tTokenizer analyzer = new Tokenizer(Version.LUCENE_30);\n\t\tTokenStream tokenStream = analyzer.tokenStream(\"\", new StringReader(data));\n\t\tTermAttribute termAttribute;\n\t\tString term;\n\t\ttry {\n\t\t\twhile (tokenStream.incrementToken()) {\n\t\t\t\ttermAttribute = tokenStream.getAttribute(TermAttribute.class);\n\t\t\t\tterm = termAttribute.term();\n\t\t\t\tif (digitPattern.matcher(term).find()) //ignore digits\n\t\t\t\t\tcontinue;\n\t\t\t\tif (stopwords.contains(term)) //ignore stopwords\n\t\t\t\t\tcontinue;\n\t\t\t\tif (term.length() <= 1) //ignore stopwords\n\t\t\t\t\tcontinue;\n\t\t\t\tstemmer.setCurrent(term);\n\t\t\t\tstemmer.stem();\n\t\t\t\tstemmedList.add(stemmer.getCurrent());\n\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tString[] ds = stemmedList.toArray(new String[0]);\n\n\t\t/*for(int i=0; i<stemmedList.size(); i++)\n\t\t\tSystem.out.print(ds[i]+\"\\t\");*/\n\n\t\t//add bi-grams\n\t\tfinal int size = 2;\n\t\tfor (int i = 0; i < ds.length; i++) {\n\t\t\ttransformedSet.add(ds[i]); //add single words\n\t\t\tif (i + size <= ds.length) {\n\t\t\t\tString t = \"\";\n\t\t\t\tfor (int j = i; j < i + size; j++) {\n\t\t\t\t\tt += \" \" + ds[j];\n\t\t\t\t}\n\t\t\t\tt = t.trim().replaceAll(\"\\\\s+\", \"_\");\n\t\t\t\ttransformedSet.add(t); //add bi-gram combined with \"_\"\n\t\t\t}\n\t\t}\n\t\t//System.out.println(transformedSet.toArray(new String[transformedSet.size()]).toString());\n\t\treturn StringUtils.join( transformedSet.toArray(new String[transformedSet.size()]), \" \");\n\t\t\n\t}", "@Test(timeout = 4000)\n public void test59() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"Name(s) of editor(s), typed as indicated in the LaTeX book. If there is also an author field, then the editor field gives the editor of the book or collection in which the reference appears.\");\n assertEquals(\"nam(s) of edit(s), typ as indic in th latic book. if ther is als an author field, then th edit field giv th edit of th book or collect in which th refer appear.\", string0);\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"end\");\n assertEquals(\"ens\", string0);\n }", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stem(\"istr\");\n assertEquals(\"ister\", string0);\n }", "@Test(timeout = 4000)\n public void test04() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stem(\"\");\n assertEquals(\"\", string0);\n }", "@Test(timeout = 4000)\n public void test37() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stem(\"umpt\");\n assertEquals(\"um\", string0);\n }", "@Test(timeout = 4000)\n public void test39() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"fYa2LTt\");\n assertEquals(\"fya2lt\", string0);\n }", "@Test(timeout = 4000)\n public void test47() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stem(\"`@uwvo}kn>e6AR\");\n assertEquals(\"`@uwvo}kn>e6ar\", string0);\n }", "@Test(timeout = 4000)\n public void test63() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stem(\"5!r3t6i,keusix\");\n assertEquals(\"5!r3t6i,keusic\", string0);\n }", "private static String italianAnalyzer(String label) throws IOException\r\n\t{\r\n\t\t// recupero le stopWords dell'ItalianAnalyzer\r\n\t\tCharArraySet stopWords = ItalianAnalyzer.getDefaultStopSet();\r\n\t\t// andiamo a tokenizzare la label\r\n\t\tTokenStream tokenStream = new StandardTokenizer(Version.LUCENE_48, new StringReader(label));\r\n\t\t// richiamo l'Elision Filter che si occupa di elidere le lettere apostrofate\r\n\t\ttokenStream = new ElisionFilter(tokenStream, stopWords);\r\n\t\t// richiamo il LowerCaseFilter\r\n\t\ttokenStream = new LowerCaseFilter(Version.LUCENE_48, tokenStream);\r\n\t\t// richiamo lo StopFilter per togliere le stop word\r\n\t\ttokenStream = new StopFilter(Version.LUCENE_48, tokenStream, stopWords);\r\n\t\t// eseguo il processo di stemming italiano per ogni token\r\n\t\ttokenStream = new ItalianLightStemFilter(tokenStream);\r\n\t\t\r\n\t\t/*\r\n\t\t * ricostruisco la stringa in precedenza tokenizzata\r\n\t\t */\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t CharTermAttribute charTermAttribute = tokenStream.addAttribute(CharTermAttribute.class);\r\n\t tokenStream.reset();\r\n\r\n\t while (tokenStream.incrementToken()) \r\n\t {\r\n\t String term = charTermAttribute.toString();\r\n\t sb.append(term + \" \");\r\n\t }\r\n \r\n\t tokenStream.close();\r\n\t // elimino l'ultimo carattere (spazio vuoto)\r\n\t String l = sb.toString().substring(0,sb.toString().length()-1);\r\n\t \r\n\t// ritorno la label stemmata\r\n return l;\r\n\t\r\n\t}", "public interface MorphemesDetector {\n\n String detectSuffix(String token);\n\n}", "@Test(timeout = 4000)\n public void test63() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stem(\"otide\");\n assertEquals(\"ot\", string0);\n }", "@Test(timeout = 4000)\n public void test31() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"iully\");\n assertEquals(\"iul\", string0);\n }", "public static String singularize(String word)\n {\n if (Inflection.isUncountable(word))\n {\n return word;\n }\n else\n {\n for (Inflection inflection : singular)\n {\n //System.out.println(word + \" matches \" + inflection.pattern + \"? (ignore case: \" + inflection.ignoreCase + \")\");\n if (inflection.match(word))\n {\n //System.out.println(\"match!\");\n return inflection.replace(word);\n }\n }\n }\n return word;\n }", "@Test(timeout = 4000)\n public void test46() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"editor\");\n assertEquals(\"edit\", string0);\n }", "@Test(timeout = 4000)\n public void test17() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"wisend\");\n assertEquals(\"wisens\", string0);\n }", "@Test(timeout = 4000)\n public void test61() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stem(\"ation\");\n assertEquals(\"ation\", string0);\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"eti=t4on\");\n assertEquals(\"es=t4on\", string0);\n }" ]
[ "0.9048448", "0.84633887", "0.8199963", "0.8100278", "0.7992041", "0.7926847", "0.78391695", "0.7824335", "0.74840677", "0.7435818", "0.72903395", "0.7285246", "0.7154247", "0.71341", "0.7106843", "0.70748085", "0.69815755", "0.6919014", "0.6787782", "0.6748186", "0.6587581", "0.6576334", "0.6563251", "0.65124786", "0.6500997", "0.6292434", "0.628274", "0.61913466", "0.61375743", "0.6108717", "0.60992604", "0.607535", "0.60178137", "0.60035557", "0.59843355", "0.59766567", "0.5964969", "0.5917217", "0.5915118", "0.59129244", "0.59018594", "0.58857447", "0.58763576", "0.5864813", "0.57954246", "0.577296", "0.5762535", "0.5729983", "0.5715075", "0.57065517", "0.5666168", "0.56498545", "0.5644472", "0.56258047", "0.55981463", "0.55784726", "0.5565024", "0.5560799", "0.5537116", "0.551989", "0.55001116", "0.5490975", "0.5466661", "0.5463424", "0.5448384", "0.5445365", "0.54388314", "0.54209167", "0.54120487", "0.5408902", "0.5398578", "0.53828496", "0.53826815", "0.5372518", "0.536823", "0.5367887", "0.53556395", "0.5345621", "0.5342004", "0.53375787", "0.53355515", "0.5334724", "0.53250045", "0.5322819", "0.531991", "0.53196514", "0.53138375", "0.5307266", "0.53002286", "0.52967703", "0.52842027", "0.5277666", "0.5277261", "0.52734494", "0.52691555", "0.5265925", "0.52656597", "0.5256496", "0.525538", "0.5247727" ]
0.68937963
18
Return word if is not stop word or empty array if it is
public static String isNSW(String word) { if (sw.contains(word)) { return ""; } return word; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isStopword( char[] word ) {\n\t\t// Return true if the input word is a stopword, or false if not.\n\t\treturn false;\n\t}", "public boolean isStopWord(String word);", "public abstract boolean isStopWord(String term);", "@Override\r\n\t\t\tpublic boolean isStopWord(String term) {\n\t\t\t\treturn false;\r\n\t\t\t}", "default boolean isStopWord() {\n return meta(\"nlpcraft:nlp:stopword\");\n }", "public String[] getStopWords(String fieldName) {\n Set<String> stopWords = stopWordsPerField.get(fieldName);\n return stopWords != null ? stopWords.toArray(new String[stopWords.size()]) : new String[0];\n }", "@Override\r\n\t\t\tpublic Set<String> getStopWords() {\n\t\t\t\treturn null;\r\n\t\t\t}", "private static String removeStopWords(String str) {\n for(int i=0; i<stopWords.size(); i++) {\n String temp = stopWords.get(i);\n if(temp.equalsIgnoreCase(str)) {\n str = \"\";\n }\n }\n return str;\n }", "@Override\n\tprotected boolean isStopword(String word) {\n\t\treturn this.stopwords.contains(word);\n\t}", "public static String getStopWords() throws IOException{\n\t\tString filepath1 = \"C:/Naveen/CCS/IR/AP89_DATA/AP_DATA/stoplist.txt\";\n\t\tPath path1 = Paths.get(filepath1);\n\t\tScanner scanner1 = new Scanner(path1);\n\t\tStringBuffer stopWords = new StringBuffer();\n\t\t\n\t\twhile (scanner1.hasNextLine()){\n\t\t\tString line = scanner1.nextLine();\n\t\t\tstopWords.append(line);\n\t\t\tstopWords.append(\"|\");\n\t } \n\t\t\n\t\tstopWords.append(\"document|discuss|identify|report|describe|predict|cite\");\n\t\tString allStopwords = stopWords.toString();\n\t\t//System.out.println(\"\"+allStopwords);\n\t\treturn allStopwords;\n\t}", "public Term[] getStopWords() {\n List<Term> allStopWords = new ArrayList<Term>();\n for (String fieldName : stopWordsPerField.keySet()) {\n Set<String> stopWords = stopWordsPerField.get(fieldName);\n for (String text : stopWords) {\n allStopWords.add(new Term(fieldName, text));\n }\n }\n return allStopWords.toArray(new Term[allStopWords.size()]);\n\t}", "private String removeStopWords(String str) throws IOException{\n String stopwords = \"!! ?! ?? !? ` `` '' -lrb- -rrb- -lsb- -rsb- , . : ; \\\" ' ? < > { } [ ] + - ( ) & % $ @ ! ^ # * .. ... 'll 's 'm a about above after again against all am an and any are aren't as at be because been before being below between both but by can can't cannot could couldn't did didn't do does doesn't doing don't down during each few for from further had hadn't has hasn't have haven't having he he'd he'll he's her here here's hers herself him himself his how how's i i'd i'll i'm i've if in into is isn't it it's its itself let's me more most mustn't my myself no nor not of off on once only or other ought our ours ourselves out over own same shan't she she'd she'll she's should shouldn't so some such than that that's the their theirs them themselves then there there's these they they'd they'll they're they've this those through to too under until up very was wasn't we we'd we'll we're we've were weren't what what's when when's where where's which while who who's whom why why's with won't would wouldn't you you'd you'll you're you've your yours yourself yourselves ### return arent cant couldnt didnt doesnt dont hadnt hasnt havent hes heres hows im isnt its lets mustnt shant shes shouldnt thats theres theyll theyre theyve wasnt were werent whats whens wheres whos whys wont wouldnt youd youll youre youve\";\n String[] allWords = str.toLowerCase().split(\" \");\n StringBuilder builder = new StringBuilder();\n for(String word : allWords) {\n if(!stopwords.contains(word)) {\n builder.append(word);\n builder.append(' ');\n } \n }\n String result = builder.toString().trim();\n return result;\n }", "private static String analyzeTerm(String term) {\n String ret = term.toLowerCase();\n if (stopWords.contains(ret) || ret.isEmpty())\n return \"\";\n return stemmer.stem(ret);\n }", "public static ArrayList<String> getTerms(String comment){\n\n\t\tString[] terms = comment.split(\"[^a-zA-Z]+\");\n\t\t//if(terms.length == 0) System.out.println(\"error: \" + comment);\n\t\tArrayList<String> termsarray = new ArrayList<String>();\n\t\tfor(int i=0;i<terms.length;i++){\n\t\t\t\n\t\t\tString iterm = terms[i].toLowerCase();\n\t\t\tboolean isStopWord = false;\n\t\t\tfor(String s : stopWord){\n\t\t\t\tif(iterm.equals(s)){\n\t\t\t\t\tisStopWord = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(isStopWord == true)\n\t\t\t\tcontinue;\n\t\t\t\n\t\t\tStemmer stemmer = new Stemmer();\n\t\t\tstemmer.add(iterm.toCharArray(), iterm.length());\n\t\t\tstemmer.stem();\n\t\t\titerm = stemmer.toString();\n\t\t\t\n\t\t\t//System.out.println(iterm);\n\t\t\tif(iterm.length() >=2 && !termsarray.contains(iterm))termsarray.add(iterm);\n\t\t}\n\t\n\t\treturn termsarray;\n\t}", "private ArrayList<String> matchingWords(String word){\n\t\tArrayList<String> list = new ArrayList<String>();\n\t\tfor(int i=0; i<words.size();i++){\n\t\t\tif(oneCharOff(word,words.get(i))){\n\t\t\t\tlist.add(words.get(i));\n\t\t\t}\n\t\t}\n\t\treturn list;\n\t}", "public String[] tokenize(String string) {\n String[] result = null;\n\n if (string != null && !\"\".equals(string)) {\n if (normalizer != null) {\n final NormalizedString nString = normalize(string);\n if (nString != null) {\n result = nString.split(stopwords);\n }\n }\n else if (analyzer != null) {\n final List<String> tokens = LuceneUtils.getTokenTexts(analyzer, label, string);\n if (tokens != null && tokens.size() > 0) {\n result = tokens.toArray(new String[tokens.size()]);\n }\n }\n\n if (result == null) {\n final String norm = string.toLowerCase();\n if (stopwords == null || !stopwords.contains(norm)) {\n result = new String[]{norm};\n }\n }\n }\n\n return result;\n }", "private String[] getSearchPhrase(boolean split) {\n return split ? getPhrase().split(\" \") : new String[]{getPhrase()};\n }", "@Test\n\tpublic void testRemoveAllStopWords() {\n\t\tString result;\n\t\ttry {\n\t\t\tresult = sp.removeStopWords(stopWords);\n\t\t\tassertEquals(\"Strings not equal. They should be empty.\", \"\", result);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "String[] splitSentenceWords() {\n\t\t\tint i=0;\n\t\t\tint j=0;\n\t\t\tArrayList<String> words = new ArrayList<String>();\n\t\t\t\n\t\t\t\tString[] allWords = wordPattern.split(purePattern.matcher(sentence).replaceAll(\" \"));//.split(\"(?=\\\\p{Lu})|(\\\\_|\\\\,|\\\\.|\\\\s|\\\\n|\\\\#|\\\\\\\"|\\\\{|\\\\}|\\\\@|\\\\(|\\\\)|\\\\;|\\\\-|\\\\:|\\\\*|\\\\\\\\|\\\\/)+\");\n\t\t\tfor(String word : allWords) {\n\t\t\t\tif(word.length()>2) {\n\t\t\t\t\twords.add(word.toLowerCase());\n\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\treturn (String[])words.toArray(new String[words.size()]);\n\t\t\n\t\t}", "public String getKeyword(String word) {\n\t\t/** COMPLETE THIS METHOD **/\n\t\t//strip trailing punctuation\n\t\tint n = 1;\n\t\tString output = \"\";\n\t\tword = word.toLowerCase();\n\t\tint j = 0;\n\t\twhile(j<word.length())\n\t\t{\n\t\t\tif(Character.isLetter(word.charAt(j)))\n\t\t\t{\n\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//return null;\n\t\t\t}\n\t\t\tj++;\n\t\t}\n\t\t\n\t\twhile(n<word.length())\n\t\t{\n\t\t\t\n\t\t\tif( word.charAt(word.length()-n) == '.' ||\n\t\t\t\t\tword.charAt(word.length()-n) == ',' ||\n\t\t\t\t\tword.charAt(word.length()-n) == '?' || \n\t\t\t\t\tword.charAt(word.length()-n) == ':' ||\n\t\t\t\t\tword.charAt(word.length()-n) == ';' ||\n\t\t\t\t\tword.charAt(word.length()-n) == '!' )\n\t\t\t{\n\t\t\t\toutput = word.substring(0, word.length()-n);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tn++;\n\t\t}\n\t\tif( !(word.charAt(word.length()-1) == '.' ||\n\t\t\t\tword.charAt(word.length()-1) == ',' ||\n\t\t\t\tword.charAt(word.length()-1) == '?' || \n\t\t\t\tword.charAt(word.length()-1) == ':' ||\n\t\t\t\tword.charAt(word.length()-1) == ';' ||\n\t\t\t\tword.charAt(word.length()-1) == '!' )\n\t\t\t\t)\n\t\t{\n\t\t\toutput = word.substring(0, word.length());\n\t\t}\n\t\t// check if there are only alphanumeric characters\n\t\t\n\t\tArrayList<String> items = new ArrayList<>();\n\t\t\n\t\t\n\t try {\n\t \t\n\t Scanner scanner = new Scanner(new File(\"noisewords.txt\"));\n\t while (scanner.hasNextLine()) {\n\t String line = scanner.nextLine();\n\t items.add(line);\n\t \n\t }\n\t scanner.close();\n\t } catch (FileNotFoundException e) {\n\t e.printStackTrace();\n\t }\n\t int i = 0;\n\t boolean ans = false;\n\t while(i<items.size()) {\n\t\t if(output.equals(items.get(i))) \n\t\t {\n\t\t \tans = true;\n\t\t \tbreak;\n\t\t }\n\t\t else\n\t\t {\n\t\t \t ans = false;\n\t\t }\n\t\t i++;\n\t }\n\t //System.out.println(ans);\n\t if(ans == true)\n\t {\n\t \t return null;\n\t }\n\t /* int a = 0;\n\t\twhile(a<items.size())\n\t\t{\n\t\t\tSystem.out.println(items.get(a));\n\t\t\ta++;\n\t\t}*/\n\t\t// following line is a placeholder to make the program compile\n\t\t// you should modify it as needed when you write your code\n\t\tif(output != null)\n\t\t{\n\t\t\treturn output;\n\t\t}\n\t\t\n\t\treturn null;\n\t}", "private static String[] parseStartWordDelimiter(final String token) {\r\n String[] tokenArray = null;\r\n if (token != null && token.length() > 0) {\r\n final Iterator iterator = TagOptionSingleton.getInstance().getStartWordDelimiterIterator();\r\n int index;\r\n String delimiter;\r\n while (iterator.hasNext()) {\r\n delimiter = (String) iterator.next();\r\n if (token.startsWith(delimiter)) {\r\n index = token.indexOf(delimiter, delimiter.length());\r\n } else {\r\n index = token.indexOf(delimiter);\r\n }\r\n if (index > 0) {\r\n tokenArray = new String[3];\r\n tokenArray[0] = delimiter;\r\n tokenArray[1] = token.substring(0, index);\r\n tokenArray[2] = token.substring(index);\r\n }\r\n }\r\n }\r\n return tokenArray;\r\n }", "public String [] get_word_array(){\n\t\treturn word_array;\n\t}", "private StopWords() {\r\n\t\tPath source = Paths.get(\"./dat/zaustavne_rijeci.txt\");\r\n\t\ttry {\r\n\t\t\tbody = new String(Files.readAllBytes(source),\r\n\t\t\t\t\tStandardCharsets.UTF_8);\r\n\t\t} catch (IOException ignorable) {\r\n\t\t}\r\n\t\twords = new LinkedHashSet<>();\r\n\t\tfillSet();\r\n\t}", "private static void splitWord() {\n\t\tint i = 1;\r\n\t\tfor(String doc : DocsTest) {\r\n\t\t\tArrayList<String> wordAll = new ArrayList<String>();\r\n\t\t\tfor (String word : doc.split(\"[,.() ; % : / \\t -]\")) {\r\n\t\t\t\tword = word.toLowerCase();\r\n\t\t\t\tif(word.length()>1 && !mathMethod.isNumeric(word)) {\r\n\t\t\t\t\twordAll.add(word);\r\n\t\t\t\t\tif(!wordList.contains(word)) {\r\n\t\t\t\t\t\twordList.add(word);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\twordAll.removeAll(stopword);\r\n\t\t\tDoclist.put(i, wordAll);\r\n\t\t\ti++;\r\n\t\t}\r\n\t\twordList.removeAll(stopword);\r\n\t}", "public Set<String> getStopwords() {\n return stopwords;\n }", "public int removings(String s)\n{\n if(stopWords.contains(s))\n {\n return 1;\n }\n else\n {\n return 0;\n }\n}", "public static List<String> filter_empty(String[] arr){\n\t\tboolean contient_added = false;\n\t\tList<String> out = new ArrayList<String>();\n\t\tfor(String s : arr) {\n\t\t\tif(s.trim().length() > 0){\n\t\t\t\tif(s.equals(\"CONTIENT\")){\n\t\t\t\t\tif(contient_added){\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tcontient_added = true;\n\t\t\t\t}\n\t\t\t\tout.add(s);\n\t\t\t}\n\t\t}\n\t\treturn out;\n\t}", "public synchronized Set<String> getStopWords() throws Exception {\r\n\t\t\r\n\t\tif(stopWords == null){\r\n\t\t\tMTDArquivoEnum enumerado = MTDArquivoEnum.STOP_WORDS;\r\n\t\t\tstopWords = new HashSet<String>();\r\n\t\t\tMTDIterator<String> it = enumerado.lineIterator();\r\n\t\t\twhile (it.hasNext()) {\r\n\t\t\t\tstopWords.add(it.next());\r\n\t\t\t}\r\n\t\t\tit.close();\r\n\t\t}\r\n \r\n return stopWords;\r\n }", "public String[] wordSearch(String word,String[] arrayInput){\n\t\t\r\n\t\tString[] TempArray1 = new String[arrayInput.length];\r\n\t\tString[] TempArray2;\r\n\t\tint count1=0;\r\n\t\tint count2=0;\r\n\t\t\r\n\t\tfor(int i=0;i<arrayInput.length;i++){\r\n\t\t\t//create an array of all the words found in the input array\r\n\t\t\t//*note, this array is the same length as the input, therefore contains NULL values\r\n\t\t\tif(arrayInput[i].toLowerCase().contains(word.toLowerCase())){\r\n\t\t\t\tTempArray1[count1] = arrayInput[i];\r\n\t\t\t\tcount1++;\r\n\t\t\t}\t\r\n\t\t}\r\n\t\t\r\n\t\tif (count1>0){\r\n\t\t\t//1. check to see if anything was found\r\n\t\t\t//2. If found, add all the values found to a correctly sized array\r\n\t\t\t//3.return\r\n\t\t\tTempArray2 = new String[count1];\r\n\t\t\tfor(int i=0;i<arrayInput.length;i++){\r\n\t\t\t\tif(TempArray1[i] != null){\r\n\t\t\t\t\tcount2++;\r\n\t\t\t\t\tTempArray2[count2-1] = TempArray1[i];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn TempArray2;\r\n\t\t}\r\n\t\telse{\r\n\t\t\t//nothing found, return\r\n\t\t\tTempArray1 = new String[1];\r\n\t\t\tTempArray1[0]=\"Empty\";\r\n\t\t\treturn TempArray1;\r\n\t\t}\r\n\t}", "public static String[] splitWords(String str){\r\n\t\tArrayList<String> wordsList= new ArrayList<String>();\r\n\t\t\r\n\t\tfor(String s:str.split(\" \")){\r\n\t\t\tif(!s.isEmpty()) wordsList.add(s);\t\r\n\t\t}\r\n\t\t\t\t\r\n\t\treturn wordsList.toArray(new String[wordsList.size()]);\r\n\t}", "public String getKeyword(String word) {\n\t\tboolean foundPunct = false;\n String returnStr = \"\";\n for(int inc = 0; inc < word.length(); inc++) {\n char testChar = word.charAt(inc);\n if(Character.isLetter(testChar) == true) {\n if(foundPunct == true) {return null;}\n else{returnStr = returnStr + Character.toString(testChar).toLowerCase();}}\n else {foundPunct = true;}}\n if(noiseWords.contains(returnStr) == true) {\n return null;}\n if(returnStr == \"\") {\n return null;}\n return returnStr;\n\t}", "public DynamicArray<String> redactText()\n\t{\n\t\tfor (int i = 0; i < text.length(); i++)\n\t\t{\n\t\t\tif(!checkWord(text.get(i))) // checks if the word is listed to be redacted\n\t\t\t{\n\t\t\t\ttext.set(i, redact(text.get(i))); // Redacts word\n\t\t\t}\n\t\t\telse if (isNoun(i)) // Given the index this checks if the word is a noun, but ignores it if there is a full stop.\n\t\t\t{\n\t\t\t\twords.add(text.get(i)); // Since this is a noun, it is added to the list of redacted words\n\t\t\t\ttext.set(i, redact(text.get(i))); // Word is then redacted\n\t\t\t}\n\t\t}\n\t\t\n\t\tint i = 0;\n\t\tint check;\n\t\twhile (i < fullStops.length()) // Loops through full stop points and checks the word that follows it\n\t\t{\n\t\t\tcheck = fullStops.get(i);\n\t\t\tif(!checkWord(text.get(check)))\n\t\t\t{\n\t\t\t\ttext.set(check, redact(text.get(check)));\n\t\t\t}\n\t\t\ti++;\n\t\t\t\t\n\t\t}\n\t\treturn text;\n\t}", "public List<Word> getWordsEndingAt(int end);", "private boolean findFullStop(ArrayList<String> parameters) {\n int index = findIndexOfLastWord(parameters);\n if (index == -1) {\n return false;\n }\n return true;\n }", "java.lang.String getWord();", "@ZAttr(id=1073)\n public String[] getPrefSpellIgnoreWord() {\n return getMultiAttr(Provisioning.A_zimbraPrefSpellIgnoreWord);\n }", "public Removalstops()\n {\n stopWords.add(\"am\");\n stopWords.add(\"my\");\nstopWords.add(\"at\");\nstopWords.add(\"a\");\nstopWords.add(\"i\");\nstopWords.add(\"is\");\nstopWords.add(\"of\");\nstopWords.add(\"have\");\nstopWords.add(\"--\");\nstopWords.add(\"do\");\nstopWords.add(\"the\");\nstopWords.add(\"was\");\nstopWords.add(\"iam\");\nstopWords.add(\"there\");\nstopWords.add(\"what\");\nstopWords.add(\"for\");\nstopWords.add(\"in\");\nstopWords.add(\"very\");\nstopWords.add(\"and\");\nstopWords.add(\"to\");\nstopWords.add(\"often\");\nstopWords.add(\"because\");\nstopWords.add(\"in\");\nstopWords.add(\"an\");\nstopWords.add(\"can\");\nstopWords.add(\"via\");\nstopWords.add(\"even\");\nstopWords.add(\"as\");\nstopWords.add(\"best\");\nstopWords.add(\"been\");\nstopWords.add(\"into\");\nstopWords.add(\"by\");\nstopWords.add(\"around\");\nstopWords.add(\"being\");\nstopWords.add(\"from\");\nstopWords.add(\"etc\");\nstopWords.add(\"his\");\nstopWords.add(\"do\");\nstopWords.add(\"have\");\nstopWords.add(\"had\"); \nstopWords.add(\"able\");\nstopWords.add(\"about\");\nstopWords.add(\"above\");\nstopWords.add(\"abroad\");\nstopWords.add(\"according\");\nstopWords.add(\"accordingly\");\nstopWords.add(\"across\");\nstopWords.add(\"actually\");\nstopWords.add(\"adj\");\nstopWords.add(\"after\");\nstopWords.add(\"afterwards\");\nstopWords.add(\"again\");\nstopWords.add(\"against\");\nstopWords.add(\"ago\");\nstopWords.add(\"ahead\");\nstopWords.add(\"ain't\");\nstopWords.add(\"all\");\nstopWords.add(\"allow\");\nstopWords.add(\"allows\");\nstopWords.add(\"almost\");\nstopWords.add(\"alone\");\nstopWords.add(\"along\");\nstopWords.add(\"alongside\");\nstopWords.add(\"already\");\nstopWords.add(\"also\");\nstopWords.add(\"although\");\nstopWords.add(\"always\");\nstopWords.add(\"am\");\nstopWords.add(\"amid\");\nstopWords.add(\"amidst\");\nstopWords.add(\"among\");\nstopWords.add(\"amongst\");\nstopWords.add(\"an\");\nstopWords.add(\"and\");\nstopWords.add(\"another\");\nstopWords.add(\"any\");\nstopWords.add(\"anybody\");\nstopWords.add(\"anyhow\");\nstopWords.add(\"anyone\");\nstopWords.add(\"anything\");\nstopWords.add(\"anyway\");\nstopWords.add(\"anyways\");\nstopWords.add(\"anywhere\");\nstopWords.add(\"apart\");\nstopWords.add(\"appear\");\nstopWords.add(\"appreciate\");\nstopWords.add(\"appropriate\");\nstopWords.add(\"are\");\nstopWords.add(\"aren't\");\nstopWords.add(\"around\");\nstopWords.add(\"as\");\nstopWords.add(\"a's\");\nstopWords.add(\"aside\");\nstopWords.add(\"ask\");\nstopWords.add(\"asking\");\nstopWords.add(\"associated\");\nstopWords.add(\"at\");\nstopWords.add(\"available\");\nstopWords.add(\"away\");\nstopWords.add(\"awfully\");\nstopWords.add(\"back\");\nstopWords.add(\"backward\");\nstopWords.add(\"backwards\");\nstopWords.add(\"be\");\nstopWords.add(\"became\");\nstopWords.add(\"beacause\");\nstopWords.add(\"become\");\nstopWords.add(\"becomes\");\nstopWords.add(\"becoming\");\nstopWords.add(\"been\");\nstopWords.add(\"before\");\nstopWords.add(\"beforehand\");\nstopWords.add(\"begin\");\nstopWords.add(\"behind\");\nstopWords.add(\"being\");\nstopWords.add(\"believe\");\nstopWords.add(\"below\");\nstopWords.add(\"beside\");\nstopWords.add(\"besides\");\nstopWords.add(\"best\");\nstopWords.add(\"better\");\nstopWords.add(\"between\");\nstopWords.add(\"beyond\");\nstopWords.add(\"both\");\nstopWords.add(\"brief\");\nstopWords.add(\"but\");\nstopWords.add(\"by\");\nstopWords.add(\"came\");\nstopWords.add(\"can\");\nstopWords.add(\"cannot\");\nstopWords.add(\"cant\");\nstopWords.add(\"can't\");\nstopWords.add(\"caption\");\nstopWords.add(\"cause\");\nstopWords.add(\"causes\");\nstopWords.add(\"certain\");\nstopWords.add(\"cetrainly\");\nstopWords.add(\"changes\");\nstopWords.add(\"clearly\");\nstopWords.add(\"c'mon\");\nstopWords.add(\"co\");\nstopWords.add(\"co.\");\nstopWords.add(\"com\");\nstopWords.add(\"come\");\nstopWords.add(\"comes\");\nstopWords.add(\"concerning\");\nstopWords.add(\"consequently\");\nstopWords.add(\"consider\");\nstopWords.add(\"considering\");\nstopWords.add(\"could\");\nstopWords.add(\"couldn't\");\nstopWords.add(\"c's\");\nstopWords.add(\"currently\");\nstopWords.add(\"dare\");\nstopWords.add(\"daren't\");\nstopWords.add(\"definitely\");\nstopWords.add(\"described\");\nstopWords.add(\"despite\");\nstopWords.add(\"did\");\nstopWords.add(\"didn't\");\nstopWords.add(\"different\");\nstopWords.add(\"directly\");\nstopWords.add(\"do\");\nstopWords.add(\"does\");\nstopWords.add(\"doesn't\");\nstopWords.add(\"doing\");\nstopWords.add(\"done\");\nstopWords.add(\"don't\");\nstopWords.add(\"down\");\nstopWords.add(\"downwards\");\nstopWords.add(\"during\");\nstopWords.add(\"each\");\nstopWords.add(\"edu\");\nstopWords.add(\"eg\");\nstopWords.add(\"eight\");\nstopWords.add(\"eighty\");\nstopWords.add(\"either\");\nstopWords.add(\"else\");\nstopWords.add(\"elsewhere\");\nstopWords.add(\"end\");\nstopWords.add(\"ending\");\nstopWords.add(\"enough\");\nstopWords.add(\"entirely\");\nstopWords.add(\"especially\");\nstopWords.add(\"et\");\nstopWords.add(\"etc\");\nstopWords.add(\"even\");\nstopWords.add(\"evenmore\");\nstopWords.add(\"every\");\nstopWords.add(\"everybody\");\nstopWords.add(\"everyone\");\nstopWords.add(\"everything\");\nstopWords.add(\"everywhere\");\nstopWords.add(\"ex\");\nstopWords.add(\"exactly\");\nstopWords.add(\"example\");\nstopWords.add(\"except\");\nstopWords.add(\"fairly\");\nstopWords.add(\"far\");\nstopWords.add(\"farhter\");\nstopWords.add(\"few\");\nstopWords.add(\"fewer\");\nstopWords.add(\"fifth\");\nstopWords.add(\"first\");\nstopWords.add(\"five\");\nstopWords.add(\"followed\");\nstopWords.add(\"following\");\nstopWords.add(\"follows\");\nstopWords.add(\"for\");\nstopWords.add(\"forever\");\nstopWords.add(\"former\");\nstopWords.add(\"formerly\");\nstopWords.add(\"forth\");\nstopWords.add(\"forward\");\nstopWords.add(\"found\");\nstopWords.add(\"four\");\nstopWords.add(\"from\");\nstopWords.add(\"further\");\nstopWords.add(\"furthermore\");\nstopWords.add(\"get\");\nstopWords.add(\"gets\");\nstopWords.add(\"getting\");\nstopWords.add(\"given\");\nstopWords.add(\"gives\");\nstopWords.add(\"go\");\nstopWords.add(\"goes\");\nstopWords.add(\"going\");\nstopWords.add(\"gone\");\nstopWords.add(\"got\");\nstopWords.add(\"gotten\");\nstopWords.add(\"greetings\");\nstopWords.add(\"had\");\nstopWords.add(\"hadn't\");\nstopWords.add(\"half\");\nstopWords.add(\"happens\");\nstopWords.add(\"hardly\");\nstopWords.add(\"has\");\nstopWords.add(\"hasn't\");\nstopWords.add(\"have\");\nstopWords.add(\"haven't\");\nstopWords.add(\"having\");\nstopWords.add(\"he\");\nstopWords.add(\"he'd\");\nstopWords.add(\"he'll\");\nstopWords.add(\"hello\");\nstopWords.add(\"help\");\nstopWords.add(\"hence\");\nstopWords.add(\"her\");\nstopWords.add(\"here\");\nstopWords.add(\"hereafter\");\nstopWords.add(\"hereby\");\nstopWords.add(\"herein\");\nstopWords.add(\"here's\");\nstopWords.add(\"hereupon\");\nstopWords.add(\"hers\");\nstopWords.add(\"herself\");\nstopWords.add(\"he's\");\nstopWords.add(\"hi\");\nstopWords.add(\"him\");\nstopWords.add(\"himself\");\nstopWords.add(\"his\");\nstopWords.add(\"hither\");\nstopWords.add(\"hopefully\");\nstopWords.add(\"how\");\nstopWords.add(\"howbeit\");\nstopWords.add(\"however\");\nstopWords.add(\"however\");\nstopWords.add(\"hundred\");\nstopWords.add(\"i'd\");\nstopWords.add(\"ie\");\nstopWords.add(\"if\");\nstopWords.add(\"ignored\");\nstopWords.add(\"i'll\");\nstopWords.add(\"i'm\");\nstopWords.add(\"immediate\");\nstopWords.add(\"in\");\nstopWords.add(\"iansmuch\");\nstopWords.add(\"inc\");\nstopWords.add(\"inc.\");\nstopWords.add(\"indeed\");\nstopWords.add(\"indicate\");\nstopWords.add(\"indicated\");\nstopWords.add(\"indicates\");\nstopWords.add(\"inner\");\nstopWords.add(\"inside\");\nstopWords.add(\"insofar\");\nstopWords.add(\"into\");\nstopWords.add(\"inward\");\nstopWords.add(\"is\");\nstopWords.add(\"isn't\");\nstopWords.add(\"it\");\nstopWords.add(\"it'd\");\nstopWords.add(\"it'll\");\nstopWords.add(\"its\");\nstopWords.add(\"it's\");\nstopWords.add(\"itself\");\nstopWords.add(\"i've\");\nstopWords.add(\"just\");\nstopWords.add(\"k\");\nstopWords.add(\"keep\");\nstopWords.add(\"keeps\");\nstopWords.add(\"kept\");\nstopWords.add(\"know\");\nstopWords.add(\"knows\");\nstopWords.add(\"known\");\nstopWords.add(\"last\");\nstopWords.add(\"lately\");\nstopWords.add(\"later\");\nstopWords.add(\"latter\");\nstopWords.add(\"latterly\");\nstopWords.add(\"least\");\nstopWords.add(\"less\");\nstopWords.add(\"let\");\nstopWords.add(\"let's\");\nstopWords.add(\"like\");\nstopWords.add(\"liked\");\nstopWords.add(\"likely\");\nstopWords.add(\"likewise\");\nstopWords.add(\"little\");\nstopWords.add(\"look\");\nstopWords.add(\"looks\");\nstopWords.add(\"low\");\nstopWords.add(\"lower\");\nstopWords.add(\"ltd\");\nstopWords.add(\"made\");\nstopWords.add(\"mainly\");\nstopWords.add(\"make\");\nstopWords.add(\"makes\");\nstopWords.add(\"many\");\nstopWords.add(\"may\");\nstopWords.add(\"maybe\");\nstopWords.add(\"mayn't\");\nstopWords.add(\"me\");\nstopWords.add(\"mean\");\nstopWords.add(\"meanwhile\");\nstopWords.add(\"merely\");\nstopWords.add(\"might\");\nstopWords.add(\"mightn't\");\nstopWords.add(\"mine\");\nstopWords.add(\"minus\");\nstopWords.add(\"miss\");\nstopWords.add(\"more\");\nstopWords.add(\"moreover\");\nstopWords.add(\"most\");\nstopWords.add(\"mostly\");\nstopWords.add(\"mr\");\nstopWords.add(\"mrs\");\nstopWords.add(\"much\");\nstopWords.add(\"must\");\nstopWords.add(\"mustn't\");\nstopWords.add(\"my\");\nstopWords.add(\"myself\");\nstopWords.add(\"name\");\nstopWords.add(\"namely\");\nstopWords.add(\"nd\");\nstopWords.add(\"near\");\nstopWords.add(\"nearly\");\nstopWords.add(\"necessary\");\nstopWords.add(\"need\");\nstopWords.add(\"needn't\");\nstopWords.add(\"needs\");\nstopWords.add(\"neither\");\nstopWords.add(\"never\");\nstopWords.add(\"neverf\");\nstopWords.add(\"neverless\");\nstopWords.add(\"nevertheless\");\nstopWords.add(\"new\");\nstopWords.add(\"next\");\nstopWords.add(\"nine\");\nstopWords.add(\"ninety\");\nstopWords.add(\"no\");\nstopWords.add(\"nobody\");\nstopWords.add(\"non\");\nstopWords.add(\"none\");\nstopWords.add(\"nonetheless\");\nstopWords.add(\"noone\");\nstopWords.add(\"no-one\");\nstopWords.add(\"nor\");\nstopWords.add(\"normally\");\nstopWords.add(\"not\");\nstopWords.add(\"nothing\");\nstopWords.add(\"notwithstanding\");\nstopWords.add(\"novel\");\nstopWords.add(\"now\");\nstopWords.add(\"nowwhere\");\nstopWords.add(\"obviously\");\nstopWords.add(\"of\");\nstopWords.add(\"off\");\nstopWords.add(\"often\");\nstopWords.add(\"oh\");\nstopWords.add(\"ok\");\nstopWords.add(\"okay\");\nstopWords.add(\"old\");\nstopWords.add(\"on\");\nstopWords.add(\"once\");\nstopWords.add(\"one\");\nstopWords.add(\"ones\");\nstopWords.add(\"one's\");\nstopWords.add(\"only\");\nstopWords.add(\"onto\");\nstopWords.add(\"opposite\");\nstopWords.add(\"or\");\nstopWords.add(\"other\");\nstopWords.add(\"others\");\nstopWords.add(\"otherwise\");\nstopWords.add(\"ought\");\nstopWords.add(\"oughtn't\");\nstopWords.add(\"our\");\nstopWords.add(\"ourselves\");\nstopWords.add(\"out\");\nstopWords.add(\"outside\");\nstopWords.add(\"over\");\nstopWords.add(\"overall\");\nstopWords.add(\"own\");\nstopWords.add(\"particular\");\nstopWords.add(\"particularly\");\nstopWords.add(\"past\");\nstopWords.add(\"per\");\nstopWords.add(\"perhaps\");\nstopWords.add(\"placed\");\nstopWords.add(\"please\");\nstopWords.add(\"plus\");\nstopWords.add(\"possible\");\nstopWords.add(\"presumably\");\nstopWords.add(\"probably\");\nstopWords.add(\"provided\");\nstopWords.add(\"provides\");\nstopWords.add(\"que\");\nstopWords.add(\"quite\");\nstopWords.add(\"qv\");\nstopWords.add(\"rather\");\nstopWords.add(\"rd\");\nstopWords.add(\"re\");\nstopWords.add(\"really\");\nstopWords.add(\"reasonably\");\nstopWords.add(\"recent\");\nstopWords.add(\"recently\");\nstopWords.add(\"regarding\");\nstopWords.add(\"regardless\");\nstopWords.add(\"regards\");\nstopWords.add(\"relatively\");\nstopWords.add(\"respectively\");\nstopWords.add(\"right\");\nstopWords.add(\"round\");\nstopWords.add(\"said\");\nstopWords.add(\"same\");\nstopWords.add(\"saw\");\nstopWords.add(\"say\");\nstopWords.add(\"saying\");\nstopWords.add(\"says\");\nstopWords.add(\"second\");\nstopWords.add(\"secondly\");\nstopWords.add(\"see\");\nstopWords.add(\"seeing\");\nstopWords.add(\"seem\");\nstopWords.add(\"seemed\");\nstopWords.add(\"seeming\");\nstopWords.add(\"seems\");\nstopWords.add(\"seen\");\nstopWords.add(\"self\");\nstopWords.add(\"selves\");\nstopWords.add(\"sensible\");\nstopWords.add(\"sent\");\nstopWords.add(\"serious\");\nstopWords.add(\"seriously\");\nstopWords.add(\"seven\");\nstopWords.add(\"several\");\nstopWords.add(\"shall\");\nstopWords.add(\"shan't\");\nstopWords.add(\"she\");\nstopWords.add(\"she'd\");\nstopWords.add(\"she'll\");\nstopWords.add(\"she's\");\nstopWords.add(\"should\");\nstopWords.add(\"shouldn't\");\nstopWords.add(\"since\");\nstopWords.add(\"six\");\nstopWords.add(\"so\");\nstopWords.add(\"some\");\nstopWords.add(\"somebody\");\nstopWords.add(\"someday\");\nstopWords.add(\"somehow\");\nstopWords.add(\"someone\");\nstopWords.add(\"something\");\nstopWords.add(\"sometime\");\nstopWords.add(\"sometimes\");\nstopWords.add(\"somewhat\");\nstopWords.add(\"somewhere\");\nstopWords.add(\"soon\");\nstopWords.add(\"sorry\");\nstopWords.add(\"specified\");\nstopWords.add(\"specify\");\nstopWords.add(\"specifying\");\nstopWords.add(\"still\");\nstopWords.add(\"sub\");\nstopWords.add(\"such\");\nstopWords.add(\"sup\");\nstopWords.add(\"sure\");\nstopWords.add(\"take\");\nstopWords.add(\"taken\");\nstopWords.add(\"taking\");\nstopWords.add(\"tell\");\nstopWords.add(\"tends\");\nstopWords.add(\"th\");\nstopWords.add(\"than\");\nstopWords.add(\"thank\");\nstopWords.add(\"thanks\");\nstopWords.add(\"thanx\");\nstopWords.add(\"that\");\nstopWords.add(\"that'll\");\nstopWords.add(\"thats\");\nstopWords.add(\"that've\");\nstopWords.add(\"the\");\nstopWords.add(\"their\");\nstopWords.add(\"theirs\");\nstopWords.add(\"them\");\nstopWords.add(\"themselves\");\nstopWords.add(\"then\");\nstopWords.add(\"thence\");\nstopWords.add(\"there\");\nstopWords.add(\"thereafter\");\nstopWords.add(\"thereby\");\nstopWords.add(\"there'd\");\nstopWords.add(\"therefore\");\nstopWords.add(\"therein\");\nstopWords.add(\"ther'll\");\nstopWords.add(\"there're\");\nstopWords.add(\"theres\");\nstopWords.add(\"there's\");\nstopWords.add(\"thereupon\");\nstopWords.add(\"there've\");\nstopWords.add(\"these\");\nstopWords.add(\"they\");\nstopWords.add(\"they'd\");\nstopWords.add(\"they'll\");\nstopWords.add(\"they're\");\nstopWords.add(\"they've\");\nstopWords.add(\"thing\");\nstopWords.add(\"things\");\nstopWords.add(\"think\");\nstopWords.add(\"third\");\nstopWords.add(\"thirty\");\nstopWords.add(\"this\");\nstopWords.add(\"thorough\");\nstopWords.add(\"thoroughly\");\nstopWords.add(\"those\");\nstopWords.add(\"though\");\nstopWords.add(\"throughout\");\nstopWords.add(\"thru\");\nstopWords.add(\"thus\");\nstopWords.add(\"till\");\nstopWords.add(\"to\");\nstopWords.add(\"together\");\nstopWords.add(\"too\");\nstopWords.add(\"took\");\nstopWords.add(\"toward\");\nstopWords.add(\"towards\");\nstopWords.add(\"tried\");\nstopWords.add(\"tries\");\nstopWords.add(\"truly\");\nstopWords.add(\"try\");\nstopWords.add(\"trying\");\nstopWords.add(\"t's\");\nstopWords.add(\"twice\");\nstopWords.add(\"two\");\nstopWords.add(\"un\");\nstopWords.add(\"under\");\nstopWords.add(\"underneath\");\nstopWords.add(\"undoing\");\nstopWords.add(\"unfortunately\");\nstopWords.add(\"unless\");\nstopWords.add(\"unlike\");\nstopWords.add(\"unlikely\");\nstopWords.add(\"untill\");\nstopWords.add(\"unto\");\nstopWords.add(\"up\");\nstopWords.add(\"upon\");\nstopWords.add(\"upwards\");\nstopWords.add(\"us\");\nstopWords.add(\"use\");\nstopWords.add(\"used\");\nstopWords.add(\"useful\");\nstopWords.add(\"uses\");\nstopWords.add(\"using\");\nstopWords.add(\"usually\");\nstopWords.add(\"v\");\nstopWords.add(\"value\");\nstopWords.add(\"various\");\nstopWords.add(\"versus\");\nstopWords.add(\"very\");\nstopWords.add(\"via\");\nstopWords.add(\"viz\");\nstopWords.add(\"vs\");\nstopWords.add(\"want\");\nstopWords.add(\"wants\");\nstopWords.add(\"was\");\nstopWords.add(\"wasn't\");\nstopWords.add(\"way\");\nstopWords.add(\"we\");\nstopWords.add(\"we'd\");\nstopWords.add(\"welcome\");\nstopWords.add(\"well\");\nstopWords.add(\"we'll\");\nstopWords.add(\"went\");\nstopWords.add(\"were\");\nstopWords.add(\"we're\");\nstopWords.add(\"weren't\");\nstopWords.add(\"we've\");\nstopWords.add(\"what\");\nstopWords.add(\"whatever\");\nstopWords.add(\"what'll\");\nstopWords.add(\"what's\");\nstopWords.add(\"what've\");\nstopWords.add(\"when\");\nstopWords.add(\"whence\");\nstopWords.add(\"whenever\");\nstopWords.add(\"where\");\nstopWords.add(\"whereafter\");\nstopWords.add(\"whereas\");\nstopWords.add(\"whereby\");\nstopWords.add(\"wherein\");\nstopWords.add(\"where's\");\nstopWords.add(\"whereupon\");\nstopWords.add(\"whereever\");\nstopWords.add(\"whether\");\nstopWords.add(\"which\");\nstopWords.add(\"whichever\");\nstopWords.add(\"while\");\nstopWords.add(\"whilst\");\nstopWords.add(\"whither\");\nstopWords.add(\"who\");\nstopWords.add(\"who'd\");\nstopWords.add(\"whoever\");\nstopWords.add(\"whole\");\nstopWords.add(\"who'll\");\nstopWords.add(\"whom\");\nstopWords.add(\"whomever\");\nstopWords.add(\"who's\");\nstopWords.add(\"whose\");\nstopWords.add(\"why\");\nstopWords.add(\"will\");\nstopWords.add(\"willing\");\nstopWords.add(\"wish\");\nstopWords.add(\"with\");\nstopWords.add(\"within\");\nstopWords.add(\"without\");\nstopWords.add(\"wonder\");\nstopWords.add(\"won't\");\nstopWords.add(\"would\");\nstopWords.add(\"wouldn't\");\nstopWords.add(\"yes\");\nstopWords.add(\"yet\");\nstopWords.add(\"you\");\nstopWords.add(\"you'd\");\nstopWords.add(\"you'll\");\nstopWords.add(\"your\");\nstopWords.add(\"you're\");\nstopWords.add(\"yours\");\nstopWords.add(\"yourself\");\nstopWords.add(\"you've\");\nstopWords.add(\"zero\");\n\n \n \n }", "@Test\n public void findEvenLengthWords() {\n List<String> output = null; // TODO\n\n assertEquals(Arrays.asList(\"in\", \"computer\", \"be\", \"solved\", \"by\", \"adding\", \"of\",\n \"except\", \"many\", \"levels\", \"of\"), output);\n }", "public String get_all_words(){\n\t\tString found_words = \"\";\n\t\t//We try to find the word within our childs\n\t\tfor(LexiNode child: childs){\n\t\t\t\tfound_words += child.get_all_words();\n\t\t}\n\t\tif(current_word != null && !found_words.equals(\"\"))\n\t\t\treturn current_word + \"#\" + found_words;\n\t\telse if(current_word != null && found_words.equals(\"\"))\n\t\t\treturn current_word+ \"#\";\n\t\telse //current_word == null && found_words != null\n\t\t\treturn found_words;\n\t}", "public String getWord() {\n if(words[index] != null) {\n return words[index];\n } else {\n return \"\";\n }\n }", "private String[] getKeywordsFromBar()\n {\n String text = keywordBar.getText();\n \n if(text.equals(\"\")) return null;\n else return text.split(\"\\\\s*,\\\\s*\");\n }", "public void setwoorden()\n {\n String[] woorden = taInput.getText().split(\" |\\n\");\n \n for (int i = 0; i < woorden.length; i++) {\n if(!woorden[i].isEmpty())\n {\n AllText.add(woorden[i]); \n }\n } \n }", "private static String[] parseEndWordDelimiter(final String token) {\r\n String[] tokenArray = null;\r\n if (token != null && token.length() > 0) {\r\n final Iterator iterator = TagOptionSingleton.getInstance().getEndWordDelimiterIterator();\r\n int index;\r\n String delimiter;\r\n while (iterator.hasNext()) {\r\n delimiter = (String) iterator.next();\r\n if (token.endsWith(delimiter)) {\r\n index = token.substring(0, token.length() - delimiter.length()).indexOf(delimiter);\r\n } else {\r\n index = token.indexOf(delimiter);\r\n }\r\n if (index > 0) {\r\n tokenArray = new String[3];\r\n tokenArray[0] = delimiter;\r\n tokenArray[1] = token.substring(0, index);\r\n tokenArray[2] = token.substring(index);\r\n }\r\n }\r\n }\r\n return tokenArray;\r\n }", "@Test\n // Test that the preprocessor removes the relevant stop words\n void removeStopWords01() {\n List<String> stop_words = new ArrayList<>();\n List<String> words = new ArrayList<>(stop_words);\n words.add(\"vigtig\");\n assertEquals(\"vigtig\", preprocessor.removeStopWords(words).get(0));\n }", "private String[] readStopwords(String filepath) {\n // Get filepath\n Path path = Paths.get(filepath);\n\n // Array to hold each stopword\n ArrayList<String> words = new ArrayList<>();\n\n // Read file at that path\n try {\n Files.readAllLines(path).forEach(word -> {\n // Add each stopword\n words.add(word);\n });\n } catch (IOException e) {\n System.out.println(\"No stopwords list found.\");\n System.exit(1);\n }\n\n // Cast to String array and return\n String[] wordsArray = new String[words.size()];\n wordsArray = words.toArray(wordsArray);\n return wordsArray;\n }", "public ArrayList<String> playWord(){\n\t\tSystem.out.println(myField.getNewWords());\n\t\tArrayList<String> words;\n\t\tif(myField.getNewWords().size() != 0){\n\t\t\t words = myWC.checkWords(myPC.createWords(myField.getTiles(), myField.getNewWords()), myField.getNewWords(), myField.getTiles(), getfirstWord());\n\t\t}\n\t\telse{\n\t\t\twords = new ArrayList<String>();\n\t\t\twords.add(\"You have not placed any stones\");\n\t\t\treturn words;\n\t\t}\n\t\tSystem.out.println(words);\n\t\t\n\t\tif(words.size() == 0){\n\t\t\t\n\t\t\tplayDB();\n\t\t\treturn null;\n\t\t\t\n\t\t}\n\t\telse{\n\t\t\tmyField.updateField(id);\n\t\t\treturn words;\n\t\t}\n\t\t\n\t}", "public boolean isStopword(String str) {\n\n return m_Stopwords.containsKey(str.toLowerCase());\n }", "@Override\r\n public String wordsOriginal(char[] arrayOfword) {\n String origalWord = \"\";//define a String for save the word orignal\r\n try {\r\n for (int i = 0; i < arrayOfword.length; i++) {\r\n origalWord += arrayOfword[i];//each charater put in the string origalWord\r\n }\r\n } catch (Exception e) {\r\n JOptionPane.showMessageDialog(null, \"An error has occured!\");\r\n }\r\n return origalWord;\r\n }", "public String[] getKeywords() {\n\t\tString t = doc.get(\"keyword\");\n\n\t\tif (t == null || t.trim().length() == 0) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\treturn t.trim().split(\"\\\\+\");\n\t\t}\n\t}", "public static void checkStopList(Token stopWord)\r\n\t{\r\n\t\tIterator<String> sl = WordLists.stoplist().iterator();\r\n\r\n\t\twhile(sl.hasNext()) {\r\n\t\t\tString stop = sl.next();\r\n\r\n\t\t\tif (stopWord.getName().equalsIgnoreCase(stop)) {\r\n\t\t\t\tstopWord.getFeatures().setHasStopList(true);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static CharArraySet getDefaultStopSet() {\n return DefaultSetHolder.DEFAULT_STOP_SET;\n }", "public boolean isWord2ignore(String word);", "@Override\n public void removeWord(String wordToBeRemoved) {\n int index = 0;\n String[] result = new String[wordsArray.length];\n for (int i = 0; i < wordsArray.length; i++) {\n if (!wordsArray[i].equals( wordToBeRemoved)){\n result[index]= wordsArray[i];\n index++;\n }\n }\n }", "private static String[] getKeywords(String[] args) {\n String[] keywords = new String[args.length - 2];\n for (int i = 2; i < args.length; i++) {\n keywords[i - 2] = args[i].toLowerCase();\n }\n return keywords;\n }", "private static List<String> induceSynonims(String word) {\n\t\treturn null;\n\t}", "boolean break_word (ArrayList<String> strings, int index, String word) {\n boolean withWord = false;\n if (dictionary.contains(word)) {\n strings.add(word);\n if (index == sentence.length()) {\n System.out.println (strings);\n return true;\n }\n withWord = break_word(new ArrayList<String>(strings), index, \"\");\n strings.remove(strings.size() - 1);\n }\n if (index == sentence.length())\n return false;\n word += sentence.charAt(index);\n return break_word(new ArrayList<String>(strings), index+1, word) || withWord;\n }", "public String longestWord(String[] words) {\n PriorityQueue<String> queue = new PriorityQueue<>(new Comparator<String>() {\n @Override\n public int compare(String o1, String o2) {\n if (o1.length() > o2.length())\n return -1;\n else if (o1.length() == o2.length())\n return o1.compareTo(o2);\n else\n return 1;\n }\n });\n \n Set<String> set = new HashSet<>();\n for (String s : words) {\n set.add(s);\n queue.add(s);\n }\n \n while (!queue.isEmpty()) {\n String w = queue.poll();\n boolean res = true;\n for (int i = 1; i < w.length() ; i++) {\n String sub = w.substring(0, i);\n if (!set.contains(sub)) {\n res = false;\n break;\n }\n }\n if (res)\n return w;\n }\n \n return \"\";\n }", "public WordArray getWordArray() { return wordArray; }", "private String[] getCorrection(String word){\n\t\t//First we check the word in the common list of corrections\n\t\t//Then we look for the lowercase, just to be certain\n\t\tif(word.length() == 0) return null;\n\t\tCorrection c = this.typos.get(word);\n\t\tif(c != null) return c.getCorrection();\n\t\tc = this.typos.get(word.toLowerCase());\n\t\tif(c != null) return c.getCorrection();\n\t\t\n\t\treturn null;\n\t}", "public static char[] getWord() {\n\t\t\n\t\tString[] words = {\"cookie\", \"bacon\", \"steak\", \"apple\", \"doughnut\"};\n\t\tString choice = words[(int)(Math.random() * words.length)];\n\t\tchar[] word = new char[choice.length()];\n\n\t\tfor (int i = 0; i < word.length; i++) {\n\t\t\tword[i] = choice.charAt(i); // Convert Word into charArray\n\t\t}\n\t\treturn word;\n\t}", "List<T> getWord();", "public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n\n System.out.println(\" Bir string giriniz =\");\n String text = sc.nextLine();\n\n boolean boslukVarmi = text.contains(\" \");\n System.out.println(\"boslukVarmi = \" + boslukVarmi);\n \n boolean bosMU=text.isEmpty();\n System.out.println(\"bosMU = \" + bosMU);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n }", "public RemoverStopWords() {\n\t\tBufferedReader br = null;\n\t\ttry {\n\t\t\tbr = new BufferedReader(new FileReader(\"stopwords_en.txt\"));\n\t\t\tString line;\n\n\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t\tstop_words.add(line.trim());\n\t\t\t}\n\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (br != null) {\n\t\t\t\t\tbr.close();\n\t\t\t\t}\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public Set<String> getStopWords() throws Exception{\n\tFile file = new File(\"stopWords/stopwords.txt\");\n\tHashSet<String> stopwords = new HashSet<>();\n\tBufferedReader br = new BufferedReader(new FileReader(file));\n\tString line;\n\twhile((line=br.readLine())!=null){\n\t\tString[] tokens = line.split(\" \");\n\t\tfor(String token : tokens){\n\t\t\tif(!stopwords.contains(token)){\n\t\t\t\tstopwords.add(token);\n\t\t\t}\n\t\t}\n\t}\n\tbr.close();\n\treturn stopwords;\n\t}", "public PorterStopWords()\r\n\t{\r\n\t\tstopWordsSet.addAll( porterStopWordsSet );\r\n\t}", "private List<String> readStopFile(File stopFile) throws FileNotFoundException {\n\n Scanner scanner = new Scanner(stopFile);\n List<String> words;\n words = new ArrayList<>();\n String temp;\n\n while (scanner.hasNextLine()) {\n temp = scanner.nextLine();\n words.add(temp.toLowerCase());\n }\n\n return words;\n }", "public static ArrayList<String> wordTokenizer(String sentence){\n \n ArrayList<String> words = new ArrayList<String>();\n String[] wordsArr = sentence.replaceAll(\"\\n\", \" \").toLowerCase().split(\" \");\n \n for(String s : wordsArr){\n \n if(s.trim().compareTo(\"\") != 0)\n words.add(s.trim());\n \n }\n \n return words;\n \n }", "private String[] mixedWords(String[] words)\n {\n String[] output = new String[words.length];\n for(int i = 0; i < words.length; i++){\n if(i%2==0){\n output[i] = recombine(words[i], words[i+1]);\n } else {\n output[i] = recombine(words[i], words[i-1]);\n }\n }\n return output;\n }", "public String remove_stop_words(String text) {\n\t\tfor (String w : stop_words) {\n\t\t\ttext = text.replaceAll(\"\\\\s*\\\\b\" + w + \"\\\\b\\\\s*\", \" \");\n\t\t}\n\n\t\treturn text;\n\t}", "public boolean wordBreak(String s, List<String> wordDict) {\n boolean[] dp = new boolean[s.length()]; \n for (int i = 0; i <s.length(); i++) {\n if (wordDict.contains(s.substring(0, i+1))) {\n dp[i] = true;\n continue;\n }\n for (int k = 0; k < i; k++) {\n if (dp[k] && wordDict.contains(s.substring(k+1, i+1))) {\n dp[i] = true;\n System.out.println(i + \" \" +dp[i]);\n break;\n }\n }\n \n }\n return dp[s.length()-1];\n }", "SList oddWords();", "public AnalizadorBusqueda(CharArraySet stopwords) {\n this(stopwords, CharArraySet.EMPTY_SET);\n }", "public static List<String> missingWords(String s, String t) {\n String[] a = s.split(\" \");\n String[] b = t.split(\" \");\n int sz = a.length - b.length;\n String [] missing = new String[sz];\n int c = 0;\n for(int i=0;i<a.length;i++){\n int flag=0;\n for(int j=0;j<b.length;j++){\n if(a[i].equals(b[j]))\n flag=1;\n }\n if(flag==0){\n missing[c++]=a[i];\n\n }\n }\n\n List<String> missingWords = new ArrayList<>();\n for(String str: missing){\n missingWords.add(str);\n }\n System.out.println(missingWords);\n return missingWords;\n }", "public String[] getWordDetails(String word){\r\n if (dict.isWordExists(word)) {\r\n return dict.getWordDetails(word);\r\n }\r\n return null;\r\n }", "private String[] parseArray(String val) {\n String[] arrayVals;\n val = val.trim();\n if (emptyVal(val)) {\n arrayVals = Constants.EMPTY_STRING_ARRAY;\n } else {\n arrayVals = val.split(\"\\\\s+\");\n }\n return arrayVals;\n }", "public static List<List<String>> breakIntoWords(String longWord, Collection<String> dict) {\n List<List<String>>[] words = new ArrayList[longWord.length() + 1];\n // words[i] = list of matching words at longWord length i\n // words[longWord.length()] is answer\n Arrays.stream(words).forEach((wl) -> wl = null);\n // contains empty list of lists\n // the first element contains an emtpty list of strings\n words[0] = new ArrayList<List<String>>();\n\n int beginIndx = -1;\n while (beginIndx < longWord.length()) {\n // beginIndx starts from 0 and goes up to length of the word -1\n // start with -1 and first index where the words[beginIndx] != null is 0\n // last value for beingIndx is wordlength -1\n while ((words[++beginIndx] == null) && (beginIndx < longWord.length())) ;\n // non null List of Lists of String\n // for index 0 it will be empty. For subsequent indices it may be non empty\n List<List<String>> beginIndxLists = words[beginIndx];\n // if beginIndx has not reached the end of the word\n // last value of beingIndx is longWord.length-1\n // need to compare the last character for which substring(wordlength-1, wordlength)\n if (beginIndx < longWord.length()) {\n // beginIdx is the start of the word, end Indx is end\n // last value for endIndx is longWord.length\n for (int endIndx = beginIndx + 1; endIndx <= longWord.length(); endIndx++) {\n String matchW = longWord.substring(beginIndx, endIndx);\n if ((matchW != null) && (!matchW.isEmpty())) {\n if (dict.contains(matchW)) {\n // list of list of Strings for getting to the endIndx\n List<List<String>> mwordsList = words[endIndx];\n if (mwordsList == null) {\n mwordsList = new ArrayList<List<String>>();\n }\n if((beginIndxLists==null)||(beginIndxLists.isEmpty())) {\n mwordsList.add(new ArrayList(Arrays.asList(matchW)));\n }\n // words[endIndx] has list of list initialized\n // there is a list at beginIndx\n // get the list of words at begingIndx. It contains at least one empty list\n else {\n for (List<String> beginList : beginIndxLists) {\n // at the matched word in the list at beginIndx and then copy it to mwordsList at endIndx\n beginList.add(matchW);\n mwordsList.add(beginList);\n }\n }\n words[endIndx] = mwordsList;\n }\n }\n }\n\n }\n\n }\n return words[longWord.length()];\n }", "public boolean wordBreak(String s, List<String> wordDict) {\n int iIndex = 0;\n int jIndex = 0;\n int sLength = s.length();\n boolean dp[][] = new boolean[sLength][sLength];\n int i = 0;\n int j = 0;\n System.out.println(s.substring(0,0));\n System.out.println(s.substring(0,1));\n while (jIndex < sLength) {\n \ti = iIndex; \n \tj = jIndex;\n \twhile (j < sLength) {\n \t\tif (wordDict.contains(s.substring(i, j + 1))) {\n \t\t\tdp[i][j] = true;\n \t\t} else {\n \t\t\tint firstStart = 0;\n \t\t\tint firstEnd = 0;\n \t\t\tint secondStart = firstEnd + 1;\n \t\t\tint secondEnd = j;\n \t\t\twhile (secondStart <= secondEnd) {\n \t\t\t\tdp[i][j] = dp[firstStart][firstEnd] && dp[secondStart][secondEnd];\n \t\t\t\tif (dp[i][j]) {\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \t\t\t\tfirstEnd++;\n \t\t\t\tsecondStart = firstEnd + 1;\n \t\t\t}\n \t\t}\n \t\ti++;\n \t\tj++;\n \t}\n \tiIndex = 0;\n \tjIndex++;\n }\n\n // for (int x = 0; x < dp.length; x++) {\n // \tfor (int y = 0; y < dp[0].length; y++) {\n // \t\tSystem.out.print(dp[x][y] + \" \");\n // \t}\n // \tSystem.out.println();\n // }\n\n return dp[0][sLength - 1];\n }", "public String mayStop() {\n\t return null;\n\t}", "public boolean isWordBreak(String s, List<String> wordDict){\n\n\t\tint[] ind = new int[s.length()+1];\n\t\tArrays.fill(ind,-1);\n\t\tind[0]=0;\n\t\t\n\t\tfor (int i = 0; i<s.length(); i++){\n\t\t\tif (ind[i]!=-1){\n\t\t\t\tfor (int j=i+1; j<=s.length(); j++){\n\t\t\t\t\tString word = s.substring(i,j);\n\t\t\t\t\tif (wordDict.contains(word)){\n\t\t\t\t\t\tind[j]=i;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (ind[s.length()] == -1) return false;\n\t\t\n\t\treturn true;\n\n\t\n\t}", "private List<String> validateKeywords(String[] kw){\n\n List<String> kwList = new ArrayList<>(15);\n\n if (kw.length < 4){\n return kwList;\n }\n\n for (int i=3;i<kw.length;i++){\n kwList.add(kw[i]);\n }\n\n return kwList;\n\n }", "public String getWord(){\r\n\t\t return word;\r\n\t }", "public static ArrayList<String> getWords(String input) {\r\n ArrayList<String> w = new ArrayList<String>();\r\n input = input.toLowerCase();\r\n String[] words = input.split(\"\\\\s+\");\r\n for (int i = 0; i < words.length; i++) {\r\n words[i] = words[i].replaceAll(\"[^\\\\w]\", \"\");\r\n }\r\n for(String elem: words) {\r\n w.add(elem);\r\n }\r\n return w;\r\n }", "public static String[] prepareInput(String input) {\n\t\tArrayList<String> als = separatePhrases( input );\n\t\tif( foundQuitWord( als ) )\n\t\t{\n\t\t\t//System.out.println( \"Found\" );\n\t\t\treturn null;\n\t\t}\n\t\tString respondTo = selectPhrase( als );\n\t\tif( respondTo == null )\n\t\t{\n\t\t\t//System.out.println( \"rNull\" );\n\t\t\treturn null;\n\t\t}\n\t\tString result = swapWords( respondTo , Config.INPUT_WORD_MAP );\n\t\tif( result == null )\n\t\t{\n\t\t\t//System.out.println( \"sNull\" );\n\t\t\treturn null;\n\t\t}\n\t\telse\n\t\t\treturn result.split(\" \");\n\t}", "public List<Stem> stem(char word[], int length) {\n List<Stem> stems = new ArrayList<Stem>();\n if (dictionary.lookupWord(word, 0, length) != null) {\n stems.add(new Stem(word, length));\n }\n stems.addAll(stem(word, length, null, 0));\n return stems;\n }", "private String[] termsArray(Scanner scan){\r\n\t\tArrayList<String> list = new ArrayList<String>();\r\n\t\twhile (scan.hasNext()) {\r\n\t\t\tlist.add(scan.next());\r\n\t\t}\r\n\t\treturn (String[]) list.toArray(new String[0]);\r\n\t}", "public String getStatusWordInList() {\r\n\t\tString status;\r\n\t\t\r\n\t\tif(wordSelected == null || getSizeList() < numWordSelectInArray) return null;\r\n\t\t\r\n\t\tstatus = arrayWordsList[numWordSelectInArray][0];\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\treturn status;\r\n\t}", "boolean isNotKeyWord(String word);", "public List<? extends HasWord> defaultTestSentence()\n/* */ {\n/* 472 */ return Sentence.toSentence(new String[] { \"w\", \"lm\", \"tfd\", \"mElwmAt\", \"En\", \"ADrAr\", \"Aw\", \"DHAyA\", \"HtY\", \"AlAn\", \".\" });\n/* */ }", "private String[] toStringArray(String doc, char split) {\n\t\t// count words\n\t\tint wordCount = 0;\n\t\tfor (int i = 0; i < doc.length(); i++) {\n\t\t\tif (doc.charAt(i) == split) {\n\t\t\t\twordCount++;\n\t\t\t}\n\t\t}\n\t\t// split the String\n\t\tString[] words = new String[wordCount];\n\t\tint lastWord = 0;\n\t\tint index = 0;\n\t\tfor (int i = 0; i < doc.length(); i++) {\n\t\t\tif (doc.charAt(i) == split) {\n\t\t\t\twords[index++] = doc.substring(lastWord, i + 1).trim();\n\t\t\t\tlastWord = i + 1;\n\t\t\t}\n\t\t}\n\t\treturn words;\n\t}", "public static String[] tokenizeKeyword(String keyword) {\n\n String[] tokens = new String[0];\n if(!keyword.equals(\"\") && !keyword.equals(\" \")) {\n tokens = keyword.split(\" \");\n }\n return tokens;\n }", "private String search_words(String word, int index){\n\t\tString found_words = \"\";\n\t\tint local_index = index +1;\n\t\t//We try to find the word within our childs\n\t\tfor(LexiNode child: childs){\n\t\t\tif(local_index > word.length()-1 || word.toLowerCase().charAt(local_index) == Character.toLowerCase(child.getRepresentative_letter()))\n\t\t\t\tfound_words += child.search_words(word, local_index);\n\t\t}\n\t\tif(current_word != null && word.length() > current_word.length())\n\t\t\treturn found_words;\n\t\tif(current_word != null && !found_words.equals(\"\"))\n\t\t\treturn current_word.toLowerCase().equals(word.toLowerCase()) ? current_word +\" & \" + definition + \"#\" + found_words +\"#\" : current_word + \"#\" + found_words;\n\t\telse if(current_word != null && found_words.equals(\"\"))\n\t\t\treturn current_word.toLowerCase().equals(word.toLowerCase()) ? current_word +\" & \" + definition + \"#\": current_word+ \"#\";\n\t\telse //current_word == null && found_words != null\n\t\t\treturn found_words;\n\t}", "public String getKeyWord(String word) {\n // COMPLETE THIS METHOD\n word = word.toLowerCase();\n while (word.length() > 0 && !(Character.isDigit(word.charAt(word.length() - 1))) && !(Character.isLetter(word.charAt(word.length() - 1)))) {\n char ch = word.charAt(word.length()-1);\n //if((isPunctuation(ch))){\n if (word.endsWith(\"!\") ||\n word.endsWith(\";\") ||\n word.endsWith(\":\") ||\n word.endsWith(\"?\") ||\n word.endsWith(\",\") ||\n word.endsWith(\".\")) {\n word = word.substring(0, word.length() - 1);\n } else {\n return null;\n }\n }\n\n for (int i = 0; i < word.length(); i++) {\n if (!(Character.isLetter(word.charAt(i)))) {\n return null;\n }\n }\n\n if (noiseWords.containsKey(word))\n return null;\n return word;\n\n }", "public static Stack<String> stringArr(String[] words){\r\n Stack<String> stack = new Stack<String>(); \r\n int i=0;\r\n \r\n //checking for IOL and LOI\r\n if(words[0].equals(\"IOL\")){\r\n stack.push(words[0]);\r\n i++;\r\n while(i<words.length){\r\n if(words[i].equals(\"LOI\")&&i!=words.length-1){\r\n System.out.println(\"Error! LOI not end of code.\");\r\n System.exit(0);//terminates program\r\n }\r\n stack.push(words[i]);\r\n i++;\r\n }\r\n }\r\n else{\r\n System.out.println(\"Illegal start of code. IOL missing.\");\r\n }\r\n \r\n //System.out.println(\"Stack: \"+ stack);\r\n \r\n return stack;\r\n }", "public boolean updateDataHolderNNConditionHelper(String word) {\n\t\tboolean flag = false;\n\t\t\n\t\tflag = ( (!word.matches(\"^.*\\\\b(\"+myConstant.STOP+\")\\\\b.*$\"))\n\t\t\t\t&& (!word.matches(\"^.*ly\\\\s*$\"))\n\t\t\t\t&& (!word.matches(\"^.*\\\\b(\"+myConstant.FORBIDDEN+\")\\\\b.*$\"))\n\t\t\t\t);\n\t\t\n\t\treturn flag;\n\t}", "public List<String> removeStopWords2(List<String> tokenizedWords) {\n\n List<String> res = new ArrayList<>();\n for(String word : tokenizedWords) {\n if(!this.stopwords.contains(word)) {\n res.add(word);\n }\n }\n return res;\n }", "public static String getWords(String fileName){\n\t\tString result = null;\n\t\ttry {\n\t\t\tFileInputStream fin = new FileInputStream(fileName);\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(fin));\n\t\t\t\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tString line = br.readLine();\n\t\t\t\n\t\t\twhile(line != null){\n\t\t\t\tsb.append(line);\n\t\t\t\tline = br.readLine();\n\t\t\t}\n\t\t\tbr.close();\n\t\t\tresult = Utils.removeStopWords(sb.toString());\n\t\t\treturn result;\n\t\t} \n\t\tcatch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn result;\n\t\t}\n\t}", "public List<String> wordBreak(String s, List<String> wordDict){\n\t\tList<String> res = new LinkedList<>();\n\t\tif(wordDict == null || wordDict.size() == 0){\n\t\t\treturn res;\n\t\t}\n\t\tbacktracking(res, s, wordDict, new StringBuilder(), 0);\n\t\treturn res;\n\t}", "public static Vector<String> getTokenizeDoc(String[] words) {\n\t\t// 0th position is where all the labels are so we need to look from 1\n\t\t// create a arrayList to keep all the words\n\t\tVector<String> wordList = new Vector<String>();\n\t\tfor(int i = 1; i< words.length; i++){\n\t\t\twords[i] = words[i].replaceAll(\"\\\\W\",\"\");\n\t\t\tif(words[i].length() > 0)wordList.add(words[i]);\n\t\t}\n\t\treturn wordList;\n\t}", "private boolean checkWord() {\n \tboolean bl = false;\n \tfor (int i = 0; i < word.length(); i++) {\n \t\tif (letter == word.charAt(i) && list[i] != true) {\n \t\t\tlist[i] = true;\n \t\t\tnumberOfSymbols++;\n \t\t\tbl = true;\n \t\t}\n \t}\n \treturn bl;\n }", "public boolean isExcludedWord() {\n return StringUtils.startsWith(word, \"-\");\n }", "public String getWord(){\r\n\t\treturn word;\r\n\t}" ]
[ "0.6788198", "0.67150635", "0.6704323", "0.66138744", "0.6354551", "0.6324298", "0.6066612", "0.6030853", "0.5973785", "0.59544045", "0.58498514", "0.57857263", "0.55534476", "0.5541674", "0.5487326", "0.54681766", "0.54673064", "0.5455531", "0.5453371", "0.5427967", "0.5421451", "0.54195976", "0.54142123", "0.54090494", "0.5402345", "0.5397153", "0.5391493", "0.5379982", "0.53736675", "0.5365547", "0.53395534", "0.53379494", "0.5330934", "0.53216815", "0.530684", "0.5287635", "0.5278499", "0.52735835", "0.5242815", "0.5233218", "0.52149904", "0.51993144", "0.5186471", "0.5182587", "0.5150281", "0.51420003", "0.5141652", "0.5107907", "0.51018685", "0.5101136", "0.50828373", "0.50787956", "0.5072711", "0.50589144", "0.50579876", "0.5054798", "0.5049679", "0.50461715", "0.50447387", "0.50197166", "0.50132036", "0.50118554", "0.4999194", "0.49980733", "0.49963343", "0.4996005", "0.49921784", "0.49885076", "0.49876246", "0.49849173", "0.4977251", "0.49732646", "0.49730608", "0.49575892", "0.49564368", "0.49398425", "0.49335083", "0.49322605", "0.49250773", "0.49227995", "0.49213442", "0.49209163", "0.4916806", "0.4913482", "0.49079064", "0.49008965", "0.48942074", "0.48870268", "0.48827434", "0.48646405", "0.4854326", "0.48527673", "0.48506442", "0.48469007", "0.4842956", "0.48424459", "0.48359394", "0.4821316", "0.4820647", "0.4814454", "0.48124832" ]
0.0
-1
Get text from google page from a google search term
public static String gsText(String sstring) throws Exception { String res = ""; for (String s : gsUrls(sstring)) { res = res + HTMLText(s) + " "; } return res; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void search() {\n String result = \"<body bgcolor=\\\"black\\\"> \" +\n \"<font color=\\\"#009933\\\"\";\n gs.setQueryString(txtQueury.getText());\n try {\n gsr = gs.doSearch();\n txtCountRes.setText(\"\" + gsr.getEstimatedTotalResultsCount());\n gsre = gsr.getResultElements();\n\n for (int i = 0; i < gsre.length; i++) {\n if (googleTitle.isSelected()) {\n result +=\n \"<font color=\\\"red\\\"><u><b>Title: </u></b><a href=\\\"\" +\n gsre[i].getURL() + \"\\\">\"\n + gsre[i].getTitle() + \"</a><br>\" +\n \"<br><b>URL: \" +\n gsre[i].getHostName() + gsre[i].getURL() +\n \"</b></font><br>\";\n }\n if (googleSummary.isSelected()) {\n result += \"<u><b>Summary: </u></b>\" +\n gsre[i].getSummary() +\n \"<br>\";\n }\n if (googleSnippet.isSelected()) {\n result += \"<u><b>Snippet: </u></b>\" +\n gsre[i].getSnippet() +\n \"<br>\";\n }\n if (googleHostName.isSelected()) {\n result += \"<u><b>Host: </u></b>\" + gsre[i].getHostName() +\n \"<br>\";\n }\n if (googleDirectoryTitle.isSelected()) {\n result += \"<u><b>Directory Title: </u></b>\" +\n gsre[i].getDirectoryTitle() + \"<br>\";\n }\n if (googleCachedSize.isSelected()) {\n result += \"<u><>Cached Size: </u></b>\" +\n gsre[i].getCachedSize() + \"<br>\";\n }\n result += \"<br>\";\n }\n } catch (GoogleSearchFault e) {\n msg(\"Erreur d'exécution \" + e.getMessage(), \"Error\",\n JOptionPane.ERROR_MESSAGE);\n }\n\n //affichage de la recherche\n editor.setText(result);\n }", "static String search(String sentence) {\r\n\t\tString result = null;\r\n\t\tif (sentence.contains(\"search\")) {\r\n\t\t\tint index = sentence.indexOf(\"search\");\r\n\t\t\tString search = sentence.substring(index + 6);\r\n\t\t\tresult = googleSearch(search);\r\n\t\t} else if (sentence.contains(\"find\")) {\r\n\t\t\tint index = sentence.indexOf(\"find\");\r\n\t\t\tString search = sentence.substring(index + 6);\r\n\t\t\tresult = googleSearch(search);\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "private String getSearchText() {\n\t\treturn this.clientUI.getSearchField();\n\t}", "@Test(dependsOnMethods=\"searchIngoogle\")\n public void captureTheResult() throws InterruptedException {\n driver.navigate().to(getURL);\n Thread.sleep(2000);\n String searchResult = Reusable_Library2.captureText(driver, \"//*[@id='result-stats']\", \"Search Results\");\n //split\n String[] arraySearch = searchResult.split(\" \");\n System.out.println(\"My search number is \" + arraySearch[1]);\n }", "public String extractresult(String search) {\n\t\tfd.findElement(By.id(\"sb_form_q\")).sendKeys(search);\r\n\t\tfd.findElement(By.id(\"sb_form_go\")).click();\r\n\t\t\r\n\t\treturn fd.findElement(By.className(\"sb_count\")).getText();\t\r\n\t}", "@SneakyThrows\n public String get(String word) {\n String url = \"https://clients5.google.com/translate_a/t?client=dict-chrome-ex&sl=auto&tl=he&q=\"+word;\n this.response = getResponse(url);\n if(response.getSentences().size()>0) {\n return response.getSentences().get(0).getTrans();\n }\n return \"\";\n }", "public String getSearchResultsText() {\n System.out.println(\"[step] getSearchResultsText\");\n return page.findElement(signSearch).getText();\n }", "@Given(\"^user is on google search page \\\"([^\\\"]*)\\\"$\")\n\tpublic void user_is_on_google_search_page_something(String url) throws Throwable {\n\t\thomepage.get(url);\n\t}", "public URL getURL() throws SearchResultException;", "public String getPageText();", "private String getText(URL url){\n\tString parsedHtml=null;\n\ttry{\n\t\tHttpURLConnection urlConn = (HttpURLConnection) url.openConnection();\n\t\tString line = null;\n\t\tStringBuilder tmp = new StringBuilder();\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(urlConn.getInputStream()));\n\t\twhile ((line = in.readLine()) != null) {\n\t\t tmp.append(line);\n\t\t}\n\t\t \n\t\tDocument doc = Jsoup.parse(tmp.toString());\n\t\tparsedHtml = doc.title() + doc.body().text();\n\t\t\n\t}\n\tcatch(IOException e){\n\t\tSystem.out.println(\"Page not reached for: \"+url );\n\t}\n\tfinally{\n\t\treturn parsedHtml;\n\t}\n\t\n}", "public static void main(String[] args) throws IOException {\n\t\t\n\t String google = \"http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q=\";\n\t String search = \"Bill Gates\";\n\t String charset = \"UTF-8\";\n\n\t URL url = new URL(google + URLEncoder.encode(search, charset));\n\t Reader reader = new InputStreamReader(url.openStream(), charset);\n\t GoogleResults results = new Gson().fromJson(reader, GoogleResults.class);\t \n\t \n\t \n\t System.out.println(\"Search size: \" + results.getResponseData().getResults().size());\n\t \n\t int i = 0;\n\t while (i < results.getResponseData().getResults().size())\n\t {\n\t \t\n\t\t System.out.println(results.getResponseData().getResults().get(i).getTitle());\n\t\t System.out.println(results.getResponseData().getResults().get(i).getUrl());\n\t\t System.out.println(\"---------------------------------------------------------\");\n\t\t System.out.println(\" \");\n\t\t System.out.println(\" \");\n\t\t \n\t\t i++;\n\t\t \n\t\t if(i == 10) \n\t\t \tbreak;\n\t \t\n\t }\n\t \n\t\n\t \n\t \n\t \n\t \n\n\t}", "public void findBookDetails(AnnotateImageResponse imageResponse) throws IOException {\n\n String google = \"http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q=\";\n String search = \"searchString\";\n String charset = \"UTF-8\";\n\n URL url = new URL(google + URLEncoder.encode(search, charset));\n Reader reader = new InputStreamReader(url.openStream(), charset);\n GoogleResults results = new Gson().fromJson(reader, GoogleResults.class);\n\n // Show title and URL of 1st result.\n System.out.println(results.getResponseData().getResults().get(0).getTitle());\n System.out.println(results.getResponseData().getResults().get(0).getUrl());\n }", "public String getCourseWebsite() {\n\t\tPattern p = Pattern.compile(\"Kursushjemmeside:\");\n\t\tMatcher m = p.matcher(bodyText);\n\t\t\n\t\tString closingIn = \"\";\n\t\ttry {\n\t\t\tif (m.find()) closingIn = bodyText.substring(m.start(), m.end()+100);\n\t\t} catch (Exception e) {\n\t\t\t//Do nothing\n\t\t}\n\t\t\n\t\t//Try to find some kind of link near the \"Kursushjemmeside\".\n\t\tPattern httpFind = Pattern.compile(\"http.*?\\\\s\");\n\t\tMatcher httpMatch = httpFind.matcher(closingIn);\n\t\treturn (httpMatch.find()) ? httpMatch.group().trim() : \"No Website Found\"; \n\t}", "protected Document getDocument(String searchString, int page) throws IOException{\n String url = String.format(URL_FORMAT, page);\n\n String referrer = \"https://hh.ru/search/vacancy?text=java\";\n String myUserAgent = \"Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.99 Safari/537.36\";\n Document doc = Jsoup.connect(url).userAgent(myUserAgent).referrer(referrer).get();\n return doc;\n }", "Search getSearch();", "public static String getText(String url)\n {\n try {\n\t URL website = new URL(url);\n\t URLConnection connection = website.openConnection();\n\t BufferedReader in = new BufferedReader(\n\t new InputStreamReader(\n\t connection.getInputStream()));\n\t\n\t StringBuilder response = new StringBuilder();\n\t String inputLine = \"\";\n\t while ((inputLine = in.readLine()) != null) \n\t \tresponse.append(inputLine);\n\n\t\t\tin.close();\n\t\t\t\n\t return response.toString();\n\t\t} catch (IOException e) {\n\t\t\tDebug.Error(e.getMessage());\n\t\t}\n return \"\";\n }", "public void searchInGoogle(String searchText)\n\t{\n\t\tgoogleSearchField.sendKeys(searchText);\n\t\tgoogleSearchField.submit();\n\t}", "public String getContent() throws SearchResultException;", "public String getSearchUrl();", "public String prepareTextQuery(String name) {\n String formattedName = name.replaceAll(\"[^a-zA-Z0-9 ]\", \"\").replaceAll(\" \",\"+\");\n return \"https://maps.googleapis.com/maps/api/place/textsearch/json?query=\" +\n formattedName +\n \"&location=\" + lat + \",\" + lng +\n \"&key=\" + apikey;\n }", "private String getSearchUrl(String url ){\n String params = searchEditText.getText().toString();\n params = params.replace(\" \",\"+\");\n url += params + \"&filter=ebooks&prettyPrint=false\";\n return url;\n }", "TextBox getSearchContent();", "private void should_google_search_and_wait_for(String query) {\n RemoteWebDriver remoteWebDriver = browser.getWebDriver();\n WebDriverRunner.setWebDriver(remoteWebDriver);\n // regular Selenide test:\n Selenide.open(\"https://google.com?q=\" + query);\n $$(\"form\").filterBy(exist).first().shouldBe(visible).submit();\n $(byValue(query)).shouldBe(exist).shouldBe(visible).submit();\n }", "public void performSearch() {\n final String url = String.format(BING_SEARCH_URL, Words.getRandomWord(), Words.getRandomWord());\n\n //open page with custom data\n openWebPage(url, \"Search url: \" + url);\n }", "static String question(String sentence) {\r\n\t\tString result = null;\r\n\t\tif (sentence.contains(\"can you tell me\")) {\r\n\t\t\tint index = sentence.indexOf(\"can you tell me\");\r\n\t\t\tString search = sentence.substring(index + 15);\r\n\t\t\tresult = googleFind(search);\r\n\t\t} else if (sentence.contains(\"do you know\")) {\r\n\t\t\tint index = sentence.indexOf(\"do you know\");\r\n\t\t\tString search = sentence.substring(index + \"do you know\".length());\r\n\t\t\tresult = googleFind(search);\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "public WebElement getSearchPageHeaderText()\n{\n\treturn driver.findElement(headertext);\n}", "@Test\r\n\t@Parameters(\"searchContent\")\r\n\tpublic void searchContentInSearcgBar(String searchContent){\r\n\t\tdriver.get(url+radioUrl);\r\n\t\tjse.executeScript(\r\n\t\t\t\t\"if(document.readyState === 'complete'){\"\r\n\t\t\t\t+ \"document.getElementById('search-simple-input-query').value=arguments[arguments.length-1];\"\r\n\t\t\t\t+ \"document.getElementById('search-simple-input-submit').click();}\",searchContent);\r\n\t\tObject response = jse.executeScript(\r\n\t\t\t\t \"if(document.readyState === 'complete'){\"\r\n\t\t\t\t+ \"var searchHeader = document.querySelector('.ct-search-header');\"\r\n\t\t\t\t+ \"function waitForEle(){ if(searchHeader == null) waitForEle();}\"\r\n\t\t\t\t+ \"waitForEle();\"\r\n\t\t\t\t+ \"var txt1 = searchHeader.children[0].innerText;\"\r\n\t\t\t\t+ \"var txt2 = searchHeader.children[1].innerText;\"\r\n\t\t\t\t+ \"return ((txt1.concat('_')).concat(txt2));\"\r\n\t\t\t\t+ \"}\", \"\");\r\n\t\tString[] resp = response.toString().split(\"_\");\r\n\t\tAssert.assertTrue(resp[0].contains(searchContent) && resp[1].toString().contains(searchContent), \"Search is not successful as expected\");\r\n\t}", "public String searchResult(){\n return getText(first_product_title);\n }", "@GET(\"w/api.php?action=opensearch&format=json&suggest&redirects=resolve\")\n Call<JsonElement> getSuggestionsFromSearch(@Query(\"search\") String search);", "@Test\n\tpublic void testSearch() {\n driver.get(\"http://www.google.com\");\n // Alternatively the same thing can be done like this\n // driver.navigate().to(\"http://www.google.com\");\n\n driver.manage().window().maximize();\n // Find the text input element by its name\n WebElement element = driver.findElement(By.name(\"q\"));\n\n // Enter something to search for\n element.sendKeys(\"Cheese!\");\n\n // Now submit the form. WebDriver will find the form for us from the element\n element.submit();\n\n // Check the title of the page\n System.out.println(\"Page title is: \" + driver.getTitle());\n \n // Google's search is rendered dynamically with JavaScript.\n // Wait for the page to load, timeout after 10 seconds\n (new WebDriverWait(driver, 10)).until(new ExpectedCondition<Boolean>() {\n public Boolean apply(WebDriver d) {\n return d.getTitle().toLowerCase().startsWith(\"cheese!\");\n }\n });\n\n // Should see: \"cheese! - Google Search\"\n System.out.println(\"Page title is: \" + driver.getTitle());\n \n\t}", "@Override\n public void onClick(View view) {\n EditText searchField = (EditText) v.findViewById(R.id.searchField);\n // Setting inputedString to the current text in searchField\n String inputedString = searchField.getText().toString();\n\n // Calling the *searchGoogle* method with passed in text from the EditText\n // This method allows for users to Short-hand type in a phrase to search google, rather then go to google and then type it in and then hit search.\n listener.searchGoogle(\"https://www.google.com/?q=\" + inputedString + \"#q=\" + inputedString);\n \n // Utilizing public method dismiss(); to dismiss the search fragment dialog.\n dismiss();\n }", "public String extractText(String urlString) {\n String text = \"\";\n try {\n URL url = new URL(urlString);\n text = ArticleExtractor.INSTANCE.getText(url); \n } catch (Exception ex) {\n Logger.getLogger(TextExtractor.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n return text;\n }", "@Test\n\tpublic void testUrlFromSearchResult() {\n\t\tdriver.get(\"http://automationpractice.com\");\n\n\t\t// Text input for keyword\n\t\tString keyword = \"Blouse\";\n\n\t\t// The expected result\n\t\tString expected = \"http://automationpractice.com/index.php?controller=search&orderby=position&orderway=desc&search_query=Blouse\";\n\n\t\t// Find the Search box element by its name\n\t\telement = driver.findElement(By.name(\"search_query\"));\n\n\t\t// Enter keyword to search for\n\t\telement.sendKeys(keyword);\n\n\t\t// Now submit the form\n\t\telement.submit();\n\n\t\t// Get the Url from Search result\n\t\tString actual = driver.getCurrentUrl();\n\n\t\t// Compare the expected VS actual result\n\t\tAssert.assertEquals(expected, actual);\n\t}", "public static void main(String[] args) {\n\t googleSearch();\r\n }", "@Test(priority = 0)\n public void test_Search_Results_Appear_Correct() {\n\n //Create Google Search Page object\n searchPage = new SearchPage(driver);\n\n //Search for QA string\n searchPage.searchStringGoogle(\"QA\");\n\n // go the next page\n resultsPage = new ResultsPage(driver);\n\n Assert.assertTrue(resultsPage.getSearchedResult().contains(\"Quality assurance - Wikipedia\"));\n\n }", "@SuppressWarnings({\"JavaDoc\"})\n private void callGoogleSearchApi(String mSearchStringNoSpaces,\n String mBrowserKey,\n String mSearchEngineId) {\n itemInteractor.getGoogleSearchApiGet(this, this,\n mSearchStringNoSpaces,\n mBrowserKey,\n mSearchEngineId);\n }", "public static void main(String[] args)throws Exception \n\t{\n\t\tScanner sc=new Scanner(System.in);\n\t\tSystem.out.println(\"enter a word to search\");\n\t\tString word=sc.nextLine();\n\t\tsc.close();\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\"chromedriver.exe\");\n\t\tChromeDriver driver=new ChromeDriver();\n\t\tdriver.get(\"http://www.google.co.in\");\n\t\tThread.sleep(5000);\n\t\tdriver.findElement(By.name(\"q\")).sendKeys(word,Keys.ENTER);\n\t\t//pagination on results pages\n\t\tint flag=0;\n\t\tint tpc=0;\n\t\twhile(2>1)\n\t\t{\n\t\t\ttpc++;\n\t\t\tString t=driver.getTitle();\n\t\t\tif(!t.contains(word))\n\t\t\t{\n\t\t\t\tflag=1;\n\t\t\t\tbreak;//terminate from loop when does not contains word\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\tdriver.findElement(By.xpath(\"//span[text()='Next']\")).click();\n\t\t\t\tThread.sleep(2000);\n\t\t\t}\n\t\t\tcatch(Exception ex)\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\tif(flag==0)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"title of \"+tpc+\" results pages is correct\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tSystem.out.println(tpc+\"of the results page is incorrect\");\n\t\t\t}\n\t\t\t//close site\n\t\t\tdriver.close();\n\t\t}", "public String findAndReturnFirstLink() {\n\t\tString xpath = \"//div[@id='search']/div/div/div/div/div/div[1]/div/div/h3/a\";\r\n\t\telement = webDriver.findElement(By.xpath(xpath));\r\n\t\t//element = webDriver.findElement(By.cssSelector(css));\r\n\t\treturn element.getText();\r\n\t}", "@Test\n public void ebayTestSearchResults() throws Exception {\n driver.findElement(By.id(\"gh-ac\")).sendKeys(\"java book\");\n driver.findElement(By.id(\"gh-btn\")).click();\n\n Thread.sleep(4000);\n\n WebElement searchResults = driver.findElement(By.tagName(\"h1\"));\n //21,761 results for java book\n String resultActual = searchResults.getText();\n System.out.println(resultActual);\n }", "public void searchGoogle(final WebView webView, String searchQuery) {\n HTTPHandler handler = new HTTPHandler(getActivity().getBaseContext());\n handler.searchWithCallback(searchQuery, new SuccessCallback() {\n @Override\n public void callback(boolean success, ArrayList<String> image_list) {\n if (success) {\n Log.d(\"Success\", Boolean.toString(success));\n images = image_list;\n if (images.isEmpty()){\n //if no images were found\n Toast.makeText(getActivity().getBaseContext(), \"Search returned no images :-(\",\n Toast.LENGTH_LONG).show();\n } else{\n //otherwise show image\n webView.loadUrl(images.get(0));\n num_images = images.size();\n current_image = 0;\n }\n } else {\n // handle failure\n Log.d(\"Failure\", Boolean.toString(success));\n }\n }\n });\n }", "java.lang.String getSearchValue();", "String getRqText();", "public SearchResult search(String text, String subText);", "@Test\r\npublic void testGoogleSearch() throws Exception {\ndriver.get(\"https://igartc01.swg.usma.ibm.com/jazz/web/projects/IGA%20Rational%20Core%20Account%20Team#action=com.ibm.team.dashboard.viewDashboard\");\r\nThread.sleep(5000);\r\nWebElement username = driver.findElement(By.xpath(\"//input[@name='j_username' and @id='jazz_app_internal_LoginWidget_0_userId']\"));\r\nusername.click();\r\nusername.clear();\r\nusername.sendKeys(\"[email protected]\");\r\nThread.sleep(2000);\r\n\r\n//enter the password\r\nWebElement pwd = driver.findElement(By.xpath(\"//input[@name='j_password' and @id='jazz_app_internal_LoginWidget_0_password']\"));\r\npwd.click();\r\npwd.sendKeys(\"Pappisong14\");\r\nThread.sleep(2000);\r\n\r\n//button click\r\nWebElement btn = driver.findElement(By.xpath(\"//button[@type='submit']\"));\r\nbtn.click();\r\nThread.sleep(10000);\r\n\r\nif(driver.getPageSource().contains(\"Rational Account A\")){\r\n\tSystem.out.println(\"Verified.. This is the Dashboard Page\");\r\n}\r\nelse{\r\n\tSystem.out.println(\"Wrong page!!!\");\r\n}\r\n\r\n}", "List<String> getDocumentTitles(String query) throws SearcherException;", "String getQuery();", "java.lang.String getHotelText();", "private static String getSuggestion(String s) {\r\n // Find suggestion\r\n String titlePattern = \"(?i)class=p><b><i>([^<]+)\";\r\n Pattern pt = Pattern.compile(titlePattern);\r\n Matcher mt = pt.matcher(ConnectHelper.Connect(connection, server,\r\n file + s, port, maxContentLength));\r\n\r\n if (mt.find()) {\r\n return mt.group(1);\r\n }\r\n return null;\r\n }", "public static void searchWord(String URL, String wordToSearch){\n \tString curr_url = \"\";\n while(pagesVisited.size() < MAX_PAGES_TO_SEARCH){\n \t\tSpiderLeg leg = new SpiderLeg();\n\n \t\tif(pagesToVisit.isEmpty()){\n \t\t\tcurr_url = URL;\n \t\t\tpagesVisited.add(URL);\n \t\t}\n \t\telse{\n \t\t\tSystem.out.println(\"No such word found!!!\");\n \t\t}\n\n \t\tleg.crawl(curr_url);\n\n \t\tboolean success = leg.searchForWord(wordToSearch);\n\n \t\t//If we successfully find the word, print out ifo\n \t\tif(success){\n \t\t\tSystem.out.println(String.format(\"**Success** Word %s found at %s\", wordToSearch, curr_url));\n \t\t\tbreak;\n \t\t}\n\n \t\tpagesToVisit.addAll(leg.getLinks());\n \t}\n\n \tSystem.out.println(String.format(\"**Done** visiting %s\", curr_url));\n }", "public static void main(String[] args) throws InterruptedException {\n\r\n\t\t\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\"F:\\\\Selenium\\\\chromedriver_win32\\\\chromedriver.exe\");\r\n\t\t\t\t\r\n\t\t\t\tWebDriver driver = new ChromeDriver();\r\n\t\tdriver.get(\"https://www.google.co.in/\");\r\n\t\tWebElement t = driver.findElement(By.cssSelector(\"#tsf > div:nth-child(2) > div > div.RNNXgb > div > div.a4bIc > input\"));\r\n\t\t\r\n\t\tt.sendKeys(\"yify\");\r\n\t\t\tThread.sleep(3000);\r\n\t\t\t\r\n\t\t\tList<WebElement>r = driver.findElements(By.xpath(\"//ul[@role='listbox']//li/descendant::div[@class='sbtc']\"));\r\n\t\t\t\tint y =r.size();\r\n\t\t\t\tSystem.out.println(\"No of suggestion is \" + y);\r\n\t\t\t\t\r\n\t\t\t\tfor (int i=0; i<y; i++)\r\n\t\t\t\t{\r\n\t\t\t\t\tString p = r.get(i).getText();\r\n\t\t\t\t\tSystem.out.println(p);\r\n\t\t\t\t\tif(p.contains(\"yify\"));\r\n\t\t\t\t\t{\r\n\t\t\t\t\t r.get(i).click();\r\n\t\t\t\t\t break;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tList<WebElement> allLinkname = driver.findElements(By.tagName(\"h3\"));\r\n\t\t\r\n\t\r\n\t\t//Print the size of no of linkname present in alllinkname\r\n\t\t\r\n\t\tint size = allLinkname.size();\r\n\t\tSystem.out.println(size);\r\n\t\t\r\n\t\t//Printing there names in console\r\n\t\tfor (WebElement Link : allLinkname) {\r\n\t\t\t\r\n\t\t\tString value = Link.getText();\r\n\t\t\tSystem.out.println(value);\r\n\t\t}\r\n\t\t\r\n\t\tfor(int i =0; i<size; i++)\r\n\t\t{\r\n\t\t\t\r\n\t\t\tString value2 = allLinkname.get(i).getText();\r\n\t\t\tif (value2.equals(\"YTS: The Official Home of YIFY Movies Torrent Download\"))\r\n\t\t\t{\r\n\t\t\t\tallLinkname.get(i).click();\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t//Printing name of yify window\r\n\t\tString yifywindow = driver.getWindowHandle();\r\n\t\tSystem.out.println(yifywindow);\r\n\t\t\r\n\t\t//Click on browse search box text box\r\n\t\tdriver.findElement(By.cssSelector(\"#quick-search-input\")).click();\r\n\t\t\r\n\t\t\r\n\t\t// Storing all tab or window value in allwindow variable\r\n\t\t\r\n\t\tSet<String> allwindow = driver.getWindowHandles();\r\n\t\t// Printing the no of window\r\n\t\tSystem.out.println(allwindow.size());\r\n\t\t\r\n\t\t//Proof that still first window has power\r\n\t\tSystem.out.println(driver.getCurrentUrl());\r\n\t\t\r\n\t\t//Printing the exact values of each window\r\n\t\tSystem.out.println(allwindow);\r\n\t\t\r\n\t\t//Switch to second window\r\n\t\tfor (String child : allwindow) {\r\n\t\t\tif(!child.equals(yifywindow))\r\n\t\t\t{\r\n\t\t\t\tdriver.switchTo().window(child);\r\n\t\t\t\tSystem.out.println(driver.getCurrentUrl());\r\n\t\t\t\tdriver.close();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//Again switch to yify window\r\n\t\tdriver.switchTo().window(yifywindow);\r\n\t\tSystem.out.println(driver.getCurrentUrl());\r\n\t\t\r\n\t\t//closing unwanted popup\r\n\t\t//driver.findElement(By.cssSelector(\"#id5c2a23c1c4close-cross5c2a23c1c4\")).click();\r\n\t\t\r\n\t\t//Click on browse search box text box\r\n\t\tdriver.findElement(By.cssSelector(\"#quick-search-input\")).sendKeys(\"captain marvel\");\r\n\t\t\r\n\t\t\r\n\t\t//driver.findElement(By.cssSelector(\"#quick-search-input\")).click();\r\n\t// driver.findElement(By.cssSelector(\"#quick-search-input\")).sendKeys(Keys.ENTER);\r\n\t\t\r\n\t\r\n\t\t\r\n\t\t\r\n\t\r\n\r\n}", "WebCrawlerData retrieve(String url);", "private String getSearchString(){\n\t\tScanner scanner = new Scanner(System.in);\n\t\tString phrase = null;\n\t\t\n\t\tSystem.out.print(\"Please enter the search phrase: \");\n\t\tphrase = scanner.nextLine();\n\t\t\n\t\tscanner.close();\n\t\t\n\t\treturn phrase;\n\t}", "@org.junit.Ignore\n\t@Test\n\tpublic void simpleGET() {\n\t\tString url = \"http://www.google.com/search?hl=pl\";\n\t\tHttpRequestFactory requestFactory = new HttpRequestFactoryImpl();\n\t\tHttpRequest request = requestFactory.createRequest(url);\n\t\tString response = request.doGet();\n\t\tassertTrue(\"Unexpected HTTP response.\", isGooglePage(response));\n\t}", "public void pullResources(String domainURL){\n URLResource page = new URLResource(\"https://www.dukelearntoprogram.com//course2/data/manylinks.html\");\n \n int startIndex;\n int endIndex;\n // loop through pages\n for (String s : page.lines()){\n \n //System.out.println(s);\n int pose = s.indexOf(domainURL);\n \n // if the url is in the line\n if (-1 != pose) {\n \n startIndex = s.lastIndexOf(\"\\\"\",pose); // find actual start\n endIndex = s.indexOf(\"\\\"\",pose+1); // find end\n \n System.out.println( s.substring(startIndex, endIndex));\n \n \n \n }\n \n \n }\n}", "@VisibleForTesting\n static @Nullable String findLastSearchTerm(Tab tab) {\n if (sLastSearchTermProviderForTesting != null) {\n return sLastSearchTermProviderForTesting.getLastSearchTerm(tab);\n }\n assert tab.getWebContents() != null;\n NavigationController controller = tab.getWebContents().getNavigationController();\n NavigationHistory history = controller.getNavigationHistory();\n\n Profile profile = Profile.fromWebContents(tab.getWebContents());\n if (profile == null) return null;\n\n TemplateUrlService templateUrlService = TemplateUrlServiceFactory.getForProfile(profile);\n if (!TextUtils.isEmpty(templateUrlService.getSearchQueryForUrl(tab.getUrl()))) {\n // If we are already at a search result page, do not show the last search term.\n return null;\n }\n\n for (int i = history.getCurrentEntryIndex() - 1; i >= 0; i--) {\n GURL url = history.getEntryAtIndex(i).getOriginalUrl();\n String query = templateUrlService.getSearchQueryForUrl(url);\n if (!TextUtils.isEmpty(query)) {\n return removeEscapedCodePoints(query);\n }\n }\n return null;\n }", "void gaInfo(String text);", "SearchResultCompany search(String keywords);", "public static String getQueryValueFromUrl(String url, String name) { \n \n URL theUrl;\n try {\n theUrl = new URL(url);\n } catch (MalformedURLException e) {\n return \"\";\n }\n \n String query = theUrl.getQuery();\n if (query != null && !query.isEmpty()) {\n String[] params = query.split(\"&\"); \n for (String param : params) {\n String[] pair = param.split(\"=\");\n if (name.equals(pair[0]) && pair.length > 1) {\n return pair[1];\n } \n } \n }\n return \"\"; \n }", "final void checkMatch(String input,String url,String title)\r\n {\r\n String searchLine=removeHTMLTags(input); // remove html tags before search.\r\n // If the line contains non - HTML text then search it.\r\n\tif(searchLine.length()>0)\r\n\t{\r\n\t if(app.matchCase) // Check if case sensitive search\r\n\t {\r\n\t if(app.matchWord) // Check if attempting to match whole word\r\n\t\t{\r\n\t\t if(searchLine.indexOf(\" \"+textToFind+\" \")!=-1 ||\r\n \t\t (searchLine.indexOf(textToFind)!=-1 && searchLine.length()==textToFind.length()) ||\r\n\t\t\t\t searchLine.indexOf(\" \"+textToFind)!=-1 && textToFind.charAt(textToFind.length()-1)==\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t searchLine.charAt(searchLine.length()-1))\r\n\t\t {\r\n\t\t // Found it display the match\r\n\t\t app.addToList(url,searchLine,title);\r\n\t\t hitsFound++;\t\r\n\t\t }\r\n\t\t}\r\n\t\telse if(searchLine.indexOf(textToFind)!=-1)\r\n\t\t{\r\n\t\t // Found it display the match\r\n\t\t app.addToList(url,searchLine,title);\r\n\t\t hitsFound++;\r\n\t\t}\r\n\t }\r\n\t else\r\n\t {\r\n\t String lower1=searchLine.toLowerCase();\r\n\t\tString lower2=textToFind.toLowerCase();\r\n\t\t// Check if attempting to match the whole word.\r\n\t\tif(app.matchWord)\r\n\t\t{\r\n\t\t if(lower1.indexOf(\" \"+lower2+\" \")!=-1 || \r\n\t\t (lower1.indexOf(lower2)!=-1 && lower1.length()== lower2.length()) ||\r\n\t\t\t (lower1.indexOf(\" \"+lower2)!=-1 && lower2.charAt(lower2.length()-1) == \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t lower1.charAt(lower1.length()-1)))\r\n {\r\n\t\t // Found it display the match\r\n\t\t\tapp.addToList(url,searchLine,title);\r\n\t\t\thitsFound++;\r\n\t\t }\r\n\t\t}\r\n\t\telse if(lower1.indexOf(lower2)!=-1)\r\n\t\t{\r\n\t\t // Found it! Display the match\r\n\t\t app.addToList(url,searchLine,title);\r\n\t\t hitsFound++;\r\n\t\t}\r\n\t }\r\n\t}\r\n }", "public String ssoGoogle() throws InterruptedException {\n this.scrollBy(signupGoogle);\n helperMethods.waitForWebElementToBeInteractable(signupGoogle,30);\n signupGoogle.click();\n ssoSubscribeCheck.click();\n ssoTermsCheck.click();\n submitSSO.click();\n while (!helperMethods.waitForPageToLoad()) {\n helperMethods.waitForPageToLoad();\n }\n //Since we are navigating to third party adding thread.sleep\n Thread.sleep(5000);\n return webDriver.getTitle();\n }", "public static void main(String[] args) throws IOException \n\t{\n\t\tScanner sc = new Scanner(System.in);\n\t\tSystem.out.print(\"Please input the keyword: \");\n\t\tString keyword = sc.next();\n\t\tsc.close();\n\t\n\t\tKeywordList kLst = new KeywordList();\t\n\t\tSystem.out.println(\"-------------------------------------------------------\\nRelative Word List: \");\n\t\tkLst.printKeywordList(kLst.getKeywords());\n\t\tSystem.out.print(\"-------------------------------------------------------\\nValid Web Pages for Keyword [\" + keyword + \"]: \\n\");\n\t\tGoogleSearch google = new GoogleSearch(keyword);\n\t\tSystem.out.print(google.toString());\n\t\t\n\t\tArrayList<WebNode> wLst = new ArrayList<WebNode>();\t\n\t\t\n\t\ttry \n\t\t{\t\t\n\t\t\tfor(String title: google.query().keySet()) \n\t\t\t{\n\t\t\t\tString webUrl = google.query().get(title);\t\n\t\t\t\tWebPage rootPage = new WebPage(webUrl, title);\n\t\t\t\tWebTree tree = new WebTree(rootPage);\n\t\t\t\t\t\n\t\t\t\tChildPageQuery childQ = new ChildPageQuery(webUrl);\n\t\t\t\tint count = 0;\n\t\t\t\tif(childQ.query() != null) \n\t\t\t\t{\t\t\t\n\t\t\t\t\tfor(String childUrl: childQ.query()) \n\t\t\t\t\t{\t\t\t\n\t\t\t\t\t\tcount++;\t\t\t\t\t\t\t\n\t\t\t\t\t\ttree.root.addChild(new WebNode(new WebPage(childUrl, count + \"\")));\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\ttree.setPostOrderScore(kLst.getKeywords());\n\t\t\t\t\twLst.add(tree.root);\n\t\t\t\t}\n\t\t\t}\t\n\t\t\t\n\t\t\tWebRating rating = new WebRating(wLst);\n\t\t\trating.sort();\n\t\t\tSystem.out.println(\"-------------------------------------------------------\\n★★★Rating★★★\\n(Title, Total Child Pages, Total Root Page Score)\");\n\t\t\tSystem.out.print(rating.output());\n\t\t} \n\n\t\tcatch(IOException e)\n\t\t{\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "final void searchPage(DataInputStream dis,String url)\r\n {\r\n try\r\n\t{\r\n String input; // Raw line read in.\r\n\t String upperCaseInput; // Upper case version of the above\r\n\t String link; // HTML link found\r\n\t String temp; \r\n\t String title=\"\"; // Page Title;\r\n\r\n\t // Read a line at a time.\r\n\t while((input=dis.readLine())!=null)\r\n\t {\r\n\t // Convert to Upper case (makes comparisions easier)\r\n\t\tupperCaseInput=input.toUpperCase();\r\n\t\t// Check for document title\r\n\t\ttemp=parseForTitle(input,upperCaseInput,dis);\r\n\t\t// If a title has been found then remember it. So, that it can displayed on the list box.\r\n\t\tif(temp!=null && temp.length()>0)\r\n\t\t title=temp;\r\n\t //Check for match after title has been found (Don't bother Searching the title though)\r\n\t\tif(title.length()>0 && temp==null)\r\n\t\t checkMatch(input,url,title);\r\n \r\n\t\t// Check to see if this line contains a link\r\n\t\tlink=parseForLink(upperCaseInput,input);\r\n\t\tif(link!=null)\r\n\t\t{\r\n\t\t // Check if the maximum number of pages to search has been reached.\r\n\t\t if(app.getTotalPages()>=maxPages)\r\n\t\t return;\r\n if(topLevelSearch==FIND_TOP_LEVEL_PAGES)\r\n\t\t topLevelPages.addElement(link);\r\n else if(topLevelSearch==SEARCH_TOP_LEVEL_PAGES)\r\n\t\t nextLevelPages.addElement(link);\r\n\t\t else checkLink(link);\t \r\n\t\t}\r\n\t }\r\n }\r\n\tcatch(IOException e){ }\r\n }", "public String spellCheck(String url) {\n String answer = null;\n // Term term = new Term(Fields.URL.name(), text);\n try {\n Query query = parser.parse(QueryParser.escape(shingleString(url)));\n Query prefix = new PrefixQuery(new Term(URLField, url.substring(0,1)));\n BooleanQuery combined = new BooleanQuery();\n combined.add(query, Occur.MUST);\n combined.add(prefix, Occur.MUST);\n TopDocs docs = searcher.search(combined, 5);\n double maxSim = -1;\n \n for(ScoreDoc sd:docs.scoreDocs){\n// if(sd.score<SPELL_CHECK_SIM_LOWERBOUND)\n// continue;\n String retrievedURL = searcher.doc(sd.doc).get(URLField);\n \n double currentSim = customeEditDistance.proximity(url.replace(' ', '_'), retrievedURL);\n \n// ec.NESimilarity(url, retrievedURL.replace(' ', '_'));//\n\n if (currentSim > maxSim && currentSim > SPELL_CHECK_SIM_LOWERBOUND){\n answer = retrievedURL;\n maxSim = currentSim;\n System.out.println(retrievedURL+\" with sim \"+currentSim);\n }\n }\n \n } catch (Exception e) {\n \n }\n \n return TitleNameIndexer.normalize(answer);\n }", "@Test\n public void test_method(){\n //Navigate to url\n driver.get(\"https://www.google.com\");\n\n //Searching for the search bar and sends string\n driver.findElement(By.name(\"q\")).sendKeys(\"PerfectoCode GitHub\");\n }", "protected String fetchItem( String str_url ) {\n try {\n // assemble the string and the search request\n StringBuilder response = new StringBuilder();\n URL url = new URL(str_url);\n\n // make the connection\n HttpURLConnection httpconn = (HttpURLConnection) url.openConnection();\n\n // did it do ok?\n if ( httpconn.getResponseCode() == HttpURLConnection.HTTP_OK ) {\n BufferedReader input = new BufferedReader(\n new InputStreamReader(httpconn.getInputStream()), 8192);\n String strLine = null;\n while ((strLine = input.readLine()) != null) {\n // have more data\n response.append(strLine);\n response.append(\"\\n\");\n }\n input.close();\n return response.toString();\n }\n } catch ( IOException e ) {\n return e.getMessage();\n }\n return \"\";\n }", "java.lang.String getQuery();", "java.lang.String getQuery();", "public static void searchAction(TextField input, String URL){\n\t\tString fileName = null;\n\t\ttry {\n\t\t\tfileName = input.getText();\n\t\t\tinput.clear();\n\t\t\tSystem.out.println(\"Fetching url...\");\n\t\t\tURL = FetchURL.fetchFinalURL(fileName);\n\t\t} catch (IOException er) {\n\t\t\tSystem.err.println(\"ERROR: Unable to access website to fetch FCKH and URL; website may be down...\");\n\t\t}\n\t\tfinalActivity(fileName, URL);\n\t}", "public String getTextOnPage()\n {\n return mainText.getText();\n }", "public String sendGet(String url)\n\t{\n\t\t//Getting most relevant user-agent from robots.txt\n\t\tbest_match = findBestMatch();\n\t\t//Deicing whether or not to skip\n\t\tif (shouldSkip(url))\n\t\t{\n\t\t\treturn \"skipped\";\n\t\t}\n\t\tif (url.startsWith((\"https\")))\n\t\t{\n\t\t\treturn sendGetSecure(url);\n\t\t}\n\t\ttry \n\t\t{\n\t\t\t//Creating URL objects\n\t\t\tURL http_url = new URL(url);\n\t\t\t//Delaying visit if directed to by robots.txt\n\t\t\tcrawlDelay();\n\t\t\tHttpURLConnection secure_connection = (HttpURLConnection)http_url.openConnection();\n\t\t\t//Setting request method\n\t\t\tsecure_connection.setRequestMethod(\"GET\");\n\t\t\t//Sending all headers except for host (since URLConnection will take care of this)\n\t\t\tfor (String h: headers.keySet())\n\t\t\t{\n\t\t\t\tif (!h.equals(\"Host\"))\n\t\t\t\t{\n\t\t\t\t\tsecure_connection.setRequestProperty(h, headers.get(h));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//Getting ResponseParser object to read in page content\n\t\t\tp = new ResponseParser(new BufferedReader(new InputStreamReader(secure_connection.getInputStream())));\n\t\t\t\n\t\t\t//Parsing all response headers from returned object\n\t\t\tMap<String,String> p_headers = p.getHeaders();\n\t\t\tMap<String, List<String>> response_headers = secure_connection.getHeaderFields();\n\t\t\tfor (Map.Entry<String, List<String>> entry : response_headers.entrySet()) \n\t\t\t{\n\t\t\t\tif (entry.getKey() == null)\n\t\t\t\t{\n\t\t\t\t\tp.setResponse(entry.getValue().get(0));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tp_headers.put(entry.getKey(),entry.getValue().get(0));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//If we didn't get any headers in the response, the URL was invalid\n\t\t\tif (p.getHeaders().size() == 0)\n\t\t\t{\n\t\t\t\treturn (\"invalid url\");\n\t\t\t}\n\t\t\t\n\t\t\t//Otherwise return the contents of the returned document\n\t\t\treturn p.getData();\n\t\t\t\n\t\t} \n\t\tcatch (IOException | IllegalArgumentException e) \n\t\t{\n\t\t\treturn \"invalid url\";\n\t\t}\t\t\n//\t\ttry\n//\t\t{\n//\t\t\t//Deals with secure request\n//\t\t\tif (url.startsWith((\"https\")))\n//\t\t\t{\n//\t\t\t\treturn sendGetSecure(url);\n//\t\t\t}\n//\t\t\t//Parsing host and port from URL\n//\t\t\tURLInfo url_info = new URLInfo(url);\n//\t\t\thost = url_info.getHostName();\n//\t\t\tport = url_info.getPortNo();\n//\t\t\t\n//\t\t\t//Changing Host header if necessary\n//\t\t\theaders.put(\"Host\", host + \":\" + port);\n//\t\t\t\n//\t\t\t//Getting file path of URL\n//\t\t\tString file_path = url_info.getFilePath();\n//\t\t\t\n//\t\t\t//If we weren't able to find a host, URL is invalid\n//\t\t\tif (host == null)\n//\t\t\t{\n//\t\t\t\treturn \"invalid url\";\n//\t\t\t}\n//\t\t\t\n//\t\t\t//Delaying visits based on robots.txt crawl delay\n//\t\t\tcrawlDelay();\n//\t\t\t\n//\t\t\t//Otherwise, opening up socket and sending request with all headers\n//\t\t\tsocket = new Socket(host, port);\n//\t\t\tout = new PrintWriter(socket.getOutputStream(), true);\n//\t\t\tString message = \"GET \" + file_path + \" HTTP/1.1\\r\\n\";\n//\t\t\tfor (String header: headers.keySet())\n//\t\t\t{\n//\t\t\t\tString head = header + \": \" + headers.get(header) + \"\\r\\n\";\n//\t\t\t\tmessage = message + head;\n//\t\t\t}\n//\t\t\tout.println(message);\n//\n//\t\t\t//Creating ResponseParser object to parse the Response\n//\t\t\tp = new ResponseParser(socket);\n//\t\t\t\n//\t\t\t//If we didn't get any headers in the response, the URL was invalid\n//\t\t\tif (p.getHeaders().size() == 0)\n//\t\t\t{\n//\t\t\t\treturn (\"invalid url\");\n//\t\t\t}\n//\t\t\t//Otherwise return the contents of the returned document\n//\t\t\treturn p.getData();\n//\t\t} \n//\t\tcatch (UnknownHostException e) \n//\t\t{\n//\t\t\tSystem.err.println(\"Unknown Host Exception\");\n//\t\t\tSystem.err.println(\"Problem url is: http://www.youtube.com/motherboardtv?feature=watch&trk_source=motherboard\");\n//\t\t} \n//\t\tcatch (IOException | IllegalArgumentException e) \n//\t\t{\n//\t\t\tSystem.err.println(\"IO Exception\");;\n//\t\t}\n//\t\t//Return null for all caught exceptions (Servlet will deal with this)\n//\t\treturn null;\n\t}", "String getQueryResultsUrl();", "List<Codebadge> search(String query);", "private static List<String> getWord(String urlname) {\n\t\tList<String> returnWord = new ArrayList<String>();\n\t\tBufferedReader reader;\n\t\ttry {\n\t\t\tURL url = new URL(urlname);\n\t\t\tInputStream in = url.openStream();\n\t\t\treader = new BufferedReader(new InputStreamReader(in));\n\t\t\twhile (true) {\n\t\t\t\tString word = reader.readLine();\n\t\t\t\tif (word == null)\n\t\t\t\t\tbreak;\n\t\t\t\treturnWord.add(word);\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(e.getMessage());\n\t\t}\n\t\treturn returnWord;\n\t}", "public static void main(String[] args) throws InterruptedException {\n System.setProperty(\"webdriver.chrome.driver\",\"src//Resource//chromedriver.exe\");\n //you declare and define web driver\n WebDriver driver = new ChromeDriver();\n\n //set array list for the cars\n ArrayList<String> cars = new ArrayList<>();\n cars.add(\"lexus\");\n cars.add(\"Ford\");\n cars.add(\"Honda\");\n cars.add(\"BMW\");\n cars.add(\"Tesla\");\n\n for (int i = 0; i < cars.size(); i++) {\n\n //opening the browser automatically\n driver.navigate().to(\"http://www.google.com\");\n //maximize your browser\n driver.manage().window().maximize();\n\n //wait\n Thread.sleep(2000);\n\n //using ty catch exception to handle any error\n\n try {\n //locate the search field by inspecting it then enter keyword cars\n WebElement search = driver.findElement(By.xpath(\"//*[@name='q']\"));\n search.sendKeys(cars.get(i));\n } catch (Exception e) {\n System.out.println(\"unable to enter the data on search field\" + e);\n }//end of search field exception\n\n try {\n driver.findElement(By.xpath(\"//*[@name='btnK']\")).submit();\n } catch (Exception e) {\n System.out.println(\"unable to submit on search icon\" + e);\n }//end of search icon exception\n\n //wait\n Thread.sleep(2000);\n\n try {\n //to capture text from website you need to\n String message = driver.findElement(By.xpath(\"//*[@id='result-stats']\")).getText();\n //using array variables to split above message\n String[] arrayResult = message.split(\" \");\n System.out.println(\"My search number is \" + arrayResult[1]);\n } catch (Exception e) {\n System.out.println(\"unable to capture on search Result \" + e);\n }//end of search result exception\n\n\n //quit the session\n //driver.quit();\n\n //close the session\n /*driver.close();*/\n\n }//end of for loop\n }", "ReagentSearch getReagentSearch();", "private void searchWeb()\n {\n searchWeb = true;\n search();\n }", "public static String getText()\n\t{\n\t\treturn enterURL.getText().toString();\n\t}", "Map<String, Integer> getSearchResults(String searchTerm) {\n\n Map<String, Integer> libCount = new ConcurrentHashMap<>();\n\n try {\n Document document = Jsoup.connect(google + URLEncoder.encode(searchTerm, charset))\n .userAgent(userAgent)\n .referrer(\"http://www.google.com\")\n .get();\n\n Elements links = document.select(\"a[href]\");\n Set<String> urls = new HashSet<>();\n for (Element link: links) {\n if (link.attr(\"href\") != null && link.attr(\"href\").contains(\"=\")) {\n String url = link.attr(\"href\").split(\"=\")[1];\n if (url.contains(\"http\")) {\n urls.add(getDomainName(url));\n }\n }\n }\n\n CountDownLatch latch = new CountDownLatch(urls.size());\n\n for (String url: urls) {\n AnalysePage analysePage = new AnalysePage(url);\n completionService.submit(analysePage);\n }\n\n int completed = 0;\n\n while(completed < urls.size()) {\n try {\n Future<Set<String>> resultFuture = completionService.take();\n Set<String> strings = resultFuture.get();\n for (String lib : strings) {\n Integer count = libCount.get(lib);\n if (count == null) {\n libCount.put(lib, 1);\n } else {\n libCount.put(lib, ++count);\n }\n }\n completed++;\n latch.countDown();\n } catch (InterruptedException | ExecutionException e) {\n e.printStackTrace();\n }\n }\n try {\n latch.await();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n } catch (MalformedURLException e) {\n System.out.println(\"The URL is Malformed\");\n } catch (UnsupportedEncodingException e) {\n System.out.println(\"Incorrect URL encoding\");\n } catch (IOException e) {\n System.out.println(\"Unable to read from google\");\n e.printStackTrace();\n }\n executor.shutdown();\n return libCount;\n }", "public WebElement searchResultsLinks(String linkContaingText) {\r\n\t\treturn driver.findElement(By.xpath(\"//h2[contains(text(),'\"+linkContaingText+\"')]\"));\r\n\t}", "private String keywordFound(){\r\n\t\tString rtn = \"\";\r\n\t\tString tmp = \"\";\r\n\t\tint carr_pos = getCaretPosition();\r\n\t\t//estract part of text for keyword search\r\n\t\ttry { \r\n\t\tif(carr_pos>50)\r\n\t\t\ttmp = doc.getText(carr_pos-50,50);\r\n\t\telse\r\n\t\t\ttmp = doc.getText(0,carr_pos);\r\n\t\t}catch(BadLocationException a){\r\n\t\t\tSystem.out.println(\"exception\");\r\n\t\t\treturn rtn;\r\n\t\t};\r\n\t\t//Start check\r\n\t\tint i = 0;\r\n\t\tif(tmp.length() >= 2)i = tmp.length()-2;\t\r\n\t\twhile(checkOperator(tmp.charAt(i)) && i > 0){\r\n\t\t\trtn += tmp.charAt(i);\r\n\t\t\ti--;\r\n\t\t}\r\n\t\tif(i == 0)rtn += tmp.charAt(i);\t\t\r\n\t\treturn mirrorString(rtn);\r\n\t}", "private String getContent(String url) throws BoilerpipeProcessingException, IOException {\n int code;\n HttpURLConnection connection = null;\n URL uri;\n do{\n uri = new URL(url);\n if(connection != null)\n connection.disconnect();\n connection = (HttpURLConnection)uri.openConnection();\n connection.setRequestMethod(\"GET\");\n connection.setConnectTimeout(5000);\n connection.setReadTimeout(5000);\n connection.connect();\n code = connection.getResponseCode();\n if(code == 301)\n url = connection.getHeaderField( \"Location\" );\n }while (code == 301);\n\n System.out.println(url + \" :: \" + code);\n String content = null;\n if(code < 400) {\n content = ArticleExtractor.INSTANCE.getText(uri);\n }\n connection.disconnect();\n return content;\n }", "public static void main(String[] args) throws AWTException {\n\r\n\t\t\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"C:\\\\ChromeDriver\\\\New\\\\chromedriver.exe\");\r\n\t\tWebDriver driver=new ChromeDriver();\r\n\t\tdriver.get(\"https://www.google.co.uk/\");\r\n\t\t\r\n\t\tWebElement searchbox=driver.findElement(By.name(\"q\"));\r\n\t\t//searchbox.sendKeys(Keys.SHIFT+ \"shirdi\" +Keys.ENTER);\r\n\t\t//2. \\n\r\n\t\t//searchbox.sendKeys(\"shirdi \\n\");\r\n\t\t//3. submit \r\n\t\t\r\n\t\tsearchbox.sendKeys(\"shirdi\");\r\n\t\t//searchbox.submit();\r\n\r\n\t\t//4. robot class\r\n\t\t\r\n\t\tRobot robot =new Robot();\r\n\t\trobot .keyPress(KeyEvent.VK_ENTER);\r\n\t\trobot.keyRelease(KeyEvent.VK_ENTER);\r\n\t\t\r\n\t}", "public void search(String url, String searchWord)\n {\n while(this.pagesVisited.size() < MAX_PAGES_TO_SEARCH)\n {\n String currentUrl;\n SpiderLeg leg = new SpiderLeg();\n if(this.pagesToVisit.isEmpty())\n {\n currentUrl = url;\n this.pagesVisited.add(url);\n }\n else\n {\n currentUrl = this.nextUrl();\n }\n leg.crawl(currentUrl); // Lots of stuff happening here. Look at the crawl method in\n // SpiderLeg\n boolean success = leg.searchForWord(searchWord);\n if(success)\n {\n System.out.println(String.format(\"**Success** Word %s found at %s\", searchWord, currentUrl));\n break;\n }\n this.pagesToVisit.addAll(leg.getLinks());\n }\n System.out.println(\"\\n**Done** Visited \" + this.pagesVisited.size() + \" web page(s)\");\n }", "public DocumentListFeed fullTextQuery(String text) throws MalformedURLException, IOException, ServiceException;", "public String getPlainText(URL url, int maxHops, boolean diff) throws Exception\n\t{\n\t\tSimpleTextCrawler sc = new SimpleTextCrawler();\n\t\tsc.setProxy(proxyHost, proxyPort);\n\t\tsc.setIgnorePrefixes(ignorePrefixes);\n\t\tString text = sc.getText(url, maxHops, diff);\n\t\treturn text;\n\t}", "public java.util.List<SearchRecord> generateSearchResults(String domain, String queryText, JSONObject configuration, int numberOfResults, JSONObject advConfig) {\n\t\tif (advConfig.length() > 0) {\n\t\t\tconfiguration = advConfig;\n\t\t}\n\t\t\n\t\tJSONObject googleScholarConfiguration = configuration.optJSONObject(\"googlescholar\");\n\t\tif (googleScholarConfiguration == null) { googleScholarConfiguration = new JSONObject(); }\n\t\n\t\tjava.util.List<SearchRecord> result = new java.util.ArrayList<SearchRecord>();\n\n\n\t\tint position = 0;\n\t\tnumberOfResults = Math.min(MAX_NUMBER_OF_RESULTS, numberOfResults); \n\t\tString userAgent = SourceHandlerInterface.getNextUserAgent(domain);\n\t\t\n\t\ttry (CloseableHttpClient httpclient = HttpClients.custom().setUserAgent(userAgent).build()) {\n\t\t\tString uri = this.createURIString(queryText, numberOfResults, googleScholarConfiguration);\n\t\t\tsrcLogger.log(Level.INFO, \"googlescholar URI: \" + uri);\n\t\t\t\n\t\t\twhile (result.size() < numberOfResults && uri != null) {\n\t\t\t\ttry (CloseableHttpResponse response = httpclient.execute(new HttpGet(uri))) {\n\t\n\t\t\t\t\tint code = response.getStatusLine().getStatusCode();\n\t\t\t\t\tif (code != HttpStatus.SC_OK) {\n\t\t\t\t\t\tsrcLogger.log(Level.SEVERE, \"googlescholar HTTP Response code: \" + code);\n\t\t\t\t\t\tsrcLogger.log(Level.SEVERE, \" status line: \" + response.getStatusLine());\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\tString content = FileUtilities.read(response.getEntity().getContent());\n\t\t\t\t\torg.jsoup.nodes.Document doc = Jsoup.parse(content, uri);\n\n\t\t\t\t\t/*\n\t\t\t\t\t \n\t\t\t'title': '.gs_rt a *::text',\n 'url': '.gs_rt a::attr(href)',\n 'related-text': '.gs_ggsS::text',\n 'related-type': '.gs_ggsS .gs_ctg2::text',\n 'related-url': '.gs_ggs a::attr(href)',\n 'citation-text': '.gs_fl > a:nth-child(1)::text',\n 'citation-url': '.gs_fl > a:nth-child(1)::attr(href)',\n 'authors': '.gs_a a::text',\n 'description': '.gs_rs *::text',\n 'journal-year-src': '.gs_a::text',\n\t\t\t\t\t \n\t\t\t\t\t */\n\t\t\t\t\t\n\t\t\t\t\tElements items = doc.select(\"div.gs_r\");\n\t\t\t\t\tfor (org.jsoup.nodes.Element e: items) {\n\t\t\t\t\t\tString url = null;\n\t\t\t\t\t\t// First, check to see if a full text document is available. If so, use that as the url.\n\t\t\t\t\t\tElements links = e.select(\"div.gs_ggsd a\");\n\t\t\t\t\t\tfor (Element linkElement: links) {\n\t\t\t\t\t\t\tif (linkElement.text().contains(\"Find Text @ NCSU\") == false) {\n\t\t\t\t\t\t\t\turl = linkElement.attr(\"href\");\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tElement link = e.select(\"h3.gs_rt a\").first();\n\t\t\t\t\t\tif (link == null) { continue; }\n\t\t\t\t\t\tString title = link.text(); \n\t\t\t\t\t\tif (url == null) { url = link.attr(\"href\"); }\n\t\t\t\t\t\tString description = null; \n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tdescription = e.select(\".gs_rs\").first().text();\n\t\t\t\t\t\t} catch (NullPointerException npe) {\n\t\t\t\t\t\t\tsrcLogger.log(Level.WARNING,\"No description fround in google scholar handler, null pointer exception\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (title != null || url != null || description !=null)\t{\n\t\t\t\t\t\t\tposition++;\n\t\t\t\t\t\t\tSearchRecord r = new SearchRecord(title,url,description,position,SOURCE_HANDLER_NAME);\n\t\t\t\t\t\t\tresult.add(r);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Next, let's get the next page ...\n\t\t\t\t\ttry {\n\t\t\t\t\t\tElement nextLink = doc.select(\"a:contains(Next):has(span.gs_ico_nav_next)\").first();\n\t\t\t\t\t\turi = nextLink.attr(\"href\");\n\t\t\t\t\t\tif (uri.startsWith(\"http\") == false) {\n\t\t\t\t\t\t\turi = \"https://scholar.google.com\" + uri;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//System.out.println(uri);\t\n\t\t\t\t\t}\n\t\t\t\t\tcatch (Exception e) {\n\t\t\t\t\t\turi = null; // link not found\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t\tcatch (Exception e) {\n\t\t\t\t\tsrcLogger.log(Level.SEVERE, \"googlescholar exception: \",e);\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (Exception ioe) {\n\t\t\tsrcLogger.log(Level.SEVERE, \"httpclient exception: \" + ioe.toString());\n\t\t\treturn null;\t\t\t\n\t\t}\n\t\t\n\t\t//result.stream().forEach(System.out::println);\n\t\t\n\t\treturn result;\n\t}", "private static String getPhraseInput() {\n\t\treturn getQuery(\"Query Phrase\");\n\t}", "@Test\r\n\tpublic void test_3and4_Search() {\n\t\tdriver.findElement(By.id(\"twotabsearchtextbox\")).sendKeys(searchKey);\r\n\t\t// click on search button\r\n\t\tdriver.findElement(By.id(\"nav-search-submit-text\")).click();\r\n\t\t// use JavaScriptExecutor to scroll on page\r\n\t\t// cast driver to JavaScriptExecutor\r\n\t\texecutor = (JavascriptExecutor) driver;\r\n\t\texecutor.executeScript(\"window.scrollTo(0, 600)\");\r\n\r\n\t\t// try to get \"results for\" text on web page \r\n\t\t// if it is found then search is successful \r\n\t\tWebElement element = driver.findElement(By.xpath(\"//span[@id='s-result-count']\"));\r\n\t\tString resultFound = element.getText();\r\n\t\tAssert.assertTrue(resultFound.contains(\"results for\"));\r\n\t\tSystem.out.println(\"Search for Samsung is passed\");\r\n\t}", "@Test\r\n\tpublic void getSearchPage() throws IOException {\r\n\t\topen(\"https://www.google.com\");\r\n\t\tWebElement element = driver.findElement(By.name(\"q\"));\r\n\t\tassertNotNull(\"Testing driver works\", element);\r\n\t\tgenfilesMd();\r\n\t}", "String getWebsite();", "java.lang.String getText();", "java.lang.String getText();", "java.lang.String getText();", "java.lang.String getText();", "java.lang.String getText();", "java.lang.String getText();", "java.lang.String getText();", "java.lang.String getText();", "@java.lang.Override\n public com.clarifai.grpc.api.Search getSearch() {\n if (inputSourceCase_ == 10) {\n return (com.clarifai.grpc.api.Search) inputSource_;\n }\n return com.clarifai.grpc.api.Search.getDefaultInstance();\n }" ]
[ "0.64795035", "0.62333274", "0.60719943", "0.5951355", "0.5950939", "0.59503824", "0.5938869", "0.5890151", "0.5812466", "0.5803611", "0.5742979", "0.5730822", "0.5723502", "0.5630703", "0.56289333", "0.5620469", "0.5588915", "0.55515003", "0.5543057", "0.5533863", "0.5533701", "0.54784787", "0.5474898", "0.54374903", "0.5407633", "0.539633", "0.5394276", "0.53782535", "0.53734523", "0.5373364", "0.53646505", "0.53592604", "0.5345312", "0.53405523", "0.5333508", "0.5333152", "0.5322391", "0.531575", "0.5306062", "0.5292748", "0.52915406", "0.528295", "0.5271992", "0.52598333", "0.522941", "0.52224797", "0.5194098", "0.51935023", "0.519071", "0.5187891", "0.5173507", "0.51600796", "0.5141176", "0.51339495", "0.5128295", "0.51066315", "0.5083494", "0.5065232", "0.5055341", "0.50544184", "0.50472236", "0.50329137", "0.50308806", "0.50289786", "0.50268644", "0.5026623", "0.501589", "0.501589", "0.4998081", "0.49962407", "0.49931774", "0.49926475", "0.4988467", "0.49872676", "0.49839628", "0.4980094", "0.49772272", "0.49691617", "0.49632072", "0.49586853", "0.4957924", "0.4950697", "0.4938361", "0.49340275", "0.49332178", "0.49317268", "0.49293482", "0.4923105", "0.49122113", "0.49017975", "0.4899817", "0.48903552", "0.48903552", "0.48903552", "0.48903552", "0.48903552", "0.48903552", "0.48903552", "0.48903552", "0.48822594" ]
0.49947223
70
recursively process nodes and get text(top level is )
private static List<String> getText(Node n, String filter) throws ParserException { List<String> strArray = new ArrayList<String>(); String parentTag = ""; TagNode parent = (TagNode) n.getParent(); if (parent != null) { parentTag = parent.getTagName(); } if (n instanceof TextNode) { // text TextNode tn = (TextNode) n; System.out.println(parentTag + ":" + tn.getText().trim()); System.out.println(((TagNode) n).getTagName()); if (filter.equals("") || filter.equalsIgnoreCase(parentTag)) { String text = tn.getText().trim(); text = text.replace("&nbsp;", " "); // remove non-breaking spaces if (text.length() > 0 && !text.matches("\\s+")) { strArray.add(text); } } } else { // a tag or remark NodeList nl = n.getChildren(); if (null != nl) { for (NodeIterator ni = nl.elements(); ni.hasMoreNodes();) { strArray.addAll(getText(ni.nextNode(), filter)); } } } return strArray; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static String getText(Node node) {\n\t\tStringBuilder text = new StringBuilder();\n\t\t\n\t\ttext.append(node.getText());\n\t\tNode childNode;\n\t\tint size;\n\t\t\n\t\ttry {\n\t\t\tsize = node.numberOfChildren();\n\t\t} catch (NullPointerException e) {\n\t\t\tsize = 0;\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < size; i++ ) {\n\t\t\tchildNode = node.getChild(i);\n\n\t\t\tif (childNode instanceof ForLoopNode) {\n\t\t\t\ttext.append(getText(childNode));\n\t\t\t} else {\n\t\t\t\ttext.append(childNode.getText());\n\t\t\t}\n\t\t}\n\t\t\n\t\ttext.append(\"{$ END $}\");\n\t\t\n\t\treturn text.toString();\n\t}", "public String getText() {\n StringBuilder sb = new StringBuilder();\n for (Node node : getRootNode().getChildren()) {\n if (node instanceof Text) {\n sb.append(((Text) node).getText());\n }\n }\n return sb.toString();\n }", "public String getTextValue (Node node);", "public List<MarkedUpText> getChildrenTexts() {\n Enumeration<DefaultMutableTreeNode> children = this.children();\n \n List<MarkedUpText> texts = new LinkedList<MarkedUpText>();\n while (children.hasMoreElements()) {\n DefaultMutableTreeNode curChild = children.nextElement();\n if(!curChild.getAllowsChildren()) {\n texts.add((MarkedUpText) curChild);\n }\n }\n return texts;\n }", "public List<MarkedUpText> getDescendantTexts() {\n List<MarkedUpText> texts = this.getChildrenTexts();\n \n Enumeration<DefaultMutableTreeNode> children = this.children();\n while (children.hasMoreElements()) {\n DefaultMutableTreeNode curChild = children.nextElement();\n if(curChild.getAllowsChildren()) {\n texts.addAll(((Folder) curChild).getDescendantTexts());\n }\n }\n return texts;\n }", "private String getText(Node node) throws ParserException{\n NodeList list = node.getChildNodes();\n for (int i=0; i < list.getLength(); i++){\n if(list.item(i).getNodeType() == Node.TEXT_NODE) {\n return list.item(i).getTextContent().trim();\n }\n }\n throw new ParserException(\"Node has no text element, at: \"+ dom.compareDocumentPosition(node));\n }", "public String getText(Node node) {\n\t StringBuffer result = new StringBuffer();\n\t if (! node.hasChildNodes()) return \"\";\n\n\t NodeList list = node.getChildNodes();\n\t for (int i=0; i < list.getLength(); i++) {\n\t Node subnode = list.item(i);\n\t if (subnode.getNodeType() == Node.TEXT_NODE) {\n\t result.append(subnode.getNodeValue());\n\t }\n\t else if (subnode.getNodeType() == Node.CDATA_SECTION_NODE) {\n\t result.append(subnode.getNodeValue());\n\t }\n\t else if (subnode.getNodeType() == Node.ENTITY_REFERENCE_NODE) {\n\t // Recurse into the subtree for text\n\t // (and ignore comments)\n\t result.append(getText(subnode));\n\t }\n\t }\n\n\t return result.toString();\n\t}", "public static String getNodeText(Node root)\n {\n return XMLTools.getNodeText(root, null, false, \"\");\n }", "private void preorderTraverseForToString(Node node) {\n\t\tif (node == null)\n\t\t\treturn;\n\n\t\tthis.order += node + \"\\n\";\n\n\t\t// walk trough left sub-tree\n\t\tpreorderTraverseForToString(node.left);\n\t\t// walk trough right sub-tree\n\t\tpreorderTraverseForToString(node.right);\n\t}", "Node getTemplateTextNode();", "void visit(Text node);", "public String preorderTraverse(){\r\n\t\t\r\n\t\t//the recursive call to the private method\r\n\t\t//StringBuffer is used because it is passed by reference\r\n\t\t//StringBuffer can be changed in recursive calls\r\n\t\treturn preorderTraverse(this, new StringBuffer(\"\"));\r\n\t}", "public String postorderTraverse(){\r\n\t\t\r\n\t\t//the recursive call to the private method\r\n\t\t//StringBuffer is used because it is passed by reference\r\n\t\t//StringBuffer can be changed in recursive calls\r\n\t\treturn postorderTraverse(this, new StringBuffer(\"\"));\r\n\t}", "@Override\n public String toString() {\n return ((leftChild != null) ? leftChild : \"\")\n + text + \"\\n\"\n + ((rightChild != null) ? rightChild : \"\");\n }", "static String getElementText(Element e) {\n if (e.getChildNodes().getLength() == 1) {\n Text elementText = (Text) e.getFirstChild();\n return elementText.getNodeValue();\n }\n else\n return \"\";\n }", "@Override\n\tpublic Object visit(ASTText node, Object data) {\n\t\tSystem.out.print(\"text()\");\n\t\treturn null;\n\t}", "private String traverseForToString() {\n\t\tif (this.root != null)\n\t\t\tpreorderTraverseForToString(this.root);\n\n\t\treturn this.order;\n\t}", "void visitTextNode(TextNode node);", "public String getNodeValue(Node node) throws Exception;", "private int searchByTextContent(Node node) {\n\t\tif(hashtableIgnoreTags.get(node.getClass().getName()) != null) return 0;\n\t\t\n// \tSystem.out.println( node.getClass().getName());\n// \tSystem.out.println( \"<\" + node.getText() + \">\");\n \t\n \tif( 0 == compareHTMLText(node, strSearchText))\n \t{\n \t\tSystem.out.println( \"MATCH!\");\n \t\tint iret = analyseMatchLocation(node);\n \t\treturn 1;\n \t}\n \t\n \t// if this node text is not matched then search recursively \n \t// under this node using depth-first approach\n \tNodeList nodes = node.getChildren();\n \t\n \tif(nodes == null) return 0; // reached end of the tree nodes so go back and try your luck elsewhere\n \t\n \tint size = nodes.size();\n \t\n \tNode nextnode;\n \t\n \tfor (int i = 0; i < size; i++)\n \t{\n \t\tnextnode = nodes.elementAt(i);\n \t\t\n \t\tString strTagPattern = \"\";\n \t\t\n \t\t// RECURSION\n \t\tint iret = searchByTextContent(nextnode);\n \t\tif(1 == iret) \n \t\t{\n \t\t\tstrTagPattern = HTMLParser.getTagMatchPattern(nextnode);\n \t\t\t\n \t\t\t// There is a match so we need to log all the steps backwards to root node\n \t\t\t// to learn how to access this element in general from the HTML as a rule\n \t\t\t// Append the element number to the match string for each level of the hierarchy\n \t\t\tmatchPath = strTagPattern + \"#\" + String.valueOf(i) + \":\" + matchPath;\n \t\t\treturn 1; // Indicate there was a match indeed!\n \t\t}\n \t}\n \t\t\t\n\t\treturn 0;\n\t}", "private static String toHtml(Node node) {\n\t\tStringBuilder buf = new StringBuilder();\n\t\tif (!node.heading.text.isEmpty()) {\n\t\t\tbuf.append(node.heading.text);\n\t\t\tbuf.append(\"\\n\");\n\t\t}\n\t\tIterator<Node> iter = node.children.iterator();\n\t\tif (iter.hasNext()) {\n\t\t\tbuf.append(\"<ul>\");\n\n\t\t\twhile (iter.hasNext()) {\n\t\t\t\tNode child = iter.next();\n\t\t\t\tbuf.append(\"<li>\");\n\t\t\t\tbuf.append(toHtml(child));\n\t\t\t\tbuf.append(\"</li>\");\n\t\t\t\tif (iter.hasNext()) {\n\t\t\t\t\tbuf.append(\"\\n\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tbuf.append(\"</ul>\");\n\t\t}\n\t\treturn buf.toString();\n\t}", "protected String getTextContent(Node elm) {\n\t\tif (elm == null) {\n\t\t\treturn \"\";\n\t\t}\n\t\tStringBuilder sb = new StringBuilder();\n\t\tNodeList list = elm.getChildNodes();\n\t\tfor (int i = 0; i < list.getLength(); i++) {\n\t\t\tNode n = list.item(i);\n\t\t\tif (sb.length() > 0) {\n\t\t\t\tsb.append(' ');\n\t\t\t}\n\t\t\tif (n.getNodeType() == Node.CDATA_SECTION_NODE) {\n\t\t\t\tsb.append(n.getTextContent());\n\t\t\t} else {\n\t\t\t\tsb.append(n.getTextContent().trim());\n\t\t\t}\n\t\t}\n\t\treturn sb.toString();\n\t}", "@Override public List<Node> visitText(@NotNull XQueryParser.TextContext ctx) {\n\t\tfor(int i = 0; i < r.size(); ){\n\t\t\tif(r.get(i).getNodeType() != Node.TEXT_NODE ){\n\t\t\t\tr.remove(i);\n\t\t\t} else i++;\n\t\t}\n\t\treturn visitChildren(ctx);\n\t}", "static String text(final DocTree tag) {\n for (final DocTree node : ((UnknownBlockTagTree) tag).getContent()) {\n if (node.getKind() == DocTree.Kind.TEXT) {\n return ((TextTree) node).getBody().trim();\n }\n }\n return \"\";\n }", "public String getNodeValue ();", "@Override\n\tpublic String visitProgram(ProgramContext ctx) {\n\t\tfor(int i=0; i< ctx.getChildCount();i++)\n\t\t visit(ctx.getChild(i));\n\t\treturn sb.toString();\n\t}", "@Override\n\t\tpublic String toString() {\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tpreOrderTraverse(expression.root, 1, sb);\n\t\t\treturn sb.toString();\n\t\t}", "public void printTree(){ \n System.out.format(\"The suffix tree for S = %s is: %n\",this.text); \n this.print(0, this.root); \n }", "public String toString(){\n //return myString(root);\n printInOrder(root);\n return \"\";\n }", "@Override\n public Object string(Object node) {\n Node<E> myNode = (Node<E>)node;\n String parentString = \"null\";\n if (myNode.parent != null) {\n parentString = myNode.parent.element.toString();\n }\n return myNode.element + \"_p(\" + parentString + \")\"; }", "public String inOrderTraverse(){\r\n\r\n\t\t//Stack that keeps track of where we go\r\n\t\tStack<BinarySearchTree> traverseStack = new Stack<BinarySearchTree>();\r\n\t\t\r\n\t\t//This is where we want to start\r\n\t\tBinarySearchTree curr = this;\r\n\t\t\r\n\t\t//When true, the string is returned\r\n\t\tBoolean done = false;\r\n\t\t\r\n\t\t//The string to return\r\n\t\tString treeAsString = \"\";\r\n\t\t\r\n\t\t//INORDER: LEFT > ROOT > RIGHT\r\n\r\n\t\twhile(!done){\r\n\t\t\tif(curr != null){\r\n\t\t\t\t\r\n\t\t\t\t//We need to get left first push it onto the stack\r\n\t\t\t\ttraverseStack.push(curr);\r\n\r\n\t\t\t\t//Getting the left first\r\n\t\t\t\tcurr = curr.getLeftChild();\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\t\r\n\t\t\t\t//curr is null. We checked left.\r\n\t\t\t\tif(!traverseStack.isEmpty()){\r\n\t\t\t\t\t\r\n\t\t\t\t\t//pop the stack to get the item\r\n\t\t\t\t\tcurr = traverseStack.pop();\r\n\r\n\t\t\t\t\t//append the item\r\n\t\t\t\t\ttreeAsString += curr.toString() + \" \";\r\n\r\n\t\t\t\t\t//Check the right\r\n\t\t\t\t\tcurr = curr.getRightChild();\r\n\t\t\t\t}\r\n\t\t\t\t//curr was null, the stack was empty, we visited all\r\n\t\t\t\t//of the 'nodes'\r\n\t\t\t\telse{\r\n\t\t\t\t\tdone = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn treeAsString;\r\n\t}", "public String getValue(Node node) {\n return (node == null) ? null : node.getTextContent();\n }", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n traverseNode(sb, \"\", \"\", root, false);\n return sb.toString();\n }", "private static String getAllChildrenAsText(Node parentNode) {\n\t\tStringBuilder builder = new StringBuilder();\n\t\t\n\t\tint numberOfChildren = parentNode.numberOfChildren();\n\t\tfor (int i = 0; i < numberOfChildren; i ++) {\n\t\t\tNode child = parentNode.getChild(i);\n\t\t\tbuilder.append(child.toString());\n\t\t\t\n\t\t\tif (child instanceof ForLoopNode) {\n\t\t\t\tbuilder.append(getAllChildrenAsText(child));\n\t\t\t\tbuilder.append(\"{$ END $}\");\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn builder.toString();\n\t}", "public void preorderTraverse(){\n\t\tpreorderHelper(root);\n\t\tSystem.out.println();\n\t}", "private void postOrdertraverse(Node root){\n for(var child : root.getChildren())\n postOrdertraverse(child); //recursively travels other childrens in current child\n\n //finally visit root\n System.out.println(root.value);\n\n }", "public void summarize () {\n\n TreeNodeVisitor visitor = new TreeNodeVisitor();\n traversal (visitor);\n visitor.log();\n \n }", "private void preOrderTraverse(Node<String> node, int depth,StringBuilder sb) {\n\t\t\t\tif(node!=null){\n\t\t\t\t\t\tsb.append(\" \"+node.toString());\n\t\t\t\t\tpreOrderTraverse(node.left, depth + 1, sb);\n\t\t\t\t\n\t\t\t\t\tpreOrderTraverse(node.right, depth + 1, sb);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t}", "protected StringBuffer processNode(Node n, StringBuffer buf) {\n StringBuffer endText = null;\n \n int type = n.getNodeType();\n switch (type) {\n case Node.ATTRIBUTE_NODE:\n break;\n \n case Node.DOCUMENT_NODE:\n break;\n \n case Node.ELEMENT_NODE:\n // endText = processElement((Element) n, buf);\n break;\n \n case Node.TEXT_NODE:\n buf.append(((Text) n).getData());\n break;\n\n // Pass processing instructions (e.g., <?blah?>\n // right on to the synthesizer. These types of things\n // probably should not be used. Instead the 'engine'\n // element is probably the best thing to do.\n //\n case Node.PROCESSING_INSTRUCTION_NODE:\n break;\n \n // The document type had better be JSML.\n //\n case Node.DOCUMENT_TYPE_NODE:\n break;\n\n // I think NOTATION nodes are only DTD's.\n //\n case Node.NOTATION_NODE:\n break;\n\n // Should not get COMMENTS because the JSMLParser\n // ignores them.\n //\n case Node.COMMENT_NODE:\n break;\n\n // Should not get CDATA because the JSMLParser is\n // coalescing.\n // \n case Node.CDATA_SECTION_NODE:\n break;\n\n // Should not get ENTITY related notes because\n // entities are expanded by the JSMLParser\n //\n case Node.ENTITY_NODE:\n case Node.ENTITY_REFERENCE_NODE:\n break;\n\n // Should not get DOCUMENT_FRAGMENT nodes because I\n // [[[WDW]]] think they are only created via the API's\n // and cannot be defined via content.\n //\n case Node.DOCUMENT_FRAGMENT_NODE:\n break;\n\n default:\n break;\n }\n \n return endText;\n }", "static String iterativeInorder(BinaryTreeNode root)\n {\n Stack<BinaryTreeNode> stk = new Stack<>();\n String result = \"\";\n\n\n while(root != null || !stk.isEmpty()) {\n if(root != null) {\n stk.push(root);\n root = root.left;\n } else {\n BinaryTreeNode val = stk.pop();\n result = result + val.data + \" \";\n root = val.right;\n }\n }\n return result;\n }", "private static String printNode(Node node) {\n\t\tif (node instanceof TextNode) {\n\t\t\tTextNode textNode = (TextNode) node;\n\t\t\treturn addEscapes(\n\t\t\t\t\ttextNode.getText(),\n\t\t\t\t\tEscapableArrays.textEscapable(),\n\t\t\t\t\tParserDelimiters.ESCAPE_DELIMITER.getValue()\n\t\t\t);\n\t\t}\n\t\t\n\t\tif (node instanceof ForLoopNode) {\n\t\t\treturn printForLoopNode((ForLoopNode) node);\n\t\t}\n\t\t\n\t\tif (node instanceof EchoNode) {\n\t\t\treturn printEchoNode((EchoNode) node);\n\t\t}\n\t\t\n\t\treturn \"\";\n\t}", "public List<AST> getChildNodes ();", "static void preorderPrint(TreeNode node) {\n if (node == null)\n return;\n\n System.out.print(\" \" + node.data);\n Iterator iter = node.getChildren().iterator();\n while (iter.hasNext()) {\n preorderPrint((TreeNode) iter.next());\n }\n }", "public static String getNodeValue(Element node)\n {\n StringBuilder sb = new StringBuilder();\n NodeList children = node.getChildNodes();\n int numNodes = children.getLength();\n for (int i = 0; i < numNodes; i++)\n {\n Node next = children.item(i);\n if (next instanceof Text)\n {\n sb.append(next.getNodeValue());\n }\n }\n return sb.toString();\n }", "public void printTreeNodes(){\n logger.trace(\"Name: \"+this.getName());\n for(int i=0;i<this.getChildCount();i++){\n SearchBaseNode node = (SearchBaseNode) this.getChildAt(i);\n node.printTreeNodes();\n }\n }", "public String serialize(TreeNode root) {\r\n\r\n // **** initialization ****\r\n StringBuilder sb = new StringBuilder();\r\n\r\n // **** recursive call (implements DFS) ****\r\n serialize(root, sb);\r\n\r\n // **** return trimmed string ****\r\n return sb.toString().trim();\r\n }", "public String toString() {\n return toString(root) + \" \";//call helper method for in-order traversal representation\n }", "private void preOrdertraverse(Node root){\n System.out.println(root.value);\n for(var child : root.getChildren())\n preOrdertraverse(child); //recursively travels other childrens in current child\n }", "private void traverse(TNode node)\r\n\t\t{\n\t\t\tif (node != null) {\r\n\t\t\t\ttraverse(node.getLeft());\r\n\r\n\t\t\t\tSystem.out.println(node);\r\n\r\n\t\t\t\ttraverse(node.getRight());\r\n\t\t\t}\r\n\r\n\t\t}", "Node currentNode();", "private String getHongbaoText(AccessibilityNodeInfo node) {\n String content;\n try {\n AccessibilityNodeInfo i = node.getParent().getChild(0);\n content = i.getText().toString();\n } catch (NullPointerException npe) {\n return null;\n }\n return content;\n }", "public Vector<Node> GetAdditionalSubNodes();", "public static String printTree()\r\n {\r\n String result = \"\";\r\n for (String s: tree.toArrayList())\r\n result = result + \" \" + s;\r\n return result;\r\n }", "public static String getNodeStr(Node curr) {\r\n\t\treturn curr.str;\r\n\t}", "public static String printTree()\n {\n \tString tree = \"\";\n ArrayList<String> letters = converter.toArrayList();\n for(int i = 0; i < letters.size(); i++)\n {\n tree += letters.get(i);\n if(i + 1 < letters.size())\n \t tree += \" \";\n }\n \n return tree;\n }", "public String postorder() {\n \tresult = \"\";\n \ttraversal(root);\n return result;\n }", "public String outputDepthFirstSearch() {\n // output string buffer\n StringBuilder output = new StringBuilder();\n outputDepthFirstSearch(root, output);\n return output.toString();\n }", "public void getRawField(String path){\n\t\tString info; // content of each node\n\t\tArrayList<String> fileContent = new ArrayList<>();\n\t\tNodeList documentList = getDocumentsTagsPubmed(path);\n\t\tfor (int s = 0; s < documentList.getLength(); s++) { //transform document nodes in elements\n\t\t\tNode fstNode = documentList.item(s);\n\t\t\tElement element = (Element) fstNode;\n\t\t\tNodeList nodeList2 = element.getElementsByTagName(\"str\");\n\t\t\tfor (int j = 0; j < nodeList2.getLength(); j++) {\n\t\t\t\tNode text = nodeList2.item(j);\n\t\t\t\treadPubmedElements(fileContent,text);\n\t\t\t\tif(fileContent.get(0)!=null){\n\t\t\t\t\t//\tgetWindowSentences(List<String> tokenizedText, T, int window, fileContent.get(0));\n\t\t\t\t\tsaveContenttoFile(fileContent, \"Files\\\\result.txt\");\n\t\t\t\t\tfileContent.removeAll(fileContent);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void work(RootNode root) throws Exception;", "java.lang.String getParent();", "java.lang.String getParent();", "public void traverse(Node node) {\n //pre order\n //System.out.println(node.data);\n\n if (node.leftChild != null) {\n traverse(node.leftChild);\n }\n //in order\n System.out.println(node.data);\n\n if (node.rightChild != null) {\n traverse(node.rightChild);\n }\n //post order\n //System.out.println(node.data);\n\n\n }", "@Override\r\n\t\t\t\tpublic void onItemSelected(AdapterView<?> arg0, View arg1,\r\n\t\t\t\t\t\tint arg2, long arg3) {\n\t\t\t\t\ttreeText=arg0.getItemAtPosition(arg2).toString();\r\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void onItemSelected(AdapterView<?> arg0, View arg1,\r\n\t\t\t\t\t\tint arg2, long arg3) {\n\t\t\t\t\ttreeText=arg0.getItemAtPosition(arg2).toString();\r\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void onItemSelected(AdapterView<?> arg0, View arg1,\r\n\t\t\t\t\t\tint arg2, long arg3) {\n\t\t\t\t\ttreeText=arg0.getItemAtPosition(arg2).toString();\r\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void onItemSelected(AdapterView<?> arg0, View arg1,\r\n\t\t\t\t\t\tint arg2, long arg3) {\n\t\t\t\t\ttreeText=arg0.getItemAtPosition(arg2).toString();\r\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void onItemSelected(AdapterView<?> arg0, View arg1,\r\n\t\t\t\t\t\tint arg2, long arg3) {\n\t\t\t\t\ttreeText=arg0.getItemAtPosition(arg2).toString();\r\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void onItemSelected(AdapterView<?> arg0, View arg1,\r\n\t\t\t\t\t\tint arg2, long arg3) {\n\t\t\t\t\ttreeText=arg0.getItemAtPosition(arg2).toString();\r\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void onItemSelected(AdapterView<?> arg0, View arg1,\r\n\t\t\t\t\t\tint arg2, long arg3) {\n\t\t\t\t\ttreeText=arg0.getItemAtPosition(arg2).toString();\r\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void onItemSelected(AdapterView<?> arg0, View arg1,\r\n\t\t\t\t\t\tint arg2, long arg3) {\n\t\t\t\t\ttreeText=arg0.getItemAtPosition(arg2).toString();\r\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void onItemSelected(AdapterView<?> arg0, View arg1,\r\n\t\t\t\t\t\tint arg2, long arg3) {\n\t\t\t\t\ttreeText=arg0.getItemAtPosition(arg2).toString();\r\n\t\t\t\t}", "void traverseInOrder(Node node){\n if (node != null) {\n traversePreOrder(node.left); // fokus left sampai dihabiskan, lalu right (berbasis sub-tree)\n System.out.println(\" \" + node.data);\n traversePreOrder(node.right);\n }\n }", "public String nodeAndElementsAsText() {\n\t\treturn \"\";\n\t}", "public ReactorResult<org.ontoware.rdf2go.model.node.Node> getAllHasSynchronizedText_asNode_() {\r\n\t\treturn Base.getAll_as(this.model, this.getResource(), HASSYNCHRONIZEDTEXT, org.ontoware.rdf2go.model.node.Node.class);\r\n\t}", "private String getLabelNodeAvl(){\n return concatLabel(this.root);\n }", "private String postorderTraverse(BinarySearchTree curr, StringBuffer treeAsString){\r\n\t\t\r\n\t\t//get left\r\n\t\tif(curr.getLeftChild() != null){\r\n\t\t\tpostorderTraverse(curr.getLeftChild(), treeAsString);\r\n\t\t}\r\n\t\t\r\n\t\t//get right\r\n\t\tif(curr.getRightChild() != null){\r\n\t\t\tpostorderTraverse(curr.getRightChild(), treeAsString);\r\n\t\t}\r\n\t\t\r\n\t\t//get item\r\n\t\ttreeAsString.append(curr.getRoot().toString() + \" \");\r\n\t\t\r\n\t\t//return\r\n\t\treturn treeAsString.toString();\r\n\t}", "public void traverseLevelOrder() {\n\t\tif (root == null) {\n\t\t\treturn;\n\t\t}\n\n\t\tLinkedList<Node> ls = new LinkedList<>();\n\t\tls.add(root);\n\t\twhile (!ls.isEmpty()) {\n\t\t\tNode node = ls.remove();\n\t\t\tSystem.out.print(\" \" + node.value);\n\t\t\tif (node.left != null) {\n\t\t\t\tls.add(node.left);\n\t\t\t}\n\t\t\tif (node.right != null) {\n\t\t\t\tls.add(node.right);\n\t\t\t}\n\t\t}\n\t}", "public void printNode(TrieNode curr) {\n if (curr == null)\n return;\n\n System.out.println(curr.getText());\n\n TrieNode next = null;\n for (Character c : curr.getValidNextCharacters()) {\n next = curr.getChild(c);\n printNode(next);\n }\n }", "public static void main(String a[]) {\n TreeNode root = new TreeNode(1,\n new TreeNode(2,\n null,\n new TreeNode(4, null, null)),\n new TreeNode(3, null, null));\n StringBuffer sb = new StringBuffer();\n tree2str(root, sb);\n System.out.println(sb.toString());\n }", "Node getSourceNode();", "public static void display(Node root){\r\n String str = \"[\"+root.data+\"] -> \";\r\n for(Node child : root.children){\r\n str += child.data + \", \";\r\n }\r\n System.out.println(str + \" . \");\r\n \r\n for(int i=0; i<root.children.size(); i++){\r\n Node child = root.children.get(i);\r\n display(child);\r\n }\r\n }", "private void postOrderTraverse(Node<String> node,StringBuilder sb) {\n\n\t\t\t\tif (node != null) {\t\n\t\t\t\t\tpostOrderTraverse(node.left, sb);\n\t\t\t\t\tpostOrderTraverse(node.right,sb);\n\t\t\t\t\tsb.append(node.toString());\n\t\t\t\t\tsb.append(\" \");\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t}", "java.lang.String getRoot();", "public abstract List<Node> getChildNodes();", "RootNode getRootNode();", "private void parse ( GPNode node ) {\n\n nodes++;\n\n int d = node.atDepth();\n if ( d > depth ) depth = d;\n\n for ( int i = 0; i < node.children.length; i++ )\n parse(node.children[i]);\n\n }", "public String getTitle(XsdNode node) {\n\t\tString out = \"\";\n\n\t\t/** TODO: new */\n\t\tgetMaxCount(node);\n\n\t\tif (!node.isUsed) {\n\t\t\treturn out;\n\t\t}\n\n\t\tif (selections.contains(node)) {\n\t\t\tif (firstElement)\n\t\t\t\tfirstElement = false;\n\t\t\telse\n\t\t\t\tout += separator;\n\t\t\tout += node.getName() + nextNumber(node);\n\t\t}\n\n\t\tEnumeration children = node.children();\n\t\twhile (children.hasMoreElements()) {\n\t\t\tXsdNode child = (XsdNode) children.nextElement();\n\n\t\t\tif (child.isUsed) {\n\t\t\t\tswitch (((Annotated) child.getUserObject()).getStructureType()) {\n\t\t\t\tcase Structure.ELEMENT:\n\t\t\t\t\tint cpt = 0;\n\t\t\t\t\t/* create a NodeList with all childs with tagname */\n\t\t\t\t\tint maxCount = getMaxCount(child);\n\t\t\t\t\twhile (cpt < maxCount) {\n\t\t\t\t\t\tout += getTitle(child);\n\t\t\t\t\t\tcpt++;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase Structure.ATTRIBUTE:\n\t\t\t\t\tif (firstElement)\n\t\t\t\t\t\tfirstElement = false;\n\t\t\t\t\telse\n\t\t\t\t\t\tout += separator;\n\t\t\t\t\tout += child.getName() + nextNumber(child);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t.println(\"[PSI makers: flattener] ERROR: the node is neither an attribute nor an element\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn out;\n\t}", "private static void traversals(Node root) {\n\t\tSystem.out.println(\"Node Pre \" + root.data);\n\t\tfor(Node child : root.children) {\n\t\t\tSystem.out.println(\"Edge Pre \" + root.data + \"--\" + child.data);\n\t\t\ttraversals(child);\n\t\t\tSystem.out.println(\"Edge Post \" + root.data + \"--\" + child.data);\n\t\t}\n\t\tSystem.out.println(\"Node Post \" + root.data);\n\t}", "static void postorderPrint(TreeNode node) {\n if (node == null)\n return;\n\n Iterator iter = node.getChildren().iterator();\n while (iter.hasNext()) {\n postorderPrint((TreeNode) iter.next());\n }\n System.out.print(\" \" + node.data);\n }", "void\nprintLeaves(Node node) \n\n{ \n\nif\n(node != \nnull\n) { \n\nprintLeaves(node.left); \n\n\n// Print it if it is a leaf node \n\nif\n(node.left == \nnull\n&& node.right == \nnull\n) \n\nSystem.out.print(node.data + \n\" \"\n); \n\nprintLeaves(node.right); \n\n} \n\n}", "private String loadTxt(OMElement e, String tagName) {\n try {\n OMElement child = XmlUtil.onlyChildWithLocalName(e, tagName);\n return child.getText().trim();\n } catch (Exception e1) {}\n return null;\n }", "Node getNode();", "public void tree()\n\t{\n\t\tIterable<Position<FileElement>> toPrint = fileSystem.PreOrder();\n\t\tfor (Position<FileElement> p : toPrint)\n\t\t{\n\t\t\tint depth = fileSystem.getDepth(p);\n\t\t\tfor (int i = 0; i < depth; i++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t\tSystem.out.println(p.getValue());\n\t\t}\n\t}", "@Override\n\tpublic String visitValue(ValueContext ctx) {\n\t \n\t\t\n\t return ctx.getChild(0).getText();\n\t\t\n\t\t\n\t}", "private String traversePreOrder(BinaryNode<T> root) {\n preOrderTrav += root.getData() + \" -> \";\n if (root.getLeftNode() != null) { // traverse left\n traversePreOrder(root.getLeftNode());\n }\n if (root.getRightNode() != null) { // traverse right\n traversePreOrder(root.getRightNode());\n }\n return preOrderTrav;\n }", "@Override\n public final String getRaw(){\n return getDocument().getTextCache(this, () -> {\n /// Raw text is adding up raw text of each child.\n StringBuilder builder = new StringBuilder();\n\n for (Span span: this){\n builder.append(span.getRaw());\n }\n return builder.toString();\n });\n }", "private String preorderTraverse(BinarySearchTree curr, StringBuffer treeAsString){\r\n\t\t\r\n\t\t//Get node\r\n\t\ttreeAsString.append(curr.getRoot().toString() + \" \");\r\n\t\t\r\n\t\t//Get leftChild\r\n\t\tif(curr.getLeftChild() != null){\r\n\t\t\tpreorderTraverse(curr.getLeftChild(), treeAsString);\r\n\t\t}\r\n\t\t\r\n\t\t//get rightChild\r\n\t\tif(curr.getRightChild() != null){\r\n\t\t\tpreorderTraverse(curr.getRightChild(), treeAsString);\r\n\t\t}\r\n\t\t\r\n\t\t//return\r\n\t\treturn treeAsString.toString();\r\n\t}", "@Override\n public Object string(Object node) {\n return ((Node<E>) node).element.toString();\n }", "private void printTree( BinaryNode<AnyType> t )\r\n\t{\r\n\t\tif( t != null )\r\n\t\t{\t\t\t\r\n\t\t\tprintTree( t.left );\r\n\t\t\tSystem.out.print( t.element+\" \");\r\n\t\t\tprintTree( t.right );\r\n\t\t}\r\n\t}", "public String getText() {\n if (_lastTag == null)\n return null;\n return _lastTag.getChildText();\n }" ]
[ "0.68151325", "0.64915633", "0.62951916", "0.6116661", "0.61161095", "0.6058821", "0.5926963", "0.5824181", "0.58007455", "0.57867247", "0.57763886", "0.57668984", "0.5663904", "0.56353885", "0.5634956", "0.5623659", "0.55995315", "0.55976915", "0.5593939", "0.5536236", "0.5530691", "0.55189615", "0.55180234", "0.55139", "0.550659", "0.5485558", "0.5472235", "0.5461961", "0.5432092", "0.5429004", "0.5416474", "0.5374233", "0.53569275", "0.5349694", "0.5342446", "0.533584", "0.5319412", "0.53114456", "0.53029424", "0.5295559", "0.52927905", "0.52754015", "0.5272184", "0.52703536", "0.5256319", "0.5248521", "0.52455485", "0.5205286", "0.52044344", "0.51916486", "0.51906896", "0.5186509", "0.5186085", "0.5184331", "0.5183557", "0.51835364", "0.516895", "0.51661503", "0.51633847", "0.5157014", "0.5157014", "0.5143988", "0.5134891", "0.5134891", "0.5134891", "0.5134891", "0.5134891", "0.5134891", "0.5134891", "0.5134891", "0.5134891", "0.512707", "0.5122543", "0.512105", "0.5108287", "0.5107516", "0.5095311", "0.5094959", "0.5094272", "0.50937724", "0.5093712", "0.5082562", "0.5080946", "0.50795984", "0.50790024", "0.50763595", "0.50743383", "0.5072723", "0.5065807", "0.50647515", "0.50640196", "0.5061343", "0.5061234", "0.50581604", "0.50556505", "0.50498754", "0.5044632", "0.5041431", "0.50402266", "0.5038863" ]
0.58734673
7
Return links from a url Make sure that the links are fully qualified
public static URL[] HTMLLinks(String url) throws Exception { // Get the links URLConnection conn = (new java.net.URL(url)).openConnection(); conn.setRequestProperty("User-Agent","Mozilla/5.0 ( compatible ) "); conn.setRequestProperty("Accept","*/*"); LinkBean sb = new LinkBean(); sb.setURL(url); sb.setConnection(conn); URL[] outlinks = sb.getLinks(); // make links fully qualified URI baseURI = null; try { baseURI = new URI(url); } catch (Exception e) { logger.error(e.getMessage(), e); return new URL[0]; } // ---- List<URL> fqurls = new ArrayList<URL>(); for (int i = 0; i < outlinks.length; i++) { URL fqurl = null; try { fqurl = baseURI.resolve(outlinks[i].toURI()).toURL(); } catch (Exception e) { logger.error(e.getMessage(), e); } if (fqurl != null) { fqurls.add(fqurl); } } return fqurls.toArray(new URL[fqurls.size()]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Set<String> extracLinks(String url, LinkFilter filter) {\n\n\t\tSet<String> links = new HashSet<String>();\n\t\ttry {\n\t\t\tParser parser = new Parser(url);\n\t\t\tparser.setEncoding(\"UTF-8\");\n\t\t\t// linkFilter filter <a> tag\n\t\t\tNodeClassFilter linkFilter = new NodeClassFilter(LinkTag.class);\n\t\t\t// get all filtered links\n\t\t\tNodeList list = parser.extractAllNodesThatMatch(linkFilter);\n\t\t\tfor (int i = 0; i < list.size(); i++) {\n\t\t\t\tNode tag = list.elementAt(i);\n\t\t\t\tif (tag instanceof LinkTag)// <a> tag\n\t\t\t\t{\n\t\t\t\t\tLinkTag link = (LinkTag) tag;\n\t\t\t\t\tString linkUrl = link.getLink();// url\n\t\t\t\t\tif (filter.accept(linkUrl)) {\n\t\t\t\t\t\t// change bbsdoc to bbstdoc\n\t\t\t\t\t\tString stlink = linkUrl.replace(\"bbsdoc\", \"bbstdoc\");\n\t\t\t\t\t\tlinks.add(stlink);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (ParserException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn links;\n\t}", "private @NotNull List<String> getAllLinks(final String text, final String urlStart) {\n List<String> links = new ArrayList<>();\n\n int i = 0;\n while (text.indexOf(urlStart, i) != -1) {\n int linkStart = text.indexOf(urlStart, i);\n int linkEnd = text.indexOf(\" \", linkStart);\n if (linkEnd != -1) {\n String link = text.substring(linkStart, linkEnd);\n links.add(link);\n } else {\n String link = text.substring(linkStart);\n links.add(link);\n }\n i = text.indexOf(urlStart, i) + urlStart.length();\n }\n\n return links;\n }", "private void pullLinks(String htmlPage) {\n\n Document doc = Jsoup.parse(htmlPage);\n Elements links = doc.select(\"a[href]\");\n\n for (Element link : links) {\n\n String possibleUrl = link.attr(\"abs:href\");\n\n if (!possibleUrl.equals(\"\")) {\n// Log.v(\"pullLinks\", \" will try to make URL from\" + possibleUrl);\n //if the link attr isn't empty, make a URL\n URL theUrl = NetworkUtils.makeURL(possibleUrl);\n\n if (RegexUtils.urlDomainNameMatch(firstLinkAsString, theUrl.toString())) {\n //if the string version of url is within the same domain as original query\n if (!visitedLinks.contains(theUrl.toString())) {\n// Log.v(\"DLAsyncTask.pullLinks\", \" thinks that \" + theUrl.toString() + \" wasn't visited, add into collected...\");\n collectedLinks.add(theUrl.toString());\n }\n }\n }\n\n }\n }", "public List<String> getLinks();", "java.lang.String getUrl();", "java.lang.String getUrl();", "java.lang.String getUrl();", "java.lang.String getUrl();", "java.lang.String getUrl();", "java.lang.String getUrl();", "Uri getUrl();", "public static List<String> getURLs(List<WebElement> links) {\n\t\t List<String> ListHref = new ArrayList<String>();\n\t\t \n\t\t //loops through all links\n\t\t for(WebElement Webhref:links) {\n\t\t\t \n\t\t\t //if element isn't null\n\t\t\t if (Webhref.getAttribute(\"href\") != null) {\n\t\t\t\t String StringHref = (Webhref.getAttribute(\"href\")).toString();\n\n\t\t\t\t //if page isn't part of domain, ignore\n\t\t\t\t if (StringHref.startsWith(variables.domain)) {\n\t\t\t\t\t //System.out.println(StringHref);\n\t\t\t\t\t \n\t\t\t\t\t //if page doesn't have an octothorpe\n\t\t\t\t\t if (!StringHref.contains(\"#\")) {\n\t\t\t\t\t\t \n\t\t\t\t\t\t//if page doesn't ends with one of the file extensions to not use\n\t\t\t\t\t\t String extension = getExtension(StringHref);//gets TLD from URL\n\t\t\t\t\t\t if(!variables.list.stream().anyMatch(extension::contains)) {\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t//if value isn't already part of this array or the already crawled array\n\t\t\t\t\t\t\t if(!ListHref.contains(StringHref) && !variables.crawled.contains(StringHref)) {\n\t\t\t\t\t\t\t\t ListHref.add(StringHref);\n\t\t\t\t\t\t\t\t //System.out.println(StringHref);\n\t\t\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t }\n\t\t\t\t\t }\n\t\t\t\t }\n\t\t\t }\n\t\t }\n\n\t\treturn ListHref;\n\t}", "@Test\n\tpublic void testGetLinksRelativeLink() {\n\t\tList<String> results = helper\n\t\t\t\t.getLinks(\"drop tables; <A HREF=\\\"/test\\\"> junk junk\", \"http://www.bobbylough.com\");\n\t\tassertEquals(1, results.size());\n\t\tassertEquals(\"http://www.bobbylough.com/test\", results.get(0));\n\t}", "List<Link> getLinks();", "public static ArrayList<URL> listLinks(URL baseURL, String htmlText) {\n // list to store links\n ArrayList<URL> links = new ArrayList<URL>();\n\n // compile string into regular expression\n Pattern p = Pattern.compile(REGEX);\n\n // match provided text against regular expression\n Matcher m = p.matcher(htmlText);\n\n // loop through every match found in text\n while ( m.find() ) \n {\n // add the appropriate group from regular expression to list\n try {\n\t\t\t\tlinks.add(new URL(baseURL, m.group(GROUP)));\n\t\t\t} catch (MalformedURLException e) {\n\t\t\t\tSystem.err.println(\"Invalid URL\");\n\t\t\t\te.printStackTrace();\n\t\t\t}\n }\n return links;\n }", "String getUrl();", "String getUrl();", "String getUrl();", "String getUrl();", "String getUrl();", "public List getLinks() {\r\n List links = getElements(\"a\");\r\n ArrayList result = new ArrayList();\r\n for (int i = 0; i < links.size(); i++) {\r\n try {\r\n StandAloneElement keep = ((StandAloneElement)links.get(i));\r\n result.add(parseUrl(keep.getAttribute(\"href\")));\r\n } catch (Exception e) {\r\n }\r\n }\r\n links = getElements(\"FRAME\");\r\n for (int i = 0; i < links.size(); i++) {\r\n try {\r\n StandAloneElement keep = ((StandAloneElement)links.get(i));\r\n result.add(parseUrl(keep.getAttribute(\"src\")));\r\n } catch (Exception e) {\r\n }\r\n }\r\n\r\n return result;\r\n }", "protected abstract String getUrl();", "public static List<String> getLinks(String url, NodeFilter filter) throws ParserException\n\t{\n\t\tParser parser = getParser(url);\n\t\tNodeList list = new NodeList();\n\t\tfor (NodeIterator e = parser.elements(); e.hasMoreNodes();)\n\t\t{\n\t\t\tlist.add(getNodes(e.nextNode(), filter));\n\t\t}\n\t\tList<String> strings = new ArrayList<String>();\n\t\tfor (NodeIterator i = list.elements(); i.hasMoreNodes();)\n\t\t{\n\t\t\tNode n = i.nextNode();\n\t\t\tif (n instanceof LinkTag)\n\t\t\t{ // text\n\t\t\t\tString link = ((LinkTag) n).extractLink();\n\t\t\t\tif (!strings.contains(link))\n\t\t\t\t{\n\t\t\t\t\tstrings.add(((LinkTag) n).extractLink());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn strings;\n\t}", "URL getUrl();", "@Test\n\tpublic void testGetLinksMultipleLinks() {\n\t\tList<String> results = helper.getLinks(\n\t\t\t\t\"drop tables; <A HREF=\\\"test.com\\\"> <a href=\\\"nexttest.org\\\". junk junk\", null);\n\t\tassertEquals(2, results.size());\n\t\tassertEquals(\"test.com\", results.get(0));\n\t\tassertEquals(\"nexttest.org\", results.get(1));\n\t}", "String getHref();", "public void getLinks() {\n\n var client = HttpClient.newBuilder()\n .followRedirects(HttpClient.Redirect.ALWAYS)\n .build();\n\n HttpRequest request = HttpRequest.newBuilder()\n .uri(URI.create(URL_PREFIX))\n .build();\n client.sendAsync(request, HttpResponse.BodyHandlers.ofLines())\n .thenApply(HttpResponse::body)\n .thenApply(this::processLines)\n .thenApply(versions -> tasks(versions))\n .join();\n }", "java.net.URL getUrl();", "public Set<Anchor> parse(Reader reader, String url) {\n\n Set<Anchor> elements = new HashSet<>();\n String urtContent = null;\n try {\n urtContent = readFully(reader);\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (urtContent == null){\n return elements;\n }\n\n mTag = pTag.matcher(urtContent);\n\n while (mTag.find()) {\n\n String href = mTag.group(1); // get the values of href\n String linkElem = mTag.group(2); // get the text of link Html Element\n\n mLink = pLink.matcher(href);\n\n while (mLink.find()) {\n\n String link = mLink.group(1);\n Anchor anchor = new Anchor();\n anchor.setUrl(link);\n anchor.setText(linkElem);\n\n elements.add(anchor);\n\n }\n }\n return elements;\n }", "static List<WebURL> ExtractUrl(Page page){\n // TODO: reference to parser to extractor urls from the web content\n return null;\n }", "private Set<String> findNewUrls(Document doc) {\n Set<String> newUrlSet = new HashSet<>();\n\n for (Element ah : doc.select(\"a[href]\")) {\n String href = ah.attr(\"abs:href\");\n\n if (!urlSet.contains(href) // Check if this is a new URL\n && href.contains(domain) // Check if the URL is from the same domain\n && isValidExtension(href) // Check that the file extension is not in the list of excluded extensions\n && !href.contains(\"mailto:\") // Check that the href is not an email address\n ) {\n newUrlSet.add(href);\n }\n\n }\n\n processNewUrls(newUrlSet);\n return newUrlSet;\n }", "protected abstract String getPublicUrl(URL url);", "public Collection<Map<String, String>> getLinks();", "private String urlLink(final String url, final String name) {\n Tag aTag = new Tag(\"a\");\n aTag.add(name);\n aTag.addParameter(\"href\", baseUrl + url);\n return aTag.toString();\n }", "@Test\n public void hrefPatternTest() {\n Pattern aTeg = Pattern.compile(\"(?i)<a([^>]+)>(.+?)</a>\");\n Pattern href = Pattern.compile(\"\\\\s*(?i)href\\\\s*=\\\\s*(\\\\\\\"([^\\\"]+\\\\\\\")|'[^']+'|([^'\\\">\\\\s]+))\");\n String[] validLinkTegs = {\"<li><a href=\\\"/toolbar-creator\\\">Create a Custom Toolbar</a></li>\",\n \"<a href=\\\"http://stlpublicradio.org/programs/slota/archivedetail.php?date='2012-02-29'\\\" title=\\\"\\\" class=\\\"menu_icon menu-17197 \\\" >Грузовые перевозки</a></li>\",\n \"<li><a href='http://www.tipsntracks.com/date/2012/03' title='March 2012'>March 2012</a></li>\"};\n String[] invalidLinkTags = {\"<a href=\\\"\\\"style=\\\"\\\"><img width=\\\"148\\\" height=\\\"32\\\" src=\\\"/images/buttons/btn-www-survey.gif\\\" /></a>\"};\n String[] validLinks = new String[validLinkTegs.length];\n String[] invalidLinks = new String[invalidLinkTags.length];\n for (int i = 0; i < validLinkTegs.length; i++) {\n Matcher matcher = aTeg.matcher(validLinkTegs[i]);\n Assert.assertTrue(matcher.find());\n validLinks[i] = matcher.group(1);\n }\n for (int i = 0; i < invalidLinkTags.length; i++) {\n Matcher matcher = aTeg.matcher(invalidLinkTags[i]);\n Assert.assertTrue(matcher.find());\n invalidLinks[i] = matcher.group(1);\n }\n for (int i = 0; i < validLinkTegs.length; i++) {\n Matcher matcher = href.matcher(validLinks[i]);\n Assert.assertTrue(matcher.find());\n String s = matcher.group(1);\n System.out.println(s.substring(1, s.length() - 1));\n }\n for (int i = 0; i < invalidLinkTags.length; i++) {\n Matcher matcher = href.matcher(invalidLinks[i]);\n Assert.assertFalse(matcher.find());\n }\n }", "public static LinkedHashSet<String> searchLinks(String searchUrl) {\n LinkedHashSet<String> uniqueLinks = new LinkedHashSet();\n Document doc;\n try {\n doc = Jsoup.connect(searchUrl).get();\n Elements links = doc.select(\"a\");\n for(Element url : links){\n if (validUrl(url.attr(\"href\"))) {\n uniqueLinks.add(url.attr(\"href\"));\n }\n }\n } catch (IOException e) {\n }\n return uniqueLinks;\n }", "public static void AddUrls (List<String> links) {\n\t for(String LoopedLinks:links) { \n\t\n\t\t//if page isn't part of domain, ignore\n\t\t if (LoopedLinks.startsWith(variables.domain)) {\n\t\n\t\t\t //if page doesn't have an octothorpe\n\t\t\t if (!LoopedLinks.contains(\"#\")) {\n\t\t\t\t \n\t\t\t\t //if page doesn't ends with one of the file extensions to not use\n\t\t\t\t String extension = getExtension(LoopedLinks);//gets file extension from URL\n\t\t\t\t if(!variables.list.stream().anyMatch(extension::contains)) {\n\n\t\t\t\t\t //if link isn't already part of master list, add it.\n\t\t\t\t\t if(!variables.master.contains(LoopedLinks)) {\n\t\t\t\t\t\t Reporter.log(\"Adding to master list \"+LoopedLinks, variables.verboseReport);\n\t\t\t\t\t\t variables.master.add(LoopedLinks);\n\t\t\t\t\t }\n\t\t\t\t }\n\t\t\t }\n\t\t }\n\t }\n\t}", "public static List<String> extract(Document document) {\n Elements links = document.select(\"a[href]\");\n Elements media = document.select(\"[src]\");\n Elements imports = document.select(\"link[href]\");\n\n List<String> allLinks = new ArrayList<>();\n populateLinks(allLinks, media, \"abs:src\");\n populateLinks(allLinks, imports, \"abs:href\");\n populateLinks(allLinks, links, \"abs:href\");\n return allLinks;\n }", "private void getLinks(Page page, Element content, boolean withConnection) throws JSONException, SQLException {\n\t\tString pageTitle = page.getTitle();\n\t\tString pageId = String.valueOf(page.getPageId());\n\t\tElements links = content.select(\"a[href]\");\n\t\tPageApi pa = new PageApi();\n\t\tfor (Iterator<Element> iterator = links.iterator(); iterator.hasNext();) {\n\t\t\tElement element = iterator.next();\n\t\t\tString link = element.attr(\"href\");\n\t\t\t/**\n\t\t\t * It has to be an internal wikipedia link\n\t\t\t */\n\t\t\tif (link.startsWith(\"/wiki/\")) {\n\t\t\t\t/**\n\t\t\t\t * Ignore unrelevant links\n\t\t\t\t */\n\t\t\t\tif (link.startsWith(\"/wiki/Category:\") || link.startsWith(\"/wiki/Special:\")\n\t\t\t\t\t\t|| link.startsWith(\"/wiki/Wikipedia:\") || link.startsWith(\"/wiki/Help:\")\n\t\t\t\t\t\t|| link.startsWith(\"/wiki/Template:\") || link.startsWith(\"/wiki/Portal:\")\n\t\t\t\t\t\t|| link.startsWith(\"/wiki/Talk:\") || link.startsWith(\"/wiki/\" + pageTitle + \":\")\n\t\t\t\t\t\t|| link.startsWith(\"/wiki/File:\") || link.startsWith(\"/wiki/Template_talk:\")) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tlink = link.replace(\"/wiki/\", \"\");\n\t\t\t\tPage character = pa.getPageInfoForTitle(link);\n\t\t\t\tif (withConnection) {\n\t\t\t\t\tif (tempList.contains(character.getPageId())) {\n\t\t\t\t\t\tpersistConnection(pageId, character);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\telse {\n\t\t\t\t\tpersistCharacter(pageId, character);\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t}", "public abstract String getUrl();", "Set<Link> extractLinks(CrawlDoc doc, ParseState parseState)\n throws IOException;", "public static Set<String> parsePage(Document doc){\n\t\ttry{\n\t\t\tElements links = doc.select(\"a[href]\");\n\t\t\tSet<String> pageLinks = new HashSet<String>();\n\t\t\tfor(Element link : links){\n\t\t\t\tpageLinks.add(link.attr(\"abs:href\"));\n\t\t\t}\n\t\t\treturn pageLinks;\n\t\t}catch(Exception err){\n\t\t\terr.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}", "String getLink();", "public static List<String> getRequestUrl(Document doc,String currenturl){\n\t\tList<String> urls = new ArrayList<String>();\n\t\tElements eles = doc.select(\".clsTRSNavigatorDIV a\");\n\t\tfor(Element e:eles){\n\t\t\tif(NewsUtils.ifNumbers(e.ownText().trim()) && !e.ownText().trim().equals(\"1\")){\n\t\t\t\turls.add(currenturl.substring(0, currenturl.lastIndexOf('.'))\n\t\t\t\t\t\t+\"_\"+(Integer.valueOf(e.ownText().trim())-1)\n\t\t\t\t\t\t+currenturl.substring(currenturl.lastIndexOf('.')));\n\t\t\t}\n\t\t}\n\t\treturn urls;\n\t}", "List<? extends Link> getLinks();", "public static Set<String> parser(String html){\r\n\r\n\t\tSet<String> urls = new HashSet<String>();\r\n\t\tString regex = \"<a.*?/a>\";\r\n\t\tPattern pt = Pattern.compile(regex);\r\n\t\tMatcher matcher = pt.matcher(html);\r\n\t\twhile(matcher.find()){\r\n\t\t\t//获取网址\r\n//\t\t\tSystem.out.println(\"Group:\"+matcher.group());\r\n\t\t\tMatcher myurl = Pattern.compile(\"href=\\\".*?\\\">\").matcher(matcher.group());\r\n\t\t\tif(myurl.find()){\r\n\t\t\t\tdo{\r\n\t\t\t\t\tString temp = myurl.group();\r\n\t\t\t\t\tif(!temp.startsWith(\"javascript\") && !temp.startsWith(\"/\") && ! temp.startsWith(\"#\")){\r\n\t\t\t\t\t\tString url = myurl.group().replaceAll(\"href=\\\"|\\\">\",\"\");\r\n\t\t\t\t\t\tif(url.contains(\"http\")){\r\n\t\t\t\t\t\t\tif(url.contains(\"\\\"\")){\r\n\t\t\t\t\t\t\t\turl = url.substring(0, url.indexOf(\"\\\"\"));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif(!url.contains(\"$\") && !url.contains(\" \")){\r\n\t\t\t\t\t\t\t\turls.add(url);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}while(myurl.find());\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn urls;\r\n\t}", "private void ExtractURLs(String line)\n {\n String matchedURL = \"\";\n Matcher urlMatcher = urlPattern.matcher(line);\n\n while (urlMatcher.find())\n {\n matchedURL = urlMatcher.group();\n\n if (!distinctURLs.containsKey(matchedURL))\n {\n distinctURLs.put(matchedURL,matchedURL);\n }\n }\n }", "@Test\n\tpublic void testGetLinksUpperCaseLink() {\n\t\tList<String> results = helper.getLinks(\"drop tables; <A HREF=\\\"test.com\\\"> junk junk\", null);\n\t\tassertEquals(1, results.size());\n\t\tassertEquals(\"test.com\", results.get(0));\n\t}", "public List<String> linkTexts()\n\t{\n\t\t\n\t\tList<String> links=new ArrayList<String>();\n\t\tlinks.add(linkString);\n\t\tlinks.add(\"Facebook.com\");\n\t\tlinks.add(\"google.com;\");\n\t\tlinks.add(\"gmail.com\");\n\t\tlinks.add(\"shine.com\");\n\t\tlinks.add(\"nukari.com\");\n\t\t\n\t\t// Like the above we have to add number of link text are passed to achieve the DataDriven approach through BBD \n\t\t\t\n\t\treturn links;\n\t\t\n\t}", "public static List<String> getAllLinkLinks(final String page)\n {\n return getAllMatches(page, LINK_PATTERN, 1);\n }", "List<ProductLink> links();", "public static List<String> resolveURLs(final String css) {\n final Matcher matcher = URL.matcher(css);\n final List<String> urls = new ArrayList<String>();\n while (matcher.find()) {\n final String url = matcher.group(1);\n urls.add(url);\n }\n return urls;\n }", "public Uri getUrl() {\n return Uri.parse(urlString);\n }", "public String getUrl();", "public String getUrl();", "public String getUrl();", "public String getUrl();", "public void pullResources(String domainURL){\n URLResource page = new URLResource(\"https://www.dukelearntoprogram.com//course2/data/manylinks.html\");\n \n int startIndex;\n int endIndex;\n // loop through pages\n for (String s : page.lines()){\n \n //System.out.println(s);\n int pose = s.indexOf(domainURL);\n \n // if the url is in the line\n if (-1 != pose) {\n \n startIndex = s.lastIndexOf(\"\\\"\",pose); // find actual start\n endIndex = s.indexOf(\"\\\"\",pose+1); // find end\n \n System.out.println( s.substring(startIndex, endIndex));\n \n \n \n }\n \n \n }\n}", "public SafeHtml linkify() {\n final String part = \"(?:\" +\n \"[a-zA-Z0-9$_+!*'%;:@=?#/~-]\" +\n \"|&(?!lt;|gt;)\" +\n \"|[.,](?!(?:\\\\s|$))\" +\n \")\";\n return replaceAll(\n \"(https?://\" +\n part + \"{2,}\" +\n \"(?:[(]\" + part + \"*\" + \"[)])*\" +\n part + \"*\" +\n \")\",\n \"<a href=\\\"$1\\\" target=\\\"_blank\\\">$1</a>\");\n }", "private List<String> getOfferPagesLinks(Document document) {\n return document.select(\"div[class=product-image loaded] > a[href]\").eachAttr(\"abs:href\");\n }", "public URL standardizeURL(URL startingURL);", "String url();", "public static List<String> getPaths(String url, int limit) {\n List<String> list = new ArrayList<String>();\n if (StringUtils.isEmpty(url) || !isUrlHttp(url)) {\n return list;\n }\n \n String u = url;\n if (u.contains(\"?\")) {\n u = u.split(\"\\\\?\")[0];\n }\n String domain = com.buzzinate.common.util.string.UrlUtil.getDomainName(u);\n String fulldomain = com.buzzinate.common.util.string.UrlUtil.getFullDomainName(u);\n \n // add domain to list\n list.add(domain); \n \n // add subdomain to list\n String subdomain = StringUtils.substringBefore(fulldomain, domain);\n String[] subdomains = StringUtils.split(subdomain, '.');\n String temp = domain;\n for (int index = subdomains.length - 1; index >= 0; index--) {\n temp = subdomains[index] + \".\" + temp;\n list.add(temp);\n }\n \n // add namespace to list\n String namespace = StringUtils.substringAfter(u, fulldomain);\n String[] namespaces = namespace.split(\"/\", limit + 2);\n temp = fulldomain;\n for (int i = 1; i < namespaces.length - 1; i++) {\n //System.out.println(i+\"=\"+namespaces[i]);\n if (!StringUtils.isEmpty(namespaces[i])) {\n temp += \"/\" + namespaces[i];\n list.add(temp);\n }\n }\n return list;\n }", "private final Map<String, String> getUrls(String themeDir, UrlBuilder urlBuilder) {\n // The urls that are accessible to the templates. \n // NB We are not using our menu object mechanism to build menus here, because we want the \n // view to control which links go where, and the link text and title.\n Map<String, String> urls = new HashMap<String, String>();\n \n urls.put(\"home\", urlBuilder.getHomeUrl());\n \n urls.put(\"about\", urlBuilder.getPortalUrl(Route.ABOUT));\n if (ContactMailServlet.getSmtpHostFromProperties() != null) {\n urls.put(\"contact\", urlBuilder.getPortalUrl(Route.CONTACT));\n }\n urls.put(\"search\", urlBuilder.getPortalUrl(Route.SEARCH)); \n urls.put(\"termsOfUse\", urlBuilder.getPortalUrl(Route.TERMS_OF_USE)); \n urls.put(\"login\", urlBuilder.getPortalUrl(Route.LOGIN)); \n urls.put(\"logout\", urlBuilder.getLogoutUrl()); \n urls.put(\"siteAdmin\", urlBuilder.getPortalUrl(Route.LOGIN)); \n \n urls.put(\"siteIcons\", urlBuilder.getPortalUrl(themeDir + \"/site_icons\"));\n return urls;\n }", "public static String HTMLLinkString(String url) throws Exception\n\t{\n\t\tURL[] links = HTMLLinks(url);\n\t\tString urls = \"\";\n\t\tfor (URL link : links)\n\t\t{\n\t\t\turls = urls + link.toString() + \" \";\n\t\t}\n\t\treturn urls.trim();\n\t}", "private static String getURL(String link) {\n\t\treturn \"https://en.wikipedia.org/wiki/\" + link;\n\t}", "@Override\n protected List<String> convertDoisToUrls(Collection<String> dois) {\n List<String> urls = new ArrayList<String>();\n for(String doi:dois) {\n // Encode the doi, then revert the FIRST %2F (slash) back to a \"/\":\n // 10.1023/A%3A1026541510549, not\n // 10.1023%2FA%3A1026541510549\n String url = String.format(\"%sarticle/%s\", baseUrl, encodeDoi(doi).replaceFirst(\"%2F\",\"/\"));\n urls.add(url);\n }\n return urls;\n }", "public void getURL(String url, String target)\n throws IOException {\n if (url.startsWith(JSSTRING)) {\n linkCount += ExtractorJS.considerStrings(uriErrors, curi, url, \n false);\n } else {\n int max = uriErrors.getMaxOutlinks(curi);\n Link.addRelativeToVia(curi, max, url, LinkContext.EMBED_MISC,\n Hop.EMBED);\n linkCount++;\n }\n }", "@Override\n\tpublic Collection<URL> getUrlsToFilter() {\n\t\tSet<URL> filterSet = new HashSet<URL>();\n\t\tString url=\"http://www.infoq.com/news/2012/11/Panel-WinRT-Answers;jsessionid=91AB81A159E85692E6F1199644E2053C \";\n\t\tfilterSet.add(URL.valueOf(url));\n\t\treturn filterSet;\n\t}", "public Set<String> getLinks() {\n return links;\n }", "public String getUrl(){\n return urlsText;\n }", "public List<String> getUrlsToCheck(CachedUrl cu) {\n List<String> res = new ArrayList<String>(3);\n Properties props;\n switch (detectNoSubstanceRedirectUrl) {\n case First:\n return ListUtil.list(cu.getUrl());\n case Last:\n props = cu.getProperties();\n String url = props.getProperty(CachedUrl.PROPERTY_CONTENT_URL);\n if (url == null) {\n\turl = cu.getUrl();\n }\n return ListUtil.list(url);\n case All:\n return AuUtil.getRedirectChain(cu);\n }\n return res;\n }", "private String getUrlHost(String url) {\n // httpx://host/.....\n\n int hostStart = url.indexOf(\"//\");\n if (hostStart == -1) {\n return \"\";\n }\n int hostEnd = url.indexOf(\"/\", hostStart + 2);\n if (hostEnd == -1) {\n return url.substring(hostStart + 2);\n } else {\n return url.substring(hostStart + 2, hostEnd);\n }\n\n }", "public List<TparselinksEntity> getAllLinks();", "public String getURL();", "private static String handleUrl(String s) {\n if (s.endsWith(\"/..\")) {\n int idx = s.lastIndexOf('/');\n s = s.substring(0, idx - 1);\n idx = s.lastIndexOf('/');\n String gs = s.substring(0, idx);\n if (!gs.equals(\"smb:/\")) {\n s = gs;\n }\n }\n if (!s.endsWith(\"/\")) {\n s += \"/\";\n }\n System.out.println(\"now its \" + s);\n return s;\n }", "private ArrayList<ResultPair> InitializeManualUrls()\n {\n\t ArrayList<ResultPair> fileUrls = new ArrayList<ResultPair>();\n\t fileUrls.add(new ResultPair(\"https://www.google.com\", true));\n\t fileUrls.add(new ResultPair(\"https://///www.google.com\", false));\n\t fileUrls.add(new ResultPair(\"\", false));\n\t fileUrls.add(new ResultPair(\"http://74.125.224.72/\", true));\n\t fileUrls.add(new ResultPair(\"file:///C:/\", true));\n\t fileUrls.add(new ResultPair(\"http://WWW.GOOGLE.COM\", true));\n\t fileUrls.add(new ResultPair(\"http://www.google.com:80/test1\", true));\n\t fileUrls.add(new ResultPair(\"h3t://go.cc:65a/$23?action=edit&mode=up\", false));\n\t fileUrls.add(new ResultPair(\"12345\", false));\n\t fileUrls.add(new ResultPair(\"http://www.space in here.com\", false));\n\t fileUrls.add(new ResultPair(\"http://site.com/#citation\", true));\n\t fileUrls.add(new ResultPair(\"ftp://site.com\", true));\n\t fileUrls.add(new ResultPair(\"http://site.com/hyphen-here\", true));\n\t fileUrls.add(new ResultPair(\"http://www.example.com:8080\", true));\n\t fileUrls.add(new ResultPair(\"foo://example.com:80/over/there?name=ferret#nose\", true));\n\t fileUrls.add(new ResultPair(\"foo://example.com:80/over/there#nose\", true));\n\t fileUrls.add(new ResultPair(\"foo://example.com/there?name=ferret\", true));\n\t fileUrls.add(new ResultPair(\"foo://example.com:8042/over/there?name=ferret#nose\", true));\n\t fileUrls.add(new ResultPair(\"http://[email protected]\", true));\n\t fileUrls.add(new ResultPair(\"http://142.10.5.2:8080/\", true));\n\t return fileUrls;\n }", "final String parseForLink(String upperCaseInput,String input)\r\n {\r\n int i,j,k,l;\r\n\tString temp=null;\r\n\tString link=null;\r\n\r\n\t// Look for links to other pages. Eg:- Normal links <A>..</A>\r\n i=upperCaseInput.indexOf(\"HREF\");\r\n\tif(i!=-1)\r\n\t{\r\n\t // Locate position of the quote marks.\r\n\t j=upperCaseInput.indexOf(\"\\\"\",i);\r\n\t k=upperCaseInput.indexOf(\"\\\"\",j+1);\r\n\t // Locate position of </a>\r\n\t l=upperCaseInput.indexOf(\"</A>\",i);\r\n\t // If double quotes were not found then try using single quote marks.\r\n\t if(j==-1 || k==-1 || (j>1 && k==-1))\r\n\t {\r\n\t j=upperCaseInput.indexOf(\"\\'\",i);\r\n\t\tk=upperCaseInput.indexOf(\"\\'\",j+1);\r\n\t }\r\n\t // Remove leading trailing spaces.\r\n if(j!=-1 && k!=-1)\r\n\t {\r\n\t temp=input.substring(j+1,k); // Extrct the link name.\r\n\t\tlink=temp.trim(); // Remove leading and trailing spaces.\r\n\t\treturn(link);\r\n\t }\r\n\t}\r\n\t// 2. Frames,\r\n\ti=upperCaseInput.indexOf(\"FRAME\");\r\n\tif(i!=-1)\r\n\t{\r\n\t l=upperCaseInput.indexOf(\"SRC\",i); // Locate position of source tag.\r\n\t if(l!=-1)\r\n\t {\r\n\t // Locate position of quote marks.\r\n\t\tj=upperCaseInput.indexOf(\"\\\"\",l);\r\n\t\tk=upperCaseInput.indexOf(\"\\\"\",j+1);\r\n\t\t// If double quotes were not found then try single quote marks\r\n\t\tif(j==-1)\r\n\t\t{\r\n\t\t j=upperCaseInput.indexOf(\"\\\"\",i);\r\n\t\t k=upperCaseInput.indexOf(\"\\\"\",j+1);\r\n\t\t}\r\n\t\t// Remove leading and trailing spaces.\r\n\t\tif(j!=-1 && k!=-1)\r\n\t\t{\r\n\t\t temp=input.substring(j+1,k); // Extract the link name\r\n\t\t link=temp.trim();\r\n\t\t return(link);\r\n\t\t}\r\n\t }\r\n\t}\r\n\treturn(null);\r\n }", "public Stream<ParsedURL> urls() {\n return stream().map(req -> new ParsedURL(req.getUrl()));\n }", "public abstract String getURL();", "@Test\n\tpublic void testGetLinksOtherProperties() {\n\t\tList<String> results = helper.getLinks(\"drop tables; <A target=\\\"self\\\" href=\\\"test.com\\\"> junk junk\",\n\t\t\t\t\"http://www.bobbylough.com\");\n\t\tassertEquals(1, results.size());\n\t\tassertEquals(\"test.com\", results.get(0));\n\t}", "public static String getValidUrl(String url){\n String result = null;\n if(url.startsWith(\"http://\")){\n result = url;\n }\n else if(url.startsWith(\"/\")){\n result = \"http://www.chenshiyu.com\" + url;\n }\n return result;\n }", "public Set<URL> getTargetPageURLs(){\n\t\tSet<URL> urls = new HashSet<URL>();\n\t\tString url = \"http://www.infoq.com/news/2012/12/twemproxy;jsessionid=1652D82C3359CBAB67DA00B26BE7784B\";\n\t\turls.add(URL.valueOf(url));\n\t\treturn urls;\n\t}", "public Object[] chechEarlyLink(String url) {\n\t\tString mostRecentHTML = \"\";\n\t\tboolean success;\n\t\tprocessor.printSys(\"Original URL of Early Link: \" + url);\n\t\ttry {\n\t\t\tHttpURLConnection con = settings.isUsingProxy() ? (HttpURLConnection)(new URL(url).openConnection(proxyBuilder.getProxy())) : (HttpURLConnection)(new URL(url).openConnection());\n\t\t\tcon.setUseCaches(false);\n\t\t\tcon.setConnectTimeout(8000);\n\t\t\tcon.setInstanceFollowRedirects(false);\n\t\t\tcon.connect();\n\t\t\tString location = con.getHeaderField(\"Location\");\n\t\t\tprocessor.printSys(\"Response Code: \" + con.getResponseCode() + \", Early Link Redirected to: \" + location);\n\t\t\tmostRecentHTML = connectionToString(con);\n\t\t\tsuccess = location == null; //if the redirect location was null, this worked\n\t\t} catch (MalformedURLException e) {\n\t\t\tsuccess = false;\n\t\t} catch (IOException e) {\n\t\t\tsuccess = false;\n\t\t}\n\n\t\treturn new Object[]{success, mostRecentHTML};\n\t}", "public URI[] getLinks(String expression, Map<String, String> namespaces) {\n String[] values = getValues(expression, namespaces);\n if (values == null) {\n return null;\n }\n URI[] uris = new URI[values.length];\n for (int i = 0; i < values.length; i++) {\n uris[i] = URI.create(values[i]);\n }\n return uris;\n }", "public List<URL> newURLs() {\r\n // TODO: Implement this!\r\n return new LinkedList<URL>();\r\n }", "public Set<String> getLinks() throws SearchResultException;", "Collection<? extends Object> getHadithUrl();", "public String getLink();", "private void processUrls(){\n // Strip quoted tweet URL\n if(quotedTweetId > 0){\n if(entities.urls.size() > 0 &&\n entities.urls.get(entities.urls.size() - 1)\n .expandedUrl.endsWith(\"/status/\" + String.valueOf(quotedTweetId))){\n // Match! Remove that bastard.\n entities.urls.remove(entities.urls.size() - 1);\n }\n }\n\n // Replace minified URLs\n for(Entities.UrlEntity entity : entities.urls){\n // Find the starting index for this URL\n entity.indexStart = text.indexOf(entity.minifiedUrl);\n // Replace text\n text = text.replace(entity.minifiedUrl, entity.displayUrl);\n // Find the last index for this URL\n entity.indexEnd = entity.indexStart + entity.displayUrl.length();\n }\n }", "public static String HTMLLinkString(String url, String filter) throws Exception\n\t{\n\t\tURL[] links = HTMLLinks(url);\n\t\tString urls = \"\";\n\t\tfor (URL link : links)\n\t\t{\n\t\t\tString slink = link.toString();\n\t\t\tif (slink.contains(filter))\n\t\t\t{\n\t\t\t\turls = urls + slink + \" \";\n\t\t\t}\n\t\t}\n\t\treturn urls.trim();\n\t}", "public StringBuilder getLinks(Elements imgs) {\n\t\tStringBuilder links = new StringBuilder();\n\t\tString prefix = \"\";\n\t\tfor (Element item : imgs) {\n\t\t\tlinks.append(prefix);\n\t\t\tprefix = \"|\";\n\t\t\tlinks.append(item.attr(\"href\"));\n }\n\t\treturn links;\n\t}", "public HashSet<String> findTheUrlsBasicCrawler( URL url, Integer depth ) {\n\t\tcrawlerBasic.getLinks().clear();\n\t\t\n\t\tcrawlerBasic.setDesiredDepth(depth);\n\t\t\n\t\t//Use the methods to crawl through the site searching for links\n\t\tcrawlerBasic.getPageLinks(url.toString(), 1);\n\t\t\n\t\treturn crawlerBasic.getLinks();\n\t\t\n\t}", "public List<URL> getURLList(final String key) {\n return getURLList(key, new ArrayList<>());\n }", "public ArrayList<String> soupThatSite(String url) throws IOException {\n\n ArrayList<String> parsedDoc = new ArrayList<>();\n Document doc = Jsoup.connect(url).get();\n\n if (url.contains(\"cnn.com\")) {\n\n doc.select(\"h1\").stream().filter(Element::hasText).forEach(element1 -> {\n String str = element1.text();\n String clean = Jsoup.clean(str, Whitelist.basic());\n parsedDoc.add(clean);\n });\n\n doc.select(\".zn-body__paragraph\").stream().filter(Element::hasText).forEach(element1 -> {\n String str = element1.text();\n String clean = Jsoup.clean(str, Whitelist.basic());\n parsedDoc.add(clean);\n });\n\n } else {\n\n doc.select(\"h1\").stream().filter(Element::hasText).forEach(element1 -> {\n String str = element1.text();\n String clean = Jsoup.clean(str, Whitelist.basic());\n parsedDoc.add(clean);\n });\n\n doc.select(\"p\").stream().filter(Element::hasText).forEach(element -> {\n String str = element.text();\n String clean = Jsoup.clean(str, Whitelist.basic());\n parsedDoc.add(clean);\n });\n }\n\n return parsedDoc;\n }", "protected static ArrayList<UrlResource> parseUrlArray(JSONArray jsonArray) throws JSONException, MalformedURLException {\n ArrayList<UrlResource> ret = new ArrayList<>();\n String url;\n String description;\n for (int i = 0; i < jsonArray.length(); i++) {\n JSONObject obj = jsonArray.getJSONObject(i);\n url=obj.getString(\"url\");\n description = obj.getString(\"descricao\");\n if(!YoutubeUrlResource.isValidYoutubeLink(url)){\n ret.add(new UrlResource(new URL(url), description));\n }else{\n try {\n ret.add(new YoutubeUrlResource(new URL(url), description));\n } catch (Exception e) {\n e.printStackTrace();\n ret.add(new UrlResource(new URL(url), description));\n }\n }\n\n }\n return ret;\n }", "public ArrayList<String> search(String url) {\n Pattern msnPattern = Pattern.compile(\".*msn.com.*\");\n Pattern foolPattern = Pattern.compile(\".*fool.com.*\");\n Matcher foolMatcher = foolPattern.matcher(url);\n Matcher msnMatcher = msnPattern.matcher(url);\n\n ArrayList<String> stockArticles = new ArrayList<String>();\n if (foolMatcher.matches()) {\n Connection connection = Jsoup.connect(\"https://www.fool.com/market-movers/\");\n try {\n Document htmlDocument = connection.get();\n Elements linksOnPage = htmlDocument.select(\"h4\");\n for (Element link : linksOnPage) {\n stockArticles.add(link.text());\n }\n }\n catch (IOException e) {\n System.out.println(e);\n }\n } else if (msnMatcher.matches()) {\n Connection connection2 = Jsoup.connect(\"http://www.msn.com/en-us/money/investing\");\n try {\n Document htmlDocument2 = connection2.get();\n Elements linksOnPage2 = htmlDocument2.select(\"h3\");\n for (Element link : linksOnPage2) {\n stockArticles.add(link.text());\n }\n }\n catch (IOException e) {\n System.out.println(e);\n }\n } else {\n Connection connection3 = Jsoup.connect(\"https://www.nytimes.com/topic/organization/new-york-stock-exchange\");\n try {\n Document htmlDocument3 = connection3.get();\n Elements linksOnPage3 = htmlDocument3.select(\"h2\");\n for (Element link : linksOnPage3) {\n stockArticles.add(link.text());\n }\n }\n catch (IOException e) {\n System.out.println(e);\n }\n }\n return stockArticles;\n }", "String getUrlPattern();", "public URL makeFullUrl(String scrapedString, URL base);", "public Link(String url) {\n try {\n uri = new URL(fix(url)).toURI();\n } catch (Exception e) {\n uri = URI.create(\"\");\n }\n }" ]
[ "0.68862736", "0.6884086", "0.6795296", "0.6582272", "0.657377", "0.657377", "0.657377", "0.657377", "0.657377", "0.657377", "0.6544935", "0.65159094", "0.6483376", "0.63816583", "0.6342519", "0.634132", "0.634132", "0.634132", "0.634132", "0.634132", "0.6300335", "0.627453", "0.6263495", "0.6221822", "0.62069374", "0.61814773", "0.61589783", "0.61514056", "0.61495805", "0.61319125", "0.6129255", "0.61237764", "0.6101556", "0.60942155", "0.6058112", "0.6037418", "0.6008597", "0.60075116", "0.6003745", "0.5962372", "0.59468585", "0.5940305", "0.5939492", "0.59340775", "0.5928104", "0.5921839", "0.59160596", "0.59105355", "0.59010386", "0.58960015", "0.5886964", "0.58810633", "0.58746696", "0.5870994", "0.5870994", "0.5870994", "0.5870994", "0.58530045", "0.58459914", "0.5843331", "0.5841334", "0.5836672", "0.58362037", "0.5827657", "0.58223224", "0.5813814", "0.57814884", "0.57283074", "0.5723187", "0.5715603", "0.57147795", "0.56825095", "0.5671875", "0.56715184", "0.565438", "0.56520647", "0.56497353", "0.56289864", "0.56282115", "0.5613219", "0.5612242", "0.5602347", "0.55959344", "0.5595435", "0.55946016", "0.5592927", "0.55857915", "0.5578083", "0.55756295", "0.55642796", "0.55637896", "0.5540912", "0.55382884", "0.5524503", "0.5512313", "0.55111", "0.5510038", "0.55065817", "0.54923224", "0.54865193" ]
0.6968823
0
Return strings from a url
public static String HTMLText(String url) throws Exception { if (!isValidUrl(url)) { return ""; } String outs = ""; StringBean sb = new StringBean(); sb.setLinks(false); sb.setReplaceNonBreakingSpaces(true); sb.setCollapse(false); sb.setURL(url); try { outs = sb.getStrings(); } catch (Exception e) { logger.error(e.getMessage(), e); } return outs; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String getUrlContents(String theUrl) {\n StringBuilder content = new StringBuilder();\n try {\n URL url = new URL(theUrl);\n URLConnection urlConnection = url.openConnection();\n //reads the response\n BufferedReader br = new BufferedReader(new InputStreamReader(urlConnection.getInputStream()), 8);\n String line;\n while ((line = br.readLine()) != null) {\n content.append(line + \"\\n\");\n }\n br.close();\n }catch (Exception e) {\n //error occured, usually network related\n e.printStackTrace();\n }\n return content.toString();\n }", "private String getContentStringFromURL(URL url) {\n\n HttpURLConnection con = null;\n //Versuch der Verbindung\n try {\n con = (HttpURLConnection) url.openConnection();\n\n\n // Optional\n con.setRequestMethod(\"GET\");\n\n // HTTP-Status-Code\n int responseCode = con.getResponseCode();\n //System.out.println(\"\\nSending 'GET' request to URL : \" + url);\n //System.out.println(\"Response Code : \" + responseCode);\n\n BufferedReader in = new BufferedReader(\n new InputStreamReader(con.getInputStream()));\n String inputLine;\n StringBuffer response = new StringBuffer();\n\n //Einlesen der Antwort\n while ((inputLine = in.readLine()) != null) {\n response.append(inputLine);\n }\n in.close();\n\n //Antwort wird in einen String gewandelt und zurück geliefert\n return response.toString();\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n }\n }", "public String getURL(String url) {\n\t\tString resultado =\"\";\n\t\tHttpClient c = new DefaultHttpClient();\n\t\tHttpGet get = new HttpGet(url);\n\t\tHttpResponse response = null;\n\t\ttry {\n\t\t\tresponse = c.execute(get);\n\t\t} catch (ClientProtocolException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\ttry {\n\t\t\tresultado = EntityUtils.toString(response.getEntity());\n\t\t} catch (ParseException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn resultado;\n\t}", "static String getResponseFromHttpUrl(URL url) throws IOException {\n HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();\n try {\n InputStream in = urlConnection.getInputStream();\n\n Scanner scanner = new Scanner(in);\n scanner.useDelimiter(\"\\\\A\");\n\n boolean hasInput = scanner.hasNext();\n String response = null;\n if (hasInput) {\n response = scanner.next();\n }\n scanner.close();\n return response;\n } finally {\n urlConnection.disconnect();\n }\n }", "public static String getUrlContents(URL url) throws IOException {\n\t\tURLConnection cnx = url.openConnection();\n\t\tScanner s = new Scanner(cnx.getInputStream());\n\t\tString ret = s.useDelimiter(\"\\\\A\").next();\n\t\ts.close();\n\t\treturn ret;\n\t}", "String getUrl();", "String getUrl();", "String getUrl();", "String getUrl();", "String getUrl();", "public String getResponseFromUrl(String url) {\r\n\t\tString res = \"\";\r\n\t\tBufferedReader in = null;\r\n\t\ttry {\r\n\t\t\tHttpClient client = new DefaultHttpClient();\r\n\t\t\tHttpGet request = new HttpGet();\r\n\t\t\trequest.setURI(new URI(url));\r\n\t\t\tHttpResponse response = client.execute(request);\r\n\t\t\tin = new BufferedReader(new InputStreamReader(response.getEntity()\r\n\t\t\t\t\t.getContent()));\r\n\t\t\tStringBuffer sb = new StringBuffer(\"\");\r\n\t\t\tString line = \"\";\r\n\t\t\tString NL = System.getProperty(\"line.separator\");\r\n\t\t\twhile ((line = in.readLine()) != null) {\r\n\t\t\t\tsb.append(line + NL);\r\n\t\t\t}\r\n\t\t\tin.close();\r\n\t\t\tres = sb.toString();\r\n\t\t\t//System.out.println(res);\r\n\t\t\t\r\n\t\t\treturn res;\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\tif (in != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tin.close();\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn res;\r\n\t}", "public static String getStringFromURL(URL url) {\r\n try {\r\n if (url == null) {\r\n return null;\r\n }\r\n\r\n URLConnection conn = url.openConnection();\r\n //System.out.println(\"URL conn is \"+conn);\r\n conn.connect();\r\n\r\n if (conn instanceof HttpURLConnection) {\r\n int status = ((HttpURLConnection) conn).getResponseCode();\r\n if (status != HttpURLConnection.HTTP_OK) {\r\n return null;\r\n }\r\n } // endif instanceof HttpURLConn\r\n\r\n int available = conn.getContentLength();\r\n InputStream is = conn.getInputStream();\r\n byte buffer[] = new byte[available];\r\n int pos = 0;\r\n while (available > 0) {\r\n int amount = is.read(buffer, pos, available);\r\n available -= amount;\r\n pos += amount;\r\n } // endif\r\n is.close();\r\n\r\n String tmp = new String(buffer);\r\n //System.out.println(\"\\nfrom URL:\"+url+\":\\n\"+tmp);\r\n return tmp;\r\n } catch (Exception ex) {\r\n System.out.println(ex);\r\n // ex.printStackTrace();\r\n return \"\";\r\n } // endtry\r\n }", "public String requestContent(String urlStr) {\n String result = null;\n HttpURLConnection urlConnection;\n try {\n URL url = new URL(urlStr);\n urlConnection = (HttpURLConnection) url.openConnection();\n } catch (Exception e) {\n e.printStackTrace();\n return null;\n }\n try {\n InputStream in = new BufferedInputStream(urlConnection.getInputStream());\n result = convertStreamToString(in);\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n urlConnection.disconnect();\n }\n return result;\n }", "private ArrayList<String> getHttpResponseString(String urlStr) {\n\t\ttry {\n\n\t\t\tURL url = new URL(urlStr);\n\t\t\tHttpURLConnection conn = (HttpURLConnection) url.openConnection();\n\t\t\tconn.setRequestMethod(\"GET\");\n\n\t\t\tconn.setRequestProperty(\"Accept\", \"application/json\");\n\t\t\t\n\t\t\tif (conn.getResponseCode() != 200) {\n\t\t\t\tSystem.out.println(\"Connection Failed with \" + urlStr + \" with HTTP error code: \" + conn.getResponseCode());\n\t\t\t\tif (conn.getResponseCode() == 401) {\n\t\t\t\t}\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader((conn.getInputStream())));\n\n\t\t\tArrayList<String> output = \"\";// br.readLine();\n\t\t\tString line = \"\";\n\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t\toutput += line;\n\t\t\t}\n\n\t\t\tconn.disconnect();\n\t\t\treturn output;\n\t\t} catch (Exception e) {\n\t\t\treturn null;\n\t\t}\n\t}", "String url();", "private static String readUrl(String urlString) throws Exception {\r\n\t BufferedReader reader = null;\r\n\t try {\r\n\t URL url = new URL(urlString);\r\n\t reader = new BufferedReader(new InputStreamReader(url.openStream()));\r\n\t StringBuffer buffer = new StringBuffer();\r\n\t int read;\r\n\t char[] chars = new char[1024];\r\n\t while ((read = reader.read(chars)) != -1)\r\n\t buffer.append(chars, 0, read); \r\n\r\n\t return buffer.toString();\r\n\t } finally {\r\n\t if (reader != null)\r\n\t reader.close();\r\n\t }\r\n\t}", "private static String getURL(String url) {\r\n\t\t//fixup the url\r\n\t\tURL address;\r\n\t\ttry {\r\n\t\t\taddress = new URL(url);\r\n\t\t}\r\n\t\tcatch (MalformedURLException e) {\r\n\t\t\tSystem.out.println(\"====>\" + e.getMessage());\r\n\t\t\treturn new String();\r\n\t\t}\r\n\t\t\r\n\t\t//make the hookup\r\n\t\tHttpURLConnection con;\r\n\t\ttry {\r\n\t\t\tcon = (HttpURLConnection) address.openConnection();\r\n\t\t}\r\n\t\tcatch(IOException e) {\r\n\t\t\tSystem.out.println(\"====>\" + e.getMessage());\r\n\t\t\treturn new String();\r\n\t\t}\r\n\r\n\t\t// optional default is GET\r\n\t\ttry {\r\n\t\t\tcon.setRequestMethod(\"GET\");\r\n\t\t}\r\n\t\tcatch (ProtocolException e) {\r\n\t\t\tSystem.out.println(\"====>\" + e.getMessage());\r\n\t\t\treturn new String();\r\n\t\t}\r\n\r\n\t\t//this executes the get? - maybe check with wireshark if ever important\r\n//\t\tint responseCode = 0; \r\n//\t\ttry {\r\n//\t\t\tresponseCode = con.getResponseCode();\r\n//\t\t}\r\n//\t\tcatch(IOException e) {\r\n//\t\t\tSystem.out.println(\"====>\" + e.getMessage());\r\n//\t\t\treturn new String();\r\n//\t\t}\r\n\t\t\r\n\t\t//TODO handle bad response codes\r\n\r\n\t\t//read the response\r\n\t\tStringBuffer response = new StringBuffer();\r\n\t\ttry {\r\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));\r\n\t\t\tString inputLine = new String();\r\n\t\r\n\t\t\t//grab each line from the response\r\n\t\t\twhile ((inputLine = in.readLine()) != null) {\r\n\t\t\t\tresponse.append(inputLine);\r\n\t\t\t}\r\n\t\t\t//fix dangling\r\n\t\t\tin.close();\r\n\t\t}\r\n\t\tcatch(IOException e) {\r\n\t\t\tSystem.out.println(\"====>\" + e.getMessage());\r\n\t\t\treturn new String();\r\n\t\t}\r\n\t\t\r\n\t\t//convert to a string\r\n\t\treturn response.toString();\r\n\t}", "public static String readUrlToString(String url){\n \tString out = \"\";\n \tBufferedReader in = null;\n \t\n \ttry { \n URL theUrl = new URL(url); \n in = new BufferedReader(new InputStreamReader(theUrl.openStream())); \n String inputLine; \n \n while ((inputLine = in.readLine()) != null) { \n out = out + inputLine; \n }\n } catch (Exception e) { \n e.printStackTrace();\n \n }finally{\n \ttry {\n\t\t\t\tin.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n }\n return out;\n\t}", "private static String getHTTPResponse(URL url){\n\t\t\n\t\tStringBuilder response = new StringBuilder();\n\t\t\n\t\ttry{\n\t\t\tURLConnection connection = url.openConnection();\n\t\t\tBufferedReader res = new BufferedReader(new InputStreamReader(connection.getInputStream()));\n\t\t\tString responseLine;\n\t\t\t\n\t\t\twhile((responseLine = res.readLine()) != null)\n\t\t\t\tresponse.append(responseLine);\n\t\t\t\n\t\t\t\n\t\t}catch(Exception e){System.out.println(\"Error - wrong input or service down\");}\n\t\t\n\t\treturn response.toString();\n\t}", "@Override\n protected String doInBackground(String... strings) {\n StringBuilder content = new StringBuilder();\n try {\n URL url = new URL(strings[0]);\n InputStreamReader inputStream = new InputStreamReader(url.openConnection().getInputStream());\n BufferedReader bufferedReader = new BufferedReader(inputStream);\n String line = \"\" ;\n while ((line = bufferedReader.readLine()) != null) {\n content.append(line);\n }\n bufferedReader.close();\n } catch (MalformedURLException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return content.toString();\n }", "private String getContent(String url) throws BoilerpipeProcessingException, IOException {\n int code;\n HttpURLConnection connection = null;\n URL uri;\n do{\n uri = new URL(url);\n if(connection != null)\n connection.disconnect();\n connection = (HttpURLConnection)uri.openConnection();\n connection.setRequestMethod(\"GET\");\n connection.setConnectTimeout(5000);\n connection.setReadTimeout(5000);\n connection.connect();\n code = connection.getResponseCode();\n if(code == 301)\n url = connection.getHeaderField( \"Location\" );\n }while (code == 301);\n\n System.out.println(url + \" :: \" + code);\n String content = null;\n if(code < 400) {\n content = ArticleExtractor.INSTANCE.getText(uri);\n }\n connection.disconnect();\n return content;\n }", "java.lang.String getUrl();", "java.lang.String getUrl();", "java.lang.String getUrl();", "java.lang.String getUrl();", "java.lang.String getUrl();", "java.lang.String getUrl();", "public static String getResponseFromHttpUrl(URL url) throws IOException {\n HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();\n try {\n InputStream in = urlConnection.getInputStream();\n\n Scanner scanner = new Scanner(in);\n scanner.useDelimiter(\"\\\\A\");\n\n boolean hasInput = scanner.hasNext();\n if (hasInput) {\n return scanner.next();\n } else {\n return null;\n }\n } finally {\n urlConnection.disconnect();\n }\n }", "private static List<String> getWord(String urlname) {\n\t\tList<String> returnWord = new ArrayList<String>();\n\t\tBufferedReader reader;\n\t\ttry {\n\t\t\tURL url = new URL(urlname);\n\t\t\tInputStream in = url.openStream();\n\t\t\treader = new BufferedReader(new InputStreamReader(in));\n\t\t\twhile (true) {\n\t\t\t\tString word = reader.readLine();\n\t\t\t\tif (word == null)\n\t\t\t\t\tbreak;\n\t\t\t\treturnWord.add(word);\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(e.getMessage());\n\t\t}\n\t\treturn returnWord;\n\t}", "public static String urlToString(final String url) {\n Scanner urlScanner;\n try {\n urlScanner = new Scanner(new URL(url).openStream(), \"UTF-8\");\n } catch (IOException e) {\n return \"\";\n }\n String contents = urlScanner.useDelimiter(\"\\\\A\").next();\n urlScanner.close();\n return contents;\n }", "public String receive(String URL)\n {\n try\n {\n HttpGet httpGet = new HttpGet(URL);\n return EntityUtils.toString(HttpClients.createDefault().execute(httpGet).getEntity());\n }catch(IOException e) \n {\n System.out.println(\"Error requesting string from \" + URL);\n }\n return \"\";\n }", "private static String getList(String responseString) throws JSONException {\n\t\tJSONObject array = new JSONObject(responseString);\n\t\treturn array.getString(\"url\");\n\t}", "public static String getResponseFromHttpUrl(URL url) throws IOException {\n HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();\n try {\n InputStream in = urlConnection.getInputStream();\n\n Scanner scanner = new Scanner(in);\n scanner.useDelimiter(\"\\\\A\");\n\n boolean hasInput = scanner.hasNext();\n if (hasInput) {\n return scanner.next();\n } else {\n return null;\n }\n } finally {\n urlConnection.disconnect();\n }\n }", "public static String getResponseFromHttpUrl(URL url) throws IOException {\n HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();\n try {\n InputStream in = urlConnection.getInputStream();\n\n Scanner scanner = new Scanner(in);\n scanner.useDelimiter(\"\\\\A\");\n\n boolean hasInput = scanner.hasNext();\n if (hasInput) {\n return scanner.next();\n } else {\n return null;\n }\n } finally {\n urlConnection.disconnect();\n }\n }", "public static String getResponseFromHttpUrl(URL url) throws IOException {\n HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();\n try {\n InputStream in = urlConnection.getInputStream();\n\n Scanner scanner = new Scanner(in);\n scanner.useDelimiter(\"\\\\A\");\n\n boolean hasInput = scanner.hasNext();\n if (hasInput) {\n return scanner.next();\n } else {\n return null;\n }\n } finally {\n urlConnection.disconnect();\n }\n }", "public static String getResponseFromHttpUrl(URL url) throws IOException {\n HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();\n try {\n InputStream in = urlConnection.getInputStream();\n\n Scanner scanner = new Scanner(in);\n scanner.useDelimiter(\"\\\\A\");\n\n boolean hasInput = scanner.hasNext();\n if (hasInput) {\n return scanner.next();\n } else {\n return null;\n }\n } finally {\n urlConnection.disconnect();\n }\n }", "public static String getResponseFromHttpUrl(URL url) throws IOException {\n HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();\n try {\n InputStream in = urlConnection.getInputStream();\n\n Scanner scanner = new Scanner(in);\n scanner.useDelimiter(\"\\\\A\");\n\n boolean hasInput = scanner.hasNext();\n if (hasInput) {\n return scanner.next();\n } else {\n return null;\n }\n } finally {\n urlConnection.disconnect();\n }\n }", "public static String getResponseFromURL(String urlString, String method) {\n StringBuilder inline = new StringBuilder();\n try {\n URL url = new URL(urlString);\n HttpURLConnection conn = (HttpURLConnection) url.openConnection();\n conn.setRequestMethod(method);\n conn.connect();\n int responseCode = conn.getResponseCode();\n\n if (responseCode != 200) {\n throw new RuntimeException(\"ResponseCode :\" + responseCode);\n } else {\n Scanner sc = new Scanner(url.openStream());\n while (sc.hasNext()) {\n inline.append(sc.nextLine());\n }\n sc.close();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n return inline.toString();\n }", "private String readContents(final URL url) throws IOException {\n \t\tfinal BufferedReader in =\n \t\t\tnew BufferedReader(new InputStreamReader(url.openStream()));\n \t\tfinal StringBuilder sb = new StringBuilder();\n \t\twhile (true) {\n \t\t\tfinal String line = in.readLine();\n \t\t\tif (line == null) break; // eof\n \t\t\tsb.append(line);\n \t\t}\n \t\tin.close();\n \t\treturn sb.toString();\n \t}", "public void pullResources(String domainURL){\n URLResource page = new URLResource(\"https://www.dukelearntoprogram.com//course2/data/manylinks.html\");\n \n int startIndex;\n int endIndex;\n // loop through pages\n for (String s : page.lines()){\n \n //System.out.println(s);\n int pose = s.indexOf(domainURL);\n \n // if the url is in the line\n if (-1 != pose) {\n \n startIndex = s.lastIndexOf(\"\\\"\",pose); // find actual start\n endIndex = s.indexOf(\"\\\"\",pose+1); // find end\n \n System.out.println( s.substring(startIndex, endIndex));\n \n \n \n }\n \n \n }\n}", "public static String GET(String urlString) {\n\t\ttry {\n\t\t\tURL url = new URL(urlString);\n\t\t\tHttpURLConnection conn = (HttpURLConnection) url.openConnection();\n\t\t\tconn.connect();\n\t\t\tInputStream inputStream = conn.getInputStream();\n\t\t\treturn convertInputStreamToString(inputStream);\n\t\t} catch (MalformedURLException e) {\n\t\t\t// e.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// e.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}", "protected String fetchItem( String str_url ) {\n try {\n // assemble the string and the search request\n StringBuilder response = new StringBuilder();\n URL url = new URL(str_url);\n\n // make the connection\n HttpURLConnection httpconn = (HttpURLConnection) url.openConnection();\n\n // did it do ok?\n if ( httpconn.getResponseCode() == HttpURLConnection.HTTP_OK ) {\n BufferedReader input = new BufferedReader(\n new InputStreamReader(httpconn.getInputStream()), 8192);\n String strLine = null;\n while ((strLine = input.readLine()) != null) {\n // have more data\n response.append(strLine);\n response.append(\"\\n\");\n }\n input.close();\n return response.toString();\n }\n } catch ( IOException e ) {\n return e.getMessage();\n }\n return \"\";\n }", "String getRequest(String url);", "public static String getResponseFromHttpUrl(URL url) throws IOException {\r\n HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();\r\n try {\r\n InputStream in = urlConnection.getInputStream();\r\n\r\n Scanner scanner = new Scanner(in);\r\n scanner.useDelimiter(\"\\\\A\");\r\n\r\n boolean hasInput = scanner.hasNext();\r\n if (hasInput) {\r\n return scanner.next();\r\n } else {\r\n return null;\r\n }\r\n } finally {\r\n urlConnection.disconnect();\r\n }\r\n }", "public String get(String urlStr) throws IOException {\n URL url = new URL(urlStr);\n String str;\n\n long t0 = System.currentTimeMillis();\n try (BufferedReader reader = new BufferedReader(new InputStreamReader(url.openStream(), \"UTF-8\"), 8 * 1024)) {\n str = reader.lines().collect(Collectors.joining());\n }\n\n if (LOGGER.isDebugEnabled()) {\n long t1 = System.currentTimeMillis();\n LOGGER.debug(\"Pulling from {} took {} ms.\", urlStr, t1 - t0);\n }\n\n return str.toString();\n }", "private static String load(final String url) throws IOException {\n\t\tHttpURLConnection conn =\n\t\t\t(HttpURLConnection) new URL(url).openConnection();\n\n\t\tconn.setDoInput(true);\n\t\tconn.setDoOutput(false);\n\t\tconn.setRequestMethod(\"GET\");\n\t\tconn.connect();\n\n\t\tint respCode = conn.getResponseCode();\n\t\tif (respCode != HttpURLConnection.HTTP_OK) {\n\t\t\tthrow new IOException(conn.getResponseMessage());\n\t\t}\n\n\t\tString contentType =\n\t\t\tconn.getHeaderField(\"Content-Type\").toUpperCase(Locale.ENGLISH);\n\t\tString csName = DEFAULT_CHARSET;\n\t\tint csPos = contentType.lastIndexOf(\"CHARSET=\");\n\t\tif (csPos != -1) {\n\t\t\tcsName = contentType.substring(csPos + \"CHARSET=\".length()).trim();\n\t\t}\n\t\tCharset charset = Charset.forName(csName);\n\n\t\tInputStream is = conn.getInputStream();\n\t\tif (is == null) {\n\t\t\tthrow new IOException(\"No input stream\");\n\t\t}\n\t\tInputStreamReader isr = new InputStreamReader(is, charset);\n\t\tStringBuilder sb = new StringBuilder();\n\t\ttry {\n\t\t\tint c;\n\t\t\twhile ((c = isr.read()) != -1) {\n\t\t\t\tsb.appendCodePoint(c);\n\t\t\t}\n\t\t} finally {\n\t\t\tisr.close();\n\t\t}\n\n\t\treturn sb.toString();\n\t}", "public static String GET(String url)\t{\t\t\t\t\n\t\tInputStream inputStream = null;\t\t\t\t\t\t\t\n\t\tString result = \"\";\t\t\t\t\t\t\t\n\t\ttry\t{\t\t\t\t\t\t\n\t\t\t// create HttpClient\t\t\t\t\t\t\n\t\t\tHttpClient httpClient = new DefaultHttpClient();\t\t\t\t\t\t\n\n\t\t\t// make GET request to the given URL\t\t\t\t\t\t\n\t\t\tHttpResponse httpResponse = httpClient.execute(new HttpGet(url));\t\t\t\t\t\t\n\n\t\t\t// receive response as inputStream\t\t\t\t\t\t\n\t\t\tinputStream = httpResponse.getEntity().getContent();\t\t\t\t\t\t\t\t\n\n\t\t\t// convert inputstream to string\t\t\t\t\t\t\t\t\n\t\t\tif(inputStream != null)\t\t\t{\t\t\t\t\t\n\t\t\t\tresult = convertInputStreamToString(inputStream);\t\t\t\t\t\t\t\t\n\t\t\t}\telse\t{\t\t\t\t\t\t\n\t\t\t\tresult = \"Did not work!\";\t\t\t\t\t\t\t\t\n\t\t\t}\t\t\t\t\t\t\t\t\t\n\t\t}catch (Exception e)\t{\t\t\t\t\t\n\t\t\tLog.d(\"InputStream\", e.getLocalizedMessage());\t\t\t\t\t\t\n\t\t}\t\t\t\t\t\t\t\n\n\t\treturn result;\t\t\t\t\t\t\t\n\t}", "URL getUrl();", "private static String useAPI(String urlString) throws IOException {\n String inline = \"\";\n URL url = new URL(urlString);\n HttpURLConnection conn = (HttpURLConnection) url.openConnection();\n conn.setRequestMethod(\"GET\");\n conn.connect();\n\n int responsecode = conn.getResponseCode();\n if(responsecode == 200) {\n Scanner sc = new Scanner(url.openStream());\n while(sc.hasNext()) {\n inline += sc.nextLine();\n }\n sc.close();\n conn.disconnect();\n return inline;\n }\n conn.disconnect();\n return \"[]\";\n }", "public static String urlToString(final String url) {\n Scanner urlScanner;\n try {\n urlScanner = new Scanner(new URL(url).openStream(), \"UTF-8\");\n } catch (IOException e) {\n return \"\";\n }\n String contents = urlScanner.useDelimiter(\"\\\\A\").next();\n urlScanner.close();\n return contents;\n }", "public static String urlToString(final String url) {\n Scanner urlScanner;\n try {\n urlScanner = new Scanner(new URL(url).openStream(), \"UTF-8\");\n } catch (IOException e) {\n return \"\";\n }\n String contents = urlScanner.useDelimiter(\"\\\\A\").next();\n urlScanner.close();\n return contents;\n }", "private String readHTML(URL url) {\n String urlContents = \"\";\n\n try {\n BufferedReader bufferedReader =\n new BufferedReader(new InputStreamReader(url.openStream()));\n StringBuilder stringBuilder = new StringBuilder();\n\n String line;\n while ((line = bufferedReader.readLine()) != null) {\n stringBuilder.append(line).append(\"\\n\");\n }\n\n urlContents = stringBuilder.toString();\n bufferedReader.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return urlContents;\n }", "public String getUrlContents(String myURL) {\n\n\t\t// Creates a new StringBuilder object.\n\t\tthis.urlContents = new StringBuilder();\n\t\ttry {\n\t\t\t// Creates a new URL object.\n\t\t\tthis.url = new URL(myURL);\n\n\t\t\t// Creates a URLConnection object.\n\t\t\tthis.urlConnection = url.openConnection();\n\n\t\t\t// Wraps the URLConnection in a BufferedReader.\n\t\t\tthis.bufferedReader = new BufferedReader(new InputStreamReader(urlConnection.getInputStream()));\n\n\t\t\t// Reads from the URLConnection via the BufferedReader and appends to the\n\t\t\t// StringBuilder.\n\t\t\twhile ((this.line = bufferedReader.readLine()) != null) {\n\t\t\t\turlContents.append(line + \"\\n\");\n\t\t\t}\n\t\t\tbufferedReader.close();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"[ERROR] Unable to close URL\");\n\t\t}\n\t\treturn urlContents.toString();\n\t}", "public static byte[] getURL(String string_url) {\n ByteArrayOutputStream bais = new ByteArrayOutputStream();\n InputStream is = null;\n try {\n URL url = new URL(string_url);\n is = url.openStream();\n byte[] byteChunk = new byte[4096];\n int n;\n \n while ( (n = is.read(byteChunk)) > 0 ) {\n bais.write(byteChunk, 0, n);\n }\n \n is.close();\n }\n catch (IOException e) {\n }\n \n return bais.toByteArray();\n }", "public String getUrl(){\n return urlsText;\n }", "public static String getContentFromUrl(URL url) throws Exception {\n HttpGet httpget = new HttpGet(url.toURI());\n DefaultHttpClient httpclient = new DefaultHttpClient();\n log.info(\"Executing request \" + httpget.getRequestLine());\n HttpResponse response = httpclient.execute(httpget);\n int statusCode = response.getStatusLine().getStatusCode();\n log.info(\"Response is with status code \" + statusCode);\n Header[] errorHeaders = response.getHeaders(\"X-Exception\");\n log.warning(\"Error headers are: \" + Arrays.toString(errorHeaders));\n String content = EntityUtils.toString(response.getEntity());\n log.info(\"Content is: \" + content);\n return content;\n }", "public String getContentFromUrl(String strUrl) throws IOException {\n String content = \"\";\n URL url = null;\n HttpURLConnection httpURLConnection = null;\n url = new URL(strUrl);\n httpURLConnection = (HttpURLConnection) url.openConnection();\n httpURLConnection.setRequestMethod(Constants.METHOD_GET);\n httpURLConnection.setConnectTimeout(Constants.CONNECTION_TIME_OUT);\n httpURLConnection.setReadTimeout(Constants.READ_INPUT_TIME_OUT);\n httpURLConnection.setDoInput(true);\n httpURLConnection.connect();\n int responseCode = httpURLConnection.getResponseCode();\n if (responseCode == HttpURLConnection.HTTP_OK) {\n content = parserResultFromContent(httpURLConnection.getInputStream());\n }\n return content;\n }", "Uri getUrl();", "public static String readFromUrl(String url) throws IOException\n {\n InputStream is = new URL(url).openStream();\n\n StringBuilder sb = null;\n\n try {\n BufferedReader br = new BufferedReader(new InputStreamReader(is, \"UTF-8\"));\n\n String line;\n while ((line = br.readLine()) != null)\n {\n if (sb == null)\n sb = new StringBuilder();\n\n sb.append(line);\n }\n\n return sb.toString();\n\n } finally {\n is.close();\n }\n }", "private String getResponseFromHttpUrl(URL url) throws IOException {\n HttpsURLConnection urlConnection = (HttpsURLConnection) url.openConnection();\n urlConnection.addRequestProperty(\"Authorization\",\"Bearer JVNDXWXVDDQN2IJUJJY7NQXCPS23M7DX\");\n try{\n InputStream in = urlConnection.getInputStream();\n\n Scanner scanner = new Scanner(in);\n scanner.useDelimiter(\"\\\\A\");\n boolean hasInput = scanner.hasNext();\n if(hasInput){\n return scanner.next();\n }else{\n return null;\n }\n }finally {\n urlConnection.disconnect();\n }\n }", "@Nullable\n public static String getResponseFromHttpUrl(URL url) throws IOException {\n HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();\n try {\n InputStream in = urlConnection.getInputStream();\n\n Scanner scanner = new Scanner(in);\n scanner.useDelimiter(\"\\\\A\");\n\n boolean hasInput = scanner.hasNext();\n if (hasInput) {\n return scanner.next();\n } else {\n return null;\n }\n } finally {\n urlConnection.disconnect();\n }\n }", "public static String getText(String url)\n {\n try {\n\t URL website = new URL(url);\n\t URLConnection connection = website.openConnection();\n\t BufferedReader in = new BufferedReader(\n\t new InputStreamReader(\n\t connection.getInputStream()));\n\t\n\t StringBuilder response = new StringBuilder();\n\t String inputLine = \"\";\n\t while ((inputLine = in.readLine()) != null) \n\t \tresponse.append(inputLine);\n\n\t\t\tin.close();\n\t\t\t\n\t return response.toString();\n\t\t} catch (IOException e) {\n\t\t\tDebug.Error(e.getMessage());\n\t\t}\n return \"\";\n }", "public static String[] readLines(URL url) throws IOException {\n\n Reader fileReader = new InputStreamReader(url.openStream(), Charset.forName(\"UTF-8\"));\n List<String> lines;\n try (BufferedReader bufferedReader = new BufferedReader(fileReader)) {\n lines = new ArrayList<>();\n String line;\n while ((line = bufferedReader.readLine()) != null) {\n lines.add(line);\n }\n }\n return lines.toArray(new String[lines.size()]);\n }", "public String callGET(String urlStr) {\n StringBuilder strB = new StringBuilder();\n this.LOGGER.debug(\"urlStr: {}\" + urlStr);\n \n try {\n URL url = new URL(urlStr);\n HttpURLConnection conn = (HttpURLConnection) url.openConnection();\n conn.setRequestMethod(this.STR_GET);\n conn.setRequestProperty(this.STR_ACCEPT, this.STR_APPLICATION_HTML);\n\n if (conn.getResponseCode() != this.RET_OK) {\n throw new RuntimeException(\"Failed with HTTP error code: \" + conn.getResponseCode());\n }\n\n BufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream()));\n\n String output;\n while ((output = br.readLine()) != null) {\n strB.append(output);\n }\n\n conn.disconnect();\n }\n catch (MalformedURLException exc) {\n exc.printStackTrace(System.err);\n }\n catch (IOException exc) {\n exc.printStackTrace(System.err);\n }\n \n System.out.println(\"Output from Server .... \\n\");\n System.out.println(strB.toString());\n \n return strB.toString();\n }", "public String getUrlSourcePage(String url) throws IOException {\n\t\t\t URL URL = new URL(url);\n\t\t\t URLConnection uc = URL.openConnection();\n\t\t\t \n\t\t\t // allow GZip encodings \n\t\t\t // the encoding type\n\t\t\t BufferedReader in = null;\n\t\t\t if (uc.getHeaderField(\"Content-Encoding\") != null && uc.getHeaderField(\"Content-Encoding\").equals(\"gzip\")) {\n\t\t\t in = new BufferedReader(new InputStreamReader(new GZIPInputStream(uc.getInputStream())));\n\t\t\t } else { in = new BufferedReader(new InputStreamReader(uc.getInputStream())); }\n\t\t\t \n\t\t\t String inputLine;\n\t\t\t StringBuilder sb = new StringBuilder();\n\t\t\t while ((inputLine = in.readLine()) != null)\n\t\t\t sb.append(inputLine);\n\t\t\t in.close();\n\t\t\t \n\t\t\t return sb.toString();\n\t\t\t }", "public String sendGet(String url)\n\t{\n\t\t//Getting most relevant user-agent from robots.txt\n\t\tbest_match = findBestMatch();\n\t\t//Deicing whether or not to skip\n\t\tif (shouldSkip(url))\n\t\t{\n\t\t\treturn \"skipped\";\n\t\t}\n\t\tif (url.startsWith((\"https\")))\n\t\t{\n\t\t\treturn sendGetSecure(url);\n\t\t}\n\t\ttry \n\t\t{\n\t\t\t//Creating URL objects\n\t\t\tURL http_url = new URL(url);\n\t\t\t//Delaying visit if directed to by robots.txt\n\t\t\tcrawlDelay();\n\t\t\tHttpURLConnection secure_connection = (HttpURLConnection)http_url.openConnection();\n\t\t\t//Setting request method\n\t\t\tsecure_connection.setRequestMethod(\"GET\");\n\t\t\t//Sending all headers except for host (since URLConnection will take care of this)\n\t\t\tfor (String h: headers.keySet())\n\t\t\t{\n\t\t\t\tif (!h.equals(\"Host\"))\n\t\t\t\t{\n\t\t\t\t\tsecure_connection.setRequestProperty(h, headers.get(h));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//Getting ResponseParser object to read in page content\n\t\t\tp = new ResponseParser(new BufferedReader(new InputStreamReader(secure_connection.getInputStream())));\n\t\t\t\n\t\t\t//Parsing all response headers from returned object\n\t\t\tMap<String,String> p_headers = p.getHeaders();\n\t\t\tMap<String, List<String>> response_headers = secure_connection.getHeaderFields();\n\t\t\tfor (Map.Entry<String, List<String>> entry : response_headers.entrySet()) \n\t\t\t{\n\t\t\t\tif (entry.getKey() == null)\n\t\t\t\t{\n\t\t\t\t\tp.setResponse(entry.getValue().get(0));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tp_headers.put(entry.getKey(),entry.getValue().get(0));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//If we didn't get any headers in the response, the URL was invalid\n\t\t\tif (p.getHeaders().size() == 0)\n\t\t\t{\n\t\t\t\treturn (\"invalid url\");\n\t\t\t}\n\t\t\t\n\t\t\t//Otherwise return the contents of the returned document\n\t\t\treturn p.getData();\n\t\t\t\n\t\t} \n\t\tcatch (IOException | IllegalArgumentException e) \n\t\t{\n\t\t\treturn \"invalid url\";\n\t\t}\t\t\n//\t\ttry\n//\t\t{\n//\t\t\t//Deals with secure request\n//\t\t\tif (url.startsWith((\"https\")))\n//\t\t\t{\n//\t\t\t\treturn sendGetSecure(url);\n//\t\t\t}\n//\t\t\t//Parsing host and port from URL\n//\t\t\tURLInfo url_info = new URLInfo(url);\n//\t\t\thost = url_info.getHostName();\n//\t\t\tport = url_info.getPortNo();\n//\t\t\t\n//\t\t\t//Changing Host header if necessary\n//\t\t\theaders.put(\"Host\", host + \":\" + port);\n//\t\t\t\n//\t\t\t//Getting file path of URL\n//\t\t\tString file_path = url_info.getFilePath();\n//\t\t\t\n//\t\t\t//If we weren't able to find a host, URL is invalid\n//\t\t\tif (host == null)\n//\t\t\t{\n//\t\t\t\treturn \"invalid url\";\n//\t\t\t}\n//\t\t\t\n//\t\t\t//Delaying visits based on robots.txt crawl delay\n//\t\t\tcrawlDelay();\n//\t\t\t\n//\t\t\t//Otherwise, opening up socket and sending request with all headers\n//\t\t\tsocket = new Socket(host, port);\n//\t\t\tout = new PrintWriter(socket.getOutputStream(), true);\n//\t\t\tString message = \"GET \" + file_path + \" HTTP/1.1\\r\\n\";\n//\t\t\tfor (String header: headers.keySet())\n//\t\t\t{\n//\t\t\t\tString head = header + \": \" + headers.get(header) + \"\\r\\n\";\n//\t\t\t\tmessage = message + head;\n//\t\t\t}\n//\t\t\tout.println(message);\n//\n//\t\t\t//Creating ResponseParser object to parse the Response\n//\t\t\tp = new ResponseParser(socket);\n//\t\t\t\n//\t\t\t//If we didn't get any headers in the response, the URL was invalid\n//\t\t\tif (p.getHeaders().size() == 0)\n//\t\t\t{\n//\t\t\t\treturn (\"invalid url\");\n//\t\t\t}\n//\t\t\t//Otherwise return the contents of the returned document\n//\t\t\treturn p.getData();\n//\t\t} \n//\t\tcatch (UnknownHostException e) \n//\t\t{\n//\t\t\tSystem.err.println(\"Unknown Host Exception\");\n//\t\t\tSystem.err.println(\"Problem url is: http://www.youtube.com/motherboardtv?feature=watch&trk_source=motherboard\");\n//\t\t} \n//\t\tcatch (IOException | IllegalArgumentException e) \n//\t\t{\n//\t\t\tSystem.err.println(\"IO Exception\");;\n//\t\t}\n//\t\t//Return null for all caught exceptions (Servlet will deal with this)\n//\t\treturn null;\n\t}", "public static String requestProcessedData(final String url) {\n\n RestTemplate request = new RestTemplate();\n String result = request.getForObject(url, String.class);\n System.out.println(url);\n return (result);\n }", "protected static String getSource(String url) {\n String source = \"\";\n try {\n URL link = new URL(url);\n BufferedReader reader =\n new BufferedReader(new InputStreamReader(link.openStream(), \"UTF-8\"));\n String input;\n while ((input = reader.readLine()) != null) {\n if (input.trim().equals(\"\"))\n continue;\n source += (source.equals(\"\") ? \"\" : \"\\n\") + input;\n }\n reader.close();\n } catch (MalformedURLException e) {\n throw new RuntimeException(\"[Source:43] The URL provided does not exist or invalid.\");\n } catch (UnsupportedEncodingException e) {\n throw new RuntimeException(\"[Source:45] The site farted, we can't even comprehend the \" +\n \"encoding of the \" +\n \"character.\");\n } catch (IOException e) {\n throw new RuntimeException(\"[Source:47] Something interrupted the connection or failed to \" +\n \"operate.\");\n }\n return source;\n }", "public static String getJSON(String url){\n \t\t\n \t\tStringBuilder builder = new StringBuilder();\n \t HttpClient client = new DefaultHttpClient();\n \t HttpGet httpGet = new HttpGet(url);\n \t try {\n \t HttpResponse response = client.execute(httpGet);\n \t HttpEntity entity = response.getEntity();\n \t InputStream content = entity.getContent();\n \t BufferedReader reader = new BufferedReader(new InputStreamReader(content));\n \t \n \t String line;\n \t while ((line = reader.readLine()) != null) {\n \t builder.append(line);\n \t }\n \t } catch (Exception e) {}\n \t\t\n \t\treturn builder.toString(); \n \t}", "static String getResponseFromHttpUrl(URL url) throws IOException {\n String jsonReturn = \"\";\n HttpsURLConnection urlConnection = (HttpsURLConnection) url.openConnection();\n urlConnection.setConnectTimeout(CONNECTION_TIMEOUT); //connection is closed after 7 seconds\n\n try {\n InputStream inputStream = urlConnection.getInputStream();\n\n Scanner scanner = new Scanner(inputStream);\n scanner.useDelimiter(\"\\\\A\");\n\n if(!scanner.hasNext()){\n return null;\n }\n\n while(scanner.hasNext()){\n jsonReturn = jsonReturn.concat(scanner.next());\n }\n return jsonReturn;\n\n } catch (Exception e){\n e.printStackTrace();\n } finally {\n urlConnection.disconnect();\n }\n\n return null;\n }", "public static String exampleTwo(){\n HttpURLConnection connection = null;\n Scanner cs = null;\n try {\n URL url = buildURL(\"3\");\n connection = (HttpURLConnection) url.openConnection();\n connection.connect();\n InputStream inputStream = connection.getInputStream();\n cs = new Scanner(inputStream);\n boolean hasNext = cs.hasNext();\n if(hasNext){\n return cs.next();\n } else {\n return null;\n }\n } catch (MalformedURLException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n if (connection != null){\n connection.disconnect();\n }\n if (cs != null){\n cs.close();\n }\n }\n return null;\n }", "private String readUrl(String nearbySearchUrl) throws Exception {\n\n String data = \"\";\n InputStream inputStream = null;\n HttpURLConnection urlConnection = null;\n\n // read JSON line by line and store in a string\n\n try {\n\n URL url = new URL(nearbySearchUrl);\n\n Log.d(TAG, \"readUrl: \" + url);\n urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.connect();\n\n\n inputStream = urlConnection.getInputStream();\n BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));\n StringBuffer stringBuffer = new StringBuffer();\n\n String line = \"\";\n while ((line = reader.readLine()) != null)\n stringBuffer.append(line);\n\n\n data = stringBuffer.toString();\n reader.close();\n\n } catch (MalformedURLException e) {\n Log.d(TAG, \"readUrl: malformedURLException\");\n e.printStackTrace();\n } catch (IOException e) {\n Log.d(TAG, \"readUrl: IOException\");\n e.printStackTrace();\n } finally {\n\n // if there is an exception we must close the connections and input stream\n inputStream.close();\n urlConnection.disconnect();\n }\n\n Log.d(TAG, \"readUrl: \" + data);\n return data;\n\n }", "public static List<String> HTMLStrings(String url, String filter) throws ParserException\n\t{\n\t\tList<String> strings = new ArrayList<String>();\n\t\tParser parser = getParser(url);\n\t\tfor (NodeIterator i = parser.elements(); i.hasMoreNodes();)\n\t\t{\n\t\t\tstrings.addAll(getText(i.nextNode(), filter.toUpperCase()));\n\t\t}\n\t\treturn strings;\n\t}", "@RequestMapping(\"/getResult\")\r\n @ResponseBody\r\n public String prob(@RequestParam String URL){\n \tHashSet<String> res= new CrawlerService().getPageLinks(URL); \t\r\n \tStringBuffer result =new StringBuffer(); \t\r\n \tfor (String item:res){\r\n \t\tresult.append(item+\"<br>\");\r\n \t} \t\r\n return result.toString();\r\n\r\n }", "public static String getStringDataFromNetwork(URL url) {\n HttpURLConnection urlConnection = null;\n BufferedReader reader = null;\n\n try {\n // Create the request to the given url, and open the connection\n urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setRequestMethod(\"GET\");\n urlConnection.connect();\n\n // Read the input stream into a String\n InputStream inputStream = urlConnection.getInputStream();\n StringBuffer buffer = new StringBuffer();\n if (inputStream == null) {\n return null;\n }\n\n reader = new BufferedReader(new InputStreamReader(inputStream));\n\n String line;\n while ((line = reader.readLine()) != null) {\n try {\n buffer.append(line + \"\\n\");\n } catch (Exception e) {\n Log.e(TAG, e.getMessage());\n e.printStackTrace();\n return null;\n }\n }\n\n if (buffer.length() == 0) {\n //stream is empty\n return null;\n }\n\n //return the final output string\n return buffer.toString();\n } catch (IOException e) {\n Log.e(TAG, e.getMessage());\n e.printStackTrace();\n } catch (Exception e) {\n Log.e(TAG, e.getMessage());\n e.printStackTrace();\n } finally {\n if (urlConnection != null) {\n urlConnection.disconnect();\n }\n if (reader != null) {\n try {\n reader.close();\n } catch (final IOException e) {\n Log.e(TAG, e.getMessage());\n e.printStackTrace();\n }\n }\n }\n\n //return null by default, if string could not be retrieved\n return null;\n }", "private String loadUrl(String strUrl) throws IOException {\n String data = \"\";\n InputStream iStream = null;\n HttpURLConnection urlConnection = null;\n try {\n URL url = new URL(strUrl);\n\n // Creating an http connection to communicate with url\n urlConnection = (HttpURLConnection) url.openConnection();\n\n // Connecting to url\n urlConnection.connect();\n\n // Reading data from url\n iStream = urlConnection.getInputStream();\n\n BufferedReader br = new BufferedReader(new InputStreamReader(iStream));\n\n StringBuffer sb = new StringBuffer();\n\n String line = \"\";\n while ((line = br.readLine()) != null) {\n sb.append(line);\n }\n\n data = sb.toString();\n\n br.close();\n\n } catch (Exception e) {\n Log.d(\"Excep downloading url\", e.toString());\n } finally {\n iStream.close();\n urlConnection.disconnect();\n }\n return data;\n }", "public static String getResponseContent(URL url) throws IOException {\n HttpURLConnection conn = (HttpURLConnection) url.openConnection();\n String encoding = conn.getContentEncoding();\n if (encoding == null) {\n encoding = \"UTF-8\";\n }\n int responseCode = conn.getResponseCode();\n InputStream stream;\n if (responseCode != HttpURLConnection.HTTP_OK) {\n stream = conn.getErrorStream();\n } else {\n stream = conn.getInputStream();\n }\n try {\n return IOUtils.toString(stream, encoding);\n }\n finally {\n stream.close();\n }\n }", "public static String getUrlContentAsJsonString(String url) throws Exception {\n// HttpClient httpClient = new HttpClient();\n// httpClient.getParams().setSoTimeout(1500);\n// GetMethod gm = new GetMethod(url);\n// gm.setRequestHeader(\"accept\", \"application/json\"); // needed for spatial portal JSON web services\n// gm.setFollowRedirects(true);\n// httpClient.executeMethod(gm);\n// String content = gm.getResponseBodyAsString();\n\n HttpClient httpClient = new HttpClient();\n // DM: set this to HTTP/1.0\n httpClient.getParams().setParameter(\"http.protocol.version\", HttpVersion.HTTP_1_0);\n httpClient.getParams().setSoTimeout(10000);\n logger.debug(\"Retrieving the following URL: \" + url);\n GetMethod gm = new GetMethod(url);\n gm.setRequestHeader(\"Accept\", \"application/json\"); // needed for spatial portal JSON web services\n gm.setFollowRedirects(true);\n httpClient.executeMethod(gm);\n String responseString = gm.getResponseBodyAsString();\n if(logger.isDebugEnabled()){\n logger.debug(\"Response: \" + responseString);\n }\n return responseString;\n }", "public static String downloadContent(String url) throws IOException {\n URL website = new URL(url);\n URLConnection connection = website.openConnection();\n BufferedReader in = new BufferedReader(\n new InputStreamReader(\n connection.getInputStream()));\n\n StringBuilder response = new StringBuilder();\n String inputLine;\n\n while ((inputLine = in.readLine()) != null)\n response.append(inputLine);\n\n in.close();\n\n return response.toString();\n }", "public static String getContentString( String url, String charset ) throws URISyntaxException, IOException {\n\t\treturn getContentString( false, url, charset );\n\t}", "public static String[] readLines(String url) throws IOException {\r\n\r\n BufferedReader bufferedReader = new BufferedReader(new FileReader(url));\r\n List<String> lines = null;\r\n try {\r\n lines = new ArrayList();\r\n String line;\r\n while ((line = bufferedReader.readLine()) != null) {\r\n lines.add(line);\r\n }\r\n\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n return lines.toArray(new String[lines.size()]);\r\n\r\n }", "@Override\n protected String doInBackground(String... urls) {\n StringBuilder webResult = new StringBuilder();\n InputStream inputStream;\n try {\n URL url = new URL(urls[0]);\n HttpsURLConnection urlConnection = (HttpsURLConnection) url.openConnection();\n inputStream = urlConnection.getInputStream();\n } catch (MalformedURLException e) {\n Log.e(TAG, \"MalformedURLException thrown while trying to create URL\");\n return null;\n } catch (IOException e) {\n Log.e(TAG, \"IOException thrown while trying to open URL\", e);\n return null;\n } catch (Exception e) {\n Log.e(TAG, \"General Exception thrown while trying to create/open URL\", e);\n return null;\n }\n\n\n InputStreamReader inputStreamReader = new InputStreamReader(inputStream);\n BufferedReader bufferedReader = new BufferedReader(inputStreamReader);\n\n try {\n String line = bufferedReader.readLine();\n while(line != null){\n webResult.append(line);\n line = bufferedReader.readLine();\n }\n return String.valueOf(webResult);\n } catch(IOException e) {\n Log.e(TAG, \"IOException thrown while reading from BufferedReader\", e);\n } catch (Exception e) {\n Log.e(TAG, \"General Exception thrown while reading from BufferedReader\", e);\n } finally {\n try {\n bufferedReader.close();\n } catch (IOException e) {\n Log.e(TAG, \"Failed to close BufferedReader\", e);\n }\n }\n return String.valueOf(webResult);\n }", "protected String doInBackground(Object... urls) {\n try {\n String st = downloadUrl((String) urls[0]);\n return st;\n } catch (IOException e) {\n return \"Unable to retrieve web page. URL may be invalid.\";\n }\n }", "java.net.URL getUrl();", "public static List<String> getURLTemplateParams(String url) {\n boolean endVal = false;\n\n List<String> params = new ArrayList<String>();\n if (url.contains(\"{\")) {\n\n int start = 0;\n int end = 0;\n for (int i = 0; i < url.length(); i++) {\n if (url.charAt(i) == '{')\n start = i;\n else if (url.charAt(i) == '}') {\n end = i;\n endVal = true;\n }\n\n if (endVal) {\n params.add(url.substring(start + 1, end));\n endVal = false;\n }\n }\n }\n return params;\n }", "public String openHttp2String(URL url) throws IOException {\r\n return EntityUtils.toString(openHttpEntity(url), Charset.forName(\"UTF-8\"));\r\n }", "@Override\n protected String doInBackground(String... params) {\n StringBuilder results = new StringBuilder();\n\n try {\n URL url = new URL(params[0]);\n HttpURLConnection conn = (HttpURLConnection) url.openConnection();\n\n int statusCode = conn.getResponseCode();\n if (statusCode == 200) {\n InputStream inputStream = new BufferedInputStream(conn.getInputStream());\n\n BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(inputStream, StandardCharsets.UTF_8));\n String line;\n while ((line = bufferedReader.readLine()) != null) {\n results.append(line);\n }\n }\n\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n\n return results.toString();\n }", "private String getText(URL url){\n\tString parsedHtml=null;\n\ttry{\n\t\tHttpURLConnection urlConn = (HttpURLConnection) url.openConnection();\n\t\tString line = null;\n\t\tStringBuilder tmp = new StringBuilder();\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(urlConn.getInputStream()));\n\t\twhile ((line = in.readLine()) != null) {\n\t\t tmp.append(line);\n\t\t}\n\t\t \n\t\tDocument doc = Jsoup.parse(tmp.toString());\n\t\tparsedHtml = doc.title() + doc.body().text();\n\t\t\n\t}\n\tcatch(IOException e){\n\t\tSystem.out.println(\"Page not reached for: \"+url );\n\t}\n\tfinally{\n\t\treturn parsedHtml;\n\t}\n\t\n}", "protected abstract String getUrl();", "public String makeNetworkCall(String s) {\n\n try {\n URL url = new URL(s);\n\n HttpURLConnection httpURLConnection = (HttpURLConnection) url.openConnection();\n\n httpURLConnection.setRequestMethod(\"GET\");\n\n httpURLConnection.setConnectTimeout(3000);\n\n InputStream is = httpURLConnection.getInputStream();\n\n Scanner scanner = new Scanner(is);\n\n //This allows the scanner to read the entire file content in one go\n scanner.useDelimiter(\"\\\\A\");\n\n String result = \"\";\n\n if (scanner.hasNext()) {\n result = scanner.next();\n }\n\n return result;\n\n } catch (MalformedURLException e) {\n e.printStackTrace();\n Log.e(\"TAG\", \"makeNetworkCall: Incorrect URL : \" + s);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return \"Some unexpected error occurred!\";\n\n }", "public static String getPage(String surl){\n\r\n\t\t\r\n\t\tString sPage=\"\";\r\n\t\t\r\n\t\tURLConnection connection = null;\t\t\r\n\t\t// Zerlegt einen String und fügt jeweils ein Zeilenende ein\r\n\t\ttry {\t\t\t\r\n\t\t\tURL urlpage=new URL(surl);\t\t\t\r\n\t\t\tconnection = urlpage.openConnection();\r\n\t\t\t//connection = urlpage.openConnection(proxy);\r\n\t\t\tconnection.setDoOutput(true);\t\t\t\r\n BufferedReader rd = new BufferedReader(new InputStreamReader(connection.getInputStream()));\r\n\t\t\t \r\n\t\t\t String line = null;\r\n\t\t\t \r\n\t\t\t while ((line = rd.readLine()) != null) {\r\n\t\t\t\t sPage+=line+System.getProperty(\"line.separator\");\r\n\t\t\t\t} \t\t\r\n\t\t\t \r\n\t\t} catch (ConnectException e) {\t\t\t\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (UnknownHostException e) {\t\t\t\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (MalformedURLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\t\t\r\n\t\treturn sPage;\r\n\t}", "String getUrlPattern();", "public static String requestURL(String url) {\n return \"\";\n }", "public String getUrl();", "public String getUrl();", "public String getUrl();", "public String getUrl();", "public static void readFromUrl(URL url) {\n try {\n BufferedReader in = new BufferedReader(\n new InputStreamReader(\n url.openStream()));\n\n String inputLine;\n\n while ((inputLine = in.readLine()) != null) {\n System.out.println(inputLine);\n }\n\n in.close();\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n }", "@Override\n protected String doInBackground(String... urls) {\n try {\n return downloadUrl(urls[0]);\n } catch (IOException e) {\n return \"Unable to retrieve web page. URL may be invalid.\";\n }\n }", "@Override\n protected String doInBackground(String... urls) {\n try {\n return downloadUrl(urls[0]);\n } catch (IOException e) {\n return \"Unable to retrieve web page. URL may be invalid.\";\n }\n }", "@Override\n protected String doInBackground(String... urls) {\n try {\n return downloadUrl(urls[0]);\n } catch (IOException e) {\n return \"Unable to retrieve web page. URL may be invalid.\";\n }\n }" ]
[ "0.70041543", "0.69423485", "0.6756903", "0.6724505", "0.67241186", "0.666519", "0.666519", "0.666519", "0.666519", "0.666519", "0.6560949", "0.6530612", "0.64890593", "0.6479972", "0.64729637", "0.6472548", "0.64502084", "0.64248157", "0.6413585", "0.6397475", "0.6380055", "0.63769656", "0.63769656", "0.63769656", "0.63769656", "0.63769656", "0.63769656", "0.6335385", "0.6329873", "0.6309023", "0.6288715", "0.62744623", "0.626322", "0.626322", "0.626322", "0.626322", "0.62624913", "0.62403333", "0.62393045", "0.6222083", "0.6220648", "0.6217119", "0.62069213", "0.62011534", "0.61869496", "0.6185993", "0.6165014", "0.614639", "0.6135547", "0.6125977", "0.6125977", "0.61158437", "0.61113703", "0.61015254", "0.60957134", "0.609543", "0.607867", "0.60607404", "0.60589015", "0.6032997", "0.60082966", "0.60002667", "0.598155", "0.5959889", "0.59554034", "0.5951063", "0.5947925", "0.59475386", "0.5935528", "0.5933728", "0.5933526", "0.5932515", "0.5932258", "0.59253085", "0.59189004", "0.59129024", "0.5899307", "0.58902544", "0.58850795", "0.58848435", "0.58813274", "0.5875141", "0.5869998", "0.58549345", "0.5850929", "0.5847601", "0.5840615", "0.5820979", "0.5815096", "0.58096576", "0.5807638", "0.5790627", "0.57738185", "0.5773177", "0.5773177", "0.5773177", "0.5773177", "0.577308", "0.57689446", "0.57689446", "0.57689446" ]
0.0
-1
returns string from a html string
public static String getText(String html) throws Exception { StringBean sb = new StringBean(); sb.setLinks(false); Parser p = Parser.createParser(html, null); p.visitAllNodesWith(sb); return sb.getStrings(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String extractHTML(String str) {\n if (str == null) return \"\";\n StringBuffer ret = new StringBuffer(str.length());\n int start = 0;\n int beginTag = str.indexOf(\"<\");\n int endTag = 0;\n if (beginTag == -1)\n return str;\n \n while (beginTag >= start) {\n endTag = str.indexOf(\">\", beginTag);\n \n // if endTag found, keep tag\n if (endTag > -1) {\n ret.append( str.substring(beginTag, endTag+1) );\n \n // move start forward and find another tag\n start = endTag + 1;\n beginTag = str.indexOf(\"<\", start);\n }\n // if no endTag found, break\n else {\n break;\n }\n }\n return ret.toString();\n }", "private static String HtmlToText(final String s) {\n final HTMLEditorKit kit = new HTMLEditorKit();\n final Document doc = kit.createDefaultDocument();\n try {\n kit.read(new StringReader(s), doc, 0);\n return doc.getText(0, doc.getLength()).trim();\n } catch (final IOException | BadLocationException ioe) {\n return s;\n }\n }", "static String parseHTMLString(String htmlString) {\n Logger logger = Logger.getLogger(\"Analyzer\");\n logger.setLevel(Level.INFO);\n logger.fine( \"Parsing string\");\n\n Document doc = Jsoup.parse(htmlString);\n\n return doc.text();\n }", "public String parseHTML(String html) {\n\n int endIndex;\n for (int startIndex = html.indexOf(\"<figure\");\n startIndex >= 0;\n startIndex = html.indexOf(\"<figure\")) {\n endIndex = html.indexOf(\"figure>\", startIndex);\n if (endIndex == -1) {\n break;\n }\n String sub = html.substring(startIndex, endIndex + 7);\n html = html.replace(sub, \"\");\n }\n\n for (int startIndex = html.indexOf(\"<span class=\\\"editsection\");\n startIndex >= 0;\n startIndex = html.indexOf(\"<span class=\\\"editsection\")) {\n endIndex = html.indexOf(\"span>\", startIndex);\n if (endIndex == -1) {\n break;\n }\n String sub = html.substring(startIndex, endIndex + 5);\n html = html.replace(sub, \"\");\n }\n\n for (int startIndex = html.indexOf(\"<img\");\n startIndex >= 0;\n startIndex = html.indexOf(\"<img\")) {\n endIndex = html.indexOf(\"img>\", startIndex);\n if (endIndex == -1) {\n break;\n }\n String sub = html.substring(startIndex, endIndex + 5);\n html = html.replace(sub, \"\");\n }\n\n return html;\n }", "private static String fetchHTML(String link) {\n\t\tStringBuffer buffer = null;\n\t\ttry {\n\t\t\tURL url = new URL(getURL(link));\n\t\t\tInputStream is = url.openStream();\n\t\t\tint ptr = 0;\n\t\t\tbuffer = new StringBuffer();\n\t\t\twhile ((ptr = is.read()) != -1) {\n\t\t\t buffer.append((char)ptr);\n\t\t\t}\n\t\t} catch (Exception ex) {\n\t\t\tSystem.out.println(ex.getMessage());\n\t\t\tex.printStackTrace();\n\t\t}\n\t\treturn buffer.toString();\n\t}", "private static String getPriceFromHtml(String html)\n\t{\n\t\tString price = \"\";\n\t\tPattern p = Pattern.compile(SUPERVALU_PRICE_REGEX);\n\t\tMatcher m = p.matcher(html);\n\t\tboolean b = m.matches();\n\t\tif (b)\n\t\t{\n\t\t\tprice = m.group(1);\n\t\t}\n\t\treturn price;\n\t}", "String renderHTML();", "String getLastHtml();", "private String getText(URL url){\n\tString parsedHtml=null;\n\ttry{\n\t\tHttpURLConnection urlConn = (HttpURLConnection) url.openConnection();\n\t\tString line = null;\n\t\tStringBuilder tmp = new StringBuilder();\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(urlConn.getInputStream()));\n\t\twhile ((line = in.readLine()) != null) {\n\t\t tmp.append(line);\n\t\t}\n\t\t \n\t\tDocument doc = Jsoup.parse(tmp.toString());\n\t\tparsedHtml = doc.title() + doc.body().text();\n\t\t\n\t}\n\tcatch(IOException e){\n\t\tSystem.out.println(\"Page not reached for: \"+url );\n\t}\n\tfinally{\n\t\treturn parsedHtml;\n\t}\n\t\n}", "private String renderSpecific( String strHTML )\n {\n String strRender = strHTML;\n strRender = strRender.replaceAll( \"\\\\[lt;\", \"&lt;\" );\n strRender = strRender.replaceAll( \"\\\\[gt;\", \"&gt;\" );\n strRender = strRender.replaceAll( \"\\\\[nbsp;\", \"&nbsp;\" );\n strRender = strRender.replaceAll( \"\\\\[quot;\", \"&quot;\" );\n strRender = strRender.replaceAll( \"\\\\[amp;\", \"&amp;\" );\n strRender = strRender.replaceAll( \"\\\\[hashmark;\", \"#\" );\n\n if ( _strPageUrl != null )\n {\n strRender = strRender.replaceAll( \"#page_url\", _strPageUrl );\n }\n\n return strRender;\n }", "public String getStringFromHtmlTextAfterTagRemoval(@NotNull String htmlText, @NotNull String startTag, @NotNull String endTag) {\n String value = null;\n\n try {\n String completeRegex = startTag + \"(.+?)\" + endTag;\n\n final Pattern pattern = Pattern.compile(completeRegex, Pattern.DOTALL);\n final Matcher matcher = pattern.matcher(htmlText);\n boolean a = matcher.find();\n String valueMatcher = matcher.group(1);\n String slashRemove = valueMatcher.replaceAll(\"\\\\\\\\\", \"\");\n value = slashRemove.replaceAll(\"\\\"\", \"\");\n } catch (Exception e) {\n e.printStackTrace();\n }\n return value;\n\n }", "public static String convertHtmlToString(String html) {\n if (html == null) {\n return null;\n }\n if (html.length() == 0) {\n return html;\n }\n if (html.indexOf('&') < 0) {\n return html;\n }\n StringBuilder buff = new StringBuilder();\n for (int i = 0; i < html.length(); i++) {\n char ch = html.charAt(i);\n if (ch != '&') {\n buff.append(ch);\n continue;\n }\n int idx = html.indexOf(';', i + 1);\n if (idx < 0) {\n buff.append(\"???\");\n continue;\n }\n String key = html.substring(i + 1, idx);\n Character repl;\n if (key.startsWith(\"#\")) {\n if (key.startsWith(\"#x\")) {\n try {\n int code = Integer.parseInt(key.substring(2), 16);\n if (code < 0 || code > 0xffff) {\n repl = null;\n } else {\n repl = Character.valueOf((char) code);\n }\n } catch (NumberFormatException e) {\n repl = null;\n }\n } else {\n try {\n int code = Integer.parseInt(key.substring(1));\n if (code < 0 || code > 0xffff) {\n repl = null;\n } else {\n repl = Character.valueOf((char) code);\n }\n } catch (NumberFormatException e) {\n repl = null;\n }\n }\n } else {\n repl = CHAR_MAP.get(key);\n }\n if (repl == null) {\n buff.append(\"???\" + key + \"???\");\n continue;\n }\n buff.append(repl.charValue());\n i = idx;\n }\n return buff.toString();\n }", "@SuppressWarnings(\"deprecation\")\n public static String convertHTMLToText(String html) {\n if (Build.VERSION.SDK_INT < Build.VERSION_CODES.N) {\n return Html.fromHtml(html).toString();\n } else {\n return Html.fromHtml(html, Html.FROM_HTML_MODE_LEGACY).toString();\n }\n }", "public native final String html()/*-{\n\t\treturn this.html();\n\t}-*/;", "public static String getURLString(String str) {\n String str2 = \"\";\n try {\n String substring = str.substring(str.indexOf(\"url\\\">\") + 5);\n return substring.substring(0, substring.indexOf(\"<\"));\n } catch (Exception e) {\n e.printStackTrace();\n return str2;\n }\n }", "private String readHTML(URL url) {\n String urlContents = \"\";\n\n try {\n BufferedReader bufferedReader =\n new BufferedReader(new InputStreamReader(url.openStream()));\n StringBuilder stringBuilder = new StringBuilder();\n\n String line;\n while ((line = bufferedReader.readLine()) != null) {\n stringBuilder.append(line).append(\"\\n\");\n }\n\n urlContents = stringBuilder.toString();\n bufferedReader.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return urlContents;\n }", "private void getHtmlCode() {\n\t try {\n\t Document doc = Jsoup.connect(\"http://www.example.com/\").get();\n\t Element content = doc.select(\"a\").first();\n//\t return content.text();\n\t textView.setText(content.text());\n\t } catch (IOException e) {\n\t // Never e.printStackTrace(), it cuts off after some lines and you'll\n\t // lose information that's very useful for debugging. Always use proper\n\t // logging, like Android's Log class, check out\n\t // http://developer.android.com/tools/debugging/debugging-log.html\n\t Log.e(TAG, \"Failed to load HTML code\", e);\n\t // Also tell the user that something went wrong (keep it simple,\n\t // no stacktraces):\n\t Toast.makeText(this, \"Failed to load HTML code\",\n\t Toast.LENGTH_SHORT).show();\n\t }\n\t }", "public static String removeHTML(String str) {\n return removeHTML(str, true);\n }", "public static String HTMLText(String url) throws Exception\n\t{\n\t\tif (!isValidUrl(url))\n\t\t{\n\t\t\treturn \"\";\n\t\t}\n\t\tString outs = \"\";\n\n\t\tStringBean sb = new StringBean();\n\t\tsb.setLinks(false);\n\t\tsb.setReplaceNonBreakingSpaces(true);\n\t\tsb.setCollapse(false);\n\t\tsb.setURL(url);\n\t\ttry\n\t\t{\n\t\t\touts = sb.getStrings();\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tlogger.error(e.getMessage(), e);\n\t\t}\n\t\treturn outs;\n\t}", "public String parserXHtml(String html) {\r\n\t\torg.jsoup.nodes.Document document = Jsoup.parseBodyFragment(html);\r\n\t\tdocument.outputSettings().syntax(org.jsoup.nodes.Document.OutputSettings.Syntax.xml);\r\n\t\tdocument.outputSettings().charset(\"UTF-8\");\r\n\t\treturn document.toString();\r\n\t}", "private Spanned getRichText(String htmlText) {\n Spanned richText;\n if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.N) {\n richText = Html.fromHtml(htmlText, Html.FROM_HTML_MODE_LEGACY);\n } else {\n richText = Html.fromHtml(htmlText);\n }\n return richText;\n }", "private String parseHtmlText(HtmlPage htmlPage) {\n\n Document doc = Jsoup.parse(htmlPage.getRawHTML(), htmlPage.getURL());\n StringBuilder sb = new StringBuilder();\n doc.getElementsByClass(MAIN_CONTENT_CLASS).forEach(element -> {\n element.getElementsByTag(PARAGRAPH_TAG).forEach(paragraph_element -> {\n sb.append(paragraph_element.text()).append(SPACE);\n });\n });\n\n String parsedText = sb.toString();\n // IF case folding is set, perform it\n if (this.isCaseFolding) {\n parsedText = parsedText.toLowerCase();\n }\n\n // IF punctuation handling is set, perform it\n if (this.isPunctuationHandling) {\n parsedText = punctuationHandler(parsedText);\n }\n\n return parsedText;\n }", "protected String parseHtml(String html) {\n\t\tString tokens = new String();\n\t\ttry {\n\t\t\tDocument document = Jsoup.parse(html);\n\t\t\tdocument.select(\"code,pre\").remove();\n\t\t\tString textcontent = document.text();\n\t\t\tArrayList<String> cleaned = removeSpecialChars(textcontent);\n\t\t\tfor (String token : cleaned) {\n\t\t\t\ttokens += token + \" \";\n\t\t\t}\n\t\t} catch (Exception exc) {\n\t\t\t// handle the exception\n\t\t}\n\t\treturn tokens;\n\t}", "public String getHTML() throws Exception {\n\t\t// create object to store html source text as it is being collected\n\t\tStringBuilder html = new StringBuilder();\n\t\t// open connection to given url\n\t\tURL url = new File(urlString).toURI().toURL();\n\t\t// create BufferedReader to buffer the given url's HTML source\n\t\tBufferedReader htmlbr =\n\t\t\t\tnew BufferedReader(new InputStreamReader(url.openStream()));\n\t\tString line;\n\t\t// read each line of HTML code and store in StringBuilder\n\t\twhile ((line = htmlbr.readLine()) != null) {\n\t\t\thtml.append(line);\n\t\t}\n\t\thtmlbr.close();\n\t\t// convert StringBuilder into a String \n\t\tString stringHtml = html.toString();\n\t\t\n\t\t// preprocess the string to replace all special chars\n\t\tstringHtml.replaceAll(\"&#39\", \"'\");\n\t\tstringHtml.replaceAll(\"&#8208\", \"-\");\n\t\tstringHtml.replaceAll(\"&#38\", \"&\");\n\t\t\n\t\treturn stringHtml;\n\t}", "public String HtmlToString(String file) {\n String result = null;\n try {\n String webPage = url + file;\n URL url = new URL(webPage);\n URLConnection urlConnection = url.openConnection();\n InputStream is = urlConnection.getInputStream();\n InputStreamReader isr = new InputStreamReader(is);\n\n int numCharsRead;\n char[] charArray = new char[1024];\n StringBuffer sb = new StringBuffer();\n while ((numCharsRead = isr.read(charArray)) > 0) {\n sb.append(charArray, 0, numCharsRead);\n }\n result = sb.toString();\n } catch (Exception ignored) {\n }\n return result;\n }", "@SuppressWarnings(\"deprecation\")\n public static Spanned fromHtml(String html) {\n Spanned result;\n if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.N) {\n result = Html.fromHtml(html, Html.FROM_HTML_MODE_LEGACY);\n } else {\n result = Html.fromHtml(html);\n }\n return result;\n }", "@SuppressWarnings(\"deprecation\")\n public static Spanned fromHtml(String html) {\n Spanned result;\n if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.N) {\n result = Html.fromHtml(html, Html.FROM_HTML_MODE_LEGACY);\n } else {\n result = Html.fromHtml(html);\n }\n return result;\n }", "private static String getHTMLFile(String googleScholarURL) throws Exception {\r\n HTMLExtractor googleScholarParser = new HTMLExtractor();\r\n String rawHTMLString = googleScholarParser.getHTML(googleScholarURL);\r\n return rawHTMLString;\r\n }", "public static Element parse(SafeHtml html) {\n Element e = DOM.createDiv();\n setInnerHTML(e, html);\n return DOM.getFirstChild(e);\n }", "public final static String toPlainText(String html)\r\n {\r\n if (html == null)\r\n {\r\n return null;\r\n }\r\n\r\n try\r\n {\r\n final HTMLStripReader reader = new HTMLStripReader(new StringReader(html));\r\n reader.setKeepAlignedPositions(false);\r\n final StringWriter writer = new StringWriter();\r\n final char [] buffer = new char [4096];\r\n int len;\r\n while ((len = reader.read(buffer)) > 0)\r\n {\r\n writer.write(buffer, 0, len);\r\n }\r\n \r\n return writer.toString();\r\n }\r\n catch (IOException e)\r\n {\r\n throw new RuntimeException(\"Unreachable code.\");\r\n }\r\n }", "protected String getWebElementTextJS(String htmlText) {\n return findElementViaJS(htmlText).getText();\n }", "public String extractHtml(HttpURLConnection connection) {\n if (connection == null) return \"\";\n Scanner scanner = null;\n try {\n scanner = new Scanner(connection.getInputStream());\n } catch (IOException e) {\n return \"\";\n }\n scanner.useDelimiter(\"\\\\Z\");\n try {\n return scanner.next();\n } catch (Exception e) {\n return \"\";\n }\n }", "public String convertMarkupToHTML(String text) {\n return text;\n }", "private static String fromHtmlEntity(String str) {\n Character ch = map.get(str);\n return (ch != null) ? ch.toString() : str;\n }", "public String getHtmlText() {\n return htmlText;\n }", "public static String getNormalizedDom(String html) {\n \t\n \tString s = Pattern.quote(html.toUpperCase());\n \t//String s = html;\n \t\n \ts = s.replaceAll(\"\\t\", \" \");\n \ts = s.replaceAll(\"\\n\", \" \");\n \ts = s.replaceAll(\" +\", \" \");\n \t//s = s.replaceAll(\"<SCRIPT.*>.*</SCRIPT>\", \"\");\n \ts = s.replaceAll(\"> *\", \">\");\n \ts = s.replaceAll(\" *<\", \"<\");\n \t\n \t/**s = s.replaceAll(\"(< *INPUT\" + wPat + \" \" + txtPat + wPat + \") \" + valPat +\"(\" + wPat + \">)\",\"$1 VALUE='' $2\");\n \ts = s.replaceAll(\"(< *INPUT\" + wPat + \") \" + valPat + \"( \" + wPat + txtPat + wPat + \">)\", \"$1 VALUE='' $2\");\n \t\n \ts = s.replaceAll(\"(< *INPUT\" + wPat + \" \" + pwdPat + wPat + \") \" + valPat +\"(\" + wPat + \">)\",\"$1 VALUE='' $2\");\n \ts = s.replaceAll(\"(< *INPUT\" + wPat + \") \" + valPat + \"( \" + wPat + pwdPat + wPat + \">)\", \"$1 VALUE='' $2\");**/\n \t\n \ts = s.replaceAll(\"(<\\\\w+)[^>]*(>)\",\"$1$2\");\n \t\n \treturn s;\n }", "private String extractBodyAndScriptsFromTemplate(String html) {\n \n // Replace UID:s\n html = html.replaceAll(\"_UID_\", pid + \"__\");\n \n // Exctract script-tags\n scripts = \"\";\n int endOfPrevScript = 0;\n int nextPosToCheck = 0;\n String lc = html.toLowerCase();\n String res = \"\";\n int scriptStart = lc.indexOf(\"<script\", nextPosToCheck);\n while (scriptStart > 0) {\n res += html.substring(endOfPrevScript, scriptStart);\n scriptStart = lc.indexOf(\">\", scriptStart);\n int j = lc.indexOf(\"</script>\", scriptStart);\n scripts += html.substring(scriptStart + 1, j) + \";\";\n nextPosToCheck = endOfPrevScript = j + \"</script>\".length();\n scriptStart = lc.indexOf(\"<script\", nextPosToCheck);\n }\n res += html.substring(endOfPrevScript);\n \n // Extract body\n html = res;\n lc = html.toLowerCase();\n int startOfBody = lc.indexOf(\"<body\");\n if (startOfBody < 0) {\n res = html;\n } else {\n res = \"\";\n startOfBody = lc.indexOf(\">\", startOfBody) + 1;\n int endOfBody = lc.indexOf(\"</body>\", startOfBody);\n if (endOfBody > startOfBody) {\n res = html.substring(startOfBody, endOfBody);\n } else {\n res = html.substring(startOfBody);\n }\n }\n \n return res;\n }", "private String escapeHtml(String html) {\r\n\t\tif (html == null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn html.replaceAll(\"&\", \"&amp;\").replaceAll(\"<\", \"&lt;\").replaceAll(\">\", \"&gt;\");\r\n\t}", "private String escapeHtml(String html) {\n if (html == null) {\n return null;\n }\n return html.replaceAll(\"&\", \"&amp;\").replaceAll(\"<\", \"&lt;\").replaceAll(\n \">\", \"&gt;\");\n }", "private String escapeHtml(String html) {\n if (html == null) {\n return null;\n }\n return html.replaceAll(\"&\", \"&amp;\").replaceAll(\"<\", \"&lt;\").replaceAll(\n \">\", \"&gt;\");\n }", "private String escapeHtml(String html) {\r\n\t\tif (html == null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn html.replaceAll(\"&\", \"&amp;\").replaceAll(\"<\", \"&lt;\")\r\n\t\t\t\t.replaceAll(\">\", \"&gt;\");\r\n\t}", "private String escapeHtml(String html) {\n\t\tif (html == null) {\n\t\t\treturn null;\n\t\t}\n\t\treturn html.replaceAll(\"&\", \"&amp;\").replaceAll(\"<\", \"&lt;\")\n\t\t\t\t.replaceAll(\">\", \"&gt;\");\n\t}", "private String escapeHtml(String html) {\n\t\tif (html == null) {\n\t\t\treturn null;\n\t\t}\n\t\treturn html.replaceAll(\"&\", \"&amp;\").replaceAll(\"<\", \"&lt;\")\n\t\t\t\t.replaceAll(\">\", \"&gt;\");\n\t}", "public static String stripHTML(final String in) {\n\t return in.replaceAll(\"</?(A|a|B|b|BR|br|DD|dd|DL|dl|DT|dt|H2|h2|I|i|LI|li|P|p|PRE|pre|TT|tt|UL|ul|BLOCKQUOTE|blockquote)\\\\s*[^>]*>\",\"\");\n// return in.replaceAll(\"<\\\\w+\\\\s*[^>]>\",\"\");\n //return in.replaceAll(\"<(B|BR)\\\\s*[^>]*>\",\"\");\n\t}", "final String removeHTMLTags(String inputLine)\r\n {\r\n StringBuffer outputLine=new StringBuffer(\"\");\r\n\tboolean foundTag=false;\r\n\tfor(int i=0;i<inputLine.length();i++)\r\n\t{\r\n\t if(inputLine.charAt(i)=='<')\r\n\t foundTag=true;\r\n else if(inputLine.charAt(i)=='>')\r\n\t foundTag=false;\r\n\t else if(foundTag==false)\r\n\t outputLine.append(inputLine.charAt(i));\r\n\t}\r\n\treturn (outputLine.toString());\r\n }", "HTML createHTML();", "public static String convertStringToHtml(String s) {\n if (s == null) {\n return null;\n }\n if (s.length() == 0) {\n return s;\n }\n StringBuilder buff = new StringBuilder();\n for (int i = 0; i < s.length(); i++) {\n char ch = s.charAt(i);\n String token = CODE_MAP.get(ch);\n if (token == null) {\n if (ch < 128) {\n buff.append(ch);\n } else {\n buff.append('&');\n buff.append('#');\n buff.append((int) ch);\n buff.append(';');\n }\n } else {\n buff.append('&');\n buff.append(token);\n buff.append(';');\n }\n }\n return buff.toString();\n }", "public void setHTML(String html);", "private String processHtmlDocumentFromBrowser(SessionState state, String strFromBrowser)\n\t{\n\t\tStringBuffer alertMsg = new StringBuffer();\n\t\tString text = FormattedText.processHtmlDocument(strFromBrowser, alertMsg);\n\t\tif (alertMsg.length() > 0) addAlert(state, alertMsg.toString());\n\t\treturn text;\n\t}", "public static String getHrefInnerHtml(String href) {\n if (TextUtils.isEmpty(href)) {\n return \"\";\n }\n String hrefReg = \".*<[\\\\s]*a[\\\\s]*.*>(.+?)<[\\\\s]*/a[\\\\s]*>.*\";\n Pattern hrefPattern = Pattern.compile(hrefReg, Pattern.CASE_INSENSITIVE);\n Matcher hrefMatcher = hrefPattern.matcher(href);\n if (hrefMatcher.matches()) {\n return hrefMatcher.group(1);\n }\n return href;\n }", "public String ProcessHTMLPage(String url) {\n\t\tString htmlSource = null;\n\t\tSystem.out.println(\"processing ..\" + url);\n\t\tStringBuilder stringBuilder = new StringBuilder();\n\t\ttry {\n\t\t\thtmlSource = getURLSource(url);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tDocument document = Jsoup.parse(htmlSource);\n\n\t\torg.jsoup.select.Elements allElements = document.getAllElements();\n\t\tfor (Element element : allElements) {\n\t\t\tif (element.nodeName().matches(\n\t\t\t\t\t\"^.*(p|h1|h2|h3|h4|h5|h6|title|body|li|a|em|i|ins|big|bdo|b|blockquote|center|mark|small|string|sub|sup|tt|u).*$\")) {\n\t\t\t\tif (!element.ownText().isEmpty()) {\n\t\t\t\t\t// System.out.println(element.nodeName()\n\t\t\t\t\t// + \" \" + element.ownText());\n\t\t\t\t\tstringBuilder.append(element.ownText());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn stringBuilder.toString();\n\n\t}", "private String extractBodyAndScriptsFromTemplate(String html) {\n \t\t\n \t\t// Exctract script-tags\n \t\tscripts =\"\";\n \t\tint endOfPrevScript = 0;\n \t\tint nextPosToCheck = 0;\n \t\tString lc = html.toLowerCase();\n \t\tString res = \"\";\n \t\tint scriptStart = lc.indexOf(\"<script\", nextPosToCheck);\n \t\twhile (scriptStart > 0) {\n \t\t\tres += html.substring(endOfPrevScript, scriptStart);\n \t\t\tscriptStart = lc.indexOf(\">\", scriptStart);\n \t\t\tint j = lc.indexOf(\"</script>\",scriptStart);\n \t\t\tscripts += html.substring(scriptStart+1,j) + \";\";\n \t\t\tnextPosToCheck = endOfPrevScript = j + \"</script>\".length();\n \t\t\tscriptStart = lc.indexOf(\"<script\", nextPosToCheck);\n \t\t}\n \t\tres += html.substring(endOfPrevScript);\n \t\t\n \t\t// Extract body\n \t\thtml = res;\n \t\tlc = html.toLowerCase();\n \t\tint startOfBody = lc.indexOf(\"<body\");\n \t\tif (startOfBody < 0) {\n \t\t\tres = html;\n \t\t} else {\n \t\t\tres = \"\";\n \t\t\tstartOfBody = lc.indexOf(\">\",startOfBody)+1;\n \t\t\tint endOfBody = lc.indexOf(\"</body>\",startOfBody);\n \t\t\tif (endOfBody > startOfBody)\n \t\t\t\tres = html.substring(startOfBody,endOfBody);\n \t\t\telse \n \t\t\t\tres = html.substring(startOfBody);\n\t\t}\n \t\t\n \t\treturn res;\n \t}", "public static String getHTML() {\n if (create()) {\n return tag.getInnerHTML();\n }\n return \"\";\n }", "private String getAnchorTagDataPart(String string) {\r\n string = string.toLowerCase();\r\n \r\n /*this data should be in the form of <a herf=\"action.jsp&objected=1.1.1.1\">Value</a>*/\r\n int anchorBegin = string.indexOf(\"<a \");\r\n int anchorEnd = string.indexOf(\"</a>\");\r\n /*If the string is not of above specified format i.e. not begining with '<a' or ending with '</a>' \r\n then return the original string.*/ \r\n if(anchorBegin == -1 || anchorEnd == -1)\r\n return string;\r\n /*\r\n * Remove the </a> part from the stirng\r\n * Now the string becomes <a herf=\"action.jsp&objected=1.1.1.1\">Value\r\n * */\r\n string = string.substring(anchorBegin, anchorEnd);\r\n /*Now get the index of '>' and return the sub string of string.indexOf('>') + 1*/\r\n string = string.substring(string.indexOf('>') + 1);\r\n \r\n return string;\r\n }", "public static String HTMLLinkString(String url) throws Exception\n\t{\n\t\tURL[] links = HTMLLinks(url);\n\t\tString urls = \"\";\n\t\tfor (URL link : links)\n\t\t{\n\t\t\turls = urls + link.toString() + \" \";\n\t\t}\n\t\treturn urls.trim();\n\t}", "public String getMessageTextAsHTML();", "protected String parseAndSaveHtml() {\n\t\t// the line of the html code\n\t\tString inputLine;\n\n\t\t// creates the folder's name from the domain name\n\t\tString folderName = nameFolder();\n\t\tFile folderNameFile = new File(path + folderName);\n\n\t\t// checks if there is already a folder with the same name\n\t\tif (!existsFolder(folderNameFile)) {\n\t\t\tmakeFolder(folderNameFile);\n\t\t}\n\n\t\t// creates the file with a random unique name\n\t\tString fileName = generateFileName(folderName);\n\t\tFile file = new File(path + folderName + \"\\\\\" + fileName + \".txt\");\n\n\t\ttry {\n\t\t\t// streams which help to read from the url\n\t\t\tInputStreamReader is = new InputStreamReader(url.openStream(), \"UTF-8\");\n\t\t\tBufferedReader br = new BufferedReader(is);\n\t\t\tbr.mark(0);\n\n\t\t\t// streams which help to write from the url\n\t\t\tFileOutputStream fos = new FileOutputStream(file);\n\t\t\tOutputStreamWriter osw = new OutputStreamWriter(fos, \"UTF-8\");\n\t\t\tBufferedWriter bw = new BufferedWriter(osw);\n\n\t\t\t// reads line by line the html code\n\t\t\twhile ((inputLine = br.readLine()) != null) {\n\t\t\t\tbw.write(inputLine);\n\t\t\t\tbw.newLine();\n\t\t\t}\n\t\t\tbr.close();\n\t\t\tbw.close(); //closes the writer stream\n\n\t\t\treturn path + folderName + \"\\\\\" + fileName + \".txt\";\n\t\t} catch (IOException e) {\n\t\t\tfile.delete();\n\t\t\treturn null;\n\t\t}\n\n\t}", "public static String removeHTML(String str, boolean addSpace) {\n if (str == null) return \"\";\n StringBuffer ret = new StringBuffer(str.length());\n int start = 0;\n int beginTag = str.indexOf(\"<\");\n int endTag = 0;\n if (beginTag == -1)\n return str;\n \n while (beginTag >= start) {\n if (beginTag > 0) {\n ret.append(str.substring(start, beginTag));\n \n // replace each tag with a space (looks better)\n if (addSpace) ret.append(\" \");\n }\n endTag = str.indexOf(\">\", beginTag);\n \n // if endTag found move \"cursor\" forward\n if (endTag > -1) {\n start = endTag + 1;\n beginTag = str.indexOf(\"<\", start);\n }\n // if no endTag found, get rest of str and break\n else {\n ret.append(str.substring(beginTag));\n break;\n }\n }\n // append everything after the last endTag\n if (endTag > -1 && endTag + 1 < str.length()) {\n ret.append(str.substring(endTag + 1));\n }\n return ret.toString().trim();\n }", "private static String getTextFromHtml(File f) throws Exception {\n\t\tInputStream is = null;\n\t\ttry {\n\t\t\tis = new FileInputStream(f);\n\t\t\tContentHandler contenthandler = new BodyContentHandler();\n\t\t\tMetadata metadata = new Metadata();\n\t\t\tParser parser = new AutoDetectParser();\n\t\t\tparser.parse(is, contenthandler, metadata, new ParseContext());\n\t\t\treturn contenthandler.toString();\n\n\t\t} catch (Exception e) {\n\t\t\tthrow e;\n\t\t} finally {\n\t\t\tif (is != null)\n\t\t\t\tis.close();\n\t\t}\n\t}", "private static String m1475b(String str) {\n return \"<!DOCTYPE html>\\n<html>\\n<head lang=\\\"en\\\">\\n <meta charset=\\\"UTF-8\\\">\\n <title></title>\\n</head>\\n<body style=\\\"margin:0;padding:0;\\\">\\n <script src=\\\"https://z.moatads.com/\" + str + \"/moatad.js\\\" type=\\\"text/javascript\\\"></script>\\n\" + \"</body>\\n\" + \"</html>\";\n }", "public static BNUser userFromHTML(String htmlString) {\n\t\treturn new BNUser();\n\t}", "public String getStringToTextAndSkip(String text) throws ParseException {\n int oldPos = position;\n int pos = html.indexOf(text, position);\n if (pos == -1) {\n throw new ParseException(\"Cannot find text to get string for '\" + text + \"'\", position);\n }\n position = pos + text.length();\n return html.substring(oldPos, pos);\n }", "public String getHtml() {\n return html;\n }", "private static String removeVisibleHTMLTags(String str) {\n str = stripLineBreaks(str);\n StringBuffer result = new StringBuffer(str);\n StringBuffer lcresult = new StringBuffer(str.toLowerCase());\n \n // <img should take care of smileys\n String[] visibleTags = {\"<img\"}; // are there others to add?\n int stringIndex;\n for ( int j = 0 ; j < visibleTags.length ; j++ ) {\n while ( (stringIndex = lcresult.indexOf(visibleTags[j])) != -1 ) {\n if ( visibleTags[j].endsWith(\">\") ) {\n result.delete(stringIndex, stringIndex+visibleTags[j].length() );\n lcresult.delete(stringIndex, stringIndex+visibleTags[j].length() );\n } else {\n // need to delete everything up until next closing '>', for <img for instance\n int endIndex = result.indexOf(\">\", stringIndex);\n if (endIndex > -1) {\n // only delete it if we find the end! If we don't the HTML may be messed up, but we\n // can't safely delete anything.\n result.delete(stringIndex, endIndex + 1 );\n lcresult.delete(stringIndex, endIndex + 1 );\n }\n }\n }\n }\n \n // TODO: This code is buggy by nature. It doesn't deal with nesting of tags properly.\n // remove certain elements with open & close tags\n String[] openCloseTags = {\"li\", \"a\", \"div\", \"h1\", \"h2\", \"h3\", \"h4\"}; // more ?\n for (int j = 0; j < openCloseTags.length; j++) {\n // could this be better done with a regular expression?\n String closeTag = \"</\"+openCloseTags[j]+\">\";\n int lastStringIndex = 0;\n while ( (stringIndex = lcresult.indexOf( \"<\"+openCloseTags[j], lastStringIndex)) > -1) {\n lastStringIndex = stringIndex;\n // Try to find the matching closing tag (ignores possible nesting!)\n int endIndex = lcresult.indexOf(closeTag, stringIndex);\n if (endIndex > -1) {\n // If we found it delete it.\n result.delete(stringIndex, endIndex+closeTag.length());\n lcresult.delete(stringIndex, endIndex+closeTag.length());\n } else {\n // Try to see if it is a self-closed empty content tag, i.e. closed with />.\n endIndex = lcresult.indexOf(\">\", stringIndex);\n int nextStart = lcresult.indexOf(\"<\", stringIndex+1);\n if (endIndex > stringIndex && lcresult.charAt(endIndex-1) == '/' && (endIndex < nextStart || nextStart == -1)) {\n // Looks like it, so remove it.\n result.delete(stringIndex, endIndex + 1);\n lcresult.delete(stringIndex, endIndex + 1);\n \n }\n }\n }\n }\n \n return result.toString();\n }", "@JavascriptInterface\n @SuppressWarnings(\"unused\")\n public void processHTML(String html) {\n\n Element content;\n String value = \"\";\n try {\n org.jsoup.nodes.Document doc = Jsoup.parse(html, \"UTF-8\");\n content = doc.getElementsByClass(\"rupee\").get(0);\n value = content.text();\n } catch (Exception e) {\n e.printStackTrace();\n }\n listener.update(value);\n }", "private String removeHTML(String word) {\r\n\t\tString result = \"\";\r\n\t\t\r\n\t\tString temp = null;\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tfor(int i=0;i<word.length();i++) {\r\n\t\t\tchar character = word.charAt(i);\r\n\t\t\t\r\n\t\t\t//if < is found we don't add that text \r\n\t\t\tif(word.charAt(i) == '<') {\r\n\t\t\t\tstartFlag = true;\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t//if < is found we don't add that text \r\n\t\t\tif(startFlag == true) {\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t//System.out.println(word.charAt(i)+\" Removed\");\r\n\t\t\t\t//end bracket > found so we can continue to add now \r\n\t\t\t\tif(character == '>') {\r\n\t\t\t\t\tstartFlag = false;\r\n\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t}else {\r\n\t\t\t\t\r\n\t\t\t\tif(i == 0) {\t\t\t\t\r\n\t\t\t\t\tresult = Character.toString(character);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tresult += character;\r\n\t\t\t\t}\t\t\r\n\t\t\t\t\r\n\t\t\t}\t\t\t\t\r\n\t\t\t\r\n\t\t}\t\r\n\t\t\ttemp = result;\r\n\t\t\treturn temp;\t\t \r\n\t\t\r\n\t}", "private static String convertForHTML(final String src) {\n String s = src;\n for (Map.Entry<String, String> entry: HTML_CONVERSIONS.entrySet()) s = s.replace(entry.getKey(), entry.getValue());\n return s;\n }", "public static String HTMLText(String url, String filter) throws ParserException\n\t{\n\t\tString text = \"\";\n\t\tList<String> sList;\n\t\tParser parser = getParser(url);\n\t\tfor (NodeIterator i = parser.elements(); i.hasMoreNodes();)\n\t\t{\n\t\t\tsList = getText(i.nextNode(), filter.toUpperCase());\n\t\t\tIterator<String> it = sList.iterator();\n\t\t\twhile (it.hasNext())\n\t\t\t{\n\t\t\t\ttext = text + \" \" + it.next();\n\t\t\t}\n\t\t}\n\t\treturn text;\n\t}", "protected String completeHtml(String data) {\n if (data.indexOf(\"<html>\") == -1) {\n\t\t\tdata = \"<html><head></head><body style='margin:0;padding:0;'>\"\n\t\t\t\t\t+ data + \"</body></html>\";\n }\n\n\t\treturn data;\n\t}", "public static String unencodeHtml(String html) {\n if (html == null) {\n return \"\";\n }\n String processed = StringEscapeUtils.unescapeHtml4(html);\n StringBuffer unencodedContent = new StringBuffer(processed.length());\n Matcher fixCharMatch = unencodeCharactersPattern.matcher(processed);\n while (fixCharMatch.find()) {\n fixCharMatch.appendReplacement(unencodedContent, Character.toString((char) Integer.parseInt(fixCharMatch.group(1))));\n }\n fixCharMatch.appendTail(unencodedContent);\n return unencodedContent.toString();\n }", "public static Spanned fromHtml(String argValue) {\n if (com.rz.librarycore.utils.Utils.isNullOrEmpty(argValue)) {\n return null;\n }\n if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.N) {\n return Html.fromHtml(argValue, Html.FROM_HTML_MODE_LEGACY);\n } else {\n return Html.fromHtml(argValue);\n }\n }", "protected SafeHtml getInnerHtml() {\n return html;\n }", "String extractContentFromDocument(BotswanaCourtDocument bcd, String htmlfile,int startpage,int endpage){\n\t\t//dom tree structured in two formats example for 1st format(47-98) USA.1947.002 and for 2nd format(1998.25 - 2013) USA.2000.003\n\t\tDocument document = null;\n\t\tFile input = new File(htmlfile);\n\t\tString textContent = null;\n\t \t\n\t\tif( htmlfile == null ){\n\t\t\tSystem.out.println(\"File name is not valid\");\n\t\t}\n\t\telse{\n\t\t\ttry{\n\t\t\t\tdocument = Jsoup.parse(input,\"UTF-8\");\n\t\t\t\tString htmlText = document.body().toString();\n\t\t\t\tString textToBeExtracted = document.select(\"title\").text();\n\t \tSystem.out.println(\"text extracted =\"+textToBeExtracted);\n\t \t\n\t \t\n\t \tPattern pattern = Pattern.compile(\"\\\\((.*?)\\\\)\");\n\t \tMatcher matcher = pattern.matcher(textToBeExtracted);\n\t \tArrayList<String> matchedDataArray = new ArrayList<String>();\n\t \twhile(matcher.find()){\n\t \t\tmatchedDataArray.add(matcher.group());\n\t \t}\n\t \tif(matchedDataArray.size()>0){\n\t \t\tint firstIndex = textToBeExtracted.indexOf(matchedDataArray.get(matchedDataArray.size()-2)); \n\t\t \tif(firstIndex == -1){\n\t\t \t\tbcd.setParticipantsName(textToBeExtracted);\n\t\t \t}\n\t\t \telse{\n\t\t \t\tbcd.setParticipantsName(textToBeExtracted.substring(0,firstIndex-1));\n\t\t \t}\n\t\t \tbcd.setDecisionDate( matchedDataArray.get(matchedDataArray.size()-1));\n\t\t \tbcd.setCaseId(matchedDataArray.get(matchedDataArray.size()-2));\n\t\t \t\n\t \t}\n\t \telse{\n\t \t\tbcd.setParticipantsName(textToBeExtracted);\n\t \t\tbcd.setDecisionDate(\"\");\n\t\t \tbcd.setCaseId(\"\");\n\t \t}\n\t \t\n//\t \tint indexOfParticipantsEnd = textToBeExtracted.indexOf(\"[\");\n//\t \tString participantsName = textToBeExtracted.substring(0,indexOfParticipantsEnd-1);\n//\t \tbcd.setParticipantsName(participantsName);\n//\t \t\n//\t \tint indexOfDateStart = textToBeExtracted.indexOf(\"(\");\n//\t \tint indexOfDateEnd = textToBeExtracted.indexOf(\")\");\n//\t \tString decideDate = textToBeExtracted.substring(indexOfDateStart+1, indexOfDateEnd-1);\n//\t \tbcd.setDecisionDate(decideDate);\n//\t \t\n//\t \t\n//\t \tString caseIDPatternString = \"SC ([0-9]+/[0-9]+|CRI [0-9]+/[0-9]+)\";\n//\t \tPattern caseidPattern = Pattern.compile(caseIDPatternString);\n//\t \tMatcher caseidMatcher = caseidPattern.matcher(htmlText);\n//\t \t\n//\t \tString caseID =\"\";\n//\t \twhile (caseidMatcher.find()) {\n//\t \t\tcaseID = caseidMatcher.group();\n//\t \t \n//\t \t}\n//\t \tbcd.setCaseId(caseID);\n\t \t\n\t \ttextContent = htmlText;\n\t \t\n\t \t\n\t \t}\n\t \tcatch(Exception e){\n\t \t\tSystem.out.println(\"Error in parsing html : \" + e.getMessage());\n\t \t}\n\t\t}\n\t\treturn textContent;\n\t}", "public static String stripHtml( String source )\n {\n String regex =\n \"</?(a|b|big|body|br|center|dd|dl|dt|em|embed|font|form|h1|h2|h3|h4|h5|h6|head|hr|html|i|it|img|input|li|link|menu|meta|ol|option|p|small|strike|strong|table|td|th|title|tr|tt|u|ul).*?>\";\n Pattern p = Pattern.compile( regex, Pattern.DOTALL | Pattern.CASE_INSENSITIVE );\n return p.matcher( source ).replaceAll( \"\" );\n }", "protected String value () throws HTMLParseException {\r\n while (nextToken == EQUALS) {\r\n match (EQUALS);\r\n if (nextToken == STRING ||\r\n nextToken == SQSTRING ||\r\n nextToken == DQSTRING) {\r\n String val = stringValue;\r\n match (nextToken);\r\n return val;\r\n }\r\n return \"\";\r\n }\r\n return null;\r\n }", "public static String getWebPageSource(String webPage) throws Exception {\n URLConnection bc = new URL(webPage).openConnection();\r\n bc.setRequestProperty(\"user-Agent\", \"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11\");\r\n BufferedReader in = new BufferedReader(new InputStreamReader(bc.getInputStream()));\r\n\r\n String inputLine = \"\";\r\n String text = \"\";\r\n while ((inputLine = in.readLine()) != null) {\r\n text += inputLine;\r\n }\r\n in.close();\r\n\r\n return text;\r\n }", "public static String getText(String url)\n {\n try {\n\t URL website = new URL(url);\n\t URLConnection connection = website.openConnection();\n\t BufferedReader in = new BufferedReader(\n\t new InputStreamReader(\n\t connection.getInputStream()));\n\t\n\t StringBuilder response = new StringBuilder();\n\t String inputLine = \"\";\n\t while ((inputLine = in.readLine()) != null) \n\t \tresponse.append(inputLine);\n\n\t\t\tin.close();\n\t\t\t\n\t return response.toString();\n\t\t} catch (IOException e) {\n\t\t\tDebug.Error(e.getMessage());\n\t\t}\n return \"\";\n }", "public static String escapeHTML(String str){\r\n\t\treturn FuzzyXMLUtil.escape(str, true);\r\n\t}", "public static String toHTML(String s) {\n\t\ts=replace(s,\"<\",\"&lt;\");\n\t\ts=replace(s,\">\",\"&gt;\");\n\t\ts=replace(s,\"\\n\",\"<br>\\n\");\n\t\treturn s;\n\t}", "protected static String toText( String str )\n throws IOException\n {\n if ( StringUtils.isEmpty( str ) )\n {\n return \"\";\n }\n \n final StringBuffer sb = new StringBuffer();\n \n HTMLEditorKit.Parser parser = new ParserDelegator();\n HTMLEditorKit.ParserCallback htmlCallback = new HTMLEditorKit.ParserCallback()\n {\n /** {@inheritDoc} */\n public void handleText( char[] data, int pos )\n {\n // the parser parses things like <br /> as \"\\n>\"\n if ( data[0] == '>' )\n {\n for ( int i = 1; i < data.length; i++ )\n {\n if ( data[i] == '\\n' )\n {\n sb.append( ' ' );\n }\n else\n {\n sb.append( data[i] );\n }\n }\n }\n else\n {\n for ( int i = 0; i < data.length; i++ )\n {\n if ( data[i] == '\\n' )\n {\n sb.append( ' ' );\n }\n else\n {\n sb.append( data[i] );\n }\n }\n }\n }\n };\n \n parser.parse( new StringReader( PluginUtils.makeHtmlValid( str ) ), htmlCallback, true );\n \n return StringUtils.replace( sb.toString(), \"\\\"\", \"'\" ); // for CDATA\n }", "private String normolize(String str) {\n String str1 = str.replaceAll(\"<div class=\\\"cl\\\"/></div>\", \"\");\n //str1 = new String(str1.getBytes(), \"\");\n return str1;\n }", "public String getNextMatchFromHTML(String strValue) {\n\t\treturn null;\n\t}", "public String extractText(String urlString) {\n String text = \"\";\n try {\n URL url = new URL(urlString);\n text = ArticleExtractor.INSTANCE.getText(url); \n } catch (Exception ex) {\n Logger.getLogger(TextExtractor.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n return text;\n }", "private String getRSDMetaTagHref(String urlString) {\n\t\tInputStream in = getResponse(urlString);\r\n\r\n\t\t// parse the html and get the attribute for xmlrpc endpoint\r\n\t\tif (in != null) {\r\n\t\t\tXmlPullParser parser = Xml.newPullParser();\r\n\t\t\ttry {\r\n\t\t\t\t// auto-detect the encoding from the stream\r\n\t\t\t\tparser.setInput(in, null);\r\n\t\t\t\tint eventType = parser.getEventType();\r\n\t\t\t\twhile (eventType != XmlPullParser.END_DOCUMENT) {\r\n\t\t\t\t\tString name = null;\r\n\t\t\t\t\tString rel = \"\";\r\n\t\t\t\t\tString type = \"\";\r\n\t\t\t\t\tString href = \"\";\r\n\t\t\t\t\tswitch (eventType) {\r\n\t\t\t\t\tcase XmlPullParser.START_TAG:\r\n\t\t\t\t\t\tname = parser.getName();\r\n\t\t\t\t\t\tif (name.equalsIgnoreCase(\"link\")) {\r\n\t\t\t\t\t\t\tfor (int i = 0; i < parser.getAttributeCount(); i++) {\r\n\t\t\t\t\t\t\t\tString attrName = parser.getAttributeName(i);\r\n\t\t\t\t\t\t\t\tString attrValue = parser.getAttributeValue(i);\r\n\t\t\t\t\t\t\t\tif (attrName.equals(\"rel\")) {\r\n\t\t\t\t\t\t\t\t\trel = attrValue;\r\n\t\t\t\t\t\t\t\t} else if (attrName.equals(\"type\"))\r\n\t\t\t\t\t\t\t\t\ttype = attrValue;\r\n\t\t\t\t\t\t\t\telse if (attrName.equals(\"href\"))\r\n\t\t\t\t\t\t\t\t\thref = attrValue;\r\n\r\n\t\t\t\t\t\t\t\t// Log.trace(\"attribute name: \"+\r\n\t\t\t\t\t\t\t\t// parser.getAttributeName(i));\r\n\t\t\t\t\t\t\t\t// Log.trace(\"attribute value: \"+parser.getAttributeValue(i));\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tif (rel.equals(\"EditURI\")\r\n\t\t\t\t\t\t\t\t\t&& type.equals(\"application/rsd+xml\")) {\r\n\t\t\t\t\t\t\t\treturn href;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t// currentMessage.setLink(parser.nextText());\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\teventType = parser.next();\r\n\t\t\t\t}\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\treturn null; // never found the rsd tag\r\n\t}", "static public String extractBody(String content)\r\n\t{ \r\n\t\tint startBody1 = content.indexOf(\"<body\");\r\n\t\tint endBody1 = content.indexOf(\">\",startBody1);\r\n\t\t\r\n\t\tint startBody2 = content.indexOf(\"</body>\");\r\n\t\t\r\n\t\treturn content.substring(endBody1+1, startBody2);\t\r\n\t}", "public String cleanHtmlTextForPlayer(String unrefinedHtmlText) {\n\n String figureRemove = replaceAllCharacter(unrefinedHtmlText, ConstantUtil.HTML_EXTRACT_FIGURE_REGEX, ConstantUtil.BLANK);\n String figcaptionRemove = replaceAllCharacter(figureRemove, ConstantUtil.HTML_EXTRACT_FIGCAPTION_REGEX, ConstantUtil.BLANK);\n String almostRefinedText = figcaptionRemove.replaceAll(ConstantUtil.HTML_EXTRACT_IMG_REGEX, ConstantUtil.BLANK);\n return almostRefinedText;\n\n }", "private static Set<String> scrapeHTML(String html) {\n\t\tSet<String> set = new HashSet<String>();\n\t\tint skipLength = 0;\n\t\tint counter = 0;\n\t\t// the subtraction of 15 is because of the number of characters in \n\t\t// \"<a href=\\\"/wiki/\", to avoid a index out of bounds error\n\t\tfor(int i = 0; i < html.length()-15; i++) {\n\t\t\tif(html.substring(i, i+15).equals(\"<a href=\\\"/wiki/\")) {\n\t\t\t\t// if format matches starts to check the following characters\n\t\t\t\t// to check if it does not contain a : or a #\n\t\t\t\tchar ch = html.charAt(i+15);\n\t\t\t\tString str = \"\";\n\t\t\t\tint count = 0;\n\t\t\t\twhile(html.charAt(i+count+15) != '\"'){\n\t\t\t\t\tif(html.charAt(i+count+15) == ':' || html.charAt(i+count+15) == '#') {\n\t\t\t\t\t\tstr = \"\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tch = html.charAt(count+i+15);\n\t\t\t\t\tstr += ch;\n\t\t\t\t\tcount++;\n\t\t\t}\n\t\t\t\t// adds if the page name is not empty\n\t\t\t\tif(str != \"\")\n\t\t\t\tset.add(str);\n\t\t\t\tskipLength = str.length();\n\t\t\t\tcount = 0;\n\t\t}\n\t\t\ti += skipLength;\n\t\t\tskipLength = 0;\n\t\t\tcounter++;\n\t\n\t}\n\treturn set;\n}", "public ArrayList<String> getStringListFromHtmlText(@NotNull String htmlText, @NotNull String startTag, @NotNull String endTag) {\n final ArrayList<String> list = new ArrayList<>();\n try {\n String completeRegex = startTag + \"(.+?)\" + endTag;\n Pattern TAG_REGEX = Pattern.compile(completeRegex, Pattern.DOTALL);\n final Matcher matcher = TAG_REGEX.matcher(htmlText);\n while (matcher.find()) {\n list.add(matcher.group(1));\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return list;\n }", "public static String removeAndEscapeHTML( String s ) {\n if ( s==null ) return \"\";\n else return Utilities.escapeHTML( Utilities.removeHTML(s) );\n }", "public String getTitle(String pHtml) {\r\n String locTitle=\"\";\r\n int startTitle=pHtml.indexOf(\"<title>\");\r\n int stopTitle=pHtml.indexOf(\"</title>\");\r\n locTitle=pHtml.substring(startTitle, stopTitle);\r\n locTitle=locTitle.replace(\"&ndash; \", \"\");\r\n locTitle=locTitle.replace(\"<title>\", \"\");\r\n locTitle=locTitle.replace(\"RESULT\", \"\"); \r\n\r\n \r\n return locTitle;\r\n }", "java.lang.String getText();", "java.lang.String getText();", "java.lang.String getText();", "java.lang.String getText();", "java.lang.String getText();", "java.lang.String getText();", "java.lang.String getText();", "java.lang.String getText();", "public String htmlSpecialChar(String string){\n String res = string.replaceAll(\"&\",\"&amp;\");\n res = res.replace(\"'\",\"&#039;\");\n res = res.replace(\"\\\"\",\"&qout;\");\n res = res.replace(\"$\",\"&#036;\");\n res = res.replace(\"%\",\"&#037;\");\n res = res.replace(\"<\",\"&lt;\");\n res = res.replace(\">\",\"&gt;\");\n res = res.replace(\"\\n\",\"\\\\n\");\n return res;\n }", "public static void setHTML(String html) {\n if (create()) {\n tag.setInnerHTML(SimpleHtmlSanitizer.sanitizeHtml(html).asString());\n }\n }" ]
[ "0.688584", "0.68661666", "0.68385756", "0.6762138", "0.6533305", "0.65042466", "0.6459568", "0.63537276", "0.621179", "0.61610514", "0.6156638", "0.6154536", "0.6146649", "0.6103492", "0.6088399", "0.6085854", "0.60412693", "0.60403043", "0.60246944", "0.60071486", "0.6003699", "0.6001532", "0.59338087", "0.5930463", "0.5891079", "0.58372533", "0.58372533", "0.5826366", "0.58209074", "0.581032", "0.5778819", "0.57719857", "0.57222545", "0.5712631", "0.5710313", "0.56956303", "0.5682087", "0.56688863", "0.5642908", "0.5642908", "0.5637829", "0.56258166", "0.56258166", "0.55963266", "0.55829763", "0.55737", "0.5555075", "0.55427355", "0.55405265", "0.55395454", "0.5528692", "0.5517079", "0.55167323", "0.55161375", "0.551069", "0.5502366", "0.5467493", "0.54370165", "0.5423794", "0.54201615", "0.5409802", "0.53984964", "0.5380163", "0.5378998", "0.5374675", "0.5369014", "0.5343997", "0.5338239", "0.5335463", "0.5319532", "0.5287949", "0.52860373", "0.52760315", "0.52643573", "0.52501595", "0.5249708", "0.52445036", "0.5242582", "0.5239158", "0.5238922", "0.52215993", "0.52147126", "0.52011037", "0.51972955", "0.5194725", "0.5187145", "0.51858497", "0.51626176", "0.5160709", "0.5159704", "0.5155107", "0.5155107", "0.5155107", "0.5155107", "0.5155107", "0.5155107", "0.5155107", "0.5155107", "0.5152667", "0.51447433" ]
0.6497198
6
Return links from a url as a string of space separated urls
public static String HTMLLinkString(String url) throws Exception { URL[] links = HTMLLinks(url); String urls = ""; for (URL link : links) { urls = urls + link.toString() + " "; } return urls.trim(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private @NotNull List<String> getAllLinks(final String text, final String urlStart) {\n List<String> links = new ArrayList<>();\n\n int i = 0;\n while (text.indexOf(urlStart, i) != -1) {\n int linkStart = text.indexOf(urlStart, i);\n int linkEnd = text.indexOf(\" \", linkStart);\n if (linkEnd != -1) {\n String link = text.substring(linkStart, linkEnd);\n links.add(link);\n } else {\n String link = text.substring(linkStart);\n links.add(link);\n }\n i = text.indexOf(urlStart, i) + urlStart.length();\n }\n\n return links;\n }", "public List<String> getLinks();", "public SafeHtml linkify() {\n final String part = \"(?:\" +\n \"[a-zA-Z0-9$_+!*'%;:@=?#/~-]\" +\n \"|&(?!lt;|gt;)\" +\n \"|[.,](?!(?:\\\\s|$))\" +\n \")\";\n return replaceAll(\n \"(https?://\" +\n part + \"{2,}\" +\n \"(?:[(]\" + part + \"*\" + \"[)])*\" +\n part + \"*\" +\n \")\",\n \"<a href=\\\"$1\\\" target=\\\"_blank\\\">$1</a>\");\n }", "private Set<String> extracLinks(String url, LinkFilter filter) {\n\n\t\tSet<String> links = new HashSet<String>();\n\t\ttry {\n\t\t\tParser parser = new Parser(url);\n\t\t\tparser.setEncoding(\"UTF-8\");\n\t\t\t// linkFilter filter <a> tag\n\t\t\tNodeClassFilter linkFilter = new NodeClassFilter(LinkTag.class);\n\t\t\t// get all filtered links\n\t\t\tNodeList list = parser.extractAllNodesThatMatch(linkFilter);\n\t\t\tfor (int i = 0; i < list.size(); i++) {\n\t\t\t\tNode tag = list.elementAt(i);\n\t\t\t\tif (tag instanceof LinkTag)// <a> tag\n\t\t\t\t{\n\t\t\t\t\tLinkTag link = (LinkTag) tag;\n\t\t\t\t\tString linkUrl = link.getLink();// url\n\t\t\t\t\tif (filter.accept(linkUrl)) {\n\t\t\t\t\t\t// change bbsdoc to bbstdoc\n\t\t\t\t\t\tString stlink = linkUrl.replace(\"bbsdoc\", \"bbstdoc\");\n\t\t\t\t\t\tlinks.add(stlink);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (ParserException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn links;\n\t}", "public static URL[] HTMLLinks(String url) throws Exception\n\t{\n\t\t// Get the links\n\n\t\tURLConnection conn = (new java.net.URL(url)).openConnection();\n\t\tconn.setRequestProperty(\"User-Agent\",\"Mozilla/5.0 ( compatible ) \");\n\t\tconn.setRequestProperty(\"Accept\",\"*/*\");\n\n\t\tLinkBean sb = new LinkBean();\n\t\tsb.setURL(url);\n\t\tsb.setConnection(conn);\n\t\tURL[] outlinks = sb.getLinks();\n\n\t\t// make links fully qualified\n\t\tURI baseURI = null;\n\t\ttry\n\t\t{\n\t\t\tbaseURI = new URI(url);\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tlogger.error(e.getMessage(), e);\n\t\t\treturn new URL[0];\n\t\t}\n\n\t\t// ----\n\t\tList<URL> fqurls = new ArrayList<URL>();\n\t\tfor (int i = 0; i < outlinks.length; i++)\n\t\t{\n\t\t\tURL fqurl = null;\n\t\t\ttry\n\t\t\t{\n\t\t\t\tfqurl = baseURI.resolve(outlinks[i].toURI()).toURL();\n\t\t\t}\n\t\t\tcatch (Exception e)\n\t\t\t{\n\t\t\t\tlogger.error(e.getMessage(), e);\n\t\t\t}\n\t\t\tif (fqurl != null)\n\t\t\t{\n\t\t\t\tfqurls.add(fqurl);\n\t\t\t}\n\t\t}\n\t\treturn fqurls.toArray(new URL[fqurls.size()]);\n\t}", "public List<String> linkTexts()\n\t{\n\t\t\n\t\tList<String> links=new ArrayList<String>();\n\t\tlinks.add(linkString);\n\t\tlinks.add(\"Facebook.com\");\n\t\tlinks.add(\"google.com;\");\n\t\tlinks.add(\"gmail.com\");\n\t\tlinks.add(\"shine.com\");\n\t\tlinks.add(\"nukari.com\");\n\t\t\n\t\t// Like the above we have to add number of link text are passed to achieve the DataDriven approach through BBD \n\t\t\t\n\t\treturn links;\n\t\t\n\t}", "public static List<String> getLinks(String url, NodeFilter filter) throws ParserException\n\t{\n\t\tParser parser = getParser(url);\n\t\tNodeList list = new NodeList();\n\t\tfor (NodeIterator e = parser.elements(); e.hasMoreNodes();)\n\t\t{\n\t\t\tlist.add(getNodes(e.nextNode(), filter));\n\t\t}\n\t\tList<String> strings = new ArrayList<String>();\n\t\tfor (NodeIterator i = list.elements(); i.hasMoreNodes();)\n\t\t{\n\t\t\tNode n = i.nextNode();\n\t\t\tif (n instanceof LinkTag)\n\t\t\t{ // text\n\t\t\t\tString link = ((LinkTag) n).extractLink();\n\t\t\t\tif (!strings.contains(link))\n\t\t\t\t{\n\t\t\t\t\tstrings.add(((LinkTag) n).extractLink());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn strings;\n\t}", "private void pullLinks(String htmlPage) {\n\n Document doc = Jsoup.parse(htmlPage);\n Elements links = doc.select(\"a[href]\");\n\n for (Element link : links) {\n\n String possibleUrl = link.attr(\"abs:href\");\n\n if (!possibleUrl.equals(\"\")) {\n// Log.v(\"pullLinks\", \" will try to make URL from\" + possibleUrl);\n //if the link attr isn't empty, make a URL\n URL theUrl = NetworkUtils.makeURL(possibleUrl);\n\n if (RegexUtils.urlDomainNameMatch(firstLinkAsString, theUrl.toString())) {\n //if the string version of url is within the same domain as original query\n if (!visitedLinks.contains(theUrl.toString())) {\n// Log.v(\"DLAsyncTask.pullLinks\", \" thinks that \" + theUrl.toString() + \" wasn't visited, add into collected...\");\n collectedLinks.add(theUrl.toString());\n }\n }\n }\n\n }\n }", "public static ArrayList<URL> listLinks(URL baseURL, String htmlText) {\n // list to store links\n ArrayList<URL> links = new ArrayList<URL>();\n\n // compile string into regular expression\n Pattern p = Pattern.compile(REGEX);\n\n // match provided text against regular expression\n Matcher m = p.matcher(htmlText);\n\n // loop through every match found in text\n while ( m.find() ) \n {\n // add the appropriate group from regular expression to list\n try {\n\t\t\t\tlinks.add(new URL(baseURL, m.group(GROUP)));\n\t\t\t} catch (MalformedURLException e) {\n\t\t\t\tSystem.err.println(\"Invalid URL\");\n\t\t\t\te.printStackTrace();\n\t\t\t}\n }\n return links;\n }", "@Test\n\tpublic void testGetLinksMultipleLinks() {\n\t\tList<String> results = helper.getLinks(\n\t\t\t\t\"drop tables; <A HREF=\\\"test.com\\\"> <a href=\\\"nexttest.org\\\". junk junk\", null);\n\t\tassertEquals(2, results.size());\n\t\tassertEquals(\"test.com\", results.get(0));\n\t\tassertEquals(\"nexttest.org\", results.get(1));\n\t}", "public static String HTMLLinkString(String url, String filter) throws Exception\n\t{\n\t\tURL[] links = HTMLLinks(url);\n\t\tString urls = \"\";\n\t\tfor (URL link : links)\n\t\t{\n\t\t\tString slink = link.toString();\n\t\t\tif (slink.contains(filter))\n\t\t\t{\n\t\t\t\turls = urls + slink + \" \";\n\t\t\t}\n\t\t}\n\t\treturn urls.trim();\n\t}", "List<Link> getLinks();", "public static List<String> getURLs(List<WebElement> links) {\n\t\t List<String> ListHref = new ArrayList<String>();\n\t\t \n\t\t //loops through all links\n\t\t for(WebElement Webhref:links) {\n\t\t\t \n\t\t\t //if element isn't null\n\t\t\t if (Webhref.getAttribute(\"href\") != null) {\n\t\t\t\t String StringHref = (Webhref.getAttribute(\"href\")).toString();\n\n\t\t\t\t //if page isn't part of domain, ignore\n\t\t\t\t if (StringHref.startsWith(variables.domain)) {\n\t\t\t\t\t //System.out.println(StringHref);\n\t\t\t\t\t \n\t\t\t\t\t //if page doesn't have an octothorpe\n\t\t\t\t\t if (!StringHref.contains(\"#\")) {\n\t\t\t\t\t\t \n\t\t\t\t\t\t//if page doesn't ends with one of the file extensions to not use\n\t\t\t\t\t\t String extension = getExtension(StringHref);//gets TLD from URL\n\t\t\t\t\t\t if(!variables.list.stream().anyMatch(extension::contains)) {\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t//if value isn't already part of this array or the already crawled array\n\t\t\t\t\t\t\t if(!ListHref.contains(StringHref) && !variables.crawled.contains(StringHref)) {\n\t\t\t\t\t\t\t\t ListHref.add(StringHref);\n\t\t\t\t\t\t\t\t //System.out.println(StringHref);\n\t\t\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t }\n\t\t\t\t\t }\n\t\t\t\t }\n\t\t\t }\n\t\t }\n\n\t\treturn ListHref;\n\t}", "protected String createUrlEntries(Map model)\r\n {\r\n StringBuilder urlEntries = new StringBuilder();\r\n List<SitemapEntry> sitemapEntries = (List<SitemapEntry>) model.get(SITEMAP_ENTRIES);\r\n for (SitemapEntry sitemapEntry : sitemapEntries)\r\n {\r\n urlEntries.append(createUrlEntry(sitemapEntry));\r\n }\r\n\r\n return urlEntries.toString();\r\n }", "public static List<String> getAllLinkLinks(final String page)\n {\n return getAllMatches(page, LINK_PATTERN, 1);\n }", "public StringBuilder getLinks(Elements imgs) {\n\t\tStringBuilder links = new StringBuilder();\n\t\tString prefix = \"\";\n\t\tfor (Element item : imgs) {\n\t\t\tlinks.append(prefix);\n\t\t\tprefix = \"|\";\n\t\t\tlinks.append(item.attr(\"href\"));\n }\n\t\treturn links;\n\t}", "public List getLinks() {\r\n List links = getElements(\"a\");\r\n ArrayList result = new ArrayList();\r\n for (int i = 0; i < links.size(); i++) {\r\n try {\r\n StandAloneElement keep = ((StandAloneElement)links.get(i));\r\n result.add(parseUrl(keep.getAttribute(\"href\")));\r\n } catch (Exception e) {\r\n }\r\n }\r\n links = getElements(\"FRAME\");\r\n for (int i = 0; i < links.size(); i++) {\r\n try {\r\n StandAloneElement keep = ((StandAloneElement)links.get(i));\r\n result.add(parseUrl(keep.getAttribute(\"src\")));\r\n } catch (Exception e) {\r\n }\r\n }\r\n\r\n return result;\r\n }", "java.lang.String getUrl();", "java.lang.String getUrl();", "java.lang.String getUrl();", "java.lang.String getUrl();", "java.lang.String getUrl();", "java.lang.String getUrl();", "@Test\n public void hrefPatternTest() {\n Pattern aTeg = Pattern.compile(\"(?i)<a([^>]+)>(.+?)</a>\");\n Pattern href = Pattern.compile(\"\\\\s*(?i)href\\\\s*=\\\\s*(\\\\\\\"([^\\\"]+\\\\\\\")|'[^']+'|([^'\\\">\\\\s]+))\");\n String[] validLinkTegs = {\"<li><a href=\\\"/toolbar-creator\\\">Create a Custom Toolbar</a></li>\",\n \"<a href=\\\"http://stlpublicradio.org/programs/slota/archivedetail.php?date='2012-02-29'\\\" title=\\\"\\\" class=\\\"menu_icon menu-17197 \\\" >Грузовые перевозки</a></li>\",\n \"<li><a href='http://www.tipsntracks.com/date/2012/03' title='March 2012'>March 2012</a></li>\"};\n String[] invalidLinkTags = {\"<a href=\\\"\\\"style=\\\"\\\"><img width=\\\"148\\\" height=\\\"32\\\" src=\\\"/images/buttons/btn-www-survey.gif\\\" /></a>\"};\n String[] validLinks = new String[validLinkTegs.length];\n String[] invalidLinks = new String[invalidLinkTags.length];\n for (int i = 0; i < validLinkTegs.length; i++) {\n Matcher matcher = aTeg.matcher(validLinkTegs[i]);\n Assert.assertTrue(matcher.find());\n validLinks[i] = matcher.group(1);\n }\n for (int i = 0; i < invalidLinkTags.length; i++) {\n Matcher matcher = aTeg.matcher(invalidLinkTags[i]);\n Assert.assertTrue(matcher.find());\n invalidLinks[i] = matcher.group(1);\n }\n for (int i = 0; i < validLinkTegs.length; i++) {\n Matcher matcher = href.matcher(validLinks[i]);\n Assert.assertTrue(matcher.find());\n String s = matcher.group(1);\n System.out.println(s.substring(1, s.length() - 1));\n }\n for (int i = 0; i < invalidLinkTags.length; i++) {\n Matcher matcher = href.matcher(invalidLinks[i]);\n Assert.assertFalse(matcher.find());\n }\n }", "@Test\n\tpublic void testGetLinksUpperCaseLink() {\n\t\tList<String> results = helper.getLinks(\"drop tables; <A HREF=\\\"test.com\\\"> junk junk\", null);\n\t\tassertEquals(1, results.size());\n\t\tassertEquals(\"test.com\", results.get(0));\n\t}", "public Collection<Map<String, String>> getLinks();", "static CharSequence linkifyUrls(FormattedTweetText tweetText,\n final LinkClickListener listener, boolean stripLastPhotoEntity, final int linkColor) {\n if (tweetText == null) return null;\n\n if (TextUtils.isEmpty(tweetText.text)) {\n return tweetText.text;\n }\n\n final SpannableStringBuilder spannable\n = new SpannableStringBuilder(tweetText.text);\n\n final List<FormattedUrlEntity> urls = tweetText.urlEntities;\n\n final List<FormattedMediaEntity> media\n = tweetText.mediaEntities;\n final FormattedMediaEntity lastPhoto;\n if (stripLastPhotoEntity) {\n lastPhoto = getLastPhotoEntity(tweetText);\n } else {\n lastPhoto = null;\n }\n\n /*\n * We combine and sort the entities here so that we can correctly calculate the offsets\n * into the text.\n */\n final List<FormattedUrlEntity> combined = mergeAndSortEntities(urls, media);\n\n addUrlEntities(spannable, combined, lastPhoto, listener, linkColor);\n return spannable;\n }", "public static String HTMLLinkString(String root, int level) throws Exception\n\t{\n\t\tString urls = \"\";\n\t\tif (0 == level)\n\t\t{\n\t\t\treturn urls;\n\t\t}\n\t\turls = HTMLLinkString(root);\n\t\tfor (String u : urls.split(\"\\\\s+\"))\n\t\t{\n\t\t\turls = urls + \" \" + HTMLLinkString(u, level - 1);\n\t\t}\n\t\treturn urls.trim();\n\t}", "List<ProductLink> links();", "final String parseForLink(String upperCaseInput,String input)\r\n {\r\n int i,j,k,l;\r\n\tString temp=null;\r\n\tString link=null;\r\n\r\n\t// Look for links to other pages. Eg:- Normal links <A>..</A>\r\n i=upperCaseInput.indexOf(\"HREF\");\r\n\tif(i!=-1)\r\n\t{\r\n\t // Locate position of the quote marks.\r\n\t j=upperCaseInput.indexOf(\"\\\"\",i);\r\n\t k=upperCaseInput.indexOf(\"\\\"\",j+1);\r\n\t // Locate position of </a>\r\n\t l=upperCaseInput.indexOf(\"</A>\",i);\r\n\t // If double quotes were not found then try using single quote marks.\r\n\t if(j==-1 || k==-1 || (j>1 && k==-1))\r\n\t {\r\n\t j=upperCaseInput.indexOf(\"\\'\",i);\r\n\t\tk=upperCaseInput.indexOf(\"\\'\",j+1);\r\n\t }\r\n\t // Remove leading trailing spaces.\r\n if(j!=-1 && k!=-1)\r\n\t {\r\n\t temp=input.substring(j+1,k); // Extrct the link name.\r\n\t\tlink=temp.trim(); // Remove leading and trailing spaces.\r\n\t\treturn(link);\r\n\t }\r\n\t}\r\n\t// 2. Frames,\r\n\ti=upperCaseInput.indexOf(\"FRAME\");\r\n\tif(i!=-1)\r\n\t{\r\n\t l=upperCaseInput.indexOf(\"SRC\",i); // Locate position of source tag.\r\n\t if(l!=-1)\r\n\t {\r\n\t // Locate position of quote marks.\r\n\t\tj=upperCaseInput.indexOf(\"\\\"\",l);\r\n\t\tk=upperCaseInput.indexOf(\"\\\"\",j+1);\r\n\t\t// If double quotes were not found then try single quote marks\r\n\t\tif(j==-1)\r\n\t\t{\r\n\t\t j=upperCaseInput.indexOf(\"\\\"\",i);\r\n\t\t k=upperCaseInput.indexOf(\"\\\"\",j+1);\r\n\t\t}\r\n\t\t// Remove leading and trailing spaces.\r\n\t\tif(j!=-1 && k!=-1)\r\n\t\t{\r\n\t\t temp=input.substring(j+1,k); // Extract the link name\r\n\t\t link=temp.trim();\r\n\t\t return(link);\r\n\t\t}\r\n\t }\r\n\t}\r\n\treturn(null);\r\n }", "public Set<String> getLinks() {\n return links;\n }", "public static LinkedHashSet<String> searchLinks(String searchUrl) {\n LinkedHashSet<String> uniqueLinks = new LinkedHashSet();\n Document doc;\n try {\n doc = Jsoup.connect(searchUrl).get();\n Elements links = doc.select(\"a\");\n for(Element url : links){\n if (validUrl(url.attr(\"href\"))) {\n uniqueLinks.add(url.attr(\"href\"));\n }\n }\n } catch (IOException e) {\n }\n return uniqueLinks;\n }", "@Override\n protected List<String> convertDoisToUrls(Collection<String> dois) {\n List<String> urls = new ArrayList<String>();\n for(String doi:dois) {\n // Encode the doi, then revert the FIRST %2F (slash) back to a \"/\":\n // 10.1023/A%3A1026541510549, not\n // 10.1023%2FA%3A1026541510549\n String url = String.format(\"%sarticle/%s\", baseUrl, encodeDoi(doi).replaceFirst(\"%2F\",\"/\"));\n urls.add(url);\n }\n return urls;\n }", "String getUrl();", "String getUrl();", "String getUrl();", "String getUrl();", "String getUrl();", "private String urlLink(final String url, final String name) {\n Tag aTag = new Tag(\"a\");\n aTag.add(name);\n aTag.addParameter(\"href\", baseUrl + url);\n return aTag.toString();\n }", "private void ExtractURLs(String line)\n {\n String matchedURL = \"\";\n Matcher urlMatcher = urlPattern.matcher(line);\n\n while (urlMatcher.find())\n {\n matchedURL = urlMatcher.group();\n\n if (!distinctURLs.containsKey(matchedURL))\n {\n distinctURLs.put(matchedURL,matchedURL);\n }\n }\n }", "URL format(ShortLink shortLink);", "String getLink();", "public static Set<String> parser(String html){\r\n\r\n\t\tSet<String> urls = new HashSet<String>();\r\n\t\tString regex = \"<a.*?/a>\";\r\n\t\tPattern pt = Pattern.compile(regex);\r\n\t\tMatcher matcher = pt.matcher(html);\r\n\t\twhile(matcher.find()){\r\n\t\t\t//获取网址\r\n//\t\t\tSystem.out.println(\"Group:\"+matcher.group());\r\n\t\t\tMatcher myurl = Pattern.compile(\"href=\\\".*?\\\">\").matcher(matcher.group());\r\n\t\t\tif(myurl.find()){\r\n\t\t\t\tdo{\r\n\t\t\t\t\tString temp = myurl.group();\r\n\t\t\t\t\tif(!temp.startsWith(\"javascript\") && !temp.startsWith(\"/\") && ! temp.startsWith(\"#\")){\r\n\t\t\t\t\t\tString url = myurl.group().replaceAll(\"href=\\\"|\\\">\",\"\");\r\n\t\t\t\t\t\tif(url.contains(\"http\")){\r\n\t\t\t\t\t\t\tif(url.contains(\"\\\"\")){\r\n\t\t\t\t\t\t\t\turl = url.substring(0, url.indexOf(\"\\\"\"));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif(!url.contains(\"$\") && !url.contains(\" \")){\r\n\t\t\t\t\t\t\t\turls.add(url);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}while(myurl.find());\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn urls;\r\n\t}", "Set<Link> extractLinks(CrawlDoc doc, ParseState parseState)\n throws IOException;", "public char[] URLify(char[] url, int len) {\n if (len < 2 || url == null) {\n return url;\n }\n for (int i = 0; i < len; ++i) {\n if (url[i] == ' ') {\n url = shiftTwice(url, i + 1);\n url = replaceSpace(url, i);\n }\n }\n return url;\n }", "public String getUrl(){\n return urlsText;\n }", "@Test\n\tpublic void testGetLinksRelativeLink() {\n\t\tList<String> results = helper\n\t\t\t\t.getLinks(\"drop tables; <A HREF=\\\"/test\\\"> junk junk\", \"http://www.bobbylough.com\");\n\t\tassertEquals(1, results.size());\n\t\tassertEquals(\"http://www.bobbylough.com/test\", results.get(0));\n\t}", "public static void main(String args[]){\n String pattern = \"/^(http(s)?(:\\\\/\\\\/))?(www\\\\.)?\\\\.(\\\\/.*)?$/\";\r\n String input = \"(http://www.archive.com/web/http://www.mrvc.indianrai.gov.in/overview)\";\r\n\r\n Matcher matcher = Pattern.compile(pattern).matcher(input);\r\n while (matcher.find()) {\r\n System.out.println(matcher.group());\r\n int start = matcher.start(1);\r\n int end = matcher.end(1);\r\n String result = input.substring(start,end).replaceFirst(\"www.\",\"\");\r\n if(result.startsWith(\"www.\") ){\r\n input.substring(start,end).replaceFirst(\"www.\",\"\");\r\n }else if(result.startsWith(\"ww2.\")){\r\n input.substring(start,end).replaceFirst(\"ww2.\",\"\");\r\n }else if(result.startsWith(\"web.\")){\r\n input.substring(start,end).replaceFirst(\"web.\",\"\");\r\n }\r\n System.out.println(result);\r\n\r\n }\r\n }", "private String cleanupText(String text){\n return text.replaceAll(\"http[s]*[:](//)[^ ]+\", \"URL\");\n }", "public List<String> getLinks() {\r\n\t\treturn this.links;\r\n\t}", "public ArrayList<String> findLinks(Text value) throws CharacterCodingException{\n\t\tint start = value.find(\"<text\");\n\t\tstart = value.find(\">\", start);\n\t\tint end = value.find(\"</text>\", start);\n\t\t//start+=1;\n\t\tString textBlock=new String();\n\t\ttry{\n\t\tif(end < value.getLength())\n\t\t\ttextBlock = Text.decode(value.getBytes(), start, end-start);\n\t\telse\n\t\t\ttextBlock = Text.decode(value.getBytes(), start, value.getLength()-start);\n\t\t} catch(Exception e){\n\t\t\treturn null;\n\t\t}\n\t\tArrayList<String> List = new ArrayList<String>();\n\t\t\n\t\tPattern wikiLinkRegEx = Pattern.compile(\"\\\\[\\\\[(?:[^|\\\\]]*\\\\|)?([^\\\\]]+)\\\\]\\\\]\");\n\t\tMatcher patternMatcher = wikiLinkRegEx.matcher(textBlock);\n\t\twhile(patternMatcher.find()) {\n\t\t\tint flag=0;\n\t\t\tint startIndex = patternMatcher.start();\n\t\t\tint endIndex = patternMatcher.end();\n\t\t\tString wikiLink = textBlock.substring(startIndex+2, endIndex-2);\n\t\t\twikiLink = wikiLink.replace(\" \", \"_\");\n\n\t\t\t//Checking for the occurrence of '|'\n\t\t\tif(wikiLink.contains(\"|\")){\n\t\t\t\tint pipeIndex = wikiLink.indexOf(\"|\");\n\t\t\t\twikiLink = wikiLink.substring(0, pipeIndex);\n\t\t\t}\n\t\t\t\n\t\t\t//Flagging all the invalid WikiLinks \n\t\t\t//if(wikiLink.contains(\":\") || wikiLink.contains(\"#\") || wikiLink.contains(\"/\") ){\n\t\t\t//\tflag=1;\n\t\t\t//}\n\t\t\t\n\t\t\t// Add the valid WikiLinks in the List\n\t\t\tif(flag==0){\n\t\t\t\twikiLink = wikiLink.replace(\"&amp;\", \"&\");\n\t\t\t\tList.add(wikiLink);\n\t\t\t}\n\t }\n\t\treturn List;\n\t}", "Uri getUrl();", "String getHref();", "public List<TparselinksEntity> getAllLinks();", "List<? extends Link> getLinks();", "public URI[] getLinks(String expression, Map<String, String> namespaces) {\n String[] values = getValues(expression, namespaces);\n if (values == null) {\n return null;\n }\n URI[] uris = new URI[values.length];\n for (int i = 0; i < values.length; i++) {\n uris[i] = URI.create(values[i]);\n }\n return uris;\n }", "public Set<Anchor> parse(Reader reader, String url) {\n\n Set<Anchor> elements = new HashSet<>();\n String urtContent = null;\n try {\n urtContent = readFully(reader);\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (urtContent == null){\n return elements;\n }\n\n mTag = pTag.matcher(urtContent);\n\n while (mTag.find()) {\n\n String href = mTag.group(1); // get the values of href\n String linkElem = mTag.group(2); // get the text of link Html Element\n\n mLink = pLink.matcher(href);\n\n while (mLink.find()) {\n\n String link = mLink.group(1);\n Anchor anchor = new Anchor();\n anchor.setUrl(link);\n anchor.setText(linkElem);\n\n elements.add(anchor);\n\n }\n }\n return elements;\n }", "public static String getFormattedLink(String link) {\n\t\tString result = link;\n\t\tif (StringUtils.isNotBlank(result)) {\n\t\t\tif (!result.toLowerCase().startsWith(Constants.PREFIX_HTTP)\n\t\t\t\t\t|| !result.toLowerCase().startsWith(Constants.PREFIX_HTTPS)) {\n\t\t\t\tif (!Constants.EXTENSION_PATTERN_LINK.matcher(result).matches() && !result.startsWith(\"#\")) {\n\t\t\t\t\tresult += Constants.SUFFIX_HTML;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "private String linkString()\n {\n Iterator<DSAGraphNode<E>> iter = links.iterator();\n String outputString = \"\";\n DSAGraphNode<E> node = null;\n while (iter.hasNext())\n {\n node = iter.next();\n outputString = (outputString + node.getLabel() + \", \");\n }\n return outputString;\n }", "public Set<String> getLinks() throws SearchResultException;", "private static String getURL(String link) {\n\t\treturn \"https://en.wikipedia.org/wiki/\" + link;\n\t}", "public static List<String> extract(Document document) {\n Elements links = document.select(\"a[href]\");\n Elements media = document.select(\"[src]\");\n Elements imports = document.select(\"link[href]\");\n\n List<String> allLinks = new ArrayList<>();\n populateLinks(allLinks, media, \"abs:src\");\n populateLinks(allLinks, imports, \"abs:href\");\n populateLinks(allLinks, links, \"abs:href\");\n return allLinks;\n }", "public boolean isURLInString(String s) {\n\t\tString[] parts = s.split(\"\\\\s\");\r\n\r\n\t\t// Attempt to convert each item into an URL.\r\n\t\tfor (String item : parts)\r\n\t\t\ttry {\r\n\t\t\t\tURL url = new URL(item);\r\n\t\t\t\t// If possible then replace with anchor...\r\n\t\t\t\t// System.out.print(\"<a href=\\\"\" + url + \"\\\">\" + url + \"</a> \");\r\n\r\n\t\t\t\tthis.address = url.toString();\r\n\r\n\t\t\t\treturn true;\r\n\t\t\t} catch (MalformedURLException e) {\r\n\t\t\t\t// If there was an URL that was not it!...\r\n\t\t\t\tSystem.out.print(item + \" \");\r\n\t\t\t}\r\n\r\n\t\treturn false;\r\n\t}", "public static String formatUrl(String url) {\n if (!url.startsWith(\"http://\") && !url.startsWith(\"https://\")) {\n url = \"http://\" + url;\n }\n return url;\n }", "public URL standardizeURL(URL startingURL);", "public static List<String> getRequestUrl(Document doc,String currenturl){\n\t\tList<String> urls = new ArrayList<String>();\n\t\tElements eles = doc.select(\".clsTRSNavigatorDIV a\");\n\t\tfor(Element e:eles){\n\t\t\tif(NewsUtils.ifNumbers(e.ownText().trim()) && !e.ownText().trim().equals(\"1\")){\n\t\t\t\turls.add(currenturl.substring(0, currenturl.lastIndexOf('.'))\n\t\t\t\t\t\t+\"_\"+(Integer.valueOf(e.ownText().trim())-1)\n\t\t\t\t\t\t+currenturl.substring(currenturl.lastIndexOf('.')));\n\t\t\t}\n\t\t}\n\t\treturn urls;\n\t}", "public void pullResources(String domainURL){\n URLResource page = new URLResource(\"https://www.dukelearntoprogram.com//course2/data/manylinks.html\");\n \n int startIndex;\n int endIndex;\n // loop through pages\n for (String s : page.lines()){\n \n //System.out.println(s);\n int pose = s.indexOf(domainURL);\n \n // if the url is in the line\n if (-1 != pose) {\n \n startIndex = s.lastIndexOf(\"\\\"\",pose); // find actual start\n endIndex = s.indexOf(\"\\\"\",pose+1); // find end\n \n System.out.println( s.substring(startIndex, endIndex));\n \n \n \n }\n \n \n }\n}", "public URI getLink(String expression) {\n return getLink(expression, CastUtils.cast(Collections.emptyMap(), String.class, String.class));\n }", "public void getLinks() {\n\n var client = HttpClient.newBuilder()\n .followRedirects(HttpClient.Redirect.ALWAYS)\n .build();\n\n HttpRequest request = HttpRequest.newBuilder()\n .uri(URI.create(URL_PREFIX))\n .build();\n client.sendAsync(request, HttpResponse.BodyHandlers.ofLines())\n .thenApply(HttpResponse::body)\n .thenApply(this::processLines)\n .thenApply(versions -> tasks(versions))\n .join();\n }", "URL getUrl();", "private static void addUrlEntities(final SpannableStringBuilder spannable,\n final List<FormattedUrlEntity> entities,\n final FormattedMediaEntity lastPhoto,\n final LinkClickListener listener, final int linkColor) {\n if (entities == null || entities.isEmpty()) return;\n\n int offset = 0;\n int len;\n int start;\n int end;\n for (final FormattedUrlEntity url : entities) {\n start = url.start - offset;\n end = url.end - offset;\n if (start >= 0 && end <= spannable.length()) {\n // replace the last photo url with empty string, we can use the start indices as\n // as simple check, since none of this will work anyways if we have overlapping\n // entities\n if (lastPhoto != null && lastPhoto.start == url.start) {\n spannable.replace(start, end, \"\");\n len = end - start;\n end -= len;\n offset += len;\n } else if (!TextUtils.isEmpty(url.displayUrl)) {\n spannable.replace(start, end, url.displayUrl);\n len = end - (start + url.displayUrl.length());\n end -= len;\n offset += len;\n\n final CharacterStyle span = new ClickableSpan() {\n @Override\n public void onClick(View widget) {\n if (listener == null) return;\n listener.onUrlClicked(url.url);\n }\n\n @Override\n public void updateDrawState(TextPaint ds) {\n ds.setColor(linkColor);\n ds.setUnderlineText(false); // Links should not be underlined\n }\n };\n spannable.setSpan(span, start, end, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);\n }\n }\n }\n }", "private void getLinks(Page page, Element content, boolean withConnection) throws JSONException, SQLException {\n\t\tString pageTitle = page.getTitle();\n\t\tString pageId = String.valueOf(page.getPageId());\n\t\tElements links = content.select(\"a[href]\");\n\t\tPageApi pa = new PageApi();\n\t\tfor (Iterator<Element> iterator = links.iterator(); iterator.hasNext();) {\n\t\t\tElement element = iterator.next();\n\t\t\tString link = element.attr(\"href\");\n\t\t\t/**\n\t\t\t * It has to be an internal wikipedia link\n\t\t\t */\n\t\t\tif (link.startsWith(\"/wiki/\")) {\n\t\t\t\t/**\n\t\t\t\t * Ignore unrelevant links\n\t\t\t\t */\n\t\t\t\tif (link.startsWith(\"/wiki/Category:\") || link.startsWith(\"/wiki/Special:\")\n\t\t\t\t\t\t|| link.startsWith(\"/wiki/Wikipedia:\") || link.startsWith(\"/wiki/Help:\")\n\t\t\t\t\t\t|| link.startsWith(\"/wiki/Template:\") || link.startsWith(\"/wiki/Portal:\")\n\t\t\t\t\t\t|| link.startsWith(\"/wiki/Talk:\") || link.startsWith(\"/wiki/\" + pageTitle + \":\")\n\t\t\t\t\t\t|| link.startsWith(\"/wiki/File:\") || link.startsWith(\"/wiki/Template_talk:\")) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tlink = link.replace(\"/wiki/\", \"\");\n\t\t\t\tPage character = pa.getPageInfoForTitle(link);\n\t\t\t\tif (withConnection) {\n\t\t\t\t\tif (tempList.contains(character.getPageId())) {\n\t\t\t\t\t\tpersistConnection(pageId, character);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\telse {\n\t\t\t\t\tpersistCharacter(pageId, character);\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t}", "String checkAndTrimUrl(String url);", "private String getUrlHost(String url) {\n // httpx://host/.....\n\n int hostStart = url.indexOf(\"//\");\n if (hostStart == -1) {\n return \"\";\n }\n int hostEnd = url.indexOf(\"/\", hostStart + 2);\n if (hostEnd == -1) {\n return url.substring(hostStart + 2);\n } else {\n return url.substring(hostStart + 2, hostEnd);\n }\n\n }", "public String getTextUrl(String text) {\n return StrUtils.createUrlFromString(text);\n }", "public static List<String> resolveURLs(final String css) {\n final Matcher matcher = URL.matcher(css);\n final List<String> urls = new ArrayList<String>();\n while (matcher.find()) {\n final String url = matcher.group(1);\n urls.add(url);\n }\n return urls;\n }", "private String parseUrl(String fileUri) {\n\n fileUri = fileUri.replace(\" \", \"%20\");\n\n if (fileUri.contains(\" \")) {\n return parseUrl(fileUri);\n }\n return fileUri;\n }", "java.net.URL getUrl();", "@Override\n\tpublic ArrayList<String> getLinks() {\n\t\treturn this.description.getLinks();\n\t}", "static List<WebURL> ExtractUrl(Page page){\n // TODO: reference to parser to extractor urls from the web content\n return null;\n }", "SaldoLinks(String rawValue) {\n\n if (StringUtils.isEmpty(rawValue)) {\n links = Collections.emptyList();\n return;\n }\n\n String[] rawLinks = rawValue.split(Utils.ASTERISK_SEPARATOR);\n links = new ArrayList<>();\n\n for (String rawLink : rawLinks) {\n if (StringUtils.hasLength(rawLink)) {\n SaldoLink saldoLink = new SaldoLink(rawLink);\n if (saldoLink.hasValidLinks()) {\n links.add(saldoLink);\n }\n }\n }\n }", "public static String HTMLLinkString(String root, int level, String filter) throws Exception\n\t{\n\t\tString urls = \"\";\n\t\tif (0 == level)\n\t\t{\n\t\t\treturn urls;\n\t\t}\n\t\turls = HTMLLinkString(root, filter);\n\t\tfor (String u : urls.split(\"\\\\s+\"))\n\t\t{\n\t\t\tif (u.contains(filter))\n\t\t\t{\n\t\t\t\turls = urls + \" \" + HTMLLinkString(u, level - 1, filter);\n\t\t\t}\n\t\t}\n\t\treturn urls.trim();\n\t}", "@Test\n public void testNormalizeToStringWithSpaceURL() throws Exception {\n AbstractURLHandler handler = new TestURLHandler();\n String normalizedUrl = handler.normalizeToString(new URL(\n \"http://ant.apache.org/ivy/url with space/ivy-1.0.xml\"));\n assertEquals(\"http://ant.apache.org/ivy/url%20with%20space/ivy-1.0.xml\", normalizedUrl);\n }", "private ArrayList<String> permaLinkParser(String response, ArrayList<String> permaLinkUrls){\n\t\tJsonElement element = new JsonParser().parse(response);\n\t\tJsonArray array = element.getAsJsonArray();\n\t\t\n\t\tfor(int i = 0; i < array.size(); i++){\n\t\t\tJsonObject currentObject = array.get(i).getAsJsonObject().getAsJsonObject();\n\t\t\t\n\t\t\tString key = currentObject.get(\"permalink_url\").toString().replaceAll(\"\\\"\", \"\");\n\t\t\tpermaLinkUrls.add(key);\n\t\t}\n\t\t\n\t\treturn permaLinkUrls;\n\t\t\n\t}", "public static String formURL(String url)\n\t{\n\t\tString newurl;\n\t\tif (url.contains(\"http://\") || url.contains(\"https://\"))\n\t\t{\n\t\t\tnewurl = url;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tnewurl = \"http://\" + url;\n\t\t}\n\t\treturn newurl;\n\t}", "String url();", "private static Set<String> extractHosts(String rawContent) { \r\n\t\tString hostRegex = \"https:\\\\/\\\\/[a-zA-Z]([\\\\w\\\\.\\\\-])*\\\\.gov.br\";\r\n\t\tMatcher matcher = Pattern.compile(hostRegex).matcher(rawContent);\r\n\t\t\r\n\t\tSet<String> results = new HashSet<String>();\r\n\t\twhile(matcher.find()) {\r\n\t\t\tresults.add(matcher.group().replace(\"http://\", \"\").replace(\"https://\", \"\"));\r\n\t\t}\r\n\t\treturn results;\r\n\t\t\r\n\t}", "protected abstract String getPublicUrl(URL url);", "public Uri getUrl() {\n return Uri.parse(urlString);\n }", "public ArrayList<String> getWebLink(){\r\n\t\treturn webLinks;\t\t\r\n\t}", "public String getLink();", "java.util.List<org.chromium.components.paint_preview.common.proto.PaintPreview.LinkDataProto> \n getLinksList();", "public Stream<ParsedURL> urls() {\n return stream().map(req -> new ParsedURL(req.getUrl()));\n }", "public static String urlToString(final String url) {\n Scanner urlScanner;\n try {\n urlScanner = new Scanner(new URL(url).openStream(), \"UTF-8\");\n } catch (IOException e) {\n return \"\";\n }\n String contents = urlScanner.useDelimiter(\"\\\\A\").next();\n urlScanner.close();\n return contents;\n }", "public static void main(String[] args) throws IOException {\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\n Pattern pattern = Pattern.compile(\"<a\\\\s+(href=[^>]+)>([^<]+)<\\\\/a>\");\n\n StringBuilder sb = new StringBuilder();\n String currentLine = reader.readLine();\n\n while (!\"END\".equals(currentLine)) {\n sb.append(currentLine).append(System.getProperty(\"line.separator\"));\n currentLine = reader.readLine();\n }\n\n Matcher matcher = pattern.matcher(sb);\n\n while (matcher.find()) {\n // group 1 = <a da stane => [URL\n // group 3 = > da stane => ]\n // group 5 = </a> da stane => [/URL]\n\n int startIndex = matcher.start();\n int endIndex = matcher.end();\n\n String replacedTag = \"[URL \" + matcher.group(1) + \"]\" + matcher.group(2) + \"[/URL]\";\n sb.replace(startIndex, endIndex, replacedTag);\n matcher = pattern.matcher(sb);\n\n }\n\n\n\n\n System.out.println(sb);\n\n\n }", "private String removeAllLinks(String commentstr)\n {\n String urlPattern = \"((https?|ftp|gopher|telnet|file|Unsure|http):((//)|(\\\\\\\\))+[\\\\w\\\\d:#@%/;$()~_?\\\\+-=\\\\\\\\\\\\.&]*)\";\n Pattern p = Pattern.compile(urlPattern,Pattern.CASE_INSENSITIVE);\n Matcher m = p.matcher(commentstr);\n int i = 0;\n while (m.find()) {\n commentstr = commentstr.replaceAll(m.group(i),\"\").trim();\n i++;\n }\n return commentstr;\n }", "public Set<String> getFullTextUrls(final Record record)\n {\n \treturn MarcUtils.getFullTextUrls(record);\n }", "public static String getValidUrl(String url){\n String result = null;\n if(url.startsWith(\"http://\")){\n result = url;\n }\n else if(url.startsWith(\"/\")){\n result = \"http://www.chenshiyu.com\" + url;\n }\n return result;\n }", "private Set<String> findNewUrls(Document doc) {\n Set<String> newUrlSet = new HashSet<>();\n\n for (Element ah : doc.select(\"a[href]\")) {\n String href = ah.attr(\"abs:href\");\n\n if (!urlSet.contains(href) // Check if this is a new URL\n && href.contains(domain) // Check if the URL is from the same domain\n && isValidExtension(href) // Check that the file extension is not in the list of excluded extensions\n && !href.contains(\"mailto:\") // Check that the href is not an email address\n ) {\n newUrlSet.add(href);\n }\n\n }\n\n processNewUrls(newUrlSet);\n return newUrlSet;\n }", "public void getURL(String url, String target)\n throws IOException {\n if (url.startsWith(JSSTRING)) {\n linkCount += ExtractorJS.considerStrings(uriErrors, curi, url, \n false);\n } else {\n int max = uriErrors.getMaxOutlinks(curi);\n Link.addRelativeToVia(curi, max, url, LinkContext.EMBED_MISC,\n Hop.EMBED);\n linkCount++;\n }\n }" ]
[ "0.7233344", "0.65389264", "0.64812446", "0.6449452", "0.63866776", "0.63772434", "0.63354087", "0.6243921", "0.6176638", "0.60349566", "0.59860384", "0.5971923", "0.59190136", "0.5918447", "0.5794019", "0.57337433", "0.5729933", "0.56570524", "0.56570524", "0.56570524", "0.56570524", "0.56570524", "0.56570524", "0.56531143", "0.56187105", "0.55922127", "0.5591937", "0.5575128", "0.5546015", "0.5543929", "0.552183", "0.5521321", "0.5514826", "0.55095303", "0.55095303", "0.55095303", "0.55095303", "0.55095303", "0.5491505", "0.5489317", "0.5479654", "0.5466674", "0.5413204", "0.54129016", "0.53856707", "0.5382015", "0.5381285", "0.5380997", "0.53689885", "0.53676116", "0.53471935", "0.5346714", "0.5346078", "0.533333", "0.5326627", "0.5323759", "0.5316711", "0.531605", "0.5306797", "0.5289", "0.5288132", "0.52879864", "0.5285856", "0.52849466", "0.52771026", "0.5258188", "0.52531016", "0.52526766", "0.5227887", "0.52264255", "0.5214188", "0.5203197", "0.51953095", "0.5192259", "0.51895416", "0.5185454", "0.51828057", "0.5182682", "0.517664", "0.5174437", "0.5169692", "0.5140596", "0.51216173", "0.51210225", "0.5120491", "0.5120044", "0.511212", "0.5109308", "0.5104457", "0.509783", "0.5093321", "0.5058771", "0.50493354", "0.50438493", "0.5034714", "0.502447", "0.5022445", "0.50214195", "0.5017803", "0.5015293" ]
0.6507139
2
Return links from a url as a string of space separated urls
public static String HTMLLinkString(String url, String filter) throws Exception { URL[] links = HTMLLinks(url); String urls = ""; for (URL link : links) { String slink = link.toString(); if (slink.contains(filter)) { urls = urls + slink + " "; } } return urls.trim(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private @NotNull List<String> getAllLinks(final String text, final String urlStart) {\n List<String> links = new ArrayList<>();\n\n int i = 0;\n while (text.indexOf(urlStart, i) != -1) {\n int linkStart = text.indexOf(urlStart, i);\n int linkEnd = text.indexOf(\" \", linkStart);\n if (linkEnd != -1) {\n String link = text.substring(linkStart, linkEnd);\n links.add(link);\n } else {\n String link = text.substring(linkStart);\n links.add(link);\n }\n i = text.indexOf(urlStart, i) + urlStart.length();\n }\n\n return links;\n }", "public List<String> getLinks();", "public static String HTMLLinkString(String url) throws Exception\n\t{\n\t\tURL[] links = HTMLLinks(url);\n\t\tString urls = \"\";\n\t\tfor (URL link : links)\n\t\t{\n\t\t\turls = urls + link.toString() + \" \";\n\t\t}\n\t\treturn urls.trim();\n\t}", "public SafeHtml linkify() {\n final String part = \"(?:\" +\n \"[a-zA-Z0-9$_+!*'%;:@=?#/~-]\" +\n \"|&(?!lt;|gt;)\" +\n \"|[.,](?!(?:\\\\s|$))\" +\n \")\";\n return replaceAll(\n \"(https?://\" +\n part + \"{2,}\" +\n \"(?:[(]\" + part + \"*\" + \"[)])*\" +\n part + \"*\" +\n \")\",\n \"<a href=\\\"$1\\\" target=\\\"_blank\\\">$1</a>\");\n }", "private Set<String> extracLinks(String url, LinkFilter filter) {\n\n\t\tSet<String> links = new HashSet<String>();\n\t\ttry {\n\t\t\tParser parser = new Parser(url);\n\t\t\tparser.setEncoding(\"UTF-8\");\n\t\t\t// linkFilter filter <a> tag\n\t\t\tNodeClassFilter linkFilter = new NodeClassFilter(LinkTag.class);\n\t\t\t// get all filtered links\n\t\t\tNodeList list = parser.extractAllNodesThatMatch(linkFilter);\n\t\t\tfor (int i = 0; i < list.size(); i++) {\n\t\t\t\tNode tag = list.elementAt(i);\n\t\t\t\tif (tag instanceof LinkTag)// <a> tag\n\t\t\t\t{\n\t\t\t\t\tLinkTag link = (LinkTag) tag;\n\t\t\t\t\tString linkUrl = link.getLink();// url\n\t\t\t\t\tif (filter.accept(linkUrl)) {\n\t\t\t\t\t\t// change bbsdoc to bbstdoc\n\t\t\t\t\t\tString stlink = linkUrl.replace(\"bbsdoc\", \"bbstdoc\");\n\t\t\t\t\t\tlinks.add(stlink);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (ParserException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn links;\n\t}", "public static URL[] HTMLLinks(String url) throws Exception\n\t{\n\t\t// Get the links\n\n\t\tURLConnection conn = (new java.net.URL(url)).openConnection();\n\t\tconn.setRequestProperty(\"User-Agent\",\"Mozilla/5.0 ( compatible ) \");\n\t\tconn.setRequestProperty(\"Accept\",\"*/*\");\n\n\t\tLinkBean sb = new LinkBean();\n\t\tsb.setURL(url);\n\t\tsb.setConnection(conn);\n\t\tURL[] outlinks = sb.getLinks();\n\n\t\t// make links fully qualified\n\t\tURI baseURI = null;\n\t\ttry\n\t\t{\n\t\t\tbaseURI = new URI(url);\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tlogger.error(e.getMessage(), e);\n\t\t\treturn new URL[0];\n\t\t}\n\n\t\t// ----\n\t\tList<URL> fqurls = new ArrayList<URL>();\n\t\tfor (int i = 0; i < outlinks.length; i++)\n\t\t{\n\t\t\tURL fqurl = null;\n\t\t\ttry\n\t\t\t{\n\t\t\t\tfqurl = baseURI.resolve(outlinks[i].toURI()).toURL();\n\t\t\t}\n\t\t\tcatch (Exception e)\n\t\t\t{\n\t\t\t\tlogger.error(e.getMessage(), e);\n\t\t\t}\n\t\t\tif (fqurl != null)\n\t\t\t{\n\t\t\t\tfqurls.add(fqurl);\n\t\t\t}\n\t\t}\n\t\treturn fqurls.toArray(new URL[fqurls.size()]);\n\t}", "public List<String> linkTexts()\n\t{\n\t\t\n\t\tList<String> links=new ArrayList<String>();\n\t\tlinks.add(linkString);\n\t\tlinks.add(\"Facebook.com\");\n\t\tlinks.add(\"google.com;\");\n\t\tlinks.add(\"gmail.com\");\n\t\tlinks.add(\"shine.com\");\n\t\tlinks.add(\"nukari.com\");\n\t\t\n\t\t// Like the above we have to add number of link text are passed to achieve the DataDriven approach through BBD \n\t\t\t\n\t\treturn links;\n\t\t\n\t}", "public static List<String> getLinks(String url, NodeFilter filter) throws ParserException\n\t{\n\t\tParser parser = getParser(url);\n\t\tNodeList list = new NodeList();\n\t\tfor (NodeIterator e = parser.elements(); e.hasMoreNodes();)\n\t\t{\n\t\t\tlist.add(getNodes(e.nextNode(), filter));\n\t\t}\n\t\tList<String> strings = new ArrayList<String>();\n\t\tfor (NodeIterator i = list.elements(); i.hasMoreNodes();)\n\t\t{\n\t\t\tNode n = i.nextNode();\n\t\t\tif (n instanceof LinkTag)\n\t\t\t{ // text\n\t\t\t\tString link = ((LinkTag) n).extractLink();\n\t\t\t\tif (!strings.contains(link))\n\t\t\t\t{\n\t\t\t\t\tstrings.add(((LinkTag) n).extractLink());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn strings;\n\t}", "private void pullLinks(String htmlPage) {\n\n Document doc = Jsoup.parse(htmlPage);\n Elements links = doc.select(\"a[href]\");\n\n for (Element link : links) {\n\n String possibleUrl = link.attr(\"abs:href\");\n\n if (!possibleUrl.equals(\"\")) {\n// Log.v(\"pullLinks\", \" will try to make URL from\" + possibleUrl);\n //if the link attr isn't empty, make a URL\n URL theUrl = NetworkUtils.makeURL(possibleUrl);\n\n if (RegexUtils.urlDomainNameMatch(firstLinkAsString, theUrl.toString())) {\n //if the string version of url is within the same domain as original query\n if (!visitedLinks.contains(theUrl.toString())) {\n// Log.v(\"DLAsyncTask.pullLinks\", \" thinks that \" + theUrl.toString() + \" wasn't visited, add into collected...\");\n collectedLinks.add(theUrl.toString());\n }\n }\n }\n\n }\n }", "public static ArrayList<URL> listLinks(URL baseURL, String htmlText) {\n // list to store links\n ArrayList<URL> links = new ArrayList<URL>();\n\n // compile string into regular expression\n Pattern p = Pattern.compile(REGEX);\n\n // match provided text against regular expression\n Matcher m = p.matcher(htmlText);\n\n // loop through every match found in text\n while ( m.find() ) \n {\n // add the appropriate group from regular expression to list\n try {\n\t\t\t\tlinks.add(new URL(baseURL, m.group(GROUP)));\n\t\t\t} catch (MalformedURLException e) {\n\t\t\t\tSystem.err.println(\"Invalid URL\");\n\t\t\t\te.printStackTrace();\n\t\t\t}\n }\n return links;\n }", "@Test\n\tpublic void testGetLinksMultipleLinks() {\n\t\tList<String> results = helper.getLinks(\n\t\t\t\t\"drop tables; <A HREF=\\\"test.com\\\"> <a href=\\\"nexttest.org\\\". junk junk\", null);\n\t\tassertEquals(2, results.size());\n\t\tassertEquals(\"test.com\", results.get(0));\n\t\tassertEquals(\"nexttest.org\", results.get(1));\n\t}", "List<Link> getLinks();", "public static List<String> getURLs(List<WebElement> links) {\n\t\t List<String> ListHref = new ArrayList<String>();\n\t\t \n\t\t //loops through all links\n\t\t for(WebElement Webhref:links) {\n\t\t\t \n\t\t\t //if element isn't null\n\t\t\t if (Webhref.getAttribute(\"href\") != null) {\n\t\t\t\t String StringHref = (Webhref.getAttribute(\"href\")).toString();\n\n\t\t\t\t //if page isn't part of domain, ignore\n\t\t\t\t if (StringHref.startsWith(variables.domain)) {\n\t\t\t\t\t //System.out.println(StringHref);\n\t\t\t\t\t \n\t\t\t\t\t //if page doesn't have an octothorpe\n\t\t\t\t\t if (!StringHref.contains(\"#\")) {\n\t\t\t\t\t\t \n\t\t\t\t\t\t//if page doesn't ends with one of the file extensions to not use\n\t\t\t\t\t\t String extension = getExtension(StringHref);//gets TLD from URL\n\t\t\t\t\t\t if(!variables.list.stream().anyMatch(extension::contains)) {\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t//if value isn't already part of this array or the already crawled array\n\t\t\t\t\t\t\t if(!ListHref.contains(StringHref) && !variables.crawled.contains(StringHref)) {\n\t\t\t\t\t\t\t\t ListHref.add(StringHref);\n\t\t\t\t\t\t\t\t //System.out.println(StringHref);\n\t\t\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t }\n\t\t\t\t\t }\n\t\t\t\t }\n\t\t\t }\n\t\t }\n\n\t\treturn ListHref;\n\t}", "protected String createUrlEntries(Map model)\r\n {\r\n StringBuilder urlEntries = new StringBuilder();\r\n List<SitemapEntry> sitemapEntries = (List<SitemapEntry>) model.get(SITEMAP_ENTRIES);\r\n for (SitemapEntry sitemapEntry : sitemapEntries)\r\n {\r\n urlEntries.append(createUrlEntry(sitemapEntry));\r\n }\r\n\r\n return urlEntries.toString();\r\n }", "public static List<String> getAllLinkLinks(final String page)\n {\n return getAllMatches(page, LINK_PATTERN, 1);\n }", "public StringBuilder getLinks(Elements imgs) {\n\t\tStringBuilder links = new StringBuilder();\n\t\tString prefix = \"\";\n\t\tfor (Element item : imgs) {\n\t\t\tlinks.append(prefix);\n\t\t\tprefix = \"|\";\n\t\t\tlinks.append(item.attr(\"href\"));\n }\n\t\treturn links;\n\t}", "public List getLinks() {\r\n List links = getElements(\"a\");\r\n ArrayList result = new ArrayList();\r\n for (int i = 0; i < links.size(); i++) {\r\n try {\r\n StandAloneElement keep = ((StandAloneElement)links.get(i));\r\n result.add(parseUrl(keep.getAttribute(\"href\")));\r\n } catch (Exception e) {\r\n }\r\n }\r\n links = getElements(\"FRAME\");\r\n for (int i = 0; i < links.size(); i++) {\r\n try {\r\n StandAloneElement keep = ((StandAloneElement)links.get(i));\r\n result.add(parseUrl(keep.getAttribute(\"src\")));\r\n } catch (Exception e) {\r\n }\r\n }\r\n\r\n return result;\r\n }", "java.lang.String getUrl();", "java.lang.String getUrl();", "java.lang.String getUrl();", "java.lang.String getUrl();", "java.lang.String getUrl();", "java.lang.String getUrl();", "@Test\n public void hrefPatternTest() {\n Pattern aTeg = Pattern.compile(\"(?i)<a([^>]+)>(.+?)</a>\");\n Pattern href = Pattern.compile(\"\\\\s*(?i)href\\\\s*=\\\\s*(\\\\\\\"([^\\\"]+\\\\\\\")|'[^']+'|([^'\\\">\\\\s]+))\");\n String[] validLinkTegs = {\"<li><a href=\\\"/toolbar-creator\\\">Create a Custom Toolbar</a></li>\",\n \"<a href=\\\"http://stlpublicradio.org/programs/slota/archivedetail.php?date='2012-02-29'\\\" title=\\\"\\\" class=\\\"menu_icon menu-17197 \\\" >Грузовые перевозки</a></li>\",\n \"<li><a href='http://www.tipsntracks.com/date/2012/03' title='March 2012'>March 2012</a></li>\"};\n String[] invalidLinkTags = {\"<a href=\\\"\\\"style=\\\"\\\"><img width=\\\"148\\\" height=\\\"32\\\" src=\\\"/images/buttons/btn-www-survey.gif\\\" /></a>\"};\n String[] validLinks = new String[validLinkTegs.length];\n String[] invalidLinks = new String[invalidLinkTags.length];\n for (int i = 0; i < validLinkTegs.length; i++) {\n Matcher matcher = aTeg.matcher(validLinkTegs[i]);\n Assert.assertTrue(matcher.find());\n validLinks[i] = matcher.group(1);\n }\n for (int i = 0; i < invalidLinkTags.length; i++) {\n Matcher matcher = aTeg.matcher(invalidLinkTags[i]);\n Assert.assertTrue(matcher.find());\n invalidLinks[i] = matcher.group(1);\n }\n for (int i = 0; i < validLinkTegs.length; i++) {\n Matcher matcher = href.matcher(validLinks[i]);\n Assert.assertTrue(matcher.find());\n String s = matcher.group(1);\n System.out.println(s.substring(1, s.length() - 1));\n }\n for (int i = 0; i < invalidLinkTags.length; i++) {\n Matcher matcher = href.matcher(invalidLinks[i]);\n Assert.assertFalse(matcher.find());\n }\n }", "@Test\n\tpublic void testGetLinksUpperCaseLink() {\n\t\tList<String> results = helper.getLinks(\"drop tables; <A HREF=\\\"test.com\\\"> junk junk\", null);\n\t\tassertEquals(1, results.size());\n\t\tassertEquals(\"test.com\", results.get(0));\n\t}", "public Collection<Map<String, String>> getLinks();", "static CharSequence linkifyUrls(FormattedTweetText tweetText,\n final LinkClickListener listener, boolean stripLastPhotoEntity, final int linkColor) {\n if (tweetText == null) return null;\n\n if (TextUtils.isEmpty(tweetText.text)) {\n return tweetText.text;\n }\n\n final SpannableStringBuilder spannable\n = new SpannableStringBuilder(tweetText.text);\n\n final List<FormattedUrlEntity> urls = tweetText.urlEntities;\n\n final List<FormattedMediaEntity> media\n = tweetText.mediaEntities;\n final FormattedMediaEntity lastPhoto;\n if (stripLastPhotoEntity) {\n lastPhoto = getLastPhotoEntity(tweetText);\n } else {\n lastPhoto = null;\n }\n\n /*\n * We combine and sort the entities here so that we can correctly calculate the offsets\n * into the text.\n */\n final List<FormattedUrlEntity> combined = mergeAndSortEntities(urls, media);\n\n addUrlEntities(spannable, combined, lastPhoto, listener, linkColor);\n return spannable;\n }", "public static String HTMLLinkString(String root, int level) throws Exception\n\t{\n\t\tString urls = \"\";\n\t\tif (0 == level)\n\t\t{\n\t\t\treturn urls;\n\t\t}\n\t\turls = HTMLLinkString(root);\n\t\tfor (String u : urls.split(\"\\\\s+\"))\n\t\t{\n\t\t\turls = urls + \" \" + HTMLLinkString(u, level - 1);\n\t\t}\n\t\treturn urls.trim();\n\t}", "List<ProductLink> links();", "final String parseForLink(String upperCaseInput,String input)\r\n {\r\n int i,j,k,l;\r\n\tString temp=null;\r\n\tString link=null;\r\n\r\n\t// Look for links to other pages. Eg:- Normal links <A>..</A>\r\n i=upperCaseInput.indexOf(\"HREF\");\r\n\tif(i!=-1)\r\n\t{\r\n\t // Locate position of the quote marks.\r\n\t j=upperCaseInput.indexOf(\"\\\"\",i);\r\n\t k=upperCaseInput.indexOf(\"\\\"\",j+1);\r\n\t // Locate position of </a>\r\n\t l=upperCaseInput.indexOf(\"</A>\",i);\r\n\t // If double quotes were not found then try using single quote marks.\r\n\t if(j==-1 || k==-1 || (j>1 && k==-1))\r\n\t {\r\n\t j=upperCaseInput.indexOf(\"\\'\",i);\r\n\t\tk=upperCaseInput.indexOf(\"\\'\",j+1);\r\n\t }\r\n\t // Remove leading trailing spaces.\r\n if(j!=-1 && k!=-1)\r\n\t {\r\n\t temp=input.substring(j+1,k); // Extrct the link name.\r\n\t\tlink=temp.trim(); // Remove leading and trailing spaces.\r\n\t\treturn(link);\r\n\t }\r\n\t}\r\n\t// 2. Frames,\r\n\ti=upperCaseInput.indexOf(\"FRAME\");\r\n\tif(i!=-1)\r\n\t{\r\n\t l=upperCaseInput.indexOf(\"SRC\",i); // Locate position of source tag.\r\n\t if(l!=-1)\r\n\t {\r\n\t // Locate position of quote marks.\r\n\t\tj=upperCaseInput.indexOf(\"\\\"\",l);\r\n\t\tk=upperCaseInput.indexOf(\"\\\"\",j+1);\r\n\t\t// If double quotes were not found then try single quote marks\r\n\t\tif(j==-1)\r\n\t\t{\r\n\t\t j=upperCaseInput.indexOf(\"\\\"\",i);\r\n\t\t k=upperCaseInput.indexOf(\"\\\"\",j+1);\r\n\t\t}\r\n\t\t// Remove leading and trailing spaces.\r\n\t\tif(j!=-1 && k!=-1)\r\n\t\t{\r\n\t\t temp=input.substring(j+1,k); // Extract the link name\r\n\t\t link=temp.trim();\r\n\t\t return(link);\r\n\t\t}\r\n\t }\r\n\t}\r\n\treturn(null);\r\n }", "public Set<String> getLinks() {\n return links;\n }", "public static LinkedHashSet<String> searchLinks(String searchUrl) {\n LinkedHashSet<String> uniqueLinks = new LinkedHashSet();\n Document doc;\n try {\n doc = Jsoup.connect(searchUrl).get();\n Elements links = doc.select(\"a\");\n for(Element url : links){\n if (validUrl(url.attr(\"href\"))) {\n uniqueLinks.add(url.attr(\"href\"));\n }\n }\n } catch (IOException e) {\n }\n return uniqueLinks;\n }", "@Override\n protected List<String> convertDoisToUrls(Collection<String> dois) {\n List<String> urls = new ArrayList<String>();\n for(String doi:dois) {\n // Encode the doi, then revert the FIRST %2F (slash) back to a \"/\":\n // 10.1023/A%3A1026541510549, not\n // 10.1023%2FA%3A1026541510549\n String url = String.format(\"%sarticle/%s\", baseUrl, encodeDoi(doi).replaceFirst(\"%2F\",\"/\"));\n urls.add(url);\n }\n return urls;\n }", "String getUrl();", "String getUrl();", "String getUrl();", "String getUrl();", "String getUrl();", "private String urlLink(final String url, final String name) {\n Tag aTag = new Tag(\"a\");\n aTag.add(name);\n aTag.addParameter(\"href\", baseUrl + url);\n return aTag.toString();\n }", "private void ExtractURLs(String line)\n {\n String matchedURL = \"\";\n Matcher urlMatcher = urlPattern.matcher(line);\n\n while (urlMatcher.find())\n {\n matchedURL = urlMatcher.group();\n\n if (!distinctURLs.containsKey(matchedURL))\n {\n distinctURLs.put(matchedURL,matchedURL);\n }\n }\n }", "URL format(ShortLink shortLink);", "String getLink();", "public static Set<String> parser(String html){\r\n\r\n\t\tSet<String> urls = new HashSet<String>();\r\n\t\tString regex = \"<a.*?/a>\";\r\n\t\tPattern pt = Pattern.compile(regex);\r\n\t\tMatcher matcher = pt.matcher(html);\r\n\t\twhile(matcher.find()){\r\n\t\t\t//获取网址\r\n//\t\t\tSystem.out.println(\"Group:\"+matcher.group());\r\n\t\t\tMatcher myurl = Pattern.compile(\"href=\\\".*?\\\">\").matcher(matcher.group());\r\n\t\t\tif(myurl.find()){\r\n\t\t\t\tdo{\r\n\t\t\t\t\tString temp = myurl.group();\r\n\t\t\t\t\tif(!temp.startsWith(\"javascript\") && !temp.startsWith(\"/\") && ! temp.startsWith(\"#\")){\r\n\t\t\t\t\t\tString url = myurl.group().replaceAll(\"href=\\\"|\\\">\",\"\");\r\n\t\t\t\t\t\tif(url.contains(\"http\")){\r\n\t\t\t\t\t\t\tif(url.contains(\"\\\"\")){\r\n\t\t\t\t\t\t\t\turl = url.substring(0, url.indexOf(\"\\\"\"));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif(!url.contains(\"$\") && !url.contains(\" \")){\r\n\t\t\t\t\t\t\t\turls.add(url);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}while(myurl.find());\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn urls;\r\n\t}", "Set<Link> extractLinks(CrawlDoc doc, ParseState parseState)\n throws IOException;", "public char[] URLify(char[] url, int len) {\n if (len < 2 || url == null) {\n return url;\n }\n for (int i = 0; i < len; ++i) {\n if (url[i] == ' ') {\n url = shiftTwice(url, i + 1);\n url = replaceSpace(url, i);\n }\n }\n return url;\n }", "public String getUrl(){\n return urlsText;\n }", "@Test\n\tpublic void testGetLinksRelativeLink() {\n\t\tList<String> results = helper\n\t\t\t\t.getLinks(\"drop tables; <A HREF=\\\"/test\\\"> junk junk\", \"http://www.bobbylough.com\");\n\t\tassertEquals(1, results.size());\n\t\tassertEquals(\"http://www.bobbylough.com/test\", results.get(0));\n\t}", "public static void main(String args[]){\n String pattern = \"/^(http(s)?(:\\\\/\\\\/))?(www\\\\.)?\\\\.(\\\\/.*)?$/\";\r\n String input = \"(http://www.archive.com/web/http://www.mrvc.indianrai.gov.in/overview)\";\r\n\r\n Matcher matcher = Pattern.compile(pattern).matcher(input);\r\n while (matcher.find()) {\r\n System.out.println(matcher.group());\r\n int start = matcher.start(1);\r\n int end = matcher.end(1);\r\n String result = input.substring(start,end).replaceFirst(\"www.\",\"\");\r\n if(result.startsWith(\"www.\") ){\r\n input.substring(start,end).replaceFirst(\"www.\",\"\");\r\n }else if(result.startsWith(\"ww2.\")){\r\n input.substring(start,end).replaceFirst(\"ww2.\",\"\");\r\n }else if(result.startsWith(\"web.\")){\r\n input.substring(start,end).replaceFirst(\"web.\",\"\");\r\n }\r\n System.out.println(result);\r\n\r\n }\r\n }", "private String cleanupText(String text){\n return text.replaceAll(\"http[s]*[:](//)[^ ]+\", \"URL\");\n }", "public List<String> getLinks() {\r\n\t\treturn this.links;\r\n\t}", "public ArrayList<String> findLinks(Text value) throws CharacterCodingException{\n\t\tint start = value.find(\"<text\");\n\t\tstart = value.find(\">\", start);\n\t\tint end = value.find(\"</text>\", start);\n\t\t//start+=1;\n\t\tString textBlock=new String();\n\t\ttry{\n\t\tif(end < value.getLength())\n\t\t\ttextBlock = Text.decode(value.getBytes(), start, end-start);\n\t\telse\n\t\t\ttextBlock = Text.decode(value.getBytes(), start, value.getLength()-start);\n\t\t} catch(Exception e){\n\t\t\treturn null;\n\t\t}\n\t\tArrayList<String> List = new ArrayList<String>();\n\t\t\n\t\tPattern wikiLinkRegEx = Pattern.compile(\"\\\\[\\\\[(?:[^|\\\\]]*\\\\|)?([^\\\\]]+)\\\\]\\\\]\");\n\t\tMatcher patternMatcher = wikiLinkRegEx.matcher(textBlock);\n\t\twhile(patternMatcher.find()) {\n\t\t\tint flag=0;\n\t\t\tint startIndex = patternMatcher.start();\n\t\t\tint endIndex = patternMatcher.end();\n\t\t\tString wikiLink = textBlock.substring(startIndex+2, endIndex-2);\n\t\t\twikiLink = wikiLink.replace(\" \", \"_\");\n\n\t\t\t//Checking for the occurrence of '|'\n\t\t\tif(wikiLink.contains(\"|\")){\n\t\t\t\tint pipeIndex = wikiLink.indexOf(\"|\");\n\t\t\t\twikiLink = wikiLink.substring(0, pipeIndex);\n\t\t\t}\n\t\t\t\n\t\t\t//Flagging all the invalid WikiLinks \n\t\t\t//if(wikiLink.contains(\":\") || wikiLink.contains(\"#\") || wikiLink.contains(\"/\") ){\n\t\t\t//\tflag=1;\n\t\t\t//}\n\t\t\t\n\t\t\t// Add the valid WikiLinks in the List\n\t\t\tif(flag==0){\n\t\t\t\twikiLink = wikiLink.replace(\"&amp;\", \"&\");\n\t\t\t\tList.add(wikiLink);\n\t\t\t}\n\t }\n\t\treturn List;\n\t}", "Uri getUrl();", "String getHref();", "public List<TparselinksEntity> getAllLinks();", "List<? extends Link> getLinks();", "public URI[] getLinks(String expression, Map<String, String> namespaces) {\n String[] values = getValues(expression, namespaces);\n if (values == null) {\n return null;\n }\n URI[] uris = new URI[values.length];\n for (int i = 0; i < values.length; i++) {\n uris[i] = URI.create(values[i]);\n }\n return uris;\n }", "public Set<Anchor> parse(Reader reader, String url) {\n\n Set<Anchor> elements = new HashSet<>();\n String urtContent = null;\n try {\n urtContent = readFully(reader);\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (urtContent == null){\n return elements;\n }\n\n mTag = pTag.matcher(urtContent);\n\n while (mTag.find()) {\n\n String href = mTag.group(1); // get the values of href\n String linkElem = mTag.group(2); // get the text of link Html Element\n\n mLink = pLink.matcher(href);\n\n while (mLink.find()) {\n\n String link = mLink.group(1);\n Anchor anchor = new Anchor();\n anchor.setUrl(link);\n anchor.setText(linkElem);\n\n elements.add(anchor);\n\n }\n }\n return elements;\n }", "public static String getFormattedLink(String link) {\n\t\tString result = link;\n\t\tif (StringUtils.isNotBlank(result)) {\n\t\t\tif (!result.toLowerCase().startsWith(Constants.PREFIX_HTTP)\n\t\t\t\t\t|| !result.toLowerCase().startsWith(Constants.PREFIX_HTTPS)) {\n\t\t\t\tif (!Constants.EXTENSION_PATTERN_LINK.matcher(result).matches() && !result.startsWith(\"#\")) {\n\t\t\t\t\tresult += Constants.SUFFIX_HTML;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "private String linkString()\n {\n Iterator<DSAGraphNode<E>> iter = links.iterator();\n String outputString = \"\";\n DSAGraphNode<E> node = null;\n while (iter.hasNext())\n {\n node = iter.next();\n outputString = (outputString + node.getLabel() + \", \");\n }\n return outputString;\n }", "public Set<String> getLinks() throws SearchResultException;", "private static String getURL(String link) {\n\t\treturn \"https://en.wikipedia.org/wiki/\" + link;\n\t}", "public static List<String> extract(Document document) {\n Elements links = document.select(\"a[href]\");\n Elements media = document.select(\"[src]\");\n Elements imports = document.select(\"link[href]\");\n\n List<String> allLinks = new ArrayList<>();\n populateLinks(allLinks, media, \"abs:src\");\n populateLinks(allLinks, imports, \"abs:href\");\n populateLinks(allLinks, links, \"abs:href\");\n return allLinks;\n }", "public boolean isURLInString(String s) {\n\t\tString[] parts = s.split(\"\\\\s\");\r\n\r\n\t\t// Attempt to convert each item into an URL.\r\n\t\tfor (String item : parts)\r\n\t\t\ttry {\r\n\t\t\t\tURL url = new URL(item);\r\n\t\t\t\t// If possible then replace with anchor...\r\n\t\t\t\t// System.out.print(\"<a href=\\\"\" + url + \"\\\">\" + url + \"</a> \");\r\n\r\n\t\t\t\tthis.address = url.toString();\r\n\r\n\t\t\t\treturn true;\r\n\t\t\t} catch (MalformedURLException e) {\r\n\t\t\t\t// If there was an URL that was not it!...\r\n\t\t\t\tSystem.out.print(item + \" \");\r\n\t\t\t}\r\n\r\n\t\treturn false;\r\n\t}", "public static String formatUrl(String url) {\n if (!url.startsWith(\"http://\") && !url.startsWith(\"https://\")) {\n url = \"http://\" + url;\n }\n return url;\n }", "public URL standardizeURL(URL startingURL);", "public static List<String> getRequestUrl(Document doc,String currenturl){\n\t\tList<String> urls = new ArrayList<String>();\n\t\tElements eles = doc.select(\".clsTRSNavigatorDIV a\");\n\t\tfor(Element e:eles){\n\t\t\tif(NewsUtils.ifNumbers(e.ownText().trim()) && !e.ownText().trim().equals(\"1\")){\n\t\t\t\turls.add(currenturl.substring(0, currenturl.lastIndexOf('.'))\n\t\t\t\t\t\t+\"_\"+(Integer.valueOf(e.ownText().trim())-1)\n\t\t\t\t\t\t+currenturl.substring(currenturl.lastIndexOf('.')));\n\t\t\t}\n\t\t}\n\t\treturn urls;\n\t}", "public void pullResources(String domainURL){\n URLResource page = new URLResource(\"https://www.dukelearntoprogram.com//course2/data/manylinks.html\");\n \n int startIndex;\n int endIndex;\n // loop through pages\n for (String s : page.lines()){\n \n //System.out.println(s);\n int pose = s.indexOf(domainURL);\n \n // if the url is in the line\n if (-1 != pose) {\n \n startIndex = s.lastIndexOf(\"\\\"\",pose); // find actual start\n endIndex = s.indexOf(\"\\\"\",pose+1); // find end\n \n System.out.println( s.substring(startIndex, endIndex));\n \n \n \n }\n \n \n }\n}", "public URI getLink(String expression) {\n return getLink(expression, CastUtils.cast(Collections.emptyMap(), String.class, String.class));\n }", "public void getLinks() {\n\n var client = HttpClient.newBuilder()\n .followRedirects(HttpClient.Redirect.ALWAYS)\n .build();\n\n HttpRequest request = HttpRequest.newBuilder()\n .uri(URI.create(URL_PREFIX))\n .build();\n client.sendAsync(request, HttpResponse.BodyHandlers.ofLines())\n .thenApply(HttpResponse::body)\n .thenApply(this::processLines)\n .thenApply(versions -> tasks(versions))\n .join();\n }", "URL getUrl();", "private static void addUrlEntities(final SpannableStringBuilder spannable,\n final List<FormattedUrlEntity> entities,\n final FormattedMediaEntity lastPhoto,\n final LinkClickListener listener, final int linkColor) {\n if (entities == null || entities.isEmpty()) return;\n\n int offset = 0;\n int len;\n int start;\n int end;\n for (final FormattedUrlEntity url : entities) {\n start = url.start - offset;\n end = url.end - offset;\n if (start >= 0 && end <= spannable.length()) {\n // replace the last photo url with empty string, we can use the start indices as\n // as simple check, since none of this will work anyways if we have overlapping\n // entities\n if (lastPhoto != null && lastPhoto.start == url.start) {\n spannable.replace(start, end, \"\");\n len = end - start;\n end -= len;\n offset += len;\n } else if (!TextUtils.isEmpty(url.displayUrl)) {\n spannable.replace(start, end, url.displayUrl);\n len = end - (start + url.displayUrl.length());\n end -= len;\n offset += len;\n\n final CharacterStyle span = new ClickableSpan() {\n @Override\n public void onClick(View widget) {\n if (listener == null) return;\n listener.onUrlClicked(url.url);\n }\n\n @Override\n public void updateDrawState(TextPaint ds) {\n ds.setColor(linkColor);\n ds.setUnderlineText(false); // Links should not be underlined\n }\n };\n spannable.setSpan(span, start, end, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);\n }\n }\n }\n }", "private void getLinks(Page page, Element content, boolean withConnection) throws JSONException, SQLException {\n\t\tString pageTitle = page.getTitle();\n\t\tString pageId = String.valueOf(page.getPageId());\n\t\tElements links = content.select(\"a[href]\");\n\t\tPageApi pa = new PageApi();\n\t\tfor (Iterator<Element> iterator = links.iterator(); iterator.hasNext();) {\n\t\t\tElement element = iterator.next();\n\t\t\tString link = element.attr(\"href\");\n\t\t\t/**\n\t\t\t * It has to be an internal wikipedia link\n\t\t\t */\n\t\t\tif (link.startsWith(\"/wiki/\")) {\n\t\t\t\t/**\n\t\t\t\t * Ignore unrelevant links\n\t\t\t\t */\n\t\t\t\tif (link.startsWith(\"/wiki/Category:\") || link.startsWith(\"/wiki/Special:\")\n\t\t\t\t\t\t|| link.startsWith(\"/wiki/Wikipedia:\") || link.startsWith(\"/wiki/Help:\")\n\t\t\t\t\t\t|| link.startsWith(\"/wiki/Template:\") || link.startsWith(\"/wiki/Portal:\")\n\t\t\t\t\t\t|| link.startsWith(\"/wiki/Talk:\") || link.startsWith(\"/wiki/\" + pageTitle + \":\")\n\t\t\t\t\t\t|| link.startsWith(\"/wiki/File:\") || link.startsWith(\"/wiki/Template_talk:\")) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tlink = link.replace(\"/wiki/\", \"\");\n\t\t\t\tPage character = pa.getPageInfoForTitle(link);\n\t\t\t\tif (withConnection) {\n\t\t\t\t\tif (tempList.contains(character.getPageId())) {\n\t\t\t\t\t\tpersistConnection(pageId, character);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\telse {\n\t\t\t\t\tpersistCharacter(pageId, character);\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t}", "String checkAndTrimUrl(String url);", "private String getUrlHost(String url) {\n // httpx://host/.....\n\n int hostStart = url.indexOf(\"//\");\n if (hostStart == -1) {\n return \"\";\n }\n int hostEnd = url.indexOf(\"/\", hostStart + 2);\n if (hostEnd == -1) {\n return url.substring(hostStart + 2);\n } else {\n return url.substring(hostStart + 2, hostEnd);\n }\n\n }", "public String getTextUrl(String text) {\n return StrUtils.createUrlFromString(text);\n }", "public static List<String> resolveURLs(final String css) {\n final Matcher matcher = URL.matcher(css);\n final List<String> urls = new ArrayList<String>();\n while (matcher.find()) {\n final String url = matcher.group(1);\n urls.add(url);\n }\n return urls;\n }", "private String parseUrl(String fileUri) {\n\n fileUri = fileUri.replace(\" \", \"%20\");\n\n if (fileUri.contains(\" \")) {\n return parseUrl(fileUri);\n }\n return fileUri;\n }", "java.net.URL getUrl();", "@Override\n\tpublic ArrayList<String> getLinks() {\n\t\treturn this.description.getLinks();\n\t}", "static List<WebURL> ExtractUrl(Page page){\n // TODO: reference to parser to extractor urls from the web content\n return null;\n }", "SaldoLinks(String rawValue) {\n\n if (StringUtils.isEmpty(rawValue)) {\n links = Collections.emptyList();\n return;\n }\n\n String[] rawLinks = rawValue.split(Utils.ASTERISK_SEPARATOR);\n links = new ArrayList<>();\n\n for (String rawLink : rawLinks) {\n if (StringUtils.hasLength(rawLink)) {\n SaldoLink saldoLink = new SaldoLink(rawLink);\n if (saldoLink.hasValidLinks()) {\n links.add(saldoLink);\n }\n }\n }\n }", "public static String HTMLLinkString(String root, int level, String filter) throws Exception\n\t{\n\t\tString urls = \"\";\n\t\tif (0 == level)\n\t\t{\n\t\t\treturn urls;\n\t\t}\n\t\turls = HTMLLinkString(root, filter);\n\t\tfor (String u : urls.split(\"\\\\s+\"))\n\t\t{\n\t\t\tif (u.contains(filter))\n\t\t\t{\n\t\t\t\turls = urls + \" \" + HTMLLinkString(u, level - 1, filter);\n\t\t\t}\n\t\t}\n\t\treturn urls.trim();\n\t}", "@Test\n public void testNormalizeToStringWithSpaceURL() throws Exception {\n AbstractURLHandler handler = new TestURLHandler();\n String normalizedUrl = handler.normalizeToString(new URL(\n \"http://ant.apache.org/ivy/url with space/ivy-1.0.xml\"));\n assertEquals(\"http://ant.apache.org/ivy/url%20with%20space/ivy-1.0.xml\", normalizedUrl);\n }", "private ArrayList<String> permaLinkParser(String response, ArrayList<String> permaLinkUrls){\n\t\tJsonElement element = new JsonParser().parse(response);\n\t\tJsonArray array = element.getAsJsonArray();\n\t\t\n\t\tfor(int i = 0; i < array.size(); i++){\n\t\t\tJsonObject currentObject = array.get(i).getAsJsonObject().getAsJsonObject();\n\t\t\t\n\t\t\tString key = currentObject.get(\"permalink_url\").toString().replaceAll(\"\\\"\", \"\");\n\t\t\tpermaLinkUrls.add(key);\n\t\t}\n\t\t\n\t\treturn permaLinkUrls;\n\t\t\n\t}", "public static String formURL(String url)\n\t{\n\t\tString newurl;\n\t\tif (url.contains(\"http://\") || url.contains(\"https://\"))\n\t\t{\n\t\t\tnewurl = url;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tnewurl = \"http://\" + url;\n\t\t}\n\t\treturn newurl;\n\t}", "String url();", "private static Set<String> extractHosts(String rawContent) { \r\n\t\tString hostRegex = \"https:\\\\/\\\\/[a-zA-Z]([\\\\w\\\\.\\\\-])*\\\\.gov.br\";\r\n\t\tMatcher matcher = Pattern.compile(hostRegex).matcher(rawContent);\r\n\t\t\r\n\t\tSet<String> results = new HashSet<String>();\r\n\t\twhile(matcher.find()) {\r\n\t\t\tresults.add(matcher.group().replace(\"http://\", \"\").replace(\"https://\", \"\"));\r\n\t\t}\r\n\t\treturn results;\r\n\t\t\r\n\t}", "protected abstract String getPublicUrl(URL url);", "public Uri getUrl() {\n return Uri.parse(urlString);\n }", "public ArrayList<String> getWebLink(){\r\n\t\treturn webLinks;\t\t\r\n\t}", "public String getLink();", "java.util.List<org.chromium.components.paint_preview.common.proto.PaintPreview.LinkDataProto> \n getLinksList();", "public Stream<ParsedURL> urls() {\n return stream().map(req -> new ParsedURL(req.getUrl()));\n }", "public static String urlToString(final String url) {\n Scanner urlScanner;\n try {\n urlScanner = new Scanner(new URL(url).openStream(), \"UTF-8\");\n } catch (IOException e) {\n return \"\";\n }\n String contents = urlScanner.useDelimiter(\"\\\\A\").next();\n urlScanner.close();\n return contents;\n }", "public static void main(String[] args) throws IOException {\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\n Pattern pattern = Pattern.compile(\"<a\\\\s+(href=[^>]+)>([^<]+)<\\\\/a>\");\n\n StringBuilder sb = new StringBuilder();\n String currentLine = reader.readLine();\n\n while (!\"END\".equals(currentLine)) {\n sb.append(currentLine).append(System.getProperty(\"line.separator\"));\n currentLine = reader.readLine();\n }\n\n Matcher matcher = pattern.matcher(sb);\n\n while (matcher.find()) {\n // group 1 = <a da stane => [URL\n // group 3 = > da stane => ]\n // group 5 = </a> da stane => [/URL]\n\n int startIndex = matcher.start();\n int endIndex = matcher.end();\n\n String replacedTag = \"[URL \" + matcher.group(1) + \"]\" + matcher.group(2) + \"[/URL]\";\n sb.replace(startIndex, endIndex, replacedTag);\n matcher = pattern.matcher(sb);\n\n }\n\n\n\n\n System.out.println(sb);\n\n\n }", "private String removeAllLinks(String commentstr)\n {\n String urlPattern = \"((https?|ftp|gopher|telnet|file|Unsure|http):((//)|(\\\\\\\\))+[\\\\w\\\\d:#@%/;$()~_?\\\\+-=\\\\\\\\\\\\.&]*)\";\n Pattern p = Pattern.compile(urlPattern,Pattern.CASE_INSENSITIVE);\n Matcher m = p.matcher(commentstr);\n int i = 0;\n while (m.find()) {\n commentstr = commentstr.replaceAll(m.group(i),\"\").trim();\n i++;\n }\n return commentstr;\n }", "public Set<String> getFullTextUrls(final Record record)\n {\n \treturn MarcUtils.getFullTextUrls(record);\n }", "public static String getValidUrl(String url){\n String result = null;\n if(url.startsWith(\"http://\")){\n result = url;\n }\n else if(url.startsWith(\"/\")){\n result = \"http://www.chenshiyu.com\" + url;\n }\n return result;\n }", "private Set<String> findNewUrls(Document doc) {\n Set<String> newUrlSet = new HashSet<>();\n\n for (Element ah : doc.select(\"a[href]\")) {\n String href = ah.attr(\"abs:href\");\n\n if (!urlSet.contains(href) // Check if this is a new URL\n && href.contains(domain) // Check if the URL is from the same domain\n && isValidExtension(href) // Check that the file extension is not in the list of excluded extensions\n && !href.contains(\"mailto:\") // Check that the href is not an email address\n ) {\n newUrlSet.add(href);\n }\n\n }\n\n processNewUrls(newUrlSet);\n return newUrlSet;\n }", "public void getURL(String url, String target)\n throws IOException {\n if (url.startsWith(JSSTRING)) {\n linkCount += ExtractorJS.considerStrings(uriErrors, curi, url, \n false);\n } else {\n int max = uriErrors.getMaxOutlinks(curi);\n Link.addRelativeToVia(curi, max, url, LinkContext.EMBED_MISC,\n Hop.EMBED);\n linkCount++;\n }\n }" ]
[ "0.7233344", "0.65389264", "0.6507139", "0.64812446", "0.6449452", "0.63866776", "0.63772434", "0.63354087", "0.6243921", "0.6176638", "0.60349566", "0.5971923", "0.59190136", "0.5918447", "0.5794019", "0.57337433", "0.5729933", "0.56570524", "0.56570524", "0.56570524", "0.56570524", "0.56570524", "0.56570524", "0.56531143", "0.56187105", "0.55922127", "0.5591937", "0.5575128", "0.5546015", "0.5543929", "0.552183", "0.5521321", "0.5514826", "0.55095303", "0.55095303", "0.55095303", "0.55095303", "0.55095303", "0.5491505", "0.5489317", "0.5479654", "0.5466674", "0.5413204", "0.54129016", "0.53856707", "0.5382015", "0.5381285", "0.5380997", "0.53689885", "0.53676116", "0.53471935", "0.5346714", "0.5346078", "0.533333", "0.5326627", "0.5323759", "0.5316711", "0.531605", "0.5306797", "0.5289", "0.5288132", "0.52879864", "0.5285856", "0.52849466", "0.52771026", "0.5258188", "0.52531016", "0.52526766", "0.5227887", "0.52264255", "0.5214188", "0.5203197", "0.51953095", "0.5192259", "0.51895416", "0.5185454", "0.51828057", "0.5182682", "0.517664", "0.5174437", "0.5169692", "0.5140596", "0.51216173", "0.51210225", "0.5120491", "0.5120044", "0.511212", "0.5109308", "0.5104457", "0.509783", "0.5093321", "0.5058771", "0.50493354", "0.50438493", "0.5034714", "0.502447", "0.5022445", "0.50214195", "0.5017803", "0.5015293" ]
0.59860384
11
Get a list of all the urls upto deep within
public static String HTMLLinkString(String root, int level) throws Exception { String urls = ""; if (0 == level) { return urls; } urls = HTMLLinkString(root); for (String u : urls.split("\\s+")) { urls = urls + " " + HTMLLinkString(u, level - 1); } return urls.trim(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public URL[] getURLs(String mkey) {\n\t\tURL last;\n\t\tint i = 0;\n\t\tArrayList<URL> v = new ArrayList<>();\n\t\twhile (true) {\n\t\t\tlast = getURL(mkey + i);\n\t\t\ti++;\n\t\t\tif (last == null)\n\t\t\t\tbreak;\n\t\t\tv.add(last);\n\t\t}\n\t\tif (v.size() != 0) {\n\t\t\tURL[] path = new URL[v.size()];\n\t\t\treturn v.toArray(path);\n\t\t} else {\n\t\t\treturn (URL[]) getDefault(mkey);\n\t\t}\n\t}", "public static List<String> getPaths(String url, int limit) {\n List<String> list = new ArrayList<String>();\n if (StringUtils.isEmpty(url) || !isUrlHttp(url)) {\n return list;\n }\n \n String u = url;\n if (u.contains(\"?\")) {\n u = u.split(\"\\\\?\")[0];\n }\n String domain = com.buzzinate.common.util.string.UrlUtil.getDomainName(u);\n String fulldomain = com.buzzinate.common.util.string.UrlUtil.getFullDomainName(u);\n \n // add domain to list\n list.add(domain); \n \n // add subdomain to list\n String subdomain = StringUtils.substringBefore(fulldomain, domain);\n String[] subdomains = StringUtils.split(subdomain, '.');\n String temp = domain;\n for (int index = subdomains.length - 1; index >= 0; index--) {\n temp = subdomains[index] + \".\" + temp;\n list.add(temp);\n }\n \n // add namespace to list\n String namespace = StringUtils.substringAfter(u, fulldomain);\n String[] namespaces = namespace.split(\"/\", limit + 2);\n temp = fulldomain;\n for (int i = 1; i < namespaces.length - 1; i++) {\n //System.out.println(i+\"=\"+namespaces[i]);\n if (!StringUtils.isEmpty(namespaces[i])) {\n temp += \"/\" + namespaces[i];\n list.add(temp);\n }\n }\n return list;\n }", "public List<Map<String,Object>> getURLs() {\n return urls;\n }", "public URL[] getUrls() {\n\t\treturn urls.toArray(new URL[urls.size()]);\n\t}", "public String[] getUrls() {\n\t\tif (results == null)\n\t\t\treturn null;\n\t\tWebSearchResult[] resultsArray = results.listResults();\n\t\tString[] urls = new String[resultsArray.length];\n\t\tfor (int i = 0; i < urls.length; i++) {\n\t\t\turls[i] = resultsArray[i].getUrl();\n\t\t}\n\t\treturn urls;\n\t}", "public HashSet<String> findTheUrlsBasicCrawler( URL url, Integer depth ) {\n\t\tcrawlerBasic.getLinks().clear();\n\t\t\n\t\tcrawlerBasic.setDesiredDepth(depth);\n\t\t\n\t\t//Use the methods to crawl through the site searching for links\n\t\tcrawlerBasic.getPageLinks(url.toString(), 1);\n\t\t\n\t\treturn crawlerBasic.getLinks();\n\t\t\n\t}", "public ArrayList<ExternalLink> getExternalLinksRecursive() {\n\t\treturn getPageObjectsRecursive(ExternalLink.class);\n\t}", "public List<String> getUrlsToCheck(CachedUrl cu) {\n List<String> res = new ArrayList<String>(3);\n Properties props;\n switch (detectNoSubstanceRedirectUrl) {\n case First:\n return ListUtil.list(cu.getUrl());\n case Last:\n props = cu.getProperties();\n String url = props.getProperty(CachedUrl.PROPERTY_CONTENT_URL);\n if (url == null) {\n\turl = cu.getUrl();\n }\n return ListUtil.list(url);\n case All:\n return AuUtil.getRedirectChain(cu);\n }\n return res;\n }", "public List<String> getUrls() {\n\t\treturn urls;\n\t}", "public Set<URL> getTargetPageURLs(){\n\t\tSet<URL> urls = new HashSet<URL>();\n\t\tString url = \"http://www.infoq.com/news/2012/12/twemproxy;jsessionid=1652D82C3359CBAB67DA00B26BE7784B\";\n\t\turls.add(URL.valueOf(url));\n\t\treturn urls;\n\t}", "public List<String> getLinks();", "private String fetchUrl() {\n\t\tString url;\n\t\tint depth;\n\t\tdo\n\t\t{\n\t\t\tLandingPage lp = this.pagesToVisit.remove(0);\n\t\t\turl = lp.getUrl();\n\t\t\tdepth = lp.getDepth();\n\t\t\t\n\t\t}while(this.pagesVisited.containsKey(url) || !(isvalidURL(url)));\n\t\tthis.pagesVisited.put(url,depth);\n\t\treturn url;\n\t}", "java.util.List<java.lang.String>\n getPeerURLsList();", "public Stream<ParsedURL> urls() {\n return stream().map(req -> new ParsedURL(req.getUrl()));\n }", "List<String> getListPaths();", "public Set<String> getURLs() {\n return pageURLs;\n }", "public List getLinks() {\r\n List links = getElements(\"a\");\r\n ArrayList result = new ArrayList();\r\n for (int i = 0; i < links.size(); i++) {\r\n try {\r\n StandAloneElement keep = ((StandAloneElement)links.get(i));\r\n result.add(parseUrl(keep.getAttribute(\"href\")));\r\n } catch (Exception e) {\r\n }\r\n }\r\n links = getElements(\"FRAME\");\r\n for (int i = 0; i < links.size(); i++) {\r\n try {\r\n StandAloneElement keep = ((StandAloneElement)links.get(i));\r\n result.add(parseUrl(keep.getAttribute(\"src\")));\r\n } catch (Exception e) {\r\n }\r\n }\r\n\r\n return result;\r\n }", "public List<URL> getURLList(final String key) {\n return getURLList(key, new ArrayList<>());\n }", "List<Link> getLinks();", "public String[] getURLs(String... relativeUrls) {\n String[] absoluteUrls = new String[relativeUrls.length];\n\n for (int i = 0; i < relativeUrls.length; ++i) absoluteUrls[i] = getURL(relativeUrls[i]);\n\n return absoluteUrls;\n }", "public static List<UrlInfo> searchAllUrl() {\n\n //getSynonyms(queryKeywords);\n\n ArrayList<Long> keywordIdList = new ArrayList<Long>();\n ArrayList<Long> finalIdList = new ArrayList<Long>();\n\n String email = Secured.getUser(ctx());\n List<UrlEntry> entryIdList = UrlEntry.find()\n .select(\"entryId\")\n .where()\n .eq(\"email\", email)\n .findList();\n for (UrlEntry entry : entryIdList) {\n finalIdList.add(entry.getEntryId());\n }\n System.out.println(\"finalIdList---\" + finalIdList);\n List<UrlInfo> urlList = UrlInfo.find().select(\"url\").where().in(\"urlEntryId\", finalIdList).findList();\n /*ArrayList<String> urls = new ArrayList<String>();\n for (UrlInfo urlInfo : urlList) {\n urls.add(urlInfo.getUrl());\n }\n System.out.println(\"urls in search----\" + urls);*/\n return urlList;\n }", "private Set<String> findNewUrls(Document doc) {\n Set<String> newUrlSet = new HashSet<>();\n\n for (Element ah : doc.select(\"a[href]\")) {\n String href = ah.attr(\"abs:href\");\n\n if (!urlSet.contains(href) // Check if this is a new URL\n && href.contains(domain) // Check if the URL is from the same domain\n && isValidExtension(href) // Check that the file extension is not in the list of excluded extensions\n && !href.contains(\"mailto:\") // Check that the href is not an email address\n ) {\n newUrlSet.add(href);\n }\n\n }\n\n processNewUrls(newUrlSet);\n return newUrlSet;\n }", "private List<VizUrl> getManifestVizUrls(JSONObject manifest) {\n return TreeUrlCallback.getTreeUrls(manifest.toString());\n }", "private @NotNull List<String> getAllLinks(final String text, final String urlStart) {\n List<String> links = new ArrayList<>();\n\n int i = 0;\n while (text.indexOf(urlStart, i) != -1) {\n int linkStart = text.indexOf(urlStart, i);\n int linkEnd = text.indexOf(\" \", linkStart);\n if (linkEnd != -1) {\n String link = text.substring(linkStart, linkEnd);\n links.add(link);\n } else {\n String link = text.substring(linkStart);\n links.add(link);\n }\n i = text.indexOf(urlStart, i) + urlStart.length();\n }\n\n return links;\n }", "public List<Path> getAllPaths();", "public HashSet<String> getChildrenURL() {\n return childrenURL;\n }", "public Collection<Map<String, String>> getLinks();", "private List<URL> getJsonUrls(\n TreeLogger treeLogger,\n URL[] urls\n ) throws UnableToCompleteException {\n List<URL> jsonUrls = new ArrayList<>();\n for (URL url : urls) {\n\n jsonUrls.add(url);\n\n /**\n * check if filename is in format that could indicate that we have\n * url series <resourceName>_0.json\n */\n final RegExp compile = RegExp.compile(\"(.+)_(\\\\d+)\\\\.(\\\\w+)\");\n final MatchResult exec = compile.exec(url.getPath().substring(url.getPath().lastIndexOf(\"/\") + 1));\n if (exec != null) {\n final String filePrefix = exec.getGroup(1);\n int fileSequenceIndex = Integer.valueOf(exec.getGroup(2));\n final String fileExtension = exec.getGroup(3);\n URL siblingUrl = null;\n\n try {\n while (true) {\n String siblingUri = filePrefix + \"_\" + (++fileSequenceIndex) + \".\" + fileExtension;\n siblingUrl = new URL(url, siblingUri);\n siblingUrl.openStream();\n if (!jsonUrls.contains(siblingUrl)) {\n jsonUrls.add(siblingUrl);\n }\n }\n } catch (MalformedURLException e) {\n treeLogger.log(TreeLogger.ERROR, \"Reading of sibling texture atlas failed \", e);\n throw new UnableToCompleteException();\n } catch (IOException e) {\n if (Objects.equals(siblingUrl, url)) {\n treeLogger.log(TreeLogger.ERROR, \"Reading of sibling texture atlas failed \", e);\n throw new UnableToCompleteException();\n } else {\n // all siblings found process is finished\n }\n }\n }\n }\n return jsonUrls;\n }", "java.lang.String getPeerURLs(int index);", "public static List<String> extract(Document document) {\n Elements links = document.select(\"a[href]\");\n Elements media = document.select(\"[src]\");\n Elements imports = document.select(\"link[href]\");\n\n List<String> allLinks = new ArrayList<>();\n populateLinks(allLinks, media, \"abs:src\");\n populateLinks(allLinks, imports, \"abs:href\");\n populateLinks(allLinks, links, \"abs:href\");\n return allLinks;\n }", "public Map<String, URLValue> loadAllURLs()\n\t{\n\t\tEntityCursor<URLEntity> results = this.env.getEntityStore().getPrimaryIndex(String.class, URLEntity.class).entities();\n\t\tMap<String, URLValue> urls = new HashMap<String, URLValue>();\n\t\tURLValue url;\n\t\tfor (URLEntity entity : results)\n\t\t{\n\t\t\turl = new URLValue(entity.getKey(), entity.getURL(), entity.getUpdatingPeriod());\n\t\t\turls.put(url.getKey(), url);\n\t\t}\n\t\tresults.close();\n\t\treturn urls;\n\t}", "public List<URL> getUrlsForCurrentClasspath() {\r\n ClassLoader loader = Thread.currentThread().getContextClassLoader();\r\n\r\n //is URLClassLoader?\r\n if (loader instanceof URLClassLoader) {\r\n return ImmutableList.of(((URLClassLoader) loader).getURLs());\r\n }\r\n\r\n List<URL> urls = Lists.newArrayList();\r\n\r\n //get from java.class.path\r\n String javaClassPath = System.getProperty(\"java.class.path\");\r\n if (javaClassPath != null) {\r\n\r\n for (String path : javaClassPath.split(File.pathSeparator)) {\r\n try {\r\n urls.add(new File(path).toURI().toURL());\r\n } catch (Exception e) {\r\n throw new ReflectionsException(\"could not create url from \" + path, e);\r\n }\r\n }\r\n }\r\n\r\n return urls;\r\n }", "public Urls getUrls(ISelector selector) {\n\t\treturn (Urls) selectBySelector(selector);\n\t}", "private final Map<String, String> getUrls(String themeDir, UrlBuilder urlBuilder) {\n // The urls that are accessible to the templates. \n // NB We are not using our menu object mechanism to build menus here, because we want the \n // view to control which links go where, and the link text and title.\n Map<String, String> urls = new HashMap<String, String>();\n \n urls.put(\"home\", urlBuilder.getHomeUrl());\n \n urls.put(\"about\", urlBuilder.getPortalUrl(Route.ABOUT));\n if (ContactMailServlet.getSmtpHostFromProperties() != null) {\n urls.put(\"contact\", urlBuilder.getPortalUrl(Route.CONTACT));\n }\n urls.put(\"search\", urlBuilder.getPortalUrl(Route.SEARCH)); \n urls.put(\"termsOfUse\", urlBuilder.getPortalUrl(Route.TERMS_OF_USE)); \n urls.put(\"login\", urlBuilder.getPortalUrl(Route.LOGIN)); \n urls.put(\"logout\", urlBuilder.getLogoutUrl()); \n urls.put(\"siteAdmin\", urlBuilder.getPortalUrl(Route.LOGIN)); \n \n urls.put(\"siteIcons\", urlBuilder.getPortalUrl(themeDir + \"/site_icons\"));\n return urls;\n }", "Set<URI> fetchAllUris(ServicePath service);", "@Override\n\tpublic Collection<URL> getUrlsToFilter() {\n\t\tSet<URL> filterSet = new HashSet<URL>();\n\t\tString url=\"http://www.infoq.com/news/2012/11/Panel-WinRT-Answers;jsessionid=91AB81A159E85692E6F1199644E2053C \";\n\t\tfilterSet.add(URL.valueOf(url));\n\t\treturn filterSet;\n\t}", "public Urls getUrlsOrderedByName() {\n\t\treturn getUrls(\"name\", true);\n\t}", "Collection<? extends Object> getHadithUrl();", "public static List<String> getURLs(List<WebElement> links) {\n\t\t List<String> ListHref = new ArrayList<String>();\n\t\t \n\t\t //loops through all links\n\t\t for(WebElement Webhref:links) {\n\t\t\t \n\t\t\t //if element isn't null\n\t\t\t if (Webhref.getAttribute(\"href\") != null) {\n\t\t\t\t String StringHref = (Webhref.getAttribute(\"href\")).toString();\n\n\t\t\t\t //if page isn't part of domain, ignore\n\t\t\t\t if (StringHref.startsWith(variables.domain)) {\n\t\t\t\t\t //System.out.println(StringHref);\n\t\t\t\t\t \n\t\t\t\t\t //if page doesn't have an octothorpe\n\t\t\t\t\t if (!StringHref.contains(\"#\")) {\n\t\t\t\t\t\t \n\t\t\t\t\t\t//if page doesn't ends with one of the file extensions to not use\n\t\t\t\t\t\t String extension = getExtension(StringHref);//gets TLD from URL\n\t\t\t\t\t\t if(!variables.list.stream().anyMatch(extension::contains)) {\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t//if value isn't already part of this array or the already crawled array\n\t\t\t\t\t\t\t if(!ListHref.contains(StringHref) && !variables.crawled.contains(StringHref)) {\n\t\t\t\t\t\t\t\t ListHref.add(StringHref);\n\t\t\t\t\t\t\t\t //System.out.println(StringHref);\n\t\t\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t }\n\t\t\t\t\t }\n\t\t\t\t }\n\t\t\t }\n\t\t }\n\n\t\treturn ListHref;\n\t}", "private List<String> getOfferPagesLinks(Document document) {\n return document.select(\"div[class=product-image loaded] > a[href]\").eachAttr(\"abs:href\");\n }", "public List<URL> newURLs() {\r\n // TODO: Implement this!\r\n return new LinkedList<URL>();\r\n }", "private void pullLinks(String htmlPage) {\n\n Document doc = Jsoup.parse(htmlPage);\n Elements links = doc.select(\"a[href]\");\n\n for (Element link : links) {\n\n String possibleUrl = link.attr(\"abs:href\");\n\n if (!possibleUrl.equals(\"\")) {\n// Log.v(\"pullLinks\", \" will try to make URL from\" + possibleUrl);\n //if the link attr isn't empty, make a URL\n URL theUrl = NetworkUtils.makeURL(possibleUrl);\n\n if (RegexUtils.urlDomainNameMatch(firstLinkAsString, theUrl.toString())) {\n //if the string version of url is within the same domain as original query\n if (!visitedLinks.contains(theUrl.toString())) {\n// Log.v(\"DLAsyncTask.pullLinks\", \" thinks that \" + theUrl.toString() + \" wasn't visited, add into collected...\");\n collectedLinks.add(theUrl.toString());\n }\n }\n }\n\n }\n }", "public static List<String> getLinks(String url, NodeFilter filter) throws ParserException\n\t{\n\t\tParser parser = getParser(url);\n\t\tNodeList list = new NodeList();\n\t\tfor (NodeIterator e = parser.elements(); e.hasMoreNodes();)\n\t\t{\n\t\t\tlist.add(getNodes(e.nextNode(), filter));\n\t\t}\n\t\tList<String> strings = new ArrayList<String>();\n\t\tfor (NodeIterator i = list.elements(); i.hasMoreNodes();)\n\t\t{\n\t\t\tNode n = i.nextNode();\n\t\t\tif (n instanceof LinkTag)\n\t\t\t{ // text\n\t\t\t\tString link = ((LinkTag) n).extractLink();\n\t\t\t\tif (!strings.contains(link))\n\t\t\t\t{\n\t\t\t\t\tstrings.add(((LinkTag) n).extractLink());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn strings;\n\t}", "public List<String> listAllRemoteSites () {\r\n\t\ttry {\r\n\t\t\tList<String> urls = new ArrayList<String>();\r\n\t\t\tpstmt = conn.prepareStatement(\"SELECT * FROM RemoteSite\");\r\n\t\t\trset = pstmt.executeQuery();\r\n\t\t\twhile (rset.next()) {\r\n\t\t\t\turls.add(rset.getString(\"url\"));\r\n\t\t\t}\r\n\t\t\treturn urls;\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn null;\r\n\t\t} finally {\r\n\t\t\tDatabaseConnection.closeStmt(pstmt, rset);\r\n\t\t}\r\n\t}", "public Urls getKeywordUrls(String keyword) {\n\t\tPropertySelector propertySelector = new PropertySelector(\"description\");\n\t\tpropertySelector.defineContain(keyword);\n\t\treturn getUrls(propertySelector);\n\t}", "java.util.List getClassPathElements();", "List<? extends Link> getLinks();", "public ExternalUrl getExternalUrls() {\n return externalUrls;\n }", "List<List<Node>> findUndirectedPaths(Node s, Node d) {\n\t\tList<List<Node>> paths = new ArrayList<>();\n\t\tpath(s, d, new HashSet<>(), new ArrayList<>(), paths);\n System.out.println(\"Computed paths: \" + paths);\n return paths;\n\t}", "public String getFinalUrls() {\r\n return finalUrls;\r\n }", "protected List<List<URL>> getDefaultUrlList() throws MalformedURLException {\n URL[] urls1 = { \n new URL(\"http://www.dre.vanderbilt.edu/~schmidt/ka.png\"),\n new URL(\"http://www.dre.vanderbilt.edu/~schmidt/uci.png\"),\n new URL(\"http://www.dre.vanderbilt.edu/~schmidt/gifs/dougs-small.jpg\")\n };\n URL[] urls2 = {\n new URL(\"http://www.cs.wustl.edu/~schmidt/gifs/lil-doug.jpg\"),\n new URL(\"http://www.cs.wustl.edu/~schmidt/gifs/wm.jpg\"),\n new URL(\"http://www.cs.wustl.edu/~schmidt/gifs/ironbound.jpg\")\n };\n\n \tList<List<URL>> variableNumberOfInputURLs = \n new ArrayList<List<URL>>();\n variableNumberOfInputURLs.add(Arrays.asList(urls1));\n variableNumberOfInputURLs.add(Arrays.asList(urls2));\n \treturn variableNumberOfInputURLs;\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic List<SetupUrls> findAll() {\n\n\t\tSession session = getSession();\n\n\t\tCriteria crit = session.createCriteria(SetupUrls.class)\n\t\t\t\t.addOrder(Order.asc(ORDER));\n\n\t\treturn (List<SetupUrls>) crit.list();\n\t}", "static List<WebURL> ExtractUrl(Page page){\n // TODO: reference to parser to extractor urls from the web content\n return null;\n }", "public Set<URLPair> getVisited() { return this.pool.getVisitedKeys(); }", "public List<String> getUris()\r\n/* 125: */ {\r\n/* 126:129 */ return this.uris;\r\n/* 127: */ }", "@RequestMapping(value = \"urls\", method = RequestMethod.GET)\n @ResponseBody\n @ResponseStatus(HttpStatus.OK)\n public List<MonitoredUrl> getUrls()\n {\n System.out.println(\"geturls\");\n return urlChecker.getMonitoredUrls();\n }", "Set<Link> extractLinks(CrawlDoc doc, ParseState parseState)\n throws IOException;", "public URL[] getURLArray(final String key) {\n return getURLArray(key, EMPTY_URL_ARRAY);\n }", "@NotNull\n @Generated\n @Selector(\"URLContexts\")\n public native NSSet<? extends UIOpenURLContext> URLContexts();", "Enumeration<URL> findEntries(String path, String pattern, boolean recurse) throws IOException;", "private Set<String> extracLinks(String url, LinkFilter filter) {\n\n\t\tSet<String> links = new HashSet<String>();\n\t\ttry {\n\t\t\tParser parser = new Parser(url);\n\t\t\tparser.setEncoding(\"UTF-8\");\n\t\t\t// linkFilter filter <a> tag\n\t\t\tNodeClassFilter linkFilter = new NodeClassFilter(LinkTag.class);\n\t\t\t// get all filtered links\n\t\t\tNodeList list = parser.extractAllNodesThatMatch(linkFilter);\n\t\t\tfor (int i = 0; i < list.size(); i++) {\n\t\t\t\tNode tag = list.elementAt(i);\n\t\t\t\tif (tag instanceof LinkTag)// <a> tag\n\t\t\t\t{\n\t\t\t\t\tLinkTag link = (LinkTag) tag;\n\t\t\t\t\tString linkUrl = link.getLink();// url\n\t\t\t\t\tif (filter.accept(linkUrl)) {\n\t\t\t\t\t\t// change bbsdoc to bbstdoc\n\t\t\t\t\t\tString stlink = linkUrl.replace(\"bbsdoc\", \"bbstdoc\");\n\t\t\t\t\t\tlinks.add(stlink);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (ParserException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn links;\n\t}", "List<ProductLink> links();", "public void deepList() throws Exception;", "public List<URI> getLinks() {\n return links; // this is already unmodifiable\n }", "public void getPhotoLinks() {\n try {\n image = Jsoup.connect(link + \"/+images/\").get();\n } catch (IOException e) {\n e.printStackTrace();\n }\n Elements elements = image.getElementsByClass(\"image-list-item\");\n photosLinks = new String[elements.size()];\n for (int i = 0; i < elements.size(); i++) {\n String element = elements.get(i).attr(\"href\");\n photosLinks[i] = element;\n }\n }", "@Override\r\n public List<String> getMatchedURIs() {\n return null;\r\n }", "public static LinkedHashSet<String> searchLinks(String searchUrl) {\n LinkedHashSet<String> uniqueLinks = new LinkedHashSet();\n Document doc;\n try {\n doc = Jsoup.connect(searchUrl).get();\n Elements links = doc.select(\"a\");\n for(Element url : links){\n if (validUrl(url.attr(\"href\"))) {\n uniqueLinks.add(url.attr(\"href\"));\n }\n }\n } catch (IOException e) {\n }\n return uniqueLinks;\n }", "public List<String> paths(TreeNode root){\r\n List<String> result = new ArrayList<>();\r\n if(root!=null){\r\n binaryTreePath(root, \"\", result);\r\n }\r\n for(String s: result){\r\n System.out.println(s);\r\n }\r\n return result;\r\n }", "public static URL[] getClassLoaderURLs(ClassLoader cl)\n {\n URL[] urls = {};\n try\n {\n Class returnType = urls.getClass();\n Class[] parameterTypes = {};\n Method getURLs = cl.getClass().getMethod(\"getURLs\", parameterTypes);\n if( returnType.isAssignableFrom(getURLs.getReturnType()) )\n {\n Object[] args = {};\n urls = (URL[]) getURLs.invoke(cl, args);\n }\n }\n catch(Exception ignore)\n {\n }\n return urls;\n }", "public List<Url> getNextUrls(Url url, int limit)\r\n\t{\n\t\treturn null;\r\n\t}", "public List<Node> findPath(Node start);", "public Set<String> getLinks() throws SearchResultException;", "public Urls getUrlsOrderedByCreationDate(boolean ascending) {\n\t\treturn getUrls(\"creationDate\", ascending);\n\t}", "public Urls getAllKeywordUrls(String[] keywords) {\n\t\tPropertySelector propertySelector = new PropertySelector(\"description\");\n\t\tpropertySelector.defineContainAll(keywords);\n\t\treturn getUrls(propertySelector);\n\t}", "public ArrayList<URI> getList() { return new ArrayList<URI>(); }", "public List<TparselinksEntity> getAllLinks();", "private RedirectUrls getRedirectURLs() {\n RedirectUrls redirectUrls = new RedirectUrls();\n redirectUrls.setReturnUrl(URL_RETURN);\n redirectUrls.setCancelUrl(URL_CANCEL);\n\n return redirectUrls;\n }", "public Set<String> loadAllURLKeys()\n\t{\n\t\tEntityCursor<URLEntity> results = this.env.getEntityStore().getPrimaryIndex(String.class, URLEntity.class).entities();\n\t\tSet<String> urlKeys = Sets.newHashSet();\n\t\tfor (URLEntity entity : results)\n\t\t{\n\t\t\turlKeys.add(entity.getKey());\n\t\t}\n\t\tresults.close();\n\t\treturn urlKeys;\n\t}", "@RequestMapping(value = \"/\", method = RequestMethod.GET)\n public List<URL> index() throws MalformedURLException {\n\n List<URL> urls = new ArrayList<URL>();\n\n urls.add(new URL(\"http://localhost:8080/halogens\"));\n urls.add(new URL(\"http://localhost:8080/neutrons\"));\n urls.add(new URL(\"http://localhost:8080/weight/50\"));\n\n return urls;\n }", "public static List<String> getAllBaseLinks(final String page)\n {\n return getAllMatches(page, LWPageUtilities.BASE_PATTERN, 1);\n }", "public ArrayList<Link> getLinks() {\n\t\treturn getPageObjects(Link.class);\n\t}", "public List<Link> getLinks()\t{return Collections.unmodifiableList(allLinks);}", "private ArrayList<Integer> getPageLinks() {\n int numberOfPages = sqlData.getNumberOfPages();\n\n int n = (pageNumInt / numberOfPages);\n Integer startPage = n * numberOfPages;\n\n ArrayList<Integer> pageLinks = new ArrayList<Integer>();\n\n // iterate and add to the array\n for(int i=0; i < numberOfPages; i++) {\n pageLinks.add(++startPage); \n }\n\n return pageLinks;\n \n }", "public JsonArray pagedKeys(Url url);", "public static List generateTimeUrls(DataSourceImpl datasource,\n String url) {\n List urls = new ArrayList();\n if (url.indexOf(RELATIVE_TIME) >= 0) {\n Object tmp = datasource.getProperty(NUM_RELATIVE_TIMES,\n new Integer(0));\n float timeInc =\n ((Number) datasource.getProperty(RELATIVE_TIME_INCREMENT,\n new Float(1))).floatValue();\n\n int[] timeIndices;\n if (tmp instanceof Integer) {\n int numTimes = ((Integer) tmp).intValue();\n timeIndices = new int[numTimes];\n for (int i = 0; i < numTimes; i++) {\n timeIndices[i] = i;\n }\n } else {\n timeIndices = (int[]) tmp;\n }\n String[] times = makeRelativeTimes(timeIndices, timeInc);\n for (int i = 0; i < times.length; i++) {\n String newUrl = url.replaceAll(RELATIVE_TIME, times[i]);\n // System.err.println (\"url:\" + newUrl);\n urls.add(newUrl);\n }\n\n } else {\n urls.add(url);\n }\n return urls;\n }", "public List<URI> getURIList(final String key) {\n return getURIList(key, new ArrayList<>());\n }", "public List<Long> depthTraverse(){\n return depthTraverseGen(null);\n }", "UrlPathName[] pathNames() {\n if (null == this.pathNames) {\n final List<UrlPathName> names = Lists.array();\n\n for (final UrlPathName pathName : this.url().path().normalize()) {\n names.add(pathName);\n }\n this.pathNames = names.toArray(new UrlPathName[names.size()]);\n }\n return this.pathNames;\n }", "java.lang.String getUrl();", "java.lang.String getUrl();", "java.lang.String getUrl();", "java.lang.String getUrl();", "java.lang.String getUrl();", "java.lang.String getUrl();", "@Override\n\tpublic String getUrls() throws TException {\n try {\n return DBUtils.getExternWebSite();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return null;\n\t}", "public Set<String> getFullTextUrls(final Record record)\n {\n \treturn MarcUtils.getFullTextUrls(record);\n }", "java.util.List<java.lang.String>\n getPathsList();", "@Override\n\tpublic List<URL> getPhotos() {\n\t\timages.clear(); //vide la liste des images\n\t\t\n\t\t\n\t\tList<URL> allImagesURL = new ArrayList<URL>();\n\t\t\n\t\t/* On initialise la liste de toutes les images */\n\t\tList<String> filelocations = null;\n\t\t\n\t\t/*Nous allons retrouver les fichiers images présent dans le répertoire et tous ses sous-répertoires*/\n\t\tPath start = Paths.get(path); //détermine le point de départ \n\t\ttry (Stream<Path> stream = Files.walk(start, Integer.MAX_VALUE)) {\n\t\t filelocations = stream\n\t\t .map(String::valueOf) //transforme les Path en string\n\t\t .filter(filename -> filename.contains(\".jpg\") || filename.contains(\".png\")) //ne prend que les images jpg et png\n\t\t .collect(Collectors.toList());\n\t\t \n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t\t/* Pour chaque fichier retrouvé, on essaie de retrouver son chemin absolu pour le stocker dans le allImagesURL */\n\t\tfor (String filelocation : filelocations) {\n\t\t\tString relativeLocation = filelocation.replace(path+\"/\", \"\"); // Pour ne pas partir de src mais de la classe courante\n\t\t\trelativeLocation = relativeLocation.replace(windowspath+\"\\\\\", \"\");\n\t\t\tallImagesURL.add(this.getClass().getResource(relativeLocation)); //on ajoute le chemin absolu dans la liste\n\t\t}\n\t\t\n\t\t\n\t\treturn allImagesURL; //on retourne la liste\n\t}", "java.util.List<java.lang.String>\n getClasspathList();", "protected abstract String getDirectory(URL url);", "private String[] getImgUrls(String html){\n String result=\"\";\n Document doc = Jsoup.parse(html);\n Elements images = doc.select(\"img\");\n for(Element node : images) {\n result = result + \",\" + node.attr(\"src\");\n }\n return result.length()<1?new String[0]:result.substring(1).split(\",\");\n }" ]
[ "0.60972065", "0.6096285", "0.59923005", "0.59625566", "0.59181637", "0.5880799", "0.5804524", "0.57819045", "0.5771384", "0.5758741", "0.57245725", "0.5688185", "0.56852853", "0.56786543", "0.56292504", "0.5600314", "0.5578238", "0.5571451", "0.54782856", "0.5478029", "0.5471176", "0.54657125", "0.5460872", "0.54524344", "0.5450453", "0.541587", "0.5406462", "0.53994787", "0.5378075", "0.5361099", "0.5359695", "0.53526324", "0.5341012", "0.53386563", "0.53347605", "0.5293786", "0.5275846", "0.5273744", "0.5265853", "0.5258031", "0.52571815", "0.5241134", "0.52282226", "0.52251065", "0.5208149", "0.5207137", "0.5204543", "0.5203647", "0.5203079", "0.51782084", "0.5174769", "0.5154406", "0.51485133", "0.51449996", "0.51432383", "0.5129014", "0.51245815", "0.5098328", "0.50865537", "0.5079988", "0.5076388", "0.50762486", "0.5073715", "0.50719565", "0.5066578", "0.50625074", "0.50482833", "0.50455076", "0.5041548", "0.5033983", "0.502993", "0.5028724", "0.5004241", "0.50025296", "0.49894533", "0.4985548", "0.49755326", "0.4965205", "0.49623603", "0.49583393", "0.49466345", "0.49380535", "0.49318317", "0.49305907", "0.49119398", "0.4910052", "0.49063152", "0.49057835", "0.49038693", "0.49038693", "0.49038693", "0.49038693", "0.49038693", "0.49038693", "0.48997152", "0.4898146", "0.48931733", "0.48889393", "0.48782113", "0.4874498", "0.48707834" ]
0.0
-1
Get a list of all the urls upto deep But only the urls that contain the string "filter"
public static String HTMLLinkString(String root, int level, String filter) throws Exception { String urls = ""; if (0 == level) { return urls; } urls = HTMLLinkString(root, filter); for (String u : urls.split("\\s+")) { if (u.contains(filter)) { urls = urls + " " + HTMLLinkString(u, level - 1, filter); } } return urls.trim(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static List<String> getLinks(String url, NodeFilter filter) throws ParserException\n\t{\n\t\tParser parser = getParser(url);\n\t\tNodeList list = new NodeList();\n\t\tfor (NodeIterator e = parser.elements(); e.hasMoreNodes();)\n\t\t{\n\t\t\tlist.add(getNodes(e.nextNode(), filter));\n\t\t}\n\t\tList<String> strings = new ArrayList<String>();\n\t\tfor (NodeIterator i = list.elements(); i.hasMoreNodes();)\n\t\t{\n\t\t\tNode n = i.nextNode();\n\t\t\tif (n instanceof LinkTag)\n\t\t\t{ // text\n\t\t\t\tString link = ((LinkTag) n).extractLink();\n\t\t\t\tif (!strings.contains(link))\n\t\t\t\t{\n\t\t\t\t\tstrings.add(((LinkTag) n).extractLink());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn strings;\n\t}", "@Override\n\tpublic Collection<URL> getUrlsToFilter() {\n\t\tSet<URL> filterSet = new HashSet<URL>();\n\t\tString url=\"http://www.infoq.com/news/2012/11/Panel-WinRT-Answers;jsessionid=91AB81A159E85692E6F1199644E2053C \";\n\t\tfilterSet.add(URL.valueOf(url));\n\t\treturn filterSet;\n\t}", "private Set<String> extracLinks(String url, LinkFilter filter) {\n\n\t\tSet<String> links = new HashSet<String>();\n\t\ttry {\n\t\t\tParser parser = new Parser(url);\n\t\t\tparser.setEncoding(\"UTF-8\");\n\t\t\t// linkFilter filter <a> tag\n\t\t\tNodeClassFilter linkFilter = new NodeClassFilter(LinkTag.class);\n\t\t\t// get all filtered links\n\t\t\tNodeList list = parser.extractAllNodesThatMatch(linkFilter);\n\t\t\tfor (int i = 0; i < list.size(); i++) {\n\t\t\t\tNode tag = list.elementAt(i);\n\t\t\t\tif (tag instanceof LinkTag)// <a> tag\n\t\t\t\t{\n\t\t\t\t\tLinkTag link = (LinkTag) tag;\n\t\t\t\t\tString linkUrl = link.getLink();// url\n\t\t\t\t\tif (filter.accept(linkUrl)) {\n\t\t\t\t\t\t// change bbsdoc to bbstdoc\n\t\t\t\t\t\tString stlink = linkUrl.replace(\"bbsdoc\", \"bbstdoc\");\n\t\t\t\t\t\tlinks.add(stlink);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (ParserException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn links;\n\t}", "List<WebURL> Filter(List<WebURL> urls){\n return null;\n }", "ObservableList<Link> getFilteredLinkList();", "ObservableList<Link> getUnfilteredLinkList();", "public String getFilter() {\n\t\treturn url.getFilter();\n }", "public Link buildForFilter() {\n isSubTreeFiltered = true;\n return new DefaultLink(this);\n }", "List<List<String>> getFilters(String resource);", "@Override\n public List runFilter(String filter) {\n return runFilter(\"\", filter);\n }", "public static List<String> HTMLStrings(String url, String filter) throws ParserException\n\t{\n\t\tList<String> strings = new ArrayList<String>();\n\t\tParser parser = getParser(url);\n\t\tfor (NodeIterator i = parser.elements(); i.hasMoreNodes();)\n\t\t{\n\t\t\tstrings.addAll(getText(i.nextNode(), filter.toUpperCase()));\n\t\t}\n\t\treturn strings;\n\t}", "private void isFiltersSatisfied() {\n Filter[] filters = rule.getFilters();\n for (int i = 0; i < filters.length; i++) {\n linkedList.add(filters[i]);\n }\n recursiveFiltering(linkedList.peek().filter.split(\":\"),null);\n }", "@Override\r\n public List<String> getMatchedURIs(boolean arg0) {\n return null;\r\n }", "List<Receta> getAll(String filter);", "List<String> getFilters();", "public void filterEdges(String filter) {\n\n\n tree_graphs.getChildren().clear();\n populate(universe, filter, this.showNodes, this.showEdges,\n this.showHyperEdges);\n\n\n tree_edges.getChildren().clear();\n for (IEdge edge : universe.getEdges()) {\n if (edge.toString().contains(filter)) {\n parseEdge(edge, tree_edges, filter);\n }\n }\n\n }", "public List<String> getUrlsToCheck(CachedUrl cu) {\n List<String> res = new ArrayList<String>(3);\n Properties props;\n switch (detectNoSubstanceRedirectUrl) {\n case First:\n return ListUtil.list(cu.getUrl());\n case Last:\n props = cu.getProperties();\n String url = props.getProperty(CachedUrl.PROPERTY_CONTENT_URL);\n if (url == null) {\n\turl = cu.getUrl();\n }\n return ListUtil.list(url);\n case All:\n return AuUtil.getRedirectChain(cu);\n }\n return res;\n }", "private void filter(TreeItem<FilePath> root, String filter, TreeItem<FilePath> filteredRoot) {\n\n for (TreeItem<FilePath> child : root.getChildren()) {\n\n TreeItem<FilePath> filteredChild = new TreeItem<>(child.getValue());\n filteredChild.setExpanded(true);\n\n filter(child, filter, filteredChild);\n\n if (!filteredChild.getChildren().isEmpty() || isMatch(filteredChild.getValue(),\n filter)) {\n filteredRoot.getChildren().add(filteredChild);\n }\n\n }\n }", "public static NodeFilter makeFilter()\n\t{\n\t\tNodeFilter[] fa = new NodeFilter[3];\n\t\tfa[0] = new HasAttributeFilter(\"HREF\");\n\t\tfa[1] = new TagNameFilter(\"A\");\n\t\tfa[2] = new HasParentFilter(new TagNameFilter(\"H3\"));\n\t\tNodeFilter filter = new AndFilter(fa);\n\t\treturn filter;\n\t}", "public static String HTMLLinkString(String url, String filter) throws Exception\n\t{\n\t\tURL[] links = HTMLLinks(url);\n\t\tString urls = \"\";\n\t\tfor (URL link : links)\n\t\t{\n\t\t\tString slink = link.toString();\n\t\t\tif (slink.contains(filter))\n\t\t\t{\n\t\t\t\turls = urls + slink + \" \";\n\t\t\t}\n\t\t}\n\t\treturn urls.trim();\n\t}", "@Override\r\n public List<String> getMatchedURIs() {\n return null;\r\n }", "public void filterNodes(String filter) {\n\n\n tree_graphs.getChildren().clear();\n populate(universe, filter, this.showNodes, this.showEdges,\n this.showHyperEdges);\n\n\n tree_nodes.getChildren().clear();\n for (INode node : universe.getNodes()) {\n if (node.getID().contains(filter)) {\n parseNode(node, tree_nodes, filter);\n }\n }\n\n }", "private Predicate<String> paths() {\n return or(\n //regex(\"/business.*\"),\n // regex(\"/some.*\"),\n // regex(\"/contacts.*\"),\n // regex(\"/pet.*\"),\n regex(\"/api.*\"),\n regex(\"/oauth2.*\"));\n }", "private void filter(Node<Context> node) {\n if (node != null && node.parent != null) {\n Node<Context> parent = tree.getNode(node.parent);\n FilterInfo filterInfo = new FilterInfo(parent, node);\n filterStack.add(filterInfo);\n filter(filterInfo);\n tree.openNode(MODEL_BROWSER_ROOT, () -> tree.selectNode(MODEL_BROWSER_ROOT));\n }\n }", "List<String> getActiveFilters();", "private static NodeList getNodes(Node n, NodeFilter filter) throws ParserException\n\t{\n\t\tNodeList list = new NodeList();\n\t\tn.collectInto(list, filter);\n\t\tNodeList c = n.getChildren();\n\t\tif (null != c)\n\t\t{\n\t\t\tfor (NodeIterator e = c.elements(); e.hasMoreNodes();)\n\t\t\t{\n\t\t\t\te.nextNode().collectInto(list, filter);\n\t\t\t}\n\t\t}\n\t\treturn list;\n\t}", "String getFilter();", "java.lang.String getFilter();", "public static void setLinksFilterStatus(boolean tof) { linksFilter = tof; }", "public void addFilterToIncomingLinks(ViewerFilter filter);", "@VTID(9)\n void treeFilter(\n IUIAutomationCondition filter);", "public static List<UrlInfo> searchAllUrl() {\n\n //getSynonyms(queryKeywords);\n\n ArrayList<Long> keywordIdList = new ArrayList<Long>();\n ArrayList<Long> finalIdList = new ArrayList<Long>();\n\n String email = Secured.getUser(ctx());\n List<UrlEntry> entryIdList = UrlEntry.find()\n .select(\"entryId\")\n .where()\n .eq(\"email\", email)\n .findList();\n for (UrlEntry entry : entryIdList) {\n finalIdList.add(entry.getEntryId());\n }\n System.out.println(\"finalIdList---\" + finalIdList);\n List<UrlInfo> urlList = UrlInfo.find().select(\"url\").where().in(\"urlEntryId\", finalIdList).findList();\n /*ArrayList<String> urls = new ArrayList<String>();\n for (UrlInfo urlInfo : urlList) {\n urls.add(urlInfo.getUrl());\n }\n System.out.println(\"urls in search----\" + urls);*/\n return urlList;\n }", "List<FilterInfo> getZuulFiltersForFilterId(String filter_id);", "public LinkedList<Article> filterArticleList(int filter)\n\t{\n\t\treturn null;\n\t}", "public Request<List<Connection>> list(ConnectionFilter filter) {\n HttpUrl.Builder builder = baseUrl\n .newBuilder()\n .addPathSegments(\"api/v2/connections\");\n if (filter != null) {\n for (Map.Entry<String, Object> e : filter.getAsMap().entrySet()) {\n builder.addQueryParameter(e.getKey(), String.valueOf(e.getValue()));\n }\n }\n String url = builder.build().toString();\n CustomRequest<List<Connection>> request = new CustomRequest<>(client, url, \"GET\", new TypeReference<List<Connection>>() {\n });\n request.addHeader(\"Authorization\", \"Bearer \" + apiToken);\n return request;\n }", "public String getFilter();", "public List<Element> filter(Predicate<Element> p)\n\t{\n\t\treturn recursive_filter(new ArrayList<Element>(), p, group);\n\t}", "public List<PlantDTO> fetchPlants(String filter);", "@DISPID(-2147417077)\n @PropGet\n ms.html.IHTMLFiltersCollection filters();", "public FilterSource[] getFilterSources();", "Map<String, String> getFilters();", "private Predicate<String> paths() {\r\n\t\t// Match all paths except /error\r\n\t\treturn Predicates.and(PathSelectors.regex(\"/.*\"), Predicates.not(PathSelectors.regex(\"/error.*\")));\r\n\t}", "public HashSet<String> findTheUrlsBasicCrawler( URL url, Integer depth ) {\n\t\tcrawlerBasic.getLinks().clear();\n\t\t\n\t\tcrawlerBasic.setDesiredDepth(depth);\n\t\t\n\t\t//Use the methods to crawl through the site searching for links\n\t\tcrawlerBasic.getPageLinks(url.toString(), 1);\n\t\t\n\t\treturn crawlerBasic.getLinks();\n\t\t\n\t}", "private FilterChain loadFilters() {\n\t\ttry {\n\t\t\tAnnotation.scan(\"src/main/java/com/qa/app\");\n\t\t} catch (ClassNotFoundException | InstantiationException | IllegalAccessException | IllegalArgumentException\n\t\t\t\t| InvocationTargetException | NoSuchMethodException | SecurityException | IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}", "public static List<String> getPaths(String url, int limit) {\n List<String> list = new ArrayList<String>();\n if (StringUtils.isEmpty(url) || !isUrlHttp(url)) {\n return list;\n }\n \n String u = url;\n if (u.contains(\"?\")) {\n u = u.split(\"\\\\?\")[0];\n }\n String domain = com.buzzinate.common.util.string.UrlUtil.getDomainName(u);\n String fulldomain = com.buzzinate.common.util.string.UrlUtil.getFullDomainName(u);\n \n // add domain to list\n list.add(domain); \n \n // add subdomain to list\n String subdomain = StringUtils.substringBefore(fulldomain, domain);\n String[] subdomains = StringUtils.split(subdomain, '.');\n String temp = domain;\n for (int index = subdomains.length - 1; index >= 0; index--) {\n temp = subdomains[index] + \".\" + temp;\n list.add(temp);\n }\n \n // add namespace to list\n String namespace = StringUtils.substringAfter(u, fulldomain);\n String[] namespaces = namespace.split(\"/\", limit + 2);\n temp = fulldomain;\n for (int i = 1; i < namespaces.length - 1; i++) {\n //System.out.println(i+\"=\"+namespaces[i]);\n if (!StringUtils.isEmpty(namespaces[i])) {\n temp += \"/\" + namespaces[i];\n list.add(temp);\n }\n }\n return list;\n }", "public abstract void filter();", "<E extends CtElement> List<E> getElements(Filter<E> filter);", "private List<Flow> filter(List<Flow> flows, ExecutionContext context) {\n if (flows == null || flows.isEmpty()) {\n return null;\n }\n\n // Compare against the incoming request path\n final String path = context.request().pathInfo();\n\n int pieces = -1;\n\n List<Flow> filteredFlows = new ArrayList<>();\n\n for (Flow flow : flows) {\n Pattern pattern = cache.computeIfAbsent(flow.getPath(), this::transform);\n if (pattern.matcher(path).lookingAt()) {\n int split = flow.getPath().split(PATH_SEPARATOR).length;\n if (split >= pieces) {\n // If we found more matching, forget the previous one\n if (split > pieces) {\n filteredFlows.clear();\n }\n\n pieces = split;\n filteredFlows.add(flow);\n }\n }\n }\n\n return filteredFlows;\n }", "List<JSONObject> getFilteredItems();", "@Override\r\n public boolean shouldVisit(WebURL url) {\r\n String href = url.getURL().toLowerCase();\r\n return !FILTERS.matcher(href).matches() && href.startsWith(\"http://fksis.bsuir.by/\");\r\n// \"http://www.ics.uci.edu/\");\r\n }", "public interface UrlFilter {\n /**\n * @param url The url to be matched.\n * @return Whether this filter matches |url|.\n */\n public boolean matchesUrl(String url);\n}", "Collection<T> doFilter(RepositoryFilterContext context);", "public JodeList search(Predicate<Jode> filter) {\n List<Node> ret = new ArrayList<>();\n if (filter.test(this)) {\n ret.add(this.extend());\n }\n for (Jode j : this.children()) {\n JodeList subResult = j.search(filter);\n for (Jode subJ : subResult) {\n ret.add(subJ.extend());\n }\n }\n return new JodeList(ret);\n }", "@GET\n @Path(\"/filter\")\n @Produces(\"text/plain\")\n public String getFilterWordList() throws JsonProcessingException {\n ObjectMapper mapper = new ObjectMapper();\n return mapper.writeValueAsString(FilterImpl.getList());\n }", "@Override // com.oppo.enterprise.mdmcoreservice.utils.defaultapp.DefaultApp\n public List<IntentFilter> getFilterList() {\n List<IntentFilter> filterList = new ArrayList<>();\n for (int i = 0; i < DEFAULT_MATCH_TYPE_LIST.size(); i++) {\n for (int j = 0; j < DEFAULT_SCHEME_LIST.size(); j++) {\n for (int k = 0; k < DEFAULT_URI_DATA_TYPE_LIST.size(); k++) {\n IntentFilter filter = new IntentFilter(\"android.intent.action.VIEW\");\n filter.addCategory(\"android.intent.category.DEFAULT\");\n filter.addDataScheme(DEFAULT_SCHEME_LIST.get(j));\n filterList.add(filter);\n }\n }\n }\n IntentFilter filter2 = new IntentFilter(\"android.intent.action.VIEW\");\n filter2.addCategory(\"android.intent.category.DEFAULT\");\n filter2.addDataScheme(\"http\");\n filterList.add(filter2);\n IntentFilter filter3 = new IntentFilter(\"android.intent.action.VIEW\");\n filter3.addCategory(\"android.intent.category.DEFAULT\");\n filter3.addDataScheme(\"http\");\n filterList.add(filter3);\n IntentFilter filter4 = new IntentFilter(\"android.intent.action.VIEW\");\n filter4.addCategory(\"android.intent.category.DEFAULT\");\n filter4.addDataScheme(\"https\");\n filterList.add(filter4);\n return filterList;\n }", "String getUrlPattern();", "public void addBusinessFilterToIncomingLinks(ViewerFilter filter);", "@Override\n public Filter getFilter() {\n return main_list_filter;\n }", "@GetMapping(\"/items\")\n public List<Items> getAllItems(@RequestParam(required = false) String filter) {\n if (\"reviewreveals-is-null\".equals(filter)) {\n log.debug(\"REST request to get all Itemss where reviewReveals is null\");\n return StreamSupport\n .stream(itemsRepository.findAll().spliterator(), false)\n .filter(items -> items.getReviewReveals() == null)\n .collect(Collectors.toList());\n }\n log.debug(\"REST request to get all Items\");\n return itemsRepository.findAll();\n }", "public void addFilterToReferencedLink(ViewerFilter filter);", "@Override\n\tpublic synchronized List<Plantilla> findAll(String filtro){\n\t\tList<Plantilla> lista = new ArrayList<>();\n\t\tfor(Plantilla p:listaPlantillas()){\n\t\t\ttry{\n\t\t\t\tboolean pasoFiltro = (filtro==null||filtro.isEmpty())\n\t\t\t\t\t\t||p.getNombrePlantilla().toLowerCase().contains(filtro.toLowerCase());\n\t\t\t\tif(pasoFiltro){\n\t\t\t\t\tlista.add(p.clone());\n\t\t\t\t}\n\t\t\t}catch(CloneNotSupportedException ex) {\n\t\t\t\tLogger.getLogger(ServicioPlantillaImpl.class.getName()).log(null, ex);\n\t\t\t}\n\t\t}\n\t\tCollections.sort(lista, new Comparator<Plantilla>() {\n\n\t\t\t@Override\n\t\t\tpublic int compare(Plantilla o1, Plantilla o2) {\n\t\t\t\treturn (int) (o2.getId() - o1.getId());\n\t\t\t}});\n\t\t\n\t\treturn lista;\n\t}", "public static String removeFilterFromUrlIfPresent(String url) {\r\n\t\t\r\n\t\tString afterLastSlash = url.substring(url.lastIndexOf(\"/\") + 1);\r\n\t\t\r\n\t\tif (afterLastSlash.contains(\"filter\"))\r\n\t\t\turl = url.substring(0, url.lastIndexOf(\"/\"));\r\n\t\r\n\t\treturn url;\r\n\t}", "public DiffCollector<T> setPathFilters(final TreeFilter filter) {\r\n this.command.setPathFilter(filter);\r\n return this;\r\n }", "public LinkBuilder isSubTreeFiltered(boolean isSubTreeFiltered) {\n this.isSubTreeFiltered = isSubTreeFiltered;\n return this;\n }", "@Override\n\tpublic String buidWfsURL(WrapperFilter filter) {\n\t\treturn null;\n\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic static List<Filter> getFilters(AgentContext ctx) {\n\t\tString filtrs = ConfigurationManager.getProperty(Agent.getPropertyName(AGENT_GROUP_NAME, \"list\"));\n\t\tif (filtrs == null) \n {\n filtrs = DEFAULT_FILTERS;\n log.info(LogManager.getHeader(null, \"Filters is null!!!\", null));\n }\n else\n log.info(LogManager.getHeader(null, \"Filters is NOT null!!!\", null));\n\t\tList<String> filters = Arrays.asList(filtrs.split(\",\"));\n\t\tList<Filter> list = new ArrayList<Filter>();\n\t\tfor (String string : filters) {\n\t\t\ttry {\n\t\t\t log.info(LogManager.getHeader(null,\"Get Filters #\",string));\n Class cls = Class.forName(string.trim());\n\t\t\t\tObject obj = cls.newInstance();\n\t\t\t\tif (obj instanceof Filter) {\n\t\t\t\t\tFilter m = (Filter) obj;\n\t\t\t\t\tm.setContext(ctx);\n\t\t\t\t\tlist.add(m);\n\t\t\t\t}\n\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\tlog.info(LogManager.getHeader(null, \"oaidriver_error\",\n \"Class \"+string.trim()+\" not found\"),e);\n\t\t\t} catch (InstantiationException e) {\n\t\t\t\tlog.info(LogManager.getHeader(null, \"oaidriver_error\",\n\t\t\t\t\t\t\"Impossible to create instance of \"+string.trim()),e);\n\t\t\t} catch (IllegalAccessException e) {\n\t\t\t\tlog.info(LogManager.getHeader(null, \"oaidriver_error\",\n\t\t\t\t\t\t\"Class \"+string.trim()+\" doesn't have empty constructor\"),e);\n\t\t\t}\n\t\t}\n\t\treturn list;\n }", "private List<Organization> getOrgs(String url, String filter) {\n // create response object\n NodeServiceListResponse<Organization> response = \n new NodeServiceListResponse<Organization>(Organization.class);\n List<Organization> orgList;\n\n try {\n // create http entity class with common headers\n HttpEntity entity = new HttpEntity(headers);\n\n // retrieve the response from the node service call\n response = NodeServicesUtil.getNodeListResponse(url, entity, \n HttpMethod.GET, response, filter);\n \n // retrieve data from the response object\n orgList = response.getConvertedData();\n\n // catch and log all errors from the service\n } catch (Exception e) {\n // error getting data\n orgList = new ArrayList<Organization>();\n LOG.error(\"There was an error getting organizations \" + e);\n }\n\n return orgList;\n }", "@Override\n\tpublic boolean shouldVisit(Page page, WebURL url) {\n\t\tString href = url.getURL().toLowerCase();\n\t\treturn !FILTERS.matcher(href).matches()\n\t\t\t\t&& (href.startsWith(\"http://www.amarujala.com/education\"));\n\t\t\t\t/*\n\t\t\t\t|| href.startsWith(\"http://www.amarujala.com/crime\"));\n\t\t\t\t*/\n\t}", "protected FilterImpl() {\n this(SparkUtils.ALL_PATHS);\n }", "public interface LinkFilter {\n\n public boolean accept(String url);\n}", "@Override\r\n\t\t public boolean isResourceFiltered(Resource resource) {\n\t\t return \"pathmap\".equals(resource.getURI().scheme());\r\n\t\t }", "@Override\n\tpublic String[] getRequestFilterIgnoreUrlPatterns() {\n\t\treturn aryIgnoreUrl;\n\t}", "public interface LinkFilter {\n public boolean accept(String url);\n}", "public List<String> build()\n {\n return filters;\n }", "@Override\n\tpublic List<Visit> load(int first, int pageSize, String sortField, SortOrder sortOrder, \n\t\t\tMap<String, Object> filters) {\n\n\t\t\n\t\treturn result;\n\t}", "protected Set<String> getFilter(StaplerRequest req) throws ServletException, IllegalAccessException, IllegalArgumentException, InvocationTargetException{\n Set<String> filter = new TreeSet<String>();\n String values[] = {\"other\",\"job\",\"view\",\"computer\",\"user\"};\n for(String s:values){\n if(req.getParameter(s)!=null)\n filter.add(s); \n }\n return filter;\n }", "List<IntentFilter> findFilters(Intent intent);", "BuildFilter defaultFilter();", "public ContentList filterContentList(ContentDatabaseFilter filter) throws DatabaseException;", "protected void addFilters(Builder urlBuilder, List<String> params,\n Map<String, String> filters) {\n\n final Pattern tailParamsKeyPattern = Pattern.compile(\"^tail\\\\..+$\");\n final HttpStoragePluginConfig config = subScan.tableSpec().config();\n if (!config.enableEnhancedParamSyntax()) {\n // If the request is a POST query and the user selected to push the filters to either JSON body\n // or the post body, do not add to the query string.\n if (subScan.tableSpec().connectionConfig().getMethodType() == HttpApiConfig.HttpMethod.GET ||\n (subScan.tableSpec().connectionConfig().getMethodType() == HttpApiConfig.HttpMethod.POST\n && subScan.tableSpec().connectionConfig().getPostLocation() == PostLocation.QUERY_STRING)\n ) {\n for (String param : params) {\n String value = filters.get(param);\n if (value != null) {\n urlBuilder.addQueryParameter(param, value);\n }\n }\n }\n } else {\n for (String param : params) {\n if (tailParamsKeyPattern.matcher(param).find()){\n String value = filters.get(param);\n if (value != null) {\n urlBuilder.addQueryParameter(param.substring(5), value);\n }\n }\n }\n }\n }", "Filter getFilter();", "protected Graph filterGraph(final Object root) {\n return filterGraph(Arrays.asList(root));\n }", "List<State> getListStateByFilter( StateFilter filter );", "private Filter ssoFilter() {\n\t\tCompositeFilter filter = new CompositeFilter();\n\t\tList<Filter> filters = new ArrayList<>();\n\t\tfilters.add(ssoFilter(facebook(), \"/login/facebook\"));\n\t\tfilters.add(ssoFilter(github(), \"/login/github\"));\n//\t\tfilters.add(ssoFilter(twitter(), \"/login/twitter\"));\n\t\tfilters.add(ssoFilter(linkedin(), \"/login/linkedin\"));\n\t\tfilter.setFilters(filters);\n\t\treturn filter;\n\t}", "public JodeList children(Predicate<Jode> filter) {\n return this.children().filter(filter);\n }", "private void recursiveFiltering(String[] list, Model model){\n\n if(list.length == 0){\n L.e(\"Err, end of filter\");\n return;\n }\n\n String filterPart = list[0];\n\n final String[] decrList = new String[list.length - 1];\n for (int i = 0; i < decrList.length; i++) {\n decrList[i] = list[i+1];\n }\n\n if(filterPart.equals(context.getString(R.string.getLatestMessage))){\n getLatestMessageFromSocialService(decrList);\n }\n else if(filterPart.equals(context.getString(R.string.getSender))){\n getMessageSender(model, decrList);\n }\n else if(filterPart.equals(context.getString(R.string.getLoggedInUser))){\n getLoggedInUser(decrList);\n }\n else if(filterPart.equals(context.getString(R.string.getLatestNotification))){\n getLatestNotificationFromSocialService(decrList);\n }\n else if(filterPart.equals(context.getString(R.string.getMessage))){\n getMessageText(model);\n }\n else if(filterPart.equals(context.getString(R.string.getName))){\n getPersonName(model);\n }\n else if(filterPart.equals(context.getString(R.string.getLink))){\n getPersonName(model);\n }\n else{\n L.e(\"ERR: Unknown filter \" + filterPart);\n }\n }", "Enumeration<URL> findEntries(String path, String pattern, boolean recurse) throws IOException;", "List<DeviceDetails> getDevices(Predicate<DeviceDetails> deviceFilter, Predicate<DeviceDetails> deviceFilter2, Predicate<DeviceDetails> deviceFilter3);", "public List<AnnotatedLinkWrapper> getItemsUnfiltered() {\n return getDelegate().getExtendedItems().stream()\n .map(AnnotatedLinkWrapper::new)\n .filter(al -> al.getTarget() != null)\n .filter(al -> al.getTarget().isInProduction())\n .collect(Collectors.toList());\n }", "public void filter(Filter filter) throws NoTestsRemainException {\n childrenLock.lock();\n try {\n List<T> children = new ArrayList<T>(getFilteredChildren());\n for (Iterator<T> iter = children.iterator(); iter.hasNext(); ) {\n T each = iter.next();\n if (shouldRun(filter, each)) {\n try {\n filter.apply(each);\n } catch (NoTestsRemainException e) {\n iter.remove();\n }\n } else {\n iter.remove();\n }\n }\n filteredChildren = Collections.unmodifiableCollection(children);\n if (filteredChildren.isEmpty()) {\n throw new NoTestsRemainException();\n }\n } finally {\n childrenLock.unlock();\n }\n }", "List<ArticleDTO> getFilteredByTwo(ArticlesFilterDTO filterDTO) throws ApiException;", "StandardFilterBuilder standardFilter(int count);", "@Override\n public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain)\n throws IOException, ServletException {\n\n var request = (HttpServletRequest) servletRequest;\n var message = MessageFormat.format(\"[{0}][doFilter] 当前URL地址 :{1}\", FringRemoteFilter.class.getSimpleName(), URLDecoder.decode(request.getRequestURI(), \"UTF-8\"));\n System.out.println(message);\n filterChain.doFilter(servletRequest, servletResponse);\n }", "public abstract Filter<T> filter();", "ArrayList<Match> getMatchList( Filter filter ) {\n return list;\n }", "public Stream<ParsedURL> urls() {\n return stream().map(req -> new ParsedURL(req.getUrl()));\n }", "java.lang.String getPeerURLs(int index);", "@Override\n public int filterOrder() {\n return 1;\n }", "@Override\n public int filterOrder() {\n return 1;\n }", "List<DeviceDetails> getDevices(Predicate<DeviceDetails> deviceFilter, Predicate<DeviceDetails> deviceFilter1);" ]
[ "0.6413163", "0.63565046", "0.63341975", "0.60217327", "0.58382946", "0.5585502", "0.5482582", "0.54549605", "0.5444126", "0.54388773", "0.53917897", "0.538071", "0.53367376", "0.53296125", "0.53252536", "0.5277917", "0.5274368", "0.52716106", "0.5268732", "0.5260594", "0.5256098", "0.5210232", "0.5201738", "0.51784754", "0.5136774", "0.5083483", "0.5071671", "0.50276554", "0.50222665", "0.5016118", "0.50045544", "0.4998915", "0.4991151", "0.4936927", "0.4933537", "0.493019", "0.4919208", "0.49077052", "0.49045312", "0.48915082", "0.4889204", "0.4874936", "0.48581034", "0.4854966", "0.48535472", "0.48391357", "0.48368827", "0.48344076", "0.48307124", "0.4824673", "0.48148558", "0.4814321", "0.4807363", "0.47998765", "0.47887123", "0.47781447", "0.47764143", "0.47759745", "0.47750723", "0.47562265", "0.47562197", "0.47554082", "0.4753001", "0.47513938", "0.4726858", "0.47251368", "0.47171056", "0.4706643", "0.46854347", "0.46777487", "0.4676302", "0.46731064", "0.4666922", "0.46668956", "0.465463", "0.46346924", "0.46344918", "0.4623389", "0.46214855", "0.46159968", "0.4614765", "0.4614084", "0.46136388", "0.46091065", "0.46090224", "0.46089688", "0.46075583", "0.45991907", "0.45986754", "0.45950654", "0.4585142", "0.45841777", "0.45831612", "0.45815238", "0.4577041", "0.45715517", "0.4560162", "0.45467985", "0.45467985", "0.45418584" ]
0.54536945
8
Return a list/Array of text strings from a webpage inside tag "filter"
public static List<String> HTMLStrings(String url, String filter) throws ParserException { List<String> strings = new ArrayList<String>(); Parser parser = getParser(url); for (NodeIterator i = parser.elements(); i.hasMoreNodes();) { strings.addAll(getText(i.nextNode(), filter.toUpperCase())); } return strings; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static List<String> getText(Node n, String filter) throws ParserException\n\t{\n\t\tList<String> strArray = new ArrayList<String>();\n\t\tString parentTag = \"\";\n\t\tTagNode parent = (TagNode) n.getParent();\n\t\tif (parent != null)\n\t\t{\n\t\t\tparentTag = parent.getTagName();\n\t\t}\n\t\tif (n instanceof TextNode)\n\t\t{ // text\n\t\t\tTextNode tn = (TextNode) n;\n\t\t\tSystem.out.println(parentTag + \":\" + tn.getText().trim());\n\t\t\tSystem.out.println(((TagNode) n).getTagName());\n\t\t\tif (filter.equals(\"\") || filter.equalsIgnoreCase(parentTag))\n\t\t\t{\n\t\t\t\tString text = tn.getText().trim();\n\t\t\t\ttext = text.replace(\"&nbsp;\", \" \"); // remove non-breaking spaces\n\t\t\t\tif (text.length() > 0 && !text.matches(\"\\\\s+\"))\n\t\t\t\t{\n\t\t\t\t\tstrArray.add(text);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{ // a tag or remark\n\t\t\tNodeList nl = n.getChildren();\n\t\t\tif (null != nl)\n\t\t\t{\n\t\t\t\tfor (NodeIterator ni = nl.elements(); ni.hasMoreNodes();)\n\t\t\t\t{\n\t\t\t\t\tstrArray.addAll(getText(ni.nextNode(), filter));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn strArray;\n\t}", "public static String HTMLText(String url, String filter) throws ParserException\n\t{\n\t\tString text = \"\";\n\t\tList<String> sList;\n\t\tParser parser = getParser(url);\n\t\tfor (NodeIterator i = parser.elements(); i.hasMoreNodes();)\n\t\t{\n\t\t\tsList = getText(i.nextNode(), filter.toUpperCase());\n\t\t\tIterator<String> it = sList.iterator();\n\t\t\twhile (it.hasNext())\n\t\t\t{\n\t\t\t\ttext = text + \" \" + it.next();\n\t\t\t}\n\t\t}\n\t\treturn text;\n\t}", "<E extends CtElement> List<E> getElements(Filter<E> filter);", "public static List<String> getLinks(String url, NodeFilter filter) throws ParserException\n\t{\n\t\tParser parser = getParser(url);\n\t\tNodeList list = new NodeList();\n\t\tfor (NodeIterator e = parser.elements(); e.hasMoreNodes();)\n\t\t{\n\t\t\tlist.add(getNodes(e.nextNode(), filter));\n\t\t}\n\t\tList<String> strings = new ArrayList<String>();\n\t\tfor (NodeIterator i = list.elements(); i.hasMoreNodes();)\n\t\t{\n\t\t\tNode n = i.nextNode();\n\t\t\tif (n instanceof LinkTag)\n\t\t\t{ // text\n\t\t\t\tString link = ((LinkTag) n).extractLink();\n\t\t\t\tif (!strings.contains(link))\n\t\t\t\t{\n\t\t\t\t\tstrings.add(((LinkTag) n).extractLink());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn strings;\n\t}", "public static String HTMLLinkString(String url, String filter) throws Exception\n\t{\n\t\tURL[] links = HTMLLinks(url);\n\t\tString urls = \"\";\n\t\tfor (URL link : links)\n\t\t{\n\t\t\tString slink = link.toString();\n\t\t\tif (slink.contains(filter))\n\t\t\t{\n\t\t\t\turls = urls + slink + \" \";\n\t\t\t}\n\t\t}\n\t\treturn urls.trim();\n\t}", "@DISPID(-2147417077)\n @PropGet\n ms.html.IHTMLFiltersCollection filters();", "@GET\n @Path(\"/filter\")\n @Produces(\"text/plain\")\n public String getFilterWordList() throws JsonProcessingException {\n ObjectMapper mapper = new ObjectMapper();\n return mapper.writeValueAsString(FilterImpl.getList());\n }", "private Set<String> extracLinks(String url, LinkFilter filter) {\n\n\t\tSet<String> links = new HashSet<String>();\n\t\ttry {\n\t\t\tParser parser = new Parser(url);\n\t\t\tparser.setEncoding(\"UTF-8\");\n\t\t\t// linkFilter filter <a> tag\n\t\t\tNodeClassFilter linkFilter = new NodeClassFilter(LinkTag.class);\n\t\t\t// get all filtered links\n\t\t\tNodeList list = parser.extractAllNodesThatMatch(linkFilter);\n\t\t\tfor (int i = 0; i < list.size(); i++) {\n\t\t\t\tNode tag = list.elementAt(i);\n\t\t\t\tif (tag instanceof LinkTag)// <a> tag\n\t\t\t\t{\n\t\t\t\t\tLinkTag link = (LinkTag) tag;\n\t\t\t\t\tString linkUrl = link.getLink();// url\n\t\t\t\t\tif (filter.accept(linkUrl)) {\n\t\t\t\t\t\t// change bbsdoc to bbstdoc\n\t\t\t\t\t\tString stlink = linkUrl.replace(\"bbsdoc\", \"bbstdoc\");\n\t\t\t\t\t\tlinks.add(stlink);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (ParserException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn links;\n\t}", "public final List<String> getText() {\n ArrayList<String> al = new ArrayList<String>();\n for (Iterator<Element> i = texts.iterator(); i.hasNext();) {\n al.add(i.next().getTextContent());\n }\n return al;\n }", "List<String> getFilters();", "public static String[] evaluateContentAsStringArray(final Document doc, final String xpathQuery, String separator, String filter) throws XPathExpressionException{\n\t\t\n\t\txpath.setNamespaceContext(new DefaultNamespaceContextResolver(doc));\n\t\t\n\t\t// aggiunta dei criteri per filtrare i risultati delle query xpath\n\t\tString query = (filter!=null && !filter.equalsIgnoreCase(\"\")) ? String.format(\"%s[%s]\", xpathQuery, filter) : xpathQuery;\n\t\t\n\t\tfinal NodeList elements = (NodeList) xpath.evaluate(query, doc, XPathConstants.NODESET);\n\t\tfinal ArrayList<String> list = new ArrayList<String>();\n\t\tfor(int i=0; i<elements.getLength();i++){\n\t\t\tNode node = elements.item(i);\n\t\t\t\n\t\t\tif(node==null) continue;\n\t\t\tStringBuffer sb = new StringBuffer();\n\t\t\tNodeList testi = (NodeList) xpath.evaluate(\".//*|.//following-sibling::text()\", node, XPathConstants.NODESET);\n\t\t\t\n\t\t\tboolean hasSeparator = false; \n\t\t\tfor(int j=0; j<testi.getLength();j++){\n\t\t\t\tNode item = testi.item(j);\n\n\t\t\t\tString testo;\n\t\t\t\tif(item.getNodeType()==Node.TEXT_NODE){\n\t\t\t\t\tText text = (Text) item;\n\t\t\t\t\ttesto = text.getNodeValue();\n\t\t\t\t}else{\n\t\t\t\t\t testo = xpath.evaluate(\"normalize-space(./text())\", item).trim();\n\t\t\t\t}\n\t\t\t\tif((!testo.trim().equals(\"\")) && (testo!=null)){\n\t\t\t\t\tif(hasSeparator) sb.append(separator);\n\t\t\t\t\tsb.append(testo);\n\t\t\t\t\thasSeparator = true;\n\t\t\t\t}else{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\tsb.trimToSize();\n\t\t\tlist.add(sb.toString());\n\t\t}\n\t\treturn list.toArray(new String[list.size()]);\n\t}", "String getFilter();", "public ArrayList<String> getStringListFromHtmlText(@NotNull String htmlText, @NotNull String startTag, @NotNull String endTag) {\n final ArrayList<String> list = new ArrayList<>();\n try {\n String completeRegex = startTag + \"(.+?)\" + endTag;\n Pattern TAG_REGEX = Pattern.compile(completeRegex, Pattern.DOTALL);\n final Matcher matcher = TAG_REGEX.matcher(htmlText);\n while (matcher.find()) {\n list.add(matcher.group(1));\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return list;\n }", "public ArrayList<String> soupThatSite(String url) throws IOException {\n\n ArrayList<String> parsedDoc = new ArrayList<>();\n Document doc = Jsoup.connect(url).get();\n\n if (url.contains(\"cnn.com\")) {\n\n doc.select(\"h1\").stream().filter(Element::hasText).forEach(element1 -> {\n String str = element1.text();\n String clean = Jsoup.clean(str, Whitelist.basic());\n parsedDoc.add(clean);\n });\n\n doc.select(\".zn-body__paragraph\").stream().filter(Element::hasText).forEach(element1 -> {\n String str = element1.text();\n String clean = Jsoup.clean(str, Whitelist.basic());\n parsedDoc.add(clean);\n });\n\n } else {\n\n doc.select(\"h1\").stream().filter(Element::hasText).forEach(element1 -> {\n String str = element1.text();\n String clean = Jsoup.clean(str, Whitelist.basic());\n parsedDoc.add(clean);\n });\n\n doc.select(\"p\").stream().filter(Element::hasText).forEach(element -> {\n String str = element.text();\n String clean = Jsoup.clean(str, Whitelist.basic());\n parsedDoc.add(clean);\n });\n }\n\n return parsedDoc;\n }", "@DISPID(5) //= 0x5. The runtime will prefer the VTID if present\n @VTID(11)\n java.lang.String getFilterText();", "@Test\n\tpublic void stringFilterTest(){\n\t\t\n\t\tList<IElement> result = filter.process(elements);\n\t\t\n\t\tAssert.assertNotNull(\"The result of filter is null!\",result);\n\t\tAssert.assertEquals(\"More results than expected, filter execution fail.\",\n\t\t\t\texpectedResultNum.intValue(),result.size());\n\t\t\n\t\t\n\t}", "public String[] parseSrc()\n {\n String [] values;\n\n String src = driver.getPageSource();\n int begin = src.indexOf(\"496px;\\\"><\") + 8;\n int endScope = src.indexOf(\"id=\\\"dialog\\\"\");\n src = src.substring(begin, endScope);\n int end = src.indexOf(\"</span></div>\");\n src = src.substring(0, end);\n\n values = src.split(\"</span>\");\n\n return values;\n }", "java.lang.String getFilter();", "public String getFilter();", "public static List<String> getElementsText(List<WebElement> list){\n List<String> elementTexts = new ArrayList<>();\n for (WebElement el : list ){\n elementTexts.add(el.getText());\n }\n return elementTexts;\n }", "public void filterList(String text) {\n filter.filter(text);\n }", "@Override\n public List runFilter(String filter) {\n return runFilter(\"\", filter);\n }", "List<List<String>> getFilters(String resource);", "public String[] list(String text, String von, String bis) throws RemoteException;", "public List<String> getSearchResults() {\n List<String> searchResultsStringList = new ArrayList<>();\n for (WebElement searchResult : searchResultsList){\n String searchResultText = searchResult.getText();\n searchResultsStringList.add(searchResultText);\n }\n return searchResultsStringList;\n }", "public ArrayList<String> getTags(String url) {\n // Use hashset to remove duplicates\n Collection<String> tags = new HashSet<>();\n try {\n String page = connectAndGetPage(url);\n Pattern p = Pattern.compile(\"<[^>]*>\");\n Matcher m = p.matcher(page);\n while (m.find()) {\n // Get match and add to hashset if not a comment or closing tag.\n String match = m.group(0);\n String characterAfterStart = String.valueOf(match.charAt(1));\n if (!characterAfterStart.equals(\"/\") && !characterAfterStart.equals(\"!\")) {\n tags.add(match.trim());\n }\n }\n } catch (IOException e) {\n System.out.println(\"IOException\");\n }\n return sortTags(tags);\n\n }", "public static ArrayList<Node> getFacets(Element sourceElement, boolean returnTextNode) {\r\n ArrayList<Node> facets = new ArrayList<Node>();\r\n NodeList children = sourceElement.getChildNodes();\r\n for (int i = 0; i < children.getLength(); i++) {\r\n Node node = children.item(i);\r\n if (node instanceof Element && \"f:facet\".equals(node.getNodeName())) { //$NON-NLS-1$\r\n Element element = (Element) node;\r\n NodeList childNodes = element.getChildNodes();\r\n Text textNode = null;\r\n for (int j = 0; j < childNodes.getLength(); j++) {\r\n Node child = childNodes.item(j);\r\n if (child instanceof Element) {\r\n facets.add(child);\r\n break;\r\n } else if (child instanceof Text) {\r\n textNode = (Text) child;\r\n }\r\n }\r\n if (returnTextNode && facets.isEmpty()) {\r\n facets.add(textNode);\r\n }\r\n }\r\n }\r\n return facets;\r\n }", "@Override\n public ArrayList<String> fetchData(String html) {\n ArrayList<String> data = new ArrayList<>();\n// Document document = Jsoup.parse(html);\n// Element content = document.selectFirst(\"div\").child(1).child(1).child(2);\n// data.add(content.selectFirst(\"h3\").text());\n// data.add(content.selectFirst(\"em\").text());\n// data.add(content.selectFirst(\"h4\").nextElementSibling().nextElementSibling().text());\n// try {\n// data.add(content.select(\"h4\").get(1).nextElementSibling().nextElementSibling().text());\n// }\n// catch (Exception ex) {}\n return data;\n }", "String filter(String value);", "public List<String> getTexts(List<WebElement> webElementList) {\n if (webElementList.isEmpty()) {\n logger.error(\"Error: no elements in the input list. Can not be converted to List<String>\");\n return null;\n }\n ArrayList<String> stringArrayList = new ArrayList<String>();\n for (WebElement wE :webElementList) {\n stringArrayList.add(wE.getText());\n }\n return stringArrayList;\n }", "@SuppressWarnings({ \"rawtypes\", \"unchecked\" })\n\tpublic Vector getFilteredList(String text) {\n\t\tVector v = new Vector();\n\n\t\tif (text.length() > 2) {\n\t\t\tFuncaoDAOImpl funcaoDao = new FuncaoDAOImpl();\n\t\t\tList<Funcao> lista = funcaoDao.getListByStrDescriptor(text);\n\t\t\tfor (Funcao funcao : lista) {\n\t\t\t\tv.add(funcao.getStrFuncaoVerbo() + \" \"\n\t\t\t\t\t\t+ funcao.getStrFuncaoObjeto());\n\t\t\t}\n\t\t}\n\n\t\treturn v;\n\t}", "private List<Elements> extractHTMLInfo(String url) throws IOException {\r\n\r\n //All required info to be collected is within the <section> tag\r\n Element sectionTag = Jsoup.connect(url).get().select(\"section\").get(0);\r\n\r\n List<Elements> list = new ArrayList();\r\n\r\n //Banner img Tag\r\n list.add(sectionTag.select(\"img\"));\r\n\r\n //TimeTag\r\n list.add(sectionTag.select(\"header\").select(\"time\"));\r\n\r\n //Article Title\r\n list.add(sectionTag.select(\"header\").select(\"h2 a\"));\r\n\r\n //Author\r\n list.add(sectionTag.select(\"header\").select(\"p a\"));\r\n\r\n //Content Body HTML\r\n list.add(sectionTag.select(\"article\").select(\"div\"));\r\n\r\n return list;\r\n }", "public static String filter(String text)\n { StringBuffer buffer = new StringBuffer();\n for (int i=0; i<text.length(); i++)\n { char c = text.charAt(i);\n if (c == '<') buffer.append(\"&lt;\");\n else if (c == '>') buffer.append(\"&gt;\");\n else if (c == '\"') buffer.append(\"quot;\");\n else if (c == '&') buffer.append(\"amp;\");\n else buffer.append(c);\n }\n return buffer.toString();\n }", "public List<String> Description() {\n XPathFactory xpath = XPathFactory.instance();\n XPathExpression<Element> expr = xpath.compile(\"//item/description\", Filters.element());\n List<Element> news = expr.evaluate(this.data);\n List<String> description = new ArrayList<String>();\n news.forEach(post -> description.add(post.getValue().trim()));\n return description;\n }", "public List<String> getFileFilters() {\n/* 420 */ List<String> retval = null;\n/* 421 */ COSBase filters = this.stream.getDictionaryObject(COSName.F_FILTER);\n/* 422 */ if (filters instanceof COSName) {\n/* */ \n/* 424 */ COSName name = (COSName)filters;\n/* 425 */ retval = new COSArrayList<String>(name.getName(), (COSBase)name, (COSDictionary)this.stream, COSName.F_FILTER);\n/* */ \n/* */ }\n/* 428 */ else if (filters instanceof COSArray) {\n/* */ \n/* */ \n/* 431 */ retval = COSArrayList.convertCOSNameCOSArrayToList((COSArray)filters);\n/* */ } \n/* 433 */ return retval;\n/* */ }", "List<String> getActiveFilters();", "public static Set<String> parser(String html){\r\n\r\n\t\tSet<String> urls = new HashSet<String>();\r\n\t\tString regex = \"<a.*?/a>\";\r\n\t\tPattern pt = Pattern.compile(regex);\r\n\t\tMatcher matcher = pt.matcher(html);\r\n\t\twhile(matcher.find()){\r\n\t\t\t//获取网址\r\n//\t\t\tSystem.out.println(\"Group:\"+matcher.group());\r\n\t\t\tMatcher myurl = Pattern.compile(\"href=\\\".*?\\\">\").matcher(matcher.group());\r\n\t\t\tif(myurl.find()){\r\n\t\t\t\tdo{\r\n\t\t\t\t\tString temp = myurl.group();\r\n\t\t\t\t\tif(!temp.startsWith(\"javascript\") && !temp.startsWith(\"/\") && ! temp.startsWith(\"#\")){\r\n\t\t\t\t\t\tString url = myurl.group().replaceAll(\"href=\\\"|\\\">\",\"\");\r\n\t\t\t\t\t\tif(url.contains(\"http\")){\r\n\t\t\t\t\t\t\tif(url.contains(\"\\\"\")){\r\n\t\t\t\t\t\t\t\turl = url.substring(0, url.indexOf(\"\\\"\"));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif(!url.contains(\"$\") && !url.contains(\" \")){\r\n\t\t\t\t\t\t\t\turls.add(url);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}while(myurl.find());\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn urls;\r\n\t}", "public ArrayList<String> findLinks(Text value) throws CharacterCodingException{\n\t\tint start = value.find(\"<text\");\n\t\tstart = value.find(\">\", start);\n\t\tint end = value.find(\"</text>\", start);\n\t\t//start+=1;\n\t\tString textBlock=new String();\n\t\ttry{\n\t\tif(end < value.getLength())\n\t\t\ttextBlock = Text.decode(value.getBytes(), start, end-start);\n\t\telse\n\t\t\ttextBlock = Text.decode(value.getBytes(), start, value.getLength()-start);\n\t\t} catch(Exception e){\n\t\t\treturn null;\n\t\t}\n\t\tArrayList<String> List = new ArrayList<String>();\n\t\t\n\t\tPattern wikiLinkRegEx = Pattern.compile(\"\\\\[\\\\[(?:[^|\\\\]]*\\\\|)?([^\\\\]]+)\\\\]\\\\]\");\n\t\tMatcher patternMatcher = wikiLinkRegEx.matcher(textBlock);\n\t\twhile(patternMatcher.find()) {\n\t\t\tint flag=0;\n\t\t\tint startIndex = patternMatcher.start();\n\t\t\tint endIndex = patternMatcher.end();\n\t\t\tString wikiLink = textBlock.substring(startIndex+2, endIndex-2);\n\t\t\twikiLink = wikiLink.replace(\" \", \"_\");\n\n\t\t\t//Checking for the occurrence of '|'\n\t\t\tif(wikiLink.contains(\"|\")){\n\t\t\t\tint pipeIndex = wikiLink.indexOf(\"|\");\n\t\t\t\twikiLink = wikiLink.substring(0, pipeIndex);\n\t\t\t}\n\t\t\t\n\t\t\t//Flagging all the invalid WikiLinks \n\t\t\t//if(wikiLink.contains(\":\") || wikiLink.contains(\"#\") || wikiLink.contains(\"/\") ){\n\t\t\t//\tflag=1;\n\t\t\t//}\n\t\t\t\n\t\t\t// Add the valid WikiLinks in the List\n\t\t\tif(flag==0){\n\t\t\t\twikiLink = wikiLink.replace(\"&amp;\", \"&\");\n\t\t\t\tList.add(wikiLink);\n\t\t\t}\n\t }\n\t\treturn List;\n\t}", "private static NodeList getNodes(Node n, NodeFilter filter) throws ParserException\n\t{\n\t\tNodeList list = new NodeList();\n\t\tn.collectInto(list, filter);\n\t\tNodeList c = n.getChildren();\n\t\tif (null != c)\n\t\t{\n\t\t\tfor (NodeIterator e = c.elements(); e.hasMoreNodes();)\n\t\t\t{\n\t\t\t\te.nextNode().collectInto(list, filter);\n\t\t\t}\n\t\t}\n\t\treturn list;\n\t}", "public List<String> getStyleTagsForText(String requirementId, String text){\n\t\tList<String> tags = new ArrayList<String>();\n\t\t\n\t\tWebElement p = driver.findElement(By.xpath(\"//div[starts-with(@id,'WikiPageContent\"+requirementId+\"') and contains(@class,'wysiwyg')]//*[contains(.,'\"+text+\"')]\"));\n\t\tString tag = p.getTagName();\n\t\twhile (!tag.equals(\"p\")) {\n\t\t\t tags.add(tag);\n\t p=p.findElement(By.xpath(\"./..\"));\n\t tag = p.getTagName();\n\t\t}\n\t\treturn tags;\n\t}", "java.util.List<java.lang.String> getAnnotationFiltersList();", "@Nullable\n public static Elements getContentsList(String contentHtml) {\n Document document = Jsoup.parse(contentHtml);\n Elements elements = document.select(\".widget-progress-enabled\");\n Elements contents = new Elements();\n contents.add(elements.first());\n contents.addAll(elements.get(1).select(\"li\"));\n return contents;\n }", "public List<COSName> getFilters() {\n/* 312 */ List<COSName> retval = null;\n/* 313 */ COSBase filters = this.stream.getFilters();\n/* 314 */ if (filters instanceof COSName) {\n/* */ \n/* 316 */ COSName name = (COSName)filters;\n/* 317 */ retval = new COSArrayList<COSName>(name, (COSBase)name, (COSDictionary)this.stream, COSName.FILTER);\n/* */ }\n/* 319 */ else if (filters instanceof COSArray) {\n/* */ \n/* 321 */ retval = ((COSArray)filters).toList();\n/* */ } \n/* 323 */ return retval;\n/* */ }", "FilterResults performFiltering(CharSequence charSequence) { // Aplicamos el filtro\n String charString = charSequence.toString(); // String con el filtro\n if (charString.isEmpty()) { // Si esta vacio\n filteredSites = allSites; // No hay filtro y se muestran todas las instalaciones\n } else { // Si no\n ArrayList<ULLSiteSerializable> auxFilteredList = new ArrayList<>();\n for (ULLSiteSerializable site : allSites) { // Para todas las instalaciones \n // Se comprueba si el nombre la filtro coincide con la instalacion\n if (site.getName().toLowerCase().contains(charString.toLowerCase())) \n auxFilteredList.add(site); // Si coincide se agregan a la lista\n // auxiliar\n }\n filteredSites = auxFilteredList; // La lista auxiliar es igual a la de \n } // las instalaciones filtradas a mostrar\n FilterResults filterResults = new FilterResults();\n filterResults.values = filteredSites;\n return filterResults; // Se devuelve el resultado del filtro\n }", "private static Set<String> scrapeHTML(String html) {\n\t\tSet<String> set = new HashSet<String>();\n\t\tint skipLength = 0;\n\t\tint counter = 0;\n\t\t// the subtraction of 15 is because of the number of characters in \n\t\t// \"<a href=\\\"/wiki/\", to avoid a index out of bounds error\n\t\tfor(int i = 0; i < html.length()-15; i++) {\n\t\t\tif(html.substring(i, i+15).equals(\"<a href=\\\"/wiki/\")) {\n\t\t\t\t// if format matches starts to check the following characters\n\t\t\t\t// to check if it does not contain a : or a #\n\t\t\t\tchar ch = html.charAt(i+15);\n\t\t\t\tString str = \"\";\n\t\t\t\tint count = 0;\n\t\t\t\twhile(html.charAt(i+count+15) != '\"'){\n\t\t\t\t\tif(html.charAt(i+count+15) == ':' || html.charAt(i+count+15) == '#') {\n\t\t\t\t\t\tstr = \"\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tch = html.charAt(count+i+15);\n\t\t\t\t\tstr += ch;\n\t\t\t\t\tcount++;\n\t\t\t}\n\t\t\t\t// adds if the page name is not empty\n\t\t\t\tif(str != \"\")\n\t\t\t\tset.add(str);\n\t\t\t\tskipLength = str.length();\n\t\t\t\tcount = 0;\n\t\t}\n\t\t\ti += skipLength;\n\t\t\tskipLength = 0;\n\t\t\tcounter++;\n\t\n\t}\n\treturn set;\n}", "private String[] extractTags(HttpServletRequest request)\n throws ServletException, IOException {\n String tagline = request.getParameter(\"tags\").toLowerCase();\n String[] tags = {};\n if (!tagline.isEmpty())\n tags = tagline.split(\" \");\n return tags;\n }", "public Set<String> getFilterTerms() {\n\t\tSet<String> filterTerms = new HashSet<String>();\n\t\tfor(String filters : sessionBean.getFilters()) {\n\t\t\t// split by 0 or more spaces, followed by either 'and','or', comma or more spaces\n\t\t\tString[] filterTermsArray = filters.split(\"\\\\s*(and|or|,)\\\\s*\");\n\t\t\tCollections.addAll(filterTerms, filterTermsArray);\n\t\t}\n\t\treturn filterTerms;\n\t}", "public abstract void filter();", "public List getElements(String kind) {\r\n kind = kind.toLowerCase();\r\n ArrayList result = new ArrayList();\r\n for (int i = 0; i < pageList.size(); i++) {\r\n LetterElement keep = (LetterElement)pageList.get(i);\r\n if (keep.kindOfElement.equals(kind)) {\r\n result.add(keep);\r\n }\r\n }\r\n return result;\r\n }", "public static List<Node> getChildren(Element sourceElement, boolean returnTextNodes) {\r\n ArrayList<Node> children = new ArrayList<Node>();\r\n NodeList nodeList = sourceElement.getChildNodes();\r\n for (int i = 0; i < nodeList.getLength(); i++) {\r\n Node child = nodeList.item(i);\r\n if ((child instanceof Element && !child.getNodeName().equals(\"f:facet\")) //$NON-NLS-1$ \r\n \t\t|| (returnTextNodes && (null != child.getNodeValue()) && (child.getNodeValue().trim().length() > 0))) {\r\n children.add(child);\r\n }\r\n }\r\n return children;\r\n }", "List<WebURL> Filter(List<WebURL> urls){\n return null;\n }", "public static String pagefilter(String content){\n //String p = System.getProperty(\"line.separator\") ; //\\r\\n in windows jp\n\n content = content.replaceAll(\"&\",\"&amp;\"); \n content = content.replaceAll(\"<\",\"&lt;\");\n content = content.replaceAll(\">\",\"&gt;\"); \n content = content.replaceAll(\"\\n\",\"<br/>\");\n content = content.replaceAll(\" \",\"&nbsp;\");\n \n \n return content;\n }", "java.util.List<java.lang.String> getContentsList();", "public static String HTMLLinkString(String root, int level, String filter) throws Exception\n\t{\n\t\tString urls = \"\";\n\t\tif (0 == level)\n\t\t{\n\t\t\treturn urls;\n\t\t}\n\t\turls = HTMLLinkString(root, filter);\n\t\tfor (String u : urls.split(\"\\\\s+\"))\n\t\t{\n\t\t\tif (u.contains(filter))\n\t\t\t{\n\t\t\t\turls = urls + \" \" + HTMLLinkString(u, level - 1, filter);\n\t\t\t}\n\t\t}\n\t\treturn urls.trim();\n\t}", "public String[] retrieveResultStrings(Text[] texts);", "public String askArrFilter();", "private List<String> getFilteredWords() {\r\n\t\tArrayList<String> filteredWords = new ArrayList<String>(16);\r\n\t\t\r\n\t\tfor (String word : allWords) {\r\n\t\t\tif (matchesFilter(word) == true) {\r\n\t\t\t\tfilteredWords.add(word);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn filteredWords;\r\n\t}", "public static void main(String[] args) throws MalformedURLException, IOException{\n TagStripper ts = new TagStripper();\n\n // open an url connection to the specified adress\n URL url = new URL(\"http://sv.wikipedia.org/wiki/Henrik_VIII_av_England\");\n InputStreamReader input = new InputStreamReader(url.openConnection().getInputStream());\n\n // use the tag stripper to strip most of the tags\n String result = ts.stripHTML(input);\n\n //print the result\n System.out.println(result);\n }", "private void filter(String text) {\n ArrayList<ChildItem> filterdNames = new ArrayList<>();\n\n //looping through existing elements\n for (ChildItem s : dataParent ) {\n\n //if the existing elements contains the search input\n if (s.getKode_barang().toLowerCase().contains(text.toLowerCase())) {\n //adding the element to filtered list\n filterdNames.add(s);\n }\n }\n\n //calling a method of the adapter class and passing the filtered list\n adapter.filterList(filterdNames);\n }", "public List<String> getListFromZipCodeElementList(List<WebElement> element);", "private @NotNull List<String> getAllLinks(final String text, final String urlStart) {\n List<String> links = new ArrayList<>();\n\n int i = 0;\n while (text.indexOf(urlStart, i) != -1) {\n int linkStart = text.indexOf(urlStart, i);\n int linkEnd = text.indexOf(\" \", linkStart);\n if (linkEnd != -1) {\n String link = text.substring(linkStart, linkEnd);\n links.add(link);\n } else {\n String link = text.substring(linkStart);\n links.add(link);\n }\n i = text.indexOf(urlStart, i) + urlStart.length();\n }\n\n return links;\n }", "@Override\n\tpublic Collection<URL> getUrlsToFilter() {\n\t\tSet<URL> filterSet = new HashSet<URL>();\n\t\tString url=\"http://www.infoq.com/news/2012/11/Panel-WinRT-Answers;jsessionid=91AB81A159E85692E6F1199644E2053C \";\n\t\tfilterSet.add(URL.valueOf(url));\n\t\treturn filterSet;\n\t}", "private String [] lista(){\n String [] lista=new String[jTFs.length];\n for(int i=0;i<jTFs.length;i++)lista[i]=jTFs[i].getText();\n return lista;\n }", "private static String filterMessage(String message) {\n\t\treturn Jsoup.parse(message).text();\n\t}", "public String getFilter() {\n\t\treturn url.getFilter();\n }", "public ArrayList<String> search(String url) {\n Pattern msnPattern = Pattern.compile(\".*msn.com.*\");\n Pattern foolPattern = Pattern.compile(\".*fool.com.*\");\n Matcher foolMatcher = foolPattern.matcher(url);\n Matcher msnMatcher = msnPattern.matcher(url);\n\n ArrayList<String> stockArticles = new ArrayList<String>();\n if (foolMatcher.matches()) {\n Connection connection = Jsoup.connect(\"https://www.fool.com/market-movers/\");\n try {\n Document htmlDocument = connection.get();\n Elements linksOnPage = htmlDocument.select(\"h4\");\n for (Element link : linksOnPage) {\n stockArticles.add(link.text());\n }\n }\n catch (IOException e) {\n System.out.println(e);\n }\n } else if (msnMatcher.matches()) {\n Connection connection2 = Jsoup.connect(\"http://www.msn.com/en-us/money/investing\");\n try {\n Document htmlDocument2 = connection2.get();\n Elements linksOnPage2 = htmlDocument2.select(\"h3\");\n for (Element link : linksOnPage2) {\n stockArticles.add(link.text());\n }\n }\n catch (IOException e) {\n System.out.println(e);\n }\n } else {\n Connection connection3 = Jsoup.connect(\"https://www.nytimes.com/topic/organization/new-york-stock-exchange\");\n try {\n Document htmlDocument3 = connection3.get();\n Elements linksOnPage3 = htmlDocument3.select(\"h2\");\n for (Element link : linksOnPage3) {\n stockArticles.add(link.text());\n }\n }\n catch (IOException e) {\n System.out.println(e);\n }\n }\n return stockArticles;\n }", "public static List<String> extract(Document document) {\n Elements links = document.select(\"a[href]\");\n Elements media = document.select(\"[src]\");\n Elements imports = document.select(\"link[href]\");\n\n List<String> allLinks = new ArrayList<>();\n populateLinks(allLinks, media, \"abs:src\");\n populateLinks(allLinks, imports, \"abs:href\");\n populateLinks(allLinks, links, \"abs:href\");\n return allLinks;\n }", "private ArrayList<String> parseEarningYears() {\n // Gewinn Jahresangaben\n\n Pattern gewinnJahresPattern = Pattern.compile(\"<table><thead><tr><th>\\\\s*Gewinn\\\\s*((?!</tr>).)*</tr></thead><tbody>\");\n matcher = gewinnJahresPattern.matcher(html);\n ArrayList<String> gewinnJahresArray = new ArrayList<>();\n\n while (matcher.find()) {\n log.info(\"Matches gefunden!\");\n\n log.info(matcher.group(0));\n String jahresOut = matcher.group(0);\n gewinnJahresPattern = Pattern.compile(\"(\\\\s*<th class=\\\"ZAHL\\\">(((?!</).)*)</th>\\\\s*)\");\n matcher = gewinnJahresPattern.matcher(jahresOut);\n while (matcher.find()) {\n log.debug(matcher.group(2));\n gewinnJahresArray.add(matcher.group(2).trim());\n }\n }\n\n log.info(gewinnJahresArray.toString());\n return gewinnJahresArray;\n }", "ArrayList<Match> getMatchList( Filter filter ) {\n return list;\n }", "private static List<String> getWord(String urlname) {\n\t\tList<String> returnWord = new ArrayList<String>();\n\t\tBufferedReader reader;\n\t\ttry {\n\t\t\tURL url = new URL(urlname);\n\t\t\tInputStream in = url.openStream();\n\t\t\treader = new BufferedReader(new InputStreamReader(in));\n\t\t\twhile (true) {\n\t\t\t\tString word = reader.readLine();\n\t\t\t\tif (word == null)\n\t\t\t\t\tbreak;\n\t\t\t\treturnWord.add(word);\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(e.getMessage());\n\t\t}\n\t\treturn returnWord;\n\t}", "public List<String> sourceString() {\n // Processing is done here\n return Arrays.asList(\"tomato\", \"carrot\", \"cabbage\");\n }", "private List<String> extractFeatures() {\n List<String> result = new ArrayList<String>();\n\n int startPoint = -1;\n\n List<TextPosition> featureItem;\n for (int i = 0; i < infoBlock.size(); i++) {\n // To get index of the text in the information block, if the text does not exist, the index will be -1.\n int index = CommonUtils.collectTextBuffer(infoBlock.get(i)).indexOf(FEATURE_KEY);\n if (index != -1) {\n startPoint = i + 1;\n\n // To locate the PDF object from the text feature to the end of the information block.\n featureItem = infoBlock.get(i).subList(index, index + FEATURE_KEY.length());\n\n // To extract information vertically. startPoint now is where the information block next to the\n // one that contains text feature.\n if (startPoint != -1) {\n result = filterTextBuffersVerical(featureItem, infoBlock, startPoint, 10);\n/*\t\t\t\t\t\tfor(String item: result)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tSystem.out.println(item);\n\t\t\t\t\t\t}*/\n }\n\n break;\n }\n }\n\n return result;\n }", "Object[] getElements() {\n\tif (this.results == null) {\n\t\tinitResults();\n\t\tif (this.filterAdvancedScenarios != null) {\n\t\t\tthis.results.setFingerprints(this.filterAdvancedScenarios.isChecked());\n\t\t}\n\t}\n\treturn this.results.getElements();\n}", "public static String[] filter(String[] args)\n {\n ArrayList<String> output = new ArrayList<String>();\n\n for (String s : args)\n {\n if (s != null)\n {\n output.add(s);\n }\n }\n\n return output.toArray(new String[output.size()]);\n }", "public List getTags();", "private List<EObject> getElements(ISelector s) {\n\t\tList<EObject> result = new ArrayList<EObject>();\n\t\t\n\t\tfor (EObject next : charStartMap.keySet()) {\n\t\t\tint start = charStartMap.get(next);\n\t\t\tint end = charEndMap.get(next);\n\t\t\tif (s.accept(start, end)) {\n\t\t\t\tresult.add(next);\n\t\t\t}\n\t\t}\n\t\tCollections.sort(result, new Comparator<EObject>() {\n\t\t\tpublic int compare(EObject objectA, EObject objectB) {\n\t\t\t\tint lengthA = getCharEnd(objectA) - getCharStart(objectA);\n\t\t\t\tint lengthB = getCharEnd(objectB) - getCharStart(objectB);\n\t\t\t\treturn lengthA - lengthB;\n\t\t\t}\n\t\t});\n\t\treturn result;\n\t}", "private String filterScriptMarkup(HttpServletRequest request, HttpServletResponse response, CMAbstractCode code) {\n //construct xmlFilters to strip RichText from <div> and <p> tags\n Markup unfilteredCode = code.getCode();\n List<XMLFilter> filters = new ArrayList<>();\n filters.addAll(xmlFilterFactory.createFilters(request, response, unfilteredCode, \"script\"));\n filters.add(new ScriptFilter());\n\n //strip <div> and <p> from markup\n StringWriter writer = new StringWriter();\n ScriptSerializer handler = new ScriptSerializer(writer);\n unfilteredCode.writeOn(filters, handler);\n return writer.getBuffer().toString();\n }", "@Test\n public void regularExpressionTest() throws Exception {\n /* Navigate to the Challenging Dom section */\n driver.findElement(By.xpath(\"//*[@id=\\\"content\\\"]/ul/li[4]/a\")).click();\n\n /* Using the standard devtools */\n ArrayList<WebElement> ItemsListStandard = new ArrayList<>();\n for(int i=1; i<11 ; i++){\n ItemsListStandard.add(driver.findElement(By.xpath(\"//*[@id='content']/div/div/div/div[2]/table/tbody/tr[\"+i+\"]/td[4]\")));\n }\n\n /* Using the selenium OIC and the regular expressions */\n ArrayList<WebElement> ItemsListWithRegEx = new ArrayList<>();\n ItemsListWithRegEx.addAll(driver.findElements(By.visibleText(Pattern.compile(\"^Definiebas*\"))));\n\n /* Check results */\n System.out.println(\"size of ItemsListStandard \" + ItemsListStandard.size());\n System.out.println(\"size of ItemsListWithRegEx \" + ItemsListWithRegEx.size());\n\n /* This test demonstrates the by visible text value combined with regular expression power :\n * Enhance Readability (easy to see what is tested)\n * Enhance code writing ease\n * Enhance Maintainability (the xpath is not used n times as it is in the for loop)\n * */\n\n }", "public String[] getTags(IEntry entry);", "private static List<String> getAllMatches(final String page, final String pattern, final int group)\n {\n if (page == null || page.length() == 0)\n {\n return Collections.emptyList();\n }\n\n final List<String> trimmedMatches = new ArrayList<String>();\n final List<String> matches = RegExUtils.getAllMatches(page, \"(?is)\" + pattern, group);\n\n for (int i = 0; i < matches.size(); i++)\n {\n final String s = matches.get(i);\n\n final String trimmed = s.trim();\n if (trimmed.length() > 0)\n {\n trimmedMatches.add(trimmed);\n }\n }\n\n return trimmedMatches;\n }", "java.lang.String getDataItemFilter();", "List<JSONObject> getFilteredItems();", "@NonNull\n private void splitHTMLIntoArrays() {\n String[] splitted = postBodyHTMLContent.split(Data.BR_MATCHER);\n\n // create List of array that can be modified using linkedList\n splittedPostComponent = new LinkedList<String>(Arrays.asList(splitted));\n }", "public List<T> getPageElementsList();", "public List<String> linkTexts()\n\t{\n\t\t\n\t\tList<String> links=new ArrayList<String>();\n\t\tlinks.add(linkString);\n\t\tlinks.add(\"Facebook.com\");\n\t\tlinks.add(\"google.com;\");\n\t\tlinks.add(\"gmail.com\");\n\t\tlinks.add(\"shine.com\");\n\t\tlinks.add(\"nukari.com\");\n\t\t\n\t\t// Like the above we have to add number of link text are passed to achieve the DataDriven approach through BBD \n\t\t\t\n\t\treturn links;\n\t\t\n\t}", "private ArrayList<String> findChampions() {\n\t\tString searchContents = search.getText();\n\t\tArrayList<String> result = new ArrayList<String>();\n\t\tfor (String c : CHAMPIONLIST) {\n\t\t\tif (c.toLowerCase().contains(searchContents.toLowerCase())) {\n\t\t\t\tresult.add(c);\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "ObservableList<Link> getFilteredLinkList();", "private ArrayList<String> parseBalanceSheetYears() {\n // Bilanz Jahresangaben\n\n Pattern bilanzJahresPattern = Pattern.compile(\"<table><thead><tr><th>\\\\s*Bilanz\\\\s*((?!</tr>).)*</tr></thead><tbody>\");\n matcher = bilanzJahresPattern.matcher(html);\n ArrayList<String> balanceSheetArray = new ArrayList<>();\n\n while (matcher.find()) {\n log.info(\"Matches gefunden!\");\n\n log.info(matcher.group(0));\n String bilanzJahresOut = matcher.group(0);\n bilanzJahresPattern = Pattern.compile(\"(\\\\s*<th class=\\\"ZAHL\\\">(((?!</).)*)</th>\\\\s*)\");\n matcher = bilanzJahresPattern.matcher(bilanzJahresOut);\n while (matcher.find()) {\n log.debug(matcher.group(2));\n balanceSheetArray.add(matcher.group(2).trim());\n }\n }\n\n log.info(balanceSheetArray.toString());\n return balanceSheetArray;\n }", "public static void main(String[] args) {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"C:\\\\eclipse\\\\chromedriver.exe\");\n\t\tWebDriver driver=new ChromeDriver();\n\t\tdriver.get(\"https://rahulshettyacademy.com/seleniumPractise/#/offers\");\n\t\tdriver.findElement(By.xpath(\"//input[@id='search-field']\")).sendKeys(\"Rice\");\n\t\tList<WebElement> items = driver.findElements(By.xpath(\"//tr/td[1]\"));\n\t\t\n\tList<WebElement> veggies=items.stream().filter(veggie->veggie.getText().contains(\"Rice\")).collect(Collectors.toList());\nAssert.assertEquals(items.size(), veggies.size());\n\t}", "public List<Element> monitorMainPage(){\n\t\tSystem.out.println(\"monitor main Page\");\n\t\tDocument document;\n\t\tList<Element> results = new ArrayList<Element>();\n\t\t// se connecte au site\n\t\tdocument = connectToPage(\"https://www.supremenewyork.com/shop/all\");\n\t\t// liste tous les éléments de la classe inner-article (i.e. tout ce qu'il y a sur la page\n\t\tElements elements = document.getElementsByClass(\"inner-article\");\n\t\tList<Element> articlesGeneral = new ArrayList<Element>();\n\t\tfor (Element element : elements) {\n\t\t\t// extrait chaque link a des articles \n\t\t\tElement link = element.select(\"a\").first();\n\t\t\tarticlesGeneral.add(link);\n\t\t}\n\t\tresults = articlesGeneral;\t\t\n\n\t\treturn results;\n\n\t}", "public static void main(String[] args) {\n String msg = \"hello everyone$<script>, fuck\";\n Request req = new Request();\n req.setResquestString(msg);\n Response res = new Response();\n res.setResponseString(\"reponse\");\n \n FilterChain fc = new FilterChain();\n \n \n fc.addFilter(new HtmlFilter())\n .addFilter(new SensitiveFilter())\n .addFilter(new FaceFilter());\n \n fc.doFilter(req, res,fc);\n System.out.println(req.getResquestString());\n System.out.println(res.getResponseString());\n\n\t}", "public List<Element> filter(Predicate<Element> p)\n\t{\n\t\treturn recursive_filter(new ArrayList<Element>(), p, group);\n\t}", "public ContentList filterContentList(ContentDatabaseFilter filter) throws DatabaseException;", "@Override\n\tpublic String dofilter(String str) {\n\t\tfor(Filter f : filters){\n\t\t\tstr = f.dofilter(str);\n\t\t}\t\t\n\t\treturn str;\n\t}", "public void filter(String text) {\n price_list.clear();\n if (text.length() == 0) {\n price_list.addAll(orginal_list);\n } else {\n for (Price_dto dto : orginal_list) {\n if (dto.getProduct().startsWith(text))\n price_list.add(0, dto);\n else if (dto.getProduct().contains(text)) {\n price_list.add(dto);\n }\n }\n }\n\n notifyDataSetChanged();\n }", "public static List<NLText> processTexts(List<String> texts) {\n// IProtocolClient api = ProtocolFactory.getHttpClient(Locale.ENGLISH, \"ui.disi.unitn.it\", 8092);\n LOG.warn(\"TODO - USING HARDCODED ENGLISH when creating sweb client in processTexts\");\n IProtocolClient api = ProtocolFactory.getHttpClient(Locale.ENGLISH);\n\t\tPipelineClient pipelineClient = new PipelineClient(api);\n NLPInput input = new NLPInput();\n input.setText(texts);\n //input.setNlpParameters(params);\n\n// NLText[] result = pipelineClient.run(\"KeywordTextPipeline\", input, 1l);\n NLText[] result = pipelineClient.run(\"ODHPipeline\", input, 1l);\n \n\t\treturn Arrays.asList(result);\n\t}", "private List<Tag> getTags(String text, boolean orderAlpha) {\r\n\t\tif (text != null)\r\n\t\t\tparseText(text);\r\n\t\tList<Tag> tags = new ArrayList<Tag>();\r\n\t\t// remplissage de la Liste des Tags\r\n\t\tEnumeration e = words.keys();\r\n\t\twhile (e.hasMoreElements()) {\r\n\t\t\tObject key = e.nextElement();\r\n\t\t\tString name = (String) key;\r\n\t\t\tint frequency = ((Integer) words.get(key)).intValue();\r\n\r\n\t\t\tTag tag = new Tag(frequency, frequency, name, name);\r\n\t\t\ttags.add(tag);\r\n\r\n\t\t}\r\n\t\twords = null;\r\n\r\n\t\tremovePlurals(tags);\r\n\t\tsortByFrequencyDesc(tags);\r\n\t\treduceToMaxNumbOfTags(tags);\r\n\t\tallocateClasses(tags);\r\n\t\tif (orderAlpha)\r\n\t\t\tsortTagNamesAsc(tags);\r\n\t\treturn tags;\r\n\r\n\t}", "private String[] extractPure(String data) throws Exception {\n\t\tString[] result1 = this.extractBetween(data.toString(), \"<title>\", \"</title>\", true, true);\n\t\t\n\t\t// remove search title bar\n\t\tresult1[1] = this.replaceBetween(result1[1], \"<div class=\\\"lotusTitleBar2\\\">\", \"<div class=\\\"lotusMain\\\">\", \"\");\n\t\t\n\t\t// remove left column\n\t\tresult1[1] = this.replaceBetween(result1[1], \"<div class=\\\"lotusColLeft\\\"\", \"<div class=\\\"lotusContent\\\"\", \"\");\n\t\t\n\t\t// remove body\n\t\tString[] result2 = this.extractBetween(result1[1], \"<div class=\\\"lotusContent\\\" role=\\\"main\\\">\", \"</table></div></div>\", true, true);\n\t\tresult2[1] = result2[1].substring(8);\n\t\t\n\t\t// return\n\t\treturn new String[]{result1[0], result2[0], result2[1]};\n\t\t\n\t}", "public static NodeFilter makeFilter()\n\t{\n\t\tNodeFilter[] fa = new NodeFilter[3];\n\t\tfa[0] = new HasAttributeFilter(\"HREF\");\n\t\tfa[1] = new TagNameFilter(\"A\");\n\t\tfa[2] = new HasParentFilter(new TagNameFilter(\"H3\"));\n\t\tNodeFilter filter = new AndFilter(fa);\n\t\treturn filter;\n\t}", "public String[] getStringArray(String subExpression) {\n String[] result = null;\n String expression = contextNode + \"/\" + subExpression;\n try {\n NodeList nl = (NodeList)xp.evaluate(contextNode + \"/\" + subExpression, source, XPathConstants.NODESET);\n int n = nl.getLength();\n if (n > 0) {\n result = new String[n];\n for (int i = 0; i < n; i++) result[i] = nl.item(i).getTextContent();\n }\n } catch(Exception e) {\n Util.log(\"XML error: can't read node \" + expression + \".\");\n Util.logException(e);\n }\n return result;\n }" ]
[ "0.6773859", "0.63704944", "0.62674373", "0.6191152", "0.60539013", "0.5880216", "0.585339", "0.5852893", "0.57437", "0.5666579", "0.5655659", "0.5622147", "0.5620531", "0.5608445", "0.5506116", "0.5467032", "0.5457709", "0.5444497", "0.54076695", "0.5398431", "0.5398267", "0.53813195", "0.5378561", "0.5365413", "0.535721", "0.53406125", "0.53363657", "0.5301212", "0.5276842", "0.52740407", "0.5248384", "0.51937795", "0.5186451", "0.51734406", "0.5172936", "0.5170948", "0.515638", "0.51530665", "0.5152304", "0.5128781", "0.51118517", "0.50966966", "0.50920135", "0.50882107", "0.50806016", "0.5078505", "0.50594527", "0.5051711", "0.50468916", "0.50424516", "0.5027116", "0.5018548", "0.5014684", "0.50020975", "0.49900442", "0.49825385", "0.49822327", "0.49798715", "0.49774107", "0.49710923", "0.49651524", "0.49588415", "0.49508134", "0.49443775", "0.4933926", "0.4916796", "0.4916295", "0.49130628", "0.4912256", "0.49075234", "0.4885872", "0.4873995", "0.48738885", "0.4873069", "0.48707354", "0.48686117", "0.4866795", "0.48666787", "0.48545644", "0.4846096", "0.48379505", "0.4837103", "0.48354453", "0.48343182", "0.48311839", "0.48288566", "0.4824843", "0.48213872", "0.4796095", "0.4795033", "0.47900456", "0.47881827", "0.47871745", "0.47826087", "0.47818273", "0.47664618", "0.4763626", "0.4760768", "0.4747303", "0.47470495" ]
0.7602483
0
Return text from a webpage inside tag "filter"
public static String HTMLText(String url, String filter) throws ParserException { String text = ""; List<String> sList; Parser parser = getParser(url); for (NodeIterator i = parser.elements(); i.hasMoreNodes();) { sList = getText(i.nextNode(), filter.toUpperCase()); Iterator<String> it = sList.iterator(); while (it.hasNext()) { text = text + " " + it.next(); } } return text; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static List<String> HTMLStrings(String url, String filter) throws ParserException\n\t{\n\t\tList<String> strings = new ArrayList<String>();\n\t\tParser parser = getParser(url);\n\t\tfor (NodeIterator i = parser.elements(); i.hasMoreNodes();)\n\t\t{\n\t\t\tstrings.addAll(getText(i.nextNode(), filter.toUpperCase()));\n\t\t}\n\t\treturn strings;\n\t}", "public static String HTMLLinkString(String url, String filter) throws Exception\n\t{\n\t\tURL[] links = HTMLLinks(url);\n\t\tString urls = \"\";\n\t\tfor (URL link : links)\n\t\t{\n\t\t\tString slink = link.toString();\n\t\t\tif (slink.contains(filter))\n\t\t\t{\n\t\t\t\turls = urls + slink + \" \";\n\t\t\t}\n\t\t}\n\t\treturn urls.trim();\n\t}", "@DISPID(5) //= 0x5. The runtime will prefer the VTID if present\n @VTID(11)\n java.lang.String getFilterText();", "private static List<String> getText(Node n, String filter) throws ParserException\n\t{\n\t\tList<String> strArray = new ArrayList<String>();\n\t\tString parentTag = \"\";\n\t\tTagNode parent = (TagNode) n.getParent();\n\t\tif (parent != null)\n\t\t{\n\t\t\tparentTag = parent.getTagName();\n\t\t}\n\t\tif (n instanceof TextNode)\n\t\t{ // text\n\t\t\tTextNode tn = (TextNode) n;\n\t\t\tSystem.out.println(parentTag + \":\" + tn.getText().trim());\n\t\t\tSystem.out.println(((TagNode) n).getTagName());\n\t\t\tif (filter.equals(\"\") || filter.equalsIgnoreCase(parentTag))\n\t\t\t{\n\t\t\t\tString text = tn.getText().trim();\n\t\t\t\ttext = text.replace(\"&nbsp;\", \" \"); // remove non-breaking spaces\n\t\t\t\tif (text.length() > 0 && !text.matches(\"\\\\s+\"))\n\t\t\t\t{\n\t\t\t\t\tstrArray.add(text);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{ // a tag or remark\n\t\t\tNodeList nl = n.getChildren();\n\t\t\tif (null != nl)\n\t\t\t{\n\t\t\t\tfor (NodeIterator ni = nl.elements(); ni.hasMoreNodes();)\n\t\t\t\t{\n\t\t\t\t\tstrArray.addAll(getText(ni.nextNode(), filter));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn strArray;\n\t}", "String getFilter();", "java.lang.String getFilter();", "public static String filter(String text)\n { StringBuffer buffer = new StringBuffer();\n for (int i=0; i<text.length(); i++)\n { char c = text.charAt(i);\n if (c == '<') buffer.append(\"&lt;\");\n else if (c == '>') buffer.append(\"&gt;\");\n else if (c == '\"') buffer.append(\"quot;\");\n else if (c == '&') buffer.append(\"amp;\");\n else buffer.append(c);\n }\n return buffer.toString();\n }", "public String getFilter();", "private static String filterMessage(String message) {\n\t\treturn Jsoup.parse(message).text();\n\t}", "public String getFilter() {\n\t\treturn url.getFilter();\n }", "public String getPageText();", "public static void main(String[] args) throws MalformedURLException, IOException{\n TagStripper ts = new TagStripper();\n\n // open an url connection to the specified adress\n URL url = new URL(\"http://sv.wikipedia.org/wiki/Henrik_VIII_av_England\");\n InputStreamReader input = new InputStreamReader(url.openConnection().getInputStream());\n\n // use the tag stripper to strip most of the tags\n String result = ts.stripHTML(input);\n\n //print the result\n System.out.println(result);\n }", "private String filterScriptMarkup(HttpServletRequest request, HttpServletResponse response, CMAbstractCode code) {\n //construct xmlFilters to strip RichText from <div> and <p> tags\n Markup unfilteredCode = code.getCode();\n List<XMLFilter> filters = new ArrayList<>();\n filters.addAll(xmlFilterFactory.createFilters(request, response, unfilteredCode, \"script\"));\n filters.add(new ScriptFilter());\n\n //strip <div> and <p> from markup\n StringWriter writer = new StringWriter();\n ScriptSerializer handler = new ScriptSerializer(writer);\n unfilteredCode.writeOn(filters, handler);\n return writer.getBuffer().toString();\n }", "private String getText(URL url){\n\tString parsedHtml=null;\n\ttry{\n\t\tHttpURLConnection urlConn = (HttpURLConnection) url.openConnection();\n\t\tString line = null;\n\t\tStringBuilder tmp = new StringBuilder();\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(urlConn.getInputStream()));\n\t\twhile ((line = in.readLine()) != null) {\n\t\t tmp.append(line);\n\t\t}\n\t\t \n\t\tDocument doc = Jsoup.parse(tmp.toString());\n\t\tparsedHtml = doc.title() + doc.body().text();\n\t\t\n\t}\n\tcatch(IOException e){\n\t\tSystem.out.println(\"Page not reached for: \"+url );\n\t}\n\tfinally{\n\t\treturn parsedHtml;\n\t}\n\t\n}", "String filter(String value);", "public static String pagefilter(String content){\n //String p = System.getProperty(\"line.separator\") ; //\\r\\n in windows jp\n\n content = content.replaceAll(\"&\",\"&amp;\"); \n content = content.replaceAll(\"<\",\"&lt;\");\n content = content.replaceAll(\">\",\"&gt;\"); \n content = content.replaceAll(\"\\n\",\"<br/>\");\n content = content.replaceAll(\" \",\"&nbsp;\");\n \n \n return content;\n }", "public static String HTMLLinkString(String root, int level, String filter) throws Exception\n\t{\n\t\tString urls = \"\";\n\t\tif (0 == level)\n\t\t{\n\t\t\treturn urls;\n\t\t}\n\t\turls = HTMLLinkString(root, filter);\n\t\tfor (String u : urls.split(\"\\\\s+\"))\n\t\t{\n\t\t\tif (u.contains(filter))\n\t\t\t{\n\t\t\t\turls = urls + \" \" + HTMLLinkString(u, level - 1, filter);\n\t\t\t}\n\t\t}\n\t\treturn urls.trim();\n\t}", "private String filterText(Player player, String txt)\r\n/* */ {\r\n/* 76 */ if (this.settings.enabled)\r\n/* */ {\r\n/* 78 */ Chatter chatter = ChatterHandler.getChatter(player.getUniqueId());\r\n/* 79 */ String filteredTxt = this.plugin.getFilterHandler().execute(player, txt);\r\n/* */ \r\n/* 81 */ if (filteredTxt != null)\r\n/* */ {\r\n/* */ \r\n/* 84 */ chatter.addMessage(new ChatMessage(filteredTxt));\r\n/* */ \r\n/* 86 */ return filteredTxt;\r\n/* */ }\r\n/* */ \r\n/* 89 */ return null;\r\n/* */ }\r\n/* */ \r\n/* */ \r\n/* 93 */ return txt;\r\n/* */ }", "public static void main(String[] args) {\n String msg = \"hello everyone$<script>, fuck\";\n Request req = new Request();\n req.setResquestString(msg);\n Response res = new Response();\n res.setResponseString(\"reponse\");\n \n FilterChain fc = new FilterChain();\n \n \n fc.addFilter(new HtmlFilter())\n .addFilter(new SensitiveFilter())\n .addFilter(new FaceFilter());\n \n fc.doFilter(req, res,fc);\n System.out.println(req.getResquestString());\n System.out.println(res.getResponseString());\n\n\t}", "@DISPID(-2147417077)\n @PropGet\n ms.html.IHTMLFiltersCollection filters();", "public String getSearchResultsText() {\n System.out.println(\"[step] getSearchResultsText\");\n return page.findElement(signSearch).getText();\n }", "public static String getWebPageSource(String webPage) throws Exception {\n URLConnection bc = new URL(webPage).openConnection();\r\n bc.setRequestProperty(\"user-Agent\", \"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11\");\r\n BufferedReader in = new BufferedReader(new InputStreamReader(bc.getInputStream()));\r\n\r\n String inputLine = \"\";\r\n String text = \"\";\r\n while ((inputLine = in.readLine()) != null) {\r\n text += inputLine;\r\n }\r\n in.close();\r\n\r\n return text;\r\n }", "public static String extract(Document page, String selector)\n {\n Element node = page.select(selector).first();\n if (node == null)\n return \"\";\n return node.text();\n }", "Filter getFilter();", "public WebElement getSearchPageHeaderText()\n{\n\treturn driver.findElement(headertext);\n}", "@GET\n @Path(\"/filter\")\n @Produces(\"text/plain\")\n public String getFilterWordList() throws JsonProcessingException {\n ObjectMapper mapper = new ObjectMapper();\n return mapper.writeValueAsString(FilterImpl.getList());\n }", "public String extractHtml(HttpURLConnection connection) {\n if (connection == null) return \"\";\n Scanner scanner = null;\n try {\n scanner = new Scanner(connection.getInputStream());\n } catch (IOException e) {\n return \"\";\n }\n scanner.useDelimiter(\"\\\\Z\");\n try {\n return scanner.next();\n } catch (Exception e) {\n return \"\";\n }\n }", "String getText();", "String getText();", "String getText();", "String getText();", "String getText();", "String getText();", "String getText();", "java.lang.String getHotelText();", "public void VerifyFilterTextSelected(String text, String text1){\r\n\t\tString Text = text + \": \" + text1;\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+Text);\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Filtered value should be displayed \"+Text);\r\n\t\ttry{ \r\n\r\n\t\t\tif(verifySpecificElementContains((locator_split(\"verifyFilter\")),Text)){\r\n\t\t\t\tReporter.log(\"PASS_MESSAGE:- Filtered value is displayed and it has Text -\"+Text);\r\n\t\t\t\tSystem.out.println(\"Verified the text -\"+Text);\r\n\t\t\t}else {\r\n\r\n\t\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t\t+ elementProperties.getProperty(\"verifyFilter\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t\t+ \" not found\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(NoSuchElementException e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- \"+elementProperties.getProperty(\"verifyFilter\").toString() +\" is not Present\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"verifyFilter\").toString()\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\r\n\t\tcatch(Error Er){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- The Payment success Expected text - '\"+Text+\" and Actual Tesxt : \"+getText(locator_split(\"verifyFilter\"))+\" is not equal\");\r\n\t\t\tthrow new Error(\"The Payment success Expected test - '\"+Text+\" and Actual Tesxt : \"+getText(locator_split(\"verifyFilter\"))+\" is not equal\");\r\n\t\t}\r\n\t}", "Results processFilter(FilterSpecifier filter) throws SearchServiceException;", "<E extends CtElement> List<E> getElements(Filter<E> filter);", "public String searchResult(){\n return getText(first_product_title);\n }", "public UnsignedDoubleTextFilter getTextFilter() {\n return filter;\n }", "public abstract void filter();", "String filter(String text)\n {\n return text.trim().toLowerCase();\n }", "public String getAllertText(){\n return driver.findElement(statusAllert).getText();\n }", "public String filter(final VariantContext ctx);", "public String getFilter() {\n\t\treturn filter;\n\t}", "public static String getText(String url)\n {\n try {\n\t URL website = new URL(url);\n\t URLConnection connection = website.openConnection();\n\t BufferedReader in = new BufferedReader(\n\t new InputStreamReader(\n\t connection.getInputStream()));\n\t\n\t StringBuilder response = new StringBuilder();\n\t String inputLine = \"\";\n\t while ((inputLine = in.readLine()) != null) \n\t \tresponse.append(inputLine);\n\n\t\t\tin.close();\n\t\t\t\n\t return response.toString();\n\t\t} catch (IOException e) {\n\t\t\tDebug.Error(e.getMessage());\n\t\t}\n return \"\";\n }", "String filterEntry(String entry) {\n String result = \"<?>\";\n try {\n StringTokenizer stok = new StringTokenizer(entry, \"=\");\n result = (String)stok.nextElement();\n }\n catch (Exception ex) {\n ex.printStackTrace();\n }\n return result;\n }", "public ArrayList<String> soupThatSite(String url) throws IOException {\n\n ArrayList<String> parsedDoc = new ArrayList<>();\n Document doc = Jsoup.connect(url).get();\n\n if (url.contains(\"cnn.com\")) {\n\n doc.select(\"h1\").stream().filter(Element::hasText).forEach(element1 -> {\n String str = element1.text();\n String clean = Jsoup.clean(str, Whitelist.basic());\n parsedDoc.add(clean);\n });\n\n doc.select(\".zn-body__paragraph\").stream().filter(Element::hasText).forEach(element1 -> {\n String str = element1.text();\n String clean = Jsoup.clean(str, Whitelist.basic());\n parsedDoc.add(clean);\n });\n\n } else {\n\n doc.select(\"h1\").stream().filter(Element::hasText).forEach(element1 -> {\n String str = element1.text();\n String clean = Jsoup.clean(str, Whitelist.basic());\n parsedDoc.add(clean);\n });\n\n doc.select(\"p\").stream().filter(Element::hasText).forEach(element -> {\n String str = element.text();\n String clean = Jsoup.clean(str, Whitelist.basic());\n parsedDoc.add(clean);\n });\n }\n\n return parsedDoc;\n }", "java.lang.String getDataItemFilter();", "public String extractText(String urlString) {\n String text = \"\";\n try {\n URL url = new URL(urlString);\n text = ArticleExtractor.INSTANCE.getText(url); \n } catch (Exception ex) {\n Logger.getLogger(TextExtractor.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n return text;\n }", "public String getFilter()\n {\n if ( \"\".equals( filterCombo.getText() ) ) //$NON-NLS-1$\n {\n return \"\"; //$NON-NLS-1$\n }\n parser.parse( filterCombo.getText() );\n return parser.getModel().isValid() ? filterCombo.getText() : null;\n }", "java.lang.String getText();", "java.lang.String getText();", "java.lang.String getText();", "java.lang.String getText();", "java.lang.String getText();", "java.lang.String getText();", "java.lang.String getText();", "java.lang.String getText();", "private String getContent(String url) throws BoilerpipeProcessingException, IOException {\n int code;\n HttpURLConnection connection = null;\n URL uri;\n do{\n uri = new URL(url);\n if(connection != null)\n connection.disconnect();\n connection = (HttpURLConnection)uri.openConnection();\n connection.setRequestMethod(\"GET\");\n connection.setConnectTimeout(5000);\n connection.setReadTimeout(5000);\n connection.connect();\n code = connection.getResponseCode();\n if(code == 301)\n url = connection.getHeaderField( \"Location\" );\n }while (code == 301);\n\n System.out.println(url + \" :: \" + code);\n String content = null;\n if(code < 400) {\n content = ArticleExtractor.INSTANCE.getText(uri);\n }\n connection.disconnect();\n return content;\n }", "public java.lang.String getFilter() {\n return filter;\n }", "public String getTextOnPage()\n {\n return mainText.getText();\n }", "@Test\n public void ebayTestSearchResults() throws Exception {\n driver.findElement(By.id(\"gh-ac\")).sendKeys(\"java book\");\n driver.findElement(By.id(\"gh-btn\")).click();\n\n Thread.sleep(4000);\n\n WebElement searchResults = driver.findElement(By.tagName(\"h1\"));\n //21,761 results for java book\n String resultActual = searchResults.getText();\n System.out.println(resultActual);\n }", "private Set<String> extracLinks(String url, LinkFilter filter) {\n\n\t\tSet<String> links = new HashSet<String>();\n\t\ttry {\n\t\t\tParser parser = new Parser(url);\n\t\t\tparser.setEncoding(\"UTF-8\");\n\t\t\t// linkFilter filter <a> tag\n\t\t\tNodeClassFilter linkFilter = new NodeClassFilter(LinkTag.class);\n\t\t\t// get all filtered links\n\t\t\tNodeList list = parser.extractAllNodesThatMatch(linkFilter);\n\t\t\tfor (int i = 0; i < list.size(); i++) {\n\t\t\t\tNode tag = list.elementAt(i);\n\t\t\t\tif (tag instanceof LinkTag)// <a> tag\n\t\t\t\t{\n\t\t\t\t\tLinkTag link = (LinkTag) tag;\n\t\t\t\t\tString linkUrl = link.getLink();// url\n\t\t\t\t\tif (filter.accept(linkUrl)) {\n\t\t\t\t\t\t// change bbsdoc to bbstdoc\n\t\t\t\t\t\tString stlink = linkUrl.replace(\"bbsdoc\", \"bbstdoc\");\n\t\t\t\t\t\tlinks.add(stlink);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (ParserException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn links;\n\t}", "@Test\n\tpublic void stringFilterTest(){\n\t\t\n\t\tList<IElement> result = filter.process(elements);\n\t\t\n\t\tAssert.assertNotNull(\"The result of filter is null!\",result);\n\t\tAssert.assertEquals(\"More results than expected, filter execution fail.\",\n\t\t\t\texpectedResultNum.intValue(),result.size());\n\t\t\n\t\t\n\t}", "public static void main (String[] args) {\r\n try {\r\n BufferedReader in = new BufferedReader(\r\n new InputStreamReader(\r\n new FileInputStream(new File(\"D:\\\\bitext.html\")), \"UTF-8\"));\r\n\r\n String s;\r\n StringBuffer b = new StringBuffer();\r\n while( (s = in.readLine()) != null) {\r\n b.append(s );\r\n }\r\n String page= b.toString();\r\n HTMLParser parser = new HTMLParser(page.getBytes(\"UTF-8\"));\r\n //parser.getTagValue (\"meta\");\r\n //System.out.println();\r\n\r\n System.out.println(parser.htmlParsing (false, null, null, false));\r\n //System.out.println(htmlParsing (page3, \"euc-kr\"));\r\n\r\n\r\n } catch (Throwable t) {\r\n t.printStackTrace ();\r\n }\r\n }", "public String SearchContent()\n\t{\n\t\tSystem.out.println(\"Content:\" + Content);\n\t\tluc = new Lucene_fuction();\n\t\tHttpServletRequest request = ServletActionContext.getRequest();\n\t\tServletContext servletContext = ServletActionContext.getServletContext();\n\t\trequest.getSession();\n\t\tHttpServletResponse response = ServletActionContext.getResponse();\n\t\t// if the tag is empty\n\t\t\n\t\t\tArrayList<Picture> PicList = new ArrayList<>();\n\t\t\tPicList = luc.queryIndex_Content(Content);\n\t\t\trequest.setAttribute(\"PictureList\", PicList);\n\t\t\treturn \"Content_Result\";\n\t}", "public static void main(String[] args) {\n\t\tWebDriver wd = new FirefoxDriver();\n\t\twd.manage().window().maximize();\n\t\twd.get(\"https://www.bing.com/\");\n\t\tWebElement text=wd.findElement(By.xpath(\".//*[@id='sos_text']\"));\n\t String data=text.getText();\n\t System.out.println(data);\n\t}", "private void getHtmlCode() {\n\t try {\n\t Document doc = Jsoup.connect(\"http://www.example.com/\").get();\n\t Element content = doc.select(\"a\").first();\n//\t return content.text();\n\t textView.setText(content.text());\n\t } catch (IOException e) {\n\t // Never e.printStackTrace(), it cuts off after some lines and you'll\n\t // lose information that's very useful for debugging. Always use proper\n\t // logging, like Android's Log class, check out\n\t // http://developer.android.com/tools/debugging/debugging-log.html\n\t Log.e(TAG, \"Failed to load HTML code\", e);\n\t // Also tell the user that something went wrong (keep it simple,\n\t // no stacktraces):\n\t Toast.makeText(this, \"Failed to load HTML code\",\n\t Toast.LENGTH_SHORT).show();\n\t }\n\t }", "public String getSelectedWebsiteData()\n {\n try\n {\n Select websiteDataDropdown = new Select(driver.findElement(LOAD_DATA_SELECTOR));\n return websiteDataDropdown.getFirstSelectedOption().getText();\n }\n catch (NoSuchElementException e)\n {\n throw new PageException(\"Unable to locate filter elements from the dropdown\", e);\n }\n }", "public static List<String> getLinks(String url, NodeFilter filter) throws ParserException\n\t{\n\t\tParser parser = getParser(url);\n\t\tNodeList list = new NodeList();\n\t\tfor (NodeIterator e = parser.elements(); e.hasMoreNodes();)\n\t\t{\n\t\t\tlist.add(getNodes(e.nextNode(), filter));\n\t\t}\n\t\tList<String> strings = new ArrayList<String>();\n\t\tfor (NodeIterator i = list.elements(); i.hasMoreNodes();)\n\t\t{\n\t\t\tNode n = i.nextNode();\n\t\t\tif (n instanceof LinkTag)\n\t\t\t{ // text\n\t\t\t\tString link = ((LinkTag) n).extractLink();\n\t\t\t\tif (!strings.contains(link))\n\t\t\t\t{\n\t\t\t\t\tstrings.add(((LinkTag) n).extractLink());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn strings;\n\t}", "Tag findByText(String text);", "public static String getDescriptionFilter() {\r\n return descriptionFilter;\r\n }", "public String extractText(Reader reader) {\n String text = \"\";\n try { \n text = ArticleExtractor.INSTANCE.getText(reader); \n } catch (BoilerpipeProcessingException ex) {\n Logger.getLogger(TextExtractor.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n return text;\n }", "@Override\n\tpublic String findPage(Set<String> filterField) {\n\t\treturn null;\n\t}", "public String getSourceText() {\n\t\treturn getSource().replaceAll(\"<a.*>(.*)</a>\", \"$1\");\n\t}", "private void filterResults(String medium) {\r\n\t\tnew HomePageAdverteerder(driver).openExchangePage()\r\n\t\t\t.selectFilterOptions(Filter.MEDIUM, new String[] {medium})\r\n\t\t\t.selectFilterOptions(Filter.FORMAAT_CODE, new String[] {FULL_PAGE})\r\n\t\t\t.applyFilters();\r\n\t}", "public String getFilter() {\n\t\treturn(\"PASS\");\n\t}", "@Test\n\tpublic void run() {\n\t\tWebDriver webdriver = WebDriverManager.getWebDriver();\n\t\twebdriver.get(WikiPag.url);\n\t\t\n\t\t//pesquisa pelo termo\n\t\tBy byInputSearch = By.id(\"searchInput\");\n\t\tWebElement elementInputSearch = webdriver.findElement(byInputSearch);\n\t\telementInputSearch.sendKeys(termo);\n\t\twebdriver.findElement(By.id(\"searchButton\")).click();\n\t\t\n\t\tString xpath = \"(.//div[@id='p-lang']/div/ul)\";\n\t\tSystem.out.println(webdriver.findElement(By.xpath(xpath)).getText());\n\t\t\n\t\t\n\t}", "public static void main(String[] args) throws IOException {\n Document doc = Jsoup.connect(\"http://www.gewara.com/movie/searchCinema.xhtml?countycode=310115\").userAgent(\"Mozilla\").get();\n\n\n System.out.println(doc);\n\n\n Elements links = doc.select(\"a[href^=/movie][target=_blank][class=color3]\");\n// Document doc = Jsoup.connect(\"http://example.com\")\n// .data(\"query\", \"Java\")\n// .userAgent(\"Mozilla\")\n// .cookie(\"auth\", \"token\")\n// .timeout(3000)\n// .post();\n\n {\n// Element link = doc.select(\"a\").first();\n// String relHref = link.attr(\"href\"); // == \"/\"\n// String absHref = link.attr(\"abs:href\"); // \"http://www.open-open.com/\"\n//\n// System.out.println(relHref);\n// System.out.println(absHref);\n }\n\n\n// Element element = doc.select(\"div.chooseOpi_body\").first();\n// Elements lis = element.select(\"li\");\n//\n//\n// for (Element li : lis) {\n//\n// Movie movie = new Movie();\n// movie.setStartTime(li.select(\"span.opitime\").first().child(0).text());\n// movie.setPrice(li.select(\"span.opiPrice\").first().child(0).text());\n//// if (li.select(\"span.opiSales\").first() != null){\n//// movie.setSale(li.select(\"span.opiSales\").first().tagName(\"b\").child(1).text() +li.select(\"span.opiSales\").first().tagName(\"b\").child(1).text());\n//// }\n// System.out.println(movie.toString());\n// }\n\n\n }", "private void search() {\n String result = \"<body bgcolor=\\\"black\\\"> \" +\n \"<font color=\\\"#009933\\\"\";\n gs.setQueryString(txtQueury.getText());\n try {\n gsr = gs.doSearch();\n txtCountRes.setText(\"\" + gsr.getEstimatedTotalResultsCount());\n gsre = gsr.getResultElements();\n\n for (int i = 0; i < gsre.length; i++) {\n if (googleTitle.isSelected()) {\n result +=\n \"<font color=\\\"red\\\"><u><b>Title: </u></b><a href=\\\"\" +\n gsre[i].getURL() + \"\\\">\"\n + gsre[i].getTitle() + \"</a><br>\" +\n \"<br><b>URL: \" +\n gsre[i].getHostName() + gsre[i].getURL() +\n \"</b></font><br>\";\n }\n if (googleSummary.isSelected()) {\n result += \"<u><b>Summary: </u></b>\" +\n gsre[i].getSummary() +\n \"<br>\";\n }\n if (googleSnippet.isSelected()) {\n result += \"<u><b>Snippet: </u></b>\" +\n gsre[i].getSnippet() +\n \"<br>\";\n }\n if (googleHostName.isSelected()) {\n result += \"<u><b>Host: </u></b>\" + gsre[i].getHostName() +\n \"<br>\";\n }\n if (googleDirectoryTitle.isSelected()) {\n result += \"<u><b>Directory Title: </u></b>\" +\n gsre[i].getDirectoryTitle() + \"<br>\";\n }\n if (googleCachedSize.isSelected()) {\n result += \"<u><>Cached Size: </u></b>\" +\n gsre[i].getCachedSize() + \"<br>\";\n }\n result += \"<br>\";\n }\n } catch (GoogleSearchFault e) {\n msg(\"Erreur d'exécution \" + e.getMessage(), \"Error\",\n JOptionPane.ERROR_MESSAGE);\n }\n\n //affichage de la recherche\n editor.setText(result);\n }", "@Override\n\tpublic String dofilter(String str) {\n\t\tfor(Filter f : filters){\n\t\t\tstr = f.dofilter(str);\n\t\t}\t\t\n\t\treturn str;\n\t}", "public String ProcessHTMLPage(String url) {\n\t\tString htmlSource = null;\n\t\tSystem.out.println(\"processing ..\" + url);\n\t\tStringBuilder stringBuilder = new StringBuilder();\n\t\ttry {\n\t\t\thtmlSource = getURLSource(url);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tDocument document = Jsoup.parse(htmlSource);\n\n\t\torg.jsoup.select.Elements allElements = document.getAllElements();\n\t\tfor (Element element : allElements) {\n\t\t\tif (element.nodeName().matches(\n\t\t\t\t\t\"^.*(p|h1|h2|h3|h4|h5|h6|title|body|li|a|em|i|ins|big|bdo|b|blockquote|center|mark|small|string|sub|sup|tt|u).*$\")) {\n\t\t\t\tif (!element.ownText().isEmpty()) {\n\t\t\t\t\t// System.out.println(element.nodeName()\n\t\t\t\t\t// + \" \" + element.ownText());\n\t\t\t\t\tstringBuilder.append(element.ownText());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn stringBuilder.toString();\n\n\t}", "public Element getFilterElement() {\n\t\tElement result = new Element(TAG_FILTER);\n\t\t\n\t\tElement desc = new Element(TAG_DESCRIPTION);\n\t\tdesc.setText(this.description);\n\t\tresult.addContent(desc);\n\t\t\n\t\tElement logdata = new Element(TAG_LOGDATA);\n\t\tlogdata.setText(\"\" + this.logData);\n\t\tresult.addContent(logdata);\n\t\t\n\t\tElement accepted = new Element(TAG_ACCEPTEDTYPES);\n\t\tif (acceptedEventTypes != null) {\n\t\t Set<String> keys = acceptedEventTypes.keySet();\n\t\t\t// sort output by event type name\n\t\t\tLinkedList<String> sortedKeyList = new LinkedList<String>(keys);\n\t\t\tCollections.sort(sortedKeyList);\n\t\t\tfor (String key : sortedKeyList) {\n\t\t\t\t// only save event types which are actually set for logging\n\t\t\t\tif (getEventTypePriority(key) != PRIORITY_OFF) {\n\t\t\t\t\tElement type = new Element(TAG_CLASS);\n\t\t\t\t\ttype.setText(key);\n\t\t\t\t\ttype.setAttribute(TAG_PRIORITY, \"\" + getEventTypePriorityString(key));\n\t\t\t\t\taccepted.addContent(type);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tresult.addContent(accepted);\n\t\t\n\t\treturn result;\n\t}", "user_filter_reference getUser_filter_reference();", "public String verifyUserOnWomenPage(){\n WebElement womenPage = driver.findElement(By.cssSelector(\"div[class='breadcrumb clearfix'] a[title='Dresses']\"));\n String womenPageStatus = womenPage.getText();\n return womenPageStatus;\n }", "private static String getTextFromHtml(File f) throws Exception {\n\t\tInputStream is = null;\n\t\ttry {\n\t\t\tis = new FileInputStream(f);\n\t\t\tContentHandler contenthandler = new BodyContentHandler();\n\t\t\tMetadata metadata = new Metadata();\n\t\t\tParser parser = new AutoDetectParser();\n\t\t\tparser.parse(is, contenthandler, metadata, new ParseContext());\n\t\t\treturn contenthandler.toString();\n\n\t\t} catch (Exception e) {\n\t\t\tthrow e;\n\t\t} finally {\n\t\t\tif (is != null)\n\t\t\t\tis.close();\n\t\t}\n\t}", "String content();", "public static void main(String[] args) {\n String fileName = \"voca.html\";\n// String url = \"https://play.google.com/store/search?q=bcs&c=apps\";\n// String url = \"https://play.google.com/store/search?q=vocabulary&c=apps\";\n \n try {\n Document doc = Jsoup.parse(new File(fileName), \"utf-8\");\n Element divTag = doc.getElementById(\"mydiv\");\n Elements elements = divTag.getElementsByClass(\"card no-rationale square-cover apps small\");\n \n//this will print only 50 names\n// Document doc = Jsoup.connect(url).get();\n// Elements elements = doc.getElementsByClass(\"card no-rationale square-cover apps small\");\n \n for (Element element : elements) {\n// System.out.println(x++);\n name_link(element);\n }//for \n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void getRawField(String path){\n\t\tString info; // content of each node\n\t\tArrayList<String> fileContent = new ArrayList<>();\n\t\tNodeList documentList = getDocumentsTagsPubmed(path);\n\t\tfor (int s = 0; s < documentList.getLength(); s++) { //transform document nodes in elements\n\t\t\tNode fstNode = documentList.item(s);\n\t\t\tElement element = (Element) fstNode;\n\t\t\tNodeList nodeList2 = element.getElementsByTagName(\"str\");\n\t\t\tfor (int j = 0; j < nodeList2.getLength(); j++) {\n\t\t\t\tNode text = nodeList2.item(j);\n\t\t\t\treadPubmedElements(fileContent,text);\n\t\t\t\tif(fileContent.get(0)!=null){\n\t\t\t\t\t//\tgetWindowSentences(List<String> tokenizedText, T, int window, fileContent.get(0));\n\t\t\t\t\tsaveContenttoFile(fileContent, \"Files\\\\result.txt\");\n\t\t\t\t\tfileContent.removeAll(fileContent);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\n public String getText() {\n try {\n return doc.select(\".post-content\").get(0).text().replaceAll(\"\\n\", \" \").\n // removing references\n replaceAll(\"\\\\[[\\\\w\\\\s\\\\.\\\\-\\\\,;\\\\?\\\\!\\\\:]+\\\\]\", \"\");\n } catch (NullPointerException e) {\n return null;\n }\n }", "private String getTextFromTagName(Element element, String tagName) {\n NodeList elements = element.getElementsByTagName(tagName);\n Node node = elements.item(0);\n return node.getTextContent();\n }", "@Override\n public List runFilter(String filter) {\n return runFilter(\"\", filter);\n }", "String text();", "String getText ();", "@Test\n public void test() throws IOException {\n String url = \"http://blog.csdn.net/seatomorrow/article/details/48393547\";\n Readability readability = new Readability(getDoc(url)); // URL\n readability.init();\n String cleanHtml = readability.outerHtml();\n System.out.println(cleanHtml);\n }", "@Override\n public ParseResult filter(Content content, ParseResult parseResult,\n HTMLMetaTags metaTags, DocumentFragment doc) {\n\n // get parse obj\n Parse parse = parseResult.get(content.getUrl());\n\n // construct base url\n URL base;\n try {\n base = new URL(content.getBaseUrl());\n } catch (MalformedURLException e) {\n Parse emptyParse = new ParseStatus(e).getEmptyParse(getConf());\n parseResult.put(content.getUrl(), new ParseText(emptyParse.getText()),\n emptyParse.getData());\n return parseResult;\n }\n\n try {\n // extract license metadata\n Walker.walk(doc, base, parse.getData().getParseMeta(), getConf());\n } catch (ParseException e) {\n Parse emptyParse = new ParseStatus(e).getEmptyParse(getConf());\n parseResult.put(content.getUrl(), new ParseText(emptyParse.getText()),\n emptyParse.getData());\n return parseResult;\n }\n\n return parseResult;\n }", "public String extractresult(String search) {\n\t\tfd.findElement(By.id(\"sb_form_q\")).sendKeys(search);\r\n\t\tfd.findElement(By.id(\"sb_form_go\")).click();\r\n\t\t\r\n\t\treturn fd.findElement(By.className(\"sb_count\")).getText();\t\r\n\t}", "String filter(String v);", "static String computeContent(String inputLine) {\n\t\tif(identifyLinks(inputLine)){\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t\r\n\t\tif (inputLine.contains(\"<li>\") && inputLine.contains(\"</li>\")) {\r\n\t\t\tif (inputLine.indexOf(\"<li>\") < inputLine.indexOf(\"</li>\")) {\r\n\t\t\t\treturn inputLine.substring(inputLine.indexOf(\"<li>\"), inputLine.indexOf(\"</li>\"));\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (inputLine.contains(\"<p>\") && inputLine.contains(\"</p>\")) {\r\n\t\t\tif (inputLine.indexOf(\"<p>\") < inputLine.indexOf(\"</p>\")) {\r\n\t\t\t\treturn inputLine.substring(inputLine.indexOf(\"<p>\"), inputLine.indexOf(\"</p>\"));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn null;\r\n\t}" ]
[ "0.66900146", "0.65211743", "0.6443645", "0.6070411", "0.5997556", "0.58780307", "0.578981", "0.57772946", "0.5736691", "0.56956255", "0.5692208", "0.56407195", "0.5542288", "0.5484454", "0.5480927", "0.5470323", "0.54377174", "0.54007035", "0.5368527", "0.53403956", "0.52593493", "0.5244895", "0.5183165", "0.51782066", "0.51535624", "0.51369", "0.5130049", "0.51064974", "0.51064974", "0.51064974", "0.51064974", "0.51064974", "0.51064974", "0.51064974", "0.50916463", "0.5073825", "0.5066835", "0.50538415", "0.5038768", "0.50360876", "0.5023132", "0.50150615", "0.50128615", "0.50032926", "0.499749", "0.49964124", "0.4985333", "0.49781242", "0.4975962", "0.49702182", "0.49402407", "0.49368152", "0.49368152", "0.49368152", "0.49368152", "0.49368152", "0.49368152", "0.49368152", "0.49368152", "0.493379", "0.4930304", "0.49192324", "0.49051225", "0.48910466", "0.4890603", "0.48853502", "0.48743996", "0.48734593", "0.4868392", "0.48657334", "0.48631746", "0.48623204", "0.48409957", "0.48378125", "0.4832291", "0.48317358", "0.48312908", "0.48210058", "0.48066017", "0.48058426", "0.47926083", "0.47768307", "0.47639787", "0.4759978", "0.47597295", "0.4749905", "0.47468787", "0.47405457", "0.47346523", "0.47197706", "0.47176704", "0.47125748", "0.4711971", "0.4710088", "0.47084928", "0.47068566", "0.4693499", "0.46878463", "0.46861315", "0.467208" ]
0.73260015
0
return words from a url, stemmed and validated
public static List<String> validHtmlStems(String url) { String htmlString = ""; try { htmlString = HTMLText(url); } catch (Exception e) { logger.error(e.getMessage(), e); } List<String> words = getWords(htmlString); List<String> validWords = validStems(words); return validWords; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static List<String> getWord(String urlname) {\n\t\tList<String> returnWord = new ArrayList<String>();\n\t\tBufferedReader reader;\n\t\ttry {\n\t\t\tURL url = new URL(urlname);\n\t\t\tInputStream in = url.openStream();\n\t\t\treader = new BufferedReader(new InputStreamReader(in));\n\t\t\twhile (true) {\n\t\t\t\tString word = reader.readLine();\n\t\t\t\tif (word == null)\n\t\t\t\t\tbreak;\n\t\t\t\treturnWord.add(word);\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(e.getMessage());\n\t\t}\n\t\treturn returnWord;\n\t}", "public static List<String> validHtmlWords(String url)\n\t{\n\t\tString htmlString = \"\";\n\t\ttry\n\t\t{\n\t\t\thtmlString = HTMLText(url);\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tlogger.error(e.getMessage(), e);\n\t\t}\n\t\tList<String> words = getWords(htmlString);\n\t\tList<String> validWords = validWords(words);\n\t\treturn validWords;\n\t}", "public String spellCheck(String url) {\n String answer = null;\n // Term term = new Term(Fields.URL.name(), text);\n try {\n Query query = parser.parse(QueryParser.escape(shingleString(url)));\n Query prefix = new PrefixQuery(new Term(URLField, url.substring(0,1)));\n BooleanQuery combined = new BooleanQuery();\n combined.add(query, Occur.MUST);\n combined.add(prefix, Occur.MUST);\n TopDocs docs = searcher.search(combined, 5);\n double maxSim = -1;\n \n for(ScoreDoc sd:docs.scoreDocs){\n// if(sd.score<SPELL_CHECK_SIM_LOWERBOUND)\n// continue;\n String retrievedURL = searcher.doc(sd.doc).get(URLField);\n \n double currentSim = customeEditDistance.proximity(url.replace(' ', '_'), retrievedURL);\n \n// ec.NESimilarity(url, retrievedURL.replace(' ', '_'));//\n\n if (currentSim > maxSim && currentSim > SPELL_CHECK_SIM_LOWERBOUND){\n answer = retrievedURL;\n maxSim = currentSim;\n System.out.println(retrievedURL+\" with sim \"+currentSim);\n }\n }\n \n } catch (Exception e) {\n \n }\n \n return TitleNameIndexer.normalize(answer);\n }", "String stemOf (String word);", "public KeyWordList extractKeyWords(String input);", "@RequestMapping(\"/{words}\")\n\tpublic List<WordMatch> match(@PathVariable(\"words\") String words) {\n\t\tList<WordMatch> matches = new ArrayList<>();\n\t\tfor (String text : words.split(\",\")) {\n\t\t\tmatches.add(service.getMatch(text));\n\t\t}\n\t\treturn matches;\n\t}", "public static List<String> readWordlist(String url) {\n\t\tfinal List<String> lines = new ArrayList<String>();\n\t\ttry {\n\t\t\tURL website = new URL(url);\n\t\t\tURLConnection connection = website.openConnection();\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream(), \"UTF-8\"));\n\t\t\tString str;\n\t\t\twhile ((str = in.readLine()) != null) {\n\t\t\t\t// Nur Namen mit unter 8 Buchstaben nehmen damit die Namen nicht zu lange werden (& kaputte Zeichen vermeiden)\n\t\t\t\tif (str.length() < 8 && !str.contains(\"�\")) {\n\t\t\t\t\t// Wenn CSV\n\t\t\t\t\tif(str.contains(\",\")) {\n\t\t\t\t\t\tlines.add(str.split(\",\")[0]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlines.add(str);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tin.close();\n\t\t} catch (Exception e) {\n\t\t\t//ignore\n\t\t}\n\t\treturn lines;\n\t}", "public List<String> getRelatedWords(String word) throws IOException {\n List<String> result = new ArrayList<String>();\n IDictionary dict = new Dictionary(new File(WORDNET_LOCATION));\n try {\n dict.open();\n IStemmer stemmer = new WordnetStemmer(dict);\n for (POS pos : EnumSet.of(POS.ADJECTIVE, POS.ADVERB, POS.NOUN, POS.VERB)) {\n List<String> resultForPos = new ArrayList<String>();\n List<String> stems = new ArrayList<String>();\n stems.add(word);\n for (String stem : stemmer.findStems(word, pos)) {\n if (!stems.contains(stem))\n stems.add(stem);\n }\n for (String stem : stems) {\n if (!resultForPos.contains(stem)) {\n resultForPos.add(stem);\n IIndexWord idxWord = dict.getIndexWord(stem, pos);\n if (idxWord == null) continue;\n List<IWordID> wordIDs = idxWord.getWordIDs();\n if (wordIDs == null) continue;\n IWordID wordID = wordIDs.get(0);\n IWord iword = dict.getWord(wordID);\n \n ISynset synonyms = iword.getSynset();\n List<IWord> iRelatedWords = synonyms.getWords();\n if (iRelatedWords != null) {\n for (IWord iRelatedWord : iRelatedWords) {\n String relatedWord = iRelatedWord.getLemma();\n if (!resultForPos.contains(relatedWord))\n resultForPos.add(relatedWord);\n }\n }\n \n List<ISynsetID> hypernymIDs = synonyms.getRelatedSynsets();\n if (hypernymIDs != null) {\n for (ISynsetID relatedSynsetID : hypernymIDs) {\n ISynset relatedSynset = dict.getSynset(relatedSynsetID);\n if (relatedSynset != null) {\n iRelatedWords = relatedSynset.getWords();\n if (iRelatedWords != null) {\n for (IWord iRelatedWord : iRelatedWords) {\n String relatedWord = iRelatedWord.getLemma();\n if (!resultForPos.contains(relatedWord))\n resultForPos.add(relatedWord);\n }\n }\n }\n }\n }\n }\n }\n for (String relatedWord : resultForPos) {\n if (relatedWord.length() > 3\n && !relatedWord.contains(\"-\")\n && !result.contains(relatedWord)) {\n // TODO: Hack alert!\n // The - check is to prevent lucene from interpreting hyphenated words as negative search terms\n // Fix!\n result.add(relatedWord);\n }\n }\n }\n } finally {\n dict.close();\n }\n return result;\n }", "public ArrayList<String> soupThatSite(String url) throws IOException {\n\n ArrayList<String> parsedDoc = new ArrayList<>();\n Document doc = Jsoup.connect(url).get();\n\n if (url.contains(\"cnn.com\")) {\n\n doc.select(\"h1\").stream().filter(Element::hasText).forEach(element1 -> {\n String str = element1.text();\n String clean = Jsoup.clean(str, Whitelist.basic());\n parsedDoc.add(clean);\n });\n\n doc.select(\".zn-body__paragraph\").stream().filter(Element::hasText).forEach(element1 -> {\n String str = element1.text();\n String clean = Jsoup.clean(str, Whitelist.basic());\n parsedDoc.add(clean);\n });\n\n } else {\n\n doc.select(\"h1\").stream().filter(Element::hasText).forEach(element1 -> {\n String str = element1.text();\n String clean = Jsoup.clean(str, Whitelist.basic());\n parsedDoc.add(clean);\n });\n\n doc.select(\"p\").stream().filter(Element::hasText).forEach(element -> {\n String str = element.text();\n String clean = Jsoup.clean(str, Whitelist.basic());\n parsedDoc.add(clean);\n });\n }\n\n return parsedDoc;\n }", "public static List<ExtractedEntity> extractEntities(String text){\n\t\tList<ExtractedEntity> extractedConcepts = new ArrayList<ExtractedEntity>();\n\t\tZemanta zem = new Zemanta(ZEMAMTA_API_KEY);\t\n\t\tZemantaResult zemResult = zem.suggest(text);\n\t\tString cid = zemResult.rid;\n\t\tfor(Link link : zemResult.markup.links){\n\t\t\tString term = link.anchor;\n\t\t\tfor(Target target : link.targets){\n\t\t\t\tif(target.url != null && target.url.startsWith(\"http://en.wikipedia.org/wiki/\")){\n\t\t\t\t\tExtractedEntity entity = new AlchemyAnnotator().new ExtractedEntity();\n\t\t\t\t\tentity.name = target.title;\n\t\t\t\t\tentity.type = target.type.name();\n\t\t\t\t\tentity.uri = target.url.replace(\"http://en.wikipedia.org/wiki/\", \"http://dbpedia.org/resource/\");\n\t\t\t\t\tentity.score = new Float(link.confidence).doubleValue();\n\t\t\t\t\tentity.text = link.anchor;\n\t\t\t\t\textractedConcepts.add(entity);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn extractedConcepts;\n\t}", "public List<Stem> stem(String word) {\n return stem(word.toCharArray(), word.length());\n }", "@RequestMapping(path = \"/lemmieYada\", method = RequestMethod.GET)\n public ResponseEntity<ArrayList<String>> letMeYada(@RequestParam (value = \"url\", required = false) String url) throws IOException {\n\n ArrayList<String> scrapedSite = soupThatSite(url);\n\n return new ResponseEntity<>(scrapedSite, HttpStatus.OK);\n }", "List<String> tokenize2(String doc) {\n String stemmed = StanfordLemmatizer.stemText(doc);\n List<String> res = new ArrayList<String>();\n\n for (String s : stemmed.split(\"[\\\\p{Punct}\\\\s]+\"))\n res.add(s);\n return res;\n }", "public String Stem( String word )\n {\n // check if we already know the word\n String stemmedword = AllWords.get(word);\n if ( stemmedword != null )\n return stemmedword; // return it if we already know it\n\n // don't check words with digits in them\n // if ( containsNumbers (word) == true )\n // stemmedword = null;\n // else\t// unknown word: try to stem it\n stemmedword = StemWordWithWordNet (word);\n\n if ( stemmedword != null )\n {\n // word was recognized and stemmed with wordnet:\n // add it to hashmap and return the stemmed word\n AllWords.put( word, stemmedword );\n return stemmedword;\n }\n // word could not be stemmed by wordnet,\n // thus it is no correct english word\n // just add it to the list of known words so\n // we won't have to look it up again\n AllWords.put( word, word );\n return word;\n }", "public static void fetchWords() {\n wordList = new ArrayList<String>();\n try {\n //problems with reading into method\n WordFetcher.readInto(wordList); \n } catch(Exception e) {\n System.out.println(e);\n }\n }", "private String getStemming(String line) throws IOException {\n\t\treturn line;\n\t\t// return Stemmer.processTweets(line);\n\t}", "private static String analyzeTerm(String term) {\n String ret = term.toLowerCase();\n if (stopWords.contains(ret) || ret.isEmpty())\n return \"\";\n return stemmer.stem(ret);\n }", "static ArrayList<String> split_words(String s){\n ArrayList<String> words = new ArrayList<>();\n\n Pattern p = Pattern.compile(\"\\\\w+\");\n Matcher match = p.matcher(s);\n while (match.find()) {\n words.add(match.group());\n }\n return words;\n }", "private String processWord(String word){\r\n\t\tString lword = word.toLowerCase();\r\n\t\tfor (int i = 0;i<word.length();++i){\r\n\t\t\tstemmer.add(lword.charAt(i));\r\n\t\t}\r\n\t\tstemmer.stem();\r\n\t\treturn stemmer.toString();\r\n\t}", "List<String> tokenize0(String doc) {\r\n List<String> res = new ArrayList<String>();\r\n\r\n for (String s : doc.split(\"\\\\s+\")) {\r\n // implement stemming algorithm if ToStem == true\r\n if (ToStem == true) {\r\n Stemmer st = new Stemmer();\r\n st.add(s.toCharArray(), s.length());\r\n st.stem();\r\n s = st.toString();\r\n }\r\n res.add(s);\r\n }\r\n return res;\r\n }", "public static String preprocessStemAndTokenize(String data) {\n\n\t\tSet<String> transformedSet = new HashSet<String>(); //Set will make sure only unique terms are kept\n\t\tStringBuilder strBuilder = new StringBuilder();\n\t\tTokenizer analyzer = new Tokenizer(Version.LUCENE_30);\n\t\tTokenStream tokenStream = analyzer.tokenStream(\"\", new StringReader(data));\n\t\tTermAttribute termAttribute;\n\t\tString term;\n\t\t//System.out.println(\"The value of data in tokenizeAndStem: \"+ data);\n\t\ttry {\n\t\t\twhile (tokenStream.incrementToken()) {\n\t\t\t\ttermAttribute = tokenStream.getAttribute(TermAttribute.class);\n\t\t\t\tterm = termAttribute.term(); \n\t\t\t\tif (stopwords.contains(term)){ //ignore stopwords\n\t\t\t\t\t//System.out.println(\"Contains stopword: \"+ term);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (digitPattern.matcher(term).find()) //ignore digits\n\t\t\t\t\tcontinue;\n\t\t\t\tif(term.length() <= 1) //ignore 1 letter words\n\t\t\t\t\tcontinue;\n\t\t\t\t\n\t\t\t\tif (!digitPattern.matcher(term).find()){ //ignore digits\n\t\t\t\t\tstemmer.setCurrent(term);\n\t\t\t\t\tstemmer.stem();\n\t\t\t\t\ttransformedSet.add(stemmer.getCurrent());\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t//System.out.println(\"transormed set size in tokenizeAndStem: \"+ transformedSet.size());\n\t\tfor(Object token: transformedSet.toArray()){\n\t\t\tstrBuilder.append(token).append(\" \");\n\t\t}\n\t\t//System.out.println(\"String returned in tokenizeAndStem:\"+ strBuilder.toString());\n\t\treturn strBuilder.toString();\n\t}", "public ArrayList<String> processText(String text)\r\n\t{\r\n\t\tArrayList<String> terms = new ArrayList<>();\r\n\r\n\t\t// P2\r\n\t\t// Tokenizing, normalizing, stopwords, stemming, etc.\r\n\t\tArrayList<String> tokens = tokenize(text);\r\n\t\tfor(String term: tokens){\r\n\t\t\tString norm = normalize(term);\r\n\t\t\tif(!isStopWord(norm)){\r\n\t\t\t\tString stem = stem(norm);\r\n\t\t\t\tterms.add(stem);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn terms;\r\n\t}", "public void parseWord(String line){\r\n String[] tokens = line.split(\"\\\\t|/|<|>|\\\\?|=%3C|%3E|=%3C|&=%3C|&|=| \");\r\n// for(String word: tokens){\r\n//\r\n// keys.add(word);\r\n// }\r\n int n = tokens.length-2;//to ignore the the word GET from the string.\r\n if(n>0){\r\n for(int i=1;i<n;i++){\r\n if(!tokens[i].equals(\"\")){\r\n this.keys.add(tokens[i]);\r\n }\r\n\r\n }\r\n }\r\n\r\n }", "public static void getSynonyms(ArrayList<String> keywords) {\n final String endpoint = \"http://www.dictionaryapi.com/api/v1/references/collegiate/xml/\";\n final String key = \"79b70eee-858c-486a-b155-a44db036bfe0\";\n try {\n for (String keyword : keywords) {\n String url = endpoint + keyword + \"?key=\" + key;\n System.out.print(\"url--\" + url);\n URL obj = new URL(url);\n HttpURLConnection con = (HttpURLConnection) obj.openConnection();\n con.setRequestProperty(\"User-Agent\", USER_AGENT);\n BufferedReader in = new BufferedReader(\n new InputStreamReader(con.getInputStream()));\n String inputLine;\n StringBuffer response = new StringBuffer();\n\n while ((inputLine = in.readLine()) != null) {\n response.append(inputLine);\n }\n in.close();\n\n //print result\n System.out.println(response.toString());\n\n DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\n DocumentBuilder builder;\n InputSource is;\n try {\n builder = factory.newDocumentBuilder();\n is = new InputSource(new StringReader(response.toString()));\n Document doc = builder.parse(is);\n NodeList list = doc.getElementsByTagName(\"syn\");\n System.out.println(\"synonyms\" + list.item(0).getTextContent());\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n }\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n }", "default String getStem() {\n return meta(\"nlpcraft:nlp:stem\");\n }", "public void indexing(String seedPage) {\n webCrawler wbc = new webCrawler();\n webPage wbp = new webPage();\n urlList = wbc.crawl(seedPage);\n for(int i = 0; i < urlList.size(); i++) {\n String url = urlList.get(i);\n try {\n Document doc = wbp.getContent(url);\n finalWords = wbp.getAllWords(url);\n } catch(Exception e) {\n e.printStackTrace();\n }\n }\n }", "public static ArrayList<String> getWords(String input) {\r\n ArrayList<String> w = new ArrayList<String>();\r\n input = input.toLowerCase();\r\n String[] words = input.split(\"\\\\s+\");\r\n for (int i = 0; i < words.length; i++) {\r\n words[i] = words[i].replaceAll(\"[^\\\\w]\", \"\");\r\n }\r\n for(String elem: words) {\r\n w.add(elem);\r\n }\r\n return w;\r\n }", "public void add(String word, String url) {\n \n // don't need to add this word if it's a stop word\n for (String stopWord : Settings.getStopWords()) {\n if (word.equalsIgnoreCase(stopWord)) return;\n }\n \n // don't need to add this word if it's already in here\n StringNode check = locate(word);\n if (check != null) {\n check.getPagesContainingWord().add(url);\n return;\n }\n \n // not a stop word, not present--need to add it\n StringNode newNode = new StringNode(word, new URLLinkedList());\n newNode.getPagesContainingWord().add(url);\n if (first == null) { // if first is null, there's nothing in the list\n first = newNode; // set first to this new node\n newNode.getPagesContainingWord().add(url);\n }\n else { // first isn't null, so we want to find the correct place to put this new node\n StringNode current = first;\n // this barebones linked list is very inconvenient, so we have to make a special \n // check for the first item in the list.\n if (word.compareTo(current.getWord()) < 0) { // the word in the new node goes before the word in the first node\n first = newNode; // now the new node is the first one\n newNode.setNext(current); // and its next is the old first one\n }\n else if (!current.hasNext()) { // no next node, so this word goes after current\n current.setNext(newNode);\n }\n else { // new node doesn't go before first, so check the rest of the list\n boolean newNodePlaced = false;\n StringNode previous;\n while (current.hasNext() && !newNodePlaced) { \n previous = current;\n current = current.getNext(); // grab next node\n if (word.compareTo(current.getWord()) < 0) { // new word goes before this one\n// StringNode oldNext = current.getNext();\n// current.setNext(newNode);\n// newNode.setNext(oldNext);\n// newNodePlaced = true;\n previous.setNext(newNode);\n newNode.setNext(current);\n newNodePlaced = true;\n }\n }\n if (!newNodePlaced) { // if we're here and haven't yet placed the node, it goes at the end\n current.setNext(newNode);\n }\n }\n }\n size++;\n }", "public static void searchWord(String URL, String wordToSearch){\n \tString curr_url = \"\";\n while(pagesVisited.size() < MAX_PAGES_TO_SEARCH){\n \t\tSpiderLeg leg = new SpiderLeg();\n\n \t\tif(pagesToVisit.isEmpty()){\n \t\t\tcurr_url = URL;\n \t\t\tpagesVisited.add(URL);\n \t\t}\n \t\telse{\n \t\t\tSystem.out.println(\"No such word found!!!\");\n \t\t}\n\n \t\tleg.crawl(curr_url);\n\n \t\tboolean success = leg.searchForWord(wordToSearch);\n\n \t\t//If we successfully find the word, print out ifo\n \t\tif(success){\n \t\t\tSystem.out.println(String.format(\"**Success** Word %s found at %s\", wordToSearch, curr_url));\n \t\t\tbreak;\n \t\t}\n\n \t\tpagesToVisit.addAll(leg.getLinks());\n \t}\n\n \tSystem.out.println(String.format(\"**Done** visiting %s\", curr_url));\n }", "public String getKeyword(String word) {\n\t\t/** COMPLETE THIS METHOD **/\n\t\t//strip trailing punctuation\n\t\tint n = 1;\n\t\tString output = \"\";\n\t\tword = word.toLowerCase();\n\t\tint j = 0;\n\t\twhile(j<word.length())\n\t\t{\n\t\t\tif(Character.isLetter(word.charAt(j)))\n\t\t\t{\n\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//return null;\n\t\t\t}\n\t\t\tj++;\n\t\t}\n\t\t\n\t\twhile(n<word.length())\n\t\t{\n\t\t\t\n\t\t\tif( word.charAt(word.length()-n) == '.' ||\n\t\t\t\t\tword.charAt(word.length()-n) == ',' ||\n\t\t\t\t\tword.charAt(word.length()-n) == '?' || \n\t\t\t\t\tword.charAt(word.length()-n) == ':' ||\n\t\t\t\t\tword.charAt(word.length()-n) == ';' ||\n\t\t\t\t\tword.charAt(word.length()-n) == '!' )\n\t\t\t{\n\t\t\t\toutput = word.substring(0, word.length()-n);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tn++;\n\t\t}\n\t\tif( !(word.charAt(word.length()-1) == '.' ||\n\t\t\t\tword.charAt(word.length()-1) == ',' ||\n\t\t\t\tword.charAt(word.length()-1) == '?' || \n\t\t\t\tword.charAt(word.length()-1) == ':' ||\n\t\t\t\tword.charAt(word.length()-1) == ';' ||\n\t\t\t\tword.charAt(word.length()-1) == '!' )\n\t\t\t\t)\n\t\t{\n\t\t\toutput = word.substring(0, word.length());\n\t\t}\n\t\t// check if there are only alphanumeric characters\n\t\t\n\t\tArrayList<String> items = new ArrayList<>();\n\t\t\n\t\t\n\t try {\n\t \t\n\t Scanner scanner = new Scanner(new File(\"noisewords.txt\"));\n\t while (scanner.hasNextLine()) {\n\t String line = scanner.nextLine();\n\t items.add(line);\n\t \n\t }\n\t scanner.close();\n\t } catch (FileNotFoundException e) {\n\t e.printStackTrace();\n\t }\n\t int i = 0;\n\t boolean ans = false;\n\t while(i<items.size()) {\n\t\t if(output.equals(items.get(i))) \n\t\t {\n\t\t \tans = true;\n\t\t \tbreak;\n\t\t }\n\t\t else\n\t\t {\n\t\t \t ans = false;\n\t\t }\n\t\t i++;\n\t }\n\t //System.out.println(ans);\n\t if(ans == true)\n\t {\n\t \t return null;\n\t }\n\t /* int a = 0;\n\t\twhile(a<items.size())\n\t\t{\n\t\t\tSystem.out.println(items.get(a));\n\t\t\ta++;\n\t\t}*/\n\t\t// following line is a placeholder to make the program compile\n\t\t// you should modify it as needed when you write your code\n\t\tif(output != null)\n\t\t{\n\t\t\treturn output;\n\t\t}\n\t\t\n\t\treturn null;\n\t}", "public static String preprocessStemAndTokenizeReturnDistinctTokens(String data) {\n\t\t//System.out.println(\"Preprocess data, remove stop words, stem, tokenize ..\");\n\t\tSet<String> transformedSet = new LinkedHashSet<String>();\n\t\tList<String> stemmedList = new ArrayList<String>();\n\n\t\tTokenizer analyzer = new Tokenizer(Version.LUCENE_30);\n\t\tTokenStream tokenStream = analyzer.tokenStream(\"\", new StringReader(data));\n\t\tTermAttribute termAttribute;\n\t\tString term;\n\t\ttry {\n\t\t\twhile (tokenStream.incrementToken()) {\n\t\t\t\ttermAttribute = tokenStream.getAttribute(TermAttribute.class);\n\t\t\t\tterm = termAttribute.term();\n\t\t\t\tif (digitPattern.matcher(term).find()) //ignore digits\n\t\t\t\t\tcontinue;\n\t\t\t\tif (stopwords.contains(term)) //ignore stopwords\n\t\t\t\t\tcontinue;\n\t\t\t\tif (term.length() <= 1) //ignore single letter words\n\t\t\t\t\tcontinue;\n\t\t\t\tstemmer.setCurrent(term);\n\t\t\t\tstemmer.stem();\n\t\t\t\tstemmedList.add(stemmer.getCurrent());\n\t\t\t}\n\t\t\ttransformedSet.addAll(stemmedList);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tstemmedList.clear();\n\t\tstemmedList = null;\n\t\t\n\t\treturn StringUtils.join(transformedSet.toArray(), \" \");\n\t}", "public static void invertedIndex(String URL){\n //if the url set already contains this url, it means this url has already been processed, so return\n if(urlSet.contains(URL)){\n return;\n }\n else{\n //first add this unprocessed url to url list\n urlSet.add(URL);\n try{\n //connect this url and get its content\n URL url = new URL(URL);\n URLConnection urlCon = url.openConnection();\n BufferedReader in = new BufferedReader(new InputStreamReader(urlCon.getInputStream()));\n String urlString = \"\";\n String current;\n while((current = in.readLine()) != null)\n {\n urlString += current;\n }\n\n //by filtering the link label to get all the links in this page\n String[] urlList = urlString.split(\"<a href=\\\"\");\n\n //define regex expression to filter script label\n String scriptFilter=\"<script[^>]*?>[\\\\s\\\\S]*?<\\\\/script>\";\n\n //define regex expression to filter style label\n String styleFilter=\"<style[^>]*?>[\\\\s\\\\S]*?<\\\\/style>\";\n\n //define regex expression to filter html label\n String htmlFilter=\"<[^>]+>\";\n\n //filter all the useless labels\n Pattern scriptP=Pattern.compile(scriptFilter,Pattern.CASE_INSENSITIVE);\n Matcher scriptM=scriptP.matcher(urlString);\n urlString=scriptM.replaceAll(\"\");\n\n Pattern styleP=Pattern.compile(styleFilter,Pattern.CASE_INSENSITIVE);\n Matcher styleM=styleP.matcher(urlString);\n urlString=styleM.replaceAll(\"\");\n\n Pattern htmlP=Pattern.compile(htmlFilter,Pattern.CASE_INSENSITIVE);\n Matcher htmlM=htmlP.matcher(urlString);\n urlString=htmlM.replaceAll(\"\");\n\n //transfer content to a word array\n String[] words = urlString.split(\" \");\n for(int i = 0; i < words.length; i++){\n //System.out.println(words[i]);\n //if the hashmap doesn't contain this word, so put this word and its url pair into the hashmap\n if(!index.containsKey(words[i])){\n HashSet<String> str = new HashSet<String>();\n str.add(URL);\n index.put(words[i],str);\n }\n //if the hashmap already contains this word, update its record\n else{\n HashSet<String> str = index.get(words[i]);\n str.add(URL);\n index.put(words[i],str);\n }\n }\n //System.out.println(urlString);\n\n for(int i = 1; i < urlList.length;i++){\n //get each url in this page and transfer it to valid url, after that process each url\n int endpos = urlList[i].indexOf(\"\\\"\");\n String Url = getValidUrl(urlList[i].substring(0, endpos));\n //System.out.println(Url);\n if(Url != null){\n invertedIndex(Url);\n }\n }\n }catch(Exception e){\n System.out.println(\"can't process url : \" + URL);\n }\n }\n }", "public ArrayList<String> search(String url) {\n Pattern msnPattern = Pattern.compile(\".*msn.com.*\");\n Pattern foolPattern = Pattern.compile(\".*fool.com.*\");\n Matcher foolMatcher = foolPattern.matcher(url);\n Matcher msnMatcher = msnPattern.matcher(url);\n\n ArrayList<String> stockArticles = new ArrayList<String>();\n if (foolMatcher.matches()) {\n Connection connection = Jsoup.connect(\"https://www.fool.com/market-movers/\");\n try {\n Document htmlDocument = connection.get();\n Elements linksOnPage = htmlDocument.select(\"h4\");\n for (Element link : linksOnPage) {\n stockArticles.add(link.text());\n }\n }\n catch (IOException e) {\n System.out.println(e);\n }\n } else if (msnMatcher.matches()) {\n Connection connection2 = Jsoup.connect(\"http://www.msn.com/en-us/money/investing\");\n try {\n Document htmlDocument2 = connection2.get();\n Elements linksOnPage2 = htmlDocument2.select(\"h3\");\n for (Element link : linksOnPage2) {\n stockArticles.add(link.text());\n }\n }\n catch (IOException e) {\n System.out.println(e);\n }\n } else {\n Connection connection3 = Jsoup.connect(\"https://www.nytimes.com/topic/organization/new-york-stock-exchange\");\n try {\n Document htmlDocument3 = connection3.get();\n Elements linksOnPage3 = htmlDocument3.select(\"h2\");\n for (Element link : linksOnPage3) {\n stockArticles.add(link.text());\n }\n }\n catch (IOException e) {\n System.out.println(e);\n }\n }\n return stockArticles;\n }", "public void pullResources(String domainURL){\n URLResource page = new URLResource(\"https://www.dukelearntoprogram.com//course2/data/manylinks.html\");\n \n int startIndex;\n int endIndex;\n // loop through pages\n for (String s : page.lines()){\n \n //System.out.println(s);\n int pose = s.indexOf(domainURL);\n \n // if the url is in the line\n if (-1 != pose) {\n \n startIndex = s.lastIndexOf(\"\\\"\",pose); // find actual start\n endIndex = s.indexOf(\"\\\"\",pose+1); // find end\n \n System.out.println( s.substring(startIndex, endIndex));\n \n \n \n }\n \n \n }\n}", "private static void splitWord() {\n\t\tint i = 1;\r\n\t\tfor(String doc : DocsTest) {\r\n\t\t\tArrayList<String> wordAll = new ArrayList<String>();\r\n\t\t\tfor (String word : doc.split(\"[,.() ; % : / \\t -]\")) {\r\n\t\t\t\tword = word.toLowerCase();\r\n\t\t\t\tif(word.length()>1 && !mathMethod.isNumeric(word)) {\r\n\t\t\t\t\twordAll.add(word);\r\n\t\t\t\t\tif(!wordList.contains(word)) {\r\n\t\t\t\t\t\twordList.add(word);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\twordAll.removeAll(stopword);\r\n\t\t\tDoclist.put(i, wordAll);\r\n\t\t\ti++;\r\n\t\t}\r\n\t\twordList.removeAll(stopword);\r\n\t}", "public Iterator<String> words();", "public Word(String s) throws FileNotFoundException, IOException, ParseException {\r\n\t\tword = s;\r\n\t\tjsonOsFile = downloadJSON(\"https://en.wikipedia.org/w/api.php?action=opensearch&format=json&search=\");\r\n\t\tjsonOsFile.deleteOnExit();\r\n\t\tjsonPageFile = downloadJSON(\"https://en.wikipedia.org/w/api.php?action=query&prop=revisions&rvprop=content&format=json&titles=\");\r\n\t\tjsonPageFile.deleteOnExit();\r\n\t\tjsonOsArray = (JSONArray)(new JSONParser().parse(new FileReader(\"JSON/\" + this.word + \"_opensearch.json\")));\r\n\t\tjsonPageObject = (JSONObject) (new JSONParser().parse(new FileReader(\"JSON/\" + this.word + \"_wikipage.json\")));\r\n\t\t\r\n\t\t//At this point, we have downloaded and saved our OpenSearch.json and Wikipage.json accordingly. \r\n\t\t\r\n\t\tjparse = new JParser();\r\n\t\trelPageStrings = jparse.getRelatedPages(jsonOsArray);\r\n\t\trelPageDesc = jparse.getRelatedPageDesc(jsonOsArray);\r\n\t\t\r\n\t\t//Retrieves all of the words on the wiki page. Still requires parsing into readable data. Pages are denoted by [[ ]] surrounding them.\r\n\t\twikipageArray = jparse.getPageContents(jsonPageObject);\r\n\t\t\r\n\t\tpageKeywords = jparse.getKeysOnPage(wikipageArray);\r\n\t\t\r\n\t}", "public Double[] SentiwordsMatch(String tweets) throws IOException\r\n {\r\n String[] ar=new String[100];\r\n \r\n ar=tweets.split(\" \");\r\n \r\n /* for(String splited_text:ar)\r\n System.out.println(splited_text);*/\r\n \r\n Double price[]=PriceCalculator(ar);\r\n \r\n \r\n return price;\r\n \r\n }", "public ArrayList<String> getResults(String query) {\r\n\t\t// TODO: Add code here\r\n\t\tHashMap<String,Double> map=new HashMap<>();\r\n\t\tArrayList<String> urls=wordIndex.get(query);\r\n\t\tif(urls==null){\r\n\t\t\treturn new ArrayList<>();\r\n\t\t}\r\n\t\tfor(String url:urls){\r\n\t\t\tmap.put(url,internet.getPageRank(url));\r\n\t\t}\r\n\t\treturn Sorting.fastSort(map);\r\n\t}", "@Override\r\n public String stem(String word) {\r\n List<String> lemmas = new LinkedList<String>();\r\n // Create an empty Annotation just with the given text\r\n Annotation document = new Annotation(word);\r\n // run all Annotators on this text\r\n this.pipeline.annotate(document);\r\n // Iterate over all of the sentences found\r\n List<CoreMap> sentences = document.get(CoreAnnotations.SentencesAnnotation.class);\r\n for (CoreMap sentence : sentences) {\r\n // Iterate over all tokens in a sentence\r\n for (CoreLabel token : sentence.get(CoreAnnotations.TokensAnnotation.class)) {\r\n // Retrieve and add the lemma for each word into the\r\n // list of lemmas\r\n lemmas.add(token.get(CoreAnnotations.LemmaAnnotation.class));\r\n }\r\n }\r\n return lemmas.get(0);\r\n\r\n }", "public static ArrayList<String> getTerms(String comment){\n\n\t\tString[] terms = comment.split(\"[^a-zA-Z]+\");\n\t\t//if(terms.length == 0) System.out.println(\"error: \" + comment);\n\t\tArrayList<String> termsarray = new ArrayList<String>();\n\t\tfor(int i=0;i<terms.length;i++){\n\t\t\t\n\t\t\tString iterm = terms[i].toLowerCase();\n\t\t\tboolean isStopWord = false;\n\t\t\tfor(String s : stopWord){\n\t\t\t\tif(iterm.equals(s)){\n\t\t\t\t\tisStopWord = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(isStopWord == true)\n\t\t\t\tcontinue;\n\t\t\t\n\t\t\tStemmer stemmer = new Stemmer();\n\t\t\tstemmer.add(iterm.toCharArray(), iterm.length());\n\t\t\tstemmer.stem();\n\t\t\titerm = stemmer.toString();\n\t\t\t\n\t\t\t//System.out.println(iterm);\n\t\t\tif(iterm.length() >=2 && !termsarray.contains(iterm))termsarray.add(iterm);\n\t\t}\n\t\n\t\treturn termsarray;\n\t}", "public static void readInto(ArrayList<String> list) throws Exception {\n URL wordsURL = new URL(url);\n BufferedReader in = new BufferedReader(\n new InputStreamReader(wordsURL.openStream()));\n String word;\n while ((word = in.readLine()) != null){\n list.add(word);\n }\n in.close();\n }", "public static List<TokenCanonic> stemWords(String wordList) {\n List<TokenCanonic> result = new ArrayList<TokenCanonic>(); \n String [] tokens = wordList.split(\"\\\\s+\");\n for (String t : tokens) {\n if (t.trim().equals(\"\")) continue;\n TokenCanonic tc = new TokenCanonic(); \n tc.token = t; tc.canonic = stemWord(t);\n result.add(tc);\n }\n return result;\n }", "public static void Stemmingmethod()throws Exception\n{\n char[] w = new char[501];\n Stemmer s = new Stemmer();\n String prcessedtxt=\"\";\n ArrayList<String> finalsen= new ArrayList();\n BufferedWriter writer = new BufferedWriter(new FileWriter(\"fullyprocessed.txt\"));\n\n String u=null;\n \n {\n FileInputStream in = new FileInputStream(\"stopwordsremoved.txt\");\n\n while(true)\n\n { int ch = in.read();\n if (Character.isLetter((char) ch))\n {\n int j = 0;\n while(true)\n { ch = Character.toLowerCase((char) ch);\n w[j] = (char) ch;\n if (j < 500) j++;\n ch = in.read();\n if (!Character.isLetter((char) ch))\n {\n \n s.add(w, j); \n\n s.stem();\n { \n\n u = s.toString();\n finalsen.add(u);\n /* to test getResultBuffer(), getResultLength() : */\n /* u = new String(s.getResultBuffer(), 0, s.getResultLength()); */\n\n System.out.print(u);\n }\n break;\n }\n }\n }\n if (ch < 0) break;\n System.out.print((char)ch);\n finalsen.add(\"\"+(char)ch);\n\n\n }\n }\n \n \n \n for(String word:finalsen){\n prcessedtxt=prcessedtxt+\"\"+ word;\n }\n writer.write(prcessedtxt+\"\\n\"); \n prcessedtxt=\"\";\n finalsen.clear();\n writer.close();\n\n\n \n}", "public static void main(String[] args) throws Exception {\n\tPhishTankBlackList.main(args);\n\tstr=PhishTankBlackList.url();\n\tString mstr=str;\n\tmstr = mstr.replaceAll(\"http://www.\",\"\");\n\tmstr = mstr.replaceAll(\"http://\",\"\");\n\tmstr = mstr.replaceAll(\"https://www.\", \"\");\n\tmstr = mstr.split(\".com\")[0];\n\tmstr = mstr.split(\".in\")[0];\n\tmstr = mstr.split(\".net\")[0];\n\tmstr = mstr.split(\".org\")[0];\n\tmstr = mstr.split(\".uk\")[0];\n\tmstr = mstr.split(\".eu\")[0];\n\tmstr = mstr.split(\".ac.in\")[0];\n\tSystem.out.println(mstr);\n\tint fullLength = mstr.length();\n\tString modifiedString = mstr.replaceAll(\"\\\\p{Punct}\",\"\");\n\tint modStringLength = modifiedString.length();\n\tint numberOfSpecialChars = fullLength - modStringLength;\n\t//number of tokens in domain\n\tSystem.out.println(\"The number of tokens in the domain are\");\n\t\n\tSystem.out.println(numberOfSpecialChars);\n\tSystem.out.println(\"\");\n\tif(numberOfSpecialChars>3)\n\tSystem.out.println(\"Probably Phishing site\");\n\t\n\t\n\t\n\t\n\t//number of dots in domain\n\t\n int ctr=0;\n\tString newstr=mstr;\n\t\t\tfor(int i=0;i<newstr.length();i++)\n\t\t\t{ if(newstr.charAt(i)=='.')\n\t\t\t {ctr = ctr+1;}}\n\t\t\tSystem.out.println(\"number of dots in the domain of the URL\");\n\t\t\tSystem.out.println(ctr);\n\t\t\tif(ctr>=4)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Probably Phishing\");\n\t\t\t}\n\t\t\t/*ctr=0;\nmstr=mstr.replaceAll(\".\", \"\");\n\t\t String sb=mstr;\n\t\t \n\t\t sb.toCharArray();\n\t\t for(int i=0;i<sb.length();i++)\n\t\t {\n\t\t \n\t\t ctr=ctr+1;\n\t\t }\n\t\t System.out.println(\"The digits present in the domain\");\n\t\t System.out.println(ctr);\n\t\t \n\t\t \n\t\t if(ctr>4)\n\t\t {\n\t\t \tSystem.out.println(\"Probably Phishing\");\n\t\t }}\n\t\t \n\n\n\t\t\t */\n\t\t\t}", "SList oddWords();", "public void makeWord(String inputText,String pageId,createIndex createindex,String contentType)\n {\n int length,i;\n char c;\n boolean linkFound=false;\n int count1,count2,count3,count4,count5,count6,count7,count8,count9;\n\n\n\n StringBuilder word=new StringBuilder();\n // String finalWord=null,stemmedWord=null;\n docId=Integer.parseInt(pageId.trim());\n\n ci=createindex;\n // Stemmer st=new Stemmer();\n //createIndex createindex=new createIndex();\n\n length=inputText.length();\n\n for(i=0;i<length;i++)\n {\n c=inputText.charAt(i);\n if(c<123 && c>96)\n {\n word.append(c);\n }\n\n else if(c=='{')\n {\n if ( i+9 < length && inputText.substring(i+1,i+9).equals(\"{infobox\") )\n {\n\n StringBuilder infoboxString = new StringBuilder();\n\n count1 = 0;\n for ( ; i < length ; i++ ) {\n\n c = inputText.charAt(i);\n infoboxString.append(c);\n if ( c == '{') {\n count1++;\n }\n else if ( c == '}') {\n count1--;\n }\n if ( count1 == 0 || (c == '=' && i+1 < length && inputText.charAt(i+1) == '=')) {\n if ( c == '=' ) {infoboxString.deleteCharAt(infoboxString.length()-1);}\n break;\n }\n }\n\n processInfobox(infoboxString);\n\n }\n\n else if ( i+8 < length && inputText.substring(i+1,i+8).equals(\"{geobox\") )\n {\n\n StringBuilder geoboxString = new StringBuilder();\n\n count2 = 0;\n for ( ; i < length ; i++ ) {\n\n c = inputText.charAt(i);\n geoboxString.append(c);\n if ( c == '{') {\n count2++;\n }\n else if ( c == '}') {\n count2--;\n }\n if ( count2 == 0 || (c == '=' && i+1 < length && inputText.charAt(i+1) == '=')) {\n if ( c == '=' ) {geoboxString.deleteCharAt(geoboxString.length()-1);}\n break;\n }\n }\n\n // processGeobox(geoboxString);\n }\n\n else if ( i+6 < length && inputText.substring(i+1,i+6).equals(\"{cite\") )\n {\n\n /*\n * Citations are to be removed.\n */\n\n count3 = 0;\n for ( ; i < length ; i++ ) {\n\n c = inputText.charAt(i);\n if ( c == '{') {\n count3++;\n }\n else if ( c == '}') {\n count3--;\n }\n if ( count3 == 0 || (c == '=' && i+1 < length && inputText.charAt(i+1) == '=')) {\n break;\n }\n }\n\n }\n\n else if ( i+4 < length && inputText.substring(i+1,i+4).equals(\"{gr\") )\n {\n\n /*\n * {{GR .. to be removed\n */\n\n count4 = 0;\n for ( ; i < length ; i++ ) {\n\n c = inputText.charAt(i);\n if ( c == '{') {\n count4++;\n }\n else if ( c == '}') {\n count4--;\n }\n if ( count4 == 0 || (c == '=' && i+1 < length && inputText.charAt(i+1) == '=')) {\n break;\n }\n }\n\n }\n else if ( i+7 < length && inputText.substring(i+1,i+7).equals(\"{coord\") )\n {\n\n /**\n * Coords to be removed\n */\n\n count5 = 0;\n for ( ; i < length ; i++ ) {\n\n c = inputText.charAt(i);\n\n if ( c == '{') {\n count5++;\n }\n else if ( c == '}') {\n count5--;\n }\n if ( count5 == 0 || (c == '=' && i+1 < length && inputText.charAt(i+1) == '=')) {\n break;\n }\n }\n\n }\n\n //System.out.println(\"process infobox\");\n }\n else if(c=='[')\n {\n // System.out.println(\"process square brace\");\n\n if ( i+11 < length && inputText.substring(i+1,i+11).equalsIgnoreCase(\"[category:\"))\n {\n\n StringBuilder categoryString = new StringBuilder();\n\n count6 = 0;\n for ( ; i < length ; i++ ) {\n\n c = inputText.charAt(i);\n categoryString.append(c);\n if ( c == '[') {\n count6++;\n }\n else if ( c == ']') {\n count6--;\n }\n if ( count6 == 0 || (c == '=' && i+1 < length && inputText.charAt(i+1) == '=')) {\n if ( c == '=' ) {categoryString.deleteCharAt(categoryString.length()-1);}\n break;\n }\n }\n\n // System.out.println(\"category string=\"+categoryString.toString());\n processCategories(categoryString);\n\n }\n else if ( i+8 < length && inputText.substring(i+1,i+8).equalsIgnoreCase(\"[image:\") ) {\n\n /**\n * Images to be removed\n */\n\n count7 = 0;\n for ( ; i < length ; i++ ) {\n\n c = inputText.charAt(i);\n if ( c == '[') {\n count7++;\n }\n else if ( c == ']') {\n count7--;\n }\n if ( count7 == 0 || (c == '=' && i+1 < length && inputText.charAt(i+1) == '=')) {\n break;\n }\n }\n\n }\n else if ( i+7 < length && inputText.substring(i+1,i+7).equalsIgnoreCase(\"[file:\") ) {\n\n /**\n * File to be removed\n */\n\n count8 = 0;\n for ( ; i < length ; i++ ) {\n\n c = inputText.charAt(i);\n\n if ( c == '[') {\n count8++;\n }\n else if ( c == ']') {\n count8--;\n }\n if ( count8 == 0 || (c == '=' && i+1 < length && inputText.charAt(i+1) == '=')) {\n break;\n }\n }\n\n }\n\n }\n else if(c=='<')\n {\n //System.out.println(\"Process < >\");\n\n if ( i+4 < length && inputText.substring(i+1,i+4).equalsIgnoreCase(\"!--\") ) {\n\n /**\n * Comments to be removed\n */\n\n int locationClose = inputText.indexOf(\"-->\" , i+1);\n if ( locationClose == -1 || locationClose+2 > length ) {\n i = length-1;\n }\n else {\n i = locationClose+2;\n }\n\n }\n else if ( i+5 < length && inputText.substring(i+1,i+5).equalsIgnoreCase(\"ref>\") ) {\n\n /**\n * References to be removed\n */\n int locationClose = inputText.indexOf(\"</ref>\" , i+1);\n if ( locationClose == -1 || locationClose+5 > length ) {\n i = length-1;\n }\n else {\n i = locationClose+5;\n }\n\n }\n else if ( i+8 < length && inputText.substring(i+1,i+8).equalsIgnoreCase(\"gallery\") ) {\n\n /**\n * Gallery to be removed\n */\n int locationClose = inputText.indexOf(\"</gallery>\" , i+1);\n if ( locationClose == -1 || locationClose+9 > length) {\n i = length-1;\n }\n else {\n i = locationClose+9;\n }\n }\n\n }\n else if ( c == '=' && i+1 < length && inputText.charAt(i+1) == '=')\n {\n\n linkFound = false;\n i+=2;\n while ( i < length && ((c = inputText.charAt(i)) == ' ' || (c = inputText.charAt(i)) == '\\t') )\n {\n i++;\n }\n\n if ( i+14 < length && inputText.substring(i , i+14 ).equals(\"external links\") )\n {\n //System.out.println(\"External link found\");\n linkFound = true;\n i+= 14;\n }\n\n }\n else if ( c == '*' && linkFound == true )\n {\n\n //System.out.println(\"Link found\");\n count9 = 0;\n boolean spaceParsed = false;\n StringBuilder link = new StringBuilder();\n while ( count9 != 2 && i < length )\n {\n c = inputText.charAt(i);\n if ( c == '[' || c == ']' )\n {\n count9++;\n }\n if ( count9 == 1 && spaceParsed == true)\n {\n link.append(c);\n }\n else if ( count9 != 0 && spaceParsed == false && c == ' ')\n {\n spaceParsed = true;\n }\n i++;\n }\n\n StringBuilder linkWord = new StringBuilder();\n for ( int j = 0 ; j < link.length() ; j++ )\n {\n char currentCharTemp = link.charAt(j);\n if ( (int)currentCharTemp >= 'a' && (int)currentCharTemp <= 'z' )\n {\n linkWord.append(currentCharTemp);\n }\n else\n {\n\n // System.out.println(\"link : \" + linkWord.toString());\n processLink(linkWord);\n linkWord.setLength(0);\n }\n }\n if ( linkWord.length() > 1 )\n {\n //System.out.println(\"link : \" + linkWord.toString());\n processLink(linkWord);\n linkWord.setLength(0);\n }\n\n }\n else\n {\n if(word.length()>1)\n filterAndAddWord(word,contentType);\n\n word.setLength(0);\n }\n }\n\n\n if(word.length()>1)\n filterAndAddWord(word,contentType);\n\n word.setLength(0);\n /*\n if(word.length()>0)\n {\n finalWord=new String(word);\n if(!(checkStopword(finalWord)))\n {\n st.add(finalWord.toCharArray(),finalWord.length());\n stemmedWord=st.stem();\n\n createindex.addToTreeSet(stemmedWord,docId);\n\n }\n\n word.delete(0, word.length());\n } */\n\n }", "SList evenWords();", "public void wapTinyurl() {\n String url = \"http://m.nuomi.com/mianyang/deal/l5kkhcqr\";\r\n Pattern p = Pattern.compile(\"^http://\\\\w+\\\\.nuomi\\\\.com/\\\\w+/deal/(\\\\w+$)\");\r\n Matcher m = p.matcher(url);\r\n if (m.find()) {\r\n p(m.group(1));\r\n }\r\n }", "public List<String> stem(List<String> terms) {\r\n\t\tPaiceHuskStemmer stemmer = null;\r\n\t\ttry {\r\n\t\t\tstemmer = PaiceHuskStemmer.getInstance(SVMClassifier.class.getClassLoader().getResource(\"stemrules.txt\").openStream());\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tstemmer.setPreStrip(false);\r\n\t\tfor (int i = 0; i < terms.size(); i++) {\r\n\t\t\tString w = terms.get(i);\r\n\t\t\tterms.set(i, stemmer.stripAffixes(w));\r\n\t\t}\r\n\t\treturn terms;\r\n\t}", "@Override\n\tpublic String getStemming(String phrase) {\n\t\treturn null;\n\t}", "@Test\n\tpublic void testGetWords() throws MalformedURLException, IOException, BadLocationException {\n\t\t\n\t\t// Setup\n\t\tArticle a = new Article(new File(\"test/res/sample_article.html\").toURI().toURL());\n\t\ta.read();\n\t\t\n\t\t// Exercise\n\t\tList<String> words = a.getWords();\n\t\t\n\t\t// Verify\t\t\n\t\tAssert.assertNotNull(words);\n\t\tAssert.assertTrue(words.size() > 0);\n\t}", "java.lang.String getWord();", "private static List<Pair<String, Integer>> splitWords(String line) {\n // This is kinda silly: we read and parse the stop words file once for each chunk, but this is the way the book\n // does it, so better stay in line with that.\n Set<String> stopWords = Arrays.stream(readFile(\"../stop_words.txt\").split(\",\")).\n collect(Collectors.toCollection(HashSet::new));\n return Arrays.stream(line.replaceAll(\"[^a-zA-Z\\\\d\\\\s]\", \" \").toLowerCase().split(\" \")).\n filter(w -> w.length() >= 2 && !stopWords.contains(w)).\n map(w -> new Pair<>(w, 1)).\n collect(Collectors.toList());\n }", "private void getWords(String input) {\r\n\t\tSystem.out.print(\"Searching.\");\r\n\t\tSolution solution = null;\r\n\t\twhile ((solution = controller.getAnswer(input)) == null) {\r\n\t\t\ttry {\r\n\t\t\t\tThread.sleep(200);\r\n\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t// XXX don't know what to do here...\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\".\");\t// progress dots\r\n\t\t}\r\n\t\tSystem.out.println();\t\t// new line for progress dots\r\n\t\tresults.setSolution(solution);\r\n\t\tdisplayWords();\r\n\t}", "static String getResponseFromHttpUrl(URL url) throws IOException {\n HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();\n try {\n InputStream in = urlConnection.getInputStream();\n\n Scanner scanner = new Scanner(in);\n scanner.useDelimiter(\"\\\\A\");\n\n boolean hasInput = scanner.hasNext();\n String response = null;\n if (hasInput) {\n response = scanner.next();\n }\n scanner.close();\n return response;\n } finally {\n urlConnection.disconnect();\n }\n }", "public static List<String> validStems(List<String> words)\n\t{\n\t\tStemmer stemmer = new Stemmer();\n\t\tArrayList<String> goodWords = new ArrayList<String>();\n\t\tfor (String word : words)\n\t\t{\n\t\t\tString stem = stemmer.stem(word);\n\t\t\tif (dictUtils.dict.containsKey(stem))\n\t\t\t{\n\t\t\t\tgoodWords.add(stem);\n\t\t\t}\n\t\t}\n\t\treturn goodWords;\n\t}", "private static ArrayList<Result> bagOfWords(Query query, DataManager myVocab) {\n\t\tString queryname = query.getQuery();\n\t\t// split on space and punctuation\n\t\tString[] termList = queryname.split(\" \");\n\t\tArrayList<Result> bagResults = new ArrayList<Result>();\n\t\tfor (int i=0; i<termList.length; i++){\n\t\t\tQuery newQuery = new Query(termList[i], query.getLimit(), query.getType(), query.getTypeStrict(), query.properties()) ;\n\t\t\tArrayList<Result> tempResults = new ArrayList<Result>(findMatches(newQuery, myVocab));\n\t\t\tfor(int j=0; j<tempResults.size(); j++){\n\n\t\t\t\ttempResults.get(j).setMatch(false);\n\t\t\t\ttempResults.get(j).decreaseScore(termList.length);\n\t\t\t\tif(tempResults.get(j).getScore()>100){\n\t\t\t\t\ttempResults.get(j).setScore(99.0);\n\t\t\t\t}else if (tempResults.get(j).getScore()<1){\n\t\t\t\t\ttempResults.get(j).setScore(tempResults.get(j).getScore()*10);\n\t\t\t\t}\n\t\t\t}\n\t\t\tbagResults.addAll(tempResults);\n\t\t}\n\t\treturn bagResults;\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tif (args.length != 1) {\n\t\t\tthrow new IllegalArgumentException(\"Usage: java WordCount <URL>\");\n\t\t}\n\t\tString site = args[0];\n\t\t\n\t\t// If efficiency becomes important, a BufferedInputStream could be used in place of Jsoup.\n\t\t// This would prevent multiple passes over the text, but would introduce the challenge of\n\t\t// reading between HTML tags.\n\t\tString text;\n\t\ttry {\n\t\t\ttext = Jsoup.connect(site).get().text();\n\t\t} catch (IllegalArgumentException e) {\n\t\t\t// Attempt to connect with https:// protocol prepended\n\t\t\ttry {\n\t\t\t\tsite = \"https://\" + site;\n\t\t\t\ttext = Jsoup.connect(site).get().text();\n\t\t\t} catch (IllegalArgumentException a) {\n\t\t\t\tthrow new IllegalArgumentException(\"Page cannot be loaded. \"\n\t\t\t\t\t\t+ \"Usage: java WordCount <URL>\");\n\t\t\t} catch (IOException m) {\n\t\t\t\tthrow new IllegalArgumentException(\"Page cannot be loaded. \"\n\t\t\t\t\t\t+ \"Usage: java WordCount <URL>\"); \n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tthrow new IllegalArgumentException(\"Page cannot be loaded.\"\n\t\t\t\t\t+ \" Usage: java WordCount <URL>\");\n\t\t} \n\t\t\n\t\t// Split text into array using alphabetical (multiple languages) and \n\t\t// apostrophe characters\n\t\tString[] textArr = text.split(\"[^\\\\p{L}'’]+\");\n\t\tTree dictionary = new Tree();\n\t\tfor (int i = 0; i < textArr.length; i++) {\n\t\t\tdictionary.insert(textArr[i].toLowerCase());\n\t\t}\n\t\t\n\t\t// Build array using the dictionary. A more efficient solution would involve using a \n\t\t// sorted LinkedList of size 25, and only adding Nodes to the list if they are greater\n\t\t// than the current least Node, adding the new lowest value to the tail with \n\t\t// each insertion.\n\t\tNode[] arr = dictionary.toArray();\n\t\tArrays.sort(arr);\n\t\tfor (int i = 0; i < NUMBER_OF_WORDS; i++) {\n\t\t\tif (i < arr.length) {\n\t\t\t\tSystem.out.printf(\"%-12s%10d\\n\", arr[i].getWord(), arr[i].getCount());\n\t\t\t}\n\t\t}\n\t\t\n\t}", "private void exercise7() throws IOException {\n final Path resourcePath = retrieveResourcePath();\n List<String> result;\n try (BufferedReader reader = newBufferedReader(resourcePath)) {\n result = reader.lines()\n .flatMap(line -> of(line.split(WORD_REGEXP)))\n .distinct()\n .map(String::toLowerCase)\n .sorted(comparingInt(String::length))\n .collect(toList());\n }\n\n result.forEach(System.out::println);\n }", "public static ArrayList<String> getWordsInString(String s) {\r\n\t\t// Search words in text\r\n\t\tString[] split = s.replace('-', ' ').split(\" \");\r\n\t\tArrayList<String> words = new ArrayList<String>(split.length);\r\n\t\t// Remove punctuation\r\n\t\tfor(String str : split) {\r\n\t\t\tif(str.isEmpty()) continue;\r\n\t\t\tStringBuilder wordBuilder = new StringBuilder();\r\n\t\t\tfor(int j = 0; j < str.length(); j++) {\r\n\t\t\t\tchar c = str.charAt(j);\r\n\t\t\t\tif(c >= 'A' && c <= 'Z') c = (char) (c + 'a' - 'A');\r\n\t\t\t\tif((c >= 'a' && c <= 'z') || (c >= '0' && c <= '9')) {\r\n\t\t\t\t\twordBuilder.append(c);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\twords.add(wordBuilder.toString());\r\n\t\t}\r\n\t\treturn words;\r\n\t}", "public WordInfo searchWord(String word) {\n\t\tSystem.out.println(\"Dic:SearchWord: \"+word);\n\n\t\tDocument doc;\n\t\ttry {\n\t\t\tdoc = Jsoup.connect(\"https://dictionary.cambridge.org/dictionary/english-vietnamese/\" + word).get();\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\n\t\tElements elements = doc.select(\".dpos-h.di-head.normal-entry\");\n\t\tif (elements.isEmpty()) {\n\t\t\tSystem.out.println(\" not found\");\n\t\t\treturn null;\n\t\t}\n\n\t\tWordInfo wordInfo = new WordInfo(word);\n\n\t\t// Word\n\t\telements = doc.select(\".tw-bw.dhw.dpos-h_hw.di-title\");\n\n\t\tif (elements.size() == 0) {\n\t\t\tSystem.out.println(\" word not found in doc!\");\n\t\t\treturn null;\n\t\t}\n\n\t\twordInfo.setWordDictionary(elements.get(0).html());\n\n\t\t// Type\n\t\telements = doc.select(\".pos.dpos\");\n\n\t\tif(elements.size() > 0) {\n\t\t\twordInfo.setType(WordInfo.getTypeShort(elements.get(0).html()));\n//\t\t\tif (wordInfo.getTypeShort().equals(\"\"))\n//\t\t\t\tSystem.out.println(\" typemis: \"+wordInfo.getType());\n\t\t}\n\n\t\t// Pronoun\n\t\telements = doc.select(\".ipa.dipa\");\n\n\t\tif (elements.size() > 0)\n\t\t\twordInfo.setAPI(\"/\"+elements.get(0).html()+\"/\");\n\n\t\t// Trans\n\t\telements = doc.select(\".trans.dtrans\");\n\n\t\tif (elements.size() > 0)\n\t\t\twordInfo.setTrans(elements.get(0).html());\n\n\t\tSystem.out.println(\" found\");\n\t\treturn wordInfo;\n\t}", "public List<String> getContext(String keyword, String url_){\n\n\t\t\tPDDocument document = null;\n\t\t\tString pattern = \"((\\\\w+ ){1,3}|^)(\\\\W)*\" + keyword + \"(\\\\W)*(( \\\\w+){1,3}|$)\";\n\t\t\t// String result=\"\";\n\t\t\tList<String> result = new ArrayList<String>();\n\t\t\tPattern p = Pattern.compile(pattern);\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\t//System.out.println(\"------\"+nUrl);\n\t\t\t\tURL url = new URL(url_);\n\t\t\t\t// document=PDDocument.load(pdfFile);\n\t\t\t\tInputStream urlStream = url.openStream();\n\t\t\t\tdocument = PDDocument.load(urlStream);\n\n\t\t\t\t// get page number\n\t\t\t\tint pages = document.getNumberOfPages();\n\t\t\t\tPDFTextStripper stripper = new PDFTextStripper();\n\t\t\t\tstripper.setSortByPosition(true);\n\t\t\t\t// read text content page by page\n\t\t\t\tfor (int i = 0; i <= pages; i++) {\n\t\t\t\t\tstripper.setStartPage(i);\n\t\t\t\t\tstripper.setEndPage(i);\n\t\t\t\t\tString content = stripper.getText(document);\n\t\t\t\t\tSystem.out.println(content);\n\t\t\t\t\tString[] strs = content.split(\"\\n\");\n\t\t\t\t\tint line_number = 0;\n\t\t\t\t\tfor (String str : strs) {\n\t\t\t\t\t\tMatcher match = p.matcher(str);\n\t\t\t\t\t\twhile (match.find()) {\n\t\t\t\t\t\t//\tSystem.out.println(\"Found keyword: \" + match.group(0) + \" in line: \" + line_number + \" page: \"\n\t\t\t\t\t\t//\t\t\t+ i + \" at position \" + match.start(0));\n\n\t\t\t\t\t\t\tresult.add(match.group(0) + \"(page: \" + i + \" line: \" + line_number + \")\");\n\t\t\t\t\t\t\t// result=result+strs[line_number]+\"(page: \"+i+\" line:\n\t\t\t\t\t\t\t// \"+line_number+\")\"+\"\\n\";\n\t\t\t\t\t\t//\tSystem.out.println(str);\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\tline_number++;\n\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tdocument.close();\n\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} finally {\n\n\t\t\t\treturn result;\n\t\t\t}\n\n\t\t}", "public String findAntonyms(String word) throws IOException {\n try {\n word = word.toLowerCase();\n String check = dictionaryDao.readDB(word);\n if(!check.contains(\"null\"))\n return dictionaryDao.readDB(word); //checkFile(word);\n DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\n URL url = new URL(PATH + word + XML);\n URLConnection connection = url.openConnection();\n Document doc = parseXML(connection.getInputStream());\n NodeList xml = doc.getElementsByTagName(\"w\");\n String xmlElementValue = null;\n ArrayList<String> antonymsCollection = new ArrayList<>();\n\n for (int i = 0; i < xml.getLength(); i++) {\n Element element = (Element) xml.item(i);\n if (isAntonym(element.getAttribute(\"r\"))) {\n xmlElementValue = element.getTextContent();\n antonymsCollection.add(xmlElementValue);\n }\n }\n\n String lastElement = antonymsCollection.get(antonymsCollection.size()-1);\n String antonymsCollectionString = \"\";\n\n for(String s : antonymsCollection) {\n if(!s.equals(lastElement))\n antonymsCollectionString += s + \", \";\n else\n antonymsCollectionString += s + \".\";\n }\n dictionaryDao.addToDB(word, antonymsCollectionString); //saveToFile(word, antonymsCollectionString);\n return \"Antonym/s for \" + word + \": \" + antonymsCollectionString;\n } catch (UnknownHostException e) {\n return INTERNECT_CONNECTION;\n } catch (NullPointerException e) {\n return INCORRECT_WORD;\n } catch (ArrayIndexOutOfBoundsException e) {\n return INCORRECT_WORD;\n } catch(IOException e){\n return INCORRECT_WORD;\n } catch (JdbcSQLException e) {\n return DATABASE_ERROR;\n } catch (Exception e) {\n StringWriter errors = new StringWriter();\n e.printStackTrace(new PrintWriter(errors));\n return errors.toString();\n }\n }", "public String normalize(String word);", "private void exercise6() throws IOException {\n final Path resourcePath = retrieveResourcePath();\n List<String> result;\n try (BufferedReader reader = newBufferedReader(resourcePath)) {\n result = reader.lines()\n .flatMap(line -> of(line.split(WORD_REGEXP)))\n .distinct()\n .map(String::toLowerCase)\n .sorted()\n .collect(toList());\n }\n\n result.forEach(System.out::println);\n }", "List<String> searchTweets(String keywords) throws TwitterException;", "@Override\n public List<DefinitionDTO> findWordsByWord(String query) {\n List<Word> words = wordRepository.findBySearchString(query);\n return DTOMapper.mapWordListToDefinitionDTOList(words);\n }", "public void showWordsListInfo(String path) throws IOException {\r\n\t ArrayList<String> listOfWords=new ArrayList<String>();//creem lista\r\n\t @SuppressWarnings(\"resource\") \r\n\tBufferedReader bfr=new BufferedReader(new FileReader(new File(path)));//initializam un buffer reader cu calea URL a unui fisier\r\n\t String word=\"\"; \r\n\t while ((word = bfr.readLine()) != null) \t //pentru fiecare linie citita, incarcam lista cu respectivul cuvant de pe linie. \r\n\t listOfWords.add(word);\r\n\t for (String element_word : listOfWords) {\r\n\t \t System.out.println(element_word);\r\n\t\t\tshowInfoWord(element_word); //pentru fiecare cuvant din lista afisam informatiile :cuvantul, Acceptata/Neacceptat, starea finala.\r\n\t\t\t\r\n\t\t}\r\n }", "public Set<String> hyponyms(String word) {\n Set<String> toReturn = new HashSet<String>();\n Set<Integer> wordIndexes = new HashSet<Integer>();\n wordIndexes = wnetsi.get(word);\n Set<Integer> toReturnInt = GraphHelper.descendants(g, wordIndexes);\n Object[] returnArray = toReturnInt.toArray();\n for (int i = 0; i < returnArray.length; i += 1) {\n Set<String> stringReturn = wnetis.get(returnArray[i]);\n Iterator<String> strIter = stringReturn.iterator();\n while (strIter.hasNext()) {\n toReturn.add(strIter.next());\n }\n }\n return toReturn;\n }", "public static Set<String> preprocessStemAndTokenizeAddBigramsInSet(String data) {\n\t\t//System.out.println(\"Preprocess data, remove stop words, stem, tokenize and get bi-grams ..\");\n\n\t\tSet<String> transformedSet = new LinkedHashSet<String>();\n\t\tList<String> stemmedList = new ArrayList<String>();\n\n\t\t//System.out.println(\"Stop words length:\" + stopwords.size());\n\t\tTokenizer analyzer = new Tokenizer(Version.LUCENE_30);\n\t\tTokenStream tokenStream = analyzer.tokenStream(\"\", new StringReader(data));\n\t\tTermAttribute termAttribute;\n\t\tString term;\n\t\ttry {\n\t\t\twhile (tokenStream.incrementToken()) {\n\t\t\t\ttermAttribute = tokenStream.getAttribute(TermAttribute.class);\n\t\t\t\tterm = termAttribute.term();\n\t\t\t\tif (digitPattern.matcher(term).find()) //ignore digits\n\t\t\t\t\tcontinue;\n\t\t\t\tif (stopwords.contains(term)) //ignore stopwords\n\t\t\t\t\tcontinue;\n\t\t\t\tif (term.length() <= 1) //ignore single letter words\n\t\t\t\t\tcontinue;\n\t\t\t\tstemmer.setCurrent(term);\n\t\t\t\tstemmer.stem();\n\t\t\t\tstemmedList.add(stemmer.getCurrent());\n\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tString[] ds = stemmedList.toArray(new String[0]);\n\n\t\t/*for(int i=0; i<stemmedList.size(); i++)\n\t\t\tSystem.out.print(ds[i]+\"\\t\");*/\n\n\t\t//add bi-grams\n\t\tfinal int size = 2;\n\t\tfor (int i = 0; i < ds.length; i++) {\n\t\t\ttransformedSet.add(ds[i]); //add single words\n\t\t\tif (i + size <= ds.length) {\n\t\t\t\tString t = \"\";\n\t\t\t\tfor (int j = i; j < i + size; j++) {\n\t\t\t\t\tt += \" \" + ds[j];\n\t\t\t\t}\n\t\t\t\tt = t.trim().replaceAll(\"\\\\s+\", \"_\");\n\t\t\t\ttransformedSet.add(t); //add bi-gram combined with \"_\"\n\t\t\t}\n\t\t}\n\t\t//System.out.println(\" \")\n\t\tstemmedList.clear();\n\t\tstemmedList = null;\n\t\tds = null;\n\t\treturn transformedSet;\n\t}", "public void crawl(String url);", "public static ArrayList<Result> findMatches(Query query, DataManager myVocab){\n\n\t\t//Uncomment this for logging in this class\t\n//\t\tmyLogger.setLevel(Level.INFO); \n\n\t\t// get the term we're going to search for and\n\t\t// take out any leading or trailing whitespaces\n\t\tString querystr = query.getQuery();\n\t\tquerystr = querystr.trim();\n\t\tString uncleaned = querystr;\n\t\t\n\t\t// This is in case of numeric entries. Google Refine doesn't seem\n\t\t// to have int cell types, instead it adds an invisible .0 to all\n\t\t// numbers. This fixes that issue, as it sometimes causes false negatives.\n\t\tif (querystr.endsWith(\".0\")){\n\t\t Pattern p = Pattern.compile(\"[^0-9\\\\.]+\");\n\t\t Matcher m = p.matcher(querystr);\n\t\t boolean result = m.find();\n\t\t if (!result){\n\t\t \t querystr = querystr.substring(0, querystr.length()-2);\n\t\t }\n\t\t}\n\t\t// see if it's in the synonyms map, if it is\n\t\t// replace it with the appropriate term, if it's\n\t\t// not, don't do anything. \n\n\t\tif (myVocab.subMap.get(querystr)!=null){\n\t\t\tquerystr = myVocab.subMap.get(querystr);\n\t\t\tquery.setQuery(querystr);\n\t\t}\n\t\t\n\t\t// Clean up the query string if it isn't case/punctuation sensitive\n\t\tif (!myVocab.capsSensitive()){\t\t\n\t\t\tquerystr = querystr.toLowerCase();\n\t\t}\n\t\tif (! myVocab.punctSensitive()){\t\t\n\t\t\tquerystr = querystr.replaceAll(\"[\\\\W_]\", \"\");\n\t\t}\n\t\t\n\t\t// see if it's in the synonyms map, if it is\n\t\t// replace it with the appropriate term, if it's\n\t\t// not, don't do anything. \n\t\tif(myVocab.subMap.get(querystr)!=null){\n\t\t\tquerystr = myVocab.subMap.get(querystr);\n\t\t\tquery.setQuery(querystr);\n\t\t}\n\n\t\tString type = query.getType();\n\n\t\t// This ArrayList is the results that are going to be returned. \n\t\tArrayList<Result> results = getDirectMatches(myVocab, querystr, uncleaned, type);\n\t\t\n\t\t// If there's a perfect match return it.\n\t\tif (results.size() == 1 && results.get(0).match){\n\t\t\treturn results;\n\t\t}else{\n\t\t\t// Otherwise, add the initial ones and try matching\n\t\t\t// based on distance to vocabulary terms.\n\t\t\tresults.addAll(distanceMatching(query, myVocab));\n\t\t\t\n\t\t\t// Split the original query term by space and non-alphanumeric characters \n\t\t\t// to find how many words there are.\n\t\t\t//querystr = query.getQuery().replaceAll(\"[\\\\W_]\", \" \");\n\t\t\tString [] termList = querystr.split(\" \");\n\t\t\t\n\t\t\t// if there's more than one, run bagOfWords\n\t\t\t// which tries to find a match for each of the words.\n\t\t\tif (termList.length > 1){\n\t\t\t\tresults.addAll(bagOfWords(query, myVocab));\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Clean the results: no duplicates\n\t\t// no extra results to return, and sorted\n\t\t// them by score before returning them\n\t\tresults = removeDuplicates(results);\n\t\t\n\t\t// They do not need to be reduced in \n\t\t// number if there are fewer than \n\t\t// the max results.\n\t\t// The pruneResults sorts them\n\t\t// by score already.\n\t\tif(query.getLimit()!=null){\n\t\t\tresults = pruneResults(results,Integer.parseInt(query.getLimit()));\n\t\t}else{\n\t\t\tresults = pruneResults(results,MAX_RESULTS);\n\t\t}\n\t\t\t\n\t\tresults = sortByScore(results);\n\t\tfor (int i = 0; i< results.size(); i++){\n//\t\t\tmyLogger.log(Level.SEVERE,results.get(i).getScore()+ \" is bigger than 100?\");\n\t\t\tif(results.get(i).getScore() > (double)100){\n\t\t\t\tresults.get(i).setScore((double)100 - (results.get(i).getScore()-(double)100));\n//\t\t\t\tmyLogger.log(Level.SEVERE,results.get(i).getScore()+\" is bigger than 100! and was set to \"+\n//\t\t\t\t\t\t((double)100 - (results.get(i).getScore()-(double)100)));\n\t\t\t}\n\t\t}\n\t\treturn results;\n\t}", "private @NotNull List<String> getAllLinks(final String text, final String urlStart) {\n List<String> links = new ArrayList<>();\n\n int i = 0;\n while (text.indexOf(urlStart, i) != -1) {\n int linkStart = text.indexOf(urlStart, i);\n int linkEnd = text.indexOf(\" \", linkStart);\n if (linkEnd != -1) {\n String link = text.substring(linkStart, linkEnd);\n links.add(link);\n } else {\n String link = text.substring(linkStart);\n links.add(link);\n }\n i = text.indexOf(urlStart, i) + urlStart.length();\n }\n\n return links;\n }", "public void parseThesaurus() throws IOException {\r\n\t\t\t//We create an object below to read the thesaurus file\r\n\t\t\tFileInputStream fis = new FileInputStream(\"src//ie//gmit//dip//resources//MobyThesaurus3.txt\");\r\n\t\t\tBufferedReader br=new BufferedReader(new InputStreamReader(fis));\r\n\t\t\t List <List<String>> listOflist= new ArrayList<>();\r\n\t\t\t// HashMap<String,List> tMap = new HashMap<>();\t\t\r\n\t\t\t List <String> individualListOfSynonyms= new ArrayList <String>();\r\n\r\n\t\t\t \r\n\t\t\t //we create a hashmap with the first word being the key value and the rest a list of synonims we will use\r\n\t\t\twhile(br.readLine()!=null) {\r\n\t\t\t\t\r\n\t\t\t\tString somestring = br.readLine();\r\n\t\t\t\tString[] testsplit= somestring.split(\",\");\r\n\t\t\t\tindividualListOfSynonyms=Arrays.asList(testsplit);\r\n\t\t\t\tString indexvalue=individualListOfSynonyms.get(0).toString();\r\n\t\t\t tMap.put(indexvalue, individualListOfSynonyms);\r\n\t\t\t //br.close();\r\n\t\t\t //System.out.println(tMap);\r\n\t\t\t }\r\n\t\t\t}", "public List<Stem> stem(char word[], int length) {\n List<Stem> stems = new ArrayList<Stem>();\n if (dictionary.lookupWord(word, 0, length) != null) {\n stems.add(new Stem(word, length));\n }\n stems.addAll(stem(word, length, null, 0));\n return stems;\n }", "public static List<String> validWords(List<String> words)\n\t{\n\t\tStemmer stemmer = new Stemmer();\n\t\tList<String> goodWords = new ArrayList<String>();\n\t\tfor (String word : words)\n\t\t{\n\t\t\tString stem = stemmer.stem(word);\n\t\t\tif (dictUtils.dict.containsKey(stem))\n\t\t\t{\n\t\t\t\tgoodWords.add(dictUtils.dict.get(stem));\n\t\t\t}\n\t\t}\n\t\treturn goodWords;\n\t}", "public WordsToGuess(String w)\n\t{\n\t\tword = w;\n\t}", "List<T> getWord();", "public List<String> predict(String term) {\n\t\tList<String> results = new ArrayList<String>();\n\t\tif (term == null) {\n\t\t\treturn results;\n\t\t}\n\t\tString formattedTerm = term.strip().toLowerCase();\n\t\tif (formattedTerm.length() < this.minimumNumberOfCharacters) {\n\t\t\treturn results;\n\t\t}\n\t\t\n\t\tQueue<Character> characters = this.toCharacterQueue(formattedTerm);\n\t\tNode lastCharacterNode = this.getLastCharacterNode(this.root, characters);\n\t\tif (lastCharacterNode != null) {\n\t\t\tList<String> fragments = this.getChildrenFragments(lastCharacterNode);\n\t\t\tfor (String fragment : fragments) {\n\t\t\t\tresults.add(formattedTerm.substring(0, formattedTerm.length() - 1) + fragment);\n\t\t\t}\n\t\t}\n\t\treturn results;\n\t}", "static List<WebURL> ExtractUrl(Page page){\n // TODO: reference to parser to extractor urls from the web content\n return null;\n }", "String getSynonyms();", "private static Stream<String> createBadWordsDetectingStream(String text, \n List<String> badWords) {\n\t \treturn Arrays.stream(text.split(\" \")).filter(el -> !badWords.contains(el)).distinct().sorted().collect(Collectors.toList()).stream();\n\t }", "default Stream<CharSequence> parseTextToWords(CharSequence text) {\n return toSentences(text).filter(s -> s.length() > 0).flatMap(this::toWords);\n }", "public String stem(String input) {\n String output = \"\";\n // create an empty Annotation just with the given text\n document = new Annotation(input);\n // run all Annotators on this text\n pipeline.annotate(document);\n // traverse words in the document\n for (CoreLabel token : document.get(CoreAnnotations.TokensAnnotation.class)) {\n output = output + token.lemma() + \" \";\n }\n\n return output.trim();\n }", "String[] splitSentenceWords() {\n\t\t\tint i=0;\n\t\t\tint j=0;\n\t\t\tArrayList<String> words = new ArrayList<String>();\n\t\t\t\n\t\t\t\tString[] allWords = wordPattern.split(purePattern.matcher(sentence).replaceAll(\" \"));//.split(\"(?=\\\\p{Lu})|(\\\\_|\\\\,|\\\\.|\\\\s|\\\\n|\\\\#|\\\\\\\"|\\\\{|\\\\}|\\\\@|\\\\(|\\\\)|\\\\;|\\\\-|\\\\:|\\\\*|\\\\\\\\|\\\\/)+\");\n\t\t\tfor(String word : allWords) {\n\t\t\t\tif(word.length()>2) {\n\t\t\t\t\twords.add(word.toLowerCase());\n\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\treturn (String[])words.toArray(new String[words.size()]);\n\t\t\n\t\t}", "private String nameFolder() {\n\t\tString stringUrl = url.toString();\n\t\tint position1 = stringUrl.indexOf(\"://www.\"); \t\t\t\t // position of first \":\"\n\t\tint position2; \t\t\t\t\t\t \t\t\t\t\t // position before the country's suffix\n\n\t\ttry {\n\t\t\t// case link is something \"http://listofrandomwords.com/\"\n\t\t\tif (position1 == -1) {\n\t\t\t\tposition1 = stringUrl.indexOf(\"://\"); \t\t\t\t\t // position of \":\"\n\t\t\t\tposition2 = stringUrl.indexOf(\".\", 6);\t\t\t\t\t\t// position of first \".\"\n\t\t\t\treturn stringUrl.substring(position1 + 3, position2); \t// position + 3 = first letter of domain\n\t\t\t} else {\n\t\t\t\tposition2 = stringUrl.indexOf(\".\", 12);\t\t\t\t\t\t// position of second \".\"\n\t\t\t\treturn stringUrl.substring(position1 + 7, position2);\t\t// position + 7 = first letter of domain\n\t\t\t}\n\t\t} catch (StringIndexOutOfBoundsException e) {\n\t\t\tRandom ran = new Random();\n\t\t\treturn RANDOM_WORDS[ran.nextInt(RANDOM_WORDS.length - 1)];\n\t\t}\n\t}", "static void ReadQuery(String input) throws FileNotFoundException {\n input = input.replaceAll(\"[^A-Za-z]\",\" \");\n String[] arr = input.split(\" \"); // splitting the whole string into words by split on the basis of white spaces\n\n\n for(int i=0; i<arr.length; i++) {\n String termWord = arr[i].toLowerCase();\t//same pre-processing is applied to all the query word\n //termWord = RemoveSpecialCharacter(termWord);\n termWord = removeStopWords(termWord);\n\n if(!termWord.equalsIgnoreCase(\"\")) { // all the white spaces are removed as if not removed then lemmatization wont be successfully done\n\n termWord = Lemmatize(termWord);\n System.out.println(termWord);\n if(dictionary.containsKey(termWord)) {\n List<Integer> wordList = new ArrayList<>();\n wordList = dictionary.get(termWord);\n int queryWordFrequency = wordList.get(totaldocument);\n queryWordFrequency++;\n wordList.set(totaldocument, queryWordFrequency); // all the frequencies of the query words are stored at the 56th index of the List stored in the\n //hashmap associated with its word-terms\n dictionary.put(termWord, wordList);\n }\n else {\n //if any of the enterd query word not present in all the docs so list will have 0.0 value from 0th index to 55th and 56th index is reserver\n // for query word frequency\n List<Integer> wordList = new ArrayList<>();\n for(int j=0; j<totaldocument+1; j++) {\n wordList.add(0);\n }\n wordList.add(1);\n dictionary.put(termWord, wordList); //updating the dictionary hashmap now containing all the query words frequencies\n }\n }\n }\n save();\n }", "final void checkMatch(String input,String url,String title)\r\n {\r\n String searchLine=removeHTMLTags(input); // remove html tags before search.\r\n // If the line contains non - HTML text then search it.\r\n\tif(searchLine.length()>0)\r\n\t{\r\n\t if(app.matchCase) // Check if case sensitive search\r\n\t {\r\n\t if(app.matchWord) // Check if attempting to match whole word\r\n\t\t{\r\n\t\t if(searchLine.indexOf(\" \"+textToFind+\" \")!=-1 ||\r\n \t\t (searchLine.indexOf(textToFind)!=-1 && searchLine.length()==textToFind.length()) ||\r\n\t\t\t\t searchLine.indexOf(\" \"+textToFind)!=-1 && textToFind.charAt(textToFind.length()-1)==\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t searchLine.charAt(searchLine.length()-1))\r\n\t\t {\r\n\t\t // Found it display the match\r\n\t\t app.addToList(url,searchLine,title);\r\n\t\t hitsFound++;\t\r\n\t\t }\r\n\t\t}\r\n\t\telse if(searchLine.indexOf(textToFind)!=-1)\r\n\t\t{\r\n\t\t // Found it display the match\r\n\t\t app.addToList(url,searchLine,title);\r\n\t\t hitsFound++;\r\n\t\t}\r\n\t }\r\n\t else\r\n\t {\r\n\t String lower1=searchLine.toLowerCase();\r\n\t\tString lower2=textToFind.toLowerCase();\r\n\t\t// Check if attempting to match the whole word.\r\n\t\tif(app.matchWord)\r\n\t\t{\r\n\t\t if(lower1.indexOf(\" \"+lower2+\" \")!=-1 || \r\n\t\t (lower1.indexOf(lower2)!=-1 && lower1.length()== lower2.length()) ||\r\n\t\t\t (lower1.indexOf(\" \"+lower2)!=-1 && lower2.charAt(lower2.length()-1) == \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t lower1.charAt(lower1.length()-1)))\r\n {\r\n\t\t // Found it display the match\r\n\t\t\tapp.addToList(url,searchLine,title);\r\n\t\t\thitsFound++;\r\n\t\t }\r\n\t\t}\r\n\t\telse if(lower1.indexOf(lower2)!=-1)\r\n\t\t{\r\n\t\t // Found it! Display the match\r\n\t\t app.addToList(url,searchLine,title);\r\n\t\t hitsFound++;\r\n\t\t}\r\n\t }\r\n\t}\r\n }", "public List<String> decode(String s) {\n List<String> words = new ArrayList<>();\n if (s.length() == 0) return words;\n int i = 0;\n while (i < s.length()) {\n int d = s.indexOf(\"#\", i);\n int len = Integer.parseInt(s.substring(i , d));\n i = d + 1 + len;\n words.add(s.substring(d + 1, i));\n }\n return words;\n }", "public static String getWebsiteBase( String url, IOntologyModel universitiesOntologyModel ) {\r\n if( url == null ) {\r\n return null;\r\n }; // if\r\n \r\n // the url would have to be at least 8 chars long (because it would have \"http://\" or \"https://\")\r\n int httpPosition = url.startsWith( \"http://\" ) ? 7 : -1;\r\n httpPosition = url.startsWith( \"https://\" ) ? 8 : httpPosition;\r\n if( httpPosition == -1 ) {\r\n System.out.println( \"WHATISTHIS--url(1),getWebsiteBase: \" + url );\r\n return null;\r\n }; // if\r\n \r\n int slashPosition = url.indexOf( \"/\", httpPosition );\r\n if( slashPosition == -1 ) {\r\n if( url.endsWith( \"/\" ) == false ) { \r\n url += \"/\";\r\n }; // if\r\n slashPosition = url.indexOf( \"/\", httpPosition );\r\n if( slashPosition == -1 ) {\r\n System.out.println( \"WHATISTHIS--url(2),getWebsiteBase: \" + url );\r\n return null;\r\n }; // if\r\n }; // if\r\n \r\n int pos = 0;\r\n String ret = url.substring( 0, slashPosition );\r\n String portEnding[] = { \":8080\", \":8000\" };\r\n IInstanceNode instanceNode = null;\r\n \r\n // fix any url with useless port ending\r\n for( String port : portEnding ) {\r\n if( ret.endsWith( port ) ) {\r\n ret = ret.substring( 0, ret.length() - port.length() );\r\n }; // if\r\n }; // for\r\n \r\n // handle \".edu\" ending\r\n String eduCases[] = { \".edu\", \".edu.ar\", \".edu.au\", \".edu.br\", \".edu.cn\", \".edu.eg\", \r\n \".edu.hk\", \".edu.kw\", \".edu.lb\", \".edu.my\", \r\n \".edu.ng\", \".edu.om\", \".edu.pl\", \".edu.sg\", \".edu.tr\", \".edu.tw\", \".edu.uy\", \r\n \r\n \".ac.ae\", \".ac.at\", \".ac.bd\", \".ac.be\", \".ac.cn\", \".ac.cr\", \".ac.cy\", \r\n \".ac.il\", \".ac.in\", \".ac.jp\", \".ac.kr\", \".ac.nz\", \".ac.ru\", \".ac.th\", \".ac.uk\", \".ac.yu\", \".ac.za\" };\r\n \r\n // search for possible 'edu/ac' match\r\n for( String edu : eduCases ) {\r\n if( ret.endsWith( edu ) ) {\r\n pos = ret.lastIndexOf( \".\", ret.length() - edu.length() - 1 );\r\n pos = pos == -1 ? httpPosition : pos + 1; // for cases such as http://uga.edu/~ana\r\n ret = \"http://www.\" + ret.substring( pos ) + \"/\";\r\n \r\n // now, look it up in the universities\r\n instanceNode = universitiesOntologyModel.getInstanceNode( ret );\r\n if( instanceNode != null ) {\r\n return ret;\r\n }; // if\r\n //TODO\r\n //System.out.println( \"WHATISTHIS--url(3),getWebsiteBase: \" + ret );\r\n return null;\r\n }; // if\r\n }; // for\r\n \r\n // maybe there's a match on universitiesOntology\r\n String pieces[] = ret.substring( httpPosition ).split( \"\\\\.\" );\r\n if( pieces != null && pieces.length >= 2 ) {\r\n String tmp = \"http://www.\" + pieces[ pieces.length - 2 ] + \".\" + pieces[ pieces.length - 1 ] + \"/\";\r\n instanceNode = universitiesOntologyModel.getInstanceNode( tmp );\r\n if( instanceNode != null ) {\r\n return tmp;\r\n }; // if\r\n }; // if\r\n \r\n //TODO\r\n //System.out.println( \"WHATISTHIS--url(4),getWebsiteBase: \" + ret );\r\n return null;\r\n }", "public void run() {\n\n /**\n * Replace all delimiters with single space so that words can be\n * tokenized with space as delimiter.\n */\n for (int x : delimiters) {\n text = text.replace((char) x, ' ');\n }\n\n StringTokenizer tokenizer = new StringTokenizer(text, \" \");\n boolean findCompoundWords = PrefsHelper.isFindCompoundWordsEnabled();\n ArrayList<String> ufl = new ArrayList<String>();\n for (; tokenizer.hasMoreTokens();) {\n String word = tokenizer.nextToken().trim();\n boolean endsWithPunc = word.matches(\".*[,.!?;]\");\n \n // Remove punctuation marks from both ends\n String prevWord = null;\n while (!word.equals(prevWord)) {\n prevWord = word;\n word = removePunctuation(word);\n }\n \n // Check spelling in word lists\n boolean found = checkSpelling(word);\n if (findCompoundWords) {\n if (!found) {\n ufl.add(word);\n if (endsWithPunc) pushErrorToListener(ufl);\n } else {\n pushErrorToListener(ufl);\n }\n } else {\n if (!found) listener.addWord(word);\n }\n }\n pushErrorToListener(ufl);\n }", "public static ArrayList<String> wordTokenizer(String sentence){\n \n ArrayList<String> words = new ArrayList<String>();\n String[] wordsArr = sentence.replaceAll(\"\\n\", \" \").toLowerCase().split(\" \");\n \n for(String s : wordsArr){\n \n if(s.trim().compareTo(\"\") != 0)\n words.add(s.trim());\n \n }\n \n return words;\n \n }", "public void search(String url, String searchWord)\n {\n while(this.pagesVisited.size() < MAX_PAGES_TO_SEARCH)\n {\n String currentUrl;\n SpiderLeg leg = new SpiderLeg();\n if(this.pagesToVisit.isEmpty())\n {\n currentUrl = url;\n this.pagesVisited.add(url);\n }\n else\n {\n currentUrl = this.nextUrl();\n }\n leg.crawl(currentUrl); // Lots of stuff happening here. Look at the crawl method in\n // SpiderLeg\n boolean success = leg.searchForWord(searchWord);\n if(success)\n {\n System.out.println(String.format(\"**Success** Word %s found at %s\", searchWord, currentUrl));\n break;\n }\n this.pagesToVisit.addAll(leg.getLinks());\n }\n System.out.println(\"\\n**Done** Visited \" + this.pagesVisited.size() + \" web page(s)\");\n }", "public static String preprocessStemAndTokenizeAddBigramsInString(String data) {\n\t\t//System.out.println(\"Preprocess data, remove stop words, stem, tokenize and get bi-grams ..\");\n\n\t\tSet<String> transformedSet = new LinkedHashSet<String>();\n\t\tList<String> stemmedList = new ArrayList<String>();\n\n\t\tTokenizer analyzer = new Tokenizer(Version.LUCENE_30);\n\t\tTokenStream tokenStream = analyzer.tokenStream(\"\", new StringReader(data));\n\t\tTermAttribute termAttribute;\n\t\tString term;\n\t\ttry {\n\t\t\twhile (tokenStream.incrementToken()) {\n\t\t\t\ttermAttribute = tokenStream.getAttribute(TermAttribute.class);\n\t\t\t\tterm = termAttribute.term();\n\t\t\t\tif (digitPattern.matcher(term).find()) //ignore digits\n\t\t\t\t\tcontinue;\n\t\t\t\tif (stopwords.contains(term)) //ignore stopwords\n\t\t\t\t\tcontinue;\n\t\t\t\tif (term.length() <= 1) //ignore stopwords\n\t\t\t\t\tcontinue;\n\t\t\t\tstemmer.setCurrent(term);\n\t\t\t\tstemmer.stem();\n\t\t\t\tstemmedList.add(stemmer.getCurrent());\n\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tString[] ds = stemmedList.toArray(new String[0]);\n\n\t\t/*for(int i=0; i<stemmedList.size(); i++)\n\t\t\tSystem.out.print(ds[i]+\"\\t\");*/\n\n\t\t//add bi-grams\n\t\tfinal int size = 2;\n\t\tfor (int i = 0; i < ds.length; i++) {\n\t\t\ttransformedSet.add(ds[i]); //add single words\n\t\t\tif (i + size <= ds.length) {\n\t\t\t\tString t = \"\";\n\t\t\t\tfor (int j = i; j < i + size; j++) {\n\t\t\t\t\tt += \" \" + ds[j];\n\t\t\t\t}\n\t\t\t\tt = t.trim().replaceAll(\"\\\\s+\", \"_\");\n\t\t\t\ttransformedSet.add(t); //add bi-gram combined with \"_\"\n\t\t\t}\n\t\t}\n\t\t//System.out.println(transformedSet.toArray(new String[transformedSet.size()]).toString());\n\t\treturn StringUtils.join( transformedSet.toArray(new String[transformedSet.size()]), \" \");\n\t\t\n\t}", "@Nullable\r\n public static JSONArray retrieveSuggestions(final Context context, String word)\r\n {\r\n JSONArray content;\r\n\r\n try\r\n {\r\n RequestFuture<JSONArray> future = RequestFuture.newFuture();\r\n\r\n SharedPreferencesManager sharedPreferencesManager = new SharedPreferencesManager(context);\r\n\r\n User user = sharedPreferencesManager.retrieveUser();\r\n\r\n final String fixedURL = Utils.fixUrl(\r\n Properties.SERVER_URL + \":\" + Properties.SERVER_SPRING_PORT + \"/suggest/\" + user.getId() + \"/\" + word);\r\n\r\n Log.d(Properties.TAG, \"[REST_CLIENT_SINGLETON] Conectando con: \" + fixedURL + \" para traer las sugerencias\");\r\n\r\n // Creamos una peticion\r\n final JsonArrayRequest jsonObjReq = new JsonArrayRequest(Request.Method.GET\r\n , fixedURL\r\n , null\r\n , future\r\n , future);\r\n\r\n // La mandamos a la cola de peticiones\r\n VolleySingleton.getInstance(context).addToRequestQueue(jsonObjReq);\r\n Log.d(Properties.TAG, \"[REST_CLIENT_SINGLETON] Petición creada y recibida\");\r\n\r\n try\r\n {\r\n content = future.get(20, TimeUnit.SECONDS);\r\n\r\n } catch (InterruptedException e) {\r\n ExceptionPrinter.printException(\"REST_CLIENT_SINGLETON\", e);\r\n\r\n return null;\r\n }\r\n\r\n // Si content es vacio, es que han fallado todas las conexiones.\r\n if (content == null)\r\n {\r\n Log.e(Properties.TAG, \"[REST_CLIENT_SINGLETON] No se ha recibido nada\");\r\n\r\n return null;\r\n }\r\n\r\n } catch (Exception e) {\r\n ExceptionPrinter.printException(\"REST_CLIENT_SINGLETON\", e);\r\n\r\n return null;\r\n }\r\n\r\n return content;\r\n }", "public static ArrayList<String> words(String s){\n\t\ts = s.toLowerCase().replaceAll(\"[^a-zA-Z ]\", \"\");\n\t\tArrayList<String> arrayList = new ArrayList<String>();\n\t\tString currWord = \"\";\n\n\t\tfor(int i = 0; i < s.length(); i ++){\n\t\t\tchar c = s.charAt(i);\n\t\t\tif (Character.isLetter(c) == false){\n\t\t\t\tarrayList.add(currWord);\n\t\t\t\tcurrWord = \"\";\n\t\t\t}else{\n\t\t\t\tcurrWord = currWord + c;\n\t\t\t}\n\t\t}\n\t\tarrayList = removeSpaces(arrayList);\n\t\treturn arrayList;\n\t}", "protected String stem(String term) {\r\n\t\tStemmer stemmer = new Stemmer();\r\n\t\tfor(char a : term.toCharArray()){\r\n\t\t\tstemmer.add(a);\r\n\t\t}\r\n\t\tstemmer.stem();\r\n\t\treturn stemmer.toString();\r\n\t}", "private void fillSet() {\r\n\t\tString regex = \"\\\\p{L}+\";\r\n\t\tMatcher matcher = Pattern.compile(regex).matcher(body);\r\n\t\twhile (matcher.find()) {\r\n\t\t\tif (!matcher.group().isEmpty()) {\r\n\t\t\t\twords.add(matcher.group());\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static List<String> getWords(String text)\n\t{\n\t\tString lower = text.toLowerCase();\n\t\tString noPunct = lower.replaceAll(\"\\\\W\", \" \");\n\t\tString noNum = noPunct.replaceAll(\"[0-9]\", \" \");\n\t\tList<String> words = Arrays.asList(noNum.split(\"\\\\s+\"));\n\t\treturn words;\n\t}" ]
[ "0.67863333", "0.63666344", "0.62221", "0.606994", "0.57800704", "0.57320815", "0.56675893", "0.56288785", "0.5592376", "0.5581639", "0.55778867", "0.5545865", "0.55452245", "0.5525585", "0.5492502", "0.5472372", "0.54235905", "0.54176897", "0.5400474", "0.5388019", "0.5380653", "0.53628826", "0.5332697", "0.53313345", "0.5322311", "0.53144383", "0.52747184", "0.5273746", "0.52593106", "0.5258406", "0.5249784", "0.5247126", "0.5243305", "0.5219064", "0.5215137", "0.51852995", "0.5159046", "0.51294786", "0.51230353", "0.5112142", "0.51113206", "0.51034755", "0.5096314", "0.5088697", "0.5071356", "0.5062277", "0.5055728", "0.5046632", "0.50454146", "0.5037337", "0.5029376", "0.50251436", "0.50177485", "0.5015642", "0.50151294", "0.50076425", "0.50041246", "0.50013775", "0.49976102", "0.49857736", "0.49831206", "0.49814904", "0.4980771", "0.49733478", "0.49692714", "0.49496883", "0.49437", "0.49373078", "0.49177757", "0.4914709", "0.49141595", "0.49083227", "0.49000645", "0.48999146", "0.4893002", "0.4890899", "0.4881268", "0.48785102", "0.48697415", "0.48649657", "0.48632818", "0.4861668", "0.48550236", "0.484085", "0.48405066", "0.484032", "0.48398355", "0.4838971", "0.48364955", "0.48349798", "0.48343077", "0.48232436", "0.4808768", "0.4807265", "0.48066708", "0.47957864", "0.477935", "0.47742298", "0.47629967", "0.47616535" ]
0.61839765
3
Return stemmed words from a web page, in our dictionary
public static List<String> validStems(List<String> words) { Stemmer stemmer = new Stemmer(); ArrayList<String> goodWords = new ArrayList<String>(); for (String word : words) { String stem = stemmer.stem(word); if (dictUtils.dict.containsKey(stem)) { goodWords.add(stem); } } return goodWords; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String stemOf (String word);", "public List<Stem> stem(String word) {\n return stem(word.toCharArray(), word.length());\n }", "default String getStem() {\n return meta(\"nlpcraft:nlp:stem\");\n }", "public String Stem( String word )\n {\n // check if we already know the word\n String stemmedword = AllWords.get(word);\n if ( stemmedword != null )\n return stemmedword; // return it if we already know it\n\n // don't check words with digits in them\n // if ( containsNumbers (word) == true )\n // stemmedword = null;\n // else\t// unknown word: try to stem it\n stemmedword = StemWordWithWordNet (word);\n\n if ( stemmedword != null )\n {\n // word was recognized and stemmed with wordnet:\n // add it to hashmap and return the stemmed word\n AllWords.put( word, stemmedword );\n return stemmedword;\n }\n // word could not be stemmed by wordnet,\n // thus it is no correct english word\n // just add it to the list of known words so\n // we won't have to look it up again\n AllWords.put( word, word );\n return word;\n }", "@Override\n\tpublic String getStemming(String phrase) {\n\t\treturn null;\n\t}", "protected String stem(String term) {\r\n\t\tStemmer stemmer = new Stemmer();\r\n\t\tfor(char a : term.toCharArray()){\r\n\t\t\tstemmer.add(a);\r\n\t\t}\r\n\t\tstemmer.stem();\r\n\t\treturn stemmer.toString();\r\n\t}", "private String processWord(String word){\r\n\t\tString lword = word.toLowerCase();\r\n\t\tfor (int i = 0;i<word.length();++i){\r\n\t\t\tstemmer.add(lword.charAt(i));\r\n\t\t}\r\n\t\tstemmer.stem();\r\n\t\treturn stemmer.toString();\r\n\t}", "public static String preprocessStemAndTokenize(String data) {\n\n\t\tSet<String> transformedSet = new HashSet<String>(); //Set will make sure only unique terms are kept\n\t\tStringBuilder strBuilder = new StringBuilder();\n\t\tTokenizer analyzer = new Tokenizer(Version.LUCENE_30);\n\t\tTokenStream tokenStream = analyzer.tokenStream(\"\", new StringReader(data));\n\t\tTermAttribute termAttribute;\n\t\tString term;\n\t\t//System.out.println(\"The value of data in tokenizeAndStem: \"+ data);\n\t\ttry {\n\t\t\twhile (tokenStream.incrementToken()) {\n\t\t\t\ttermAttribute = tokenStream.getAttribute(TermAttribute.class);\n\t\t\t\tterm = termAttribute.term(); \n\t\t\t\tif (stopwords.contains(term)){ //ignore stopwords\n\t\t\t\t\t//System.out.println(\"Contains stopword: \"+ term);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (digitPattern.matcher(term).find()) //ignore digits\n\t\t\t\t\tcontinue;\n\t\t\t\tif(term.length() <= 1) //ignore 1 letter words\n\t\t\t\t\tcontinue;\n\t\t\t\t\n\t\t\t\tif (!digitPattern.matcher(term).find()){ //ignore digits\n\t\t\t\t\tstemmer.setCurrent(term);\n\t\t\t\t\tstemmer.stem();\n\t\t\t\t\ttransformedSet.add(stemmer.getCurrent());\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t//System.out.println(\"transormed set size in tokenizeAndStem: \"+ transformedSet.size());\n\t\tfor(Object token: transformedSet.toArray()){\n\t\t\tstrBuilder.append(token).append(\" \");\n\t\t}\n\t\t//System.out.println(\"String returned in tokenizeAndStem:\"+ strBuilder.toString());\n\t\treturn strBuilder.toString();\n\t}", "@Override\r\n public String stem(String word) {\r\n List<String> lemmas = new LinkedList<String>();\r\n // Create an empty Annotation just with the given text\r\n Annotation document = new Annotation(word);\r\n // run all Annotators on this text\r\n this.pipeline.annotate(document);\r\n // Iterate over all of the sentences found\r\n List<CoreMap> sentences = document.get(CoreAnnotations.SentencesAnnotation.class);\r\n for (CoreMap sentence : sentences) {\r\n // Iterate over all tokens in a sentence\r\n for (CoreLabel token : sentence.get(CoreAnnotations.TokensAnnotation.class)) {\r\n // Retrieve and add the lemma for each word into the\r\n // list of lemmas\r\n lemmas.add(token.get(CoreAnnotations.LemmaAnnotation.class));\r\n }\r\n }\r\n return lemmas.get(0);\r\n\r\n }", "public static String stem(String word){\n Stemmer s = new Stemmer();\n s.add(word.toCharArray(), word.length());\n s.stem();\n return s.toString();\n }", "public List<String> getRelatedWords(String word) throws IOException {\n List<String> result = new ArrayList<String>();\n IDictionary dict = new Dictionary(new File(WORDNET_LOCATION));\n try {\n dict.open();\n IStemmer stemmer = new WordnetStemmer(dict);\n for (POS pos : EnumSet.of(POS.ADJECTIVE, POS.ADVERB, POS.NOUN, POS.VERB)) {\n List<String> resultForPos = new ArrayList<String>();\n List<String> stems = new ArrayList<String>();\n stems.add(word);\n for (String stem : stemmer.findStems(word, pos)) {\n if (!stems.contains(stem))\n stems.add(stem);\n }\n for (String stem : stems) {\n if (!resultForPos.contains(stem)) {\n resultForPos.add(stem);\n IIndexWord idxWord = dict.getIndexWord(stem, pos);\n if (idxWord == null) continue;\n List<IWordID> wordIDs = idxWord.getWordIDs();\n if (wordIDs == null) continue;\n IWordID wordID = wordIDs.get(0);\n IWord iword = dict.getWord(wordID);\n \n ISynset synonyms = iword.getSynset();\n List<IWord> iRelatedWords = synonyms.getWords();\n if (iRelatedWords != null) {\n for (IWord iRelatedWord : iRelatedWords) {\n String relatedWord = iRelatedWord.getLemma();\n if (!resultForPos.contains(relatedWord))\n resultForPos.add(relatedWord);\n }\n }\n \n List<ISynsetID> hypernymIDs = synonyms.getRelatedSynsets();\n if (hypernymIDs != null) {\n for (ISynsetID relatedSynsetID : hypernymIDs) {\n ISynset relatedSynset = dict.getSynset(relatedSynsetID);\n if (relatedSynset != null) {\n iRelatedWords = relatedSynset.getWords();\n if (iRelatedWords != null) {\n for (IWord iRelatedWord : iRelatedWords) {\n String relatedWord = iRelatedWord.getLemma();\n if (!resultForPos.contains(relatedWord))\n resultForPos.add(relatedWord);\n }\n }\n }\n }\n }\n }\n }\n for (String relatedWord : resultForPos) {\n if (relatedWord.length() > 3\n && !relatedWord.contains(\"-\")\n && !result.contains(relatedWord)) {\n // TODO: Hack alert!\n // The - check is to prevent lucene from interpreting hyphenated words as negative search terms\n // Fix!\n result.add(relatedWord);\n }\n }\n }\n } finally {\n dict.close();\n }\n return result;\n }", "List<String> tokenize2(String doc) {\n String stemmed = StanfordLemmatizer.stemText(doc);\n List<String> res = new ArrayList<String>();\n\n for (String s : stemmed.split(\"[\\\\p{Punct}\\\\s]+\"))\n res.add(s);\n return res;\n }", "private String getStemming(String line) throws IOException {\n\t\treturn line;\n\t\t// return Stemmer.processTweets(line);\n\t}", "List<String> tokenize0(String doc) {\r\n List<String> res = new ArrayList<String>();\r\n\r\n for (String s : doc.split(\"\\\\s+\")) {\r\n // implement stemming algorithm if ToStem == true\r\n if (ToStem == true) {\r\n Stemmer st = new Stemmer();\r\n st.add(s.toCharArray(), s.length());\r\n st.stem();\r\n s = st.toString();\r\n }\r\n res.add(s);\r\n }\r\n return res;\r\n }", "private static String analyzeTerm(String term) {\n String ret = term.toLowerCase();\n if (stopWords.contains(ret) || ret.isEmpty())\n return \"\";\n return stemmer.stem(ret);\n }", "public List<String> stem(List<String> terms) {\r\n\t\tPaiceHuskStemmer stemmer = null;\r\n\t\ttry {\r\n\t\t\tstemmer = PaiceHuskStemmer.getInstance(SVMClassifier.class.getClassLoader().getResource(\"stemrules.txt\").openStream());\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tstemmer.setPreStrip(false);\r\n\t\tfor (int i = 0; i < terms.size(); i++) {\r\n\t\t\tString w = terms.get(i);\r\n\t\t\tterms.set(i, stemmer.stripAffixes(w));\r\n\t\t}\r\n\t\treturn terms;\r\n\t}", "private void populateDictionaryByLemmatizer() throws IOException {\n\n Enumeration e = dictionaryTerms.keys();\n while (e.hasMoreElements()) {\n String word = (String) e.nextElement();\n String tag = dictionaryTerms.get(word);\n\n if (!(word.contains(\" \")||word.contains(\"+\") ||word.contains(\"\\\"\") ||word.contains(\"'\")||word.contains(\".\") ||word.contains(\":\") || word.contains(\"(\") || word.contains(\")\") ||word.contains(\"-\")|| word.contains(\";\"))) {\n String tokenizedWords[] = tokenize(word);\n\n if (tokenizedWords.length == 1) {\n List<String> stemmings = stanfordLemmatizer.lemmatize(word);\n\n for (int i = 0; i < stemmings.size(); i++) {\n if (!dictionaryTerms.containsKey(stemmings.get(i))) {\n dictionaryTerms.put(stemmings.get(i), tag);\n System.out.println(\"Stemming: \" + word + \"\\t\" + stemmings.get(i));\n }\n }\n }\n }\n }\n }", "public void getThesaurusMap (String wordTofind) {\r\n\t \tfor (Entry<String, List> entry : tMap.entrySet()) {\r\n\t \t\tList singleListofSynonims = entry.getValue();\r\n\t \t\tif (singleListofSynonims.contains(wordTofind)){\r\n\t \t\t\t\r\n\t \t\t\tmappedList.add(singleListofSynonims);\r\n\t \t\t\tGoogleToThesarus.put(wordTofind,singleListofSynonims);\r\n\t \t\t}\r\n\t \t\telse {\r\n\t \t\t\t//System.out.println(\"value not in map\");\r\n\t \t}\r\n\t \t}\r\n\t }", "public char[] getStem() {\n return stem;\n }", "public static List<TokenCanonic> stemWords(String wordList) {\n List<TokenCanonic> result = new ArrayList<TokenCanonic>(); \n String [] tokens = wordList.split(\"\\\\s+\");\n for (String t : tokens) {\n if (t.trim().equals(\"\")) continue;\n TokenCanonic tc = new TokenCanonic(); \n tc.token = t; tc.canonic = stemWord(t);\n result.add(tc);\n }\n return result;\n }", "public List<Trie> findStemDescending(String stem) {\n if (stem == null)\n return new ArrayList<>();\n Trie start = find(stem);\n if (start == null)\n return new ArrayList<>();\n return start.getAll();\n }", "public static String preprocessStemAndTokenizeReturnDistinctTokens(String data) {\n\t\t//System.out.println(\"Preprocess data, remove stop words, stem, tokenize ..\");\n\t\tSet<String> transformedSet = new LinkedHashSet<String>();\n\t\tList<String> stemmedList = new ArrayList<String>();\n\n\t\tTokenizer analyzer = new Tokenizer(Version.LUCENE_30);\n\t\tTokenStream tokenStream = analyzer.tokenStream(\"\", new StringReader(data));\n\t\tTermAttribute termAttribute;\n\t\tString term;\n\t\ttry {\n\t\t\twhile (tokenStream.incrementToken()) {\n\t\t\t\ttermAttribute = tokenStream.getAttribute(TermAttribute.class);\n\t\t\t\tterm = termAttribute.term();\n\t\t\t\tif (digitPattern.matcher(term).find()) //ignore digits\n\t\t\t\t\tcontinue;\n\t\t\t\tif (stopwords.contains(term)) //ignore stopwords\n\t\t\t\t\tcontinue;\n\t\t\t\tif (term.length() <= 1) //ignore single letter words\n\t\t\t\t\tcontinue;\n\t\t\t\tstemmer.setCurrent(term);\n\t\t\t\tstemmer.stem();\n\t\t\t\tstemmedList.add(stemmer.getCurrent());\n\t\t\t}\n\t\t\ttransformedSet.addAll(stemmedList);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tstemmedList.clear();\n\t\tstemmedList = null;\n\t\t\n\t\treturn StringUtils.join(transformedSet.toArray(), \" \");\n\t}", "public static String stemWord(String word) {\n if (word.matches(\".*\\\\s.*\")) throw \n new IllegalArgumentException(\"argument is not a single word: \" + word); \n EnglishStemmer stemmer = new EnglishStemmer();\n stemmer.setCurrent(word);\n stemmer.stem();\n return stemmer.getCurrent();\n // slow way of doing it with jcas\n// List<TokenCanonic> c = getCanonicForms(word, CanonicForm.STEM);\n// return c.get(0).canonic;\n }", "public List<Stem> stem(char word[], int length) {\n List<Stem> stems = new ArrayList<Stem>();\n if (dictionary.lookupWord(word, 0, length) != null) {\n stems.add(new Stem(word, length));\n }\n stems.addAll(stem(word, length, null, 0));\n return stems;\n }", "private String stemmingForAWord(String identifiedWord) {\n String word;\n if (identifiedWord.contains(\"_\")) {\n word = identifiedWord;\n } else {\n word = morphology.stem(identifiedWord);\n }\n return word;\n }", "public Set<String> hyponyms(String word) {\n Set<String> toReturn = new HashSet<String>();\n Set<Integer> wordIndexes = new HashSet<Integer>();\n wordIndexes = wnetsi.get(word);\n Set<Integer> toReturnInt = GraphHelper.descendants(g, wordIndexes);\n Object[] returnArray = toReturnInt.toArray();\n for (int i = 0; i < returnArray.length; i += 1) {\n Set<String> stringReturn = wnetis.get(returnArray[i]);\n Iterator<String> strIter = stringReturn.iterator();\n while (strIter.hasNext()) {\n toReturn.add(strIter.next());\n }\n }\n return toReturn;\n }", "public String stem(String input) {\n String output = \"\";\n // create an empty Annotation just with the given text\n document = new Annotation(input);\n // run all Annotators on this text\n pipeline.annotate(document);\n // traverse words in the document\n for (CoreLabel token : document.get(CoreAnnotations.TokensAnnotation.class)) {\n output = output + token.lemma() + \" \";\n }\n\n return output.trim();\n }", "private static List<String> getWord(String urlname) {\n\t\tList<String> returnWord = new ArrayList<String>();\n\t\tBufferedReader reader;\n\t\ttry {\n\t\t\tURL url = new URL(urlname);\n\t\t\tInputStream in = url.openStream();\n\t\t\treader = new BufferedReader(new InputStreamReader(in));\n\t\t\twhile (true) {\n\t\t\t\tString word = reader.readLine();\n\t\t\t\tif (word == null)\n\t\t\t\t\tbreak;\n\t\t\t\treturnWord.add(word);\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(e.getMessage());\n\t\t}\n\t\treturn returnWord;\n\t}", "public StemSearch getStemSearch() {\r\n return this.stemSearch;\r\n }", "public static void Stemmingmethod()throws Exception\n{\n char[] w = new char[501];\n Stemmer s = new Stemmer();\n String prcessedtxt=\"\";\n ArrayList<String> finalsen= new ArrayList();\n BufferedWriter writer = new BufferedWriter(new FileWriter(\"fullyprocessed.txt\"));\n\n String u=null;\n \n {\n FileInputStream in = new FileInputStream(\"stopwordsremoved.txt\");\n\n while(true)\n\n { int ch = in.read();\n if (Character.isLetter((char) ch))\n {\n int j = 0;\n while(true)\n { ch = Character.toLowerCase((char) ch);\n w[j] = (char) ch;\n if (j < 500) j++;\n ch = in.read();\n if (!Character.isLetter((char) ch))\n {\n \n s.add(w, j); \n\n s.stem();\n { \n\n u = s.toString();\n finalsen.add(u);\n /* to test getResultBuffer(), getResultLength() : */\n /* u = new String(s.getResultBuffer(), 0, s.getResultLength()); */\n\n System.out.print(u);\n }\n break;\n }\n }\n }\n if (ch < 0) break;\n System.out.print((char)ch);\n finalsen.add(\"\"+(char)ch);\n\n\n }\n }\n \n \n \n for(String word:finalsen){\n prcessedtxt=prcessedtxt+\"\"+ word;\n }\n writer.write(prcessedtxt+\"\\n\"); \n prcessedtxt=\"\";\n finalsen.clear();\n writer.close();\n\n\n \n}", "private ArrayList<String> stemTokens(ArrayList<String> tokens) {\n ArrayList<String> stemmedTokens = new ArrayList<>();\n for (String token : tokens) {\n Stemmer stemmer = new Stemmer();\n // Add each character into the stemmer\n for (int i = 0; i < token.length(); i++) {\n stemmer.add(token.charAt(i));\n }\n\n // Stem the token\n stemmer.stem();\n\n // Retrieve the stemmed token\n String stemmedToken = stemmer.toString();\n\n stemmedTokens.add(stemmedToken);\n }\n\n return stemmedTokens;\n }", "public void parseThesaurus() throws IOException {\r\n\t\t\t//We create an object below to read the thesaurus file\r\n\t\t\tFileInputStream fis = new FileInputStream(\"src//ie//gmit//dip//resources//MobyThesaurus3.txt\");\r\n\t\t\tBufferedReader br=new BufferedReader(new InputStreamReader(fis));\r\n\t\t\t List <List<String>> listOflist= new ArrayList<>();\r\n\t\t\t// HashMap<String,List> tMap = new HashMap<>();\t\t\r\n\t\t\t List <String> individualListOfSynonyms= new ArrayList <String>();\r\n\r\n\t\t\t \r\n\t\t\t //we create a hashmap with the first word being the key value and the rest a list of synonims we will use\r\n\t\t\twhile(br.readLine()!=null) {\r\n\t\t\t\t\r\n\t\t\t\tString somestring = br.readLine();\r\n\t\t\t\tString[] testsplit= somestring.split(\",\");\r\n\t\t\t\tindividualListOfSynonyms=Arrays.asList(testsplit);\r\n\t\t\t\tString indexvalue=individualListOfSynonyms.get(0).toString();\r\n\t\t\t tMap.put(indexvalue, individualListOfSynonyms);\r\n\t\t\t //br.close();\r\n\t\t\t //System.out.println(tMap);\r\n\t\t\t }\r\n\t\t\t}", "public static String stemWordPorter(String word) {\n Stemmer st = new Stemmer();\n st.add(word.toCharArray(), word.length());\n st.stem();\n return st.toString();\n }", "public String stem(String str) {\n\n if (str.length() <= 2) {\n return str;\n }\n String stemmed = super.stem(str);\n while (!stemmed.equals(str)) {\n str = stemmed;\n stemmed = super.stem(stemmed);\n }\n return stemmed;\n }", "public static ArrayList<String> getTerms(String comment){\n\n\t\tString[] terms = comment.split(\"[^a-zA-Z]+\");\n\t\t//if(terms.length == 0) System.out.println(\"error: \" + comment);\n\t\tArrayList<String> termsarray = new ArrayList<String>();\n\t\tfor(int i=0;i<terms.length;i++){\n\t\t\t\n\t\t\tString iterm = terms[i].toLowerCase();\n\t\t\tboolean isStopWord = false;\n\t\t\tfor(String s : stopWord){\n\t\t\t\tif(iterm.equals(s)){\n\t\t\t\t\tisStopWord = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(isStopWord == true)\n\t\t\t\tcontinue;\n\t\t\t\n\t\t\tStemmer stemmer = new Stemmer();\n\t\t\tstemmer.add(iterm.toCharArray(), iterm.length());\n\t\t\tstemmer.stem();\n\t\t\titerm = stemmer.toString();\n\t\t\t\n\t\t\t//System.out.println(iterm);\n\t\t\tif(iterm.length() >=2 && !termsarray.contains(iterm))termsarray.add(iterm);\n\t\t}\n\t\n\t\treturn termsarray;\n\t}", "public void stem()\n\t { k = i - 1;\n\t if (k > 1) { step1(); step2(); step3(); step4(); step5(); step6(); }\n\t i_end = k+1; i = 0;\n\t }", "public static Set<String> preprocessStemAndTokenizeAddBigramsInSet(String data) {\n\t\t//System.out.println(\"Preprocess data, remove stop words, stem, tokenize and get bi-grams ..\");\n\n\t\tSet<String> transformedSet = new LinkedHashSet<String>();\n\t\tList<String> stemmedList = new ArrayList<String>();\n\n\t\t//System.out.println(\"Stop words length:\" + stopwords.size());\n\t\tTokenizer analyzer = new Tokenizer(Version.LUCENE_30);\n\t\tTokenStream tokenStream = analyzer.tokenStream(\"\", new StringReader(data));\n\t\tTermAttribute termAttribute;\n\t\tString term;\n\t\ttry {\n\t\t\twhile (tokenStream.incrementToken()) {\n\t\t\t\ttermAttribute = tokenStream.getAttribute(TermAttribute.class);\n\t\t\t\tterm = termAttribute.term();\n\t\t\t\tif (digitPattern.matcher(term).find()) //ignore digits\n\t\t\t\t\tcontinue;\n\t\t\t\tif (stopwords.contains(term)) //ignore stopwords\n\t\t\t\t\tcontinue;\n\t\t\t\tif (term.length() <= 1) //ignore single letter words\n\t\t\t\t\tcontinue;\n\t\t\t\tstemmer.setCurrent(term);\n\t\t\t\tstemmer.stem();\n\t\t\t\tstemmedList.add(stemmer.getCurrent());\n\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tString[] ds = stemmedList.toArray(new String[0]);\n\n\t\t/*for(int i=0; i<stemmedList.size(); i++)\n\t\t\tSystem.out.print(ds[i]+\"\\t\");*/\n\n\t\t//add bi-grams\n\t\tfinal int size = 2;\n\t\tfor (int i = 0; i < ds.length; i++) {\n\t\t\ttransformedSet.add(ds[i]); //add single words\n\t\t\tif (i + size <= ds.length) {\n\t\t\t\tString t = \"\";\n\t\t\t\tfor (int j = i; j < i + size; j++) {\n\t\t\t\t\tt += \" \" + ds[j];\n\t\t\t\t}\n\t\t\t\tt = t.trim().replaceAll(\"\\\\s+\", \"_\");\n\t\t\t\ttransformedSet.add(t); //add bi-gram combined with \"_\"\n\t\t\t}\n\t\t}\n\t\t//System.out.println(\" \")\n\t\tstemmedList.clear();\n\t\tstemmedList = null;\n\t\tds = null;\n\t\treturn transformedSet;\n\t}", "public ArrayList<String> processText(String text)\r\n\t{\r\n\t\tArrayList<String> terms = new ArrayList<>();\r\n\r\n\t\t// P2\r\n\t\t// Tokenizing, normalizing, stopwords, stemming, etc.\r\n\t\tArrayList<String> tokens = tokenize(text);\r\n\t\tfor(String term: tokens){\r\n\t\t\tString norm = normalize(term);\r\n\t\t\tif(!isStopWord(norm)){\r\n\t\t\t\tString stem = stem(norm);\r\n\t\t\t\tterms.add(stem);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn terms;\r\n\t}", "public static void testDictionary() throws IOException {\n String wnhome=\"c:\\\\Users\\\\Katherine\\\\Documents\\\\2nd sem\\\\IR\\\\project\\\\WordNet_3.1\";\n String path = wnhome + File.separator + \"dict\";\n\n\n URL url = new URL(\"file\", null, path);\n\n IDictionary dictionary = new Dictionary(url);\n dictionary.open();\n // /Users/Ward/Downloads\n IIndexWord indexWord = dictionary.getIndexWord(\"use\", POS.VERB);\n\n for (IWordID wordID : indexWord.getWordIDs()) {\n\n IWord word = dictionary.getWord(wordID);\n for (IWord word1 : word.getSynset().getWords()) {\n System.out.println(word1.getLemma());\n }\n// System.out.println(\"Id = \" + wordID);\n// System.out.println(\" Lemma = \" + word.getLemma());\n// System.out.println(\" Gloss = \" + word.getSynset().getGloss());\n\n List<ISynsetID> hypernyms =\n word.getSynset().getRelatedSynsets(Pointer.HYPERNYM);\n // print out each h y p e r n y m s id and synonyms\n List<IWord> words;\n for (ISynsetID sid : hypernyms) {\n words = dictionary.getSynset(sid).getWords();\n System.out.print(sid + \" {\");\n for (Iterator<IWord> i = words.iterator(); i.hasNext(); ) {\n System.out.print(i.next().getLemma());\n if (i.hasNext())\n System.out.print(\", \");\n }\n System.out.println(\"}\");\n }\n }\n }", "public static String stemvString(String raws)\n\t{\n\t\tString os = \"\";\n\t\tfor (String w : raws.split(\"\\\\s+\"))\n\t\t{\n\t\t\tos = os + dictUtils.getStemWord(w) + \" \";\n\t\t}\n\t\treturn os;\n\t}", "public WordInfo searchWord(String word) {\n\t\tSystem.out.println(\"Dic:SearchWord: \"+word);\n\n\t\tDocument doc;\n\t\ttry {\n\t\t\tdoc = Jsoup.connect(\"https://dictionary.cambridge.org/dictionary/english-vietnamese/\" + word).get();\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\n\t\tElements elements = doc.select(\".dpos-h.di-head.normal-entry\");\n\t\tif (elements.isEmpty()) {\n\t\t\tSystem.out.println(\" not found\");\n\t\t\treturn null;\n\t\t}\n\n\t\tWordInfo wordInfo = new WordInfo(word);\n\n\t\t// Word\n\t\telements = doc.select(\".tw-bw.dhw.dpos-h_hw.di-title\");\n\n\t\tif (elements.size() == 0) {\n\t\t\tSystem.out.println(\" word not found in doc!\");\n\t\t\treturn null;\n\t\t}\n\n\t\twordInfo.setWordDictionary(elements.get(0).html());\n\n\t\t// Type\n\t\telements = doc.select(\".pos.dpos\");\n\n\t\tif(elements.size() > 0) {\n\t\t\twordInfo.setType(WordInfo.getTypeShort(elements.get(0).html()));\n//\t\t\tif (wordInfo.getTypeShort().equals(\"\"))\n//\t\t\t\tSystem.out.println(\" typemis: \"+wordInfo.getType());\n\t\t}\n\n\t\t// Pronoun\n\t\telements = doc.select(\".ipa.dipa\");\n\n\t\tif (elements.size() > 0)\n\t\t\twordInfo.setAPI(\"/\"+elements.get(0).html()+\"/\");\n\n\t\t// Trans\n\t\telements = doc.select(\".trans.dtrans\");\n\n\t\tif (elements.size() > 0)\n\t\t\twordInfo.setTrans(elements.get(0).html());\n\n\t\tSystem.out.println(\" found\");\n\t\treturn wordInfo;\n\t}", "public Set<String> hyponyms(String word) {\n hypernymSet = new TreeSet<String>();\n firstsIDset = new HashSet<Integer>();\n for (String[] synStrings : sFile.values()) {\n for (String synset : synStrings) {\n if (synset.equals(word)) {\n for (String synset2 : synStrings) {\n hypernymSet.add(synset2);\n }\n for (Integer key : sFile.keySet()) {\n if (sFile.get(key).equals(synStrings)) {\n firstsIDset.add(key);\n }\n }\n }\n }\n }\n\n sIDset = GraphHelper.descendants(theDigraph, firstsIDset);\n for (Integer id : sIDset) {\n synsetWordStrings = sFile.get(id);\n for (String word2 : synsetWordStrings) {\n hypernymSet.add(word2);\n }\n }\n return hypernymSet;\n }", "List<Trie> findStemDescending(String stem, int n) {\n if (stem == null)\n return new ArrayList<>();\n Trie start = find(stem);\n if (start == null) {\n return new ArrayList<>();\n }\n return start.findBestNMatches(n);\n }", "public KeyWordList extractKeyWords(String input);", "SList evenWords();", "public String StemWordWithWordNet ( String word )\n {\n if ( !IsInitialized )\n return word;\n if ( word == null ) return null;\n if ( morph == null ) morph = dic.getMorphologicalProcessor();\n\n IndexWord w;\n try\n {\n w = morph.lookupBaseForm( POS.VERB, word );\n if ( w != null )\n return w.getLemma().toString ();\n w = morph.lookupBaseForm( POS.NOUN, word );\n if ( w != null )\n return w.getLemma().toString();\n w = morph.lookupBaseForm( POS.ADJECTIVE, word );\n if ( w != null )\n return w.getLemma().toString();\n w = morph.lookupBaseForm( POS.ADVERB, word );\n if ( w != null )\n return w.getLemma().toString();\n }\n catch ( JWNLException e )\n {\n }\n return null;\n }", "public static String stemSentNSW(String raw)\n\t{\n\t\tString os = \"\";\n\t\tfor (String w : raw.split(\"\\\\s+\"))\n\t\t{\n\t\t\tos = os + dictUtils.stemNSW(w) + \" \";\n\t\t}\n\t\treturn os;\n\t}", "java.lang.String getWord();", "public Set<String> hyponyms(String word) {\n HashSet<String> set = new HashSet<String>();\n for (Integer id: synsets.keySet()) {\n TreeSet<String> hs = synsets.get(id);\n if (hs.contains(word)) {\n for (String s: hs) {\n set.add(s);\n }\n TreeSet<Integer> ids = new TreeSet<Integer>();\n ids.add(id);\n Set<Integer> desc = GraphHelper.descendants(dg, ids);\n for (Integer i: desc) {\n for (String s: synsets.get(i)) {\n set.add(s);\n }\n }\n }\n }\n return set;\n }", "public Set<String> hyponyms(String word) {\n Set<Integer> synIDs = new TreeSet<Integer>();\n Set<Integer> synKeys = synsetMap.keySet();\n for (Integer id : synKeys) {\n if (synsetMap.get(id).contains(word)) {\n synIDs.add(id);\n }\n }\n Set<Integer> hypIDs = GraphHelper.descendants(g, synIDs);\n Set<String> result = new TreeSet<String>();\n\n for (Integer i : hypIDs) {\n ArrayList<String> al = synsetMap.get(i);\n result.addAll(al);\n }\n return result;\n }", "public static void getSynonyms(ArrayList<String> keywords) {\n final String endpoint = \"http://www.dictionaryapi.com/api/v1/references/collegiate/xml/\";\n final String key = \"79b70eee-858c-486a-b155-a44db036bfe0\";\n try {\n for (String keyword : keywords) {\n String url = endpoint + keyword + \"?key=\" + key;\n System.out.print(\"url--\" + url);\n URL obj = new URL(url);\n HttpURLConnection con = (HttpURLConnection) obj.openConnection();\n con.setRequestProperty(\"User-Agent\", USER_AGENT);\n BufferedReader in = new BufferedReader(\n new InputStreamReader(con.getInputStream()));\n String inputLine;\n StringBuffer response = new StringBuffer();\n\n while ((inputLine = in.readLine()) != null) {\n response.append(inputLine);\n }\n in.close();\n\n //print result\n System.out.println(response.toString());\n\n DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\n DocumentBuilder builder;\n InputSource is;\n try {\n builder = factory.newDocumentBuilder();\n is = new InputSource(new StringReader(response.toString()));\n Document doc = builder.parse(is);\n NodeList list = doc.getElementsByTagName(\"syn\");\n System.out.println(\"synonyms\" + list.item(0).getTextContent());\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n }\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void indexing(String seedPage) {\n webCrawler wbc = new webCrawler();\n webPage wbp = new webPage();\n urlList = wbc.crawl(seedPage);\n for(int i = 0; i < urlList.size(); i++) {\n String url = urlList.get(i);\n try {\n Document doc = wbp.getContent(url);\n finalWords = wbp.getAllWords(url);\n } catch(Exception e) {\n e.printStackTrace();\n }\n }\n }", "public Set<String> hyponyms(String word) {\n Set<String> hyponyms = new HashSet<String>();\n Set<Integer> ids = new HashSet<Integer>();\n for (Integer key: synsetNouns.keySet()) {\n if (synsetNouns.get(key).contains(word)) {\n ids.add(key);\n }\n }\n Set<Integer> descendants = GraphHelper.descendants(hyponym, ids);\n for (Integer j: descendants) {\n for (String value: synsetNouns.get(j)) {\n hyponyms.add(value);\n }\n }\n return hyponyms;\n }", "public static String preprocessStemAndTokenizeAddBigramsInString(String data) {\n\t\t//System.out.println(\"Preprocess data, remove stop words, stem, tokenize and get bi-grams ..\");\n\n\t\tSet<String> transformedSet = new LinkedHashSet<String>();\n\t\tList<String> stemmedList = new ArrayList<String>();\n\n\t\tTokenizer analyzer = new Tokenizer(Version.LUCENE_30);\n\t\tTokenStream tokenStream = analyzer.tokenStream(\"\", new StringReader(data));\n\t\tTermAttribute termAttribute;\n\t\tString term;\n\t\ttry {\n\t\t\twhile (tokenStream.incrementToken()) {\n\t\t\t\ttermAttribute = tokenStream.getAttribute(TermAttribute.class);\n\t\t\t\tterm = termAttribute.term();\n\t\t\t\tif (digitPattern.matcher(term).find()) //ignore digits\n\t\t\t\t\tcontinue;\n\t\t\t\tif (stopwords.contains(term)) //ignore stopwords\n\t\t\t\t\tcontinue;\n\t\t\t\tif (term.length() <= 1) //ignore stopwords\n\t\t\t\t\tcontinue;\n\t\t\t\tstemmer.setCurrent(term);\n\t\t\t\tstemmer.stem();\n\t\t\t\tstemmedList.add(stemmer.getCurrent());\n\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tString[] ds = stemmedList.toArray(new String[0]);\n\n\t\t/*for(int i=0; i<stemmedList.size(); i++)\n\t\t\tSystem.out.print(ds[i]+\"\\t\");*/\n\n\t\t//add bi-grams\n\t\tfinal int size = 2;\n\t\tfor (int i = 0; i < ds.length; i++) {\n\t\t\ttransformedSet.add(ds[i]); //add single words\n\t\t\tif (i + size <= ds.length) {\n\t\t\t\tString t = \"\";\n\t\t\t\tfor (int j = i; j < i + size; j++) {\n\t\t\t\t\tt += \" \" + ds[j];\n\t\t\t\t}\n\t\t\t\tt = t.trim().replaceAll(\"\\\\s+\", \"_\");\n\t\t\t\ttransformedSet.add(t); //add bi-gram combined with \"_\"\n\t\t\t}\n\t\t}\n\t\t//System.out.println(transformedSet.toArray(new String[transformedSet.size()]).toString());\n\t\treturn StringUtils.join( transformedSet.toArray(new String[transformedSet.size()]), \" \");\n\t\t\n\t}", "public void getTerm()\n\t\t{\n\t\t\t//Open SciencePhrases.txt\n\t\t\tFile f1 = new File(\"SciencePhrases.txt\");\n\n\t\t\ttry\n\t\t\t{\n\t\t\t\tspIn = new Scanner(f1);\n\t\t\t}\n\t\t\tcatch(FileNotFoundException e)\n\t\t\t{\n\t\t\t\tSystem.err.println(\"Cannot create SciencePhrases.txt to be written \"\n\t\t\t\t\t\t+ \"to.\");\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\n\t\t\t//Storing term at curTerm in the variables term and picTerm\n\t\t\tString cur = new String(\"\");\n\t\t\tfor(int i = 0; i<curTerm; i++)\n\t\t\t{\n\t\t\t\tterm = \"\";\n\t\t\t\twhile(!cur.equals(\"-\"))\n\t\t\t\t\tcur = spIn.nextLine();\n\t\t\t\tcur = spIn.nextLine();\n\t\t\t\tpicTerm = cur;\n\t\t\t\tcur = spIn.nextLine();\n\t\t\t\twhile(!cur.equals(\"-\"))\n\t\t\t\t{\n\t\t\t\t\tterm += cur;\n\t\t\t\t\tcur = spIn.nextLine();\n\t\t\t\t}\n\t\t\t}\t\n\t\t}", "public Glyph getStem ()\r\n {\r\n return stem;\r\n }", "public static LinkedList<Word> getPracticedWords() {\n return favWords;\n }", "private void populateDictionaryBySynonyms() {\n\n Enumeration e = dictionaryTerms.keys();\n while (e.hasMoreElements()) {\n String word = (String) e.nextElement();\n String tag = dictionaryTerms.get(word);\n\n ArrayList<String> synonyms = PyDictionary.findSynonyms(word);\n\n for (int i = 0; i < synonyms.size(); i++) {\n if (!dictionaryTerms.containsKey(synonyms.get(i))) {\n dictionaryTerms.put(synonyms.get(i), tag);\n }\n }\n }\n }", "public Iterator<String> words();", "public static String stemNSW(String word)\n\t{\n\t\treturn isNSW(getRoot(word.toLowerCase()));\n\t}", "public static String getRoot(String word)\n\t{\n\t\treturn (new Stemmer()).stem(word);\n\t}", "public static List<ExtractedEntity> extractEntities(String text){\n\t\tList<ExtractedEntity> extractedConcepts = new ArrayList<ExtractedEntity>();\n\t\tZemanta zem = new Zemanta(ZEMAMTA_API_KEY);\t\n\t\tZemantaResult zemResult = zem.suggest(text);\n\t\tString cid = zemResult.rid;\n\t\tfor(Link link : zemResult.markup.links){\n\t\t\tString term = link.anchor;\n\t\t\tfor(Target target : link.targets){\n\t\t\t\tif(target.url != null && target.url.startsWith(\"http://en.wikipedia.org/wiki/\")){\n\t\t\t\t\tExtractedEntity entity = new AlchemyAnnotator().new ExtractedEntity();\n\t\t\t\t\tentity.name = target.title;\n\t\t\t\t\tentity.type = target.type.name();\n\t\t\t\t\tentity.uri = target.url.replace(\"http://en.wikipedia.org/wiki/\", \"http://dbpedia.org/resource/\");\n\t\t\t\t\tentity.score = new Float(link.confidence).doubleValue();\n\t\t\t\t\tentity.text = link.anchor;\n\t\t\t\t\textractedConcepts.add(entity);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn extractedConcepts;\n\t}", "public List<String> predict(String term) {\n\t\tList<String> results = new ArrayList<String>();\n\t\tif (term == null) {\n\t\t\treturn results;\n\t\t}\n\t\tString formattedTerm = term.strip().toLowerCase();\n\t\tif (formattedTerm.length() < this.minimumNumberOfCharacters) {\n\t\t\treturn results;\n\t\t}\n\t\t\n\t\tQueue<Character> characters = this.toCharacterQueue(formattedTerm);\n\t\tNode lastCharacterNode = this.getLastCharacterNode(this.root, characters);\n\t\tif (lastCharacterNode != null) {\n\t\t\tList<String> fragments = this.getChildrenFragments(lastCharacterNode);\n\t\t\tfor (String fragment : fragments) {\n\t\t\t\tresults.add(formattedTerm.substring(0, formattedTerm.length() - 1) + fragment);\n\t\t\t}\n\t\t}\n\t\treturn results;\n\t}", "public static String[] webServicePreferredTerms() throws Exception {\n HttpGet httpGet = null;\n CloseableHttpClient httpClient = HttpClientBuilder.create().build();\n String[] preferredTerms = null;\n \n if (PREFERRED_TERMS_ARRAY != null) {\n preferredTerms = PREFERRED_TERMS_ARRAY;\n }\n else {\n try {\n httpGet = new HttpGet(PREFERRED_TERMS_SERVICE_URL);\n HttpResponse httpResponse = httpClient.execute(httpGet);\n int statusCode = httpResponse.getStatusLine().getStatusCode();\n if (statusCode == HttpStatus.SC_OK) {\n HttpEntity httpEntity = httpResponse.getEntity();\n String entityString = EntityUtils.toString(httpEntity);\n if (entityString != null) {\n preferredTerms = entityString.split(\"\\n\");\n PREFERRED_TERMS_ARRAY = preferredTerms;\n }\n }\n }\n finally {\n \t\tcloseHttpClient(httpClient);\n \t }\n }\n\n return preferredTerms;\n }", "public String normalize(String word);", "public Set<String> hyponyms(String word) {\n Set<Integer> wordIds = revrseSynsetMapper.get(word);\n Set<String> superSet = new HashSet<String>();\n Set<Integer> descendant = GraphHelper.descendants(hypGraph, wordIds);\n Iterator<Integer> iter = descendant.iterator();\n while (iter.hasNext()) {\n Set<String> string_word = synsetMapper.get(iter.next());\n Iterator<String> A = string_word.iterator();\n while (A.hasNext()) {\n superSet.add(A.next());\n }\n }\n return superSet;\n }", "public void setStem (Glyph stem)\r\n {\r\n this.stem = stem;\r\n }", "String getSynonyms();", "@Override\r\n\tpublic String getName() {\r\n\t\treturn \"StemMethodAnalyzer\";\r\n\t}", "public static LinkedList<String> getSynonym(String word) {\n\t\tLinkedList<String> res = new LinkedList<String>();\n\t\tif (dict.containsKey(word)) {\n\t\t\tres = dict.get(word);\n\t\t}\n\t\treturn res;\n\t}", "public abstract Set<String> getTerms(Document doc);", "public List<String> findPhrases() {\n\t\t\n\t\tTrie root = new Trie();\n\t\tList<String> result = new ArrayList<>();\n\t\tQueue<TrieNode> queue = new LinkedList<>();\n\n\t\tfor (String phrase : phrases) {\n\t\t\t// build the trie\n\t\t\t\n\t\t\troot.insert(phrase);\n\t\t}\n\t\t\n\t\t// initialize the queue\n\t\tqueue.offer(root.getRootNode());\n\t\t\t\t\n\t\tfor (String word : stream) {\n\t\t\t\n\t\t\t// Search one word at a time and store TrieNodes that match this word.\n\t\t\t// If the current word extends a previous TrieNode, it may be a matching phrase\n\t\t\t\n\t\t\t// buffer to store current matches\n\t\t\tQueue<TrieNode> buffer = new LinkedList<>();\n\t\t\t\n\t\t\twhile(!queue.isEmpty()) {\n\t\t\t\t// iterate through previous matches\n\t\t\t\t\n\t\t\t\tTrieNode next = queue.poll().find(word);\n\t\t\t\t\n\t\t\t\tif (next != null) {\n\t\t\t\t\t\n\t\t\t\t\t// if this word extends the previous word, add it to the buffer\n\t\t\t\t\t// in case the next word can also extend it\n\t\t\t\t\t\n\t\t\t\t\tbuffer.offer(next);\n\t\t\t\t\t\n\t\t\t\t\tif (next.isPhrase()) {\n\t\t\t\t\t\t// if we found a valid phrase node, add it to the result\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tresult.add(next.getPhrase());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tqueue = buffer;\n\t\t\tqueue.offer(root.getRootNode());\n\t\t}\n\t\t\n\t\treturn result;\n\t}", "public List<Stem> uniqueStems(char word[], int length) {\n List<Stem> stems = new ArrayList<Stem>();\n CharArraySet terms = new CharArraySet(dictionary.getVersion(), 8, dictionary.isIgnoreCase());\n if (dictionary.lookupWord(word, 0, length) != null) {\n stems.add(new Stem(word, length));\n terms.add(word);\n }\n List<Stem> otherStems = stem(word, length, null, 0);\n for (Stem s : otherStems) {\n if (!terms.contains(s.stem)) {\n stems.add(s);\n terms.add(s.stem);\n }\n }\n return stems;\n }", "public String SnowballStemmingDemo(String token) {\n\t\tSnowballStemmer stemmer = new englishStemmer();\n\t\tstemmer.setCurrent(token);\n\t\tif (stemmer.stem())\n\t\t\treturn stemmer.getCurrent();\n\t\telse\n\t\t\treturn token;\n\t}", "public interface Stemmer {\r\n/**\r\n * <li>Get the stem of a word.\r\n * @return java.lang.String Stem\r\n * @param word java.lang.String Word\r\n */\r\nString stemOf (String word);\r\n}", "static void ReadQuery(String input) throws FileNotFoundException {\n input = input.replaceAll(\"[^A-Za-z]\",\" \");\n String[] arr = input.split(\" \"); // splitting the whole string into words by split on the basis of white spaces\n\n\n for(int i=0; i<arr.length; i++) {\n String termWord = arr[i].toLowerCase();\t//same pre-processing is applied to all the query word\n //termWord = RemoveSpecialCharacter(termWord);\n termWord = removeStopWords(termWord);\n\n if(!termWord.equalsIgnoreCase(\"\")) { // all the white spaces are removed as if not removed then lemmatization wont be successfully done\n\n termWord = Lemmatize(termWord);\n System.out.println(termWord);\n if(dictionary.containsKey(termWord)) {\n List<Integer> wordList = new ArrayList<>();\n wordList = dictionary.get(termWord);\n int queryWordFrequency = wordList.get(totaldocument);\n queryWordFrequency++;\n wordList.set(totaldocument, queryWordFrequency); // all the frequencies of the query words are stored at the 56th index of the List stored in the\n //hashmap associated with its word-terms\n dictionary.put(termWord, wordList);\n }\n else {\n //if any of the enterd query word not present in all the docs so list will have 0.0 value from 0th index to 55th and 56th index is reserver\n // for query word frequency\n List<Integer> wordList = new ArrayList<>();\n for(int j=0; j<totaldocument+1; j++) {\n wordList.add(0);\n }\n wordList.add(1);\n dictionary.put(termWord, wordList); //updating the dictionary hashmap now containing all the query words frequencies\n }\n }\n }\n save();\n }", "private Map<String,Map<String,List<String>>> buildDictionary(Document doc){\n\t\t\n\t\tElement root = doc.getDocumentElement();\n\t\t\n\t\t\n\t\tMap<String,Map<String,List<String>>> dictionary = new HashMap<String,Map<String,List<String>>>();\n\t\tthis.termSet = new TreeSet<String>();\n\t\t\n\t\tNodeList termList = doc.getElementsByTagName(\"term\");\n\t\tfor(int i = 0; i < termList.getLength(); i++){\n\t\t\tElement termElement = (Element) termList.item(i);\n\t\t\tElement nameElement = (Element) termElement.getElementsByTagName(\"name\").item(0);\n\t\t\tString name = nameElement.getTextContent();\n\t\t\tthis.termSet.add(name);\n\n\t\t\tMap<String,List<String>> synonymGroup = new HashMap<String,List<String>>();\n\t\t\tsynonymGroup.put(\"exact\", new ArrayList<String>());\n\t\t\tsynonymGroup.put(\"related\", new ArrayList<String>());\n\t\t\tsynonymGroup.put(\"broad\", new ArrayList<String>());\n\t\t\tsynonymGroup.put(\"narrow\", new ArrayList<String>());\n\t\t\t\n\t\t\tNodeList synonyms = termElement.getElementsByTagName(\"synonym\");\n\t\t\tfor(int j=0; j<synonyms.getLength(); j++){\n\t\t\t\tElement synonymElement = (Element) synonyms.item(j);\n\t\t\t\tString synonym = synonymElement.getTextContent();\n\t\t\t\tString scope = synonymElement.getAttribute(\"scope\");\n\t\t\t\t//System.out.println(scope);\n\t\t\t\tList<String> synonymList = (List<String>) synonymGroup.get(scope);\n\t\t\t\t\n\t\t\t\t//System.out.println(synonym);\n\t\t\t\t\n\t\t\t\tsynonymList.add(synonym);\n\t\t\t}\n\t\t\t\n\t\t\tdictionary.put(name,synonymGroup);\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\treturn dictionary;\n\t}", "public String PorterStemmingDemo(String token) {\n\t\tporterStemmer stemmer = new porterStemmer();\n\t\tstemmer.setCurrent(token);\n\t\tif (stemmer.stem())\n\t\t\treturn stemmer.getCurrent();\n\t\telse\n\t\t\treturn token;\n\t}", "SList oddWords();", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"nam(s) of edit(s), typ as indic in th latic book. if ther is als an author field, then th edit field giv th edit of th bok or cllect in which th refer appear.\");\n assertEquals(\"nam(s) of edit(s), typ as ind in th lat book. if ther is al an author field, then th edit field giv th edit of th bok or cllect in which th refer appear.\", string0);\n }", "public List < Stem > getSelectedStem() {\r\n\r\n List < Stem > result = new ArrayList < Stem >();\r\n List < Sortable > selected = this.stemSearch.getSelected();\r\n for (Sortable sortable : selected) {\r\n result.add((Stem) sortable);\r\n }\r\n return result;\r\n }", "List<T> getWord();", "public Set<String> hyponyms(String word) {\n HashSet<String> allhyponyms = new HashSet<String>();\n int maxV = synset.size();\n // int maxV = 0;\n // for (Integer i : synset.keySet()) {\n // if (maxV < i) {\n // maxV = i;\n // }\n // }\n // maxV += 1;\n Digraph digraph = new Digraph(maxV);\n\n // ArrayList<Integer> hypoKeys = new ArrayList<Integer>();\n // for (int i = 0; i < hyponym.size(); i++) {\n // hypoKeys.add(hyponym.get(0).get(i));\n // }\n \n for (ArrayList<Integer> a : hyponym) {\n int key = a.get(0);\n for (int j = 1; j < a.size(); j++) {\n digraph.addEdge(key, a.get(j));\n }\n }\n\n // get synonyms (in same synset), ex. given \"jump\", will get \"parachuting\" as well as \"leap\"\n ArrayList<String> strArray = new ArrayList<String>();\n for (Integer k : getSynsetKeys(word)) {\n strArray.addAll(synset.get(k));\n }\n for (String str : strArray) {\n allhyponyms.add(str);\n }\n\n // for each int from set<int> with all synset IDS\n for (Integer s : GraphHelper.descendants(digraph, getSynsetKeys(word))) {\n for (String t : synset.get(s)) {\n allhyponyms.add(t);\n }\n }\n return allhyponyms;\n }", "public void countWord() {\n\t\tiniStorage();\n\t\tWordTokenizer token = new WordTokenizer(\"models/jvnsensegmenter\",\n\t\t\t\t\"data\", true);\n\t\t// String example =\n\t\t// \"Nếu bạn đang tìm kiếm một chiếc điện thoại Android? Đây là, những smartphone đáng để bạn cân nhắc nhất. Thử linh tinh!\";\n\t\t// token.setString(example);\n\t\t// System.out.println(token.getString());\n\n\t\tSet<Map.Entry<String, String>> crawlData = getCrawlData().entrySet();\n\t\tIterator<Map.Entry<String, String>> i = crawlData.iterator();\n\t\twhile (i.hasNext()) {\n\t\t\tMap.Entry<String, String> pageContent = i.next();\n\t\t\tSystem.out.println(pageContent.getKey());\n\t\t\tPageData pageData = gson.fromJson(pageContent.getValue(),\n\t\t\t\t\tPageData.class);\n\t\t\ttoken.setString(pageData.getContent().toUpperCase());\n\t\t\tString wordSegment = token.getString();\n\t\t\tString[] listWord = wordSegment.split(\" \");\n\t\t\tfor (String word : listWord) {\n\t\t\t\taddToDictionary(word, 1);\n\t\t\t\tDate date;\n\t\t\t\ttry {\n\t\t\t\t\tdate = simpleDateFormat.parse(pageData.getTime().substring(\n\t\t\t\t\t\t\t0, 10));\n\t\t\t\t} catch (ParseException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\taddToStatByDay(date, word, 1);\n\t\t\t}\n\t\t}\n\t}", "public Stemmer ()\n {\n AllWords = new HashMap<String,String>();\n dictionary = Dictionary.getInstance();\n p = PointerUtils.getInstance();\n\n try\n {\n // JWNL.initialize(new FileInputStream(\"file_properties.xml\"));\n JWNLConnecter.initializeJWNL();\n dic = Dictionary.getInstance();\n morph = dic.getMorphologicalProcessor();\n // ((AbstractCachingDictionary)dic).\n //\tsetCacheCapacity (10000);\n IsInitialized = true;\n }\n catch (Exception e){\n System.err.println(e.getMessage());\n }\n /*catch ( FileNotFoundException e )\n {\n System.out.println ( \"Error initializing Stemmer: JWNLproperties.xml not found\" );\n }\n catch ( JWNLException e )\n {\n System.out.println ( \"Error initializing Stemmer: \"\n + e.toString() );\n }*/\n\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"weka.core.stemmers.lovinsstemmeryt\");\n assertEquals(\"wek.cor.stemmer.lovinsstemmerys\", string0);\n }", "public Map<String, Object> getIE(String text, FallBackListBased pd) {\n\t\ttext = text.replaceAll(\" � \", \", \");\n\t\ttext = text.replaceAll(\"'s \", \" \");\n\t\ttext = text.replaceAll(\"'s\", \"\");\n\t\ttext = text.replaceAll(\"�s \", \" \");\n\t\ttext = text.replaceAll(\"�s \", \" \");\n\t\ttext = text.replaceAll(\"\\\\?\", \"\");\n\t\ttext = text.replaceAll(\":\", \"\");\n\t\tMap<String, Object> entities_map = new TreeMap<String, Object>();\n\t\tMap<String, Object> extractedEntities = new TreeMap<String, Object>();\n\t\tList<TreeMap<String, String>> entities = new ArrayList<TreeMap<String, String>>();\n\t\tList<TreeMap<String, String>> intents= new ArrayList<TreeMap<String, String>>();\n\t\tSet<String> intentsList=new HashSet<String>();\n\t\tSet<String> entitiesList=new HashSet<String>();\n\t\t\n\t\tString input = text;\n\t\t// text=text.replaceAll(\" \", \" \");\n\t\tSpan spanSentences[] = pd.sentenceDetector.sentPosDetect(input);\n\t\tint sentenceId = 1;\n\t\tTreeMap<String, String> intents_map = new TreeMap<String, String>();\n\t\tDouble entites_highest_cofidence = 0.0;\n\t\tDouble intents_highest_cofidence = 0.0;\n\t\tfor (Span sentence : spanSentences) {\n\t\t\tArrayList<PhraseTemplate> phrases = pd.GetPhrases(sentence\n\t\t\t\t\t.getCoveredText(input).toString(), sentenceId++);\n\t\t\t\n\t\t\tfor (PhraseTemplate svo : phrases) {\n\t\t\t\tString key = svo.phrase;\n\t\t\t\tkey = key.replaceAll(\" is \", \"\");\n\t\t\t\tkey = key.replaceAll(\"What \", \"\");\n\t\t\t\tkey = key.replaceAll(\"what \", \"\");\n\t\t\t\tkey = key.replaceAll(\" the \", \"\");\n\n\t\t\t\tif (key.length() > 1) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tString resolvedEntity = lss.resolveEntity(key\n\t\t\t\t\t\t\t\t.toLowerCase().trim().toString(),\n\t\t\t\t\t\t\t\t\"entitesIndex\");\n\t\t\t\t\t\tString tokens[] = resolvedEntity.split(\"__\");\n//\t\t\t\t\t\tSystem.out.println(resolvedEntity+\" :: \"+key);\n\t\t\t\t\t\tif (tokens.length < 2)\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\tif (tokens[1].trim().startsWith(\"entity\")\n\t\t\t\t\t\t\t\t&& Double.parseDouble(tokens[5].trim())>0.9)\n\t\t\t\t\t\t\tentitiesList.add(tokens[5].trim());\n\t\t\t\t\t\tif (tokens[1].trim().startsWith(\"entity\")\n\t\t\t\t\t\t\t\t&& Double.parseDouble(tokens[5].trim()) > entites_highest_cofidence) {\n\t\t\t\t\t\t\tentities_map.clear();\n\t\t\t\t\t\t\tentities_map.put(\"Entity\", key.trim());\n\t\t\t\t\t\t\tentities_map.put(\"MappedEntity\", tokens[4].trim());\n\t\t\t\t\t\t\tentities_map.put(\"EntityConfidenceScore\", tokens[5].trim());\n\t\t\t\t\t\t\tentities_map.put(\"MappedEntityType\", tokens[2].trim());\n\t\t\t\t\t\t\tentites_highest_cofidence = Double\n\t\t\t\t\t\t\t\t\t.parseDouble(tokens[5].trim());\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (tokens[1].trim().startsWith(\"intent\")\n\t\t\t\t\t\t\t\t&& Double.parseDouble(tokens[5].trim())>0.9)\n\t\t\t\t\t\t\tintentsList.add(tokens[5].trim());\n\t\t\t\t\t\tif (tokens[1].trim().startsWith(\"intent\")\n\t\t\t\t\t\t\t\t&& Double.parseDouble(tokens[5].trim()) > intents_highest_cofidence) {\n\t\t\t\t\t\t\tintents_map.clear();\n\t\t\t\t\t\t\tintents_map.put(\"Id\", tokens[0].trim());\n\t\t\t\t\t\t\tintents_map.put(\"Extracted Entity\", key.trim());\n\t\t\t\t\t\t\tintents_map.put(\"Mapped Entity\", tokens[4].trim());\n\t\t\t\t\t\t\tintents_map.put(\"Confidence\", tokens[5].trim());\n\t\t\t\t\t\t\tintents_map.put(\"Class\", tokens[1].trim());\n\t\t\t\t\t\t\tintents_highest_cofidence = Double\n\t\t\t\t\t\t\t\t\t.parseDouble(tokens[5].trim());\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tentities_map.put(\"Intent\", intents_map.get(\"Extracted Entity\"));\n\t\tentities_map.put(\"MappedIntent\", intents_map.get(\"Mapped Entity\"));\n\t\tentities_map.put(\"IntentConfidenceScore\", intents_map.get(\"Confidence\"));\n\n\t\treturn entities_map;\n\t}", "private static void printStemResults(String originalWord, List<Stem> stems) {\n StringBuilder builder = new StringBuilder().append(\"stem(\").append(originalWord).append(\")\").append(\"\\n\");\n\n for (Stem stem : stems) {\n builder.append(\"- \").append(stem.getStem()).append(\": \");\n\n for (HunspellAffix prefix : stem.getPrefixes()) {\n builder.append(prefix.getAppend()).append(\"+\");\n\n if (hasText(prefix.getStrip())) {\n builder.append(prefix.getStrip()).append(\"-\");\n }\n }\n\n builder.append(stem.getStem());\n\n for (HunspellAffix suffix : stem.getSuffixes()) {\n if (hasText(suffix.getStrip())) {\n builder.append(\"-\").append(suffix.getStrip());\n }\n \n builder.append(\"+\").append(suffix.getAppend());\n }\n builder.append(\"\\n\");\n }\n\n System.out.println(builder);\n }", "private List<Stem> stem(char word[], int length, char[] flags, int recursionDepth) {\n List<Stem> stems = new ArrayList<Stem>();\n\n for (int i = 0; i < length; i++) {\n List<HunspellAffix> suffixes = dictionary.lookupSuffix(word, i, length - i);\n if (suffixes == null) {\n continue;\n }\n\n for (HunspellAffix suffix : suffixes) {\n if (hasCrossCheckedFlag(suffix.getFlag(), flags)) {\n int deAffixedLength = length - suffix.getAppend().length();\n // TODO: can we do this in-place?\n String strippedWord = new StringBuilder().append(word, 0, deAffixedLength).append(suffix.getStrip()).toString();\n\n List<Stem> stemList = applyAffix(strippedWord.toCharArray(), strippedWord.length(), suffix, recursionDepth);\n for (Stem stem : stemList) {\n stem.addSuffix(suffix);\n }\n\n stems.addAll(stemList);\n }\n }\n }\n\n for (int i = length - 1; i >= 0; i--) {\n List<HunspellAffix> prefixes = dictionary.lookupPrefix(word, 0, i);\n if (prefixes == null) {\n continue;\n }\n\n for (HunspellAffix prefix : prefixes) {\n if (hasCrossCheckedFlag(prefix.getFlag(), flags)) {\n int deAffixedStart = prefix.getAppend().length();\n int deAffixedLength = length - deAffixedStart;\n\n String strippedWord = new StringBuilder().append(prefix.getStrip())\n .append(word, deAffixedStart, deAffixedLength)\n .toString();\n\n List<Stem> stemList = applyAffix(strippedWord.toCharArray(), strippedWord.length(), prefix, recursionDepth);\n for (Stem stem : stemList) {\n stem.addPrefix(prefix);\n }\n\n stems.addAll(stemList);\n }\n }\n }\n\n return stems;\n }", "public void computeWords(){\n\n loadDictionary();\n\n CharacterGrid characterGrid = readCharacterGrid();\n\n Set<String> wordSet = characterGrid.findWordMatchingDictionary(dictionary);\n\n System.out.println(wordSet.size());\n for (String word : wordSet) {\n\t System.out.println(word);\n }\n\n // System.out.println(\"Finish scanning character grid in \" + (System.currentTimeMillis() - startTime) + \" ms\");\n }", "public static ArrayList<String> findWords(TrieNode root) {\n\t\tArrayList<String> result = new ArrayList<String>();\n\t\tgetWords(root, \"\", result);\n\t\treturn result;\n\t}", "public List<Term> getAllTermsByDictionary(String table, String dictionary) {\n List<Term> termList = new ArrayList<Term>();\n\n // Select All Query\n String selectQuery = \"SELECT * FROM \" + table + \" WHERE \" + KEY_DICTIONARY + \" = '\" + dictionary + \"' ORDER BY \" + KEY_TERM;\n\n SQLiteDatabase db = this.getWritableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n\n // looping through all rows and adding to list\n if (cursor.moveToFirst()) {\n do {\n if (!cursor.getString(2).isEmpty()) {\n /*\n Term term = new Term();\n term.setId(Integer.parseInt(cursor.getString(0)));\n term.setDictionary(cursor.getString(1));\n term.setTerm(cursor.getString(2));\n term.setSubject(cursor.getString(3));\n term.setDefinition(cursor.getString(4));\n term.setSynonyms(cursor.getString(5));\n */\n Term term = new Term(Integer.parseInt(cursor.getString(0)),cursor.getString(1), cursor.getString(2), cursor.getString(3),\n cursor.getString(4), cursor.getString(5), Integer.parseInt(cursor.getString(6)));\n // Adding term to list\n termList.add(term);\n }\n } while (cursor.moveToNext());\n }\n\n // return term list\n return termList;\n }", "public Word(String s) throws FileNotFoundException, IOException, ParseException {\r\n\t\tword = s;\r\n\t\tjsonOsFile = downloadJSON(\"https://en.wikipedia.org/w/api.php?action=opensearch&format=json&search=\");\r\n\t\tjsonOsFile.deleteOnExit();\r\n\t\tjsonPageFile = downloadJSON(\"https://en.wikipedia.org/w/api.php?action=query&prop=revisions&rvprop=content&format=json&titles=\");\r\n\t\tjsonPageFile.deleteOnExit();\r\n\t\tjsonOsArray = (JSONArray)(new JSONParser().parse(new FileReader(\"JSON/\" + this.word + \"_opensearch.json\")));\r\n\t\tjsonPageObject = (JSONObject) (new JSONParser().parse(new FileReader(\"JSON/\" + this.word + \"_wikipage.json\")));\r\n\t\t\r\n\t\t//At this point, we have downloaded and saved our OpenSearch.json and Wikipage.json accordingly. \r\n\t\t\r\n\t\tjparse = new JParser();\r\n\t\trelPageStrings = jparse.getRelatedPages(jsonOsArray);\r\n\t\trelPageDesc = jparse.getRelatedPageDesc(jsonOsArray);\r\n\t\t\r\n\t\t//Retrieves all of the words on the wiki page. Still requires parsing into readable data. Pages are denoted by [[ ]] surrounding them.\r\n\t\twikipageArray = jparse.getPageContents(jsonPageObject);\r\n\t\t\r\n\t\tpageKeywords = jparse.getKeysOnPage(wikipageArray);\r\n\t\t\r\n\t}", "public static List<String> validHtmlWords(String url)\n\t{\n\t\tString htmlString = \"\";\n\t\ttry\n\t\t{\n\t\t\thtmlString = HTMLText(url);\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tlogger.error(e.getMessage(), e);\n\t\t}\n\t\tList<String> words = getWords(htmlString);\n\t\tList<String> validWords = validWords(words);\n\t\treturn validWords;\n\t}", "public String findAntonyms(String word) throws IOException {\n try {\n word = word.toLowerCase();\n String check = dictionaryDao.readDB(word);\n if(!check.contains(\"null\"))\n return dictionaryDao.readDB(word); //checkFile(word);\n DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\n URL url = new URL(PATH + word + XML);\n URLConnection connection = url.openConnection();\n Document doc = parseXML(connection.getInputStream());\n NodeList xml = doc.getElementsByTagName(\"w\");\n String xmlElementValue = null;\n ArrayList<String> antonymsCollection = new ArrayList<>();\n\n for (int i = 0; i < xml.getLength(); i++) {\n Element element = (Element) xml.item(i);\n if (isAntonym(element.getAttribute(\"r\"))) {\n xmlElementValue = element.getTextContent();\n antonymsCollection.add(xmlElementValue);\n }\n }\n\n String lastElement = antonymsCollection.get(antonymsCollection.size()-1);\n String antonymsCollectionString = \"\";\n\n for(String s : antonymsCollection) {\n if(!s.equals(lastElement))\n antonymsCollectionString += s + \", \";\n else\n antonymsCollectionString += s + \".\";\n }\n dictionaryDao.addToDB(word, antonymsCollectionString); //saveToFile(word, antonymsCollectionString);\n return \"Antonym/s for \" + word + \": \" + antonymsCollectionString;\n } catch (UnknownHostException e) {\n return INTERNECT_CONNECTION;\n } catch (NullPointerException e) {\n return INCORRECT_WORD;\n } catch (ArrayIndexOutOfBoundsException e) {\n return INCORRECT_WORD;\n } catch(IOException e){\n return INCORRECT_WORD;\n } catch (JdbcSQLException e) {\n return DATABASE_ERROR;\n } catch (Exception e) {\n StringWriter errors = new StringWriter();\n e.printStackTrace(new PrintWriter(errors));\n return errors.toString();\n }\n }", "private static void splitWord() {\n\t\tint i = 1;\r\n\t\tfor(String doc : DocsTest) {\r\n\t\t\tArrayList<String> wordAll = new ArrayList<String>();\r\n\t\t\tfor (String word : doc.split(\"[,.() ; % : / \\t -]\")) {\r\n\t\t\t\tword = word.toLowerCase();\r\n\t\t\t\tif(word.length()>1 && !mathMethod.isNumeric(word)) {\r\n\t\t\t\t\twordAll.add(word);\r\n\t\t\t\t\tif(!wordList.contains(word)) {\r\n\t\t\t\t\t\twordList.add(word);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\twordAll.removeAll(stopword);\r\n\t\t\tDoclist.put(i, wordAll);\r\n\t\t\ti++;\r\n\t\t}\r\n\t\twordList.removeAll(stopword);\r\n\t}", "public static List<Chord> getStemChords (Measure measure,\r\n Glyph stem)\r\n {\r\n List<Chord> chords = new ArrayList<>();\r\n\r\n for (TreeNode node : measure.getChords()) {\r\n Chord chord = (Chord) node;\r\n\r\n if (chord.getStem() == stem) {\r\n chords.add(chord);\r\n }\r\n }\r\n\r\n return chords;\r\n }", "@Test(timeout = 4000)\n public void test47() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"th sponsor institut of a techn report.uas\");\n assertEquals(\"th spons institut of a techn report.ua\", string0);\n }", "public String stemming(String stopWordRemovalFile, String stemmingFilePath) throws IOException{\n\t\t\n\t\t//Use a for loop to go through each data file\n\t\tfor (int i = 1; i <= numOfFiles; i++) {\n\t\t\t//Use FileInputStream to get the file path and use BufferedReader and InputStreamReader to read the files\n\t\t\tFileInputStream files = new FileInputStream(stopWordRemovalFile + \"/a\" + i + \".txt\");\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(files));\n\t\t\t\n\t\t\t//Use FileWriter to indicate the path to where the data will be outputed and BufferedWriter to write to the indicated files\n\t\t\tFileWriter fileStream = new FileWriter(stemmingFilePath + \"/a\" + i + \".txt\"); \n\t BufferedWriter outputStream = new BufferedWriter(fileStream);\n\t\t\t\n\t //Add each line of the files into an temporary stemmer arraylist to output the words into their root form\n\t\t\tString readStopwordDoc;\n\t\t\twhile((readStopwordDoc = reader.readLine()) != null) {\n\t\t\t\ttempStemmer.add(readStopwordDoc);\n\t\t\t}\n\t\t\t//Use the for loop to get the size of the temporary stemmer arraylist and stem the words\n\t\t\tfor(int j = 0; j < tempStemmer.size(); j++) {\n\t\t\t\tstemming.setCurrent(tempStemmer.get(j).toString());\n\t\t\t\tstemming.stem();\n\t\t\t\toutputStream.write(stemming.getCurrent() + \"\\n\");\n\t\t\t}\n\t\t\ttempStemmer.clear();\n\t\t\t\n\t\t\toutputStream.close();\n\t\t}\n\t\tSystem.out.println(\"See Stemming Folder for to view the results\");\n\t\treturn stemmingFilePath;\n\t}", "public List<String> getAllWords() {\n List<String> words = new ArrayList<>();\n // get the words to the list\n getAllWords(root, \"\", 0, words);\n // and return the list of words\n return words;\n }" ]
[ "0.68486196", "0.64040387", "0.6389563", "0.6352796", "0.62009865", "0.59938693", "0.5975981", "0.59572846", "0.58985823", "0.5860562", "0.5853653", "0.5842977", "0.5817483", "0.5795593", "0.57850343", "0.57793754", "0.5741923", "0.5690128", "0.56633466", "0.5643299", "0.56371355", "0.5623261", "0.5585468", "0.557997", "0.5569415", "0.55466914", "0.5534749", "0.5526265", "0.55026746", "0.5481646", "0.5466547", "0.54561436", "0.53941894", "0.53837603", "0.5376935", "0.5370355", "0.536496", "0.5338479", "0.53183043", "0.5313051", "0.5257435", "0.5253209", "0.5246547", "0.5222748", "0.5221782", "0.5213245", "0.5204356", "0.5201833", "0.5189259", "0.51840466", "0.51816857", "0.5144021", "0.51255393", "0.5116447", "0.5105692", "0.5105478", "0.5100423", "0.5088524", "0.5087826", "0.5068491", "0.5052517", "0.50498027", "0.5049284", "0.5040122", "0.5029491", "0.5023503", "0.50135624", "0.50108063", "0.5007799", "0.5007284", "0.4983874", "0.49641454", "0.49586016", "0.49535942", "0.49378985", "0.49247628", "0.49193227", "0.49061918", "0.4904312", "0.48996663", "0.48984388", "0.48797584", "0.48697057", "0.48682037", "0.4865832", "0.486085", "0.48357216", "0.48262948", "0.48246568", "0.48059583", "0.48048967", "0.4801256", "0.47894445", "0.47881764", "0.47830617", "0.47751868", "0.4753158", "0.47527817", "0.4751405", "0.47479197" ]
0.476718
96
return words from a url, stemmed and validated
public static List<String> validHtmlWords(String url) { String htmlString = ""; try { htmlString = HTMLText(url); } catch (Exception e) { logger.error(e.getMessage(), e); } List<String> words = getWords(htmlString); List<String> validWords = validWords(words); return validWords; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static List<String> getWord(String urlname) {\n\t\tList<String> returnWord = new ArrayList<String>();\n\t\tBufferedReader reader;\n\t\ttry {\n\t\t\tURL url = new URL(urlname);\n\t\t\tInputStream in = url.openStream();\n\t\t\treader = new BufferedReader(new InputStreamReader(in));\n\t\t\twhile (true) {\n\t\t\t\tString word = reader.readLine();\n\t\t\t\tif (word == null)\n\t\t\t\t\tbreak;\n\t\t\t\treturnWord.add(word);\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(e.getMessage());\n\t\t}\n\t\treturn returnWord;\n\t}", "public String spellCheck(String url) {\n String answer = null;\n // Term term = new Term(Fields.URL.name(), text);\n try {\n Query query = parser.parse(QueryParser.escape(shingleString(url)));\n Query prefix = new PrefixQuery(new Term(URLField, url.substring(0,1)));\n BooleanQuery combined = new BooleanQuery();\n combined.add(query, Occur.MUST);\n combined.add(prefix, Occur.MUST);\n TopDocs docs = searcher.search(combined, 5);\n double maxSim = -1;\n \n for(ScoreDoc sd:docs.scoreDocs){\n// if(sd.score<SPELL_CHECK_SIM_LOWERBOUND)\n// continue;\n String retrievedURL = searcher.doc(sd.doc).get(URLField);\n \n double currentSim = customeEditDistance.proximity(url.replace(' ', '_'), retrievedURL);\n \n// ec.NESimilarity(url, retrievedURL.replace(' ', '_'));//\n\n if (currentSim > maxSim && currentSim > SPELL_CHECK_SIM_LOWERBOUND){\n answer = retrievedURL;\n maxSim = currentSim;\n System.out.println(retrievedURL+\" with sim \"+currentSim);\n }\n }\n \n } catch (Exception e) {\n \n }\n \n return TitleNameIndexer.normalize(answer);\n }", "public static List<String> validHtmlStems(String url)\n\t{\n\t\tString htmlString = \"\";\n\t\ttry\n\t\t{\n\t\t\thtmlString = HTMLText(url);\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tlogger.error(e.getMessage(), e);\n\t\t}\n\t\tList<String> words = getWords(htmlString);\n\t\tList<String> validWords = validStems(words);\n\t\treturn validWords;\n\t}", "String stemOf (String word);", "public KeyWordList extractKeyWords(String input);", "@RequestMapping(\"/{words}\")\n\tpublic List<WordMatch> match(@PathVariable(\"words\") String words) {\n\t\tList<WordMatch> matches = new ArrayList<>();\n\t\tfor (String text : words.split(\",\")) {\n\t\t\tmatches.add(service.getMatch(text));\n\t\t}\n\t\treturn matches;\n\t}", "public static List<String> readWordlist(String url) {\n\t\tfinal List<String> lines = new ArrayList<String>();\n\t\ttry {\n\t\t\tURL website = new URL(url);\n\t\t\tURLConnection connection = website.openConnection();\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream(), \"UTF-8\"));\n\t\t\tString str;\n\t\t\twhile ((str = in.readLine()) != null) {\n\t\t\t\t// Nur Namen mit unter 8 Buchstaben nehmen damit die Namen nicht zu lange werden (& kaputte Zeichen vermeiden)\n\t\t\t\tif (str.length() < 8 && !str.contains(\"�\")) {\n\t\t\t\t\t// Wenn CSV\n\t\t\t\t\tif(str.contains(\",\")) {\n\t\t\t\t\t\tlines.add(str.split(\",\")[0]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlines.add(str);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tin.close();\n\t\t} catch (Exception e) {\n\t\t\t//ignore\n\t\t}\n\t\treturn lines;\n\t}", "public List<String> getRelatedWords(String word) throws IOException {\n List<String> result = new ArrayList<String>();\n IDictionary dict = new Dictionary(new File(WORDNET_LOCATION));\n try {\n dict.open();\n IStemmer stemmer = new WordnetStemmer(dict);\n for (POS pos : EnumSet.of(POS.ADJECTIVE, POS.ADVERB, POS.NOUN, POS.VERB)) {\n List<String> resultForPos = new ArrayList<String>();\n List<String> stems = new ArrayList<String>();\n stems.add(word);\n for (String stem : stemmer.findStems(word, pos)) {\n if (!stems.contains(stem))\n stems.add(stem);\n }\n for (String stem : stems) {\n if (!resultForPos.contains(stem)) {\n resultForPos.add(stem);\n IIndexWord idxWord = dict.getIndexWord(stem, pos);\n if (idxWord == null) continue;\n List<IWordID> wordIDs = idxWord.getWordIDs();\n if (wordIDs == null) continue;\n IWordID wordID = wordIDs.get(0);\n IWord iword = dict.getWord(wordID);\n \n ISynset synonyms = iword.getSynset();\n List<IWord> iRelatedWords = synonyms.getWords();\n if (iRelatedWords != null) {\n for (IWord iRelatedWord : iRelatedWords) {\n String relatedWord = iRelatedWord.getLemma();\n if (!resultForPos.contains(relatedWord))\n resultForPos.add(relatedWord);\n }\n }\n \n List<ISynsetID> hypernymIDs = synonyms.getRelatedSynsets();\n if (hypernymIDs != null) {\n for (ISynsetID relatedSynsetID : hypernymIDs) {\n ISynset relatedSynset = dict.getSynset(relatedSynsetID);\n if (relatedSynset != null) {\n iRelatedWords = relatedSynset.getWords();\n if (iRelatedWords != null) {\n for (IWord iRelatedWord : iRelatedWords) {\n String relatedWord = iRelatedWord.getLemma();\n if (!resultForPos.contains(relatedWord))\n resultForPos.add(relatedWord);\n }\n }\n }\n }\n }\n }\n }\n for (String relatedWord : resultForPos) {\n if (relatedWord.length() > 3\n && !relatedWord.contains(\"-\")\n && !result.contains(relatedWord)) {\n // TODO: Hack alert!\n // The - check is to prevent lucene from interpreting hyphenated words as negative search terms\n // Fix!\n result.add(relatedWord);\n }\n }\n }\n } finally {\n dict.close();\n }\n return result;\n }", "public ArrayList<String> soupThatSite(String url) throws IOException {\n\n ArrayList<String> parsedDoc = new ArrayList<>();\n Document doc = Jsoup.connect(url).get();\n\n if (url.contains(\"cnn.com\")) {\n\n doc.select(\"h1\").stream().filter(Element::hasText).forEach(element1 -> {\n String str = element1.text();\n String clean = Jsoup.clean(str, Whitelist.basic());\n parsedDoc.add(clean);\n });\n\n doc.select(\".zn-body__paragraph\").stream().filter(Element::hasText).forEach(element1 -> {\n String str = element1.text();\n String clean = Jsoup.clean(str, Whitelist.basic());\n parsedDoc.add(clean);\n });\n\n } else {\n\n doc.select(\"h1\").stream().filter(Element::hasText).forEach(element1 -> {\n String str = element1.text();\n String clean = Jsoup.clean(str, Whitelist.basic());\n parsedDoc.add(clean);\n });\n\n doc.select(\"p\").stream().filter(Element::hasText).forEach(element -> {\n String str = element.text();\n String clean = Jsoup.clean(str, Whitelist.basic());\n parsedDoc.add(clean);\n });\n }\n\n return parsedDoc;\n }", "public static List<ExtractedEntity> extractEntities(String text){\n\t\tList<ExtractedEntity> extractedConcepts = new ArrayList<ExtractedEntity>();\n\t\tZemanta zem = new Zemanta(ZEMAMTA_API_KEY);\t\n\t\tZemantaResult zemResult = zem.suggest(text);\n\t\tString cid = zemResult.rid;\n\t\tfor(Link link : zemResult.markup.links){\n\t\t\tString term = link.anchor;\n\t\t\tfor(Target target : link.targets){\n\t\t\t\tif(target.url != null && target.url.startsWith(\"http://en.wikipedia.org/wiki/\")){\n\t\t\t\t\tExtractedEntity entity = new AlchemyAnnotator().new ExtractedEntity();\n\t\t\t\t\tentity.name = target.title;\n\t\t\t\t\tentity.type = target.type.name();\n\t\t\t\t\tentity.uri = target.url.replace(\"http://en.wikipedia.org/wiki/\", \"http://dbpedia.org/resource/\");\n\t\t\t\t\tentity.score = new Float(link.confidence).doubleValue();\n\t\t\t\t\tentity.text = link.anchor;\n\t\t\t\t\textractedConcepts.add(entity);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn extractedConcepts;\n\t}", "public List<Stem> stem(String word) {\n return stem(word.toCharArray(), word.length());\n }", "@RequestMapping(path = \"/lemmieYada\", method = RequestMethod.GET)\n public ResponseEntity<ArrayList<String>> letMeYada(@RequestParam (value = \"url\", required = false) String url) throws IOException {\n\n ArrayList<String> scrapedSite = soupThatSite(url);\n\n return new ResponseEntity<>(scrapedSite, HttpStatus.OK);\n }", "List<String> tokenize2(String doc) {\n String stemmed = StanfordLemmatizer.stemText(doc);\n List<String> res = new ArrayList<String>();\n\n for (String s : stemmed.split(\"[\\\\p{Punct}\\\\s]+\"))\n res.add(s);\n return res;\n }", "public String Stem( String word )\n {\n // check if we already know the word\n String stemmedword = AllWords.get(word);\n if ( stemmedword != null )\n return stemmedword; // return it if we already know it\n\n // don't check words with digits in them\n // if ( containsNumbers (word) == true )\n // stemmedword = null;\n // else\t// unknown word: try to stem it\n stemmedword = StemWordWithWordNet (word);\n\n if ( stemmedword != null )\n {\n // word was recognized and stemmed with wordnet:\n // add it to hashmap and return the stemmed word\n AllWords.put( word, stemmedword );\n return stemmedword;\n }\n // word could not be stemmed by wordnet,\n // thus it is no correct english word\n // just add it to the list of known words so\n // we won't have to look it up again\n AllWords.put( word, word );\n return word;\n }", "public static void fetchWords() {\n wordList = new ArrayList<String>();\n try {\n //problems with reading into method\n WordFetcher.readInto(wordList); \n } catch(Exception e) {\n System.out.println(e);\n }\n }", "private String getStemming(String line) throws IOException {\n\t\treturn line;\n\t\t// return Stemmer.processTweets(line);\n\t}", "private static String analyzeTerm(String term) {\n String ret = term.toLowerCase();\n if (stopWords.contains(ret) || ret.isEmpty())\n return \"\";\n return stemmer.stem(ret);\n }", "static ArrayList<String> split_words(String s){\n ArrayList<String> words = new ArrayList<>();\n\n Pattern p = Pattern.compile(\"\\\\w+\");\n Matcher match = p.matcher(s);\n while (match.find()) {\n words.add(match.group());\n }\n return words;\n }", "private String processWord(String word){\r\n\t\tString lword = word.toLowerCase();\r\n\t\tfor (int i = 0;i<word.length();++i){\r\n\t\t\tstemmer.add(lword.charAt(i));\r\n\t\t}\r\n\t\tstemmer.stem();\r\n\t\treturn stemmer.toString();\r\n\t}", "List<String> tokenize0(String doc) {\r\n List<String> res = new ArrayList<String>();\r\n\r\n for (String s : doc.split(\"\\\\s+\")) {\r\n // implement stemming algorithm if ToStem == true\r\n if (ToStem == true) {\r\n Stemmer st = new Stemmer();\r\n st.add(s.toCharArray(), s.length());\r\n st.stem();\r\n s = st.toString();\r\n }\r\n res.add(s);\r\n }\r\n return res;\r\n }", "public static String preprocessStemAndTokenize(String data) {\n\n\t\tSet<String> transformedSet = new HashSet<String>(); //Set will make sure only unique terms are kept\n\t\tStringBuilder strBuilder = new StringBuilder();\n\t\tTokenizer analyzer = new Tokenizer(Version.LUCENE_30);\n\t\tTokenStream tokenStream = analyzer.tokenStream(\"\", new StringReader(data));\n\t\tTermAttribute termAttribute;\n\t\tString term;\n\t\t//System.out.println(\"The value of data in tokenizeAndStem: \"+ data);\n\t\ttry {\n\t\t\twhile (tokenStream.incrementToken()) {\n\t\t\t\ttermAttribute = tokenStream.getAttribute(TermAttribute.class);\n\t\t\t\tterm = termAttribute.term(); \n\t\t\t\tif (stopwords.contains(term)){ //ignore stopwords\n\t\t\t\t\t//System.out.println(\"Contains stopword: \"+ term);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (digitPattern.matcher(term).find()) //ignore digits\n\t\t\t\t\tcontinue;\n\t\t\t\tif(term.length() <= 1) //ignore 1 letter words\n\t\t\t\t\tcontinue;\n\t\t\t\t\n\t\t\t\tif (!digitPattern.matcher(term).find()){ //ignore digits\n\t\t\t\t\tstemmer.setCurrent(term);\n\t\t\t\t\tstemmer.stem();\n\t\t\t\t\ttransformedSet.add(stemmer.getCurrent());\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t//System.out.println(\"transormed set size in tokenizeAndStem: \"+ transformedSet.size());\n\t\tfor(Object token: transformedSet.toArray()){\n\t\t\tstrBuilder.append(token).append(\" \");\n\t\t}\n\t\t//System.out.println(\"String returned in tokenizeAndStem:\"+ strBuilder.toString());\n\t\treturn strBuilder.toString();\n\t}", "public ArrayList<String> processText(String text)\r\n\t{\r\n\t\tArrayList<String> terms = new ArrayList<>();\r\n\r\n\t\t// P2\r\n\t\t// Tokenizing, normalizing, stopwords, stemming, etc.\r\n\t\tArrayList<String> tokens = tokenize(text);\r\n\t\tfor(String term: tokens){\r\n\t\t\tString norm = normalize(term);\r\n\t\t\tif(!isStopWord(norm)){\r\n\t\t\t\tString stem = stem(norm);\r\n\t\t\t\tterms.add(stem);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn terms;\r\n\t}", "public void parseWord(String line){\r\n String[] tokens = line.split(\"\\\\t|/|<|>|\\\\?|=%3C|%3E|=%3C|&=%3C|&|=| \");\r\n// for(String word: tokens){\r\n//\r\n// keys.add(word);\r\n// }\r\n int n = tokens.length-2;//to ignore the the word GET from the string.\r\n if(n>0){\r\n for(int i=1;i<n;i++){\r\n if(!tokens[i].equals(\"\")){\r\n this.keys.add(tokens[i]);\r\n }\r\n\r\n }\r\n }\r\n\r\n }", "public static void getSynonyms(ArrayList<String> keywords) {\n final String endpoint = \"http://www.dictionaryapi.com/api/v1/references/collegiate/xml/\";\n final String key = \"79b70eee-858c-486a-b155-a44db036bfe0\";\n try {\n for (String keyword : keywords) {\n String url = endpoint + keyword + \"?key=\" + key;\n System.out.print(\"url--\" + url);\n URL obj = new URL(url);\n HttpURLConnection con = (HttpURLConnection) obj.openConnection();\n con.setRequestProperty(\"User-Agent\", USER_AGENT);\n BufferedReader in = new BufferedReader(\n new InputStreamReader(con.getInputStream()));\n String inputLine;\n StringBuffer response = new StringBuffer();\n\n while ((inputLine = in.readLine()) != null) {\n response.append(inputLine);\n }\n in.close();\n\n //print result\n System.out.println(response.toString());\n\n DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\n DocumentBuilder builder;\n InputSource is;\n try {\n builder = factory.newDocumentBuilder();\n is = new InputSource(new StringReader(response.toString()));\n Document doc = builder.parse(is);\n NodeList list = doc.getElementsByTagName(\"syn\");\n System.out.println(\"synonyms\" + list.item(0).getTextContent());\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n }\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n }", "default String getStem() {\n return meta(\"nlpcraft:nlp:stem\");\n }", "public void indexing(String seedPage) {\n webCrawler wbc = new webCrawler();\n webPage wbp = new webPage();\n urlList = wbc.crawl(seedPage);\n for(int i = 0; i < urlList.size(); i++) {\n String url = urlList.get(i);\n try {\n Document doc = wbp.getContent(url);\n finalWords = wbp.getAllWords(url);\n } catch(Exception e) {\n e.printStackTrace();\n }\n }\n }", "public static ArrayList<String> getWords(String input) {\r\n ArrayList<String> w = new ArrayList<String>();\r\n input = input.toLowerCase();\r\n String[] words = input.split(\"\\\\s+\");\r\n for (int i = 0; i < words.length; i++) {\r\n words[i] = words[i].replaceAll(\"[^\\\\w]\", \"\");\r\n }\r\n for(String elem: words) {\r\n w.add(elem);\r\n }\r\n return w;\r\n }", "public void add(String word, String url) {\n \n // don't need to add this word if it's a stop word\n for (String stopWord : Settings.getStopWords()) {\n if (word.equalsIgnoreCase(stopWord)) return;\n }\n \n // don't need to add this word if it's already in here\n StringNode check = locate(word);\n if (check != null) {\n check.getPagesContainingWord().add(url);\n return;\n }\n \n // not a stop word, not present--need to add it\n StringNode newNode = new StringNode(word, new URLLinkedList());\n newNode.getPagesContainingWord().add(url);\n if (first == null) { // if first is null, there's nothing in the list\n first = newNode; // set first to this new node\n newNode.getPagesContainingWord().add(url);\n }\n else { // first isn't null, so we want to find the correct place to put this new node\n StringNode current = first;\n // this barebones linked list is very inconvenient, so we have to make a special \n // check for the first item in the list.\n if (word.compareTo(current.getWord()) < 0) { // the word in the new node goes before the word in the first node\n first = newNode; // now the new node is the first one\n newNode.setNext(current); // and its next is the old first one\n }\n else if (!current.hasNext()) { // no next node, so this word goes after current\n current.setNext(newNode);\n }\n else { // new node doesn't go before first, so check the rest of the list\n boolean newNodePlaced = false;\n StringNode previous;\n while (current.hasNext() && !newNodePlaced) { \n previous = current;\n current = current.getNext(); // grab next node\n if (word.compareTo(current.getWord()) < 0) { // new word goes before this one\n// StringNode oldNext = current.getNext();\n// current.setNext(newNode);\n// newNode.setNext(oldNext);\n// newNodePlaced = true;\n previous.setNext(newNode);\n newNode.setNext(current);\n newNodePlaced = true;\n }\n }\n if (!newNodePlaced) { // if we're here and haven't yet placed the node, it goes at the end\n current.setNext(newNode);\n }\n }\n }\n size++;\n }", "public static void searchWord(String URL, String wordToSearch){\n \tString curr_url = \"\";\n while(pagesVisited.size() < MAX_PAGES_TO_SEARCH){\n \t\tSpiderLeg leg = new SpiderLeg();\n\n \t\tif(pagesToVisit.isEmpty()){\n \t\t\tcurr_url = URL;\n \t\t\tpagesVisited.add(URL);\n \t\t}\n \t\telse{\n \t\t\tSystem.out.println(\"No such word found!!!\");\n \t\t}\n\n \t\tleg.crawl(curr_url);\n\n \t\tboolean success = leg.searchForWord(wordToSearch);\n\n \t\t//If we successfully find the word, print out ifo\n \t\tif(success){\n \t\t\tSystem.out.println(String.format(\"**Success** Word %s found at %s\", wordToSearch, curr_url));\n \t\t\tbreak;\n \t\t}\n\n \t\tpagesToVisit.addAll(leg.getLinks());\n \t}\n\n \tSystem.out.println(String.format(\"**Done** visiting %s\", curr_url));\n }", "public String getKeyword(String word) {\n\t\t/** COMPLETE THIS METHOD **/\n\t\t//strip trailing punctuation\n\t\tint n = 1;\n\t\tString output = \"\";\n\t\tword = word.toLowerCase();\n\t\tint j = 0;\n\t\twhile(j<word.length())\n\t\t{\n\t\t\tif(Character.isLetter(word.charAt(j)))\n\t\t\t{\n\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//return null;\n\t\t\t}\n\t\t\tj++;\n\t\t}\n\t\t\n\t\twhile(n<word.length())\n\t\t{\n\t\t\t\n\t\t\tif( word.charAt(word.length()-n) == '.' ||\n\t\t\t\t\tword.charAt(word.length()-n) == ',' ||\n\t\t\t\t\tword.charAt(word.length()-n) == '?' || \n\t\t\t\t\tword.charAt(word.length()-n) == ':' ||\n\t\t\t\t\tword.charAt(word.length()-n) == ';' ||\n\t\t\t\t\tword.charAt(word.length()-n) == '!' )\n\t\t\t{\n\t\t\t\toutput = word.substring(0, word.length()-n);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tn++;\n\t\t}\n\t\tif( !(word.charAt(word.length()-1) == '.' ||\n\t\t\t\tword.charAt(word.length()-1) == ',' ||\n\t\t\t\tword.charAt(word.length()-1) == '?' || \n\t\t\t\tword.charAt(word.length()-1) == ':' ||\n\t\t\t\tword.charAt(word.length()-1) == ';' ||\n\t\t\t\tword.charAt(word.length()-1) == '!' )\n\t\t\t\t)\n\t\t{\n\t\t\toutput = word.substring(0, word.length());\n\t\t}\n\t\t// check if there are only alphanumeric characters\n\t\t\n\t\tArrayList<String> items = new ArrayList<>();\n\t\t\n\t\t\n\t try {\n\t \t\n\t Scanner scanner = new Scanner(new File(\"noisewords.txt\"));\n\t while (scanner.hasNextLine()) {\n\t String line = scanner.nextLine();\n\t items.add(line);\n\t \n\t }\n\t scanner.close();\n\t } catch (FileNotFoundException e) {\n\t e.printStackTrace();\n\t }\n\t int i = 0;\n\t boolean ans = false;\n\t while(i<items.size()) {\n\t\t if(output.equals(items.get(i))) \n\t\t {\n\t\t \tans = true;\n\t\t \tbreak;\n\t\t }\n\t\t else\n\t\t {\n\t\t \t ans = false;\n\t\t }\n\t\t i++;\n\t }\n\t //System.out.println(ans);\n\t if(ans == true)\n\t {\n\t \t return null;\n\t }\n\t /* int a = 0;\n\t\twhile(a<items.size())\n\t\t{\n\t\t\tSystem.out.println(items.get(a));\n\t\t\ta++;\n\t\t}*/\n\t\t// following line is a placeholder to make the program compile\n\t\t// you should modify it as needed when you write your code\n\t\tif(output != null)\n\t\t{\n\t\t\treturn output;\n\t\t}\n\t\t\n\t\treturn null;\n\t}", "public static String preprocessStemAndTokenizeReturnDistinctTokens(String data) {\n\t\t//System.out.println(\"Preprocess data, remove stop words, stem, tokenize ..\");\n\t\tSet<String> transformedSet = new LinkedHashSet<String>();\n\t\tList<String> stemmedList = new ArrayList<String>();\n\n\t\tTokenizer analyzer = new Tokenizer(Version.LUCENE_30);\n\t\tTokenStream tokenStream = analyzer.tokenStream(\"\", new StringReader(data));\n\t\tTermAttribute termAttribute;\n\t\tString term;\n\t\ttry {\n\t\t\twhile (tokenStream.incrementToken()) {\n\t\t\t\ttermAttribute = tokenStream.getAttribute(TermAttribute.class);\n\t\t\t\tterm = termAttribute.term();\n\t\t\t\tif (digitPattern.matcher(term).find()) //ignore digits\n\t\t\t\t\tcontinue;\n\t\t\t\tif (stopwords.contains(term)) //ignore stopwords\n\t\t\t\t\tcontinue;\n\t\t\t\tif (term.length() <= 1) //ignore single letter words\n\t\t\t\t\tcontinue;\n\t\t\t\tstemmer.setCurrent(term);\n\t\t\t\tstemmer.stem();\n\t\t\t\tstemmedList.add(stemmer.getCurrent());\n\t\t\t}\n\t\t\ttransformedSet.addAll(stemmedList);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tstemmedList.clear();\n\t\tstemmedList = null;\n\t\t\n\t\treturn StringUtils.join(transformedSet.toArray(), \" \");\n\t}", "public static void invertedIndex(String URL){\n //if the url set already contains this url, it means this url has already been processed, so return\n if(urlSet.contains(URL)){\n return;\n }\n else{\n //first add this unprocessed url to url list\n urlSet.add(URL);\n try{\n //connect this url and get its content\n URL url = new URL(URL);\n URLConnection urlCon = url.openConnection();\n BufferedReader in = new BufferedReader(new InputStreamReader(urlCon.getInputStream()));\n String urlString = \"\";\n String current;\n while((current = in.readLine()) != null)\n {\n urlString += current;\n }\n\n //by filtering the link label to get all the links in this page\n String[] urlList = urlString.split(\"<a href=\\\"\");\n\n //define regex expression to filter script label\n String scriptFilter=\"<script[^>]*?>[\\\\s\\\\S]*?<\\\\/script>\";\n\n //define regex expression to filter style label\n String styleFilter=\"<style[^>]*?>[\\\\s\\\\S]*?<\\\\/style>\";\n\n //define regex expression to filter html label\n String htmlFilter=\"<[^>]+>\";\n\n //filter all the useless labels\n Pattern scriptP=Pattern.compile(scriptFilter,Pattern.CASE_INSENSITIVE);\n Matcher scriptM=scriptP.matcher(urlString);\n urlString=scriptM.replaceAll(\"\");\n\n Pattern styleP=Pattern.compile(styleFilter,Pattern.CASE_INSENSITIVE);\n Matcher styleM=styleP.matcher(urlString);\n urlString=styleM.replaceAll(\"\");\n\n Pattern htmlP=Pattern.compile(htmlFilter,Pattern.CASE_INSENSITIVE);\n Matcher htmlM=htmlP.matcher(urlString);\n urlString=htmlM.replaceAll(\"\");\n\n //transfer content to a word array\n String[] words = urlString.split(\" \");\n for(int i = 0; i < words.length; i++){\n //System.out.println(words[i]);\n //if the hashmap doesn't contain this word, so put this word and its url pair into the hashmap\n if(!index.containsKey(words[i])){\n HashSet<String> str = new HashSet<String>();\n str.add(URL);\n index.put(words[i],str);\n }\n //if the hashmap already contains this word, update its record\n else{\n HashSet<String> str = index.get(words[i]);\n str.add(URL);\n index.put(words[i],str);\n }\n }\n //System.out.println(urlString);\n\n for(int i = 1; i < urlList.length;i++){\n //get each url in this page and transfer it to valid url, after that process each url\n int endpos = urlList[i].indexOf(\"\\\"\");\n String Url = getValidUrl(urlList[i].substring(0, endpos));\n //System.out.println(Url);\n if(Url != null){\n invertedIndex(Url);\n }\n }\n }catch(Exception e){\n System.out.println(\"can't process url : \" + URL);\n }\n }\n }", "public ArrayList<String> search(String url) {\n Pattern msnPattern = Pattern.compile(\".*msn.com.*\");\n Pattern foolPattern = Pattern.compile(\".*fool.com.*\");\n Matcher foolMatcher = foolPattern.matcher(url);\n Matcher msnMatcher = msnPattern.matcher(url);\n\n ArrayList<String> stockArticles = new ArrayList<String>();\n if (foolMatcher.matches()) {\n Connection connection = Jsoup.connect(\"https://www.fool.com/market-movers/\");\n try {\n Document htmlDocument = connection.get();\n Elements linksOnPage = htmlDocument.select(\"h4\");\n for (Element link : linksOnPage) {\n stockArticles.add(link.text());\n }\n }\n catch (IOException e) {\n System.out.println(e);\n }\n } else if (msnMatcher.matches()) {\n Connection connection2 = Jsoup.connect(\"http://www.msn.com/en-us/money/investing\");\n try {\n Document htmlDocument2 = connection2.get();\n Elements linksOnPage2 = htmlDocument2.select(\"h3\");\n for (Element link : linksOnPage2) {\n stockArticles.add(link.text());\n }\n }\n catch (IOException e) {\n System.out.println(e);\n }\n } else {\n Connection connection3 = Jsoup.connect(\"https://www.nytimes.com/topic/organization/new-york-stock-exchange\");\n try {\n Document htmlDocument3 = connection3.get();\n Elements linksOnPage3 = htmlDocument3.select(\"h2\");\n for (Element link : linksOnPage3) {\n stockArticles.add(link.text());\n }\n }\n catch (IOException e) {\n System.out.println(e);\n }\n }\n return stockArticles;\n }", "public void pullResources(String domainURL){\n URLResource page = new URLResource(\"https://www.dukelearntoprogram.com//course2/data/manylinks.html\");\n \n int startIndex;\n int endIndex;\n // loop through pages\n for (String s : page.lines()){\n \n //System.out.println(s);\n int pose = s.indexOf(domainURL);\n \n // if the url is in the line\n if (-1 != pose) {\n \n startIndex = s.lastIndexOf(\"\\\"\",pose); // find actual start\n endIndex = s.indexOf(\"\\\"\",pose+1); // find end\n \n System.out.println( s.substring(startIndex, endIndex));\n \n \n \n }\n \n \n }\n}", "private static void splitWord() {\n\t\tint i = 1;\r\n\t\tfor(String doc : DocsTest) {\r\n\t\t\tArrayList<String> wordAll = new ArrayList<String>();\r\n\t\t\tfor (String word : doc.split(\"[,.() ; % : / \\t -]\")) {\r\n\t\t\t\tword = word.toLowerCase();\r\n\t\t\t\tif(word.length()>1 && !mathMethod.isNumeric(word)) {\r\n\t\t\t\t\twordAll.add(word);\r\n\t\t\t\t\tif(!wordList.contains(word)) {\r\n\t\t\t\t\t\twordList.add(word);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\twordAll.removeAll(stopword);\r\n\t\t\tDoclist.put(i, wordAll);\r\n\t\t\ti++;\r\n\t\t}\r\n\t\twordList.removeAll(stopword);\r\n\t}", "public Iterator<String> words();", "public Word(String s) throws FileNotFoundException, IOException, ParseException {\r\n\t\tword = s;\r\n\t\tjsonOsFile = downloadJSON(\"https://en.wikipedia.org/w/api.php?action=opensearch&format=json&search=\");\r\n\t\tjsonOsFile.deleteOnExit();\r\n\t\tjsonPageFile = downloadJSON(\"https://en.wikipedia.org/w/api.php?action=query&prop=revisions&rvprop=content&format=json&titles=\");\r\n\t\tjsonPageFile.deleteOnExit();\r\n\t\tjsonOsArray = (JSONArray)(new JSONParser().parse(new FileReader(\"JSON/\" + this.word + \"_opensearch.json\")));\r\n\t\tjsonPageObject = (JSONObject) (new JSONParser().parse(new FileReader(\"JSON/\" + this.word + \"_wikipage.json\")));\r\n\t\t\r\n\t\t//At this point, we have downloaded and saved our OpenSearch.json and Wikipage.json accordingly. \r\n\t\t\r\n\t\tjparse = new JParser();\r\n\t\trelPageStrings = jparse.getRelatedPages(jsonOsArray);\r\n\t\trelPageDesc = jparse.getRelatedPageDesc(jsonOsArray);\r\n\t\t\r\n\t\t//Retrieves all of the words on the wiki page. Still requires parsing into readable data. Pages are denoted by [[ ]] surrounding them.\r\n\t\twikipageArray = jparse.getPageContents(jsonPageObject);\r\n\t\t\r\n\t\tpageKeywords = jparse.getKeysOnPage(wikipageArray);\r\n\t\t\r\n\t}", "public Double[] SentiwordsMatch(String tweets) throws IOException\r\n {\r\n String[] ar=new String[100];\r\n \r\n ar=tweets.split(\" \");\r\n \r\n /* for(String splited_text:ar)\r\n System.out.println(splited_text);*/\r\n \r\n Double price[]=PriceCalculator(ar);\r\n \r\n \r\n return price;\r\n \r\n }", "public ArrayList<String> getResults(String query) {\r\n\t\t// TODO: Add code here\r\n\t\tHashMap<String,Double> map=new HashMap<>();\r\n\t\tArrayList<String> urls=wordIndex.get(query);\r\n\t\tif(urls==null){\r\n\t\t\treturn new ArrayList<>();\r\n\t\t}\r\n\t\tfor(String url:urls){\r\n\t\t\tmap.put(url,internet.getPageRank(url));\r\n\t\t}\r\n\t\treturn Sorting.fastSort(map);\r\n\t}", "@Override\r\n public String stem(String word) {\r\n List<String> lemmas = new LinkedList<String>();\r\n // Create an empty Annotation just with the given text\r\n Annotation document = new Annotation(word);\r\n // run all Annotators on this text\r\n this.pipeline.annotate(document);\r\n // Iterate over all of the sentences found\r\n List<CoreMap> sentences = document.get(CoreAnnotations.SentencesAnnotation.class);\r\n for (CoreMap sentence : sentences) {\r\n // Iterate over all tokens in a sentence\r\n for (CoreLabel token : sentence.get(CoreAnnotations.TokensAnnotation.class)) {\r\n // Retrieve and add the lemma for each word into the\r\n // list of lemmas\r\n lemmas.add(token.get(CoreAnnotations.LemmaAnnotation.class));\r\n }\r\n }\r\n return lemmas.get(0);\r\n\r\n }", "public static ArrayList<String> getTerms(String comment){\n\n\t\tString[] terms = comment.split(\"[^a-zA-Z]+\");\n\t\t//if(terms.length == 0) System.out.println(\"error: \" + comment);\n\t\tArrayList<String> termsarray = new ArrayList<String>();\n\t\tfor(int i=0;i<terms.length;i++){\n\t\t\t\n\t\t\tString iterm = terms[i].toLowerCase();\n\t\t\tboolean isStopWord = false;\n\t\t\tfor(String s : stopWord){\n\t\t\t\tif(iterm.equals(s)){\n\t\t\t\t\tisStopWord = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(isStopWord == true)\n\t\t\t\tcontinue;\n\t\t\t\n\t\t\tStemmer stemmer = new Stemmer();\n\t\t\tstemmer.add(iterm.toCharArray(), iterm.length());\n\t\t\tstemmer.stem();\n\t\t\titerm = stemmer.toString();\n\t\t\t\n\t\t\t//System.out.println(iterm);\n\t\t\tif(iterm.length() >=2 && !termsarray.contains(iterm))termsarray.add(iterm);\n\t\t}\n\t\n\t\treturn termsarray;\n\t}", "public static void readInto(ArrayList<String> list) throws Exception {\n URL wordsURL = new URL(url);\n BufferedReader in = new BufferedReader(\n new InputStreamReader(wordsURL.openStream()));\n String word;\n while ((word = in.readLine()) != null){\n list.add(word);\n }\n in.close();\n }", "public static List<TokenCanonic> stemWords(String wordList) {\n List<TokenCanonic> result = new ArrayList<TokenCanonic>(); \n String [] tokens = wordList.split(\"\\\\s+\");\n for (String t : tokens) {\n if (t.trim().equals(\"\")) continue;\n TokenCanonic tc = new TokenCanonic(); \n tc.token = t; tc.canonic = stemWord(t);\n result.add(tc);\n }\n return result;\n }", "public static void Stemmingmethod()throws Exception\n{\n char[] w = new char[501];\n Stemmer s = new Stemmer();\n String prcessedtxt=\"\";\n ArrayList<String> finalsen= new ArrayList();\n BufferedWriter writer = new BufferedWriter(new FileWriter(\"fullyprocessed.txt\"));\n\n String u=null;\n \n {\n FileInputStream in = new FileInputStream(\"stopwordsremoved.txt\");\n\n while(true)\n\n { int ch = in.read();\n if (Character.isLetter((char) ch))\n {\n int j = 0;\n while(true)\n { ch = Character.toLowerCase((char) ch);\n w[j] = (char) ch;\n if (j < 500) j++;\n ch = in.read();\n if (!Character.isLetter((char) ch))\n {\n \n s.add(w, j); \n\n s.stem();\n { \n\n u = s.toString();\n finalsen.add(u);\n /* to test getResultBuffer(), getResultLength() : */\n /* u = new String(s.getResultBuffer(), 0, s.getResultLength()); */\n\n System.out.print(u);\n }\n break;\n }\n }\n }\n if (ch < 0) break;\n System.out.print((char)ch);\n finalsen.add(\"\"+(char)ch);\n\n\n }\n }\n \n \n \n for(String word:finalsen){\n prcessedtxt=prcessedtxt+\"\"+ word;\n }\n writer.write(prcessedtxt+\"\\n\"); \n prcessedtxt=\"\";\n finalsen.clear();\n writer.close();\n\n\n \n}", "public static void main(String[] args) throws Exception {\n\tPhishTankBlackList.main(args);\n\tstr=PhishTankBlackList.url();\n\tString mstr=str;\n\tmstr = mstr.replaceAll(\"http://www.\",\"\");\n\tmstr = mstr.replaceAll(\"http://\",\"\");\n\tmstr = mstr.replaceAll(\"https://www.\", \"\");\n\tmstr = mstr.split(\".com\")[0];\n\tmstr = mstr.split(\".in\")[0];\n\tmstr = mstr.split(\".net\")[0];\n\tmstr = mstr.split(\".org\")[0];\n\tmstr = mstr.split(\".uk\")[0];\n\tmstr = mstr.split(\".eu\")[0];\n\tmstr = mstr.split(\".ac.in\")[0];\n\tSystem.out.println(mstr);\n\tint fullLength = mstr.length();\n\tString modifiedString = mstr.replaceAll(\"\\\\p{Punct}\",\"\");\n\tint modStringLength = modifiedString.length();\n\tint numberOfSpecialChars = fullLength - modStringLength;\n\t//number of tokens in domain\n\tSystem.out.println(\"The number of tokens in the domain are\");\n\t\n\tSystem.out.println(numberOfSpecialChars);\n\tSystem.out.println(\"\");\n\tif(numberOfSpecialChars>3)\n\tSystem.out.println(\"Probably Phishing site\");\n\t\n\t\n\t\n\t\n\t//number of dots in domain\n\t\n int ctr=0;\n\tString newstr=mstr;\n\t\t\tfor(int i=0;i<newstr.length();i++)\n\t\t\t{ if(newstr.charAt(i)=='.')\n\t\t\t {ctr = ctr+1;}}\n\t\t\tSystem.out.println(\"number of dots in the domain of the URL\");\n\t\t\tSystem.out.println(ctr);\n\t\t\tif(ctr>=4)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Probably Phishing\");\n\t\t\t}\n\t\t\t/*ctr=0;\nmstr=mstr.replaceAll(\".\", \"\");\n\t\t String sb=mstr;\n\t\t \n\t\t sb.toCharArray();\n\t\t for(int i=0;i<sb.length();i++)\n\t\t {\n\t\t \n\t\t ctr=ctr+1;\n\t\t }\n\t\t System.out.println(\"The digits present in the domain\");\n\t\t System.out.println(ctr);\n\t\t \n\t\t \n\t\t if(ctr>4)\n\t\t {\n\t\t \tSystem.out.println(\"Probably Phishing\");\n\t\t }}\n\t\t \n\n\n\t\t\t */\n\t\t\t}", "SList oddWords();", "public void makeWord(String inputText,String pageId,createIndex createindex,String contentType)\n {\n int length,i;\n char c;\n boolean linkFound=false;\n int count1,count2,count3,count4,count5,count6,count7,count8,count9;\n\n\n\n StringBuilder word=new StringBuilder();\n // String finalWord=null,stemmedWord=null;\n docId=Integer.parseInt(pageId.trim());\n\n ci=createindex;\n // Stemmer st=new Stemmer();\n //createIndex createindex=new createIndex();\n\n length=inputText.length();\n\n for(i=0;i<length;i++)\n {\n c=inputText.charAt(i);\n if(c<123 && c>96)\n {\n word.append(c);\n }\n\n else if(c=='{')\n {\n if ( i+9 < length && inputText.substring(i+1,i+9).equals(\"{infobox\") )\n {\n\n StringBuilder infoboxString = new StringBuilder();\n\n count1 = 0;\n for ( ; i < length ; i++ ) {\n\n c = inputText.charAt(i);\n infoboxString.append(c);\n if ( c == '{') {\n count1++;\n }\n else if ( c == '}') {\n count1--;\n }\n if ( count1 == 0 || (c == '=' && i+1 < length && inputText.charAt(i+1) == '=')) {\n if ( c == '=' ) {infoboxString.deleteCharAt(infoboxString.length()-1);}\n break;\n }\n }\n\n processInfobox(infoboxString);\n\n }\n\n else if ( i+8 < length && inputText.substring(i+1,i+8).equals(\"{geobox\") )\n {\n\n StringBuilder geoboxString = new StringBuilder();\n\n count2 = 0;\n for ( ; i < length ; i++ ) {\n\n c = inputText.charAt(i);\n geoboxString.append(c);\n if ( c == '{') {\n count2++;\n }\n else if ( c == '}') {\n count2--;\n }\n if ( count2 == 0 || (c == '=' && i+1 < length && inputText.charAt(i+1) == '=')) {\n if ( c == '=' ) {geoboxString.deleteCharAt(geoboxString.length()-1);}\n break;\n }\n }\n\n // processGeobox(geoboxString);\n }\n\n else if ( i+6 < length && inputText.substring(i+1,i+6).equals(\"{cite\") )\n {\n\n /*\n * Citations are to be removed.\n */\n\n count3 = 0;\n for ( ; i < length ; i++ ) {\n\n c = inputText.charAt(i);\n if ( c == '{') {\n count3++;\n }\n else if ( c == '}') {\n count3--;\n }\n if ( count3 == 0 || (c == '=' && i+1 < length && inputText.charAt(i+1) == '=')) {\n break;\n }\n }\n\n }\n\n else if ( i+4 < length && inputText.substring(i+1,i+4).equals(\"{gr\") )\n {\n\n /*\n * {{GR .. to be removed\n */\n\n count4 = 0;\n for ( ; i < length ; i++ ) {\n\n c = inputText.charAt(i);\n if ( c == '{') {\n count4++;\n }\n else if ( c == '}') {\n count4--;\n }\n if ( count4 == 0 || (c == '=' && i+1 < length && inputText.charAt(i+1) == '=')) {\n break;\n }\n }\n\n }\n else if ( i+7 < length && inputText.substring(i+1,i+7).equals(\"{coord\") )\n {\n\n /**\n * Coords to be removed\n */\n\n count5 = 0;\n for ( ; i < length ; i++ ) {\n\n c = inputText.charAt(i);\n\n if ( c == '{') {\n count5++;\n }\n else if ( c == '}') {\n count5--;\n }\n if ( count5 == 0 || (c == '=' && i+1 < length && inputText.charAt(i+1) == '=')) {\n break;\n }\n }\n\n }\n\n //System.out.println(\"process infobox\");\n }\n else if(c=='[')\n {\n // System.out.println(\"process square brace\");\n\n if ( i+11 < length && inputText.substring(i+1,i+11).equalsIgnoreCase(\"[category:\"))\n {\n\n StringBuilder categoryString = new StringBuilder();\n\n count6 = 0;\n for ( ; i < length ; i++ ) {\n\n c = inputText.charAt(i);\n categoryString.append(c);\n if ( c == '[') {\n count6++;\n }\n else if ( c == ']') {\n count6--;\n }\n if ( count6 == 0 || (c == '=' && i+1 < length && inputText.charAt(i+1) == '=')) {\n if ( c == '=' ) {categoryString.deleteCharAt(categoryString.length()-1);}\n break;\n }\n }\n\n // System.out.println(\"category string=\"+categoryString.toString());\n processCategories(categoryString);\n\n }\n else if ( i+8 < length && inputText.substring(i+1,i+8).equalsIgnoreCase(\"[image:\") ) {\n\n /**\n * Images to be removed\n */\n\n count7 = 0;\n for ( ; i < length ; i++ ) {\n\n c = inputText.charAt(i);\n if ( c == '[') {\n count7++;\n }\n else if ( c == ']') {\n count7--;\n }\n if ( count7 == 0 || (c == '=' && i+1 < length && inputText.charAt(i+1) == '=')) {\n break;\n }\n }\n\n }\n else if ( i+7 < length && inputText.substring(i+1,i+7).equalsIgnoreCase(\"[file:\") ) {\n\n /**\n * File to be removed\n */\n\n count8 = 0;\n for ( ; i < length ; i++ ) {\n\n c = inputText.charAt(i);\n\n if ( c == '[') {\n count8++;\n }\n else if ( c == ']') {\n count8--;\n }\n if ( count8 == 0 || (c == '=' && i+1 < length && inputText.charAt(i+1) == '=')) {\n break;\n }\n }\n\n }\n\n }\n else if(c=='<')\n {\n //System.out.println(\"Process < >\");\n\n if ( i+4 < length && inputText.substring(i+1,i+4).equalsIgnoreCase(\"!--\") ) {\n\n /**\n * Comments to be removed\n */\n\n int locationClose = inputText.indexOf(\"-->\" , i+1);\n if ( locationClose == -1 || locationClose+2 > length ) {\n i = length-1;\n }\n else {\n i = locationClose+2;\n }\n\n }\n else if ( i+5 < length && inputText.substring(i+1,i+5).equalsIgnoreCase(\"ref>\") ) {\n\n /**\n * References to be removed\n */\n int locationClose = inputText.indexOf(\"</ref>\" , i+1);\n if ( locationClose == -1 || locationClose+5 > length ) {\n i = length-1;\n }\n else {\n i = locationClose+5;\n }\n\n }\n else if ( i+8 < length && inputText.substring(i+1,i+8).equalsIgnoreCase(\"gallery\") ) {\n\n /**\n * Gallery to be removed\n */\n int locationClose = inputText.indexOf(\"</gallery>\" , i+1);\n if ( locationClose == -1 || locationClose+9 > length) {\n i = length-1;\n }\n else {\n i = locationClose+9;\n }\n }\n\n }\n else if ( c == '=' && i+1 < length && inputText.charAt(i+1) == '=')\n {\n\n linkFound = false;\n i+=2;\n while ( i < length && ((c = inputText.charAt(i)) == ' ' || (c = inputText.charAt(i)) == '\\t') )\n {\n i++;\n }\n\n if ( i+14 < length && inputText.substring(i , i+14 ).equals(\"external links\") )\n {\n //System.out.println(\"External link found\");\n linkFound = true;\n i+= 14;\n }\n\n }\n else if ( c == '*' && linkFound == true )\n {\n\n //System.out.println(\"Link found\");\n count9 = 0;\n boolean spaceParsed = false;\n StringBuilder link = new StringBuilder();\n while ( count9 != 2 && i < length )\n {\n c = inputText.charAt(i);\n if ( c == '[' || c == ']' )\n {\n count9++;\n }\n if ( count9 == 1 && spaceParsed == true)\n {\n link.append(c);\n }\n else if ( count9 != 0 && spaceParsed == false && c == ' ')\n {\n spaceParsed = true;\n }\n i++;\n }\n\n StringBuilder linkWord = new StringBuilder();\n for ( int j = 0 ; j < link.length() ; j++ )\n {\n char currentCharTemp = link.charAt(j);\n if ( (int)currentCharTemp >= 'a' && (int)currentCharTemp <= 'z' )\n {\n linkWord.append(currentCharTemp);\n }\n else\n {\n\n // System.out.println(\"link : \" + linkWord.toString());\n processLink(linkWord);\n linkWord.setLength(0);\n }\n }\n if ( linkWord.length() > 1 )\n {\n //System.out.println(\"link : \" + linkWord.toString());\n processLink(linkWord);\n linkWord.setLength(0);\n }\n\n }\n else\n {\n if(word.length()>1)\n filterAndAddWord(word,contentType);\n\n word.setLength(0);\n }\n }\n\n\n if(word.length()>1)\n filterAndAddWord(word,contentType);\n\n word.setLength(0);\n /*\n if(word.length()>0)\n {\n finalWord=new String(word);\n if(!(checkStopword(finalWord)))\n {\n st.add(finalWord.toCharArray(),finalWord.length());\n stemmedWord=st.stem();\n\n createindex.addToTreeSet(stemmedWord,docId);\n\n }\n\n word.delete(0, word.length());\n } */\n\n }", "SList evenWords();", "public void wapTinyurl() {\n String url = \"http://m.nuomi.com/mianyang/deal/l5kkhcqr\";\r\n Pattern p = Pattern.compile(\"^http://\\\\w+\\\\.nuomi\\\\.com/\\\\w+/deal/(\\\\w+$)\");\r\n Matcher m = p.matcher(url);\r\n if (m.find()) {\r\n p(m.group(1));\r\n }\r\n }", "public List<String> stem(List<String> terms) {\r\n\t\tPaiceHuskStemmer stemmer = null;\r\n\t\ttry {\r\n\t\t\tstemmer = PaiceHuskStemmer.getInstance(SVMClassifier.class.getClassLoader().getResource(\"stemrules.txt\").openStream());\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tstemmer.setPreStrip(false);\r\n\t\tfor (int i = 0; i < terms.size(); i++) {\r\n\t\t\tString w = terms.get(i);\r\n\t\t\tterms.set(i, stemmer.stripAffixes(w));\r\n\t\t}\r\n\t\treturn terms;\r\n\t}", "@Override\n\tpublic String getStemming(String phrase) {\n\t\treturn null;\n\t}", "@Test\n\tpublic void testGetWords() throws MalformedURLException, IOException, BadLocationException {\n\t\t\n\t\t// Setup\n\t\tArticle a = new Article(new File(\"test/res/sample_article.html\").toURI().toURL());\n\t\ta.read();\n\t\t\n\t\t// Exercise\n\t\tList<String> words = a.getWords();\n\t\t\n\t\t// Verify\t\t\n\t\tAssert.assertNotNull(words);\n\t\tAssert.assertTrue(words.size() > 0);\n\t}", "java.lang.String getWord();", "private static List<Pair<String, Integer>> splitWords(String line) {\n // This is kinda silly: we read and parse the stop words file once for each chunk, but this is the way the book\n // does it, so better stay in line with that.\n Set<String> stopWords = Arrays.stream(readFile(\"../stop_words.txt\").split(\",\")).\n collect(Collectors.toCollection(HashSet::new));\n return Arrays.stream(line.replaceAll(\"[^a-zA-Z\\\\d\\\\s]\", \" \").toLowerCase().split(\" \")).\n filter(w -> w.length() >= 2 && !stopWords.contains(w)).\n map(w -> new Pair<>(w, 1)).\n collect(Collectors.toList());\n }", "private void getWords(String input) {\r\n\t\tSystem.out.print(\"Searching.\");\r\n\t\tSolution solution = null;\r\n\t\twhile ((solution = controller.getAnswer(input)) == null) {\r\n\t\t\ttry {\r\n\t\t\t\tThread.sleep(200);\r\n\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t// XXX don't know what to do here...\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\".\");\t// progress dots\r\n\t\t}\r\n\t\tSystem.out.println();\t\t// new line for progress dots\r\n\t\tresults.setSolution(solution);\r\n\t\tdisplayWords();\r\n\t}", "static String getResponseFromHttpUrl(URL url) throws IOException {\n HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();\n try {\n InputStream in = urlConnection.getInputStream();\n\n Scanner scanner = new Scanner(in);\n scanner.useDelimiter(\"\\\\A\");\n\n boolean hasInput = scanner.hasNext();\n String response = null;\n if (hasInput) {\n response = scanner.next();\n }\n scanner.close();\n return response;\n } finally {\n urlConnection.disconnect();\n }\n }", "public static List<String> validStems(List<String> words)\n\t{\n\t\tStemmer stemmer = new Stemmer();\n\t\tArrayList<String> goodWords = new ArrayList<String>();\n\t\tfor (String word : words)\n\t\t{\n\t\t\tString stem = stemmer.stem(word);\n\t\t\tif (dictUtils.dict.containsKey(stem))\n\t\t\t{\n\t\t\t\tgoodWords.add(stem);\n\t\t\t}\n\t\t}\n\t\treturn goodWords;\n\t}", "private static ArrayList<Result> bagOfWords(Query query, DataManager myVocab) {\n\t\tString queryname = query.getQuery();\n\t\t// split on space and punctuation\n\t\tString[] termList = queryname.split(\" \");\n\t\tArrayList<Result> bagResults = new ArrayList<Result>();\n\t\tfor (int i=0; i<termList.length; i++){\n\t\t\tQuery newQuery = new Query(termList[i], query.getLimit(), query.getType(), query.getTypeStrict(), query.properties()) ;\n\t\t\tArrayList<Result> tempResults = new ArrayList<Result>(findMatches(newQuery, myVocab));\n\t\t\tfor(int j=0; j<tempResults.size(); j++){\n\n\t\t\t\ttempResults.get(j).setMatch(false);\n\t\t\t\ttempResults.get(j).decreaseScore(termList.length);\n\t\t\t\tif(tempResults.get(j).getScore()>100){\n\t\t\t\t\ttempResults.get(j).setScore(99.0);\n\t\t\t\t}else if (tempResults.get(j).getScore()<1){\n\t\t\t\t\ttempResults.get(j).setScore(tempResults.get(j).getScore()*10);\n\t\t\t\t}\n\t\t\t}\n\t\t\tbagResults.addAll(tempResults);\n\t\t}\n\t\treturn bagResults;\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tif (args.length != 1) {\n\t\t\tthrow new IllegalArgumentException(\"Usage: java WordCount <URL>\");\n\t\t}\n\t\tString site = args[0];\n\t\t\n\t\t// If efficiency becomes important, a BufferedInputStream could be used in place of Jsoup.\n\t\t// This would prevent multiple passes over the text, but would introduce the challenge of\n\t\t// reading between HTML tags.\n\t\tString text;\n\t\ttry {\n\t\t\ttext = Jsoup.connect(site).get().text();\n\t\t} catch (IllegalArgumentException e) {\n\t\t\t// Attempt to connect with https:// protocol prepended\n\t\t\ttry {\n\t\t\t\tsite = \"https://\" + site;\n\t\t\t\ttext = Jsoup.connect(site).get().text();\n\t\t\t} catch (IllegalArgumentException a) {\n\t\t\t\tthrow new IllegalArgumentException(\"Page cannot be loaded. \"\n\t\t\t\t\t\t+ \"Usage: java WordCount <URL>\");\n\t\t\t} catch (IOException m) {\n\t\t\t\tthrow new IllegalArgumentException(\"Page cannot be loaded. \"\n\t\t\t\t\t\t+ \"Usage: java WordCount <URL>\"); \n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tthrow new IllegalArgumentException(\"Page cannot be loaded.\"\n\t\t\t\t\t+ \" Usage: java WordCount <URL>\");\n\t\t} \n\t\t\n\t\t// Split text into array using alphabetical (multiple languages) and \n\t\t// apostrophe characters\n\t\tString[] textArr = text.split(\"[^\\\\p{L}'’]+\");\n\t\tTree dictionary = new Tree();\n\t\tfor (int i = 0; i < textArr.length; i++) {\n\t\t\tdictionary.insert(textArr[i].toLowerCase());\n\t\t}\n\t\t\n\t\t// Build array using the dictionary. A more efficient solution would involve using a \n\t\t// sorted LinkedList of size 25, and only adding Nodes to the list if they are greater\n\t\t// than the current least Node, adding the new lowest value to the tail with \n\t\t// each insertion.\n\t\tNode[] arr = dictionary.toArray();\n\t\tArrays.sort(arr);\n\t\tfor (int i = 0; i < NUMBER_OF_WORDS; i++) {\n\t\t\tif (i < arr.length) {\n\t\t\t\tSystem.out.printf(\"%-12s%10d\\n\", arr[i].getWord(), arr[i].getCount());\n\t\t\t}\n\t\t}\n\t\t\n\t}", "private void exercise7() throws IOException {\n final Path resourcePath = retrieveResourcePath();\n List<String> result;\n try (BufferedReader reader = newBufferedReader(resourcePath)) {\n result = reader.lines()\n .flatMap(line -> of(line.split(WORD_REGEXP)))\n .distinct()\n .map(String::toLowerCase)\n .sorted(comparingInt(String::length))\n .collect(toList());\n }\n\n result.forEach(System.out::println);\n }", "public static ArrayList<String> getWordsInString(String s) {\r\n\t\t// Search words in text\r\n\t\tString[] split = s.replace('-', ' ').split(\" \");\r\n\t\tArrayList<String> words = new ArrayList<String>(split.length);\r\n\t\t// Remove punctuation\r\n\t\tfor(String str : split) {\r\n\t\t\tif(str.isEmpty()) continue;\r\n\t\t\tStringBuilder wordBuilder = new StringBuilder();\r\n\t\t\tfor(int j = 0; j < str.length(); j++) {\r\n\t\t\t\tchar c = str.charAt(j);\r\n\t\t\t\tif(c >= 'A' && c <= 'Z') c = (char) (c + 'a' - 'A');\r\n\t\t\t\tif((c >= 'a' && c <= 'z') || (c >= '0' && c <= '9')) {\r\n\t\t\t\t\twordBuilder.append(c);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\twords.add(wordBuilder.toString());\r\n\t\t}\r\n\t\treturn words;\r\n\t}", "public WordInfo searchWord(String word) {\n\t\tSystem.out.println(\"Dic:SearchWord: \"+word);\n\n\t\tDocument doc;\n\t\ttry {\n\t\t\tdoc = Jsoup.connect(\"https://dictionary.cambridge.org/dictionary/english-vietnamese/\" + word).get();\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\n\t\tElements elements = doc.select(\".dpos-h.di-head.normal-entry\");\n\t\tif (elements.isEmpty()) {\n\t\t\tSystem.out.println(\" not found\");\n\t\t\treturn null;\n\t\t}\n\n\t\tWordInfo wordInfo = new WordInfo(word);\n\n\t\t// Word\n\t\telements = doc.select(\".tw-bw.dhw.dpos-h_hw.di-title\");\n\n\t\tif (elements.size() == 0) {\n\t\t\tSystem.out.println(\" word not found in doc!\");\n\t\t\treturn null;\n\t\t}\n\n\t\twordInfo.setWordDictionary(elements.get(0).html());\n\n\t\t// Type\n\t\telements = doc.select(\".pos.dpos\");\n\n\t\tif(elements.size() > 0) {\n\t\t\twordInfo.setType(WordInfo.getTypeShort(elements.get(0).html()));\n//\t\t\tif (wordInfo.getTypeShort().equals(\"\"))\n//\t\t\t\tSystem.out.println(\" typemis: \"+wordInfo.getType());\n\t\t}\n\n\t\t// Pronoun\n\t\telements = doc.select(\".ipa.dipa\");\n\n\t\tif (elements.size() > 0)\n\t\t\twordInfo.setAPI(\"/\"+elements.get(0).html()+\"/\");\n\n\t\t// Trans\n\t\telements = doc.select(\".trans.dtrans\");\n\n\t\tif (elements.size() > 0)\n\t\t\twordInfo.setTrans(elements.get(0).html());\n\n\t\tSystem.out.println(\" found\");\n\t\treturn wordInfo;\n\t}", "public List<String> getContext(String keyword, String url_){\n\n\t\t\tPDDocument document = null;\n\t\t\tString pattern = \"((\\\\w+ ){1,3}|^)(\\\\W)*\" + keyword + \"(\\\\W)*(( \\\\w+){1,3}|$)\";\n\t\t\t// String result=\"\";\n\t\t\tList<String> result = new ArrayList<String>();\n\t\t\tPattern p = Pattern.compile(pattern);\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\t//System.out.println(\"------\"+nUrl);\n\t\t\t\tURL url = new URL(url_);\n\t\t\t\t// document=PDDocument.load(pdfFile);\n\t\t\t\tInputStream urlStream = url.openStream();\n\t\t\t\tdocument = PDDocument.load(urlStream);\n\n\t\t\t\t// get page number\n\t\t\t\tint pages = document.getNumberOfPages();\n\t\t\t\tPDFTextStripper stripper = new PDFTextStripper();\n\t\t\t\tstripper.setSortByPosition(true);\n\t\t\t\t// read text content page by page\n\t\t\t\tfor (int i = 0; i <= pages; i++) {\n\t\t\t\t\tstripper.setStartPage(i);\n\t\t\t\t\tstripper.setEndPage(i);\n\t\t\t\t\tString content = stripper.getText(document);\n\t\t\t\t\tSystem.out.println(content);\n\t\t\t\t\tString[] strs = content.split(\"\\n\");\n\t\t\t\t\tint line_number = 0;\n\t\t\t\t\tfor (String str : strs) {\n\t\t\t\t\t\tMatcher match = p.matcher(str);\n\t\t\t\t\t\twhile (match.find()) {\n\t\t\t\t\t\t//\tSystem.out.println(\"Found keyword: \" + match.group(0) + \" in line: \" + line_number + \" page: \"\n\t\t\t\t\t\t//\t\t\t+ i + \" at position \" + match.start(0));\n\n\t\t\t\t\t\t\tresult.add(match.group(0) + \"(page: \" + i + \" line: \" + line_number + \")\");\n\t\t\t\t\t\t\t// result=result+strs[line_number]+\"(page: \"+i+\" line:\n\t\t\t\t\t\t\t// \"+line_number+\")\"+\"\\n\";\n\t\t\t\t\t\t//\tSystem.out.println(str);\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\tline_number++;\n\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tdocument.close();\n\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} finally {\n\n\t\t\t\treturn result;\n\t\t\t}\n\n\t\t}", "public String findAntonyms(String word) throws IOException {\n try {\n word = word.toLowerCase();\n String check = dictionaryDao.readDB(word);\n if(!check.contains(\"null\"))\n return dictionaryDao.readDB(word); //checkFile(word);\n DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\n URL url = new URL(PATH + word + XML);\n URLConnection connection = url.openConnection();\n Document doc = parseXML(connection.getInputStream());\n NodeList xml = doc.getElementsByTagName(\"w\");\n String xmlElementValue = null;\n ArrayList<String> antonymsCollection = new ArrayList<>();\n\n for (int i = 0; i < xml.getLength(); i++) {\n Element element = (Element) xml.item(i);\n if (isAntonym(element.getAttribute(\"r\"))) {\n xmlElementValue = element.getTextContent();\n antonymsCollection.add(xmlElementValue);\n }\n }\n\n String lastElement = antonymsCollection.get(antonymsCollection.size()-1);\n String antonymsCollectionString = \"\";\n\n for(String s : antonymsCollection) {\n if(!s.equals(lastElement))\n antonymsCollectionString += s + \", \";\n else\n antonymsCollectionString += s + \".\";\n }\n dictionaryDao.addToDB(word, antonymsCollectionString); //saveToFile(word, antonymsCollectionString);\n return \"Antonym/s for \" + word + \": \" + antonymsCollectionString;\n } catch (UnknownHostException e) {\n return INTERNECT_CONNECTION;\n } catch (NullPointerException e) {\n return INCORRECT_WORD;\n } catch (ArrayIndexOutOfBoundsException e) {\n return INCORRECT_WORD;\n } catch(IOException e){\n return INCORRECT_WORD;\n } catch (JdbcSQLException e) {\n return DATABASE_ERROR;\n } catch (Exception e) {\n StringWriter errors = new StringWriter();\n e.printStackTrace(new PrintWriter(errors));\n return errors.toString();\n }\n }", "public String normalize(String word);", "private void exercise6() throws IOException {\n final Path resourcePath = retrieveResourcePath();\n List<String> result;\n try (BufferedReader reader = newBufferedReader(resourcePath)) {\n result = reader.lines()\n .flatMap(line -> of(line.split(WORD_REGEXP)))\n .distinct()\n .map(String::toLowerCase)\n .sorted()\n .collect(toList());\n }\n\n result.forEach(System.out::println);\n }", "List<String> searchTweets(String keywords) throws TwitterException;", "@Override\n public List<DefinitionDTO> findWordsByWord(String query) {\n List<Word> words = wordRepository.findBySearchString(query);\n return DTOMapper.mapWordListToDefinitionDTOList(words);\n }", "public void showWordsListInfo(String path) throws IOException {\r\n\t ArrayList<String> listOfWords=new ArrayList<String>();//creem lista\r\n\t @SuppressWarnings(\"resource\") \r\n\tBufferedReader bfr=new BufferedReader(new FileReader(new File(path)));//initializam un buffer reader cu calea URL a unui fisier\r\n\t String word=\"\"; \r\n\t while ((word = bfr.readLine()) != null) \t //pentru fiecare linie citita, incarcam lista cu respectivul cuvant de pe linie. \r\n\t listOfWords.add(word);\r\n\t for (String element_word : listOfWords) {\r\n\t \t System.out.println(element_word);\r\n\t\t\tshowInfoWord(element_word); //pentru fiecare cuvant din lista afisam informatiile :cuvantul, Acceptata/Neacceptat, starea finala.\r\n\t\t\t\r\n\t\t}\r\n }", "public static Set<String> preprocessStemAndTokenizeAddBigramsInSet(String data) {\n\t\t//System.out.println(\"Preprocess data, remove stop words, stem, tokenize and get bi-grams ..\");\n\n\t\tSet<String> transformedSet = new LinkedHashSet<String>();\n\t\tList<String> stemmedList = new ArrayList<String>();\n\n\t\t//System.out.println(\"Stop words length:\" + stopwords.size());\n\t\tTokenizer analyzer = new Tokenizer(Version.LUCENE_30);\n\t\tTokenStream tokenStream = analyzer.tokenStream(\"\", new StringReader(data));\n\t\tTermAttribute termAttribute;\n\t\tString term;\n\t\ttry {\n\t\t\twhile (tokenStream.incrementToken()) {\n\t\t\t\ttermAttribute = tokenStream.getAttribute(TermAttribute.class);\n\t\t\t\tterm = termAttribute.term();\n\t\t\t\tif (digitPattern.matcher(term).find()) //ignore digits\n\t\t\t\t\tcontinue;\n\t\t\t\tif (stopwords.contains(term)) //ignore stopwords\n\t\t\t\t\tcontinue;\n\t\t\t\tif (term.length() <= 1) //ignore single letter words\n\t\t\t\t\tcontinue;\n\t\t\t\tstemmer.setCurrent(term);\n\t\t\t\tstemmer.stem();\n\t\t\t\tstemmedList.add(stemmer.getCurrent());\n\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tString[] ds = stemmedList.toArray(new String[0]);\n\n\t\t/*for(int i=0; i<stemmedList.size(); i++)\n\t\t\tSystem.out.print(ds[i]+\"\\t\");*/\n\n\t\t//add bi-grams\n\t\tfinal int size = 2;\n\t\tfor (int i = 0; i < ds.length; i++) {\n\t\t\ttransformedSet.add(ds[i]); //add single words\n\t\t\tif (i + size <= ds.length) {\n\t\t\t\tString t = \"\";\n\t\t\t\tfor (int j = i; j < i + size; j++) {\n\t\t\t\t\tt += \" \" + ds[j];\n\t\t\t\t}\n\t\t\t\tt = t.trim().replaceAll(\"\\\\s+\", \"_\");\n\t\t\t\ttransformedSet.add(t); //add bi-gram combined with \"_\"\n\t\t\t}\n\t\t}\n\t\t//System.out.println(\" \")\n\t\tstemmedList.clear();\n\t\tstemmedList = null;\n\t\tds = null;\n\t\treturn transformedSet;\n\t}", "public Set<String> hyponyms(String word) {\n Set<String> toReturn = new HashSet<String>();\n Set<Integer> wordIndexes = new HashSet<Integer>();\n wordIndexes = wnetsi.get(word);\n Set<Integer> toReturnInt = GraphHelper.descendants(g, wordIndexes);\n Object[] returnArray = toReturnInt.toArray();\n for (int i = 0; i < returnArray.length; i += 1) {\n Set<String> stringReturn = wnetis.get(returnArray[i]);\n Iterator<String> strIter = stringReturn.iterator();\n while (strIter.hasNext()) {\n toReturn.add(strIter.next());\n }\n }\n return toReturn;\n }", "public void crawl(String url);", "private @NotNull List<String> getAllLinks(final String text, final String urlStart) {\n List<String> links = new ArrayList<>();\n\n int i = 0;\n while (text.indexOf(urlStart, i) != -1) {\n int linkStart = text.indexOf(urlStart, i);\n int linkEnd = text.indexOf(\" \", linkStart);\n if (linkEnd != -1) {\n String link = text.substring(linkStart, linkEnd);\n links.add(link);\n } else {\n String link = text.substring(linkStart);\n links.add(link);\n }\n i = text.indexOf(urlStart, i) + urlStart.length();\n }\n\n return links;\n }", "public static ArrayList<Result> findMatches(Query query, DataManager myVocab){\n\n\t\t//Uncomment this for logging in this class\t\n//\t\tmyLogger.setLevel(Level.INFO); \n\n\t\t// get the term we're going to search for and\n\t\t// take out any leading or trailing whitespaces\n\t\tString querystr = query.getQuery();\n\t\tquerystr = querystr.trim();\n\t\tString uncleaned = querystr;\n\t\t\n\t\t// This is in case of numeric entries. Google Refine doesn't seem\n\t\t// to have int cell types, instead it adds an invisible .0 to all\n\t\t// numbers. This fixes that issue, as it sometimes causes false negatives.\n\t\tif (querystr.endsWith(\".0\")){\n\t\t Pattern p = Pattern.compile(\"[^0-9\\\\.]+\");\n\t\t Matcher m = p.matcher(querystr);\n\t\t boolean result = m.find();\n\t\t if (!result){\n\t\t \t querystr = querystr.substring(0, querystr.length()-2);\n\t\t }\n\t\t}\n\t\t// see if it's in the synonyms map, if it is\n\t\t// replace it with the appropriate term, if it's\n\t\t// not, don't do anything. \n\n\t\tif (myVocab.subMap.get(querystr)!=null){\n\t\t\tquerystr = myVocab.subMap.get(querystr);\n\t\t\tquery.setQuery(querystr);\n\t\t}\n\t\t\n\t\t// Clean up the query string if it isn't case/punctuation sensitive\n\t\tif (!myVocab.capsSensitive()){\t\t\n\t\t\tquerystr = querystr.toLowerCase();\n\t\t}\n\t\tif (! myVocab.punctSensitive()){\t\t\n\t\t\tquerystr = querystr.replaceAll(\"[\\\\W_]\", \"\");\n\t\t}\n\t\t\n\t\t// see if it's in the synonyms map, if it is\n\t\t// replace it with the appropriate term, if it's\n\t\t// not, don't do anything. \n\t\tif(myVocab.subMap.get(querystr)!=null){\n\t\t\tquerystr = myVocab.subMap.get(querystr);\n\t\t\tquery.setQuery(querystr);\n\t\t}\n\n\t\tString type = query.getType();\n\n\t\t// This ArrayList is the results that are going to be returned. \n\t\tArrayList<Result> results = getDirectMatches(myVocab, querystr, uncleaned, type);\n\t\t\n\t\t// If there's a perfect match return it.\n\t\tif (results.size() == 1 && results.get(0).match){\n\t\t\treturn results;\n\t\t}else{\n\t\t\t// Otherwise, add the initial ones and try matching\n\t\t\t// based on distance to vocabulary terms.\n\t\t\tresults.addAll(distanceMatching(query, myVocab));\n\t\t\t\n\t\t\t// Split the original query term by space and non-alphanumeric characters \n\t\t\t// to find how many words there are.\n\t\t\t//querystr = query.getQuery().replaceAll(\"[\\\\W_]\", \" \");\n\t\t\tString [] termList = querystr.split(\" \");\n\t\t\t\n\t\t\t// if there's more than one, run bagOfWords\n\t\t\t// which tries to find a match for each of the words.\n\t\t\tif (termList.length > 1){\n\t\t\t\tresults.addAll(bagOfWords(query, myVocab));\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Clean the results: no duplicates\n\t\t// no extra results to return, and sorted\n\t\t// them by score before returning them\n\t\tresults = removeDuplicates(results);\n\t\t\n\t\t// They do not need to be reduced in \n\t\t// number if there are fewer than \n\t\t// the max results.\n\t\t// The pruneResults sorts them\n\t\t// by score already.\n\t\tif(query.getLimit()!=null){\n\t\t\tresults = pruneResults(results,Integer.parseInt(query.getLimit()));\n\t\t}else{\n\t\t\tresults = pruneResults(results,MAX_RESULTS);\n\t\t}\n\t\t\t\n\t\tresults = sortByScore(results);\n\t\tfor (int i = 0; i< results.size(); i++){\n//\t\t\tmyLogger.log(Level.SEVERE,results.get(i).getScore()+ \" is bigger than 100?\");\n\t\t\tif(results.get(i).getScore() > (double)100){\n\t\t\t\tresults.get(i).setScore((double)100 - (results.get(i).getScore()-(double)100));\n//\t\t\t\tmyLogger.log(Level.SEVERE,results.get(i).getScore()+\" is bigger than 100! and was set to \"+\n//\t\t\t\t\t\t((double)100 - (results.get(i).getScore()-(double)100)));\n\t\t\t}\n\t\t}\n\t\treturn results;\n\t}", "public void parseThesaurus() throws IOException {\r\n\t\t\t//We create an object below to read the thesaurus file\r\n\t\t\tFileInputStream fis = new FileInputStream(\"src//ie//gmit//dip//resources//MobyThesaurus3.txt\");\r\n\t\t\tBufferedReader br=new BufferedReader(new InputStreamReader(fis));\r\n\t\t\t List <List<String>> listOflist= new ArrayList<>();\r\n\t\t\t// HashMap<String,List> tMap = new HashMap<>();\t\t\r\n\t\t\t List <String> individualListOfSynonyms= new ArrayList <String>();\r\n\r\n\t\t\t \r\n\t\t\t //we create a hashmap with the first word being the key value and the rest a list of synonims we will use\r\n\t\t\twhile(br.readLine()!=null) {\r\n\t\t\t\t\r\n\t\t\t\tString somestring = br.readLine();\r\n\t\t\t\tString[] testsplit= somestring.split(\",\");\r\n\t\t\t\tindividualListOfSynonyms=Arrays.asList(testsplit);\r\n\t\t\t\tString indexvalue=individualListOfSynonyms.get(0).toString();\r\n\t\t\t tMap.put(indexvalue, individualListOfSynonyms);\r\n\t\t\t //br.close();\r\n\t\t\t //System.out.println(tMap);\r\n\t\t\t }\r\n\t\t\t}", "public List<Stem> stem(char word[], int length) {\n List<Stem> stems = new ArrayList<Stem>();\n if (dictionary.lookupWord(word, 0, length) != null) {\n stems.add(new Stem(word, length));\n }\n stems.addAll(stem(word, length, null, 0));\n return stems;\n }", "public static List<String> validWords(List<String> words)\n\t{\n\t\tStemmer stemmer = new Stemmer();\n\t\tList<String> goodWords = new ArrayList<String>();\n\t\tfor (String word : words)\n\t\t{\n\t\t\tString stem = stemmer.stem(word);\n\t\t\tif (dictUtils.dict.containsKey(stem))\n\t\t\t{\n\t\t\t\tgoodWords.add(dictUtils.dict.get(stem));\n\t\t\t}\n\t\t}\n\t\treturn goodWords;\n\t}", "public WordsToGuess(String w)\n\t{\n\t\tword = w;\n\t}", "List<T> getWord();", "public List<String> predict(String term) {\n\t\tList<String> results = new ArrayList<String>();\n\t\tif (term == null) {\n\t\t\treturn results;\n\t\t}\n\t\tString formattedTerm = term.strip().toLowerCase();\n\t\tif (formattedTerm.length() < this.minimumNumberOfCharacters) {\n\t\t\treturn results;\n\t\t}\n\t\t\n\t\tQueue<Character> characters = this.toCharacterQueue(formattedTerm);\n\t\tNode lastCharacterNode = this.getLastCharacterNode(this.root, characters);\n\t\tif (lastCharacterNode != null) {\n\t\t\tList<String> fragments = this.getChildrenFragments(lastCharacterNode);\n\t\t\tfor (String fragment : fragments) {\n\t\t\t\tresults.add(formattedTerm.substring(0, formattedTerm.length() - 1) + fragment);\n\t\t\t}\n\t\t}\n\t\treturn results;\n\t}", "static List<WebURL> ExtractUrl(Page page){\n // TODO: reference to parser to extractor urls from the web content\n return null;\n }", "String getSynonyms();", "private static Stream<String> createBadWordsDetectingStream(String text, \n List<String> badWords) {\n\t \treturn Arrays.stream(text.split(\" \")).filter(el -> !badWords.contains(el)).distinct().sorted().collect(Collectors.toList()).stream();\n\t }", "default Stream<CharSequence> parseTextToWords(CharSequence text) {\n return toSentences(text).filter(s -> s.length() > 0).flatMap(this::toWords);\n }", "String[] splitSentenceWords() {\n\t\t\tint i=0;\n\t\t\tint j=0;\n\t\t\tArrayList<String> words = new ArrayList<String>();\n\t\t\t\n\t\t\t\tString[] allWords = wordPattern.split(purePattern.matcher(sentence).replaceAll(\" \"));//.split(\"(?=\\\\p{Lu})|(\\\\_|\\\\,|\\\\.|\\\\s|\\\\n|\\\\#|\\\\\\\"|\\\\{|\\\\}|\\\\@|\\\\(|\\\\)|\\\\;|\\\\-|\\\\:|\\\\*|\\\\\\\\|\\\\/)+\");\n\t\t\tfor(String word : allWords) {\n\t\t\t\tif(word.length()>2) {\n\t\t\t\t\twords.add(word.toLowerCase());\n\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\treturn (String[])words.toArray(new String[words.size()]);\n\t\t\n\t\t}", "private String nameFolder() {\n\t\tString stringUrl = url.toString();\n\t\tint position1 = stringUrl.indexOf(\"://www.\"); \t\t\t\t // position of first \":\"\n\t\tint position2; \t\t\t\t\t\t \t\t\t\t\t // position before the country's suffix\n\n\t\ttry {\n\t\t\t// case link is something \"http://listofrandomwords.com/\"\n\t\t\tif (position1 == -1) {\n\t\t\t\tposition1 = stringUrl.indexOf(\"://\"); \t\t\t\t\t // position of \":\"\n\t\t\t\tposition2 = stringUrl.indexOf(\".\", 6);\t\t\t\t\t\t// position of first \".\"\n\t\t\t\treturn stringUrl.substring(position1 + 3, position2); \t// position + 3 = first letter of domain\n\t\t\t} else {\n\t\t\t\tposition2 = stringUrl.indexOf(\".\", 12);\t\t\t\t\t\t// position of second \".\"\n\t\t\t\treturn stringUrl.substring(position1 + 7, position2);\t\t// position + 7 = first letter of domain\n\t\t\t}\n\t\t} catch (StringIndexOutOfBoundsException e) {\n\t\t\tRandom ran = new Random();\n\t\t\treturn RANDOM_WORDS[ran.nextInt(RANDOM_WORDS.length - 1)];\n\t\t}\n\t}", "public String stem(String input) {\n String output = \"\";\n // create an empty Annotation just with the given text\n document = new Annotation(input);\n // run all Annotators on this text\n pipeline.annotate(document);\n // traverse words in the document\n for (CoreLabel token : document.get(CoreAnnotations.TokensAnnotation.class)) {\n output = output + token.lemma() + \" \";\n }\n\n return output.trim();\n }", "static void ReadQuery(String input) throws FileNotFoundException {\n input = input.replaceAll(\"[^A-Za-z]\",\" \");\n String[] arr = input.split(\" \"); // splitting the whole string into words by split on the basis of white spaces\n\n\n for(int i=0; i<arr.length; i++) {\n String termWord = arr[i].toLowerCase();\t//same pre-processing is applied to all the query word\n //termWord = RemoveSpecialCharacter(termWord);\n termWord = removeStopWords(termWord);\n\n if(!termWord.equalsIgnoreCase(\"\")) { // all the white spaces are removed as if not removed then lemmatization wont be successfully done\n\n termWord = Lemmatize(termWord);\n System.out.println(termWord);\n if(dictionary.containsKey(termWord)) {\n List<Integer> wordList = new ArrayList<>();\n wordList = dictionary.get(termWord);\n int queryWordFrequency = wordList.get(totaldocument);\n queryWordFrequency++;\n wordList.set(totaldocument, queryWordFrequency); // all the frequencies of the query words are stored at the 56th index of the List stored in the\n //hashmap associated with its word-terms\n dictionary.put(termWord, wordList);\n }\n else {\n //if any of the enterd query word not present in all the docs so list will have 0.0 value from 0th index to 55th and 56th index is reserver\n // for query word frequency\n List<Integer> wordList = new ArrayList<>();\n for(int j=0; j<totaldocument+1; j++) {\n wordList.add(0);\n }\n wordList.add(1);\n dictionary.put(termWord, wordList); //updating the dictionary hashmap now containing all the query words frequencies\n }\n }\n }\n save();\n }", "final void checkMatch(String input,String url,String title)\r\n {\r\n String searchLine=removeHTMLTags(input); // remove html tags before search.\r\n // If the line contains non - HTML text then search it.\r\n\tif(searchLine.length()>0)\r\n\t{\r\n\t if(app.matchCase) // Check if case sensitive search\r\n\t {\r\n\t if(app.matchWord) // Check if attempting to match whole word\r\n\t\t{\r\n\t\t if(searchLine.indexOf(\" \"+textToFind+\" \")!=-1 ||\r\n \t\t (searchLine.indexOf(textToFind)!=-1 && searchLine.length()==textToFind.length()) ||\r\n\t\t\t\t searchLine.indexOf(\" \"+textToFind)!=-1 && textToFind.charAt(textToFind.length()-1)==\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t searchLine.charAt(searchLine.length()-1))\r\n\t\t {\r\n\t\t // Found it display the match\r\n\t\t app.addToList(url,searchLine,title);\r\n\t\t hitsFound++;\t\r\n\t\t }\r\n\t\t}\r\n\t\telse if(searchLine.indexOf(textToFind)!=-1)\r\n\t\t{\r\n\t\t // Found it display the match\r\n\t\t app.addToList(url,searchLine,title);\r\n\t\t hitsFound++;\r\n\t\t}\r\n\t }\r\n\t else\r\n\t {\r\n\t String lower1=searchLine.toLowerCase();\r\n\t\tString lower2=textToFind.toLowerCase();\r\n\t\t// Check if attempting to match the whole word.\r\n\t\tif(app.matchWord)\r\n\t\t{\r\n\t\t if(lower1.indexOf(\" \"+lower2+\" \")!=-1 || \r\n\t\t (lower1.indexOf(lower2)!=-1 && lower1.length()== lower2.length()) ||\r\n\t\t\t (lower1.indexOf(\" \"+lower2)!=-1 && lower2.charAt(lower2.length()-1) == \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t lower1.charAt(lower1.length()-1)))\r\n {\r\n\t\t // Found it display the match\r\n\t\t\tapp.addToList(url,searchLine,title);\r\n\t\t\thitsFound++;\r\n\t\t }\r\n\t\t}\r\n\t\telse if(lower1.indexOf(lower2)!=-1)\r\n\t\t{\r\n\t\t // Found it! Display the match\r\n\t\t app.addToList(url,searchLine,title);\r\n\t\t hitsFound++;\r\n\t\t}\r\n\t }\r\n\t}\r\n }", "public List<String> decode(String s) {\n List<String> words = new ArrayList<>();\n if (s.length() == 0) return words;\n int i = 0;\n while (i < s.length()) {\n int d = s.indexOf(\"#\", i);\n int len = Integer.parseInt(s.substring(i , d));\n i = d + 1 + len;\n words.add(s.substring(d + 1, i));\n }\n return words;\n }", "public static String getWebsiteBase( String url, IOntologyModel universitiesOntologyModel ) {\r\n if( url == null ) {\r\n return null;\r\n }; // if\r\n \r\n // the url would have to be at least 8 chars long (because it would have \"http://\" or \"https://\")\r\n int httpPosition = url.startsWith( \"http://\" ) ? 7 : -1;\r\n httpPosition = url.startsWith( \"https://\" ) ? 8 : httpPosition;\r\n if( httpPosition == -1 ) {\r\n System.out.println( \"WHATISTHIS--url(1),getWebsiteBase: \" + url );\r\n return null;\r\n }; // if\r\n \r\n int slashPosition = url.indexOf( \"/\", httpPosition );\r\n if( slashPosition == -1 ) {\r\n if( url.endsWith( \"/\" ) == false ) { \r\n url += \"/\";\r\n }; // if\r\n slashPosition = url.indexOf( \"/\", httpPosition );\r\n if( slashPosition == -1 ) {\r\n System.out.println( \"WHATISTHIS--url(2),getWebsiteBase: \" + url );\r\n return null;\r\n }; // if\r\n }; // if\r\n \r\n int pos = 0;\r\n String ret = url.substring( 0, slashPosition );\r\n String portEnding[] = { \":8080\", \":8000\" };\r\n IInstanceNode instanceNode = null;\r\n \r\n // fix any url with useless port ending\r\n for( String port : portEnding ) {\r\n if( ret.endsWith( port ) ) {\r\n ret = ret.substring( 0, ret.length() - port.length() );\r\n }; // if\r\n }; // for\r\n \r\n // handle \".edu\" ending\r\n String eduCases[] = { \".edu\", \".edu.ar\", \".edu.au\", \".edu.br\", \".edu.cn\", \".edu.eg\", \r\n \".edu.hk\", \".edu.kw\", \".edu.lb\", \".edu.my\", \r\n \".edu.ng\", \".edu.om\", \".edu.pl\", \".edu.sg\", \".edu.tr\", \".edu.tw\", \".edu.uy\", \r\n \r\n \".ac.ae\", \".ac.at\", \".ac.bd\", \".ac.be\", \".ac.cn\", \".ac.cr\", \".ac.cy\", \r\n \".ac.il\", \".ac.in\", \".ac.jp\", \".ac.kr\", \".ac.nz\", \".ac.ru\", \".ac.th\", \".ac.uk\", \".ac.yu\", \".ac.za\" };\r\n \r\n // search for possible 'edu/ac' match\r\n for( String edu : eduCases ) {\r\n if( ret.endsWith( edu ) ) {\r\n pos = ret.lastIndexOf( \".\", ret.length() - edu.length() - 1 );\r\n pos = pos == -1 ? httpPosition : pos + 1; // for cases such as http://uga.edu/~ana\r\n ret = \"http://www.\" + ret.substring( pos ) + \"/\";\r\n \r\n // now, look it up in the universities\r\n instanceNode = universitiesOntologyModel.getInstanceNode( ret );\r\n if( instanceNode != null ) {\r\n return ret;\r\n }; // if\r\n //TODO\r\n //System.out.println( \"WHATISTHIS--url(3),getWebsiteBase: \" + ret );\r\n return null;\r\n }; // if\r\n }; // for\r\n \r\n // maybe there's a match on universitiesOntology\r\n String pieces[] = ret.substring( httpPosition ).split( \"\\\\.\" );\r\n if( pieces != null && pieces.length >= 2 ) {\r\n String tmp = \"http://www.\" + pieces[ pieces.length - 2 ] + \".\" + pieces[ pieces.length - 1 ] + \"/\";\r\n instanceNode = universitiesOntologyModel.getInstanceNode( tmp );\r\n if( instanceNode != null ) {\r\n return tmp;\r\n }; // if\r\n }; // if\r\n \r\n //TODO\r\n //System.out.println( \"WHATISTHIS--url(4),getWebsiteBase: \" + ret );\r\n return null;\r\n }", "public void run() {\n\n /**\n * Replace all delimiters with single space so that words can be\n * tokenized with space as delimiter.\n */\n for (int x : delimiters) {\n text = text.replace((char) x, ' ');\n }\n\n StringTokenizer tokenizer = new StringTokenizer(text, \" \");\n boolean findCompoundWords = PrefsHelper.isFindCompoundWordsEnabled();\n ArrayList<String> ufl = new ArrayList<String>();\n for (; tokenizer.hasMoreTokens();) {\n String word = tokenizer.nextToken().trim();\n boolean endsWithPunc = word.matches(\".*[,.!?;]\");\n \n // Remove punctuation marks from both ends\n String prevWord = null;\n while (!word.equals(prevWord)) {\n prevWord = word;\n word = removePunctuation(word);\n }\n \n // Check spelling in word lists\n boolean found = checkSpelling(word);\n if (findCompoundWords) {\n if (!found) {\n ufl.add(word);\n if (endsWithPunc) pushErrorToListener(ufl);\n } else {\n pushErrorToListener(ufl);\n }\n } else {\n if (!found) listener.addWord(word);\n }\n }\n pushErrorToListener(ufl);\n }", "public static ArrayList<String> wordTokenizer(String sentence){\n \n ArrayList<String> words = new ArrayList<String>();\n String[] wordsArr = sentence.replaceAll(\"\\n\", \" \").toLowerCase().split(\" \");\n \n for(String s : wordsArr){\n \n if(s.trim().compareTo(\"\") != 0)\n words.add(s.trim());\n \n }\n \n return words;\n \n }", "public static String preprocessStemAndTokenizeAddBigramsInString(String data) {\n\t\t//System.out.println(\"Preprocess data, remove stop words, stem, tokenize and get bi-grams ..\");\n\n\t\tSet<String> transformedSet = new LinkedHashSet<String>();\n\t\tList<String> stemmedList = new ArrayList<String>();\n\n\t\tTokenizer analyzer = new Tokenizer(Version.LUCENE_30);\n\t\tTokenStream tokenStream = analyzer.tokenStream(\"\", new StringReader(data));\n\t\tTermAttribute termAttribute;\n\t\tString term;\n\t\ttry {\n\t\t\twhile (tokenStream.incrementToken()) {\n\t\t\t\ttermAttribute = tokenStream.getAttribute(TermAttribute.class);\n\t\t\t\tterm = termAttribute.term();\n\t\t\t\tif (digitPattern.matcher(term).find()) //ignore digits\n\t\t\t\t\tcontinue;\n\t\t\t\tif (stopwords.contains(term)) //ignore stopwords\n\t\t\t\t\tcontinue;\n\t\t\t\tif (term.length() <= 1) //ignore stopwords\n\t\t\t\t\tcontinue;\n\t\t\t\tstemmer.setCurrent(term);\n\t\t\t\tstemmer.stem();\n\t\t\t\tstemmedList.add(stemmer.getCurrent());\n\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tString[] ds = stemmedList.toArray(new String[0]);\n\n\t\t/*for(int i=0; i<stemmedList.size(); i++)\n\t\t\tSystem.out.print(ds[i]+\"\\t\");*/\n\n\t\t//add bi-grams\n\t\tfinal int size = 2;\n\t\tfor (int i = 0; i < ds.length; i++) {\n\t\t\ttransformedSet.add(ds[i]); //add single words\n\t\t\tif (i + size <= ds.length) {\n\t\t\t\tString t = \"\";\n\t\t\t\tfor (int j = i; j < i + size; j++) {\n\t\t\t\t\tt += \" \" + ds[j];\n\t\t\t\t}\n\t\t\t\tt = t.trim().replaceAll(\"\\\\s+\", \"_\");\n\t\t\t\ttransformedSet.add(t); //add bi-gram combined with \"_\"\n\t\t\t}\n\t\t}\n\t\t//System.out.println(transformedSet.toArray(new String[transformedSet.size()]).toString());\n\t\treturn StringUtils.join( transformedSet.toArray(new String[transformedSet.size()]), \" \");\n\t\t\n\t}", "public void search(String url, String searchWord)\n {\n while(this.pagesVisited.size() < MAX_PAGES_TO_SEARCH)\n {\n String currentUrl;\n SpiderLeg leg = new SpiderLeg();\n if(this.pagesToVisit.isEmpty())\n {\n currentUrl = url;\n this.pagesVisited.add(url);\n }\n else\n {\n currentUrl = this.nextUrl();\n }\n leg.crawl(currentUrl); // Lots of stuff happening here. Look at the crawl method in\n // SpiderLeg\n boolean success = leg.searchForWord(searchWord);\n if(success)\n {\n System.out.println(String.format(\"**Success** Word %s found at %s\", searchWord, currentUrl));\n break;\n }\n this.pagesToVisit.addAll(leg.getLinks());\n }\n System.out.println(\"\\n**Done** Visited \" + this.pagesVisited.size() + \" web page(s)\");\n }", "@Nullable\r\n public static JSONArray retrieveSuggestions(final Context context, String word)\r\n {\r\n JSONArray content;\r\n\r\n try\r\n {\r\n RequestFuture<JSONArray> future = RequestFuture.newFuture();\r\n\r\n SharedPreferencesManager sharedPreferencesManager = new SharedPreferencesManager(context);\r\n\r\n User user = sharedPreferencesManager.retrieveUser();\r\n\r\n final String fixedURL = Utils.fixUrl(\r\n Properties.SERVER_URL + \":\" + Properties.SERVER_SPRING_PORT + \"/suggest/\" + user.getId() + \"/\" + word);\r\n\r\n Log.d(Properties.TAG, \"[REST_CLIENT_SINGLETON] Conectando con: \" + fixedURL + \" para traer las sugerencias\");\r\n\r\n // Creamos una peticion\r\n final JsonArrayRequest jsonObjReq = new JsonArrayRequest(Request.Method.GET\r\n , fixedURL\r\n , null\r\n , future\r\n , future);\r\n\r\n // La mandamos a la cola de peticiones\r\n VolleySingleton.getInstance(context).addToRequestQueue(jsonObjReq);\r\n Log.d(Properties.TAG, \"[REST_CLIENT_SINGLETON] Petición creada y recibida\");\r\n\r\n try\r\n {\r\n content = future.get(20, TimeUnit.SECONDS);\r\n\r\n } catch (InterruptedException e) {\r\n ExceptionPrinter.printException(\"REST_CLIENT_SINGLETON\", e);\r\n\r\n return null;\r\n }\r\n\r\n // Si content es vacio, es que han fallado todas las conexiones.\r\n if (content == null)\r\n {\r\n Log.e(Properties.TAG, \"[REST_CLIENT_SINGLETON] No se ha recibido nada\");\r\n\r\n return null;\r\n }\r\n\r\n } catch (Exception e) {\r\n ExceptionPrinter.printException(\"REST_CLIENT_SINGLETON\", e);\r\n\r\n return null;\r\n }\r\n\r\n return content;\r\n }", "public static ArrayList<String> words(String s){\n\t\ts = s.toLowerCase().replaceAll(\"[^a-zA-Z ]\", \"\");\n\t\tArrayList<String> arrayList = new ArrayList<String>();\n\t\tString currWord = \"\";\n\n\t\tfor(int i = 0; i < s.length(); i ++){\n\t\t\tchar c = s.charAt(i);\n\t\t\tif (Character.isLetter(c) == false){\n\t\t\t\tarrayList.add(currWord);\n\t\t\t\tcurrWord = \"\";\n\t\t\t}else{\n\t\t\t\tcurrWord = currWord + c;\n\t\t\t}\n\t\t}\n\t\tarrayList = removeSpaces(arrayList);\n\t\treturn arrayList;\n\t}", "protected String stem(String term) {\r\n\t\tStemmer stemmer = new Stemmer();\r\n\t\tfor(char a : term.toCharArray()){\r\n\t\t\tstemmer.add(a);\r\n\t\t}\r\n\t\tstemmer.stem();\r\n\t\treturn stemmer.toString();\r\n\t}", "private void fillSet() {\r\n\t\tString regex = \"\\\\p{L}+\";\r\n\t\tMatcher matcher = Pattern.compile(regex).matcher(body);\r\n\t\twhile (matcher.find()) {\r\n\t\t\tif (!matcher.group().isEmpty()) {\r\n\t\t\t\twords.add(matcher.group());\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static List<String> getWords(String text)\n\t{\n\t\tString lower = text.toLowerCase();\n\t\tString noPunct = lower.replaceAll(\"\\\\W\", \" \");\n\t\tString noNum = noPunct.replaceAll(\"[0-9]\", \" \");\n\t\tList<String> words = Arrays.asList(noNum.split(\"\\\\s+\"));\n\t\treturn words;\n\t}" ]
[ "0.67880285", "0.6221993", "0.618436", "0.60698134", "0.57809883", "0.5732128", "0.5668299", "0.5629883", "0.55930114", "0.5582491", "0.55772823", "0.5546449", "0.5545765", "0.5525704", "0.54941535", "0.5472951", "0.5424019", "0.5418643", "0.5401", "0.5388635", "0.5381601", "0.5364253", "0.53338194", "0.5332123", "0.5323586", "0.5315881", "0.527528", "0.52741516", "0.52595675", "0.52595377", "0.52499706", "0.5248393", "0.5244228", "0.52210057", "0.521671", "0.5186129", "0.51608455", "0.51301885", "0.5122402", "0.5112768", "0.51113904", "0.5105085", "0.50962794", "0.5089832", "0.5072676", "0.5064443", "0.5057063", "0.50489444", "0.504588", "0.50371504", "0.5029991", "0.5026932", "0.501959", "0.5016358", "0.50155115", "0.50084203", "0.5004307", "0.5001311", "0.49990213", "0.49871808", "0.49839136", "0.49823952", "0.49817777", "0.49735057", "0.4970001", "0.49510053", "0.4943107", "0.49369654", "0.49188235", "0.4914916", "0.49147603", "0.4908937", "0.4901353", "0.48988166", "0.48938224", "0.48903674", "0.48818296", "0.4879387", "0.4870402", "0.4864766", "0.48641837", "0.4861978", "0.48565167", "0.48427984", "0.484167", "0.48409128", "0.48406127", "0.48393884", "0.48372027", "0.48367277", "0.48344082", "0.482461", "0.48091996", "0.48077244", "0.48073605", "0.47952947", "0.47801283", "0.47743422", "0.47641993", "0.47629187" ]
0.6367357
1
Return stemmed words from a web page, in our dictionary
public static List<String> validWords(List<String> words) { Stemmer stemmer = new Stemmer(); List<String> goodWords = new ArrayList<String>(); for (String word : words) { String stem = stemmer.stem(word); if (dictUtils.dict.containsKey(stem)) { goodWords.add(dictUtils.dict.get(stem)); } } return goodWords; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String stemOf (String word);", "public List<Stem> stem(String word) {\n return stem(word.toCharArray(), word.length());\n }", "default String getStem() {\n return meta(\"nlpcraft:nlp:stem\");\n }", "public String Stem( String word )\n {\n // check if we already know the word\n String stemmedword = AllWords.get(word);\n if ( stemmedword != null )\n return stemmedword; // return it if we already know it\n\n // don't check words with digits in them\n // if ( containsNumbers (word) == true )\n // stemmedword = null;\n // else\t// unknown word: try to stem it\n stemmedword = StemWordWithWordNet (word);\n\n if ( stemmedword != null )\n {\n // word was recognized and stemmed with wordnet:\n // add it to hashmap and return the stemmed word\n AllWords.put( word, stemmedword );\n return stemmedword;\n }\n // word could not be stemmed by wordnet,\n // thus it is no correct english word\n // just add it to the list of known words so\n // we won't have to look it up again\n AllWords.put( word, word );\n return word;\n }", "@Override\n\tpublic String getStemming(String phrase) {\n\t\treturn null;\n\t}", "protected String stem(String term) {\r\n\t\tStemmer stemmer = new Stemmer();\r\n\t\tfor(char a : term.toCharArray()){\r\n\t\t\tstemmer.add(a);\r\n\t\t}\r\n\t\tstemmer.stem();\r\n\t\treturn stemmer.toString();\r\n\t}", "private String processWord(String word){\r\n\t\tString lword = word.toLowerCase();\r\n\t\tfor (int i = 0;i<word.length();++i){\r\n\t\t\tstemmer.add(lword.charAt(i));\r\n\t\t}\r\n\t\tstemmer.stem();\r\n\t\treturn stemmer.toString();\r\n\t}", "public static String preprocessStemAndTokenize(String data) {\n\n\t\tSet<String> transformedSet = new HashSet<String>(); //Set will make sure only unique terms are kept\n\t\tStringBuilder strBuilder = new StringBuilder();\n\t\tTokenizer analyzer = new Tokenizer(Version.LUCENE_30);\n\t\tTokenStream tokenStream = analyzer.tokenStream(\"\", new StringReader(data));\n\t\tTermAttribute termAttribute;\n\t\tString term;\n\t\t//System.out.println(\"The value of data in tokenizeAndStem: \"+ data);\n\t\ttry {\n\t\t\twhile (tokenStream.incrementToken()) {\n\t\t\t\ttermAttribute = tokenStream.getAttribute(TermAttribute.class);\n\t\t\t\tterm = termAttribute.term(); \n\t\t\t\tif (stopwords.contains(term)){ //ignore stopwords\n\t\t\t\t\t//System.out.println(\"Contains stopword: \"+ term);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (digitPattern.matcher(term).find()) //ignore digits\n\t\t\t\t\tcontinue;\n\t\t\t\tif(term.length() <= 1) //ignore 1 letter words\n\t\t\t\t\tcontinue;\n\t\t\t\t\n\t\t\t\tif (!digitPattern.matcher(term).find()){ //ignore digits\n\t\t\t\t\tstemmer.setCurrent(term);\n\t\t\t\t\tstemmer.stem();\n\t\t\t\t\ttransformedSet.add(stemmer.getCurrent());\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t//System.out.println(\"transormed set size in tokenizeAndStem: \"+ transformedSet.size());\n\t\tfor(Object token: transformedSet.toArray()){\n\t\t\tstrBuilder.append(token).append(\" \");\n\t\t}\n\t\t//System.out.println(\"String returned in tokenizeAndStem:\"+ strBuilder.toString());\n\t\treturn strBuilder.toString();\n\t}", "@Override\r\n public String stem(String word) {\r\n List<String> lemmas = new LinkedList<String>();\r\n // Create an empty Annotation just with the given text\r\n Annotation document = new Annotation(word);\r\n // run all Annotators on this text\r\n this.pipeline.annotate(document);\r\n // Iterate over all of the sentences found\r\n List<CoreMap> sentences = document.get(CoreAnnotations.SentencesAnnotation.class);\r\n for (CoreMap sentence : sentences) {\r\n // Iterate over all tokens in a sentence\r\n for (CoreLabel token : sentence.get(CoreAnnotations.TokensAnnotation.class)) {\r\n // Retrieve and add the lemma for each word into the\r\n // list of lemmas\r\n lemmas.add(token.get(CoreAnnotations.LemmaAnnotation.class));\r\n }\r\n }\r\n return lemmas.get(0);\r\n\r\n }", "public static String stem(String word){\n Stemmer s = new Stemmer();\n s.add(word.toCharArray(), word.length());\n s.stem();\n return s.toString();\n }", "public List<String> getRelatedWords(String word) throws IOException {\n List<String> result = new ArrayList<String>();\n IDictionary dict = new Dictionary(new File(WORDNET_LOCATION));\n try {\n dict.open();\n IStemmer stemmer = new WordnetStemmer(dict);\n for (POS pos : EnumSet.of(POS.ADJECTIVE, POS.ADVERB, POS.NOUN, POS.VERB)) {\n List<String> resultForPos = new ArrayList<String>();\n List<String> stems = new ArrayList<String>();\n stems.add(word);\n for (String stem : stemmer.findStems(word, pos)) {\n if (!stems.contains(stem))\n stems.add(stem);\n }\n for (String stem : stems) {\n if (!resultForPos.contains(stem)) {\n resultForPos.add(stem);\n IIndexWord idxWord = dict.getIndexWord(stem, pos);\n if (idxWord == null) continue;\n List<IWordID> wordIDs = idxWord.getWordIDs();\n if (wordIDs == null) continue;\n IWordID wordID = wordIDs.get(0);\n IWord iword = dict.getWord(wordID);\n \n ISynset synonyms = iword.getSynset();\n List<IWord> iRelatedWords = synonyms.getWords();\n if (iRelatedWords != null) {\n for (IWord iRelatedWord : iRelatedWords) {\n String relatedWord = iRelatedWord.getLemma();\n if (!resultForPos.contains(relatedWord))\n resultForPos.add(relatedWord);\n }\n }\n \n List<ISynsetID> hypernymIDs = synonyms.getRelatedSynsets();\n if (hypernymIDs != null) {\n for (ISynsetID relatedSynsetID : hypernymIDs) {\n ISynset relatedSynset = dict.getSynset(relatedSynsetID);\n if (relatedSynset != null) {\n iRelatedWords = relatedSynset.getWords();\n if (iRelatedWords != null) {\n for (IWord iRelatedWord : iRelatedWords) {\n String relatedWord = iRelatedWord.getLemma();\n if (!resultForPos.contains(relatedWord))\n resultForPos.add(relatedWord);\n }\n }\n }\n }\n }\n }\n }\n for (String relatedWord : resultForPos) {\n if (relatedWord.length() > 3\n && !relatedWord.contains(\"-\")\n && !result.contains(relatedWord)) {\n // TODO: Hack alert!\n // The - check is to prevent lucene from interpreting hyphenated words as negative search terms\n // Fix!\n result.add(relatedWord);\n }\n }\n }\n } finally {\n dict.close();\n }\n return result;\n }", "List<String> tokenize2(String doc) {\n String stemmed = StanfordLemmatizer.stemText(doc);\n List<String> res = new ArrayList<String>();\n\n for (String s : stemmed.split(\"[\\\\p{Punct}\\\\s]+\"))\n res.add(s);\n return res;\n }", "private String getStemming(String line) throws IOException {\n\t\treturn line;\n\t\t// return Stemmer.processTweets(line);\n\t}", "List<String> tokenize0(String doc) {\r\n List<String> res = new ArrayList<String>();\r\n\r\n for (String s : doc.split(\"\\\\s+\")) {\r\n // implement stemming algorithm if ToStem == true\r\n if (ToStem == true) {\r\n Stemmer st = new Stemmer();\r\n st.add(s.toCharArray(), s.length());\r\n st.stem();\r\n s = st.toString();\r\n }\r\n res.add(s);\r\n }\r\n return res;\r\n }", "private static String analyzeTerm(String term) {\n String ret = term.toLowerCase();\n if (stopWords.contains(ret) || ret.isEmpty())\n return \"\";\n return stemmer.stem(ret);\n }", "public List<String> stem(List<String> terms) {\r\n\t\tPaiceHuskStemmer stemmer = null;\r\n\t\ttry {\r\n\t\t\tstemmer = PaiceHuskStemmer.getInstance(SVMClassifier.class.getClassLoader().getResource(\"stemrules.txt\").openStream());\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tstemmer.setPreStrip(false);\r\n\t\tfor (int i = 0; i < terms.size(); i++) {\r\n\t\t\tString w = terms.get(i);\r\n\t\t\tterms.set(i, stemmer.stripAffixes(w));\r\n\t\t}\r\n\t\treturn terms;\r\n\t}", "private void populateDictionaryByLemmatizer() throws IOException {\n\n Enumeration e = dictionaryTerms.keys();\n while (e.hasMoreElements()) {\n String word = (String) e.nextElement();\n String tag = dictionaryTerms.get(word);\n\n if (!(word.contains(\" \")||word.contains(\"+\") ||word.contains(\"\\\"\") ||word.contains(\"'\")||word.contains(\".\") ||word.contains(\":\") || word.contains(\"(\") || word.contains(\")\") ||word.contains(\"-\")|| word.contains(\";\"))) {\n String tokenizedWords[] = tokenize(word);\n\n if (tokenizedWords.length == 1) {\n List<String> stemmings = stanfordLemmatizer.lemmatize(word);\n\n for (int i = 0; i < stemmings.size(); i++) {\n if (!dictionaryTerms.containsKey(stemmings.get(i))) {\n dictionaryTerms.put(stemmings.get(i), tag);\n System.out.println(\"Stemming: \" + word + \"\\t\" + stemmings.get(i));\n }\n }\n }\n }\n }\n }", "public void getThesaurusMap (String wordTofind) {\r\n\t \tfor (Entry<String, List> entry : tMap.entrySet()) {\r\n\t \t\tList singleListofSynonims = entry.getValue();\r\n\t \t\tif (singleListofSynonims.contains(wordTofind)){\r\n\t \t\t\t\r\n\t \t\t\tmappedList.add(singleListofSynonims);\r\n\t \t\t\tGoogleToThesarus.put(wordTofind,singleListofSynonims);\r\n\t \t\t}\r\n\t \t\telse {\r\n\t \t\t\t//System.out.println(\"value not in map\");\r\n\t \t}\r\n\t \t}\r\n\t }", "public char[] getStem() {\n return stem;\n }", "public static List<TokenCanonic> stemWords(String wordList) {\n List<TokenCanonic> result = new ArrayList<TokenCanonic>(); \n String [] tokens = wordList.split(\"\\\\s+\");\n for (String t : tokens) {\n if (t.trim().equals(\"\")) continue;\n TokenCanonic tc = new TokenCanonic(); \n tc.token = t; tc.canonic = stemWord(t);\n result.add(tc);\n }\n return result;\n }", "public List<Trie> findStemDescending(String stem) {\n if (stem == null)\n return new ArrayList<>();\n Trie start = find(stem);\n if (start == null)\n return new ArrayList<>();\n return start.getAll();\n }", "public static String preprocessStemAndTokenizeReturnDistinctTokens(String data) {\n\t\t//System.out.println(\"Preprocess data, remove stop words, stem, tokenize ..\");\n\t\tSet<String> transformedSet = new LinkedHashSet<String>();\n\t\tList<String> stemmedList = new ArrayList<String>();\n\n\t\tTokenizer analyzer = new Tokenizer(Version.LUCENE_30);\n\t\tTokenStream tokenStream = analyzer.tokenStream(\"\", new StringReader(data));\n\t\tTermAttribute termAttribute;\n\t\tString term;\n\t\ttry {\n\t\t\twhile (tokenStream.incrementToken()) {\n\t\t\t\ttermAttribute = tokenStream.getAttribute(TermAttribute.class);\n\t\t\t\tterm = termAttribute.term();\n\t\t\t\tif (digitPattern.matcher(term).find()) //ignore digits\n\t\t\t\t\tcontinue;\n\t\t\t\tif (stopwords.contains(term)) //ignore stopwords\n\t\t\t\t\tcontinue;\n\t\t\t\tif (term.length() <= 1) //ignore single letter words\n\t\t\t\t\tcontinue;\n\t\t\t\tstemmer.setCurrent(term);\n\t\t\t\tstemmer.stem();\n\t\t\t\tstemmedList.add(stemmer.getCurrent());\n\t\t\t}\n\t\t\ttransformedSet.addAll(stemmedList);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tstemmedList.clear();\n\t\tstemmedList = null;\n\t\t\n\t\treturn StringUtils.join(transformedSet.toArray(), \" \");\n\t}", "public static String stemWord(String word) {\n if (word.matches(\".*\\\\s.*\")) throw \n new IllegalArgumentException(\"argument is not a single word: \" + word); \n EnglishStemmer stemmer = new EnglishStemmer();\n stemmer.setCurrent(word);\n stemmer.stem();\n return stemmer.getCurrent();\n // slow way of doing it with jcas\n// List<TokenCanonic> c = getCanonicForms(word, CanonicForm.STEM);\n// return c.get(0).canonic;\n }", "public List<Stem> stem(char word[], int length) {\n List<Stem> stems = new ArrayList<Stem>();\n if (dictionary.lookupWord(word, 0, length) != null) {\n stems.add(new Stem(word, length));\n }\n stems.addAll(stem(word, length, null, 0));\n return stems;\n }", "private String stemmingForAWord(String identifiedWord) {\n String word;\n if (identifiedWord.contains(\"_\")) {\n word = identifiedWord;\n } else {\n word = morphology.stem(identifiedWord);\n }\n return word;\n }", "public Set<String> hyponyms(String word) {\n Set<String> toReturn = new HashSet<String>();\n Set<Integer> wordIndexes = new HashSet<Integer>();\n wordIndexes = wnetsi.get(word);\n Set<Integer> toReturnInt = GraphHelper.descendants(g, wordIndexes);\n Object[] returnArray = toReturnInt.toArray();\n for (int i = 0; i < returnArray.length; i += 1) {\n Set<String> stringReturn = wnetis.get(returnArray[i]);\n Iterator<String> strIter = stringReturn.iterator();\n while (strIter.hasNext()) {\n toReturn.add(strIter.next());\n }\n }\n return toReturn;\n }", "public String stem(String input) {\n String output = \"\";\n // create an empty Annotation just with the given text\n document = new Annotation(input);\n // run all Annotators on this text\n pipeline.annotate(document);\n // traverse words in the document\n for (CoreLabel token : document.get(CoreAnnotations.TokensAnnotation.class)) {\n output = output + token.lemma() + \" \";\n }\n\n return output.trim();\n }", "private static List<String> getWord(String urlname) {\n\t\tList<String> returnWord = new ArrayList<String>();\n\t\tBufferedReader reader;\n\t\ttry {\n\t\t\tURL url = new URL(urlname);\n\t\t\tInputStream in = url.openStream();\n\t\t\treader = new BufferedReader(new InputStreamReader(in));\n\t\t\twhile (true) {\n\t\t\t\tString word = reader.readLine();\n\t\t\t\tif (word == null)\n\t\t\t\t\tbreak;\n\t\t\t\treturnWord.add(word);\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(e.getMessage());\n\t\t}\n\t\treturn returnWord;\n\t}", "public StemSearch getStemSearch() {\r\n return this.stemSearch;\r\n }", "public static void Stemmingmethod()throws Exception\n{\n char[] w = new char[501];\n Stemmer s = new Stemmer();\n String prcessedtxt=\"\";\n ArrayList<String> finalsen= new ArrayList();\n BufferedWriter writer = new BufferedWriter(new FileWriter(\"fullyprocessed.txt\"));\n\n String u=null;\n \n {\n FileInputStream in = new FileInputStream(\"stopwordsremoved.txt\");\n\n while(true)\n\n { int ch = in.read();\n if (Character.isLetter((char) ch))\n {\n int j = 0;\n while(true)\n { ch = Character.toLowerCase((char) ch);\n w[j] = (char) ch;\n if (j < 500) j++;\n ch = in.read();\n if (!Character.isLetter((char) ch))\n {\n \n s.add(w, j); \n\n s.stem();\n { \n\n u = s.toString();\n finalsen.add(u);\n /* to test getResultBuffer(), getResultLength() : */\n /* u = new String(s.getResultBuffer(), 0, s.getResultLength()); */\n\n System.out.print(u);\n }\n break;\n }\n }\n }\n if (ch < 0) break;\n System.out.print((char)ch);\n finalsen.add(\"\"+(char)ch);\n\n\n }\n }\n \n \n \n for(String word:finalsen){\n prcessedtxt=prcessedtxt+\"\"+ word;\n }\n writer.write(prcessedtxt+\"\\n\"); \n prcessedtxt=\"\";\n finalsen.clear();\n writer.close();\n\n\n \n}", "private ArrayList<String> stemTokens(ArrayList<String> tokens) {\n ArrayList<String> stemmedTokens = new ArrayList<>();\n for (String token : tokens) {\n Stemmer stemmer = new Stemmer();\n // Add each character into the stemmer\n for (int i = 0; i < token.length(); i++) {\n stemmer.add(token.charAt(i));\n }\n\n // Stem the token\n stemmer.stem();\n\n // Retrieve the stemmed token\n String stemmedToken = stemmer.toString();\n\n stemmedTokens.add(stemmedToken);\n }\n\n return stemmedTokens;\n }", "public void parseThesaurus() throws IOException {\r\n\t\t\t//We create an object below to read the thesaurus file\r\n\t\t\tFileInputStream fis = new FileInputStream(\"src//ie//gmit//dip//resources//MobyThesaurus3.txt\");\r\n\t\t\tBufferedReader br=new BufferedReader(new InputStreamReader(fis));\r\n\t\t\t List <List<String>> listOflist= new ArrayList<>();\r\n\t\t\t// HashMap<String,List> tMap = new HashMap<>();\t\t\r\n\t\t\t List <String> individualListOfSynonyms= new ArrayList <String>();\r\n\r\n\t\t\t \r\n\t\t\t //we create a hashmap with the first word being the key value and the rest a list of synonims we will use\r\n\t\t\twhile(br.readLine()!=null) {\r\n\t\t\t\t\r\n\t\t\t\tString somestring = br.readLine();\r\n\t\t\t\tString[] testsplit= somestring.split(\",\");\r\n\t\t\t\tindividualListOfSynonyms=Arrays.asList(testsplit);\r\n\t\t\t\tString indexvalue=individualListOfSynonyms.get(0).toString();\r\n\t\t\t tMap.put(indexvalue, individualListOfSynonyms);\r\n\t\t\t //br.close();\r\n\t\t\t //System.out.println(tMap);\r\n\t\t\t }\r\n\t\t\t}", "public static String stemWordPorter(String word) {\n Stemmer st = new Stemmer();\n st.add(word.toCharArray(), word.length());\n st.stem();\n return st.toString();\n }", "public String stem(String str) {\n\n if (str.length() <= 2) {\n return str;\n }\n String stemmed = super.stem(str);\n while (!stemmed.equals(str)) {\n str = stemmed;\n stemmed = super.stem(stemmed);\n }\n return stemmed;\n }", "public static ArrayList<String> getTerms(String comment){\n\n\t\tString[] terms = comment.split(\"[^a-zA-Z]+\");\n\t\t//if(terms.length == 0) System.out.println(\"error: \" + comment);\n\t\tArrayList<String> termsarray = new ArrayList<String>();\n\t\tfor(int i=0;i<terms.length;i++){\n\t\t\t\n\t\t\tString iterm = terms[i].toLowerCase();\n\t\t\tboolean isStopWord = false;\n\t\t\tfor(String s : stopWord){\n\t\t\t\tif(iterm.equals(s)){\n\t\t\t\t\tisStopWord = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(isStopWord == true)\n\t\t\t\tcontinue;\n\t\t\t\n\t\t\tStemmer stemmer = new Stemmer();\n\t\t\tstemmer.add(iterm.toCharArray(), iterm.length());\n\t\t\tstemmer.stem();\n\t\t\titerm = stemmer.toString();\n\t\t\t\n\t\t\t//System.out.println(iterm);\n\t\t\tif(iterm.length() >=2 && !termsarray.contains(iterm))termsarray.add(iterm);\n\t\t}\n\t\n\t\treturn termsarray;\n\t}", "public void stem()\n\t { k = i - 1;\n\t if (k > 1) { step1(); step2(); step3(); step4(); step5(); step6(); }\n\t i_end = k+1; i = 0;\n\t }", "public static Set<String> preprocessStemAndTokenizeAddBigramsInSet(String data) {\n\t\t//System.out.println(\"Preprocess data, remove stop words, stem, tokenize and get bi-grams ..\");\n\n\t\tSet<String> transformedSet = new LinkedHashSet<String>();\n\t\tList<String> stemmedList = new ArrayList<String>();\n\n\t\t//System.out.println(\"Stop words length:\" + stopwords.size());\n\t\tTokenizer analyzer = new Tokenizer(Version.LUCENE_30);\n\t\tTokenStream tokenStream = analyzer.tokenStream(\"\", new StringReader(data));\n\t\tTermAttribute termAttribute;\n\t\tString term;\n\t\ttry {\n\t\t\twhile (tokenStream.incrementToken()) {\n\t\t\t\ttermAttribute = tokenStream.getAttribute(TermAttribute.class);\n\t\t\t\tterm = termAttribute.term();\n\t\t\t\tif (digitPattern.matcher(term).find()) //ignore digits\n\t\t\t\t\tcontinue;\n\t\t\t\tif (stopwords.contains(term)) //ignore stopwords\n\t\t\t\t\tcontinue;\n\t\t\t\tif (term.length() <= 1) //ignore single letter words\n\t\t\t\t\tcontinue;\n\t\t\t\tstemmer.setCurrent(term);\n\t\t\t\tstemmer.stem();\n\t\t\t\tstemmedList.add(stemmer.getCurrent());\n\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tString[] ds = stemmedList.toArray(new String[0]);\n\n\t\t/*for(int i=0; i<stemmedList.size(); i++)\n\t\t\tSystem.out.print(ds[i]+\"\\t\");*/\n\n\t\t//add bi-grams\n\t\tfinal int size = 2;\n\t\tfor (int i = 0; i < ds.length; i++) {\n\t\t\ttransformedSet.add(ds[i]); //add single words\n\t\t\tif (i + size <= ds.length) {\n\t\t\t\tString t = \"\";\n\t\t\t\tfor (int j = i; j < i + size; j++) {\n\t\t\t\t\tt += \" \" + ds[j];\n\t\t\t\t}\n\t\t\t\tt = t.trim().replaceAll(\"\\\\s+\", \"_\");\n\t\t\t\ttransformedSet.add(t); //add bi-gram combined with \"_\"\n\t\t\t}\n\t\t}\n\t\t//System.out.println(\" \")\n\t\tstemmedList.clear();\n\t\tstemmedList = null;\n\t\tds = null;\n\t\treturn transformedSet;\n\t}", "public ArrayList<String> processText(String text)\r\n\t{\r\n\t\tArrayList<String> terms = new ArrayList<>();\r\n\r\n\t\t// P2\r\n\t\t// Tokenizing, normalizing, stopwords, stemming, etc.\r\n\t\tArrayList<String> tokens = tokenize(text);\r\n\t\tfor(String term: tokens){\r\n\t\t\tString norm = normalize(term);\r\n\t\t\tif(!isStopWord(norm)){\r\n\t\t\t\tString stem = stem(norm);\r\n\t\t\t\tterms.add(stem);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn terms;\r\n\t}", "public static void testDictionary() throws IOException {\n String wnhome=\"c:\\\\Users\\\\Katherine\\\\Documents\\\\2nd sem\\\\IR\\\\project\\\\WordNet_3.1\";\n String path = wnhome + File.separator + \"dict\";\n\n\n URL url = new URL(\"file\", null, path);\n\n IDictionary dictionary = new Dictionary(url);\n dictionary.open();\n // /Users/Ward/Downloads\n IIndexWord indexWord = dictionary.getIndexWord(\"use\", POS.VERB);\n\n for (IWordID wordID : indexWord.getWordIDs()) {\n\n IWord word = dictionary.getWord(wordID);\n for (IWord word1 : word.getSynset().getWords()) {\n System.out.println(word1.getLemma());\n }\n// System.out.println(\"Id = \" + wordID);\n// System.out.println(\" Lemma = \" + word.getLemma());\n// System.out.println(\" Gloss = \" + word.getSynset().getGloss());\n\n List<ISynsetID> hypernyms =\n word.getSynset().getRelatedSynsets(Pointer.HYPERNYM);\n // print out each h y p e r n y m s id and synonyms\n List<IWord> words;\n for (ISynsetID sid : hypernyms) {\n words = dictionary.getSynset(sid).getWords();\n System.out.print(sid + \" {\");\n for (Iterator<IWord> i = words.iterator(); i.hasNext(); ) {\n System.out.print(i.next().getLemma());\n if (i.hasNext())\n System.out.print(\", \");\n }\n System.out.println(\"}\");\n }\n }\n }", "public static String stemvString(String raws)\n\t{\n\t\tString os = \"\";\n\t\tfor (String w : raws.split(\"\\\\s+\"))\n\t\t{\n\t\t\tos = os + dictUtils.getStemWord(w) + \" \";\n\t\t}\n\t\treturn os;\n\t}", "public WordInfo searchWord(String word) {\n\t\tSystem.out.println(\"Dic:SearchWord: \"+word);\n\n\t\tDocument doc;\n\t\ttry {\n\t\t\tdoc = Jsoup.connect(\"https://dictionary.cambridge.org/dictionary/english-vietnamese/\" + word).get();\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\n\t\tElements elements = doc.select(\".dpos-h.di-head.normal-entry\");\n\t\tif (elements.isEmpty()) {\n\t\t\tSystem.out.println(\" not found\");\n\t\t\treturn null;\n\t\t}\n\n\t\tWordInfo wordInfo = new WordInfo(word);\n\n\t\t// Word\n\t\telements = doc.select(\".tw-bw.dhw.dpos-h_hw.di-title\");\n\n\t\tif (elements.size() == 0) {\n\t\t\tSystem.out.println(\" word not found in doc!\");\n\t\t\treturn null;\n\t\t}\n\n\t\twordInfo.setWordDictionary(elements.get(0).html());\n\n\t\t// Type\n\t\telements = doc.select(\".pos.dpos\");\n\n\t\tif(elements.size() > 0) {\n\t\t\twordInfo.setType(WordInfo.getTypeShort(elements.get(0).html()));\n//\t\t\tif (wordInfo.getTypeShort().equals(\"\"))\n//\t\t\t\tSystem.out.println(\" typemis: \"+wordInfo.getType());\n\t\t}\n\n\t\t// Pronoun\n\t\telements = doc.select(\".ipa.dipa\");\n\n\t\tif (elements.size() > 0)\n\t\t\twordInfo.setAPI(\"/\"+elements.get(0).html()+\"/\");\n\n\t\t// Trans\n\t\telements = doc.select(\".trans.dtrans\");\n\n\t\tif (elements.size() > 0)\n\t\t\twordInfo.setTrans(elements.get(0).html());\n\n\t\tSystem.out.println(\" found\");\n\t\treturn wordInfo;\n\t}", "public Set<String> hyponyms(String word) {\n hypernymSet = new TreeSet<String>();\n firstsIDset = new HashSet<Integer>();\n for (String[] synStrings : sFile.values()) {\n for (String synset : synStrings) {\n if (synset.equals(word)) {\n for (String synset2 : synStrings) {\n hypernymSet.add(synset2);\n }\n for (Integer key : sFile.keySet()) {\n if (sFile.get(key).equals(synStrings)) {\n firstsIDset.add(key);\n }\n }\n }\n }\n }\n\n sIDset = GraphHelper.descendants(theDigraph, firstsIDset);\n for (Integer id : sIDset) {\n synsetWordStrings = sFile.get(id);\n for (String word2 : synsetWordStrings) {\n hypernymSet.add(word2);\n }\n }\n return hypernymSet;\n }", "List<Trie> findStemDescending(String stem, int n) {\n if (stem == null)\n return new ArrayList<>();\n Trie start = find(stem);\n if (start == null) {\n return new ArrayList<>();\n }\n return start.findBestNMatches(n);\n }", "public KeyWordList extractKeyWords(String input);", "SList evenWords();", "public String StemWordWithWordNet ( String word )\n {\n if ( !IsInitialized )\n return word;\n if ( word == null ) return null;\n if ( morph == null ) morph = dic.getMorphologicalProcessor();\n\n IndexWord w;\n try\n {\n w = morph.lookupBaseForm( POS.VERB, word );\n if ( w != null )\n return w.getLemma().toString ();\n w = morph.lookupBaseForm( POS.NOUN, word );\n if ( w != null )\n return w.getLemma().toString();\n w = morph.lookupBaseForm( POS.ADJECTIVE, word );\n if ( w != null )\n return w.getLemma().toString();\n w = morph.lookupBaseForm( POS.ADVERB, word );\n if ( w != null )\n return w.getLemma().toString();\n }\n catch ( JWNLException e )\n {\n }\n return null;\n }", "public static String stemSentNSW(String raw)\n\t{\n\t\tString os = \"\";\n\t\tfor (String w : raw.split(\"\\\\s+\"))\n\t\t{\n\t\t\tos = os + dictUtils.stemNSW(w) + \" \";\n\t\t}\n\t\treturn os;\n\t}", "java.lang.String getWord();", "public Set<String> hyponyms(String word) {\n HashSet<String> set = new HashSet<String>();\n for (Integer id: synsets.keySet()) {\n TreeSet<String> hs = synsets.get(id);\n if (hs.contains(word)) {\n for (String s: hs) {\n set.add(s);\n }\n TreeSet<Integer> ids = new TreeSet<Integer>();\n ids.add(id);\n Set<Integer> desc = GraphHelper.descendants(dg, ids);\n for (Integer i: desc) {\n for (String s: synsets.get(i)) {\n set.add(s);\n }\n }\n }\n }\n return set;\n }", "public Set<String> hyponyms(String word) {\n Set<Integer> synIDs = new TreeSet<Integer>();\n Set<Integer> synKeys = synsetMap.keySet();\n for (Integer id : synKeys) {\n if (synsetMap.get(id).contains(word)) {\n synIDs.add(id);\n }\n }\n Set<Integer> hypIDs = GraphHelper.descendants(g, synIDs);\n Set<String> result = new TreeSet<String>();\n\n for (Integer i : hypIDs) {\n ArrayList<String> al = synsetMap.get(i);\n result.addAll(al);\n }\n return result;\n }", "public static void getSynonyms(ArrayList<String> keywords) {\n final String endpoint = \"http://www.dictionaryapi.com/api/v1/references/collegiate/xml/\";\n final String key = \"79b70eee-858c-486a-b155-a44db036bfe0\";\n try {\n for (String keyword : keywords) {\n String url = endpoint + keyword + \"?key=\" + key;\n System.out.print(\"url--\" + url);\n URL obj = new URL(url);\n HttpURLConnection con = (HttpURLConnection) obj.openConnection();\n con.setRequestProperty(\"User-Agent\", USER_AGENT);\n BufferedReader in = new BufferedReader(\n new InputStreamReader(con.getInputStream()));\n String inputLine;\n StringBuffer response = new StringBuffer();\n\n while ((inputLine = in.readLine()) != null) {\n response.append(inputLine);\n }\n in.close();\n\n //print result\n System.out.println(response.toString());\n\n DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\n DocumentBuilder builder;\n InputSource is;\n try {\n builder = factory.newDocumentBuilder();\n is = new InputSource(new StringReader(response.toString()));\n Document doc = builder.parse(is);\n NodeList list = doc.getElementsByTagName(\"syn\");\n System.out.println(\"synonyms\" + list.item(0).getTextContent());\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n }\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void indexing(String seedPage) {\n webCrawler wbc = new webCrawler();\n webPage wbp = new webPage();\n urlList = wbc.crawl(seedPage);\n for(int i = 0; i < urlList.size(); i++) {\n String url = urlList.get(i);\n try {\n Document doc = wbp.getContent(url);\n finalWords = wbp.getAllWords(url);\n } catch(Exception e) {\n e.printStackTrace();\n }\n }\n }", "public Set<String> hyponyms(String word) {\n Set<String> hyponyms = new HashSet<String>();\n Set<Integer> ids = new HashSet<Integer>();\n for (Integer key: synsetNouns.keySet()) {\n if (synsetNouns.get(key).contains(word)) {\n ids.add(key);\n }\n }\n Set<Integer> descendants = GraphHelper.descendants(hyponym, ids);\n for (Integer j: descendants) {\n for (String value: synsetNouns.get(j)) {\n hyponyms.add(value);\n }\n }\n return hyponyms;\n }", "public static String preprocessStemAndTokenizeAddBigramsInString(String data) {\n\t\t//System.out.println(\"Preprocess data, remove stop words, stem, tokenize and get bi-grams ..\");\n\n\t\tSet<String> transformedSet = new LinkedHashSet<String>();\n\t\tList<String> stemmedList = new ArrayList<String>();\n\n\t\tTokenizer analyzer = new Tokenizer(Version.LUCENE_30);\n\t\tTokenStream tokenStream = analyzer.tokenStream(\"\", new StringReader(data));\n\t\tTermAttribute termAttribute;\n\t\tString term;\n\t\ttry {\n\t\t\twhile (tokenStream.incrementToken()) {\n\t\t\t\ttermAttribute = tokenStream.getAttribute(TermAttribute.class);\n\t\t\t\tterm = termAttribute.term();\n\t\t\t\tif (digitPattern.matcher(term).find()) //ignore digits\n\t\t\t\t\tcontinue;\n\t\t\t\tif (stopwords.contains(term)) //ignore stopwords\n\t\t\t\t\tcontinue;\n\t\t\t\tif (term.length() <= 1) //ignore stopwords\n\t\t\t\t\tcontinue;\n\t\t\t\tstemmer.setCurrent(term);\n\t\t\t\tstemmer.stem();\n\t\t\t\tstemmedList.add(stemmer.getCurrent());\n\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tString[] ds = stemmedList.toArray(new String[0]);\n\n\t\t/*for(int i=0; i<stemmedList.size(); i++)\n\t\t\tSystem.out.print(ds[i]+\"\\t\");*/\n\n\t\t//add bi-grams\n\t\tfinal int size = 2;\n\t\tfor (int i = 0; i < ds.length; i++) {\n\t\t\ttransformedSet.add(ds[i]); //add single words\n\t\t\tif (i + size <= ds.length) {\n\t\t\t\tString t = \"\";\n\t\t\t\tfor (int j = i; j < i + size; j++) {\n\t\t\t\t\tt += \" \" + ds[j];\n\t\t\t\t}\n\t\t\t\tt = t.trim().replaceAll(\"\\\\s+\", \"_\");\n\t\t\t\ttransformedSet.add(t); //add bi-gram combined with \"_\"\n\t\t\t}\n\t\t}\n\t\t//System.out.println(transformedSet.toArray(new String[transformedSet.size()]).toString());\n\t\treturn StringUtils.join( transformedSet.toArray(new String[transformedSet.size()]), \" \");\n\t\t\n\t}", "public void getTerm()\n\t\t{\n\t\t\t//Open SciencePhrases.txt\n\t\t\tFile f1 = new File(\"SciencePhrases.txt\");\n\n\t\t\ttry\n\t\t\t{\n\t\t\t\tspIn = new Scanner(f1);\n\t\t\t}\n\t\t\tcatch(FileNotFoundException e)\n\t\t\t{\n\t\t\t\tSystem.err.println(\"Cannot create SciencePhrases.txt to be written \"\n\t\t\t\t\t\t+ \"to.\");\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\n\t\t\t//Storing term at curTerm in the variables term and picTerm\n\t\t\tString cur = new String(\"\");\n\t\t\tfor(int i = 0; i<curTerm; i++)\n\t\t\t{\n\t\t\t\tterm = \"\";\n\t\t\t\twhile(!cur.equals(\"-\"))\n\t\t\t\t\tcur = spIn.nextLine();\n\t\t\t\tcur = spIn.nextLine();\n\t\t\t\tpicTerm = cur;\n\t\t\t\tcur = spIn.nextLine();\n\t\t\t\twhile(!cur.equals(\"-\"))\n\t\t\t\t{\n\t\t\t\t\tterm += cur;\n\t\t\t\t\tcur = spIn.nextLine();\n\t\t\t\t}\n\t\t\t}\t\n\t\t}", "public Glyph getStem ()\r\n {\r\n return stem;\r\n }", "public static LinkedList<Word> getPracticedWords() {\n return favWords;\n }", "private void populateDictionaryBySynonyms() {\n\n Enumeration e = dictionaryTerms.keys();\n while (e.hasMoreElements()) {\n String word = (String) e.nextElement();\n String tag = dictionaryTerms.get(word);\n\n ArrayList<String> synonyms = PyDictionary.findSynonyms(word);\n\n for (int i = 0; i < synonyms.size(); i++) {\n if (!dictionaryTerms.containsKey(synonyms.get(i))) {\n dictionaryTerms.put(synonyms.get(i), tag);\n }\n }\n }\n }", "public Iterator<String> words();", "public static String stemNSW(String word)\n\t{\n\t\treturn isNSW(getRoot(word.toLowerCase()));\n\t}", "public static String getRoot(String word)\n\t{\n\t\treturn (new Stemmer()).stem(word);\n\t}", "public static List<ExtractedEntity> extractEntities(String text){\n\t\tList<ExtractedEntity> extractedConcepts = new ArrayList<ExtractedEntity>();\n\t\tZemanta zem = new Zemanta(ZEMAMTA_API_KEY);\t\n\t\tZemantaResult zemResult = zem.suggest(text);\n\t\tString cid = zemResult.rid;\n\t\tfor(Link link : zemResult.markup.links){\n\t\t\tString term = link.anchor;\n\t\t\tfor(Target target : link.targets){\n\t\t\t\tif(target.url != null && target.url.startsWith(\"http://en.wikipedia.org/wiki/\")){\n\t\t\t\t\tExtractedEntity entity = new AlchemyAnnotator().new ExtractedEntity();\n\t\t\t\t\tentity.name = target.title;\n\t\t\t\t\tentity.type = target.type.name();\n\t\t\t\t\tentity.uri = target.url.replace(\"http://en.wikipedia.org/wiki/\", \"http://dbpedia.org/resource/\");\n\t\t\t\t\tentity.score = new Float(link.confidence).doubleValue();\n\t\t\t\t\tentity.text = link.anchor;\n\t\t\t\t\textractedConcepts.add(entity);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn extractedConcepts;\n\t}", "public List<String> predict(String term) {\n\t\tList<String> results = new ArrayList<String>();\n\t\tif (term == null) {\n\t\t\treturn results;\n\t\t}\n\t\tString formattedTerm = term.strip().toLowerCase();\n\t\tif (formattedTerm.length() < this.minimumNumberOfCharacters) {\n\t\t\treturn results;\n\t\t}\n\t\t\n\t\tQueue<Character> characters = this.toCharacterQueue(formattedTerm);\n\t\tNode lastCharacterNode = this.getLastCharacterNode(this.root, characters);\n\t\tif (lastCharacterNode != null) {\n\t\t\tList<String> fragments = this.getChildrenFragments(lastCharacterNode);\n\t\t\tfor (String fragment : fragments) {\n\t\t\t\tresults.add(formattedTerm.substring(0, formattedTerm.length() - 1) + fragment);\n\t\t\t}\n\t\t}\n\t\treturn results;\n\t}", "public static String[] webServicePreferredTerms() throws Exception {\n HttpGet httpGet = null;\n CloseableHttpClient httpClient = HttpClientBuilder.create().build();\n String[] preferredTerms = null;\n \n if (PREFERRED_TERMS_ARRAY != null) {\n preferredTerms = PREFERRED_TERMS_ARRAY;\n }\n else {\n try {\n httpGet = new HttpGet(PREFERRED_TERMS_SERVICE_URL);\n HttpResponse httpResponse = httpClient.execute(httpGet);\n int statusCode = httpResponse.getStatusLine().getStatusCode();\n if (statusCode == HttpStatus.SC_OK) {\n HttpEntity httpEntity = httpResponse.getEntity();\n String entityString = EntityUtils.toString(httpEntity);\n if (entityString != null) {\n preferredTerms = entityString.split(\"\\n\");\n PREFERRED_TERMS_ARRAY = preferredTerms;\n }\n }\n }\n finally {\n \t\tcloseHttpClient(httpClient);\n \t }\n }\n\n return preferredTerms;\n }", "public String normalize(String word);", "public Set<String> hyponyms(String word) {\n Set<Integer> wordIds = revrseSynsetMapper.get(word);\n Set<String> superSet = new HashSet<String>();\n Set<Integer> descendant = GraphHelper.descendants(hypGraph, wordIds);\n Iterator<Integer> iter = descendant.iterator();\n while (iter.hasNext()) {\n Set<String> string_word = synsetMapper.get(iter.next());\n Iterator<String> A = string_word.iterator();\n while (A.hasNext()) {\n superSet.add(A.next());\n }\n }\n return superSet;\n }", "public void setStem (Glyph stem)\r\n {\r\n this.stem = stem;\r\n }", "String getSynonyms();", "@Override\r\n\tpublic String getName() {\r\n\t\treturn \"StemMethodAnalyzer\";\r\n\t}", "public static LinkedList<String> getSynonym(String word) {\n\t\tLinkedList<String> res = new LinkedList<String>();\n\t\tif (dict.containsKey(word)) {\n\t\t\tres = dict.get(word);\n\t\t}\n\t\treturn res;\n\t}", "public abstract Set<String> getTerms(Document doc);", "public List<String> findPhrases() {\n\t\t\n\t\tTrie root = new Trie();\n\t\tList<String> result = new ArrayList<>();\n\t\tQueue<TrieNode> queue = new LinkedList<>();\n\n\t\tfor (String phrase : phrases) {\n\t\t\t// build the trie\n\t\t\t\n\t\t\troot.insert(phrase);\n\t\t}\n\t\t\n\t\t// initialize the queue\n\t\tqueue.offer(root.getRootNode());\n\t\t\t\t\n\t\tfor (String word : stream) {\n\t\t\t\n\t\t\t// Search one word at a time and store TrieNodes that match this word.\n\t\t\t// If the current word extends a previous TrieNode, it may be a matching phrase\n\t\t\t\n\t\t\t// buffer to store current matches\n\t\t\tQueue<TrieNode> buffer = new LinkedList<>();\n\t\t\t\n\t\t\twhile(!queue.isEmpty()) {\n\t\t\t\t// iterate through previous matches\n\t\t\t\t\n\t\t\t\tTrieNode next = queue.poll().find(word);\n\t\t\t\t\n\t\t\t\tif (next != null) {\n\t\t\t\t\t\n\t\t\t\t\t// if this word extends the previous word, add it to the buffer\n\t\t\t\t\t// in case the next word can also extend it\n\t\t\t\t\t\n\t\t\t\t\tbuffer.offer(next);\n\t\t\t\t\t\n\t\t\t\t\tif (next.isPhrase()) {\n\t\t\t\t\t\t// if we found a valid phrase node, add it to the result\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tresult.add(next.getPhrase());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tqueue = buffer;\n\t\t\tqueue.offer(root.getRootNode());\n\t\t}\n\t\t\n\t\treturn result;\n\t}", "public List<Stem> uniqueStems(char word[], int length) {\n List<Stem> stems = new ArrayList<Stem>();\n CharArraySet terms = new CharArraySet(dictionary.getVersion(), 8, dictionary.isIgnoreCase());\n if (dictionary.lookupWord(word, 0, length) != null) {\n stems.add(new Stem(word, length));\n terms.add(word);\n }\n List<Stem> otherStems = stem(word, length, null, 0);\n for (Stem s : otherStems) {\n if (!terms.contains(s.stem)) {\n stems.add(s);\n terms.add(s.stem);\n }\n }\n return stems;\n }", "public String SnowballStemmingDemo(String token) {\n\t\tSnowballStemmer stemmer = new englishStemmer();\n\t\tstemmer.setCurrent(token);\n\t\tif (stemmer.stem())\n\t\t\treturn stemmer.getCurrent();\n\t\telse\n\t\t\treturn token;\n\t}", "public interface Stemmer {\r\n/**\r\n * <li>Get the stem of a word.\r\n * @return java.lang.String Stem\r\n * @param word java.lang.String Word\r\n */\r\nString stemOf (String word);\r\n}", "static void ReadQuery(String input) throws FileNotFoundException {\n input = input.replaceAll(\"[^A-Za-z]\",\" \");\n String[] arr = input.split(\" \"); // splitting the whole string into words by split on the basis of white spaces\n\n\n for(int i=0; i<arr.length; i++) {\n String termWord = arr[i].toLowerCase();\t//same pre-processing is applied to all the query word\n //termWord = RemoveSpecialCharacter(termWord);\n termWord = removeStopWords(termWord);\n\n if(!termWord.equalsIgnoreCase(\"\")) { // all the white spaces are removed as if not removed then lemmatization wont be successfully done\n\n termWord = Lemmatize(termWord);\n System.out.println(termWord);\n if(dictionary.containsKey(termWord)) {\n List<Integer> wordList = new ArrayList<>();\n wordList = dictionary.get(termWord);\n int queryWordFrequency = wordList.get(totaldocument);\n queryWordFrequency++;\n wordList.set(totaldocument, queryWordFrequency); // all the frequencies of the query words are stored at the 56th index of the List stored in the\n //hashmap associated with its word-terms\n dictionary.put(termWord, wordList);\n }\n else {\n //if any of the enterd query word not present in all the docs so list will have 0.0 value from 0th index to 55th and 56th index is reserver\n // for query word frequency\n List<Integer> wordList = new ArrayList<>();\n for(int j=0; j<totaldocument+1; j++) {\n wordList.add(0);\n }\n wordList.add(1);\n dictionary.put(termWord, wordList); //updating the dictionary hashmap now containing all the query words frequencies\n }\n }\n }\n save();\n }", "private Map<String,Map<String,List<String>>> buildDictionary(Document doc){\n\t\t\n\t\tElement root = doc.getDocumentElement();\n\t\t\n\t\t\n\t\tMap<String,Map<String,List<String>>> dictionary = new HashMap<String,Map<String,List<String>>>();\n\t\tthis.termSet = new TreeSet<String>();\n\t\t\n\t\tNodeList termList = doc.getElementsByTagName(\"term\");\n\t\tfor(int i = 0; i < termList.getLength(); i++){\n\t\t\tElement termElement = (Element) termList.item(i);\n\t\t\tElement nameElement = (Element) termElement.getElementsByTagName(\"name\").item(0);\n\t\t\tString name = nameElement.getTextContent();\n\t\t\tthis.termSet.add(name);\n\n\t\t\tMap<String,List<String>> synonymGroup = new HashMap<String,List<String>>();\n\t\t\tsynonymGroup.put(\"exact\", new ArrayList<String>());\n\t\t\tsynonymGroup.put(\"related\", new ArrayList<String>());\n\t\t\tsynonymGroup.put(\"broad\", new ArrayList<String>());\n\t\t\tsynonymGroup.put(\"narrow\", new ArrayList<String>());\n\t\t\t\n\t\t\tNodeList synonyms = termElement.getElementsByTagName(\"synonym\");\n\t\t\tfor(int j=0; j<synonyms.getLength(); j++){\n\t\t\t\tElement synonymElement = (Element) synonyms.item(j);\n\t\t\t\tString synonym = synonymElement.getTextContent();\n\t\t\t\tString scope = synonymElement.getAttribute(\"scope\");\n\t\t\t\t//System.out.println(scope);\n\t\t\t\tList<String> synonymList = (List<String>) synonymGroup.get(scope);\n\t\t\t\t\n\t\t\t\t//System.out.println(synonym);\n\t\t\t\t\n\t\t\t\tsynonymList.add(synonym);\n\t\t\t}\n\t\t\t\n\t\t\tdictionary.put(name,synonymGroup);\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\treturn dictionary;\n\t}", "public String PorterStemmingDemo(String token) {\n\t\tporterStemmer stemmer = new porterStemmer();\n\t\tstemmer.setCurrent(token);\n\t\tif (stemmer.stem())\n\t\t\treturn stemmer.getCurrent();\n\t\telse\n\t\t\treturn token;\n\t}", "SList oddWords();", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"nam(s) of edit(s), typ as indic in th latic book. if ther is als an author field, then th edit field giv th edit of th bok or cllect in which th refer appear.\");\n assertEquals(\"nam(s) of edit(s), typ as ind in th lat book. if ther is al an author field, then th edit field giv th edit of th bok or cllect in which th refer appear.\", string0);\n }", "public List < Stem > getSelectedStem() {\r\n\r\n List < Stem > result = new ArrayList < Stem >();\r\n List < Sortable > selected = this.stemSearch.getSelected();\r\n for (Sortable sortable : selected) {\r\n result.add((Stem) sortable);\r\n }\r\n return result;\r\n }", "List<T> getWord();", "public Set<String> hyponyms(String word) {\n HashSet<String> allhyponyms = new HashSet<String>();\n int maxV = synset.size();\n // int maxV = 0;\n // for (Integer i : synset.keySet()) {\n // if (maxV < i) {\n // maxV = i;\n // }\n // }\n // maxV += 1;\n Digraph digraph = new Digraph(maxV);\n\n // ArrayList<Integer> hypoKeys = new ArrayList<Integer>();\n // for (int i = 0; i < hyponym.size(); i++) {\n // hypoKeys.add(hyponym.get(0).get(i));\n // }\n \n for (ArrayList<Integer> a : hyponym) {\n int key = a.get(0);\n for (int j = 1; j < a.size(); j++) {\n digraph.addEdge(key, a.get(j));\n }\n }\n\n // get synonyms (in same synset), ex. given \"jump\", will get \"parachuting\" as well as \"leap\"\n ArrayList<String> strArray = new ArrayList<String>();\n for (Integer k : getSynsetKeys(word)) {\n strArray.addAll(synset.get(k));\n }\n for (String str : strArray) {\n allhyponyms.add(str);\n }\n\n // for each int from set<int> with all synset IDS\n for (Integer s : GraphHelper.descendants(digraph, getSynsetKeys(word))) {\n for (String t : synset.get(s)) {\n allhyponyms.add(t);\n }\n }\n return allhyponyms;\n }", "public void countWord() {\n\t\tiniStorage();\n\t\tWordTokenizer token = new WordTokenizer(\"models/jvnsensegmenter\",\n\t\t\t\t\"data\", true);\n\t\t// String example =\n\t\t// \"Nếu bạn đang tìm kiếm một chiếc điện thoại Android? Đây là, những smartphone đáng để bạn cân nhắc nhất. Thử linh tinh!\";\n\t\t// token.setString(example);\n\t\t// System.out.println(token.getString());\n\n\t\tSet<Map.Entry<String, String>> crawlData = getCrawlData().entrySet();\n\t\tIterator<Map.Entry<String, String>> i = crawlData.iterator();\n\t\twhile (i.hasNext()) {\n\t\t\tMap.Entry<String, String> pageContent = i.next();\n\t\t\tSystem.out.println(pageContent.getKey());\n\t\t\tPageData pageData = gson.fromJson(pageContent.getValue(),\n\t\t\t\t\tPageData.class);\n\t\t\ttoken.setString(pageData.getContent().toUpperCase());\n\t\t\tString wordSegment = token.getString();\n\t\t\tString[] listWord = wordSegment.split(\" \");\n\t\t\tfor (String word : listWord) {\n\t\t\t\taddToDictionary(word, 1);\n\t\t\t\tDate date;\n\t\t\t\ttry {\n\t\t\t\t\tdate = simpleDateFormat.parse(pageData.getTime().substring(\n\t\t\t\t\t\t\t0, 10));\n\t\t\t\t} catch (ParseException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\taddToStatByDay(date, word, 1);\n\t\t\t}\n\t\t}\n\t}", "public Stemmer ()\n {\n AllWords = new HashMap<String,String>();\n dictionary = Dictionary.getInstance();\n p = PointerUtils.getInstance();\n\n try\n {\n // JWNL.initialize(new FileInputStream(\"file_properties.xml\"));\n JWNLConnecter.initializeJWNL();\n dic = Dictionary.getInstance();\n morph = dic.getMorphologicalProcessor();\n // ((AbstractCachingDictionary)dic).\n //\tsetCacheCapacity (10000);\n IsInitialized = true;\n }\n catch (Exception e){\n System.err.println(e.getMessage());\n }\n /*catch ( FileNotFoundException e )\n {\n System.out.println ( \"Error initializing Stemmer: JWNLproperties.xml not found\" );\n }\n catch ( JWNLException e )\n {\n System.out.println ( \"Error initializing Stemmer: \"\n + e.toString() );\n }*/\n\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"weka.core.stemmers.lovinsstemmeryt\");\n assertEquals(\"wek.cor.stemmer.lovinsstemmerys\", string0);\n }", "public Map<String, Object> getIE(String text, FallBackListBased pd) {\n\t\ttext = text.replaceAll(\" � \", \", \");\n\t\ttext = text.replaceAll(\"'s \", \" \");\n\t\ttext = text.replaceAll(\"'s\", \"\");\n\t\ttext = text.replaceAll(\"�s \", \" \");\n\t\ttext = text.replaceAll(\"�s \", \" \");\n\t\ttext = text.replaceAll(\"\\\\?\", \"\");\n\t\ttext = text.replaceAll(\":\", \"\");\n\t\tMap<String, Object> entities_map = new TreeMap<String, Object>();\n\t\tMap<String, Object> extractedEntities = new TreeMap<String, Object>();\n\t\tList<TreeMap<String, String>> entities = new ArrayList<TreeMap<String, String>>();\n\t\tList<TreeMap<String, String>> intents= new ArrayList<TreeMap<String, String>>();\n\t\tSet<String> intentsList=new HashSet<String>();\n\t\tSet<String> entitiesList=new HashSet<String>();\n\t\t\n\t\tString input = text;\n\t\t// text=text.replaceAll(\" \", \" \");\n\t\tSpan spanSentences[] = pd.sentenceDetector.sentPosDetect(input);\n\t\tint sentenceId = 1;\n\t\tTreeMap<String, String> intents_map = new TreeMap<String, String>();\n\t\tDouble entites_highest_cofidence = 0.0;\n\t\tDouble intents_highest_cofidence = 0.0;\n\t\tfor (Span sentence : spanSentences) {\n\t\t\tArrayList<PhraseTemplate> phrases = pd.GetPhrases(sentence\n\t\t\t\t\t.getCoveredText(input).toString(), sentenceId++);\n\t\t\t\n\t\t\tfor (PhraseTemplate svo : phrases) {\n\t\t\t\tString key = svo.phrase;\n\t\t\t\tkey = key.replaceAll(\" is \", \"\");\n\t\t\t\tkey = key.replaceAll(\"What \", \"\");\n\t\t\t\tkey = key.replaceAll(\"what \", \"\");\n\t\t\t\tkey = key.replaceAll(\" the \", \"\");\n\n\t\t\t\tif (key.length() > 1) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tString resolvedEntity = lss.resolveEntity(key\n\t\t\t\t\t\t\t\t.toLowerCase().trim().toString(),\n\t\t\t\t\t\t\t\t\"entitesIndex\");\n\t\t\t\t\t\tString tokens[] = resolvedEntity.split(\"__\");\n//\t\t\t\t\t\tSystem.out.println(resolvedEntity+\" :: \"+key);\n\t\t\t\t\t\tif (tokens.length < 2)\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\tif (tokens[1].trim().startsWith(\"entity\")\n\t\t\t\t\t\t\t\t&& Double.parseDouble(tokens[5].trim())>0.9)\n\t\t\t\t\t\t\tentitiesList.add(tokens[5].trim());\n\t\t\t\t\t\tif (tokens[1].trim().startsWith(\"entity\")\n\t\t\t\t\t\t\t\t&& Double.parseDouble(tokens[5].trim()) > entites_highest_cofidence) {\n\t\t\t\t\t\t\tentities_map.clear();\n\t\t\t\t\t\t\tentities_map.put(\"Entity\", key.trim());\n\t\t\t\t\t\t\tentities_map.put(\"MappedEntity\", tokens[4].trim());\n\t\t\t\t\t\t\tentities_map.put(\"EntityConfidenceScore\", tokens[5].trim());\n\t\t\t\t\t\t\tentities_map.put(\"MappedEntityType\", tokens[2].trim());\n\t\t\t\t\t\t\tentites_highest_cofidence = Double\n\t\t\t\t\t\t\t\t\t.parseDouble(tokens[5].trim());\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (tokens[1].trim().startsWith(\"intent\")\n\t\t\t\t\t\t\t\t&& Double.parseDouble(tokens[5].trim())>0.9)\n\t\t\t\t\t\t\tintentsList.add(tokens[5].trim());\n\t\t\t\t\t\tif (tokens[1].trim().startsWith(\"intent\")\n\t\t\t\t\t\t\t\t&& Double.parseDouble(tokens[5].trim()) > intents_highest_cofidence) {\n\t\t\t\t\t\t\tintents_map.clear();\n\t\t\t\t\t\t\tintents_map.put(\"Id\", tokens[0].trim());\n\t\t\t\t\t\t\tintents_map.put(\"Extracted Entity\", key.trim());\n\t\t\t\t\t\t\tintents_map.put(\"Mapped Entity\", tokens[4].trim());\n\t\t\t\t\t\t\tintents_map.put(\"Confidence\", tokens[5].trim());\n\t\t\t\t\t\t\tintents_map.put(\"Class\", tokens[1].trim());\n\t\t\t\t\t\t\tintents_highest_cofidence = Double\n\t\t\t\t\t\t\t\t\t.parseDouble(tokens[5].trim());\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tentities_map.put(\"Intent\", intents_map.get(\"Extracted Entity\"));\n\t\tentities_map.put(\"MappedIntent\", intents_map.get(\"Mapped Entity\"));\n\t\tentities_map.put(\"IntentConfidenceScore\", intents_map.get(\"Confidence\"));\n\n\t\treturn entities_map;\n\t}", "private static void printStemResults(String originalWord, List<Stem> stems) {\n StringBuilder builder = new StringBuilder().append(\"stem(\").append(originalWord).append(\")\").append(\"\\n\");\n\n for (Stem stem : stems) {\n builder.append(\"- \").append(stem.getStem()).append(\": \");\n\n for (HunspellAffix prefix : stem.getPrefixes()) {\n builder.append(prefix.getAppend()).append(\"+\");\n\n if (hasText(prefix.getStrip())) {\n builder.append(prefix.getStrip()).append(\"-\");\n }\n }\n\n builder.append(stem.getStem());\n\n for (HunspellAffix suffix : stem.getSuffixes()) {\n if (hasText(suffix.getStrip())) {\n builder.append(\"-\").append(suffix.getStrip());\n }\n \n builder.append(\"+\").append(suffix.getAppend());\n }\n builder.append(\"\\n\");\n }\n\n System.out.println(builder);\n }", "private List<Stem> stem(char word[], int length, char[] flags, int recursionDepth) {\n List<Stem> stems = new ArrayList<Stem>();\n\n for (int i = 0; i < length; i++) {\n List<HunspellAffix> suffixes = dictionary.lookupSuffix(word, i, length - i);\n if (suffixes == null) {\n continue;\n }\n\n for (HunspellAffix suffix : suffixes) {\n if (hasCrossCheckedFlag(suffix.getFlag(), flags)) {\n int deAffixedLength = length - suffix.getAppend().length();\n // TODO: can we do this in-place?\n String strippedWord = new StringBuilder().append(word, 0, deAffixedLength).append(suffix.getStrip()).toString();\n\n List<Stem> stemList = applyAffix(strippedWord.toCharArray(), strippedWord.length(), suffix, recursionDepth);\n for (Stem stem : stemList) {\n stem.addSuffix(suffix);\n }\n\n stems.addAll(stemList);\n }\n }\n }\n\n for (int i = length - 1; i >= 0; i--) {\n List<HunspellAffix> prefixes = dictionary.lookupPrefix(word, 0, i);\n if (prefixes == null) {\n continue;\n }\n\n for (HunspellAffix prefix : prefixes) {\n if (hasCrossCheckedFlag(prefix.getFlag(), flags)) {\n int deAffixedStart = prefix.getAppend().length();\n int deAffixedLength = length - deAffixedStart;\n\n String strippedWord = new StringBuilder().append(prefix.getStrip())\n .append(word, deAffixedStart, deAffixedLength)\n .toString();\n\n List<Stem> stemList = applyAffix(strippedWord.toCharArray(), strippedWord.length(), prefix, recursionDepth);\n for (Stem stem : stemList) {\n stem.addPrefix(prefix);\n }\n\n stems.addAll(stemList);\n }\n }\n }\n\n return stems;\n }", "public void computeWords(){\n\n loadDictionary();\n\n CharacterGrid characterGrid = readCharacterGrid();\n\n Set<String> wordSet = characterGrid.findWordMatchingDictionary(dictionary);\n\n System.out.println(wordSet.size());\n for (String word : wordSet) {\n\t System.out.println(word);\n }\n\n // System.out.println(\"Finish scanning character grid in \" + (System.currentTimeMillis() - startTime) + \" ms\");\n }", "public static ArrayList<String> findWords(TrieNode root) {\n\t\tArrayList<String> result = new ArrayList<String>();\n\t\tgetWords(root, \"\", result);\n\t\treturn result;\n\t}", "public List<Term> getAllTermsByDictionary(String table, String dictionary) {\n List<Term> termList = new ArrayList<Term>();\n\n // Select All Query\n String selectQuery = \"SELECT * FROM \" + table + \" WHERE \" + KEY_DICTIONARY + \" = '\" + dictionary + \"' ORDER BY \" + KEY_TERM;\n\n SQLiteDatabase db = this.getWritableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n\n // looping through all rows and adding to list\n if (cursor.moveToFirst()) {\n do {\n if (!cursor.getString(2).isEmpty()) {\n /*\n Term term = new Term();\n term.setId(Integer.parseInt(cursor.getString(0)));\n term.setDictionary(cursor.getString(1));\n term.setTerm(cursor.getString(2));\n term.setSubject(cursor.getString(3));\n term.setDefinition(cursor.getString(4));\n term.setSynonyms(cursor.getString(5));\n */\n Term term = new Term(Integer.parseInt(cursor.getString(0)),cursor.getString(1), cursor.getString(2), cursor.getString(3),\n cursor.getString(4), cursor.getString(5), Integer.parseInt(cursor.getString(6)));\n // Adding term to list\n termList.add(term);\n }\n } while (cursor.moveToNext());\n }\n\n // return term list\n return termList;\n }", "public Word(String s) throws FileNotFoundException, IOException, ParseException {\r\n\t\tword = s;\r\n\t\tjsonOsFile = downloadJSON(\"https://en.wikipedia.org/w/api.php?action=opensearch&format=json&search=\");\r\n\t\tjsonOsFile.deleteOnExit();\r\n\t\tjsonPageFile = downloadJSON(\"https://en.wikipedia.org/w/api.php?action=query&prop=revisions&rvprop=content&format=json&titles=\");\r\n\t\tjsonPageFile.deleteOnExit();\r\n\t\tjsonOsArray = (JSONArray)(new JSONParser().parse(new FileReader(\"JSON/\" + this.word + \"_opensearch.json\")));\r\n\t\tjsonPageObject = (JSONObject) (new JSONParser().parse(new FileReader(\"JSON/\" + this.word + \"_wikipage.json\")));\r\n\t\t\r\n\t\t//At this point, we have downloaded and saved our OpenSearch.json and Wikipage.json accordingly. \r\n\t\t\r\n\t\tjparse = new JParser();\r\n\t\trelPageStrings = jparse.getRelatedPages(jsonOsArray);\r\n\t\trelPageDesc = jparse.getRelatedPageDesc(jsonOsArray);\r\n\t\t\r\n\t\t//Retrieves all of the words on the wiki page. Still requires parsing into readable data. Pages are denoted by [[ ]] surrounding them.\r\n\t\twikipageArray = jparse.getPageContents(jsonPageObject);\r\n\t\t\r\n\t\tpageKeywords = jparse.getKeysOnPage(wikipageArray);\r\n\t\t\r\n\t}", "public static List<String> validHtmlWords(String url)\n\t{\n\t\tString htmlString = \"\";\n\t\ttry\n\t\t{\n\t\t\thtmlString = HTMLText(url);\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tlogger.error(e.getMessage(), e);\n\t\t}\n\t\tList<String> words = getWords(htmlString);\n\t\tList<String> validWords = validWords(words);\n\t\treturn validWords;\n\t}", "public String findAntonyms(String word) throws IOException {\n try {\n word = word.toLowerCase();\n String check = dictionaryDao.readDB(word);\n if(!check.contains(\"null\"))\n return dictionaryDao.readDB(word); //checkFile(word);\n DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\n URL url = new URL(PATH + word + XML);\n URLConnection connection = url.openConnection();\n Document doc = parseXML(connection.getInputStream());\n NodeList xml = doc.getElementsByTagName(\"w\");\n String xmlElementValue = null;\n ArrayList<String> antonymsCollection = new ArrayList<>();\n\n for (int i = 0; i < xml.getLength(); i++) {\n Element element = (Element) xml.item(i);\n if (isAntonym(element.getAttribute(\"r\"))) {\n xmlElementValue = element.getTextContent();\n antonymsCollection.add(xmlElementValue);\n }\n }\n\n String lastElement = antonymsCollection.get(antonymsCollection.size()-1);\n String antonymsCollectionString = \"\";\n\n for(String s : antonymsCollection) {\n if(!s.equals(lastElement))\n antonymsCollectionString += s + \", \";\n else\n antonymsCollectionString += s + \".\";\n }\n dictionaryDao.addToDB(word, antonymsCollectionString); //saveToFile(word, antonymsCollectionString);\n return \"Antonym/s for \" + word + \": \" + antonymsCollectionString;\n } catch (UnknownHostException e) {\n return INTERNECT_CONNECTION;\n } catch (NullPointerException e) {\n return INCORRECT_WORD;\n } catch (ArrayIndexOutOfBoundsException e) {\n return INCORRECT_WORD;\n } catch(IOException e){\n return INCORRECT_WORD;\n } catch (JdbcSQLException e) {\n return DATABASE_ERROR;\n } catch (Exception e) {\n StringWriter errors = new StringWriter();\n e.printStackTrace(new PrintWriter(errors));\n return errors.toString();\n }\n }", "private static void splitWord() {\n\t\tint i = 1;\r\n\t\tfor(String doc : DocsTest) {\r\n\t\t\tArrayList<String> wordAll = new ArrayList<String>();\r\n\t\t\tfor (String word : doc.split(\"[,.() ; % : / \\t -]\")) {\r\n\t\t\t\tword = word.toLowerCase();\r\n\t\t\t\tif(word.length()>1 && !mathMethod.isNumeric(word)) {\r\n\t\t\t\t\twordAll.add(word);\r\n\t\t\t\t\tif(!wordList.contains(word)) {\r\n\t\t\t\t\t\twordList.add(word);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\twordAll.removeAll(stopword);\r\n\t\t\tDoclist.put(i, wordAll);\r\n\t\t\ti++;\r\n\t\t}\r\n\t\twordList.removeAll(stopword);\r\n\t}", "public static List<String> validStems(List<String> words)\n\t{\n\t\tStemmer stemmer = new Stemmer();\n\t\tArrayList<String> goodWords = new ArrayList<String>();\n\t\tfor (String word : words)\n\t\t{\n\t\t\tString stem = stemmer.stem(word);\n\t\t\tif (dictUtils.dict.containsKey(stem))\n\t\t\t{\n\t\t\t\tgoodWords.add(stem);\n\t\t\t}\n\t\t}\n\t\treturn goodWords;\n\t}", "public static List<Chord> getStemChords (Measure measure,\r\n Glyph stem)\r\n {\r\n List<Chord> chords = new ArrayList<>();\r\n\r\n for (TreeNode node : measure.getChords()) {\r\n Chord chord = (Chord) node;\r\n\r\n if (chord.getStem() == stem) {\r\n chords.add(chord);\r\n }\r\n }\r\n\r\n return chords;\r\n }", "@Test(timeout = 4000)\n public void test47() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"th sponsor institut of a techn report.uas\");\n assertEquals(\"th spons institut of a techn report.ua\", string0);\n }", "public String stemming(String stopWordRemovalFile, String stemmingFilePath) throws IOException{\n\t\t\n\t\t//Use a for loop to go through each data file\n\t\tfor (int i = 1; i <= numOfFiles; i++) {\n\t\t\t//Use FileInputStream to get the file path and use BufferedReader and InputStreamReader to read the files\n\t\t\tFileInputStream files = new FileInputStream(stopWordRemovalFile + \"/a\" + i + \".txt\");\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(files));\n\t\t\t\n\t\t\t//Use FileWriter to indicate the path to where the data will be outputed and BufferedWriter to write to the indicated files\n\t\t\tFileWriter fileStream = new FileWriter(stemmingFilePath + \"/a\" + i + \".txt\"); \n\t BufferedWriter outputStream = new BufferedWriter(fileStream);\n\t\t\t\n\t //Add each line of the files into an temporary stemmer arraylist to output the words into their root form\n\t\t\tString readStopwordDoc;\n\t\t\twhile((readStopwordDoc = reader.readLine()) != null) {\n\t\t\t\ttempStemmer.add(readStopwordDoc);\n\t\t\t}\n\t\t\t//Use the for loop to get the size of the temporary stemmer arraylist and stem the words\n\t\t\tfor(int j = 0; j < tempStemmer.size(); j++) {\n\t\t\t\tstemming.setCurrent(tempStemmer.get(j).toString());\n\t\t\t\tstemming.stem();\n\t\t\t\toutputStream.write(stemming.getCurrent() + \"\\n\");\n\t\t\t}\n\t\t\ttempStemmer.clear();\n\t\t\t\n\t\t\toutputStream.close();\n\t\t}\n\t\tSystem.out.println(\"See Stemming Folder for to view the results\");\n\t\treturn stemmingFilePath;\n\t}", "public List<String> getAllWords() {\n List<String> words = new ArrayList<>();\n // get the words to the list\n getAllWords(root, \"\", 0, words);\n // and return the list of words\n return words;\n }" ]
[ "0.68486196", "0.64040387", "0.6389563", "0.6352796", "0.62009865", "0.59938693", "0.5975981", "0.59572846", "0.58985823", "0.5860562", "0.5853653", "0.5842977", "0.5817483", "0.5795593", "0.57850343", "0.57793754", "0.5741923", "0.5690128", "0.56633466", "0.5643299", "0.56371355", "0.5623261", "0.5585468", "0.557997", "0.5569415", "0.55466914", "0.5534749", "0.5526265", "0.55026746", "0.5481646", "0.5466547", "0.54561436", "0.53941894", "0.53837603", "0.5376935", "0.5370355", "0.536496", "0.5338479", "0.53183043", "0.5313051", "0.5257435", "0.5253209", "0.5246547", "0.5222748", "0.5221782", "0.5213245", "0.5204356", "0.5201833", "0.5189259", "0.51840466", "0.51816857", "0.5144021", "0.51255393", "0.5116447", "0.5105692", "0.5105478", "0.5100423", "0.5088524", "0.5087826", "0.5068491", "0.5052517", "0.50498027", "0.5049284", "0.5040122", "0.5029491", "0.5023503", "0.50135624", "0.50108063", "0.5007799", "0.5007284", "0.4983874", "0.49641454", "0.49586016", "0.49535942", "0.49378985", "0.49247628", "0.49193227", "0.49061918", "0.4904312", "0.48996663", "0.48984388", "0.48797584", "0.48697057", "0.48682037", "0.4865832", "0.486085", "0.48357216", "0.48262948", "0.48246568", "0.48059583", "0.48048967", "0.4801256", "0.47894445", "0.47881764", "0.47830617", "0.47751868", "0.476718", "0.4753158", "0.47527817", "0.4751405", "0.47479197" ]
0.0
-1
get words from string
public static List<String> getWords(String text) { String lower = text.toLowerCase(); String noPunct = lower.replaceAll("\\W", " "); String noNum = noPunct.replaceAll("[0-9]", " "); List<String> words = Arrays.asList(noNum.split("\\s+")); return words; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static ArrayList<String> split_words(String s){\n ArrayList<String> words = new ArrayList<>();\n\n Pattern p = Pattern.compile(\"\\\\w+\");\n Matcher match = p.matcher(s);\n while (match.find()) {\n words.add(match.group());\n }\n return words;\n }", "public static ArrayList<String> getWordsInString(String s) {\r\n\t\t// Search words in text\r\n\t\tString[] split = s.replace('-', ' ').split(\" \");\r\n\t\tArrayList<String> words = new ArrayList<String>(split.length);\r\n\t\t// Remove punctuation\r\n\t\tfor(String str : split) {\r\n\t\t\tif(str.isEmpty()) continue;\r\n\t\t\tStringBuilder wordBuilder = new StringBuilder();\r\n\t\t\tfor(int j = 0; j < str.length(); j++) {\r\n\t\t\t\tchar c = str.charAt(j);\r\n\t\t\t\tif(c >= 'A' && c <= 'Z') c = (char) (c + 'a' - 'A');\r\n\t\t\t\tif((c >= 'a' && c <= 'z') || (c >= '0' && c <= '9')) {\r\n\t\t\t\t\twordBuilder.append(c);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\twords.add(wordBuilder.toString());\r\n\t\t}\r\n\t\treturn words;\r\n\t}", "public static ArrayList<String> words(String s){\n\t\ts = s.toLowerCase().replaceAll(\"[^a-zA-Z ]\", \"\");\n\t\tArrayList<String> arrayList = new ArrayList<String>();\n\t\tString currWord = \"\";\n\n\t\tfor(int i = 0; i < s.length(); i ++){\n\t\t\tchar c = s.charAt(i);\n\t\t\tif (Character.isLetter(c) == false){\n\t\t\t\tarrayList.add(currWord);\n\t\t\t\tcurrWord = \"\";\n\t\t\t}else{\n\t\t\t\tcurrWord = currWord + c;\n\t\t\t}\n\t\t}\n\t\tarrayList = removeSpaces(arrayList);\n\t\treturn arrayList;\n\t}", "public static ArrayList<String> getWords(String input) {\r\n ArrayList<String> w = new ArrayList<String>();\r\n input = input.toLowerCase();\r\n String[] words = input.split(\"\\\\s+\");\r\n for (int i = 0; i < words.length; i++) {\r\n words[i] = words[i].replaceAll(\"[^\\\\w]\", \"\");\r\n }\r\n for(String elem: words) {\r\n w.add(elem);\r\n }\r\n return w;\r\n }", "static Stream<String> splitIntoWords(String str) \r\n\t{\r\n\t\treturn Arrays.stream(str.split(\"\\\\W+\")).filter(s -> s.length() > 0);\r\n\t}", "public static String[] splitIntoWords(String s) {\n String[] words = s.split(\" \");\n return words;\n }", "public KeyWordList extractKeyWords(String input);", "public static String [] splitwords(String s) {\n return splitwords(s, WHITESPACE);\n }", "public Iterator<String> words();", "public String[] convertSentToArrayOfWords(String s){\n\t\tString [] arr = s.split(\" \");\n\n\t\treturn arr;\n\t}", "java.lang.String getWord();", "public static String [] splitwords(String s, String whiteSpace) {\n return splitwords(s, whiteSpace, CITCHAR);\n }", "String[] splitSentenceWords() {\n\t\t\tint i=0;\n\t\t\tint j=0;\n\t\t\tArrayList<String> words = new ArrayList<String>();\n\t\t\t\n\t\t\t\tString[] allWords = wordPattern.split(purePattern.matcher(sentence).replaceAll(\" \"));//.split(\"(?=\\\\p{Lu})|(\\\\_|\\\\,|\\\\.|\\\\s|\\\\n|\\\\#|\\\\\\\"|\\\\{|\\\\}|\\\\@|\\\\(|\\\\)|\\\\;|\\\\-|\\\\:|\\\\*|\\\\\\\\|\\\\/)+\");\n\t\t\tfor(String word : allWords) {\n\t\t\t\tif(word.length()>2) {\n\t\t\t\t\twords.add(word.toLowerCase());\n\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\treturn (String[])words.toArray(new String[words.size()]);\n\t\t\n\t\t}", "public static String[] splitWords(String str){\r\n\t\tArrayList<String> wordsList= new ArrayList<String>();\r\n\t\t\r\n\t\tfor(String s:str.split(\" \")){\r\n\t\t\tif(!s.isEmpty()) wordsList.add(s);\t\r\n\t\t}\r\n\t\t\t\t\r\n\t\treturn wordsList.toArray(new String[wordsList.size()]);\r\n\t}", "public List<Word> getTextWords(String text) {\n\n List<Word> words = new ArrayList<Word>();\n\n for (Word word : new SentenceParser().getSentenceWords(text)) {\n Collections.addAll(words, word);\n }\n return words;\n }", "public static String[] splitWordString(String word) {\r\n\t\tString[] letters = word.split(\"[^a-z^A-Z]\");\r\n\t\treturn letters;\r\n\t}", "public static Words toWords(String cs){\n Words r = new Words();\n String s = \"\";\n int l = cs.length();\n int i = 0;\n char current;\n while(i<l){\n current = cs.charAt(i);\n if(!Char.isAlfaNumericPoint(current)){\n if(s.length()>0){\n r.add(s);\n s = \"\";\n }\n }\n else{\n s += current;\n }\n i++;\n }\n if(s.length()>0){\n r.add(s);\n }\n return r;\n }", "Stream<CharSequence> toWords(CharSequence sentence);", "public static String[] split(String s)\n\t{\n\t\tArrayList <String> words = new ArrayList<> ();\n\t\t\n\t\tStringBuilder word = new StringBuilder();\n\t\tfor(int i=0; i < s.length(); i++ )\n\t\t{\n\t\t\tif(s.charAt(i) == ' ')\n\t\t\t{\n\t\t\t\twords.add(word.toString());\n\t\t\t\tword = new StringBuilder();\n\t\t\t}\n\t\t\telse\n\t\t\t\tword.append(s.charAt(i));\n\t\t}\n\t\twords.add(word.toString());\n\t\treturn words.toArray(new String[words.size()]);\n\t}", "private static List<String> getWord(String urlname) {\n\t\tList<String> returnWord = new ArrayList<String>();\n\t\tBufferedReader reader;\n\t\ttry {\n\t\t\tURL url = new URL(urlname);\n\t\t\tInputStream in = url.openStream();\n\t\t\treader = new BufferedReader(new InputStreamReader(in));\n\t\t\twhile (true) {\n\t\t\t\tString word = reader.readLine();\n\t\t\t\tif (word == null)\n\t\t\t\t\tbreak;\n\t\t\t\treturnWord.add(word);\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(e.getMessage());\n\t\t}\n\t\treturn returnWord;\n\t}", "public String search_words(String word){\n\t\tString found_words = \"\";\n\t\t//We try to find the word within our childs\n\t\tfor(LexiNode child: childs)\n\t\t\tif(word.toLowerCase().charAt(0) == Character.toLowerCase(child.getRepresentative_letter()))\n\t\t\t\tfound_words += child.search_words(word, 0);\n\t\t\n\t\treturn found_words;\n\t}", "public static String [] splitwords(String s, \n\t\t\t\t String whiteSpace,\n\t\t\t\t char citChar) {\n boolean bCit = false; // true when inside citation chars.\n Vector v = new Vector(); // (String) individual words after splitting\n StringBuffer buf = new StringBuffer(); \n int i = 0; \n \n while(i < s.length()) {\n char c = s.charAt(i);\n\n if(bCit || whiteSpace.indexOf(c) == -1) {\n\t// Build up word until we breaks on either a citation char or whitespace\n\tif(c == citChar) {\n\t bCit = !bCit;\n\t} else {\n\t if(buf == null) {\n\t buf = new StringBuffer();\n\t }\n\t buf.append(c);\n\t}\n\ti++;\n } else {\t\n\t// found whitespace or end of citation, append word if we have one\n\tif(buf != null) {\n\t v.addElement(buf.toString());\n\t buf = null;\n\t}\n\n\t// and skip whitespace so we start clean on a word or citation char\n\twhile((i < s.length()) && (-1 != whiteSpace.indexOf(s.charAt(i)))) {\n\t i++;\n\t}\n }\n }\n\n // Add possible remaining word\n if(buf != null) {\n v.addElement(buf.toString());\n }\n \n // Copy back into an array\n String [] r = new String[v.size()];\n v.copyInto(r);\n \n return r;\n }", "private static String[] seperateStr(String str)\r\n\t{\r\n\t\tboolean doubleSpace = false;\r\n\t\tint wordCount = 0;\r\n\t\tStringBuffer sb = new StringBuffer();\r\n\t\tif (str == null || str.length() == 0)\r\n\t\t{\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tfor (int j = 0; j < str.length(); j++)\r\n\t\t{\r\n\t\t\tif (str.charAt(j) == ' ')\r\n\t\t\t{\r\n\t\t\t\tif (!doubleSpace)\r\n\t\t\t\t\twordCount++;\r\n\r\n\t\t\t\tdoubleSpace = true;\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tdoubleSpace = false;\r\n\t\t}\r\n\t\tString st[] = new String[wordCount + 1];\r\n\t\tint i = 0;\r\n\r\n\t\tdoubleSpace = false;\r\n\t\tString ch = \"\";\r\n\t\tfor (int j = 0; j < str.length(); j++)\r\n\t\t{\r\n\t\t\tif (str.charAt(j) == ' ')\r\n\t\t\t{\r\n\t\t\t\tif (!doubleSpace)\r\n\t\t\t\t{\r\n\t\t\t\t\tst[i] = sb.toString();\r\n\t\t\t\t\tsb.delete(0, sb.length());\r\n\t\t\t\t\ti++;\r\n\t\t\t\t}\r\n\t\t\t\tdoubleSpace = true;\r\n\t\t\t\tcontinue;\r\n\t\t\t} else\r\n\t\t\t{\r\n\t\t\t\tsb.append(str.charAt(j));\r\n\t\t\t}\r\n\t\t\tdoubleSpace = false;\r\n\t\t}\r\n\r\n\t\tst[i] = sb.toString();\r\n\t\t;\r\n\t\treturn st;\r\n\t}", "public static ArrayList<String> findWords(TrieNode root) {\n\t\tArrayList<String> result = new ArrayList<String>();\n\t\tgetWords(root, \"\", result);\n\t\treturn result;\n\t}", "public static ArrayList<String> wordTokenizer(String sentence){\n \n ArrayList<String> words = new ArrayList<String>();\n String[] wordsArr = sentence.replaceAll(\"\\n\", \" \").toLowerCase().split(\" \");\n \n for(String s : wordsArr){\n \n if(s.trim().compareTo(\"\") != 0)\n words.add(s.trim());\n \n }\n \n return words;\n \n }", "public String words(String sentence) {\n String[] stringSentence = sentence.trim().split(\" \");\n for (int i = 0; i < stringSentence.length; i++) {\n if (stringSentence[i].length() >= LENGTH) {\n stringSentence[i] = new StringBuilder(stringSentence[i]).reverse().toString();\n }\n }\n return String.join(\" \", stringSentence);\n }", "List<T> getWord();", "public List<String> decode(String s) {\n List<String> words = new ArrayList<>();\n if (s.length() == 0) return words;\n int i = 0;\n while (i < s.length()) {\n int d = s.indexOf(\"#\", i);\n int len = Integer.parseInt(s.substring(i , d));\n i = d + 1 + len;\n words.add(s.substring(d + 1, i));\n }\n return words;\n }", "public static void main(String[] args) {\n\t\tString s = \"Sharma is a good player and he is so punctual\"; \n String words[] = s.split(\" \"); \n System.out.println(\"The Number of words present in the string are : \"+words.length);\n\n\t}", "default Stream<CharSequence> parseTextToWords(CharSequence text) {\n return toSentences(text).filter(s -> s.length() > 0).flatMap(this::toWords);\n }", "private List<String> help(String s, Set<String> wordDict) {\n\t\tList<String> ret = new ArrayList<>();\n\n\t\tif (wordDict.contains(s))\n\t\t\tret.add(s);\n\t\telse\n\t\t\tfor (int i = 0; i < s.length(); i++) {\n\t\t\t\tif (wordDict.contains(s.substring(0, i + 1))) {\n\n//\t\t\t\t\tSystem.out.println(s.substring(0, i + 1));\n\n\t\t\t\t\tList<String> tmp = help(s.substring(i + 1), wordDict);\n\t\t\t\t\tif (tmp.size() > 0) {\n\t\t\t\t\t\tret.add(s.substring(0, i + 1));\n\t\t\t\t\t\tret.addAll(tmp);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\treturn ret;\n\t}", "public String[] tokenize(String string) {\n String[] result = null;\n\n if (string != null && !\"\".equals(string)) {\n if (normalizer != null) {\n final NormalizedString nString = normalize(string);\n if (nString != null) {\n result = nString.split(stopwords);\n }\n }\n else if (analyzer != null) {\n final List<String> tokens = LuceneUtils.getTokenTexts(analyzer, label, string);\n if (tokens != null && tokens.size() > 0) {\n result = tokens.toArray(new String[tokens.size()]);\n }\n }\n\n if (result == null) {\n final String norm = string.toLowerCase();\n if (stopwords == null || !stopwords.contains(norm)) {\n result = new String[]{norm};\n }\n }\n }\n\n return result;\n }", "public static String[] strParts(String string) {\r\n //StringTokenizer st = new StringTokenizer(string);\r\n String[] strings = string.split(\"\\\\s+\");\r\n return removeSpaces(strings);\r\n }", "List<Integer> wordFinder(String text, String word) {\n\n List<Integer> indexes = new ArrayList<Integer>();\n String wordProper = \" \" + word + \" \";\n\n int index = 0;\n\n while (index != -1) {\n\n index = text.indexOf(wordProper, index);\n\n if (index != -1) {\n indexes.add(index);\n index++;\n }\n }\n\n return indexes;\n }", "public static String [] findWords (String letters) \r\n { \r\n String total = \"\";\r\n try\r\n {\r\n Scanner scanner = new Scanner(new File(\"wordlist.txt\"));\r\n while(scanner.hasNext())\r\n {\r\n String line = scanner.nextLine();\r\n if(matchletters(line, letters))\r\n total = total.concat(line).concat(\" \");\r\n }\r\n //System.out.println(total);\r\n return total.split(\" \");\r\n }\r\n catch(Exception e)\r\n {\r\n System.out.println(\"Error found: \" + e);\r\n return null;\r\n }\r\n }", "public List<Word> getWordsStartingAt(int start);", "public List<String> getAllWords() {\n List<String> words = new ArrayList<>();\n // get the words to the list\n getAllWords(root, \"\", 0, words);\n // and return the list of words\n return words;\n }", "public static List<Integer> findSubstringWordConcatenation(String str, String[] words) {\n assert str != null;\n assert words != null;\n List<String> wordList = new ArrayList<>();\n List<Integer> wordIndex = new ArrayList<>();\n int noOfWords = words.length, wordLength = words[0].length();\n Map<String,Integer> wordFrequencyMap = new HashMap<>();\n for(String word: words) {\n wordFrequencyMap.put(word,wordFrequencyMap.getOrDefault(word,0)+1);\n }\n\n for(int windowStart=0; windowStart <= (str.length() - (wordLength * noOfWords)); windowStart++) {\n HashMap<String, Integer> wordsSeen = new HashMap<>();\n /*now look for words*/\n for(int wrd=0; wrd<noOfWords; wrd++) {\n int wordStartIndex = windowStart + (wrd * wordLength);\n String word = str.substring(wordStartIndex, wordStartIndex+wordLength);\n if(wordFrequencyMap.containsKey(word)) {\n wordsSeen.put(word, wordsSeen.getOrDefault(word,0)+1);\n } else {\n break;// break for loop\n }\n if(wordsSeen.get(word) > wordFrequencyMap.getOrDefault(word,0)) {\n break;// frequency is more then required\n }\n if(wordsSeen.size() == wordFrequencyMap.size()) {\n wordList.add(str.substring(windowStart, wordStartIndex+wordLength));\n wordIndex.add(windowStart);\n }\n }\n }\n return wordIndex;\n }", "public static List<String> devideSentenceIntoWords(String sentence) {\n\n String[] wordArray = sentence.toLowerCase().split(\" \");\n return Arrays.stream(wordArray)\n .map(String::trim)\n .filter(w -> !w.replace(CharacterUtils.WORD_DEVIDER, \"\").trim().isEmpty())\n .collect(Collectors.toList());\n }", "public String get_all_words(){\n\t\tString found_words = \"\";\n\t\t//We try to find the word within our childs\n\t\tfor(LexiNode child: childs){\n\t\t\t\tfound_words += child.get_all_words();\n\t\t}\n\t\tif(current_word != null && !found_words.equals(\"\"))\n\t\t\treturn current_word + \"#\" + found_words;\n\t\telse if(current_word != null && found_words.equals(\"\"))\n\t\t\treturn current_word+ \"#\";\n\t\telse //current_word == null && found_words != null\n\t\t\treturn found_words;\n\t}", "public String getAnyWordStartingWith(String s) {\n TrieNode temp = searchNode(s);\n if (temp == null){\n return \"noWord\";\n }\n while (!temp.isWord){\n for (String c: temp.children.keySet()){\n temp = temp.children.get(c);\n s += c;\n break;\n }\n }\n return s;\n }", "private void fillSet() {\r\n\t\tString regex = \"\\\\p{L}+\";\r\n\t\tMatcher matcher = Pattern.compile(regex).matcher(body);\r\n\t\twhile (matcher.find()) {\r\n\t\t\tif (!matcher.group().isEmpty()) {\r\n\t\t\t\twords.add(matcher.group());\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void stringToAl(String s){\n\t\tfor(int i=0, j=0; i<s.length(); i++){\n\t\t\tif(s.charAt(i) == ' ' || i == s.length()-1){\n\t\t\t\tString temp;\n\t\t\t\tif(i == s.length() - 1){\n\t\t\t\t\ttemp =s.substring(j,i+1);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\ttemp =s.substring(j,i);\n\t\t\t\t}\n\t\t\t\t//System.out.println(temp);\n\t\t\t\twords.add(temp);\n\t\t\t\tj = i + 1;\n\n\t\t\t}\n\t\t}\n\n\t}", "private static void splitWord() {\n\t\tint i = 1;\r\n\t\tfor(String doc : DocsTest) {\r\n\t\t\tArrayList<String> wordAll = new ArrayList<String>();\r\n\t\t\tfor (String word : doc.split(\"[,.() ; % : / \\t -]\")) {\r\n\t\t\t\tword = word.toLowerCase();\r\n\t\t\t\tif(word.length()>1 && !mathMethod.isNumeric(word)) {\r\n\t\t\t\t\twordAll.add(word);\r\n\t\t\t\t\tif(!wordList.contains(word)) {\r\n\t\t\t\t\t\twordList.add(word);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\twordAll.removeAll(stopword);\r\n\t\t\tDoclist.put(i, wordAll);\r\n\t\t\ti++;\r\n\t\t}\r\n\t\twordList.removeAll(stopword);\r\n\t}", "String getWordIn(String schar, String echar);", "public static List<String> splitWhitespace(String text) {\n\t\tif (sb == null) {\n\t\t\tsb = new StringBuilder();\n\t\t}\n\t\tchar[] chars = text.toCharArray();\n\t\tList<String> words = new ArrayList<String>();\n\t\tfor (int i=0; i<chars.length; i++) {\n\t\t\tif (Character.isWhitespace(chars[i])) {\n\t\t\t\tif (sb.length() > 0) {\n\t\t\t\t\twords.add(sb.toString());\n\t\t\t\t}\n\t\t\t\tsb.setLength(0);\n\t\t\t} else {\n\t\t\t\tsb.append(chars[i]);\n\t\t\t}\n\t\t}\n\t\tif (sb.length() > 0) {\n\t\t\twords.add(sb.toString());\n\t\t}\n\t\tsb.setLength(0);\n\t\treturn words;\n\t}", "public String phraseWords(String input) {\n document = new Annotation(input);\n // run all Annotators on this text\n pipeline.annotate(document);\n String pos = document.get(CoreAnnotations.PhraseWordsTagAnnotation.class);\n\n return pos;\n }", "public void biStringToAl(String s){\n\t\tint i=0, j=0, num=0;\n\t\twhile(i<s.length() - 1){ //avoid index out of range exception\t\t\t\n\t\t\twhile(i < s.length()){\n\t\t\t\ti++;\n\t\t\t\tif(s.charAt(i) == ' ' || i == s.length()-1){ //a word ends\n\t\t\t\t\tnum++;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\twhile(num >2 && i < s.length()){\n\t\t\t\tj++;\n\t\t\t\tif(s.charAt(j) == ' '){ // j is 2 words slower than i\n\t\t\t\t\tj = j + 1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tString temp;\n\t\t\tif(num >= 2){\n\t\t\t\tif(i == s.length() - 1){\n\t\t\t\t\ttemp =s.substring(j,i+1);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\ttemp =s.substring(j,i);\n\t\t\t\t}\n\t\t\t\tbiWords.add(temp);\n\t\t\t\t//System.out.println(\"temp:\"+temp);\n\t\t\t}\n\t\t}\n\t}", "public static List<String> getNWords(String text, int n) {\n\t\treturn splitNChar(text, ' ', n);\n\t}", "public static Vector<String> getTokenizeDoc(String[] words) {\n\t\t// 0th position is where all the labels are so we need to look from 1\n\t\t// create a arrayList to keep all the words\n\t\tVector<String> wordList = new Vector<String>();\n\t\tfor(int i = 1; i< words.length; i++){\n\t\t\twords[i] = words[i].replaceAll(\"\\\\W\",\"\");\n\t\t\tif(words[i].length() > 0)wordList.add(words[i]);\n\t\t}\n\t\treturn wordList;\n\t}", "public static ArrayList<String> getTerms(String comment){\n\n\t\tString[] terms = comment.split(\"[^a-zA-Z]+\");\n\t\t//if(terms.length == 0) System.out.println(\"error: \" + comment);\n\t\tArrayList<String> termsarray = new ArrayList<String>();\n\t\tfor(int i=0;i<terms.length;i++){\n\t\t\t\n\t\t\tString iterm = terms[i].toLowerCase();\n\t\t\tboolean isStopWord = false;\n\t\t\tfor(String s : stopWord){\n\t\t\t\tif(iterm.equals(s)){\n\t\t\t\t\tisStopWord = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(isStopWord == true)\n\t\t\t\tcontinue;\n\t\t\t\n\t\t\tStemmer stemmer = new Stemmer();\n\t\t\tstemmer.add(iterm.toCharArray(), iterm.length());\n\t\t\tstemmer.stem();\n\t\t\titerm = stemmer.toString();\n\t\t\t\n\t\t\t//System.out.println(iterm);\n\t\t\tif(iterm.length() >=2 && !termsarray.contains(iterm))termsarray.add(iterm);\n\t\t}\n\t\n\t\treturn termsarray;\n\t}", "public static List<TaggedWord> getFlatTaggedWordListString(String str) {\n\t\treturn getFlatTaggedWordListReader(new StringReader(str));\n\t}", "public void splitString() {\n\t\t\tString sentence = \"I am studying\";\n\t\t\tString[] strings = sentence.split(\" \");\n\t\t\tSystem.out.println(\"Length is \" + strings.length);\n\n\n\t\t\tfor (int index = 0; index < strings.length; index++)\n\t\t\t\tSystem.out.println(strings[index]);\n\t\t}", "public void parseWord(String line){\r\n String[] tokens = line.split(\"\\\\t|/|<|>|\\\\?|=%3C|%3E|=%3C|&=%3C|&|=| \");\r\n// for(String word: tokens){\r\n//\r\n// keys.add(word);\r\n// }\r\n int n = tokens.length-2;//to ignore the the word GET from the string.\r\n if(n>0){\r\n for(int i=1;i<n;i++){\r\n if(!tokens[i].equals(\"\")){\r\n this.keys.add(tokens[i]);\r\n }\r\n\r\n }\r\n }\r\n\r\n }", "public List<String> validWords(int input) throws Exception {\n List<String> validStrings = new ArrayList<>();\n getValidStrings(validStrings, \"\", Integer.toString(input));\n return validStrings;\n }", "public static final String[] toLowerCaseWordArray(String text) {\r\n StringTokenizer tokens = new StringTokenizer(text, \" ,\\r\\n.:/\\\\+\");\r\n String[] words = new String[tokens.countTokens()];\r\n for (int i = 0; i < words.length; i++) {\r\n words[i] = tokens.nextToken().toLowerCase();\r\n }\r\n return words;\r\n }", "public ArrayList<String> determineSearchedWords(String userCommand) {\n\t\tif (userCommand == null || userCommand.equals(\"\")) {\n\t\t\tlogger.log(Level.WARNING, Global.MESSAGE_ILLEGAL_ARGUMENTS);\n\t\t\treturn null;\n\t\t}\n\n\t\tString userCommandWithoutCommandType = removeCommandType(userCommand);\n\n\t\tArrayList<String> searchedWords = new ArrayList<String>();\n\t\tPattern pattern = Pattern.compile(\"[^\\\\s\\\"']+|\\\"([^\\\"]*)\\\"\");\n\t\tMatcher matcher = pattern.matcher(userCommandWithoutCommandType);\n\n\t\twhile (matcher.find()) {\n\t\t\tif (matcher.group(1) != null) {\n\t\t\t\tsearchedWords.add(matcher.group(1)); // Phrase in double quotes\n\t\t\t} else {\n\t\t\t\tsearchedWords.add(matcher.group()); // Single word\n\t\t\t}\n\t\t}\n\t\treturn searchedWords;\n\t}", "public String getWord()\n\t{\n\t\treturn word.get(matcher());\n\t}", "public static List<List<TaggedWord>> getTaggedWordListString(String str) {\n\t\treturn getTaggedWordListReader(new StringReader(str));\n\t}", "public List<String> wordBreak(String s, List<String> wordDict){\n\t\tList<String> res = new LinkedList<>();\n\t\tif(wordDict == null || wordDict.size() == 0){\n\t\t\treturn res;\n\t\t}\n\t\tbacktracking(res, s, wordDict, new StringBuilder(), 0);\n\t\treturn res;\n\t}", "private static List<String> getCandidates(String w, Set<String> words) {\n List<String> result = new LinkedList<>();\n for (int i = 0; i < w.length(); i++) {\n char[] chars = w.toCharArray();\n for (char ch = 'A'; ch <= 'Z'; ch++) {\n chars[i] = ch;\n String candidate = new String(chars);\n if (words.contains(candidate)) {\n result.add(candidate);\n }\n }\n }\n return result;\n }", "public static void main(String[] args) {\n String s = \"catsanddog\";\n Set<String> dict = new HashSet<>();\n dict.add(\"cat\"); dict.add(\"cats\"); dict.add(\"and\"); dict.add(\"sand\"); dict.add(\"dog\");\n WordBreak solution = new WordBreak();\n List<String> result = solution.wordBreak(s, dict);\n System.out.println(result);\n }", "public ArrayList<String> getWords() {\n return new ArrayList<>(words);\n }", "private int numEnglishWords(String str) {\n int numWords = 0;\n String[] strings = str.split(\" \");\n for (String word : strings) {\n if (english.contains(word)) {\n numWords ++;\n }\n }\n return numWords;\n }", "public ArrayList<String> getWords() {\n return words;\n }", "public static Set<String> getUniqueWords(String input) {\r\n HashSet<String> hSet = new HashSet<String>();\r\n ArrayList<String> words = getWords(input);\r\n for(String word: words) {\r\n if(!hSet.contains(word)) {\r\n hSet.add(word);\r\n }\r\n }\r\n return hSet;\r\n }", "private ArrayList<String> matchingWords(String word){\n\t\tArrayList<String> list = new ArrayList<String>();\n\t\tfor(int i=0; i<words.size();i++){\n\t\t\tif(oneCharOff(word,words.get(i))){\n\t\t\t\tlist.add(words.get(i));\n\t\t\t}\n\t\t}\n\t\treturn list;\n\t}", "public Set<String> getWords() {\n return wordMap.keySet();\n }", "private static List<String> getSensorWords(SensorDetails details){\r\n\t\tvar sensorLoc = details.location;\r\n\t\tvar fullstopIndex1 = sensorLoc.indexOf(\".\");\r\n\t\tvar fullstopIndex2 = sensorLoc.lastIndexOf(\".\");\r\n\t\tvar strLength = sensorLoc.length();\r\n\t\tvar firstWord = sensorLoc.substring(0, fullstopIndex1);\r\n\t\tvar secondWord = sensorLoc.substring(fullstopIndex1 + 1, fullstopIndex2);\r\n\t\tvar thirdWord = sensorLoc.substring(fullstopIndex2 + 1, strLength);\r\n\t\tvar wordsList = List.of(firstWord, secondWord, thirdWord);\r\n\t\treturn wordsList;\r\n\t}", "public static List<String> getCamelCaseWords(String content) {\n List<String> camelCaseList = new ArrayList<>();\n// for (String word : content.split(\" \")) {\n// if(word.matches(\"[aA-zZ]([A-Z0-9]*[a-z][a-z0-9]*[A-Z]|[a-z0-9]*[A-Z][A-Z0-9]*[a-z])[A-Za-z0-9]*\")){\n// camelCaseList.add(word);\n// }\n// }\n Pattern regex = Pattern.compile(\"[aA-zZ]([A-Z0-9]*[a-z][a-z0-9]*[A-Z]|[a-z0-9]*[A-Z][A-Z0-9]*[a-z])[A-Za-z0-9]*\");\n Matcher regexMatcher = regex.matcher(content);\n while (regexMatcher.find()) {\n camelCaseList.add(regexMatcher.group());\n }\n return camelCaseList;\n }", "public static int countWords(String str) {\r\n return str.split(\" \").length;\r\n }", "public Collection<String> signatureToWords(String sig);", "public ArrayList<String> FindAllCombinationWord(String str) {\r\n\r\n ArrayList<String> wordList = new ArrayList<String>();\r\n\r\n int n = str.length();\r\n ArrayList<String> combinationWord = permute(str, 0, n - 1);\r\n\r\n for (String item : combinationWord) {\r\n int j = 0;\r\n for (int i = n; i >= 2; i--) {\r\n String finalString = item.substring(j);\r\n\r\n if (!wordList.contains(finalString)) {\r\n wordList.add(finalString);\r\n }\r\n j++;\r\n }\r\n }\r\n return wordList;\r\n }", "public void countWords(String source) {\n Scanner wordScanner = new Scanner(source);\n// wordScanner.useDelimiter(\"[^A-Za-z]+\");\n wordScanner.useDelimiter(\"(?!')[^A-Za-z]+\");\n addWordToMap(wordScanner);\n }", "public static ArrayList<String> parseFeatureLine(String line){\n\t\tArrayList<String> words = new ArrayList<String>();\n\t\t\n\t\tStringTokenizer tokenizer = new StringTokenizer(line);\n\t\t\n\t\twhile( tokenizer.hasMoreTokens() ){\n\t\t\tString word = tokenizer.nextToken();\n\t\t\t\n\t\t\tif( !word.matches(\"[^a-z]+\") ){\n\t\t\t\twords.add(word);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn words;\n\t}", "public static int countWords(String str){\n int count=0; \n \n char ch[]= new char[str.length()]; \n for(int i=0;i<str.length();i++) \n { \n ch[i]= str.charAt(i); \n if( ((i>0)&&(ch[i]!=' ')&&(ch[i-1]==' ')) || ((ch[0]!=' ')&&(i==0)) ) \n count++; \n } \n return count; \n\n\t}", "public Map<String, Integer> wordCount(String string) {\n\t\tMap<String, Integer> map = new HashMap<String, Integer>();\n\t\tString[] p = string.split(\"[\\\\W\\\\s]\");\n\t\tfor (String s : p) {\n\t\t\tif (!s.equals(\"\")) {\n\t\t\t\tif (map == null || !map.containsKey(s))\n\t\t\t\t\tmap.put(s, 1);\n\t\t\t\telse\n\t\t\t\t\tmap.replace(s, map.get(s) + 1);\n\t\t\t}\n\t\t}\n\t\treturn map;\n\t}", "public static String[] tokenizeWords(String line) {\n\n String[] lineTokens = new String[0];\n if (!line.equals(\"\") && !line.equals(\" \")) {\n lineTokens = line.split(\":| :|: | : \");\n }\n return lineTokens;\n }", "public List<String> splitWordList(final String text) {\n\t\tList<String> result = new ArrayList<>();\n\t\tif (text == null)\n\t\t\treturn result;\n\n\t\tString t = text + \"⁋\";\n\t\tt = t.replace('\\n', '⁋');\n\t\tt = REFERENCE_PATTERN.matcher(t).replaceAll(\"\");\n\t\tt = SUPERSCRIPT_PATTERN.matcher(t).replaceAll(\"\"); //TODO: Extract sense!\n\t\tt = HTML_REMOVER.matcher(t).replaceAll(\"\");\n\t\tt = t.replace(\"&quot;\", \"\\\"\");\n\t\tt = t.replace(\",\", \"⁋,\");\n\t\tt = t.replace(\";\", \"⁋;\");\n\t\t//System.out.println(t);\n\t\t//t = BRACKETED_DELIMITER.matcher(t).replaceAll(\"$1$2$3$4$5$6\");\n\t\t//t = ESCAPE_DELIMITER1.matcher(t).replaceAll(\"$1$2\");\n\t\t//t = ESCAPE_DELIMITER2.matcher(t).replaceAll(\"$1$2\");\n\t\t//t = ESCAPE_DELIMITER3.matcher(t).replaceAll(\"$1$2\");\n\t\tt = escapeDelimiters(t);\t\t\t\n\t\t//System.out.println(t);\n\t\tt = t.replace(\"⁋;\", \"⁋\");\n\t\tt = t.replace(\"⁋,\", \"⁋\");\n\t\tt = t.replace(\"]] or [[\", \"]]⁋[[\");\n\t\tt = t.replace(\"]] and [[\", \"]]⁋[[\");\n\t\tt = t.replace(\" - \", \"⁋\");\n\t\t//t = t.replace(\" / \", \"⁋\");\n\t\tint j = t.indexOf(\" / \"); // Use ' / ' only as a delimiter if there are at least two of them!\n\t\tif (j >= 0) {\n\t\t\tj = t.indexOf(\" / \", j);\n\t\t\tif (j >= 0) {\n\t\t\t\tt = t.replace(\" / \", \"⁋\");\n\t\t\t\t//System.out.println(t);\n\t\t\t}\n\t\t}\n\t\t//System.out.println(t);\n\t\tint delim;\n\t\tdo {\n\t\t\tdelim = t.indexOf('⁋');\n\t\t\tif (delim >= 0) {\n\t\t\t\tString word = t.substring(0, delim);\n\t\t\t\tif (word.length() > 0) {\n\t\t\t\t\t// Normalize the word.\n\t\t\t\t\tword = word.trim();\n\t\t\t\t\tif (word.toLowerCase().startsWith(\"see also\"))\n\t\t\t\t\t\tword = word.substring(8).trim();\n\t\t\t\t\tif (word.toLowerCase().startsWith(\"see\"))\n\t\t\t\t\t\tword = word.substring(3).trim();\n\t\t\t\t\tif (word.startsWith(\":\"))\n\t\t\t\t\t\tword = word.substring(1).trim();\n\t\t\t\t\tword = deWikify(word).trim();\n\t\t\t\t\tword = removeBrackets(word).trim();\n\t\t\t\t\tword = removeTemplates(word).trim();\n\t\t\t\t\tword = removeComments(word).trim();\n\t\t\t\t\tif (word.toLowerCase().startsWith(\"see also\"))\n\t\t\t\t\t\tword = word.substring(8).trim();\n\t\t\t\t\tif (word.toLowerCase().startsWith(\"see\"))\n\t\t\t\t\t\tword = word.substring(3).trim();\n\t\t\t\t\tif (word.startsWith(\":\"))\n\t\t\t\t\t\tword = word.substring(1).trim();\n\t\t\t\t\tif (word.endsWith(\".\"))\n\t\t\t\t\t\tword = word.substring(0, word.length() - 1).trim();\n\t\t\t\t\tif (word.endsWith(\",\"))\n\t\t\t\t\t\tword = word.substring(0, word.length() - 1).trim();\n\t\t\t\t\t\n\t\t\t\t\t// Check for slashes.\n\t\t\t\t\tword = word.replace(\" / \", \"/\");\n\t\t\t\t\tword = word.replace(\"/ \", \"/\");\n\t\t\t\t\tint i = word.indexOf('/');\n\t\t\t\t\tif (word.length() > 0) {\n\t\t\t\t\t\tif (i >= 0 && word.indexOf(' ') < 0) {\n\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\tresult.add(word.substring(0, i));\n\t\t\t\t\t\t\t\tword = word.substring(i + 1);\n\t\t\t\t\t\t\t\ti = word.indexOf('/');\n\t\t\t\t\t\t\t} while (i >= 0);\n\t\t\t\t\t\t\tresult.add(word);\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t\tresult.add(word);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tt = t.substring(delim + 1);\n\t\t\t}\n\t\t} while (delim >= 0);\n\t\treturn result;\n\t}", "public Collection<String> words() {\n Collection<String> words = new ArrayList<String>();\n TreeSet<Integer> keyset = new TreeSet<Integer>();\n keyset.addAll(countToWord.keySet());\n for (Integer count : keyset) {\n words.addAll(this.countToWord.get(count));\n }\n return words;\n }", "public boolean wordBreak(String s, List<String> wordDict) {\n boolean[] dp = new boolean[s.length()]; \n for (int i = 0; i <s.length(); i++) {\n if (wordDict.contains(s.substring(0, i+1))) {\n dp[i] = true;\n continue;\n }\n for (int k = 0; k < i; k++) {\n if (dp[k] && wordDict.contains(s.substring(k+1, i+1))) {\n dp[i] = true;\n System.out.println(i + \" \" +dp[i]);\n break;\n }\n }\n \n }\n return dp[s.length()-1];\n }", "public String getKeyword(String word) {\n\t\tboolean foundPunct = false;\n String returnStr = \"\";\n for(int inc = 0; inc < word.length(); inc++) {\n char testChar = word.charAt(inc);\n if(Character.isLetter(testChar) == true) {\n if(foundPunct == true) {return null;}\n else{returnStr = returnStr + Character.toString(testChar).toLowerCase();}}\n else {foundPunct = true;}}\n if(noiseWords.contains(returnStr) == true) {\n return null;}\n if(returnStr == \"\") {\n return null;}\n return returnStr;\n\t}", "public static List<String> tokenize(final String str) {\n\tfinal LinkedList<String> list = new LinkedList<String>();\n\tfinal StringTokenizer tokenizer = new StringTokenizer(str, ALL_DELIMS, true);\n\n\twhile (tokenizer.hasMoreTokens()) {\n\t final String token = tokenizer.nextToken();\n\t // don't add spaces\n\t if (!token.equals(\" \")) {\n\t\tlist.add(token);\n\t }\n\t}\n\n\treturn list;\n }", "List<String> tokenize1(String doc) {\n List<String> res = new ArrayList<String>();\n\n for (String s : doc.split(\"[\\\\p{Punct}\\\\s]+\"))\n res.add(s);\n return res;\n }", "SList evenWords();", "public String function(HashSet<String> Dictionary, String inputString) {\n\n int[] step = new int[inputString.length() + 1];\n\n step[0] = 0;\n\n for (int i = 1; i <= inputString.length(); i++)\n {\n step[i] = -1;\n\n for ( int j = 0 ; j < i ; j++ )\n {\n if ( Dictionary.contains( inputString.substring(j, i) ) && step[j] != -1 )\n {\n step[i] = j;\n break;\n }\n }\n }\n\n // if text can not be made from the whole inputString, return an empty string\n if (step[inputString.length()] == -1)\n return \"\";\n\n // Moving backwards from the end, the words contain words in the reverse order\n ArrayList<String> words = new ArrayList<String>();\n\n for (int x = inputString.length(); x > 0; x = step[x])\n words.add(inputString.substring(step[x], x));\n\n // Create a string using a StringBuilder that contains words in the normal order\n StringBuilder sb = new StringBuilder();\n\n for (int i = words.size()-1; i >= 0; i--)\n sb.append( i > 0 ? words.get(i) + \" \" : words.get(i) );\n\n return sb.toString();\n }", "public List<Word> getWordsWithGivenLetter(Text text, char ch) {\n\n List<Word> allWords = getTextWords(text.getBookText());\n\n List<Word> words = new ArrayList<Word>();\n\n for (int i = 0; i < allWords.size(); i++) {\n Word tempWord = new Word(allWords.get(i).getCharsSequence());\n if (logic.isWordContainChar(tempWord, ch)) {\n if (!words.contains(tempWord)) {\n words.add(tempWord);\n }\n }\n }\n\n Collections.sort(words, new WordGivenCharComparator(ch));\n\n return words;\n }", "public static List<Integer> findWordConcatenation(String str, String[] words) {\n List<Integer> resultIndices = new ArrayList<Integer>();\n if (str == null || str.isEmpty() || words == null || words.length == 0)\n return resultIndices;\n\n int len = words[0].length();\n Map<String, Integer> freqMap = new HashMap();\n\n for (String word : words)\n freqMap.put(word, freqMap.getOrDefault(word, 0) + 1);\n\n Map<String, Integer> curMap = new HashMap();\n int l = 0, cc = 0;\n int i = 0;\n while (i < str.length() - len + 1) {\n String cur = str.substring(i, i + len);\n if (!freqMap.containsKey(cur)) {\n curMap.clear();\n ++i; l = i;\n continue;\n }\n\n curMap.put(cur, curMap.getOrDefault(cur, 0) + 1);\n if (curMap.get(cur) == freqMap.get(cur))\n cc++;\n\n while(curMap.get(cur) > freqMap.get(cur)) {\n String word1 = str.substring(l, l + len);\n curMap.put(word1, curMap.get(word1) - 1);\n if (curMap.get(word1) < freqMap.get(word1))\n --cc;\n l+=len;\n }\n\n if (cc == freqMap.size())\n resultIndices.add(l);\n i+=len;\n }\n return resultIndices;\n }", "private String[] splitLetters(String word) {\n String[] temp = new String[word.length()];\n for (int i = 0; i < word.length(); i++) {\n temp[i] = Character.toString(word.charAt(i)).toUpperCase();\n }\n return temp;\n }", "String stemOf (String word);", "public static void printWords(String str) {\n\t\tfor(int i = 0; i < str.length(); i++) {\n\t\t\t\n\t\t\tif(Character.isLetter(str.charAt(i)) || Character.isDigit(str.charAt(i))) {\n\t\t\t\tSystem.out.print(str.charAt(i));\n\t\t\t\tif(i != str.length() - 1 && !Character.isLetter(str.charAt(i+1)) && !Character.isDigit(str.charAt(i+1)))\n\t\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t}\n\t}", "@RequestMapping(\"/{words}\")\n\tpublic List<WordMatch> match(@PathVariable(\"words\") String words) {\n\t\tList<WordMatch> matches = new ArrayList<>();\n\t\tfor (String text : words.split(\",\")) {\n\t\t\tmatches.add(service.getMatch(text));\n\t\t}\n\t\treturn matches;\n\t}", "public static String getWord(String sentence, char word) {\n\t\tString[] words;\n\t\twords = sentence.split(\" \");\n\t\tString cleanedWord=\"\";\n\t\t\n\t\tif(word=='f') {//return the first word\n\t\t\tString temp = words[0];\n\t\t\t\n\t\t\tfor(int i=0; i < temp.length(); i++) {\n\t\t\t\tif(Character.isLetter(temp.charAt(i))) {\n\t\t\t\t\tcleanedWord+= Character.toString(temp.charAt(i));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}else {//return the last word\n\t\t\tString temp = words[words.length -1];\n\t\t\t\n\t\t\tfor(int i=0; i < temp.length(); i++) {\n\t\t\t\tif(Character.isLetter(temp.charAt(i))) {\n\t\t\t\t\tcleanedWord+= Character.toString(temp.charAt(i));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\treturn cleanedWord;\n\t}", "public String get_all_words_and_definitions(){\n\t\tString found_words = \"\";\n\t\t//We try to find the word within our childs\n\t\tfor(LexiNode child: childs){\n\t\t\t\tfound_words += child.get_all_words_and_definitions();\n\t\t}\n\t\tif(current_word != null && !found_words.equals(\"\"))\n\t\t\treturn current_word +\" & \" + definition + \"\\n\" + found_words ;\n\t\telse if(current_word != null && found_words.equals(\"\"))\n\t\t\treturn current_word +\" & \" + definition + \"\\n\";\n\t\telse //current_word == null && found_words != null\n\t\t\treturn found_words;\n\t}", "private String[] split(String string){\n\t\tString[] split = string.split( \" \" );\n\t\t\n\t\tfor(int i = 0; i < split.length; i++){\n\t\t\tString index = split[i];\n\t\t\tindex = index.trim();\n\t\t}\n\t\t\n\t\treturn split;\n\t}", "public String spinWords(String sentence) {\n List<String> wordList = new ArrayList<>();\n String word = \"\";\n for (String s : sentence.split(\" \")) {\n word = s.length() > 4 ? new StringBuilder(s).reverse().toString() : s;\n wordList.add(word);\n }\n return String.join(\" \", wordList);\n }", "public static String getWords(String fileName){\n\t\tString result = null;\n\t\ttry {\n\t\t\tFileInputStream fin = new FileInputStream(fileName);\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(fin));\n\t\t\t\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tString line = br.readLine();\n\t\t\t\n\t\t\twhile(line != null){\n\t\t\t\tsb.append(line);\n\t\t\t\tline = br.readLine();\n\t\t\t}\n\t\t\tbr.close();\n\t\t\tresult = Utils.removeStopWords(sb.toString());\n\t\t\treturn result;\n\t\t} \n\t\tcatch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn result;\n\t\t}\n\t}", "public static String[] prepareInput(String input) {\n\t\tArrayList<String> als = separatePhrases( input );\n\t\tif( foundQuitWord( als ) )\n\t\t{\n\t\t\t//System.out.println( \"Found\" );\n\t\t\treturn null;\n\t\t}\n\t\tString respondTo = selectPhrase( als );\n\t\tif( respondTo == null )\n\t\t{\n\t\t\t//System.out.println( \"rNull\" );\n\t\t\treturn null;\n\t\t}\n\t\tString result = swapWords( respondTo , Config.INPUT_WORD_MAP );\n\t\tif( result == null )\n\t\t{\n\t\t\t//System.out.println( \"sNull\" );\n\t\t\treturn null;\n\t\t}\n\t\telse\n\t\t\treturn result.split(\" \");\n\t}", "private String processWord(String word){\r\n\t\tString lword = word.toLowerCase();\r\n\t\tfor (int i = 0;i<word.length();++i){\r\n\t\t\tstemmer.add(lword.charAt(i));\r\n\t\t}\r\n\t\tstemmer.stem();\r\n\t\treturn stemmer.toString();\r\n\t}", "List<String> tokenize2(String doc) {\n String stemmed = StanfordLemmatizer.stemText(doc);\n List<String> res = new ArrayList<String>();\n\n for (String s : stemmed.split(\"[\\\\p{Punct}\\\\s]+\"))\n res.add(s);\n return res;\n }" ]
[ "0.7576453", "0.75644654", "0.7274428", "0.7202487", "0.7194655", "0.70780814", "0.68960273", "0.6818066", "0.6715524", "0.6570648", "0.654159", "0.65377295", "0.6504272", "0.6489182", "0.64617896", "0.6458131", "0.63064295", "0.6283226", "0.62300086", "0.62128794", "0.6039463", "0.6016123", "0.6002115", "0.5995599", "0.59675163", "0.596164", "0.59554225", "0.59322786", "0.592794", "0.59053737", "0.5900702", "0.587339", "0.5846376", "0.58369094", "0.5830461", "0.58231527", "0.58155847", "0.58021075", "0.5802053", "0.58008903", "0.57800776", "0.57736987", "0.5757459", "0.57545346", "0.5749854", "0.5740856", "0.5738835", "0.57338625", "0.57279843", "0.572674", "0.57172453", "0.5701715", "0.56986266", "0.569444", "0.56907576", "0.56905955", "0.5685967", "0.5680698", "0.5678938", "0.5670754", "0.56641424", "0.5660952", "0.5644827", "0.5629131", "0.56068903", "0.56037873", "0.5600389", "0.5599757", "0.5597357", "0.5574362", "0.5569439", "0.55689305", "0.55685025", "0.5566158", "0.5553954", "0.5537422", "0.5530229", "0.55290693", "0.5528745", "0.55279624", "0.5520054", "0.55132204", "0.55129474", "0.5511166", "0.55100614", "0.55072504", "0.5505134", "0.54985327", "0.5495317", "0.5494624", "0.54909897", "0.548046", "0.5476177", "0.5468482", "0.5468277", "0.5464878", "0.54577947", "0.54571104", "0.54521686", "0.54503816" ]
0.6866122
7
Create a parser with the right properties (needed for Google search)
public static Parser getParser(String url) { try { java.net.URLConnection conn = (new java.net.URL(url)).openConnection(); conn.setRequestProperty("User-Agent", "Mozilla"); Parser p = new Parser(conn); return p; } catch (Exception e) { logger.error(e.getMessage(), e); } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Parse createParse();", "public PropertyParser()\n\t{\n\t\tthis(System.getProperties());\n\t}", "public Parser() {\n\t\tpopulateMaps();\n\t}", "private Parser () { }", "public PropertyParser(Properties props)\n\t{\n\t\t_props = props;\n\t}", "public Parser() {}", "private TraceParser genParser() throws ParseException {\n TraceParser parser = new TraceParser();\n parser.addRegex(\"^(?<VTIME>)(?<TYPE>)$\");\n parser.addPartitionsSeparator(\"^--$\");\n return parser;\n }", "private void parseProperties()\n {\n List children = rootElement.getChildren(\"property\");\n\n for (Object aChildren : children)\n {\n Element child = (Element) aChildren;\n Property property = new Property(child, properties, this);\n }\n }", "CParser getParser();", "public PropertiesPlus(String properties)\n\t{\n\t\tsuper();\n\t\tdateFormatGMT.setTimeZone(TimeZone.getTimeZone(\"GMT\"));\n\t\tdateFormatGMT_MS.setTimeZone(TimeZone.getTimeZone(\"GMT\"));\n\t\tif (properties.startsWith(\"<properties>\"))\n\t\t\tparseXML(properties);\n\t\telse\n\t\t\tparseString(properties);\n\t}", "abstract protected Parser createSACParser();", "public JsonParser createParser(String content)\n/* */ throws IOException, JsonParseException\n/* */ {\n/* 879 */ int strLen = content.length();\n/* */ \n/* 881 */ if ((this._inputDecorator != null) || (strLen > 32768) || (!canUseCharArrays()))\n/* */ {\n/* */ \n/* 884 */ return createParser(new StringReader(content));\n/* */ }\n/* 886 */ IOContext ctxt = _createContext(content, true);\n/* 887 */ char[] buf = ctxt.allocTokenBuffer(strLen);\n/* 888 */ content.getChars(0, strLen, buf, 0);\n/* 889 */ return _createParser(buf, 0, strLen, ctxt, true);\n/* */ }", "public ParseOptions() {}", "public OnionooParser() {\n\n\t}", "public JsonParser createParser(char[] content)\n/* */ throws IOException\n/* */ {\n/* 899 */ return createParser(content, 0, content.length);\n/* */ }", "private Parser makeParser(String input) throws LexicalException {\r\n\t\tshow(input); //Display the input \r\n\t\tScanner scanner = new Scanner(input).scan(); //Create a Scanner and initialize it\r\n\t\tshow(scanner); //Display the Scanner\r\n\t\tParser parser = new Parser(scanner);\r\n\t\treturn parser;\r\n\t}", "public JsonParser createParser(char[] content, int offset, int len)\n/* */ throws IOException\n/* */ {\n/* 908 */ if (this._inputDecorator != null) {\n/* 909 */ return createParser(new CharArrayReader(content, offset, len));\n/* */ }\n/* 911 */ return _createParser(content, offset, len, _createContext(content, true), false);\n/* */ }", "private PLPParser makeParser(String input) throws LexicalException {\n\t\t\tshow(input); //Display the input \n\t\t\tPLPScanner scanner = new PLPScanner(input).scan(); //Create a Scanner and initialize it\n\t\t\tshow(scanner); //Display the Scanner\n\t\t\tPLPParser parser = new PLPParser(scanner);\n\t\t\treturn parser;\n\t\t}", "public ParserProperties getParserProperties() {\n\t\treturn properties.getParser() != null ? properties.getParser() : new ParserProperties();\n\t}", "public abstract ArgumentParser makeParser();", "@Before public void initParser() {\n\t\tparser = new CliParserImpl(\"-\", \"--\");\n\t}", "public void setProperties(String properties) throws ParseException {\n\t\tthis.m_corniInterpreter.clear();\n\t\tthis.m_corniInterpreter.parseProperties(properties);\n\t\t\n\t\tthis.m_attributes = m_corniInterpreter.getAttributes();\n\t\tthis.m_tagNames = m_corniInterpreter.getTagNames();\n\t}", "private static void loadParser() {\n if(parser_ == null)\n parser_ = ConfigIOFactory.getInstance(\"json\");\n }", "public StringParser getStringParser();", "Object create(InputSource is) throws IOException, SAXException, ParserConfigurationException;", "@Before\n public void buildParser() throws Exception {\n parser = new com.putable.siteriter.msmith19.SDLParserImpl();\n }", "public JsonParser createParser(InputStream in)\n/* */ throws IOException, JsonParseException\n/* */ {\n/* 809 */ IOContext ctxt = _createContext(in, false);\n/* 810 */ return _createParser(_decorate(in, ctxt), ctxt);\n/* */ }", "public MyAnnotator(String name, Properties props){\r\n sch = props.getProperty(\"Search.string\",\"the\"); //gets search string if specified, else defaults to \"the\"\r\n }", "public parser(Scanner s) {super(s);}", "void setParser(CParser parser);", "public OptionParser() {\n\n\t}", "public SmartScriptParser(String text) {\n lexer = new SmartScriptLexer(text);\n documentNode = new DocumentNode();\n stack = new ObjectStack();\n parse();\n\n}", "public JsonParser createParser(Reader r)\n/* */ throws IOException, JsonParseException\n/* */ {\n/* 829 */ IOContext ctxt = _createContext(r, false);\n/* 830 */ return _createParser(_decorate(r, ctxt), ctxt);\n/* */ }", "public parser(java_cup.runtime.Scanner s) {super(s);}", "public parser(java_cup.runtime.Scanner s) {super(s);}", "public parser(java_cup.runtime.Scanner s) {super(s);}", "public parser(java_cup.runtime.Scanner s) {super(s);}", "public parser(java_cup.runtime.Scanner s) {super(s);}", "public parser(java_cup.runtime.Scanner s) {super(s);}", "public parser(java_cup.runtime.Scanner s) {super(s);}", "public parser(java_cup.runtime.Scanner s) {super(s);}", "public JsonParser createParser(DataInput in)\n/* */ throws IOException\n/* */ {\n/* 920 */ IOContext ctxt = _createContext(in, false);\n/* 921 */ return _createParser(_decorate(in, ctxt), ctxt);\n/* */ }", "public JsonParser createParser(File f)\n/* */ throws IOException, JsonParseException\n/* */ {\n/* 755 */ IOContext ctxt = _createContext(f, true);\n/* 756 */ InputStream in = new FileInputStream(f);\n/* 757 */ return _createParser(_decorate(in, ctxt), ctxt);\n/* */ }", "public JsonParser createParser(URL url)\n/* */ throws IOException, JsonParseException\n/* */ {\n/* 782 */ IOContext ctxt = _createContext(url, true);\n/* 783 */ InputStream in = _optimizedStreamFromURL(url);\n/* 784 */ return _createParser(_decorate(in, ctxt), ctxt);\n/* */ }", "public void parse() {\n }", "void parse();", "protected JsonParser _createParser(Reader r, IOContext ctxt)\n/* */ throws IOException\n/* */ {\n/* 1288 */ return new ReaderBasedJsonParser(ctxt, this._parserFeatures, r, this._objectCodec, this._rootCharSymbols.makeChild(this._factoryFeatures));\n/* */ }", "public Parser()\n {\n //nothing to do\n }", "public void initParser() {;\r\n lp = DependencyParser.loadFromModelFile(\"edu/stanford/nlp/models/parser/nndep/english_SD.gz\");\r\n tokenizerFactory = PTBTokenizer\r\n .factory(new CoreLabelTokenFactory(), \"\");\r\n }", "@Override\n public ViolationsParser createParser() {\n return new JsLintParser();\n }", "private ColourRuleSet parse(List<String> properties)\n\t{\n\t\t@SuppressWarnings(\"unused\")\n\t\tString ruleSetName = \"\";\n\t\t\n\t\tColourRuleSet ruleSet = new ColourRuleSet(properties.size());\n\t\t\n\t\tif(!expect(\"colourset\"))\n\t\t\treturn null;\n\t\t\n\t\tSymbol symbol = scanner.getSymbol();\n\t\t\n\t\tif(symbol.type == Symbol.Type.STRING)\n\t\t{\n\t\t\truleSetName = symbol.text;\n\t\t}\n\t\telse\n\t\t{\n\t\t\terror(\"Expected a name for the ruleset\");\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tif(!expect(\"{\"))\n\t\t\treturn null;\n\t\t\n\t\twhile(scanner.isValid()) \n\t\t{\n\t\t\tsymbol = scanner.peakSymbol();\n\t\t\tif(!symbol.text.equals(\"property\"))\n\t\t\t\tbreak;\n\t\t\t\n\t\t\treadColourRule(ruleSet, properties);\n\t\t}\n\n\t\texpect(\"}\");\n\t\t\n\t\treturn ruleSet;\n\t}", "public PropertiesDocument(Document testRunArgs) throws ParserConfigurationException {\n\t\tthis.documentBuilderFactory = DocumentBuilderFactory.newInstance();\n this.documentBuilder = documentBuilderFactory.newDocumentBuilder();\n\t\tthis.document = this.documentBuilder.newDocument();\n\t\tthis.properties = documentToProperties(testRunArgs);\n\t}", "public StringParser() {\n this(ParserOptions.DEFAULT);\n }", "@Test\n public void test() throws ParseException {\n String test1 = \"klasse Test{ voeruit() { getal number is 1; } }\";\n parse(test1, \"program\");\n }", "public static JavaParser getParser(final CharStream stream) {\n final JavaLexer lexer = new JavaLexer(stream);\n final CommonTokenStream in = new CommonTokenStream(lexer);\n return new JavaParser(in);\n }", "protected ASTParser createASTParser() {\n ASTParser parser = ASTParser.newParser(this.testLevel);\n return parser;\n }", "public CrossrefUnixrefSaxParser() {\n }", "public PjxParser()\r\n {\r\n LOG.info(this + \" instantiated\");\r\n }", "public PropertiesDocument() {\n\t\tthis.documentBuilderFactory = DocumentBuilderFactory.newInstance();\n try {\n\t\t\tthis.documentBuilder = documentBuilderFactory.newDocumentBuilder();\n\t\t} catch (ParserConfigurationException e) {\n\t\t\t// Exception with default configuration\n\t\t\te.printStackTrace();\n\t\t}\n this.properties = new Properties();\n\t}", "private Parser() {\n objetos = new ListaEnlazada();\n }", "@Test\n public void testCreateFromProperties_String() throws Exception {\n System.out.println(\"createFromProperties\");\n \n EngineConfiguration result = EngineConfiguration.createFromProperties(propertiesName);\n assertProperties(result);\n }", "public Parser(java_cup.runtime.Scanner s) {super(s);}", "public Parser(java_cup.runtime.Scanner s) {super(s);}", "public Parser(java_cup.runtime.Scanner s) {super(s);}", "public Parser(java_cup.runtime.Scanner s) {super(s);}", "public Parser(java_cup.runtime.Scanner s) {super(s);}", "public Parser(java_cup.runtime.Scanner s) {super(s);}", "private GraphParser(){ \n\t}", "public RepositoryParser() {\n pageElementsMap = new HashMap<String, Map<String, PageElement>>();\n }", "public interface ValidParserRules {\n String getName();\n String getPrefix();\n PropertyType getType();\n ValidParserRules getParent();\n}", "@Deprecated\n/* */ public JsonParser createJsonParser(String content)\n/* */ throws IOException, JsonParseException\n/* */ {\n/* 1057 */ return createParser(content);\n/* */ }", "public SimpleHtmlParser createNewParserFromHereToText(String text) throws ParseException {\n return new SimpleHtmlParser(getStringToTextAndSkip(text));\n }", "DataFormDefinitionParser() {\n super();\n }", "public void parseString(String properties)\n\t{\n\t\tString[] entries = properties.split((\"\"+'\\f'));\n\t\tint i;\n\t\tfor (String entry : entries)\n\t\t{\n\t\t\ti = entry.indexOf('=');\n\t\t\tif (i > 0)\n\t\t\t\tsetProperty(entry.substring(0, i).trim(), entry.substring(i+1));\n\t\t}\n\t}", "private UserParser() {\n }", "public void setParseFields() {\n setParseRating();\n setParsePrice();\n setParsePhone();\n setParseRestaurantId();\n setParseAlias();\n setParseIsClosed();\n setParseReviewCount();\n setParseName();\n setParseUrl();\n setParseImageUrl();\n setParseDistance();\n setParseAddress();\n setParseCuisine();\n setParseTransactions();\n }", "public PropositionalParser() {\n\t\t\tfinal Sentence trueSentence = super.parse(Logic.TRUE);\n\t\t\tthis.exprToSentence = new HashMap<>();\n\t\t\tthis.exprToSentence.put(Logic.TRUE, trueSentence);\n\t\t\tthis.exprToSentence.put(\"\", trueSentence);\n\t\t}", "private void parseConfig() {\n try {\n synonymAnalyzers = new HashMap<>();\n\n Object xmlSynonymAnalyzers = args.get(\"synonymAnalyzers\");\n\n if (xmlSynonymAnalyzers != null && xmlSynonymAnalyzers instanceof NamedList) {\n NamedList<?> synonymAnalyzersList = (NamedList<?>) xmlSynonymAnalyzers;\n for (Entry<String, ?> entry : synonymAnalyzersList) {\n String analyzerName = entry.getKey();\n if (!(entry.getValue() instanceof NamedList)) {\n continue;\n }\n NamedList<?> analyzerAsNamedList = (NamedList<?>) entry.getValue();\n\n TokenizerFactory tokenizerFactory = null;\n TokenFilterFactory filterFactory;\n List<TokenFilterFactory> filterFactories = new LinkedList<>();\n\n for (Entry<String, ?> analyzerEntry : analyzerAsNamedList) {\n String key = analyzerEntry.getKey();\n if (!(entry.getValue() instanceof NamedList)) {\n continue;\n }\n Map<String, String> params = convertNamedListToMap((NamedList<?>)analyzerEntry.getValue());\n\n String className = params.get(\"class\");\n if (className == null) {\n continue;\n }\n\n params.put(\"luceneMatchVersion\", luceneMatchVersion.toString());\n\n if (key.equals(\"tokenizer\")) {\n try {\n tokenizerFactory = TokenizerFactory.forName(className, params);\n } catch (IllegalArgumentException iae) {\n if (!className.contains(\".\")) {\n iae.printStackTrace();\n }\n // Now try by classname instead of SPI keyword\n tokenizerFactory = loader.newInstance(className, TokenizerFactory.class, new String[]{}, new Class[] { Map.class }, new Object[] { params });\n }\n if (tokenizerFactory instanceof ResourceLoaderAware) {\n ((ResourceLoaderAware)tokenizerFactory).inform(loader);\n }\n } else if (key.equals(\"filter\")) {\n try {\n filterFactory = TokenFilterFactory.forName(className, params);\n } catch (IllegalArgumentException iae) {\n if (!className.contains(\".\")) {\n iae.printStackTrace();\n }\n // Now try by classname instead of SPI keyword\n filterFactory = loader.newInstance(className, TokenFilterFactory.class, new String[]{}, new Class[] { Map.class }, new Object[] { params });\n }\n if (filterFactory instanceof ResourceLoaderAware) {\n ((ResourceLoaderAware)filterFactory).inform(loader);\n }\n filterFactories.add(filterFactory);\n }\n }\n if (tokenizerFactory == null) {\n throw new SolrException(ErrorCode.SERVER_ERROR,\n \"tokenizer must not be null for synonym analyzer: \" + analyzerName);\n } else if (filterFactories.isEmpty()) {\n throw new SolrException(ErrorCode.SERVER_ERROR,\n \"filter factories must be defined for synonym analyzer: \" + analyzerName);\n }\n\n TokenizerChain analyzer = new TokenizerChain(tokenizerFactory,\n filterFactories.toArray(new TokenFilterFactory[filterFactories.size()]));\n\n synonymAnalyzers.put(analyzerName, analyzer);\n }\n }\n } catch (IOException e) {\n throw new SolrException(ErrorCode.SERVER_ERROR, \"Failed to create parser. Check your config.\", e);\n }\n }", "public CanonicalTreeParser() {\n \t\t// Nothing necessary.\n \t}", "protected void parse() throws ParseException {\n String s;\n try {\n s=getFullText();\n } catch (IOException ioe) {\n if (ioe instanceof FileNotFoundException) {\n throw new DataNotFoundException (\"Could not find log file.\", ioe);\n } else {\n throw new ParseException (\"Error getting log file text.\", new File (getFileName()));\n }\n }\n StringTokenizer sk = new StringTokenizer(s);\n ArrayList switches = new ArrayList(10);\n while (sk.hasMoreElements()) {\n String el =sk.nextToken().trim();\n if (el.startsWith(\"-J\")) {\n if (!(el.equals(\"-J-verbose:gc\"))) {\n if (!(el.startsWith(\"-J-D\"))) {\n JavaLineswitch curr = new JavaLineswitch(el.substring(2));\n addElement (curr); \n }\n }\n }\n }\n }", "public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public BasicParser(BasicParserTokenManager tm) {\n\t token_source = tm;\n\t token = new Token();\n\t jj_ntk = -1;\n\t jj_gen = 0;\n\t for (int i = 0; i < 13; i++) jj_la1[i] = -1;\n }", "public ModemPMParser()\n\t{\n\t\tsuper();\n\t}", "private void init(){\r\n\t\t// already checked that this is a valid file and reader\r\n\t\ttokenizer = new StreamTokenizer(reader);\r\n\t\ttokenizer.slashSlashComments(true);\r\n\t\ttokenizer.slashStarComments(true);\r\n\t\ttokenizer.wordChars('_', '_');\r\n\t\ttokenizer.wordChars('.', '.');\r\n\t\ttokenizer.ordinaryChar('/');\r\n\t\ttokenizer.ordinaryChar('-');\r\n\t\tfillKeywords();\r\n\t\t//tokenChoose = new TokenChooser();\r\n\t}", "public void init() {\r\n\t\ttry {\r\n\t\t\tSAXParserFactory factory = SAXParserFactory.newInstance();\r\n\t\t\t//factory.setValidating(true);\r\n\t\t\t//factory.setFeature(\r\n\t\t\t//\t\t\"http://apache.org/xml/features/validation/schema\", true);\r\n\t\t\tfactory.setNamespaceAware(true);\r\n\t\t\t_parser = factory.newSAXParser();\r\n\t\t} catch (Exception e) {\r\n\t\t\tlog.error(e.getMessage());\r\n\t\t\te.printStackTrace();\r\n\t\t\tLoggerUtilsServlet.logErrors(e);\r\n\t\t}\r\n\t}", "public parser(Scanner s, SymbolFactory sf) {super(s,sf);}", "void initBeforeParsing() {\r\n }", "public EPPSchemaCachingParser() {\n\t\ttry {\n\t\t\tinit();\n\t\t}\n\t\t catch (EPPParserException e) {\n\t\t\tcat.error(\"Couldn't instantiate parser instance\", e);\n\t\t}\n\t}", "public QueryParser(java.io.InputStream stream, String encoding) {\n try { jj_input_stream = new JavaCharStream(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }\n token_source = new QueryParserTokenManager(jj_input_stream);\n token = new Token();\n jj_ntk = -1;\n jj_gen = 0;\n for (int i = 0; i < 117; i++) jj_la1[i] = -1;\n for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();\n }", "public StringParseable getParser(String input) {\n\t\treturn new XMLStringParser(input);\n\t}", "private static Properties processCommandLineProperties(String[] args)\n {\n Properties props = new Properties();\n\n for (String arg : args) {\n if (!arg.startsWith(\"-\")) {\n continue;\n }\n String definition = arg.substring(1);\n int definitionEquals = definition.indexOf('=');\n if (definitionEquals < 0)\n continue;\n String propName = definition.substring(0, definitionEquals); \n String propValue = definition.substring(definitionEquals+1);\n if (!propName.equals(\"\") && !propValue.equals(\"\"))\n props.put(propName, propValue);\n }\n return props;\n }", "public void setupParser(InputStream is) {\r\n inputSource = new InputSource(is);\r\n }", "Object create(String uri) throws IOException, SAXException, ParserConfigurationException;" ]
[ "0.6778426", "0.66801584", "0.6255432", "0.619206", "0.6161975", "0.6066308", "0.6030597", "0.6030072", "0.60114294", "0.5959791", "0.5924954", "0.59217477", "0.58244234", "0.5758834", "0.57482076", "0.57248193", "0.5690822", "0.5678193", "0.5646395", "0.56434655", "0.5639272", "0.5578718", "0.55726606", "0.557073", "0.554057", "0.55342805", "0.5533309", "0.55218345", "0.54833645", "0.5453928", "0.54525965", "0.544188", "0.5431487", "0.5423045", "0.5423045", "0.5423045", "0.5423045", "0.5423045", "0.5423045", "0.5423045", "0.5423045", "0.54218143", "0.541547", "0.5396946", "0.5394528", "0.5382217", "0.5378784", "0.5364582", "0.5353156", "0.53313726", "0.5318783", "0.53150797", "0.53079623", "0.5305816", "0.5288764", "0.5287753", "0.52830625", "0.5276471", "0.52751046", "0.52604026", "0.5231186", "0.52258813", "0.52258813", "0.52258813", "0.52258813", "0.52258813", "0.52258813", "0.522518", "0.5223715", "0.5204885", "0.5201492", "0.520049", "0.5188833", "0.51840615", "0.5166973", "0.5147532", "0.5145349", "0.5129367", "0.5126658", "0.51262707", "0.51241976", "0.51241976", "0.51241976", "0.51241976", "0.51241976", "0.51241976", "0.51241976", "0.51241976", "0.51241976", "0.51217735", "0.5111665", "0.51103413", "0.5108115", "0.510167", "0.50876635", "0.5084399", "0.5083634", "0.50821", "0.5075147", "0.50703543", "0.50676674" ]
0.0
-1
Stem a string (of words) and return a string of valid english words
public static String stemvString(String raws) { String os = ""; for (String w : raws.split("\\s+")) { os = os + dictUtils.getStemWord(w) + " "; } return os; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String stemOf (String word);", "public static String stem(String word){\n Stemmer s = new Stemmer();\n s.add(word.toCharArray(), word.length());\n s.stem();\n return s.toString();\n }", "private String processWord(String word){\r\n\t\tString lword = word.toLowerCase();\r\n\t\tfor (int i = 0;i<word.length();++i){\r\n\t\t\tstemmer.add(lword.charAt(i));\r\n\t\t}\r\n\t\tstemmer.stem();\r\n\t\treturn stemmer.toString();\r\n\t}", "protected String stem(String term) {\r\n\t\tStemmer stemmer = new Stemmer();\r\n\t\tfor(char a : term.toCharArray()){\r\n\t\t\tstemmer.add(a);\r\n\t\t}\r\n\t\tstemmer.stem();\r\n\t\treturn stemmer.toString();\r\n\t}", "public static String stemWord(String word) {\n if (word.matches(\".*\\\\s.*\")) throw \n new IllegalArgumentException(\"argument is not a single word: \" + word); \n EnglishStemmer stemmer = new EnglishStemmer();\n stemmer.setCurrent(word);\n stemmer.stem();\n return stemmer.getCurrent();\n // slow way of doing it with jcas\n// List<TokenCanonic> c = getCanonicForms(word, CanonicForm.STEM);\n// return c.get(0).canonic;\n }", "public String stem(String str) {\n\n if (str.length() <= 2) {\n return str;\n }\n String stemmed = super.stem(str);\n while (!stemmed.equals(str)) {\n str = stemmed;\n stemmed = super.stem(stemmed);\n }\n return stemmed;\n }", "public String Stem( String word )\n {\n // check if we already know the word\n String stemmedword = AllWords.get(word);\n if ( stemmedword != null )\n return stemmedword; // return it if we already know it\n\n // don't check words with digits in them\n // if ( containsNumbers (word) == true )\n // stemmedword = null;\n // else\t// unknown word: try to stem it\n stemmedword = StemWordWithWordNet (word);\n\n if ( stemmedword != null )\n {\n // word was recognized and stemmed with wordnet:\n // add it to hashmap and return the stemmed word\n AllWords.put( word, stemmedword );\n return stemmedword;\n }\n // word could not be stemmed by wordnet,\n // thus it is no correct english word\n // just add it to the list of known words so\n // we won't have to look it up again\n AllWords.put( word, word );\n return word;\n }", "private static String analyzeTerm(String term) {\n String ret = term.toLowerCase();\n if (stopWords.contains(ret) || ret.isEmpty())\n return \"\";\n return stemmer.stem(ret);\n }", "public List<Stem> stem(String word) {\n return stem(word.toCharArray(), word.length());\n }", "public String normalize(String word);", "public static String stemWordPorter(String word) {\n Stemmer st = new Stemmer();\n st.add(word.toCharArray(), word.length());\n st.stem();\n return st.toString();\n }", "public static String preprocessStemAndTokenize(String data) {\n\n\t\tSet<String> transformedSet = new HashSet<String>(); //Set will make sure only unique terms are kept\n\t\tStringBuilder strBuilder = new StringBuilder();\n\t\tTokenizer analyzer = new Tokenizer(Version.LUCENE_30);\n\t\tTokenStream tokenStream = analyzer.tokenStream(\"\", new StringReader(data));\n\t\tTermAttribute termAttribute;\n\t\tString term;\n\t\t//System.out.println(\"The value of data in tokenizeAndStem: \"+ data);\n\t\ttry {\n\t\t\twhile (tokenStream.incrementToken()) {\n\t\t\t\ttermAttribute = tokenStream.getAttribute(TermAttribute.class);\n\t\t\t\tterm = termAttribute.term(); \n\t\t\t\tif (stopwords.contains(term)){ //ignore stopwords\n\t\t\t\t\t//System.out.println(\"Contains stopword: \"+ term);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (digitPattern.matcher(term).find()) //ignore digits\n\t\t\t\t\tcontinue;\n\t\t\t\tif(term.length() <= 1) //ignore 1 letter words\n\t\t\t\t\tcontinue;\n\t\t\t\t\n\t\t\t\tif (!digitPattern.matcher(term).find()){ //ignore digits\n\t\t\t\t\tstemmer.setCurrent(term);\n\t\t\t\t\tstemmer.stem();\n\t\t\t\t\ttransformedSet.add(stemmer.getCurrent());\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t//System.out.println(\"transormed set size in tokenizeAndStem: \"+ transformedSet.size());\n\t\tfor(Object token: transformedSet.toArray()){\n\t\t\tstrBuilder.append(token).append(\" \");\n\t\t}\n\t\t//System.out.println(\"String returned in tokenizeAndStem:\"+ strBuilder.toString());\n\t\treturn strBuilder.toString();\n\t}", "public String stem(String input) {\n String output = \"\";\n // create an empty Annotation just with the given text\n document = new Annotation(input);\n // run all Annotators on this text\n pipeline.annotate(document);\n // traverse words in the document\n for (CoreLabel token : document.get(CoreAnnotations.TokensAnnotation.class)) {\n output = output + token.lemma() + \" \";\n }\n\n return output.trim();\n }", "default String getStem() {\n return meta(\"nlpcraft:nlp:stem\");\n }", "@Override\r\n public String stem(String word) {\r\n List<String> lemmas = new LinkedList<String>();\r\n // Create an empty Annotation just with the given text\r\n Annotation document = new Annotation(word);\r\n // run all Annotators on this text\r\n this.pipeline.annotate(document);\r\n // Iterate over all of the sentences found\r\n List<CoreMap> sentences = document.get(CoreAnnotations.SentencesAnnotation.class);\r\n for (CoreMap sentence : sentences) {\r\n // Iterate over all tokens in a sentence\r\n for (CoreLabel token : sentence.get(CoreAnnotations.TokensAnnotation.class)) {\r\n // Retrieve and add the lemma for each word into the\r\n // list of lemmas\r\n lemmas.add(token.get(CoreAnnotations.LemmaAnnotation.class));\r\n }\r\n }\r\n return lemmas.get(0);\r\n\r\n }", "public abstract boolean isStopWord(String term);", "public static String stemNSW(String word)\n\t{\n\t\treturn isNSW(getRoot(word.toLowerCase()));\n\t}", "public boolean isStopWord(String word);", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"nam(s) of edit(s), typ as indic in th latic book. if ther is als an author field, then th edit field giv th edit of th bok or cllect in which th refer appear.\");\n assertEquals(\"nam(s) of edit(s), typ as ind in th lat book. if ther is al an author field, then th edit field giv th edit of th bok or cllect in which th refer appear.\", string0);\n }", "@Test(timeout = 4000)\n public void test57() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"us for alphabes, cros refer, and creat a label when th ``author'' inform is mis. th field should not be confus with th key that appear in th cit command and at th begin of th databas entr.\");\n assertEquals(\"us for alphab, cro refer, and creat a label when th ``author'' inform is mi. th field should not be confus with th key that appear in th cit command and at th begin of th datab entr.\", string0);\n }", "private String stemmingForAWord(String identifiedWord) {\n String word;\n if (identifiedWord.contains(\"_\")) {\n word = identifiedWord;\n } else {\n word = morphology.stem(identifiedWord);\n }\n return word;\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"20l}V*vRPT!yP9\");\n assertEquals(\"20l}v*vrb!yp9\", string0);\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"w(FZNn>R/Iv6?tO\");\n assertEquals(\"w(fzn>r/iv6?to\", string0);\n }", "@Test(timeout = 4000)\n public void test31() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"The edition of a book---for example, ``Second''. This should be an ordinal, and should have the first letter capitalized, as shown here; the standard styles convert to lower case when necessary.\");\n assertEquals(\"th edit of a book---for exampl, ``second''. th should be an ordin, and should hav th first letter capital, as shown hes; th standard styl convers to lower cas when neces.\", string0);\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"sort arra (doubl): uad\");\n assertEquals(\"sort ar (doubl): uas\", string0);\n }", "public List<Stem> stem(char word[], int length) {\n List<Stem> stems = new ArrayList<Stem>();\n if (dictionary.lookupWord(word, 0, length) != null) {\n stems.add(new Stem(word, length));\n }\n stems.addAll(stem(word, length, null, 0));\n return stems;\n }", "private String getStemming(String line) throws IOException {\n\t\treturn line;\n\t\t// return Stemmer.processTweets(line);\n\t}", "boolean isWord(String potentialWord);", "@Override\n\tpublic String getStemming(String phrase) {\n\t\treturn null;\n\t}", "public static String preprocessStemAndTokenizeAddBigramsInString(String data) {\n\t\t//System.out.println(\"Preprocess data, remove stop words, stem, tokenize and get bi-grams ..\");\n\n\t\tSet<String> transformedSet = new LinkedHashSet<String>();\n\t\tList<String> stemmedList = new ArrayList<String>();\n\n\t\tTokenizer analyzer = new Tokenizer(Version.LUCENE_30);\n\t\tTokenStream tokenStream = analyzer.tokenStream(\"\", new StringReader(data));\n\t\tTermAttribute termAttribute;\n\t\tString term;\n\t\ttry {\n\t\t\twhile (tokenStream.incrementToken()) {\n\t\t\t\ttermAttribute = tokenStream.getAttribute(TermAttribute.class);\n\t\t\t\tterm = termAttribute.term();\n\t\t\t\tif (digitPattern.matcher(term).find()) //ignore digits\n\t\t\t\t\tcontinue;\n\t\t\t\tif (stopwords.contains(term)) //ignore stopwords\n\t\t\t\t\tcontinue;\n\t\t\t\tif (term.length() <= 1) //ignore stopwords\n\t\t\t\t\tcontinue;\n\t\t\t\tstemmer.setCurrent(term);\n\t\t\t\tstemmer.stem();\n\t\t\t\tstemmedList.add(stemmer.getCurrent());\n\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tString[] ds = stemmedList.toArray(new String[0]);\n\n\t\t/*for(int i=0; i<stemmedList.size(); i++)\n\t\t\tSystem.out.print(ds[i]+\"\\t\");*/\n\n\t\t//add bi-grams\n\t\tfinal int size = 2;\n\t\tfor (int i = 0; i < ds.length; i++) {\n\t\t\ttransformedSet.add(ds[i]); //add single words\n\t\t\tif (i + size <= ds.length) {\n\t\t\t\tString t = \"\";\n\t\t\t\tfor (int j = i; j < i + size; j++) {\n\t\t\t\t\tt += \" \" + ds[j];\n\t\t\t\t}\n\t\t\t\tt = t.trim().replaceAll(\"\\\\s+\", \"_\");\n\t\t\t\ttransformedSet.add(t); //add bi-gram combined with \"_\"\n\t\t\t}\n\t\t}\n\t\t//System.out.println(transformedSet.toArray(new String[transformedSet.size()]).toString());\n\t\treturn StringUtils.join( transformedSet.toArray(new String[transformedSet.size()]), \" \");\n\t\t\n\t}", "private String removeStopWords(String str) throws IOException{\n String stopwords = \"!! ?! ?? !? ` `` '' -lrb- -rrb- -lsb- -rsb- , . : ; \\\" ' ? < > { } [ ] + - ( ) & % $ @ ! ^ # * .. ... 'll 's 'm a about above after again against all am an and any are aren't as at be because been before being below between both but by can can't cannot could couldn't did didn't do does doesn't doing don't down during each few for from further had hadn't has hasn't have haven't having he he'd he'll he's her here here's hers herself him himself his how how's i i'd i'll i'm i've if in into is isn't it it's its itself let's me more most mustn't my myself no nor not of off on once only or other ought our ours ourselves out over own same shan't she she'd she'll she's should shouldn't so some such than that that's the their theirs them themselves then there there's these they they'd they'll they're they've this those through to too under until up very was wasn't we we'd we'll we're we've were weren't what what's when when's where where's which while who who's whom why why's with won't would wouldn't you you'd you'll you're you've your yours yourself yourselves ### return arent cant couldnt didnt doesnt dont hadnt hasnt havent hes heres hows im isnt its lets mustnt shant shes shouldnt thats theres theyll theyre theyve wasnt were werent whats whens wheres whos whys wont wouldnt youd youll youre youve\";\n String[] allWords = str.toLowerCase().split(\" \");\n StringBuilder builder = new StringBuilder();\n for(String word : allWords) {\n if(!stopwords.contains(word)) {\n builder.append(word);\n builder.append(' ');\n } \n }\n String result = builder.toString().trim();\n return result;\n }", "public static String removeNonWord(String message)\r\n {\r\n int start = getLetterIndex(message, head); //get the fist index that contain English letter\r\n int end = getLetterIndex(message, tail); //get the last index that contain English letter\r\n if (start == end) // if only contain one letter\r\n return String.valueOf(message.charAt(start)); // return the letter\r\n return message.substring(start, end + 1); // return the content that contain English letter\r\n }", "@Test(timeout = 4000)\n public void test37() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stem(\"v<l<6c/XVopp\");\n assertEquals(\"v<l<6c/xvop\", string0);\n }", "public static void Stemmingmethod()throws Exception\n{\n char[] w = new char[501];\n Stemmer s = new Stemmer();\n String prcessedtxt=\"\";\n ArrayList<String> finalsen= new ArrayList();\n BufferedWriter writer = new BufferedWriter(new FileWriter(\"fullyprocessed.txt\"));\n\n String u=null;\n \n {\n FileInputStream in = new FileInputStream(\"stopwordsremoved.txt\");\n\n while(true)\n\n { int ch = in.read();\n if (Character.isLetter((char) ch))\n {\n int j = 0;\n while(true)\n { ch = Character.toLowerCase((char) ch);\n w[j] = (char) ch;\n if (j < 500) j++;\n ch = in.read();\n if (!Character.isLetter((char) ch))\n {\n \n s.add(w, j); \n\n s.stem();\n { \n\n u = s.toString();\n finalsen.add(u);\n /* to test getResultBuffer(), getResultLength() : */\n /* u = new String(s.getResultBuffer(), 0, s.getResultLength()); */\n\n System.out.print(u);\n }\n break;\n }\n }\n }\n if (ch < 0) break;\n System.out.print((char)ch);\n finalsen.add(\"\"+(char)ch);\n\n\n }\n }\n \n \n \n for(String word:finalsen){\n prcessedtxt=prcessedtxt+\"\"+ word;\n }\n writer.write(prcessedtxt+\"\\n\"); \n prcessedtxt=\"\";\n finalsen.clear();\n writer.close();\n\n\n \n}", "@Test(timeout = 4000)\n public void test47() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"th sponsor institut of a techn report.uas\");\n assertEquals(\"th spons institut of a techn report.ua\", string0);\n }", "@Test\n public void tweakingEnglishStopwordsAndStemming() throws IOException {\n\n LanguageComponents english = LanguageComponents.load(\"English\");\n\n // Pass-through of all suppliers to English defaults.\n LinkedHashMap<Class<?>, Supplier<?>> componentSuppliers = new LinkedHashMap<>();\n for (Class<?> clazz : english.components()) {\n componentSuppliers.put(clazz, () -> english.get(clazz));\n }\n\n // Now override the suppliers of Stemmer and LexicalData interfaces. These suppliers should be\n // thread-safe, but the instances of corresponding components will not be reused across threads.\n\n // Override the Stemmer supplier.\n componentSuppliers.put(\n Stemmer.class,\n (Supplier<Stemmer>) () -> (word) -> word.toString().toLowerCase(Locale.ROOT));\n\n // Override the default lexical data.\n LexicalData lexicalData =\n new LexicalData() {\n Set<String> ignored = new HashSet<>(Arrays.asList(\"from\", \"what\"));\n\n @Override\n public boolean ignoreLabel(CharSequence labelCandidate) {\n // Ignore any label that has a substring 'data' in it; example.\n return labelCandidate.toString().toLowerCase(Locale.ROOT).contains(\"data\");\n }\n\n @Override\n public boolean ignoreWord(CharSequence word) {\n return word.length() <= 3 || ignored.contains(word.toString());\n }\n };\n componentSuppliers.put(LexicalData.class, () -> lexicalData);\n\n // The custom set of language components can be reused for multiple clustering requests.\n LanguageComponents customLanguage =\n new LanguageComponents(\"English (customized)\", componentSuppliers);\n\n LingoClusteringAlgorithm algorithm = new LingoClusteringAlgorithm();\n algorithm.desiredClusterCount.set(10);\n List<Cluster<Document>> clusters =\n algorithm.cluster(ExamplesData.documentStream(), customLanguage);\n System.out.println(\"Clusters:\");\n ExamplesCommon.printClusters(clusters);\n }", "@Test(timeout = 4000)\n public void test45() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"th nam of a ser or ses of book. when cit an entir book, th th titl field giv it titl and an opt ser field giv th nam of a ser or mult-volum ses in which th book is publ.\");\n assertEquals(\"th nam of a ser or se of book. when cit an entir book, th th titl field giv it titl and an opt ser field giv th nam of a ser or mult-vol se in which th book is publ.\", string0);\n }", "@Test(timeout = 4000)\n public void test59() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"The year of publication or, for an unpublished work, the year it was written. Generally2it should consist of four numerals, such as 1984, although the standard styles can handle any year whose last four n\\npunctuation characters are numerals, such as `hbox{(about 1984)}'.\");\n assertEquals(\"th year of public or, for an unpubl work, th year it wa writ. generally2it should cons of four numer, such as 1984, although th standard styl can handl any year whos last four n\\npunctu character ar numer, such as `hbox{(about 1984)}'.\", string0);\n }", "@Test(timeout = 4000)\n public void test38() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"BnqiEV[^a>`-s`25}M\");\n assertEquals(\"bnqief[^a>`-s`25}m\", string0);\n }", "@Test(timeout = 4000)\n public void test50() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"usu th addres of th publishes or other typ of institut. for major publish hous, van leun recommens omis th inform entir. for smal publishes, on th other hand, you can help th reader by giv th comples addres.\");\n assertEquals(\"usu th addr of th publish or other typ of institut. for major publ hous, van leun recommen om th inform entir. for smal publish, on th other hand, you can help th reader by giv th compl addr.\", string0);\n }", "@Test(timeout = 4000)\n public void test39() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"Name(s) of editor(s), typed as indicated in the LaTeX book. If there is also an author field, then the editor field gives the editor of the bok or cllection in which the reference appears.\");\n assertEquals(\"nam(s) of edit(s), typ as indic in th latic book. if ther is als an author field, then th edit field giv th edit of th bok or cllect in which th refer appear.\", string0);\n }", "public String propergram(String word){\n // word.toLowerCase();\n String[] tempstr =word.split(\"_\");\n String tempstr2;\n\n for(int i=0;i<tempstr.length;i++){\n if((tempstr[i].charAt(0))>='A'&&(tempstr[i].charAt(0))<='Z') {\n tempstr2 = (String.valueOf(tempstr[i].charAt(0)));\n }\n else {\n tempstr2 = (String.valueOf(tempstr[i].charAt(0))).toUpperCase();\n }\n tempstr[i] = tempstr2.concat(tempstr[i].substring(1));\n if (i != 0) {\n word=word.concat(\" \").concat(tempstr[i]);\n } else {\n word = tempstr[i];\n }\n\n }\n return word;\n\n\n }", "public String StemWordWithWordNet ( String word )\n {\n if ( !IsInitialized )\n return word;\n if ( word == null ) return null;\n if ( morph == null ) morph = dic.getMorphologicalProcessor();\n\n IndexWord w;\n try\n {\n w = morph.lookupBaseForm( POS.VERB, word );\n if ( w != null )\n return w.getLemma().toString ();\n w = morph.lookupBaseForm( POS.NOUN, word );\n if ( w != null )\n return w.getLemma().toString();\n w = morph.lookupBaseForm( POS.ADJECTIVE, word );\n if ( w != null )\n return w.getLemma().toString();\n w = morph.lookupBaseForm( POS.ADVERB, word );\n if ( w != null )\n return w.getLemma().toString();\n }\n catch ( JWNLException e )\n {\n }\n return null;\n }", "@Test(timeout = 4000)\n public void test54() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"A>/4FbjX?&SbIQiyl\");\n assertEquals(\"a>/4fbjx?&sbiqiyl\", string0);\n }", "StemChange(String _old, String _new) {\n\t\tthis(_old, _new, TenseType.PRESENT, (Pronoun[]) null);\n\t}", "public String SnowballStemmingDemo(String token) {\n\t\tSnowballStemmer stemmer = new englishStemmer();\n\t\tstemmer.setCurrent(token);\n\t\tif (stemmer.stem())\n\t\t\treturn stemmer.getCurrent();\n\t\telse\n\t\t\treturn token;\n\t}", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"weka.core.stemmers.lovinsstemmeryt\");\n assertEquals(\"wek.cor.stemmer.lovinsstemmerys\", string0);\n }", "public static String getRoot(String word)\n\t{\n\t\treturn (new Stemmer()).stem(word);\n\t}", "@Test(timeout = 4000)\n public void test59() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"Name(s) of editor(s), typed as indicated in the LaTeX book. If there is also an author field, then the editor field gives the editor of the book or collection in which the reference appears.\");\n assertEquals(\"nam(s) of edit(s), typ as indic in th latic book. if ther is als an author field, then th edit field giv th edit of th book or collect in which th refer appear.\", string0);\n }", "@Test(timeout = 4000)\n public void test49() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"3flar`^lu\");\n assertEquals(\"3fl`^lu\", string0);\n }", "public List<Stem> uniqueStems(char word[], int length) {\n List<Stem> stems = new ArrayList<Stem>();\n CharArraySet terms = new CharArraySet(dictionary.getVersion(), 8, dictionary.isIgnoreCase());\n if (dictionary.lookupWord(word, 0, length) != null) {\n stems.add(new Stem(word, length));\n terms.add(word);\n }\n List<Stem> otherStems = stem(word, length, null, 0);\n for (Stem s : otherStems) {\n if (!terms.contains(s.stem)) {\n stems.add(s);\n terms.add(s.stem);\n }\n }\n return stems;\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"qmwkxz| 7%#co^gnspyldex\");\n assertEquals(\"qmwkxz| 7%#co^gnspyldic\", string0);\n }", "private static boolean isValidWord(String s) {\r\n\t\tString valid = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-'\";\r\n\t\tfor (int i = 0; i < s.length(); i++) {\r\n\t\t\tif (valid.indexOf(s.charAt(i)) < 0) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\r\n\t}", "@Test(timeout = 4000)\n public void test65() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"How somethig strange haseen published. Thefirst word should be capitalized.\");\n assertEquals(\"how somethig strang haseen publ. thefirst word should be capital.\", string0);\n }", "@Test(timeout = 4000)\n public void test40() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"usu th addres of th publishes or other typ of institut. for major publish hous, van leun recommens omis th inform entir. for smal publishes, on th other hand, you &an help th reader by giv th comples addres.\");\n assertEquals(\"usu th addr of th publish or other typ of institut. for major publ hous, van leun recommen om th inform entir. for smal publish, on th other hand, you &an help th reader by giv th compl addr.\", string0);\n }", "public static String reverseWordsAlt(String str){\r\n\t\t\r\n\t\tstr = reverse(str, 0,str.length()-1);\r\n\t\t\r\n\t\tint start=0;\r\n\t\tint end =0;\r\n\t\t\r\n\t\twhile(end < str.length()){\r\n\t\t\t\r\n\t\t\twhile(end<str.length() && str.charAt(end)!=' '){\r\n\t\t\t\tend++;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(start<end){\r\n\t\t\t\tstr=reverse(str,start,end-1);\r\n\t\t\t\tstart=end+1;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tend++;\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tstr = reverse(str,start,end-1);\r\n\t\t\r\n\t\treturn str;\r\n\t}", "@Test(timeout = 4000)\n public void test16() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"a stemmer bas on th lovin stemmer, describ hes:\\n\\njuli beth lovin (1968). developm of a stem algorithm. mechan transl and comput lingu. 11:22-31.ond\");\n assertEquals(\"a stemmer ba on th lovin stemmer, describ he:\\n\\njl beth lovin (1968). developm of a stem algorithm. mechan transl and comput lingu. 11:22-31.ons\", string0);\n }", "public static String longestWord(String sen) {\n if (sen == null) {\n return null;\n }\n String filtered = sen.replaceAll(\"[^a-zA-Z ]\", \"\");\n String[] words = filtered.split(\" \");\n String current = \"\";\n for (String word : words) {\n if (word.length() > current.length()) {\n current = word;\n }\n }\n return current;\n }", "@Test(timeout = 4000)\n public void test41() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"usually the address of the publisher or other type of institution. for major publishing houses, van leunen recommends omitting the information entirely. for small publishers, on the other hand, you &an help the reader by giving the complete address.\");\n assertEquals(\"usu th addres of th publishes or other typ of institut. for major publish hous, van leun recommens omis th inform entir. for smal publishes, on th other hand, you &an help th reader by giv th comples addres.\", string0);\n }", "@Test(timeout = 4000)\n public void test17() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"wisend\");\n assertEquals(\"wisens\", string0);\n }", "@Override\n public boolean isWord(String s) {\n // TODO: Implement this method\n char[] c = s.toLowerCase().toCharArray();\n TrieNode predptr = root;\n for (int i = 0, n = c.length; i < n; i++) {\n TrieNode next = predptr.getChild(c[i]);\n if (next != null) {\n predptr = next;\n } else {\n return false;\n }\n\n }\n return predptr.endsWord();\n }", "@Test(timeout = 4000)\n public void test51() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"us for alphabes, cros refer, and creat a label when th ``author'' inform is mis. th field should not be confus with th key that appear in th cit command and at th begin of th databas entr.\");\n assertEquals(\"us for alphab, cro refer, and creat a label when th ``author'' inform is mi. th field should not be confus with th key that appear in th cit command and at th begin of th datab entr.\", string0);\n }", "public static String preprocessStemAndTokenizeReturnDistinctTokens(String data) {\n\t\t//System.out.println(\"Preprocess data, remove stop words, stem, tokenize ..\");\n\t\tSet<String> transformedSet = new LinkedHashSet<String>();\n\t\tList<String> stemmedList = new ArrayList<String>();\n\n\t\tTokenizer analyzer = new Tokenizer(Version.LUCENE_30);\n\t\tTokenStream tokenStream = analyzer.tokenStream(\"\", new StringReader(data));\n\t\tTermAttribute termAttribute;\n\t\tString term;\n\t\ttry {\n\t\t\twhile (tokenStream.incrementToken()) {\n\t\t\t\ttermAttribute = tokenStream.getAttribute(TermAttribute.class);\n\t\t\t\tterm = termAttribute.term();\n\t\t\t\tif (digitPattern.matcher(term).find()) //ignore digits\n\t\t\t\t\tcontinue;\n\t\t\t\tif (stopwords.contains(term)) //ignore stopwords\n\t\t\t\t\tcontinue;\n\t\t\t\tif (term.length() <= 1) //ignore single letter words\n\t\t\t\t\tcontinue;\n\t\t\t\tstemmer.setCurrent(term);\n\t\t\t\tstemmer.stem();\n\t\t\t\tstemmedList.add(stemmer.getCurrent());\n\t\t\t}\n\t\t\ttransformedSet.addAll(stemmedList);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tstemmedList.clear();\n\t\tstemmedList = null;\n\t\t\n\t\treturn StringUtils.join(transformedSet.toArray(), \" \");\n\t}", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"end\");\n assertEquals(\"ens\", string0);\n }", "public static String stemSentNSW(String raw)\n\t{\n\t\tString os = \"\";\n\t\tfor (String w : raw.split(\"\\\\s+\"))\n\t\t{\n\t\t\tos = os + dictUtils.stemNSW(w) + \" \";\n\t\t}\n\t\treturn os;\n\t}", "@Test(timeout = 4000)\n public void test52() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"z*[1qTsB`EWYYSum,\");\n assertEquals(\"z*[1qtsb`ewyysum,\", string0);\n }", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stem(\"ations\");\n assertEquals(\"ation\", string0);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"end\");\n assertEquals(\"ens\", string0);\n }", "public char[] getStem() {\n return stem;\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"how something strange has been published. the first word should be capitalized.end\");\n assertEquals(\"how someth strang ha been publ. th first word should be capital.ens\", string0);\n }", "@Test(timeout = 4000)\n public void test48() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"The name of a series or set of books. When citing an entire book, the the title field gives its title and an optional series field gives the name of a series or multi-volume set in which the book is published.\");\n assertEquals(\"th nam of a ser or ses of book. when cit an entir book, th th titl field giv it titl and an opt ser field giv th nam of a ser or mult-volum ses in which th book is publ.\", string0);\n }", "static String refineWord(String currentWord) {\n\t\t// makes string builder of word\n\t\tStringBuilder builder = new StringBuilder(currentWord);\n\t\tStringBuilder newWord = new StringBuilder();\n\n\t\t// goes through; if it's not a letter, doesn't add to the new word\n\t\tfor (int i = 0; i < builder.length(); i++) {\n\t\t\tchar currentChar = builder.charAt(i);\n\t\t\tif (Character.isLetter(currentChar)) {\n\t\t\t\tnewWord.append(currentChar);\n\t\t\t}\n\t\t}\n\n\t\t// returns lower case\n\t\treturn newWord.toString().toLowerCase().trim();\n\t}", "private static String removeStopWords(String str) {\n for(int i=0; i<stopWords.size(); i++) {\n String temp = stopWords.get(i);\n if(temp.equalsIgnoreCase(str)) {\n str = \"\";\n }\n }\n return str;\n }", "@Test(timeout = 4000)\n public void test52() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"encing\");\n assertEquals(\"enc\", string0);\n }", "@Test(timeout = 4000)\n public void test39() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"fYa2LTt\");\n assertEquals(\"fya2lt\", string0);\n }", "public void setStem (Glyph stem)\r\n {\r\n this.stem = stem;\r\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"actuad\");\n assertEquals(\"actuas\", string0);\n }", "@Test(timeout = 4000)\n public void test07() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"isbnet\");\n assertEquals(\"isbnet\", string0);\n }", "@Test(timeout = 4000)\n public void test46() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"editor\");\n assertEquals(\"edit\", string0);\n }", "private List<Stem> stem(char word[], int length, char[] flags, int recursionDepth) {\n List<Stem> stems = new ArrayList<Stem>();\n\n for (int i = 0; i < length; i++) {\n List<HunspellAffix> suffixes = dictionary.lookupSuffix(word, i, length - i);\n if (suffixes == null) {\n continue;\n }\n\n for (HunspellAffix suffix : suffixes) {\n if (hasCrossCheckedFlag(suffix.getFlag(), flags)) {\n int deAffixedLength = length - suffix.getAppend().length();\n // TODO: can we do this in-place?\n String strippedWord = new StringBuilder().append(word, 0, deAffixedLength).append(suffix.getStrip()).toString();\n\n List<Stem> stemList = applyAffix(strippedWord.toCharArray(), strippedWord.length(), suffix, recursionDepth);\n for (Stem stem : stemList) {\n stem.addSuffix(suffix);\n }\n\n stems.addAll(stemList);\n }\n }\n }\n\n for (int i = length - 1; i >= 0; i--) {\n List<HunspellAffix> prefixes = dictionary.lookupPrefix(word, 0, i);\n if (prefixes == null) {\n continue;\n }\n\n for (HunspellAffix prefix : prefixes) {\n if (hasCrossCheckedFlag(prefix.getFlag(), flags)) {\n int deAffixedStart = prefix.getAppend().length();\n int deAffixedLength = length - deAffixedStart;\n\n String strippedWord = new StringBuilder().append(prefix.getStrip())\n .append(word, deAffixedStart, deAffixedLength)\n .toString();\n\n List<Stem> stemList = applyAffix(strippedWord.toCharArray(), strippedWord.length(), prefix, recursionDepth);\n for (Stem stem : stemList) {\n stem.addPrefix(prefix);\n }\n\n stems.addAll(stemList);\n }\n }\n }\n\n return stems;\n }", "List<String> tokenize2(String doc) {\n String stemmed = StanfordLemmatizer.stemText(doc);\n List<String> res = new ArrayList<String>();\n\n for (String s : stemmed.split(\"[\\\\p{Punct}\\\\s]+\"))\n res.add(s);\n return res;\n }", "@Override\r\n\t\t\tpublic boolean isStopWord(String term) {\n\t\t\t\treturn false;\r\n\t\t\t}", "public NormalSwear(String word) {\n this.word = word;\n }", "@Test(timeout = 4000)\n public void test63() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stem(\"5!r3t6i,keusix\");\n assertEquals(\"5!r3t6i,keusic\", string0);\n }", "java.lang.String getWord();", "List<String> tokenize0(String doc) {\r\n List<String> res = new ArrayList<String>();\r\n\r\n for (String s : doc.split(\"\\\\s+\")) {\r\n // implement stemming algorithm if ToStem == true\r\n if (ToStem == true) {\r\n Stemmer st = new Stemmer();\r\n st.add(s.toCharArray(), s.length());\r\n st.stem();\r\n s = st.toString();\r\n }\r\n res.add(s);\r\n }\r\n return res;\r\n }", "@Test(timeout = 4000)\n public void test37() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"volum\");\n assertEquals(\"vol\", string0);\n }", "@Test(timeout = 4000)\n public void test53() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"ation\");\n assertEquals(\"ation\", string0);\n }", "private static String Lemmatize(String strTemp) {\n Properties obj = new Properties();\n obj.setProperty(\"annotators\", \"tokenize, ssplit, pos, lemma\"); //setting the properties although using only for lemmatization purpose but one cannot\n // removed the tokenize ssplit pos arguments\n StanfordCoreNLP pipeObj = new StanfordCoreNLP(obj);\t\t//using stanFord library and creating its object\n Annotation annotationObj;\n annotationObj = new Annotation(strTemp); //creating annotation object and passing the string word\n pipeObj.annotate(annotationObj);\n String finalLemma = new Sentence(strTemp).lemma(0); //we only using the lemma of the passed string Word rest of the features like pos, ssplit, tokenized are ignored\n //although we can use it but tokenization has been done perviously\n //with my own code\n return finalLemma;\n }", "@Test(timeout = 4000)\n public void test47() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stem(\"`@uwvo}kn>e6AR\");\n assertEquals(\"`@uwvo}kn>e6ar\", string0);\n }", "@Test(timeout = 4000)\n public void test31() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"iully\");\n assertEquals(\"iul\", string0);\n }", "@Test(timeout = 4000)\n public void test58() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"WIUM}GNJh9zIONsBss\");\n assertEquals(\"wium}gnjh9zionsbs\", string0);\n }", "@Test(timeout = 4000)\n public void test46() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stem(\"ionals\");\n assertEquals(\"ion\", string0);\n }", "@Test(timeout = 4000)\n public void test05() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"M%PyZ}&zDiykxM@VJA\");\n assertEquals(\"m%pys}&zdiykxm@vj\", string0);\n }", "private static String updateSpelling(String text) {\n\t\tStringBuilder upSpell = new StringBuilder(32);\n\t\tchar ch = ' ';\n\t\t\n\t\tfor (int i = 0; i<text.length(); i++) {\n\t\t\tif(ch == ' ' && text.charAt(i) != ' ') {\n\t\t\t\tupSpell.append(Character.toUpperCase(text.charAt(i)));\n\t\t\t\t\n\t\t\t}else if(Character.isLetter(text.charAt(i))) {\n\t\t\t\tupSpell.append(Character.toLowerCase(text.charAt(i)));\n\t\t\t\t\n\t\t\t}\n\t\t\t// if anything other type of input is added besides letters.\n\t\t\telse {\n\t\t\t\tupSpell.append(text.charAt(i));\n\t\t\t}\n\t\t\t//This will keep track of previous characters inputed.\n\t\t\tch = text.charAt(i);\t\t\t\n\t\t\t\n\t\t}\n\t\treturn upSpell.toString(); \n\t\t\n\t}", "@Test\n\tpublic void revStrSentances() {\n\n\t\tString s = \"i like this program very much\";\n\t\tString[] words = s.split(\" \");\n\t\tString revStr = \"\";\n\t\tfor (int i = words.length - 1; i >= 0; i--) {\n\t\t\trevStr += words[i] + \" \";\n\n\t\t}\n\n\t\tSystem.out.println(revStr);\n\n\t}", "@Test(timeout = 4000)\n public void test06() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"mustyt\");\n assertEquals(\"mustys\", string0);\n }", "@Test(timeout = 4000)\n public void test31() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stem(\"istr\");\n assertEquals(\"ister\", string0);\n }", "@Test(timeout = 4000)\n public void test25() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"hpyrnpuad\");\n assertEquals(\"hpyrnpuas\", string0);\n }", "public String extractRelevantSentences(String paragraph, Collection<String> terms, boolean lemmatised, int maxSentenceLength) {\n String result = \"\";\n boolean checkSentenceLength = (maxSentenceLength != -1);\n\n // Create an empty Annotation just with the given text\n document = new Annotation(paragraph);\n // Run Annotators on this text\n pipeline.annotate(document);\n\n // Use map to track sentences so that a sentence is not returned twice\n sentences = new HashMap();\n int key = 0;\n for (CoreMap coreMap : document.get(CoreAnnotations.SentencesAnnotation.class)) {\n String string = coreMap.toString();\n if (checkSentenceLength)// if checking sentences, skip is sentence is long\n if (StringOps.getWordLength(string) > maxSentenceLength)\n continue;\n sentences.put(key, coreMap.toString());\n key++;\n }\n\n Set keySet = sentences.keySet();\n Set<Integer> returnedSet = new HashSet();\n Iterator keyIterator = keySet.iterator();\n // These are all the sentences in this document\n while (keyIterator.hasNext()) {\n int id = (int) keyIterator.next();\n String content = sentences.get(id);\n // This is the current sentence\n String thisSentence = content;\n // Select sentence if it contains any of the terms and is not already returned\n for (String t : terms) {\n if (!returnedSet.contains(id)) { // ensure sentence not already used\n String label = StringOps.stemSentence(t, true);\n if (StringUtils.contains(StringOps.stemSentence(thisSentence, false), label)\n || StringUtils.contains(StringOps.stemSentence(StringOps.stripAllParentheses(thisSentence), false), label)) { // lookup stemmed strings\n result = result + \" \" + thisSentence.trim(); // Concatenate new sentence\n returnedSet.add(id);\n }\n }\n }\n }\n\n if (lemmatised && null != result) {\n result = lemmatise(result);\n }\n\n return result;\n }" ]
[ "0.7561647", "0.7113259", "0.7065553", "0.6898249", "0.6838467", "0.68153393", "0.6782706", "0.6768339", "0.67209077", "0.6708201", "0.6692141", "0.66668594", "0.65237", "0.64206845", "0.6330336", "0.62061036", "0.6156872", "0.604378", "0.60360134", "0.60034376", "0.5968971", "0.5908784", "0.5889597", "0.5884283", "0.58767647", "0.58620274", "0.5844074", "0.58438647", "0.5834225", "0.5834178", "0.58137935", "0.57921475", "0.5761761", "0.57615143", "0.57601553", "0.57595706", "0.5747756", "0.572672", "0.57122433", "0.5700555", "0.5699657", "0.5697284", "0.5685278", "0.5684298", "0.567358", "0.56731397", "0.56615484", "0.56560254", "0.5654078", "0.5644817", "0.56412005", "0.56389445", "0.56363344", "0.5630391", "0.562924", "0.5627269", "0.5624686", "0.5624052", "0.5623943", "0.5617453", "0.56093925", "0.5607853", "0.5602016", "0.5601641", "0.56013143", "0.5591437", "0.55774677", "0.5574103", "0.5559477", "0.55569124", "0.5555781", "0.55520046", "0.55416787", "0.5539955", "0.55393267", "0.5537142", "0.55094546", "0.55031145", "0.54968196", "0.54918504", "0.5491434", "0.54901475", "0.54863185", "0.5477097", "0.54755855", "0.547539", "0.5466032", "0.5464913", "0.54635936", "0.5460954", "0.5451227", "0.5449128", "0.54483753", "0.5441288", "0.54306024", "0.54253006", "0.5425197", "0.5419217", "0.5417489", "0.5408774" ]
0.6062637
17
Stem a sentence removing stop words
public static String stemSentNSW(String raw) { String os = ""; for (String w : raw.split("\\s+")) { os = os + dictUtils.stemNSW(w) + " "; } return os; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String preprocessStemAndTokenize(String data) {\n\n\t\tSet<String> transformedSet = new HashSet<String>(); //Set will make sure only unique terms are kept\n\t\tStringBuilder strBuilder = new StringBuilder();\n\t\tTokenizer analyzer = new Tokenizer(Version.LUCENE_30);\n\t\tTokenStream tokenStream = analyzer.tokenStream(\"\", new StringReader(data));\n\t\tTermAttribute termAttribute;\n\t\tString term;\n\t\t//System.out.println(\"The value of data in tokenizeAndStem: \"+ data);\n\t\ttry {\n\t\t\twhile (tokenStream.incrementToken()) {\n\t\t\t\ttermAttribute = tokenStream.getAttribute(TermAttribute.class);\n\t\t\t\tterm = termAttribute.term(); \n\t\t\t\tif (stopwords.contains(term)){ //ignore stopwords\n\t\t\t\t\t//System.out.println(\"Contains stopword: \"+ term);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (digitPattern.matcher(term).find()) //ignore digits\n\t\t\t\t\tcontinue;\n\t\t\t\tif(term.length() <= 1) //ignore 1 letter words\n\t\t\t\t\tcontinue;\n\t\t\t\t\n\t\t\t\tif (!digitPattern.matcher(term).find()){ //ignore digits\n\t\t\t\t\tstemmer.setCurrent(term);\n\t\t\t\t\tstemmer.stem();\n\t\t\t\t\ttransformedSet.add(stemmer.getCurrent());\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t//System.out.println(\"transormed set size in tokenizeAndStem: \"+ transformedSet.size());\n\t\tfor(Object token: transformedSet.toArray()){\n\t\t\tstrBuilder.append(token).append(\" \");\n\t\t}\n\t\t//System.out.println(\"String returned in tokenizeAndStem:\"+ strBuilder.toString());\n\t\treturn strBuilder.toString();\n\t}", "String stemOf (String word);", "private static String analyzeTerm(String term) {\n String ret = term.toLowerCase();\n if (stopWords.contains(ret) || ret.isEmpty())\n return \"\";\n return stemmer.stem(ret);\n }", "public static String stem(String word){\n Stemmer s = new Stemmer();\n s.add(word.toCharArray(), word.length());\n s.stem();\n return s.toString();\n }", "protected String stem(String term) {\r\n\t\tStemmer stemmer = new Stemmer();\r\n\t\tfor(char a : term.toCharArray()){\r\n\t\t\tstemmer.add(a);\r\n\t\t}\r\n\t\tstemmer.stem();\r\n\t\treturn stemmer.toString();\r\n\t}", "public List<Stem> stem(String word) {\n return stem(word.toCharArray(), word.length());\n }", "public String stem(String input) {\n String output = \"\";\n // create an empty Annotation just with the given text\n document = new Annotation(input);\n // run all Annotators on this text\n pipeline.annotate(document);\n // traverse words in the document\n for (CoreLabel token : document.get(CoreAnnotations.TokensAnnotation.class)) {\n output = output + token.lemma() + \" \";\n }\n\n return output.trim();\n }", "private String processWord(String word){\r\n\t\tString lword = word.toLowerCase();\r\n\t\tfor (int i = 0;i<word.length();++i){\r\n\t\t\tstemmer.add(lword.charAt(i));\r\n\t\t}\r\n\t\tstemmer.stem();\r\n\t\treturn stemmer.toString();\r\n\t}", "public String stem(String str) {\n\n if (str.length() <= 2) {\n return str;\n }\n String stemmed = super.stem(str);\n while (!stemmed.equals(str)) {\n str = stemmed;\n stemmed = super.stem(stemmed);\n }\n return stemmed;\n }", "@Override\r\n public String stem(String word) {\r\n List<String> lemmas = new LinkedList<String>();\r\n // Create an empty Annotation just with the given text\r\n Annotation document = new Annotation(word);\r\n // run all Annotators on this text\r\n this.pipeline.annotate(document);\r\n // Iterate over all of the sentences found\r\n List<CoreMap> sentences = document.get(CoreAnnotations.SentencesAnnotation.class);\r\n for (CoreMap sentence : sentences) {\r\n // Iterate over all tokens in a sentence\r\n for (CoreLabel token : sentence.get(CoreAnnotations.TokensAnnotation.class)) {\r\n // Retrieve and add the lemma for each word into the\r\n // list of lemmas\r\n lemmas.add(token.get(CoreAnnotations.LemmaAnnotation.class));\r\n }\r\n }\r\n return lemmas.get(0);\r\n\r\n }", "public static void Stemmingmethod()throws Exception\n{\n char[] w = new char[501];\n Stemmer s = new Stemmer();\n String prcessedtxt=\"\";\n ArrayList<String> finalsen= new ArrayList();\n BufferedWriter writer = new BufferedWriter(new FileWriter(\"fullyprocessed.txt\"));\n\n String u=null;\n \n {\n FileInputStream in = new FileInputStream(\"stopwordsremoved.txt\");\n\n while(true)\n\n { int ch = in.read();\n if (Character.isLetter((char) ch))\n {\n int j = 0;\n while(true)\n { ch = Character.toLowerCase((char) ch);\n w[j] = (char) ch;\n if (j < 500) j++;\n ch = in.read();\n if (!Character.isLetter((char) ch))\n {\n \n s.add(w, j); \n\n s.stem();\n { \n\n u = s.toString();\n finalsen.add(u);\n /* to test getResultBuffer(), getResultLength() : */\n /* u = new String(s.getResultBuffer(), 0, s.getResultLength()); */\n\n System.out.print(u);\n }\n break;\n }\n }\n }\n if (ch < 0) break;\n System.out.print((char)ch);\n finalsen.add(\"\"+(char)ch);\n\n\n }\n }\n \n \n \n for(String word:finalsen){\n prcessedtxt=prcessedtxt+\"\"+ word;\n }\n writer.write(prcessedtxt+\"\\n\"); \n prcessedtxt=\"\";\n finalsen.clear();\n writer.close();\n\n\n \n}", "private String removeStopWords(String str) throws IOException{\n String stopwords = \"!! ?! ?? !? ` `` '' -lrb- -rrb- -lsb- -rsb- , . : ; \\\" ' ? < > { } [ ] + - ( ) & % $ @ ! ^ # * .. ... 'll 's 'm a about above after again against all am an and any are aren't as at be because been before being below between both but by can can't cannot could couldn't did didn't do does doesn't doing don't down during each few for from further had hadn't has hasn't have haven't having he he'd he'll he's her here here's hers herself him himself his how how's i i'd i'll i'm i've if in into is isn't it it's its itself let's me more most mustn't my myself no nor not of off on once only or other ought our ours ourselves out over own same shan't she she'd she'll she's should shouldn't so some such than that that's the their theirs them themselves then there there's these they they'd they'll they're they've this those through to too under until up very was wasn't we we'd we'll we're we've were weren't what what's when when's where where's which while who who's whom why why's with won't would wouldn't you you'd you'll you're you've your yours yourself yourselves ### return arent cant couldnt didnt doesnt dont hadnt hasnt havent hes heres hows im isnt its lets mustnt shant shes shouldnt thats theres theyll theyre theyve wasnt were werent whats whens wheres whos whys wont wouldnt youd youll youre youve\";\n String[] allWords = str.toLowerCase().split(\" \");\n StringBuilder builder = new StringBuilder();\n for(String word : allWords) {\n if(!stopwords.contains(word)) {\n builder.append(word);\n builder.append(' ');\n } \n }\n String result = builder.toString().trim();\n return result;\n }", "private static String removeStopWords(String str) {\n for(int i=0; i<stopWords.size(); i++) {\n String temp = stopWords.get(i);\n if(temp.equalsIgnoreCase(str)) {\n str = \"\";\n }\n }\n return str;\n }", "public static String stemWord(String word) {\n if (word.matches(\".*\\\\s.*\")) throw \n new IllegalArgumentException(\"argument is not a single word: \" + word); \n EnglishStemmer stemmer = new EnglishStemmer();\n stemmer.setCurrent(word);\n stemmer.stem();\n return stemmer.getCurrent();\n // slow way of doing it with jcas\n// List<TokenCanonic> c = getCanonicForms(word, CanonicForm.STEM);\n// return c.get(0).canonic;\n }", "public static String preprocessStemAndTokenizeReturnDistinctTokens(String data) {\n\t\t//System.out.println(\"Preprocess data, remove stop words, stem, tokenize ..\");\n\t\tSet<String> transformedSet = new LinkedHashSet<String>();\n\t\tList<String> stemmedList = new ArrayList<String>();\n\n\t\tTokenizer analyzer = new Tokenizer(Version.LUCENE_30);\n\t\tTokenStream tokenStream = analyzer.tokenStream(\"\", new StringReader(data));\n\t\tTermAttribute termAttribute;\n\t\tString term;\n\t\ttry {\n\t\t\twhile (tokenStream.incrementToken()) {\n\t\t\t\ttermAttribute = tokenStream.getAttribute(TermAttribute.class);\n\t\t\t\tterm = termAttribute.term();\n\t\t\t\tif (digitPattern.matcher(term).find()) //ignore digits\n\t\t\t\t\tcontinue;\n\t\t\t\tif (stopwords.contains(term)) //ignore stopwords\n\t\t\t\t\tcontinue;\n\t\t\t\tif (term.length() <= 1) //ignore single letter words\n\t\t\t\t\tcontinue;\n\t\t\t\tstemmer.setCurrent(term);\n\t\t\t\tstemmer.stem();\n\t\t\t\tstemmedList.add(stemmer.getCurrent());\n\t\t\t}\n\t\t\ttransformedSet.addAll(stemmedList);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tstemmedList.clear();\n\t\tstemmedList = null;\n\t\t\n\t\treturn StringUtils.join(transformedSet.toArray(), \" \");\n\t}", "List<String> tokenize0(String doc) {\r\n List<String> res = new ArrayList<String>();\r\n\r\n for (String s : doc.split(\"\\\\s+\")) {\r\n // implement stemming algorithm if ToStem == true\r\n if (ToStem == true) {\r\n Stemmer st = new Stemmer();\r\n st.add(s.toCharArray(), s.length());\r\n st.stem();\r\n s = st.toString();\r\n }\r\n res.add(s);\r\n }\r\n return res;\r\n }", "@Override\n\tpublic String getStemming(String phrase) {\n\t\treturn null;\n\t}", "public abstract boolean isStopWord(String term);", "public String remove_stop_words(String text) {\n\t\tfor (String w : stop_words) {\n\t\t\ttext = text.replaceAll(\"\\\\s*\\\\b\" + w + \"\\\\b\\\\s*\", \" \");\n\t\t}\n\n\t\treturn text;\n\t}", "public static String stemWordPorter(String word) {\n Stemmer st = new Stemmer();\n st.add(word.toCharArray(), word.length());\n st.stem();\n return st.toString();\n }", "default String getStem() {\n return meta(\"nlpcraft:nlp:stem\");\n }", "public static String preprocessStemAndTokenizeAddBigramsInString(String data) {\n\t\t//System.out.println(\"Preprocess data, remove stop words, stem, tokenize and get bi-grams ..\");\n\n\t\tSet<String> transformedSet = new LinkedHashSet<String>();\n\t\tList<String> stemmedList = new ArrayList<String>();\n\n\t\tTokenizer analyzer = new Tokenizer(Version.LUCENE_30);\n\t\tTokenStream tokenStream = analyzer.tokenStream(\"\", new StringReader(data));\n\t\tTermAttribute termAttribute;\n\t\tString term;\n\t\ttry {\n\t\t\twhile (tokenStream.incrementToken()) {\n\t\t\t\ttermAttribute = tokenStream.getAttribute(TermAttribute.class);\n\t\t\t\tterm = termAttribute.term();\n\t\t\t\tif (digitPattern.matcher(term).find()) //ignore digits\n\t\t\t\t\tcontinue;\n\t\t\t\tif (stopwords.contains(term)) //ignore stopwords\n\t\t\t\t\tcontinue;\n\t\t\t\tif (term.length() <= 1) //ignore stopwords\n\t\t\t\t\tcontinue;\n\t\t\t\tstemmer.setCurrent(term);\n\t\t\t\tstemmer.stem();\n\t\t\t\tstemmedList.add(stemmer.getCurrent());\n\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tString[] ds = stemmedList.toArray(new String[0]);\n\n\t\t/*for(int i=0; i<stemmedList.size(); i++)\n\t\t\tSystem.out.print(ds[i]+\"\\t\");*/\n\n\t\t//add bi-grams\n\t\tfinal int size = 2;\n\t\tfor (int i = 0; i < ds.length; i++) {\n\t\t\ttransformedSet.add(ds[i]); //add single words\n\t\t\tif (i + size <= ds.length) {\n\t\t\t\tString t = \"\";\n\t\t\t\tfor (int j = i; j < i + size; j++) {\n\t\t\t\t\tt += \" \" + ds[j];\n\t\t\t\t}\n\t\t\t\tt = t.trim().replaceAll(\"\\\\s+\", \"_\");\n\t\t\t\ttransformedSet.add(t); //add bi-gram combined with \"_\"\n\t\t\t}\n\t\t}\n\t\t//System.out.println(transformedSet.toArray(new String[transformedSet.size()]).toString());\n\t\treturn StringUtils.join( transformedSet.toArray(new String[transformedSet.size()]), \" \");\n\t\t\n\t}", "public void stem()\n\t { k = i - 1;\n\t if (k > 1) { step1(); step2(); step3(); step4(); step5(); step6(); }\n\t i_end = k+1; i = 0;\n\t }", "private String getStemming(String line) throws IOException {\n\t\treturn line;\n\t\t// return Stemmer.processTweets(line);\n\t}", "public boolean isStopWord(String word);", "public static Set<String> preprocessStemAndTokenizeAddBigramsInSet(String data) {\n\t\t//System.out.println(\"Preprocess data, remove stop words, stem, tokenize and get bi-grams ..\");\n\n\t\tSet<String> transformedSet = new LinkedHashSet<String>();\n\t\tList<String> stemmedList = new ArrayList<String>();\n\n\t\t//System.out.println(\"Stop words length:\" + stopwords.size());\n\t\tTokenizer analyzer = new Tokenizer(Version.LUCENE_30);\n\t\tTokenStream tokenStream = analyzer.tokenStream(\"\", new StringReader(data));\n\t\tTermAttribute termAttribute;\n\t\tString term;\n\t\ttry {\n\t\t\twhile (tokenStream.incrementToken()) {\n\t\t\t\ttermAttribute = tokenStream.getAttribute(TermAttribute.class);\n\t\t\t\tterm = termAttribute.term();\n\t\t\t\tif (digitPattern.matcher(term).find()) //ignore digits\n\t\t\t\t\tcontinue;\n\t\t\t\tif (stopwords.contains(term)) //ignore stopwords\n\t\t\t\t\tcontinue;\n\t\t\t\tif (term.length() <= 1) //ignore single letter words\n\t\t\t\t\tcontinue;\n\t\t\t\tstemmer.setCurrent(term);\n\t\t\t\tstemmer.stem();\n\t\t\t\tstemmedList.add(stemmer.getCurrent());\n\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tString[] ds = stemmedList.toArray(new String[0]);\n\n\t\t/*for(int i=0; i<stemmedList.size(); i++)\n\t\t\tSystem.out.print(ds[i]+\"\\t\");*/\n\n\t\t//add bi-grams\n\t\tfinal int size = 2;\n\t\tfor (int i = 0; i < ds.length; i++) {\n\t\t\ttransformedSet.add(ds[i]); //add single words\n\t\t\tif (i + size <= ds.length) {\n\t\t\t\tString t = \"\";\n\t\t\t\tfor (int j = i; j < i + size; j++) {\n\t\t\t\t\tt += \" \" + ds[j];\n\t\t\t\t}\n\t\t\t\tt = t.trim().replaceAll(\"\\\\s+\", \"_\");\n\t\t\t\ttransformedSet.add(t); //add bi-gram combined with \"_\"\n\t\t\t}\n\t\t}\n\t\t//System.out.println(\" \")\n\t\tstemmedList.clear();\n\t\tstemmedList = null;\n\t\tds = null;\n\t\treturn transformedSet;\n\t}", "List<String> tokenize2(String doc) {\n String stemmed = StanfordLemmatizer.stemText(doc);\n List<String> res = new ArrayList<String>();\n\n for (String s : stemmed.split(\"[\\\\p{Punct}\\\\s]+\"))\n res.add(s);\n return res;\n }", "public List<Stem> stem(char word[], int length) {\n List<Stem> stems = new ArrayList<Stem>();\n if (dictionary.lookupWord(word, 0, length) != null) {\n stems.add(new Stem(word, length));\n }\n stems.addAll(stem(word, length, null, 0));\n return stems;\n }", "public void setStem (Glyph stem)\r\n {\r\n this.stem = stem;\r\n }", "public String Stem( String word )\n {\n // check if we already know the word\n String stemmedword = AllWords.get(word);\n if ( stemmedword != null )\n return stemmedword; // return it if we already know it\n\n // don't check words with digits in them\n // if ( containsNumbers (word) == true )\n // stemmedword = null;\n // else\t// unknown word: try to stem it\n stemmedword = StemWordWithWordNet (word);\n\n if ( stemmedword != null )\n {\n // word was recognized and stemmed with wordnet:\n // add it to hashmap and return the stemmed word\n AllWords.put( word, stemmedword );\n return stemmedword;\n }\n // word could not be stemmed by wordnet,\n // thus it is no correct english word\n // just add it to the list of known words so\n // we won't have to look it up again\n AllWords.put( word, word );\n return word;\n }", "public List<String> stem(List<String> terms) {\r\n\t\tPaiceHuskStemmer stemmer = null;\r\n\t\ttry {\r\n\t\t\tstemmer = PaiceHuskStemmer.getInstance(SVMClassifier.class.getClassLoader().getResource(\"stemrules.txt\").openStream());\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tstemmer.setPreStrip(false);\r\n\t\tfor (int i = 0; i < terms.size(); i++) {\r\n\t\t\tString w = terms.get(i);\r\n\t\t\tterms.set(i, stemmer.stripAffixes(w));\r\n\t\t}\r\n\t\treturn terms;\r\n\t}", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"nam(s) of edit(s), typ as indic in th latic book. if ther is als an author field, then th edit field giv th edit of th bok or cllect in which th refer appear.\");\n assertEquals(\"nam(s) of edit(s), typ as ind in th lat book. if ther is al an author field, then th edit field giv th edit of th bok or cllect in which th refer appear.\", string0);\n }", "@Override\r\n\t\t\tpublic boolean isStopWord(String term) {\n\t\t\t\treturn false;\r\n\t\t\t}", "@Test\n public void tweakingEnglishStopwordsAndStemming() throws IOException {\n\n LanguageComponents english = LanguageComponents.load(\"English\");\n\n // Pass-through of all suppliers to English defaults.\n LinkedHashMap<Class<?>, Supplier<?>> componentSuppliers = new LinkedHashMap<>();\n for (Class<?> clazz : english.components()) {\n componentSuppliers.put(clazz, () -> english.get(clazz));\n }\n\n // Now override the suppliers of Stemmer and LexicalData interfaces. These suppliers should be\n // thread-safe, but the instances of corresponding components will not be reused across threads.\n\n // Override the Stemmer supplier.\n componentSuppliers.put(\n Stemmer.class,\n (Supplier<Stemmer>) () -> (word) -> word.toString().toLowerCase(Locale.ROOT));\n\n // Override the default lexical data.\n LexicalData lexicalData =\n new LexicalData() {\n Set<String> ignored = new HashSet<>(Arrays.asList(\"from\", \"what\"));\n\n @Override\n public boolean ignoreLabel(CharSequence labelCandidate) {\n // Ignore any label that has a substring 'data' in it; example.\n return labelCandidate.toString().toLowerCase(Locale.ROOT).contains(\"data\");\n }\n\n @Override\n public boolean ignoreWord(CharSequence word) {\n return word.length() <= 3 || ignored.contains(word.toString());\n }\n };\n componentSuppliers.put(LexicalData.class, () -> lexicalData);\n\n // The custom set of language components can be reused for multiple clustering requests.\n LanguageComponents customLanguage =\n new LanguageComponents(\"English (customized)\", componentSuppliers);\n\n LingoClusteringAlgorithm algorithm = new LingoClusteringAlgorithm();\n algorithm.desiredClusterCount.set(10);\n List<Cluster<Document>> clusters =\n algorithm.cluster(ExamplesData.documentStream(), customLanguage);\n System.out.println(\"Clusters:\");\n ExamplesCommon.printClusters(clusters);\n }", "public char[] getStem() {\n return stem;\n }", "public static List<String> devideSentenceIntoWords(String sentence) {\n\n String[] wordArray = sentence.toLowerCase().split(\" \");\n return Arrays.stream(wordArray)\n .map(String::trim)\n .filter(w -> !w.replace(CharacterUtils.WORD_DEVIDER, \"\").trim().isEmpty())\n .collect(Collectors.toList());\n }", "private String stemmingForAWord(String identifiedWord) {\n String word;\n if (identifiedWord.contains(\"_\")) {\n word = identifiedWord;\n } else {\n word = morphology.stem(identifiedWord);\n }\n return word;\n }", "public String extractRelevantSentences(String paragraph, Collection<String> terms, boolean lemmatised, int maxSentenceLength) {\n String result = \"\";\n boolean checkSentenceLength = (maxSentenceLength != -1);\n\n // Create an empty Annotation just with the given text\n document = new Annotation(paragraph);\n // Run Annotators on this text\n pipeline.annotate(document);\n\n // Use map to track sentences so that a sentence is not returned twice\n sentences = new HashMap();\n int key = 0;\n for (CoreMap coreMap : document.get(CoreAnnotations.SentencesAnnotation.class)) {\n String string = coreMap.toString();\n if (checkSentenceLength)// if checking sentences, skip is sentence is long\n if (StringOps.getWordLength(string) > maxSentenceLength)\n continue;\n sentences.put(key, coreMap.toString());\n key++;\n }\n\n Set keySet = sentences.keySet();\n Set<Integer> returnedSet = new HashSet();\n Iterator keyIterator = keySet.iterator();\n // These are all the sentences in this document\n while (keyIterator.hasNext()) {\n int id = (int) keyIterator.next();\n String content = sentences.get(id);\n // This is the current sentence\n String thisSentence = content;\n // Select sentence if it contains any of the terms and is not already returned\n for (String t : terms) {\n if (!returnedSet.contains(id)) { // ensure sentence not already used\n String label = StringOps.stemSentence(t, true);\n if (StringUtils.contains(StringOps.stemSentence(thisSentence, false), label)\n || StringUtils.contains(StringOps.stemSentence(StringOps.stripAllParentheses(thisSentence), false), label)) { // lookup stemmed strings\n result = result + \" \" + thisSentence.trim(); // Concatenate new sentence\n returnedSet.add(id);\n }\n }\n }\n }\n\n if (lemmatised && null != result) {\n result = lemmatise(result);\n }\n\n return result;\n }", "@Test\n\tpublic void testRemoveAllStopWords() {\n\t\tString result;\n\t\ttry {\n\t\t\tresult = sp.removeStopWords(stopWords);\n\t\t\tassertEquals(\"Strings not equal. They should be empty.\", \"\", result);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void removeStopwords() throws Exception\n {\n //converting sentence to lowercase \n String[] stopwords=getstopwords(\"Stopwords.txt\");\n //FileWriter f=new FileWriter(\"output.txt\");\n String line=\"\";\n String prcessedtxt=\"\";\n Scanner scanner = new Scanner(new File(\"Sentence.txt\"));\n Scanner newscanner = new Scanner(new File(\"Sentence.txt\"));\n\n BufferedWriter writer = new BufferedWriter(new FileWriter(\"stopwordsremoved.txt\"));\n FileInputStream fstream = new FileInputStream(\"Sentence.txt\");\n BufferedReader br = new BufferedReader(new InputStreamReader(fstream));\n LineNumberReader lineNumberReader =\n new LineNumberReader(br);\n //BufferedReader br = new BufferedReader(new FileReader(\"Sentence.txt\"));\n\n int counter=0;\n int subc=0;\n ArrayList<String> wordList= new ArrayList();\n br.mark(3);\n \n\n HashMap<String, String> capitalCities = new HashMap<String, String>();\n \n\n while (scanner.hasNextLine()) {\n\n line = scanner.nextLine().trim();\n line=line.replaceAll(\"\\\\p{Punct}\", \"\");\n\n line=\"\"+line;\n\n\n \n wordList.addAll(Arrays.asList(line.split(\"[\\\\t, ]\")));\n String title=wordList.get(0);\n wordList.remove(0);\n wordList.add(0,\"\\t\");\n \n List<String> StopwordList= new ArrayList();\n //adding stop words in another array.\n StopwordList.addAll(Arrays.asList(stopwords));\n //removing stopwords from sentence.\n wordList.removeAll(StopwordList);\n \n for(String word:wordList){\n prcessedtxt=prcessedtxt+\" \"+ word;\n }\n writer.write(title+prcessedtxt+\"\\n\"); \n // System.out.print(wordList.toString());\n prcessedtxt=\"\";\n wordList.clear();\n\n\n counter++;\n \n \n\n} \n \n writer.close();\n \nStemmingmethod();\n}", "public StemSearch getStemSearch() {\r\n return this.stemSearch;\r\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"sort arra (doubl): uad\");\n assertEquals(\"sort ar (doubl): uas\", string0);\n }", "@Test(timeout = 4000)\n public void test37() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stem(\"v<l<6c/XVopp\");\n assertEquals(\"v<l<6c/xvop\", string0);\n }", "@Test(timeout = 4000)\n public void test57() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"us for alphabes, cros refer, and creat a label when th ``author'' inform is mis. th field should not be confus with th key that appear in th cit command and at th begin of th databas entr.\");\n assertEquals(\"us for alphab, cro refer, and creat a label when th ``author'' inform is mi. th field should not be confus with th key that appear in th cit command and at th begin of th datab entr.\", string0);\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"weka.core.stemmers.lovinsstemmeryt\");\n assertEquals(\"wek.cor.stemmer.lovinsstemmerys\", string0);\n }", "public String SnowballStemmingDemo(String token) {\n\t\tSnowballStemmer stemmer = new englishStemmer();\n\t\tstemmer.setCurrent(token);\n\t\tif (stemmer.stem())\n\t\t\treturn stemmer.getCurrent();\n\t\telse\n\t\t\treturn token;\n\t}", "public String normalize(String word);", "@Test(timeout = 4000)\n public void test16() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"a stemmer bas on th lovin stemmer, describ hes:\\n\\njuli beth lovin (1968). developm of a stem algorithm. mechan transl and comput lingu. 11:22-31.ond\");\n assertEquals(\"a stemmer ba on th lovin stemmer, describ he:\\n\\njl beth lovin (1968). developm of a stem algorithm. mechan transl and comput lingu. 11:22-31.ons\", string0);\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"20l}V*vRPT!yP9\");\n assertEquals(\"20l}v*vrb!yp9\", string0);\n }", "@Test(timeout = 4000)\n public void test45() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"th nam of a ser or ses of book. when cit an entir book, th th titl field giv it titl and an opt ser field giv th nam of a ser or mult-volum ses in which th book is publ.\");\n assertEquals(\"th nam of a ser or se of book. when cit an entir book, th th titl field giv it titl and an opt ser field giv th nam of a ser or mult-vol se in which th book is publ.\", string0);\n }", "public boolean isStem() {\n return this.type == Type.STEM;\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"w(FZNn>R/Iv6?tO\");\n assertEquals(\"w(fzn>r/iv6?to\", string0);\n }", "private ArrayList<String> stemTokens(ArrayList<String> tokens) {\n ArrayList<String> stemmedTokens = new ArrayList<>();\n for (String token : tokens) {\n Stemmer stemmer = new Stemmer();\n // Add each character into the stemmer\n for (int i = 0; i < token.length(); i++) {\n stemmer.add(token.charAt(i));\n }\n\n // Stem the token\n stemmer.stem();\n\n // Retrieve the stemmed token\n String stemmedToken = stemmer.toString();\n\n stemmedTokens.add(stemmedToken);\n }\n\n return stemmedTokens;\n }", "public static String stemvString(String raws)\n\t{\n\t\tString os = \"\";\n\t\tfor (String w : raws.split(\"\\\\s+\"))\n\t\t{\n\t\t\tos = os + dictUtils.getStemWord(w) + \" \";\n\t\t}\n\t\treturn os;\n\t}", "@Override\r\n public boolean isStem ()\r\n {\r\n return getShape() == Shape.STEM;\r\n }", "@Test(timeout = 4000)\n public void test50() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"usu th addres of th publishes or other typ of institut. for major publish hous, van leun recommens omis th inform entir. for smal publishes, on th other hand, you can help th reader by giv th comples addres.\");\n assertEquals(\"usu th addr of th publish or other typ of institut. for major publ hous, van leun recommen om th inform entir. for smal publish, on th other hand, you can help th reader by giv th compl addr.\", string0);\n }", "public static ArrayList<String> wordTokenizer(String sentence){\n \n ArrayList<String> words = new ArrayList<String>();\n String[] wordsArr = sentence.replaceAll(\"\\n\", \" \").toLowerCase().split(\" \");\n \n for(String s : wordsArr){\n \n if(s.trim().compareTo(\"\") != 0)\n words.add(s.trim());\n \n }\n \n return words;\n \n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stem(\"\");\n assertEquals(\"\", string0);\n }", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stem(\"ations\");\n assertEquals(\"ation\", string0);\n }", "public String PorterStemmingDemo(String token) {\n\t\tporterStemmer stemmer = new porterStemmer();\n\t\tstemmer.setCurrent(token);\n\t\tif (stemmer.stem())\n\t\t\treturn stemmer.getCurrent();\n\t\telse\n\t\t\treturn token;\n\t}", "@Test(timeout = 4000)\n public void test47() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"th sponsor institut of a techn report.uas\");\n assertEquals(\"th spons institut of a techn report.ua\", string0);\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"end\");\n assertEquals(\"ens\", string0);\n }", "@Test(timeout = 4000)\n public void test40() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"usu th addres of th publishes or other typ of institut. for major publish hous, van leun recommens omis th inform entir. for smal publishes, on th other hand, you &an help th reader by giv th comples addres.\");\n assertEquals(\"usu th addr of th publish or other typ of institut. for major publ hous, van leun recommen om th inform entir. for smal publish, on th other hand, you &an help th reader by giv th compl addr.\", string0);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"end\");\n assertEquals(\"ens\", string0);\n }", "private List<Stem> stem(char word[], int length, char[] flags, int recursionDepth) {\n List<Stem> stems = new ArrayList<Stem>();\n\n for (int i = 0; i < length; i++) {\n List<HunspellAffix> suffixes = dictionary.lookupSuffix(word, i, length - i);\n if (suffixes == null) {\n continue;\n }\n\n for (HunspellAffix suffix : suffixes) {\n if (hasCrossCheckedFlag(suffix.getFlag(), flags)) {\n int deAffixedLength = length - suffix.getAppend().length();\n // TODO: can we do this in-place?\n String strippedWord = new StringBuilder().append(word, 0, deAffixedLength).append(suffix.getStrip()).toString();\n\n List<Stem> stemList = applyAffix(strippedWord.toCharArray(), strippedWord.length(), suffix, recursionDepth);\n for (Stem stem : stemList) {\n stem.addSuffix(suffix);\n }\n\n stems.addAll(stemList);\n }\n }\n }\n\n for (int i = length - 1; i >= 0; i--) {\n List<HunspellAffix> prefixes = dictionary.lookupPrefix(word, 0, i);\n if (prefixes == null) {\n continue;\n }\n\n for (HunspellAffix prefix : prefixes) {\n if (hasCrossCheckedFlag(prefix.getFlag(), flags)) {\n int deAffixedStart = prefix.getAppend().length();\n int deAffixedLength = length - deAffixedStart;\n\n String strippedWord = new StringBuilder().append(prefix.getStrip())\n .append(word, deAffixedStart, deAffixedLength)\n .toString();\n\n List<Stem> stemList = applyAffix(strippedWord.toCharArray(), strippedWord.length(), prefix, recursionDepth);\n for (Stem stem : stemList) {\n stem.addPrefix(prefix);\n }\n\n stems.addAll(stemList);\n }\n }\n }\n\n return stems;\n }", "public List<Stem> uniqueStems(char word[], int length) {\n List<Stem> stems = new ArrayList<Stem>();\n CharArraySet terms = new CharArraySet(dictionary.getVersion(), 8, dictionary.isIgnoreCase());\n if (dictionary.lookupWord(word, 0, length) != null) {\n stems.add(new Stem(word, length));\n terms.add(word);\n }\n List<Stem> otherStems = stem(word, length, null, 0);\n for (Stem s : otherStems) {\n if (!terms.contains(s.stem)) {\n stems.add(s);\n terms.add(s.stem);\n }\n }\n return stems;\n }", "@Test(timeout = 4000)\n public void test03() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stem(\"\");\n assertEquals(\"\", string0);\n }", "public static String decryptSentence(String sentence) {\n\t\tString[] wordsArr = sentence.toLowerCase().split(\" \");\n\t\tString retValue = \"\";\n\t\tfor(String word : wordsArr) {\n\t\t\tretValue += decriptWord(word)+\" \";\n\t\t}\n\t\treturn retValue.trim();\n\t}", "default boolean isStopWord() {\n return meta(\"nlpcraft:nlp:stopword\");\n }", "StemChange(String _old, String _new) {\n\t\tthis(_old, _new, TenseType.PRESENT, (Pronoun[]) null);\n\t}", "@Test(timeout = 4000)\n public void test17() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"wisend\");\n assertEquals(\"wisens\", string0);\n }", "public String truncateSentence(String s, int k) {\n int j = 0;\n String res = \"\";\n for (int i = 0; i < s.length(); i++) {\n if (s.charAt(i) == ' ') {\n j++;\n }\n if (j == k) {\n res = s.substring(0, i);\n break;\n }\n }\n if (j < k) {\n return s;\n }\n return res;\n }", "@Test(timeout = 4000)\n public void test06() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"mustyt\");\n assertEquals(\"mustys\", string0);\n }", "@Test(timeout = 4000)\n public void test31() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"The edition of a book---for example, ``Second''. This should be an ordinal, and should have the first letter capitalized, as shown here; the standard styles convert to lower case when necessary.\");\n assertEquals(\"th edit of a book---for exampl, ``second''. th should be an ordin, and should hav th first letter capital, as shown hes; th standard styl convers to lower cas when neces.\", string0);\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"qmwkxz| 7%#co^gnspyldex\");\n assertEquals(\"qmwkxz| 7%#co^gnspyldic\", string0);\n }", "public static String removeStopWords(String textFile) throws Exception {\n\t //CharArraySet stopWords = EnglishAnalyzer.getDefaultStopSet();\n\t\t\n\t\tStandardAnalyzer analyser = new StandardAnalyzer();\n\t TokenStream tokenStream = new StandardTokenizer(new StringReader(textFile.trim()));\n\t tokenStream = new StopFilter(tokenStream, analyser.STOP_WORDS_SET);\n\t \n\t BufferedReader br = new BufferedReader(new FileReader(\"stopwords.txt\"));\n\t String line = null;\n\t List<String> stopw = new ArrayList<String>();\n\t int i =0;\n\t line = br.readLine();\n\t while(line != null){\n\t\t stopw.add(line);\n\t\t line = br.readLine();\n\t\t}\n\t \n\t tokenStream = new StopFilter(tokenStream, StopFilter.makeStopSet(stopw));\n\t \n\t StringBuilder sb = new StringBuilder();\n\t CharTermAttribute charTermAttribute = tokenStream.addAttribute(CharTermAttribute.class);\n\t tokenStream.reset();\n\t while (tokenStream.incrementToken()) {\n\t String term = charTermAttribute.toString();\n\t if(term.length() > 2)\n\t \tsb.append(term + \" \");\n\t }\n\t return sb.toString();\n\t}", "public String stemming(String stopWordRemovalFile, String stemmingFilePath) throws IOException{\n\t\t\n\t\t//Use a for loop to go through each data file\n\t\tfor (int i = 1; i <= numOfFiles; i++) {\n\t\t\t//Use FileInputStream to get the file path and use BufferedReader and InputStreamReader to read the files\n\t\t\tFileInputStream files = new FileInputStream(stopWordRemovalFile + \"/a\" + i + \".txt\");\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(files));\n\t\t\t\n\t\t\t//Use FileWriter to indicate the path to where the data will be outputed and BufferedWriter to write to the indicated files\n\t\t\tFileWriter fileStream = new FileWriter(stemmingFilePath + \"/a\" + i + \".txt\"); \n\t BufferedWriter outputStream = new BufferedWriter(fileStream);\n\t\t\t\n\t //Add each line of the files into an temporary stemmer arraylist to output the words into their root form\n\t\t\tString readStopwordDoc;\n\t\t\twhile((readStopwordDoc = reader.readLine()) != null) {\n\t\t\t\ttempStemmer.add(readStopwordDoc);\n\t\t\t}\n\t\t\t//Use the for loop to get the size of the temporary stemmer arraylist and stem the words\n\t\t\tfor(int j = 0; j < tempStemmer.size(); j++) {\n\t\t\t\tstemming.setCurrent(tempStemmer.get(j).toString());\n\t\t\t\tstemming.stem();\n\t\t\t\toutputStream.write(stemming.getCurrent() + \"\\n\");\n\t\t\t}\n\t\t\ttempStemmer.clear();\n\t\t\t\n\t\t\toutputStream.close();\n\t\t}\n\t\tSystem.out.println(\"See Stemming Folder for to view the results\");\n\t\treturn stemmingFilePath;\n\t}", "@Test(timeout = 4000)\n public void test18() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"optend\");\n assertEquals(\"optens\", string0);\n }", "@Test(timeout = 4000)\n public void test04() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stem(\"\");\n assertEquals(\"\", string0);\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"how something strange has been published. the first word should be capitalized.end\");\n assertEquals(\"how someth strang ha been publ. th first word should be capital.ens\", string0);\n }", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stem(\"istr\");\n assertEquals(\"ister\", string0);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stem(\"weka.core.stemmers.lovinsstemmerpher\");\n assertEquals(\"weka.core.stemmers.lovinsstemmerpher\", string0);\n }", "@Test(timeout = 4000)\n public void test37() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"volum\");\n assertEquals(\"vol\", string0);\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stem(\"lux\");\n assertEquals(\"luc\", string0);\n }", "default Stream<CharSequence> parseTextToWords(CharSequence text) {\n return toSentences(text).filter(s -> s.length() > 0).flatMap(this::toWords);\n }", "@Test(timeout = 4000)\n public void test22() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stem(\"a stemmer based on the lovins stemmer, described here:\\n\\njulie beth lovins (1968). development of a stemming algorithm. mechanical translation and computational linguistics. 11:22-31.ex\");\n assertEquals(\"a stemmer based on the lovins stemmer, described here:\\n\\njulie beth lovins (1968). development of a stemming algorithm. mechanical translation and computational linguistics. 11:22-31.ec\", string0);\n }", "Stream<CharSequence> toWords(CharSequence sentence);", "@Test(timeout = 4000)\n public void test66() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"A stemmer based on the Lovins stemmer, described here:\\n\\nJulie Beth Lovins (1968). Development of a stemming algorithm. Mechanical Translation and Computational Linguistics. 11:22-31.\");\n assertEquals(\"a stemmer bas on th lovin stemmer, describ hes:\\n\\njuli beth lovin (1968). developm of a stem algorithm. mechan transl and comput lingu. 11:22-31.\", string0);\n }", "@Test(timeout = 4000)\n public void test07() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"isbnet\");\n assertEquals(\"isbnet\", string0);\n }", "@Test(timeout = 4000)\n public void test48() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"The name of a series or set of books. When citing an entire book, the the title field gives its title and an optional series field gives the name of a series or multi-volume set in which the book is published.\");\n assertEquals(\"th nam of a ser or ses of book. when cit an entir book, th th titl field giv it titl and an opt ser field giv th nam of a ser or mult-volum ses in which th book is publ.\", string0);\n }", "@Test(timeout = 4000)\n public void test16() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"cw4lid\");\n assertEquals(\"cw4lis\", string0);\n }", "@Test(timeout = 4000)\n public void test51() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"us for alphabes, cros refer, and creat a label when th ``author'' inform is mis. th field should not be confus with th key that appear in th cit command and at th begin of th databas entr.\");\n assertEquals(\"us for alphab, cro refer, and creat a label when th ``author'' inform is mi. th field should not be confus with th key that appear in th cit command and at th begin of th datab entr.\", string0);\n }", "public static void main(String[] args) throws IOException {\n \n String s = \" Today's is sunny. She is a sunny girl. To be or not to be. She is in Berlin\\r\\n\"\n\t\t\t\t+ \"today. Sunny Berlin! Berlin is always exciting!\"\n\t\t\t\t+ \"\";\n \n PorterStemmer stemmer = new PorterStemmer();\n Tokenizer tokenizer = new StandardTokenizer();\n Tokenizer wt = new WhitespaceTokenizer();\n\t\t\n final List<String> stop_Words = Arrays.asList(\"is\", \"was\", \"in\", \"to\", \"be\");\n\t\tfinal CharArraySet stopSet = new CharArraySet(stop_Words, true);\n\t\t\n\t\t\n\t\ttokenizer.setReader(new StringReader(s));\n\t\tTokenStream tok = tokenizer;\n\t\t\n\t\ttok = new StopFilter(tok, stopSet);\n\t\ttok.reset();\n\t\t\n\t\tCharTermAttribute attr = tok.addAttribute(CharTermAttribute.class);\n\t\t\n\t\t\n\t\twhile(tok.incrementToken()) {\n\t\t // Grab the term\n\t\t String term = attr.toString();\n\n\t\t System.out.println(term);\n\t\t \n\t\t}\n\t\t\n\t}", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"actuad\");\n assertEquals(\"actuas\", string0);\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"eti=t4on\");\n assertEquals(\"es=t4on\", string0);\n }", "@Test(timeout = 4000)\n public void test46() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"editor\");\n assertEquals(\"edit\", string0);\n }", "@Test(timeout = 4000)\n public void test25() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"hpyrnpuad\");\n assertEquals(\"hpyrnpuas\", string0);\n }", "public String words(String sentence) {\n String[] stringSentence = sentence.trim().split(\" \");\n for (int i = 0; i < stringSentence.length; i++) {\n if (stringSentence[i].length() >= LENGTH) {\n stringSentence[i] = new StringBuilder(stringSentence[i]).reverse().toString();\n }\n }\n return String.join(\" \", stringSentence);\n }", "public RemoverStopWords() {\n\t\tBufferedReader br = null;\n\t\ttry {\n\t\t\tbr = new BufferedReader(new FileReader(\"stopwords_en.txt\"));\n\t\t\tString line;\n\n\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t\tstop_words.add(line.trim());\n\t\t\t}\n\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (br != null) {\n\t\t\t\t\tbr.close();\n\t\t\t\t}\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "@Test(timeout = 4000)\n public void test18() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"linguvad\");\n assertEquals(\"linguvas\", string0);\n }", "public void setStemmer( /*CustomFrenchStemmer*/ PaiceHuskFrenchStemmer stemmer ) {\r\n\t\tif ( stemmer != null ) {\r\n\t\t\tthis.stemmer = stemmer;\r\n\t\t}\r\n\t}" ]
[ "0.7172972", "0.71256495", "0.6716679", "0.66902304", "0.6670179", "0.66263765", "0.6578838", "0.65136003", "0.648235", "0.64246523", "0.63418627", "0.6331426", "0.6318566", "0.62910116", "0.62540936", "0.6250787", "0.62491745", "0.6242411", "0.62312853", "0.6217465", "0.6196317", "0.61537254", "0.6150399", "0.6131728", "0.61213106", "0.6115528", "0.6067513", "0.5993684", "0.5992594", "0.59622276", "0.5906453", "0.5896104", "0.5895481", "0.5893056", "0.58872485", "0.58863056", "0.58841664", "0.5780065", "0.5778695", "0.5774204", "0.57639027", "0.5748036", "0.5739675", "0.5732731", "0.57273185", "0.5703547", "0.5699151", "0.56976336", "0.5689359", "0.56754315", "0.56318635", "0.56307507", "0.56098133", "0.5598765", "0.5589767", "0.5568826", "0.5568314", "0.5561864", "0.5559606", "0.5551029", "0.554876", "0.5531023", "0.5524635", "0.5519253", "0.55180275", "0.55069745", "0.55011463", "0.54992294", "0.5496864", "0.54964596", "0.5487237", "0.5475335", "0.5449129", "0.5443206", "0.54420304", "0.544116", "0.54236746", "0.5411322", "0.5410428", "0.5410364", "0.54035157", "0.5389975", "0.53818274", "0.53771585", "0.5368146", "0.53672224", "0.5363232", "0.5358626", "0.53583986", "0.5353425", "0.5344006", "0.53431034", "0.5340251", "0.53322226", "0.5323771", "0.5319349", "0.53156996", "0.53150773", "0.530937", "0.52967465", "0.52961725" ]
0.0
-1
For type checking, so the warnings go away//
public static void buildSymTable(CommonTree tree) { ListIterator<?> tmp = tree.getChildren().listIterator(); ArrayList<CommonTree> elements = new ArrayList<CommonTree>(); while (tmp.hasNext()) elements.add((CommonTree) tmp.next()); /* Any type errors found here! */ ListIterator<CommonTree> iter = elements.listIterator();//= tree.getChildren().listIterator(); //end type checking// while(iter.hasNext()) { CommonTree element = iter.next();//this does go here if (element.getChildCount() == 2 && element.getText().equalsIgnoreCase("DECL")){ symTable.insertSymbol(new Symbol(element.getChild(1).getText(),element.getChild(0).getText())); //System.out.println("Left: " + element.getChild(0).getText()); //System.out.println("Right: " + element.getChild(1).getText()); } else if (element.getChildCount() == 1){ //System.out.println("Dest: " + element.getChild(0).getText()); } else if(element.getChildCount() == 0){ continue; } else{ buildSymTable(element); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic boolean checkTypes() {\n\t\treturn false;\n\t}", "public IncorrectType58119e() {\n }", "protected boolean func_70041_e_() { return false; }", "private void m50366E() {\n }", "protected void typeMismatch(Object obj) {\n\t\ttypeMismatch(obj.toString());\n\t}", "@Override\n\t\tpublic void checkPreconditions() {\n\t\t}", "@Override\n protected void checkSubclass() {\n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tpublic void cast() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void cast() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void cast() {\n\t\t\r\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n public boolean isGeneric() { \n return false;\n }", "private void checkNotUnknown() {\n if (isUnknown())\n throw new AnalysisException(\"Unexpected 'unknown' value!\");\n }", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "public void method_4270() {}", "@Override\n public void func_104112_b() {\n \n }", "public void swrap() throws NoUnusedObjectExeption;", "@Override\n\tpublic void check() {\n\t\t\n\t}", "@Override\n\tpublic void check() {\n\t\t\n\t}", "public void smell() {\n\t\t\n\t}", "@Override\n protected void checkSubclass() {\n }", "@Override\n protected void checkSubclass() {\n }", "@Override\n protected void checkSubclass() {\n }", "void check()\n {\n checkUsedType(responseType);\n checkUsedType(requestType);\n }", "public final void mo51373a() {\n }", "@Test\n void cannotInferType() {\n }", "@Override\n\tpublic void onStallWarning(StallWarning arg0) {\n\t\t\n\t}", "private void checkType(V value) {\n valueClass.cast(value);\n }", "public void check()\n {\n typeDec.check();\n }", "@Override\r\n\tpublic void cast() {\n\r\n\t}", "@Override\r\n protected void checkSubclass() {\n }", "@Override\r\n protected void checkSubclass() {\n }", "@Override\r\n protected void checkSubclass() {\n }", "default boolean isPrimitive() {\n return false;\n }", "@Override\n public void perish() {\n \n }", "@Override\r\n public void onStallWarning(StallWarning arg0) {\n\r\n }", "@Override\r\n public void onStallWarning(StallWarning arg0) {\n\r\n }", "@Override\n\tpublic void type() {\n\t\t\n\t}", "private void validate() {\n\n if (this.clsname == null)\n throw new IllegalArgumentException();\n if (this.dimension < 0)\n throw new IllegalArgumentException();\n if (this.generics == null)\n throw new IllegalArgumentException();\n }", "private ArraySetHelper() {\n\t\t// nothing\n\t}", "@Test\r\n\tpublic void testSelectAllChuyenTrangThaiFrom() {\r\n\t\t@SuppressWarnings(\"unused\")\r\n\t\tInteger a = 1;\r\n\t}", "public final void mo91715d() {\n }", "public boolean typeCheck(){\n\treturn myDeclList.typeCheck();\n }", "protected boolean func_70814_o() { return true; }", "public abstract boolean hasWarning();", "public static String toLegacyType(String keyword, String value) {\n/* 1300 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public void Tyre() {\n\t\t\r\n\t}", "private static void m6091c(Object obj, Class<?> cls) {\n throw Context.m6756a(\"msg.conversion.not.allowed\", (Object) String.valueOf(obj), (Object) C2140au.m5785a(cls));\n }", "static void logWarning(Throwable t) {\n }", "public void warningPermit();", "protected static void checkValue(Object value) {\n\tif (!(value instanceof java.lang.Long)) {\n throw new IllegalArgumentException(\"value is not a Long\");\n }\n }", "@Override\r\n\tprotected void validate() {\n\t}", "@Override\n\t\tpublic void onStallWarning(StallWarning arg0) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void onStallWarning(StallWarning arg0) {\n\t\t\t\n\t\t}", "public TypeCheck() {\n\tsuper();\n\tinst = this;\n\tnew rcc.tc.PrepTypeDeclaration();\n }", "public int getInputType() {\n/* 1743 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public boolean method_2434() {\r\n return false;\r\n }", "public void m9741j() throws cf {\r\n }", "private AnnotatedTypes() { throw new AssertionError(\"Class AnnotatedTypes cannot be instantiated.\");}", "void mo16691c(T t);", "public MirroredTypesException(List<? extends TypeMirror> paramList) {\n/* 69 */ super(\"Attempt to access Class objects for TypeMirrors \" + (paramList = new ArrayList<>(paramList))\n/* */ \n/* 71 */ .toString());\n/* 72 */ this.types = Collections.unmodifiableList(paramList);\n/* */ }", "public TypeUndefined() { super(\"undefined\"); }", "public TypeCheckException(String msg) {\n super(msg);\n }", "void mo11495a(T t);", "protected int check(int type) {\n\t\tif (type < 0 || type > 127)\n\t\t\tthrow new IllegalArgumentException(\"invalid.ASTNode.type: \" + type);\n\t\treturn type;\n\t}", "private void _badType(int type, Object value)\n {\n if (type < 0) {\n throw new IllegalStateException(String.format(\n \"Internal error: missing BeanDefinition for id %d (class %s)\",\n type, value.getClass().getName()));\n }\n throw new IllegalStateException(String.format(\n \"Unsupported type: %s (%s)\", type, value.getClass().getName()));\n }", "protected Warning() {\n\n }", "protected void checkSubclass() {\n }", "protected void checkSubclass() {\n }", "protected void checkSubclass() {\n }", "@Override\n public boolean isPrimitive() {\n return true;\n }" ]
[ "0.66470647", "0.5934906", "0.5759758", "0.5716968", "0.5687582", "0.56834775", "0.5666139", "0.5661536", "0.5653797", "0.5653797", "0.5653797", "0.56402636", "0.56402636", "0.56402636", "0.56402636", "0.56402636", "0.56402636", "0.56402636", "0.56402636", "0.56402636", "0.56402636", "0.56402636", "0.56402636", "0.56402636", "0.56402636", "0.56402636", "0.56402636", "0.56402636", "0.5633124", "0.56157136", "0.5614329", "0.5614329", "0.5614329", "0.5614329", "0.5614329", "0.5614329", "0.5614329", "0.5614329", "0.5614329", "0.5614329", "0.5614329", "0.5614329", "0.5614329", "0.5614329", "0.56129885", "0.56045455", "0.5590751", "0.55833787", "0.55833787", "0.5558475", "0.5555186", "0.5555186", "0.5555186", "0.55535203", "0.554656", "0.5545446", "0.5533779", "0.5521933", "0.55080605", "0.5507938", "0.54944515", "0.54944515", "0.54944515", "0.54941064", "0.5492755", "0.54925245", "0.54925245", "0.54882675", "0.5478963", "0.5478224", "0.5475446", "0.546471", "0.54493684", "0.5432049", "0.5427254", "0.54184204", "0.5418175", "0.5410842", "0.5410099", "0.5402576", "0.5394686", "0.5390678", "0.5388207", "0.5388207", "0.5379365", "0.5368085", "0.5367938", "0.53648", "0.5359784", "0.535723", "0.5355614", "0.534481", "0.5344532", "0.5342517", "0.5338993", "0.5327653", "0.5326505", "0.5323525", "0.5323525", "0.5323525", "0.5321171" ]
0.0
-1
if function call is called in an assign statement evalExpression of the call will be evaluated by this function
public static Temp evalFunction(CommonTree tree){ LinkedList<Temp> temps = new LinkedList<Temp>(); for (int k=1; k<tree.getChildCount(); k++){ //System.out.println("SDFJSDF:LJSDL:FJSDF"); temps.add(evalExpression((CommonTree) tree.getChild(k))); // ircode.add(new ThreeOpCode()) } ircode.add(new ThreeOpCode("PUSH")); // push the parameters on to the stack for (int i=1; i < tree.getChildCount(); i++){ ircode.add(new ThreeOpCode("PUSH", temps.get(i-1).name)); } // add JSR command ircode.add(new ThreeOpCode("JSR", tree.getChild(0).getText())); // pop parameters off the stack for (int i=1; i < tree.getChildCount(); i++){ ircode.add(new ThreeOpCode("POP")); } // create temperary for return value Temp temp = new Temp(temperaryNum++,tree.getType(),tree.getText()); // pop the return value ircode.add(new ThreeOpCode("POP", temp.name)); return temp; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Stmt createAssignment(Assign expr) {\n return createEval(expr);\n }", "@Override\n public void visitAssignment(AssignmentExpression assignmentExpression) {\n assignmentExpression.interpret(context);\n }", "public Object eval (Object expression);", "assign_op getAssign_op();", "public static BinaryExpression addAssign(Expression expression0, Expression expression1, Method method) { throw Extensions.todo(); }", "private static AssignExpr retrieveAssignExpression(Expression expression) {\n return expression.asAssignExpr();\n }", "protected Assign assign(Position pos, Expr e, Assign.Operator asgn, Expr val) throws SemanticException {\n Assign a = (Assign) xnf.Assign(pos, e, asgn, val).type(e.type());\n if (a instanceof FieldAssign) {\n assert (e instanceof Field);\n assert ((Field) e).fieldInstance() != null;\n a = ((FieldAssign) a).fieldInstance(((Field)e).fieldInstance());\n } else if (a instanceof SettableAssign) {\n assert (e instanceof X10Call);\n X10Call call = (X10Call) e;\n List<Expr> args = CollectionUtil.append(Collections.singletonList(val), call.arguments());\n X10Call n = xnf.X10Call(pos, call.target(), nf.Id(pos, SettableAssign.SET), call.typeArguments(), args);\n n = (X10Call) n.del().disambiguate(this).typeCheck(this).checkConstants(this);\n X10MethodInstance smi = n.methodInstance();\n X10MethodInstance ami = call.methodInstance();\n // List<Type> aTypes = new ArrayList<Type>(ami.formalTypes());\n // aTypes.add(0, ami.returnType()); // rhs goes before index\n // MethodInstance smi = xts.findMethod(ami.container(),\n // xts.MethodMatcher(ami.container(), SET, aTypes, context));\n a = ((SettableAssign) a).methodInstance(smi);\n a = ((SettableAssign) a).applyMethodInstance(ami);\n }\n return a;\n }", "public abstract Object eval();", "public AssignExpr assign_expr() {\n if (lexer.token != Symbol.IDENT) {\n error.signal(\"Expecting identifier at assign expression\");\n }\n \n String type = symbolTable.getVariable(lexer.getStringValue());\n if(type == null){\n error.show(\"Tried to assign a value to a variable (\"+lexer.getStringValue()+\") that hasn't been declared.\");\n } else {\n if(type.equals(\"STRING\")){\n error.show(\"Tried to assign a value to a declared string variable (\"+lexer.getStringValue()+\")\");\n }\n }\n \n Ident id = new Ident(lexer.getStringValue());\n \n lexer.nextToken();\n if (lexer.token != Symbol.ASSIGN) {\n error.signal(\"Expecting assign symbol at assign expression\");\n }\n lexer.nextToken();\n Expr e = expr();\n\n if(type != null && type.toLowerCase().equals(\"int\") && e.getType(symbolTable) != null && e.getType(symbolTable).toLowerCase().equals(\"float\"))\n error.show(\"Trying to assign a \"+e.getType(symbolTable)+\" to a \"+type);\n else if (type != null && e.getType(symbolTable) != null && !type.equals(e.getType(symbolTable)))\n error.warning(\"Trying to assign a \"+e.getType(symbolTable)+\" to a \"+type);\n \n return new AssignExpr(id, e);\n }", "@Override\n public Operator visitAssign(Assign operator)\n {\n throw new AssertionError();\n }", "@Override\n public ExprType analyzeAssign(AnalyzeInfo info, ExprGenerator value)\n {\n ExprGenerator objGen = ((ExprPro) _objExpr).getGenerator();\n objGen.analyze(info);\n\n value.analyze(info);\n\n // php/3a6e, php/39o3\n // objGen.analyzeSetReference(info);\n objGen.analyzeSetModified(info);\n\n return ExprType.VALUE;\n }", "@Override\n public Integer visitAssign(CalculatorParser.AssignContext ctx) {\n String id = ctx.ID().getText(); // id is left-hand side of '='\n int value = visit(ctx.expr()); // compute value of expression on right\n memory.put(id, value); // store it in memory\n return value;\n }", "public static BinaryExpression addAssign(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "private void assignment() {\n\n\t\t\t}", "public void storeEval(final String expression, final String variableName);", "@Override\n\tpublic void visit(AssignNode node) {\n\t\tEvaluator.evaluate(node.getChild(0));\n\t\tEvaluator.evaluate(node.getChild(1));\n\n\t\t/**\n\t\t * Verificam fiii si construim perechea Variabila, Valoare pentru a fi\n\t\t * inserata in HahMap-ul din Evaluator\n\t\t */\n\t\tVariable x = null;\n\t\tValue i = null;\n\t\tif (node.getChild(1) instanceof Variable) {\n\t\t\tx = new Variable(node.getChild(1).getName());\n\t\t} else {\n\t\t\ti = new Value(node.getChild(1).getName());\n\t\t}\n\n\t\tif (node.getChild(0) instanceof Variable) {\n\t\t\tx = new Variable(node.getChild(0).getName());\n\t\t} else {\n\t\t\ti = new Value(node.getChild(0).getName());\n\t\t}\n\t\tEvaluator.variables.put(x.getName(), i.getName());\n\t\tnode.setName(i.getName());\n\t}", "@Override\n public String visit(AssignExpr n, Object arg) {\n return null;\n }", "public Code visitAssignmentNode(StatementNode.AssignmentNode node) {\n beginGen(\"Assignment\");\n /* Generate code to evaluate the expression */\n Code code = new Code();\n /* Generate the code to load the address of the variable */\n for(int i= 0; i < node.getExps().size(); i++) {\n \tExpNode exp = node.getExps().get(i);\n \tcode.append(exp.genCode(this));\n }\n for(int i = node.getLValues().size() - 1; i >= 0; i--) {\n \tExpNode lValue = node.getLValues().get(i);\n \tcode.append(lValue.genCode(this));\n \tcode.genStore(lValue.getType());\n }\n endGen(\"Assignment\");\n return code;\n }", "public Object eval(String expression) throws Exception;", "private static Expression retrieveAssignExpressionValue(Expression expression) {\n return retrieveAssignExpression(expression).getValue();\n }", "protected Expr visitSettableAssign(SettableAssign n) throws SemanticException {\n Position pos = n.position();\n MethodInstance mi = n.methodInstance();\n List<Expr> args = new ArrayList<Expr>(n.index());\n if (n.operator() == Assign.ASSIGN) {\n // FIXME: this changes the order of evaluation, (a,i,v) -> (a,v,i)!\n args.add(0, n.right());\n return xnf.Call(pos, n.array(), xnf.Id(pos, mi.name()),\n args).methodInstance(mi).type(mi.returnType());\n }\n X10Binary_c.Operator op = n.operator().binaryOperator();\n X10Call left = (X10Call) n.left();\n MethodInstance ami = left.methodInstance();\n List<Formal> parms = new ArrayList<Formal>();\n Name xn = Name.make(\"x\");\n LocalDef xDef = xts.localDef(pos, xts.Final(), Types.ref(mi.container()), xn);\n Formal x = xnf.Formal(pos, xnf.FlagsNode(pos, xts.Final()),\n xnf.CanonicalTypeNode(pos, mi.container()), xnf.Id(pos, xn)).localDef(xDef);\n parms.add(x);\n List<Expr> idx1 = new ArrayList<Expr>();\n int i = 0;\n for (Type t : ami.formalTypes()) {\n Name yn = Name.make(\"y\"+i);\n LocalDef yDef = xts.localDef(pos, xts.Final(), Types.ref(t), yn);\n Formal y = xnf.Formal(pos, xnf.FlagsNode(pos, xts.Final()),\n xnf.CanonicalTypeNode(pos, t), xnf.Id(pos, yn)).localDef(yDef);\n parms.add(y);\n idx1.add(xnf.Local(pos, xnf.Id(pos, yn)).localInstance(yDef.asInstance()).type(t));\n i++;\n }\n Name zn = Name.make(\"z\");\n Type T = mi.formalTypes().get(0);\n assert (xts.isSubtype(ami.returnType(), T, context()));\n LocalDef zDef = xts.localDef(pos, xts.Final(), Types.ref(T), zn);\n Formal z = xnf.Formal(pos, xnf.FlagsNode(pos, xts.Final()),\n xnf.CanonicalTypeNode(pos, T), xnf.Id(pos, zn)).localDef(zDef);\n parms.add(z);\n Expr val = visitBinary((X10Binary_c) xnf.Binary(pos,\n xnf.Call(pos,\n xnf.Local(pos, xnf.Id(pos, xn)).localInstance(xDef.asInstance()).type(mi.container()),\n xnf.Id(pos, ami.name()), idx1).methodInstance(ami).type(T),\n op, xnf.Local(pos, xnf.Id(pos, zn)).localInstance(zDef.asInstance()).type(T)).type(T));\n List<Expr> args1 = new ArrayList<Expr>(idx1);\n args1.add(0, val);\n Type ret = mi.returnType();\n Expr res = xnf.Call(pos,\n xnf.Local(pos, xnf.Id(pos, xn)).localInstance(xDef.asInstance()).type(mi.container()),\n xnf.Id(pos, mi.name()), args1).methodInstance(mi).type(ret);\n // Have to create the appropriate node in case someone defines a set():void\n Block block = ret.isVoid() ?\n xnf.Block(pos, xnf.Eval(pos, res), xnf.Return(pos, xnf.Call(pos,\n xnf.Local(pos, xnf.Id(pos, xn)).localInstance(xDef.asInstance()).type(mi.container()),\n xnf.Id(pos, ami.name()), idx1).methodInstance(ami).type(T))) :\n xnf.Block(pos, xnf.Return(pos, res));\n Closure c = synth.makeClosure(pos, T, parms, block, context());\n X10MethodInstance ci = c.closureDef().asType().applyMethod();\n args.add(0, n.array());\n args.add(n.right());\n return xnf.ClosureCall(pos, c, args).closureInstance(ci).type(ret);\n }", "public static BinaryExpression addAssign(Expression expression0, Expression expression1, Method method, LambdaExpression lambdaExpression0, LambdaExpression lambdaExpression1) { throw Extensions.todo(); }", "@Override\n\tpublic Object evaluate(Interpreter interpreter)\n\t{\n\t\t((VarToken) A).assign(interpreter, (String) B.evaluate(interpreter));\n\t\treturn null;\n\t}", "private Expr expression() {\n return assignment();\n }", "@Override\n public void visit(VariableEvalNode variableEvalNode) {\n }", "@Test\r\n public void testApplyTo() throws Exception {\r\n// System.out.println(\"applyTo\");\r\n// Expression leftOperand = new Literal(new Value(\"B1\"));\r\n// Expression rightOperand = new Literal(new Value(5));\r\n// Assignment instance = new Assignment();\r\n// Value expResult = new Value(5);\r\n// Value result = instance.applyTo(leftOperand, rightOperand);\r\n// assertEquals(expResult.toText(), result.toText());\r\n }", "protected E eval()\n\t\t{\n\t\tE e=this.e;\n\t\tthis.e=null;\n\t\treturn e;\n\t\t}", "public static BinaryExpression addAssignChecked(Expression expression0, Expression expression1, Method method) { throw Extensions.todo(); }", "@Test\r\n public void testEval__declare_call__1() throws ScriptException {\r\n Object value = engine.eval(\"#() true\");\r\n Assert.assertTrue(value instanceof Function);\r\n Object result = ((Function) value).invoke(engine.createBindings());\r\n Assert.assertTrue((Boolean)result);\r\n }", "@Override\n public void visit(VariableAssignNode variableAssignNode) {\n }", "private void assign(DefinitionStmt stmt) {\n \n soot.Value rightOp = stmt.getRightOp();\n Value result;\n \n if (rightOp instanceof Immediate) {\n Immediate immediate = (Immediate) rightOp;\n result = immediate(stmt, immediate);\n } else if (rightOp instanceof ThisRef) {\n result = function.getParameterRef(1);\n } else if (rightOp instanceof ParameterRef) {\n ParameterRef ref = (ParameterRef) rightOp;\n int index = (sootMethod.isStatic() ? 1 : 2) + ref.getIndex();\n Value p = new VariableRef(\"p\" + index, getType(ref.getType()));\n result = widenToI32Value(p, isUnsigned(ref.getType()));\n } else if (rightOp instanceof CaughtExceptionRef) {\n result = call(BC_EXCEPTION_CLEAR, env);\n } else if (rightOp instanceof ArrayRef) {\n ArrayRef ref = (ArrayRef) rightOp;\n VariableRef base = (VariableRef) immediate(stmt, (Immediate) ref.getBase());\n if (ref.getType() instanceof NullType) {\n // The base value is always null. Do a null check which will\n // always throw NPE.\n checkNull(stmt, base);\n return;\n } else {\n Value index = immediate(stmt, (Immediate) ref.getIndex());\n checkNull(stmt, base);\n checkBounds(stmt, base, index);\n result = call(getArrayLoad(ref.getType()), base, index);\n result = widenToI32Value(result, isUnsigned(ref.getType()));\n }\n } else if (rightOp instanceof InstanceFieldRef) {\n InstanceFieldRef ref = (InstanceFieldRef) rightOp;\n Value base = immediate(stmt, (Immediate) ref.getBase());\n checkNull(stmt, base);\n FunctionRef fn = null;\n if (canAccessDirectly(ref)) {\n fn = new FunctionRef(mangleField(ref.getFieldRef()) + \"_getter\", \n new FunctionType(getType(ref.getType()), ENV_PTR, OBJECT_PTR));\n } else {\n soot.Type runtimeType = ref.getBase().getType();\n String targetClassName = getInternalName(ref.getFieldRef().declaringClass());\n String runtimeClassName = runtimeType == NullType.v() ? targetClassName : getInternalName(runtimeType);\n Trampoline trampoline = new GetField(this.className, targetClassName, \n ref.getFieldRef().name(), getDescriptor(ref.getFieldRef().type()), runtimeClassName);\n trampolines.add(trampoline);\n fn = trampoline.getFunctionRef();\n }\n result = call(fn, env, base);\n result = widenToI32Value(result, isUnsigned(ref.getType()));\n } else if (rightOp instanceof StaticFieldRef) {\n StaticFieldRef ref = (StaticFieldRef) rightOp;\n FunctionRef fn = Intrinsics.getIntrinsic(sootMethod, stmt);\n if (fn == null) {\n if (canAccessDirectly(ref)) {\n fn = new FunctionRef(mangleField(ref.getFieldRef()) + \"_getter\", \n new FunctionType(getType(ref.getType()), ENV_PTR));\n } else {\n String targetClassName = getInternalName(ref.getFieldRef().declaringClass());\n Trampoline trampoline = new GetStatic(this.className, targetClassName, \n ref.getFieldRef().name(), getDescriptor(ref.getFieldRef().type()));\n trampolines.add(trampoline);\n fn = trampoline.getFunctionRef();\n }\n }\n result = call(fn, env);\n result = widenToI32Value(result, isUnsigned(ref.getType()));\n } else if (rightOp instanceof Expr) {\n if (rightOp instanceof BinopExpr) {\n BinopExpr expr = (BinopExpr) rightOp;\n Type rightType = getLocalType(expr.getType());\n Variable resultVar = function.newVariable(rightType);\n result = resultVar.ref();\n Value op1 = immediate(stmt, (Immediate) expr.getOp1());\n Value op2 = immediate(stmt, (Immediate) expr.getOp2());\n if (rightOp instanceof AddExpr) {\n if (rightType instanceof IntegerType) {\n function.add(new Add(resultVar, op1, op2));\n } else {\n function.add(new Fadd(resultVar, op1, op2));\n }\n } else if (rightOp instanceof AndExpr) {\n function.add(new And(resultVar, op1, op2));\n } else if (rightOp instanceof CmpExpr) {\n Variable t1 = function.newVariable(I1);\n Variable t2 = function.newVariable(I1);\n Variable t3 = function.newVariable(resultVar.getType());\n Variable t4 = function.newVariable(resultVar.getType());\n function.add(new Icmp(t1, Condition.slt, op1, op2));\n function.add(new Icmp(t2, Condition.sgt, op1, op2));\n function.add(new Zext(t3, new VariableRef(t1), resultVar.getType()));\n function.add(new Zext(t4, new VariableRef(t2), resultVar.getType()));\n function.add(new Sub(resultVar, new VariableRef(t4), new VariableRef(t3)));\n } else if (rightOp instanceof DivExpr) {\n if (rightType instanceof IntegerType) {\n FunctionRef f = rightType == I64 ? LDIV : IDIV;\n result = call(f, env, op1, op2);\n } else {\n // float or double\n function.add(new Fdiv(resultVar, op1, op2));\n }\n } else if (rightOp instanceof MulExpr) {\n if (rightType instanceof IntegerType) {\n function.add(new Mul(resultVar, op1, op2));\n } else {\n function.add(new Fmul(resultVar, op1, op2));\n }\n } else if (rightOp instanceof OrExpr) {\n function.add(new Or(resultVar, op1, op2));\n } else if (rightOp instanceof RemExpr) {\n if (rightType instanceof IntegerType) {\n FunctionRef f = rightType == I64 ? LREM : IREM;\n result = call(f, env, op1, op2);\n } else {\n FunctionRef f = rightType == DOUBLE ? DREM : FREM;\n result = call(f, env, op1, op2);\n }\n } else if (rightOp instanceof ShlExpr || rightOp instanceof ShrExpr || rightOp instanceof UshrExpr) {\n IntegerType type = (IntegerType) op1.getType();\n int bits = type.getBits();\n Variable t = function.newVariable(op2.getType());\n function.add(new And(t, op2, new IntegerConstant(bits - 1, (IntegerType) op2.getType())));\n Value shift = t.ref();\n if (((IntegerType) shift.getType()).getBits() < bits) {\n Variable tmp = function.newVariable(type);\n function.add(new Zext(tmp, shift, type));\n shift = tmp.ref();\n }\n if (rightOp instanceof ShlExpr) {\n function.add(new Shl(resultVar, op1, shift));\n } else if (rightOp instanceof ShrExpr) {\n function.add(new Ashr(resultVar, op1, shift));\n } else {\n function.add(new Lshr(resultVar, op1, shift));\n }\n } else if (rightOp instanceof SubExpr) {\n if (rightType instanceof IntegerType) {\n function.add(new Sub(resultVar, op1, op2));\n } else {\n function.add(new Fsub(resultVar, op1, op2));\n }\n } else if (rightOp instanceof XorExpr) {\n function.add(new Xor(resultVar, op1, op2));\n } else if (rightOp instanceof XorExpr) {\n function.add(new Xor(resultVar, op1, op2));\n } else if (rightOp instanceof CmplExpr) {\n FunctionRef f = op1.getType() == FLOAT ? FCMPL : DCMPL;\n function.add(new Call(resultVar, f, op1, op2));\n } else if (rightOp instanceof CmpgExpr) {\n FunctionRef f = op1.getType() == FLOAT ? FCMPG : DCMPG;\n function.add(new Call(resultVar, f, op1, op2));\n } else {\n throw new IllegalArgumentException(\"Unknown type for rightOp: \" + rightOp.getClass());\n }\n } else if (rightOp instanceof CastExpr) {\n Value op = immediate(stmt, (Immediate) ((CastExpr) rightOp).getOp());\n soot.Type sootTargetType = ((CastExpr) rightOp).getCastType();\n soot.Type sootSourceType = ((CastExpr) rightOp).getOp().getType();\n if (sootTargetType instanceof PrimType) {\n Type targetType = getType(sootTargetType);\n Type sourceType = getType(sootSourceType);\n if (targetType instanceof IntegerType && sourceType instanceof IntegerType) {\n // op is at least I32 and has already been widened if source type had fewer bits then I32\n IntegerType toType = (IntegerType) targetType;\n IntegerType fromType = (IntegerType) op.getType();\n Variable v = function.newVariable(toType);\n if (fromType.getBits() < toType.getBits()) {\n // Widening\n if (isUnsigned(sootSourceType)) {\n function.add(new Zext(v, op, toType));\n } else {\n function.add(new Sext(v, op, toType));\n }\n } else if (fromType.getBits() == toType.getBits()) {\n function.add(new Bitcast(v, op, toType));\n } else {\n // Narrow\n function.add(new Trunc(v, op, toType));\n }\n result = widenToI32Value(v.ref(), isUnsigned(sootTargetType));\n } else if (targetType instanceof FloatingPointType && sourceType instanceof IntegerType) {\n // we always to a signed conversion since if op is char it has already been zero extended to I32\n Variable v = function.newVariable(targetType);\n function.add(new Sitofp(v, op, targetType));\n result = v.ref();\n } else if (targetType instanceof FloatingPointType && sourceType instanceof FloatingPointType) {\n Variable v = function.newVariable(targetType);\n if (targetType == FLOAT && sourceType == DOUBLE) {\n function.add(new Fptrunc(v, op, targetType));\n } else if (targetType == DOUBLE && sourceType == FLOAT) {\n function.add(new Fpext(v, op, targetType));\n } else {\n function.add(new Bitcast(v, op, targetType));\n }\n result = v.ref();\n } else {\n // F2I, F2L, D2I, D2L\n FunctionRef f = null;\n if (targetType == I32 && sourceType == FLOAT) {\n f = F2I;\n } else if (targetType == I64 && sourceType == FLOAT) {\n f = F2L;\n } else if (targetType == I32 && sourceType == DOUBLE) {\n f = D2I;\n } else if (targetType == I64 && sourceType == DOUBLE) {\n f = D2L;\n } else {\n throw new IllegalArgumentException();\n }\n Variable v = function.newVariable(targetType);\n function.add(new Call(v, f, op));\n result = v.ref();\n }\n } else {\n if (sootTargetType instanceof soot.ArrayType \n && ((soot.ArrayType) sootTargetType).getElementType() instanceof PrimType) {\n soot.Type primType = ((soot.ArrayType) sootTargetType).getElementType();\n GlobalRef arrayClassPtr = new GlobalRef(\"array_\" + getDescriptor(primType), CLASS_PTR);\n Variable arrayClass = function.newVariable(CLASS_PTR);\n function.add(new Load(arrayClass, arrayClassPtr));\n result = call(CHECKCAST_PRIM_ARRAY, env, arrayClass.ref(), op);\n } else {\n String targetClassName = getInternalName(sootTargetType);\n Trampoline trampoline = new Checkcast(this.className, targetClassName);\n trampolines.add(trampoline);\n result = call(trampoline.getFunctionRef(), env, op);\n }\n }\n } else if (rightOp instanceof InstanceOfExpr) {\n Value op = immediate(stmt, (Immediate) ((InstanceOfExpr) rightOp).getOp());\n soot.Type checkType = ((InstanceOfExpr) rightOp).getCheckType();\n if (checkType instanceof soot.ArrayType \n && ((soot.ArrayType) checkType).getElementType() instanceof PrimType) {\n soot.Type primType = ((soot.ArrayType) checkType).getElementType();\n GlobalRef arrayClassPtr = new GlobalRef(\"array_\" + getDescriptor(primType), CLASS_PTR);\n Variable arrayClass = function.newVariable(CLASS_PTR);\n function.add(new Load(arrayClass, arrayClassPtr));\n result = call(INSTANCEOF_PRIM_ARRAY, env, arrayClass.ref(), op);\n } else {\n String targetClassName = getInternalName(checkType);\n Trampoline trampoline = new Instanceof(this.className, targetClassName);\n trampolines.add(trampoline);\n result = call(trampoline.getFunctionRef(), env, op);\n }\n } else if (rightOp instanceof NewExpr) {\n String targetClassName = getInternalName(((NewExpr) rightOp).getBaseType());\n FunctionRef fn = null;\n if (targetClassName.equals(this.className)) {\n fn = FunctionBuilder.allocator(sootMethod.getDeclaringClass()).ref();\n } else {\n Trampoline trampoline = new New(this.className, targetClassName);\n trampolines.add(trampoline);\n fn = trampoline.getFunctionRef();\n }\n result = call(fn, env);\n } else if (rightOp instanceof NewArrayExpr) {\n NewArrayExpr expr = (NewArrayExpr) rightOp;\n Value size = immediate(stmt, (Immediate) expr.getSize());\n if (expr.getBaseType() instanceof PrimType) {\n result = call(getNewArray(expr.getBaseType()), env, size);\n } else {\n String targetClassName = getInternalName(expr.getType());\n Trampoline trampoline = new Anewarray(this.className, targetClassName);\n trampolines.add(trampoline);\n result = call(trampoline.getFunctionRef(), env, size);\n }\n } else if (rightOp instanceof NewMultiArrayExpr) {\n NewMultiArrayExpr expr = (NewMultiArrayExpr) rightOp;\n if (expr.getBaseType().numDimensions == 1 && expr.getBaseType().getElementType() instanceof PrimType) {\n Value size = immediate(stmt, (Immediate) expr.getSize(0));\n result = call(getNewArray(expr.getBaseType().getElementType()), env, size);\n } else {\n for (int i = 0; i < expr.getSizeCount(); i++) {\n Value size = immediate(stmt, (Immediate) expr.getSize(i));\n Variable ptr = function.newVariable(new PointerType(I32));\n function.add(new Getelementptr(ptr, dims.ref(), 0, i));\n function.add(new Store(size, ptr.ref()));\n }\n Variable dimsI32 = function.newVariable(new PointerType(I32));\n function.add(new Bitcast(dimsI32, dims.ref(), dimsI32.getType()));\n String targetClassName = getInternalName(expr.getType());\n Trampoline trampoline = new Multianewarray(this.className, targetClassName);\n trampolines.add(trampoline);\n result = call(trampoline.getFunctionRef(), env, new IntegerConstant(expr.getSizeCount()), dimsI32.ref());\n }\n } else if (rightOp instanceof InvokeExpr) {\n result = invokeExpr(stmt, (InvokeExpr) rightOp);\n } else if (rightOp instanceof LengthExpr) {\n Value op = immediate(stmt, (Immediate) ((LengthExpr) rightOp).getOp());\n checkNull(stmt, op);\n Variable v = function.newVariable(I32);\n function.add(new Call(v, ARRAY_LENGTH, op));\n result = v.ref();\n } else if (rightOp instanceof NegExpr) {\n NegExpr expr = (NegExpr) rightOp;\n Value op = immediate(stmt, (Immediate) expr.getOp());\n Type rightType = op.getType();\n Variable v = function.newVariable(op.getType());\n if (rightType instanceof IntegerType) {\n function.add(new Sub(v, new IntegerConstant(0, (IntegerType) rightType), op));\n } else {\n function.add(new Fmul(v, new FloatingPointConstant(-1.0, (FloatingPointType) rightType), op));\n }\n result = v.ref();\n } else {\n throw new IllegalArgumentException(\"Unknown type for rightOp: \" + rightOp.getClass());\n }\n } else {\n throw new IllegalArgumentException(\"Unknown type for rightOp: \" + rightOp.getClass());\n }\n \n soot.Value leftOp = stmt.getLeftOp();\n \n if (leftOp instanceof Local) {\n Local local = (Local) leftOp;\n VariableRef v = new VariableRef(local.getName(), new PointerType(getLocalType(leftOp.getType())));\n function.add(new Store(result, v, !sootMethod.getActiveBody().getTraps().isEmpty()));\n } else {\n Type leftType = getType(leftOp.getType());\n Value narrowedResult = narrowFromI32Value(leftType, result);\n if (leftOp instanceof ArrayRef) {\n ArrayRef ref = (ArrayRef) leftOp;\n VariableRef base = (VariableRef) immediate(stmt, (Immediate) ref.getBase());\n Value index = immediate(stmt, (Immediate) ref.getIndex());\n checkNull(stmt, base);\n checkBounds(stmt, base, index);\n if (leftOp.getType() instanceof RefLikeType) {\n call(BC_SET_OBJECT_ARRAY_ELEMENT, env, base, index, narrowedResult);\n } else {\n call(getArrayStore(leftOp.getType()), base, index, narrowedResult);\n }\n } else if (leftOp instanceof InstanceFieldRef) {\n InstanceFieldRef ref = (InstanceFieldRef) leftOp;\n Value base = immediate(stmt, (Immediate) ref.getBase());\n checkNull(stmt, base);\n FunctionRef fn = null;\n if (canAccessDirectly(ref)) {\n fn = new FunctionRef(mangleField(ref.getFieldRef()) + \"_setter\", \n new FunctionType(VOID, ENV_PTR, OBJECT_PTR, getType(ref.getType())));\n } else {\n soot.Type runtimeType = ref.getBase().getType();\n String targetClassName = getInternalName(ref.getFieldRef().declaringClass());\n String runtimeClassName = runtimeType == NullType.v() ? targetClassName : getInternalName(runtimeType);\n Trampoline trampoline = new PutField(this.className, targetClassName, \n ref.getFieldRef().name(), getDescriptor(ref.getFieldRef().type()), runtimeClassName);\n trampolines.add(trampoline);\n fn = trampoline.getFunctionRef();\n }\n call(fn, env, base, narrowedResult);\n } else if (leftOp instanceof StaticFieldRef) {\n StaticFieldRef ref = (StaticFieldRef) leftOp;\n FunctionRef fn = null;\n if (canAccessDirectly(ref)) {\n fn = new FunctionRef(mangleField(ref.getFieldRef()) + \"_setter\", \n new FunctionType(VOID, ENV_PTR, getType(ref.getType())));\n } else {\n String targetClassName = getInternalName(ref.getFieldRef().declaringClass());\n Trampoline trampoline = new PutStatic(this.className, targetClassName, \n ref.getFieldRef().name(), getDescriptor(ref.getFieldRef().type()));\n trampolines.add(trampoline);\n fn = trampoline.getFunctionRef();\n }\n call(fn, env, narrowedResult);\n } else {\n throw new IllegalArgumentException(\"Unknown type for leftOp: \" + leftOp.getClass());\n }\n }\n }", "public void setExpression(Object expression);", "public static BinaryExpression assign(Expression left, Expression right) { throw Extensions.todo(); }", "@Override\n\tpublic Object visitStatement_Assign(Statement_Assign statement_Assign, Object arg) throws Exception {\n\t\tif(statement_Assign.lhs.getTypeName().isType(Type.INTEGER) ||statement_Assign.lhs.getTypeName().isType(Type.BOOLEAN) ){\n\t\t\tstatement_Assign.e.visit(this, arg);\t\t\n\t\t\tstatement_Assign.lhs.visit(this, arg);\n\t\t}\n\t\telse if(statement_Assign.lhs.getTypeName().isType(Type.IMAGE)){\n\t\t\t//if(statement_Assign.lhs.isCartesian){\n\t\t\t\tmv.visitFieldInsn(GETSTATIC, className, statement_Assign.lhs.name, ImageSupport.ImageDesc);\n\t\t\t\tmv.visitInsn(DUP);\n\t\t\t\tmv.visitMethodInsn(INVOKESTATIC, ImageSupport.className, \"getX\", ImageSupport.getXSig, false);\n\t\t\t\tmv.visitIntInsn(ISTORE, 3);\n\t\t\t\tmv.visitMethodInsn(INVOKESTATIC, ImageSupport.className, \"getY\", ImageSupport.getYSig, false);\n\t\t\t\tmv.visitIntInsn(ISTORE, 4);\t\t\t\t\n\t\t\t//}\n\t\t\t\n\t\t\tmv.visitInsn(ICONST_0);\n\t\t\tmv.visitVarInsn(ISTORE, 1);\n\t\t\tLabel l1 = new Label();\n\t\t\tmv.visitLabel(l1);\n\t\t\tLabel l2 = new Label();\n\t\t\tmv.visitJumpInsn(GOTO, l2);\n\t\t\tLabel l3 = new Label();\n\t\t\tmv.visitLabel(l3);\n\t\t\tmv.visitLineNumber(11, l3);\n\t\t\tmv.visitFrame(Opcodes.F_APPEND,1, new Object[] {Opcodes.INTEGER}, 0, null);\n\t\t\tmv.visitInsn(ICONST_0);\n\t\t\tmv.visitVarInsn(ISTORE, 2);\n\t\t\tLabel l4 = new Label();\n\t\t\tmv.visitLabel(l4);\n\t\t\tLabel l5 = new Label();\n\t\t\tmv.visitJumpInsn(GOTO, l5);\n\t\t\tLabel l6 = new Label();\n\t\t\tmv.visitLabel(l6);\n\t\t\tmv.visitFrame(Opcodes.F_APPEND,1, new Object[] {Opcodes.INTEGER}, 0, null);\n\t\t\t\n\t\t\tstatement_Assign.e.visit(this, arg);\n\t\t\tstatement_Assign.lhs.visit(this, arg);\n\t\t\t\n\t\t\tmv.visitIincInsn(2, 1);\n\t\t\tmv.visitLabel(l5);\n\t\t\tmv.visitFrame(Opcodes.F_SAME, 0, null, 0, null);\n\t\t\tmv.visitVarInsn(ILOAD, 2);\n\t\t\tmv.visitIntInsn(ILOAD, 4); // Y MAX VALUE\n\t\t\tmv.visitJumpInsn(IF_ICMPLT, l6);\n\t\t\tLabel l7 = new Label();\n\t\t\tmv.visitLabel(l7);\n\t\t\tmv.visitIincInsn(1, 1);\n\t\t\tmv.visitLabel(l2);\n\t\t\tmv.visitFrame(Opcodes.F_CHOP,1, null, 0, null);\n\t\t\tmv.visitVarInsn(ILOAD, 1);\n\t\t\tmv.visitIntInsn(ILOAD, 3); // X MAX VALUE\n\t\t\tmv.visitJumpInsn(IF_ICMPLT, l3);\n\t\t}\n\t\treturn null;\n\t}", "@Override\r\n\tpublic void visit(FunctionCallExpression functionCallExpression) {\n\r\n\t}", "@Override\n public void visit(final OpAssign opAssign) {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"Starting visiting OpAssign\");\n }\n addOp(OpAssign.assign(rewriteOp1(opAssign), opAssign.getVarExprList()));\n }", "@Test\r\n public void testEval__call__1() throws ScriptException {\r\n Object value = engine.eval(\"java.lang.String()\");\r\n Assert.assertEquals(\"\", value);\r\n }", "@Override\n\tpublic String visitAssignment(AssignmentContext ctx) {\n\t\t\t\n\t\t\t\n\t\t\t\n\t\treturn \"LOAD \"+ ctx.getChild(0)+\" \"+ visitExpr(ctx.expr());\n\t\t\n\t\t\t\n\t\t\n\t}", "public boolean assignCall(Employee emp) {\n\t\treturn true;\n\t}", "Hojas eval();", "@Test\n\tpublic void testAssignment(){\n\t\tVariable x = new Variable(\"x\");\n\t\tOperator plus = new Operator(\"+\");\n\t\tExpression one = f.createNumNode(1);\n\t\tExpression two = f.createNumNode(2);\n\t\tExpression exp = f.createInfixNode(plus, one, two);\n\t\tStatement assign = f.createAssignNode(x,exp);\n\t\tassertEquals(assign.textRepresentation(), \"x = 1 + 2;\");\n\t\n\t\tASTNodeCountVisitor v = new ASTNodeCountVisitor();\n\t\tassign.accept(v);\n\t\tassertEquals(\"assignment test1 fail\", v.numCount, 2);\n\t\tassertEquals(\"assignment test2 fail\", v.infixCount, 1);\n\t\tassertEquals(\"assignment test3 fail\", v.assignCount, 1);\n\t}", "@Override\n public Expression assign(String var, Expression expression) {\n return new Minus(getExpression1().assign(var, expression), getExpression2().assign(var, expression));\n }", "void doSet() throws NotConnectedException\n\t{\n\t\ttry\n\t\t{\n\t\t\tValueExp exp = null;\n\n\t\t\tif (!hasMoreTokens())\n\t\t\t\terr(getLocalizationManager().getLocalizedTextString(\"setCommand\")); //$NON-NLS-1$\n\t\t\telse\n\t\t\t{\n\t\t\t\t// pull the expression\n\t\t\t\tString s = restOfLine();\n\n\t\t\t\t// parse and eval which causes the assignment to occur...\n\t\t\t\tif ( (exp = parseExpression(s)) == null )\n\t\t\t\t\t; // failed parse\n\n\t\t\t\t// make sure contains assignment\n\n\t\t\t\telse if ( !exp.containsAssignment() )\n\t\t\t\t\tthrow new IllegalAccessException(\"=\"); //$NON-NLS-1$\n\n\t\t\t\telse\n\t\t\t\t\tevalExpression(exp);\n\t\t\t}\n\t\t}\n\t\tcatch(IllegalAccessException iae)\n\t\t{\n\t\t\tMap<String, Object> args = new HashMap<String, Object>();\n\t\t\targs.put(\"operator\", iae.getMessage()); //$NON-NLS-1$\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"missingOperator\", args)); //$NON-NLS-1$\n\t\t}\n\t\tcatch(NullPointerException npe)\n\t\t{\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"couldNotEvaluate\")); //$NON-NLS-1$\n\t\t}\n\t}", "public static BinaryExpression addAssignChecked(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "EvaluationResult evalExpression(ValueExp expr) { return evalExpression(expr, true); }", "protected Element evalAssurance(Assurance ass){\n\t\tRecord r1 = ass.getLeftRecord();\n\t\tRecord r2 = ass.getRightRecord();\n\t\tOperator op = ass.getOperator();\n\t\tElement an = el(\"bpws:assign\");\n\t\tif (r1.getType() == RecordType.FORMULAR)\n\t\t\tan.appendChild(setExpr(r1.getFormular(), \"nswomoxsd:leftValue\"));\n\t\tif (r2.getType() == RecordType.FORMULAR)\n\t\t\tan.appendChild(setExpr(r2.getFormular(), \"nswomoxsd:rightValue\"));\n\t\tan.appendChild(\n\t\t\tsetExpr(\n\t\t\t\tgetMyVarPath(\"/nswomoxsd:leftValue\") + \n\t\t\t\top.value() +\n\t\t\t\tgetMyVarPath(\"nswomoxsd:rightValue\"),\n\t\t\t\t\"nswomoxsd:value\"\n\t\t\t)\n\t\t);\n\t\treturn an;\n\t}", "public LlvmValue visit(Assign n){\n\t\t\n\t\tSystem.out.format(\"assign********\\n\");\n\t\t\n\t\tLlvmValue rhs = n.exp.accept(this);\n\t\tLlvmRegister returns;\n\t\t//Nesta parte, para retornarmos o tipo certo, tivemos que converter todos os parametros do tipo\n\t\t//[ A x iB] para ponteiros. o Assembly reclamava quando tinha algum store ou algo do genero com tipos\n\t\t// diferentes\n\t\tif(rhs.type.toString().contains(\"x i\")){\n\t\t\t//System.out.format(\"expressao de rhs envolve arrays. fazendo casting...\\n\");\n\t\t\t\n\t\t\t//Fazer bitcast\n\t\t\tif(rhs.type.toString().contains(\" x i32\")){\n\t\t\t\treturns = new LlvmRegister(LlvmPrimitiveType.I32PTR);\n\t\t\t}else if(rhs.type.toString().contains(\" x i8\")){\n\t\t\t\treturns = new LlvmRegister(new LlvmPointer(LlvmPrimitiveType.I8));\n\t\t\t//Esse else eh meio inutil, mas pelo fato de eu querer usar elseif, deixei ele aqui mesmo.\n\t\t\t}else{\n\t\t\t\treturns = new LlvmRegister(rhs.type);\n\t\t\t}\n\t\t\t\n\t\t\tassembler.add(new LlvmBitcast(returns, rhs, returns.type));\n\t\t\tassembler.add(new LlvmStore(returns, n.var.accept(this)));\n\t\t}else{\n\t\t\t//Caso o tipo ja esteja ok, soh damos store com o rhs mesmo.\n\t\t\tassembler.add(new LlvmStore(rhs, n.var.accept(this)));\n\t\t}\n\t\treturn null;\n\t}", "public static BinaryExpression addAssignChecked(Expression expression0, Expression expression1, Method method, LambdaExpression lambdaExpression) { throw Extensions.todo(); }", "@Override\n\tpublic String visitAssignst(AssignstContext ctx) {\n\t\tParseTree cur = ctx.getChild(0);\n\t\tString left = null;\n\t\tString right = null;\n\t\tif(cur == ctx.ID()){\n\t\t\tString key=visitTerminal((TerminalNode)cur);\n\t\t\tRecord id= table.lookup(key);\n\t\t\tif (id==null) throw new RuntimeException(\"Identifier \"+key+\" is not declared\");\t\t\t\t\t\n\t\t\tleft = id.getReturnType();\n\t\t}\n\t\telse {left = visit(cur);}\n\t\tright = visit(ctx.getChild(2));\n\t\tif(right.equals(left)){\t\t\t\n\t\t\treturn right;\t\t\t\n\t\t}\n\t\telse throw new RuntimeException(\"Not the same type in left and right of Assign\");\n\t}", "double eval();", "abstract void assignOne();", "private void evalExpression () {\n\tif (expr.type != null) {\n\t // Expression ist wie vorgesehen getypt\n\t if (expr.type instanceof M_Bool) {\n\t\t// Expression ist eine boolesche, also :\n\t\tdebug.addMsg(\"# expression to evaluate is boolean.\",3);\n\t\tSimulatorBoolEvaluator boolExpr = new SimulatorBoolEvaluator(process, expr);\n\t\tvalue = new SimulatorBoolValue ( boolExpr.giveResult() );\n\t }\n\t else if (expr.type instanceof M_Int) {\n\t\t// Expression ist eine zu Integer evaluierende, also :\n\t\tdebug.addMsg(\"# expression to evaluate is integer.\",3);\n\t\tSimulatorIntEvaluator intExpr = new SimulatorIntEvaluator(process, expr);\n\t\tvalue = new SimulatorIntValue ( intExpr.giveResult() ); \n\t }\n\t else {\n\t /* Platz für Exception, da Expression falsch getypt */\n\t debug.addMsg(\"!!! EXCEPTION !!! : Expression not properly typed \",0);\n\t debug.addMsg(\"!!! Class: SimulatorExprEvaluator \\n!!! Method : evalExpression\\n!!! Pos.:1 \",0);\n\t }\n\n\t} //--------- end if(1) ------------\n\telse {\n\t // Expression ist nicht getypt also :\n\t debug.addMsg(\"!!! EXCEPTION !!! : Expression not typed \",0);\n\t debug.addMsg(\"!!! Class: SimulatorExprEvaluator \\n!!! Method : evalExpression\\n!!! Pos.:2 \",0);\n\t} //-------- end else --------------\n }", "public static BinaryExpression powerAssign(Expression expression0, Expression expression1, Method method) { throw Extensions.todo(); }", "public interface AttributeAssignmentExpression extends EObject {\r\n\r\n\tObject toProlog(String type, String variableName, String entityName);\r\n\r\n\tString toPrologExecution();\r\n}", "public static BinaryExpression powerAssign(Expression expression0, Expression expression1, Method method, LambdaExpression lambdaExpression) { throw Extensions.todo(); }", "public Object eval( CallStack callstack, Interpreter interpreter )\n throws EvalError\n {\n NameSpace namespace = callstack.top();\n BSHAmbiguousName nameNode = getNameNode();\n\n // get caller info for assert fail\n if (\"fail\".equals(nameNode.text))\n interpreter.getNameSpace().setNode(this);\n\n // Do not evaluate methods this() or super() in class instance space\n // (i.e. inside a constructor)\n if ( namespace.getParent() != null && namespace.getParent().isClass\n && ( nameNode.text.equals(\"super\") || nameNode.text.equals(\"this\") )\n )\n return Primitive.VOID;\n\n Name name = nameNode.getName(namespace);\n Object[] args = getArgsNode().getArguments(callstack, interpreter);\n\n try {\n return name.invokeMethod( interpreter, args, callstack, this);\n } catch (ReflectError e) {\n throw new EvalError(\n \"Error in method invocation: \" + e.getMessage(),\n this, callstack, e);\n } catch (InvocationTargetException e) {\n throw Reflect.targetErrorFromTargetException(\n e, name.toString(), callstack, this);\n } catch ( UtilEvalError e ) {\n throw e.toEvalError( this, callstack );\n }\n }", "public abstract void assign(Object value) throws IllegalStateException, InterruptedException;", "public static Assign run (Assign stmt, QueryChannel channel) {\n Rhs newRhs = stmt.getRhs().accept(visitor, channel);\n if (newRhs == null)\n newRhs = new Rlin(linear(Bound.ONE));\n if (newRhs != stmt.getRhs())\n return new Assign(stmt.getLhs(), newRhs);\n return stmt;\n }", "public String eval(String p1 ) {\n\t}", "public void assign(String id, ExprNode expr) {\n if (expr instanceof ObjectNode && !assignedParams.contains(id)) {\n assignedParams.add(id);\n }\n assignments.put(id, expr);\n }", "public String eval()\r\n\t{\r\n\t\treturn eval(null, null);\r\n\t}", "public abstract boolean setValue(Value value, boolean asAssignment);", "public String evaluate(String expression);", "private Expr visitLocalAssign(LocalAssign n) throws SemanticException { \n Position pos = n.position();\n if (n.operator() == Assign.ASSIGN) return n;\n X10Binary_c.Operator op = n.operator().binaryOperator();\n Local left = (Local) n.left();\n Expr right = n.right();\n Type R = left.type();\n Expr val = visitBinary((X10Binary_c) xnf.Binary(pos, left, op, right).type(R));\n return assign(pos, left, Assign.ASSIGN, val);\n }", "public void assign (String name, StatementParse node, Closure parent){\n Closure exist = find_var(name);\n Value newClosure;\n if (node.getName().equals(\"function\")){\n newClosure = new Closure(parent, node);\n } else {\n newClosure = new Environment(parent, node);\n }\n exist.getValues().put(name, newClosure);\n }", "public CALL(Exp f, ExpList a) {func=f; args=a;}", "public String visit(AssignmentStatement n, LLVMRedux argu) throws Exception {\n String Identifier = n.f0.accept(this, argu);\n String storeArg1 = u.decodeIdentifier(Identifier);\n String type = u.getIdentifierType(Identifier);\n String storeArg2 = n.f2.accept(this, argu);\n u.println(\"store \"+u.javaTypeToLLVMType(type)+\" \"+storeArg2+\", \"+u.pointer(u.javaTypeToLLVMType(type))+\" \"+storeArg1);\n return storeArg1;\n }", "public Object eval(Environment e) \n {\n return val;\n }", "@Override\n public Expression assign(String var, Expression expression) {\n Expression e1 = getEx2().assign(var, expression);\n Expression e2 = getEx2().assign(var, expression);\n return new Log(e1, e2);\n }", "@Test\n public void testAssignment() {\n try {\n Lexer lexer = new Lexer(new StringReader(\"n = 0;\"));\n Parser parser = new Parser(lexer);\n RootNode node = parser.program();\n AssignNode assignment = (AssignNode) node.get(0);\n assertTrue(assignment.getClass() == AssignNode.class);\n } catch (IOException e) {\n fail(e.getMessage());\n }\n }", "public final void rule__RecvExpr__ExpAssignment() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:17660:1: ( ( ruleExpression ) )\r\n // InternalGo.g:17661:2: ( ruleExpression )\r\n {\r\n // InternalGo.g:17661:2: ( ruleExpression )\r\n // InternalGo.g:17662:3: ruleExpression\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getRecvExprAccess().getExpExpressionParserRuleCall_0()); \r\n }\r\n pushFollow(FOLLOW_2);\r\n ruleExpression();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getRecvExprAccess().getExpExpressionParserRuleCall_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "protected Expr visitFieldAssign(FieldAssign n) throws SemanticException { \n Position pos = n.position();\n if (n.operator() == Assign.ASSIGN) return n;\n X10Binary_c.Operator op = n.operator().binaryOperator();\n Field left = (Field) n.left();\n Expr right = n.right();\n Type R = left.type();\n if (left.flags().isStatic()) {\n Expr val = visitBinary((X10Binary_c) xnf.Binary(pos, left, op, right).type(R));\n return assign(pos, left, Assign.ASSIGN, val);\n }\n Expr e = (Expr) left.target();\n Type E = e.type();\n List<Formal> parms = new ArrayList<Formal>();\n Name xn = Name.make(\"x\");\n LocalDef xDef = xts.localDef(pos, xts.Final(), Types.ref(E), xn);\n Formal x = xnf.Formal(pos, xnf.FlagsNode(pos, xts.Final()),\n xnf.CanonicalTypeNode(pos, E), xnf.Id(pos, xn)).localDef(xDef);\n parms.add(x);\n Name yn = Name.make(\"y\");\n Type T = right.type();\n LocalDef yDef = xts.localDef(pos, xts.Final(), Types.ref(T), yn);\n Formal y = xnf.Formal(pos, xnf.FlagsNode(pos, xts.Final()),\n xnf.CanonicalTypeNode(pos, T), xnf.Id(pos, yn)).localDef(yDef);\n parms.add(y);\n Expr lhs = xnf.Field(pos,\n xnf.Local(pos, xnf.Id(pos, xn)).localInstance(xDef.asInstance()).type(E),\n xnf.Id(pos, left.name().id())).fieldInstance(left.fieldInstance()).type(R);\n Expr val = visitBinary((X10Binary_c) xnf.Binary(pos,\n lhs, op, xnf.Local(pos, xnf.Id(pos, yn)).localInstance(yDef.asInstance()).type(T)).type(R));\n Expr res = assign(pos, lhs, Assign.ASSIGN, val);\n Block body = xnf.Block(pos, xnf.Return(pos, res));\n Closure c = synth.makeClosure(pos, R, parms, body, context());\n X10MethodInstance ci = c.closureDef().asType().applyMethod();\n List<Expr> args = new ArrayList<Expr>();\n args.add(0, e);\n args.add(right);\n return xnf.ClosureCall(pos, c, args).closureInstance(ci).type(R);\n }", "public static BinaryExpression powerAssign(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "public void visit(AssignmentOperator n) {\n n.f0.accept(this);\n }", "Syntax.Node ParseAssignment(Token t, Syntax.NodeVar left) throws Exception{\n while (true){\n if(t.type==TokenType.ASSIGNMENT_OPERATOR){\n var right = ParseExpression();\n return new Syntax.AssignmentNode(\":=\", left, right);\n }\n else {\n lexer.putBack(t);\n break;\n //throw new Exception(\"Error in ParseAssignment!!! can't assign it \");\n }\n }\n throw new Exception(\"Error in ParseAssignment!!! \");\n\n }", "private Operation expression(Scope scope, Vector queue)\r\n {\r\n Operation root = expression1(scope, queue);\r\n\r\n if (assign.contains(nextSymbol))\r\n {\r\n Operation op = new Operation();\r\n\r\n op.left = root;\r\n\r\n op.operator = assignmentOperator();\r\n op.right = expression(scope, queue);\r\n\r\n root = op;\r\n }\r\n\r\n return root;\r\n }", "public interface IExpressionRuntime\n{\n Object evaluate();\n}", "@Override\n void execute(RolapEvaluator evaluator) {\n }", "public boolean isAssignment() {\n\t\treturn true;\n\t}", "private static boolean checkForUpdateAssignExpression(MethodDeclaration user, MethodDeclaration recursive, Expression userExpression, Expression recursiveExpression) {\n AssignExpr userAssign = retrieveAssignExpression(userExpression);\n AssignExpr recursiveAssign = retrieveAssignExpression(recursiveExpression);\n\n if (compareAssignOperator(userAssign, recursiveAssign)) {\n return true;\n }\n if (!compareElementContent(user, recursive, retrieveStringExpression(userAssign.getTarget()),\n retrieveStringExpression(recursiveAssign.getTarget()))) {\n return true;\n }\n if (checkDifferentMetaModel(userAssign.getValue(), recursiveAssign.getValue())) {\n return true;\n }\n if (userAssign.getValue().isBinaryExpr()) {\n return checkForUpdateBinaryExpression(user, recursive, userAssign.getValue(), recursiveAssign.getValue());\n }\n return checkForUpdateElementContent(user, recursive, userExpression, recursiveExpression);\n }", "public Expression assign(String var, Expression expression) {\r\n // if this variable is val no meter if is capital or small letter.\r\n if (this.variable.equalsIgnoreCase(var)) {\r\n return expression;\r\n }\r\n return this;\r\n }", "@Override\n\tpublic Void visit(Assign assign) {\n\t\tprintIndent(\"<-\");\n\t\tindent++;\n\t\tassign.id.accept(this);\n\t\tassign.expr.accept(this);\n\t\tindent--;\n\t\treturn null;\n\t}", "public Object VisitAssignmentStatement(ASTAssignmentStatement assignstatement) {\n TypeClass lhstc = (TypeClass) assignstatement.variable().Accept(this);\n TypeClass rhstc = (TypeClass) assignstatement.value().Accept(this);\n Type lhs = lhstc.type();\n Type rhs = rhstc.type();\n \n if (lhs != rhs) {\n CompError.message(assignstatement.line(), \"Lefthand side and righthand \"\n + \"side of an assignment statement must match.\");\n //////System.out.println(\"lhs: \" + lhs + \" rhs: \" + rhs);\n }\n return bt.assignmentStatement(lhstc.value(), rhstc.value());\n }", "public JCExpressionStatement makeAssignment(Tag tag, String varname, JCExpression exp1, JCExpression exp2) {\n return treeMaker.Exec(treeMaker.Assign(treeMaker.Ident(getNameFromString(varname)), treeMaker.Binary(tag, exp1, exp2)));\n }", "public Integer visitAssign(ExprParser.AssignContext ctx) {\n String id = ctx.ID().getText();\n int value = visit(ctx.expr());\n memory.put(id, value);\n return value;\n }", "public JCExpressionStatement makeAssignment(JCExpression lhs, JCExpression rhs) {\n return treeMaker.Exec(treeMaker.Assign(lhs, rhs));\n }", "@Override\n\tpublic Object visit(ASTAssign node, Object data) {\n\t\tnode.jjtGetChild(0).jjtAccept(this, data);\n\t\tSystem.out.print(\" := \");\n\t\tnode.jjtGetChild(1).jjtAccept(this, data);\n\t\treturn null;\n\t}", "public final void superXExpression() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalDroneScript.g:467:2: ( ( ruleXAssignment ) )\r\n // InternalDroneScript.g:468:2: ( ruleXAssignment )\r\n {\r\n // InternalDroneScript.g:468:2: ( ruleXAssignment )\r\n // InternalDroneScript.g:469:3: ruleXAssignment\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXbaseXExpressionAccess().getXAssignmentParserRuleCall()); \r\n }\r\n pushFollow(FOLLOW_2);\r\n ruleXAssignment();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXbaseXExpressionAccess().getXAssignmentParserRuleCall()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public int expressionEval(String expression){\n\n int result = 0;\n\n\n\n return result;\n }", "public static BinaryExpression andAssign(Expression expression0, Expression expression1, Method method) { throw Extensions.todo(); }", "public AssignStatement(Element element) {\n super(element);\n }", "@Override\n public Expression assign(String var, Expression expression) {\n Expression left = super.getLeft();\n Expression right = super.getRight();\n return new Mult(left.assign(var, expression), right.assign(var, expression));\n }", "public void reassignIfNeeded() {\n\t}", "public void assign() {\n\t\tfinal RandomAccess<U> accessor = img.randomAccess();\n\t\tfinal V output = function.createOutput();\n\t\tINPUT input = null;\n\t\twhile (iter.hasNext()) {\n\t\t\tinput = iter.next(input);\n\t\t\tboolean proceed = (condition == null) || (condition.isTrue(input));\n\t\t\tif (proceed) {\n\t\t\t\tfunction.compute(input, output);\n\t\t\t\taccessor.setPosition(iter.getCurrentPoint());\n\t\t\t\taccessor.get().setReal(output.getRealDouble());\n\t\t\t\taccessor.get().setImaginary(output.getImaginaryDouble());\n\t\t\t\t// FIXME\n\t\t\t\t// Note - for real datasets this imaginary assignment may waste cpu\n\t\t\t\t// cycles. Perhaps it can get optimized away by the JIT. But maybe not\n\t\t\t\t// since the type is not really known because this class is really\n\t\t\t\t// constructed from a raw type. We'd need to test how the JIT handles\n\t\t\t\t// this situation. Note that in past incarnations this class used\n\t\t\t\t// assigner classes. The complex version set R & I but the real\n\t\t\t\t// version just set R. We could adopt that approach once again.\n\t\t\t}\n\t\t}\n\t}", "public Object evaluate (Interpreter interp, List sexp)\n throws RunTimeException\n {\n Map<String,Object> shadowed = new HashMap<String,Object>();\n\n for (int i = 0; i < _args.size(); i++) {\n String name = ((Name)_args.elementAt(i)).toString();\n Object val = sexp.elementAt(i);\n\n // shadow this variable\n Object oval = interp.env.get(name);\n if (oval != null) shadowed.put(name, oval);\n else shadowed.put(name, NO_VAL);\n\n // evaluate the argument and bind it to the variable\n interp.env.put(name, interp.evaluateSExp(val));\n }\n\n // evaluate the sexps that constitute this function\n Object result = interp.interpret(_progn);\n\n // copy the values of the shadowed variables back into the environment\n for (Map.Entry<String,Object> entry : shadowed.entrySet()) {\n Object oval = entry.getValue();\n if (oval == NO_VAL) interp.env.remove(entry.getKey());\n else interp.env.put(entry.getKey(), oval);\n }\n\n return result;\n }", "public void visit (AssignmentStatement aStmt)\n {\n // Bind memory in the hash table\n fMemory.put (aStmt.getVariableName (), aStmt.getVariableValue ());\n }", "public final void rule__XMemberFeatureCall__ValueAssignment_1_0_1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalDroneScript.g:17804:1: ( ( ruleXAssignment ) )\r\n // InternalDroneScript.g:17805:2: ( ruleXAssignment )\r\n {\r\n // InternalDroneScript.g:17805:2: ( ruleXAssignment )\r\n // InternalDroneScript.g:17806:3: ruleXAssignment\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXMemberFeatureCallAccess().getValueXAssignmentParserRuleCall_1_0_1_0()); \r\n }\r\n pushFollow(FOLLOW_2);\r\n ruleXAssignment();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXMemberFeatureCallAccess().getValueXAssignmentParserRuleCall_1_0_1_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public void caseAFuncCallExp(AFuncCallExp node)\n {\n inAFuncCallExp(node);\n {\n // don't typecheck name\n List<PExp> copy = new ArrayList<PExp>(node.getParam());\n for(PExp e : copy)\n {\n e.apply(this);\n }\n }\n outAFuncCallExp(node);\n }", "public T caseAssignPlus(AssignPlus object)\n {\n return null;\n }", "public void getAssignment() {\n \n }", "public void setEvalFunction(EvalFunction evalFct) {\n this.evalFct = evalFct;\n this.evalFct.setGame(game);\n this.evalFct.setPlayer(game.nextPlayer());\n listeners.set(0, evalFct);\n }" ]
[ "0.66597915", "0.6601614", "0.64134353", "0.63977915", "0.6353314", "0.6339369", "0.63178325", "0.62484974", "0.6240417", "0.62340975", "0.6197924", "0.6174489", "0.61726516", "0.61318994", "0.6089252", "0.6086018", "0.60633856", "0.6038492", "0.6034738", "0.6002157", "0.59940475", "0.5992844", "0.5956444", "0.59422094", "0.59313345", "0.5923117", "0.58977115", "0.5889257", "0.5878214", "0.58700573", "0.5859397", "0.58545613", "0.5849588", "0.5824138", "0.5821575", "0.57815725", "0.57733107", "0.5772482", "0.5761922", "0.57598066", "0.57482994", "0.571371", "0.5695899", "0.5694664", "0.5694274", "0.56633294", "0.5660579", "0.56505144", "0.55997354", "0.55973727", "0.55817604", "0.5569843", "0.55683994", "0.55435526", "0.5533312", "0.5519878", "0.55061674", "0.5498258", "0.54797274", "0.54796857", "0.5474767", "0.5463623", "0.5444022", "0.54325247", "0.54243267", "0.5408703", "0.53614414", "0.5361323", "0.5352878", "0.5345174", "0.534239", "0.53409207", "0.53283197", "0.53260255", "0.5317523", "0.5307221", "0.53064835", "0.5302723", "0.5302001", "0.52924377", "0.5290329", "0.5287459", "0.5278509", "0.5274237", "0.5271704", "0.52669895", "0.5261086", "0.52553225", "0.52530146", "0.52522385", "0.5251299", "0.524948", "0.5245386", "0.52316165", "0.5222593", "0.52201784", "0.5218702", "0.5208721", "0.5208708", "0.52043426", "0.52028304" ]
0.0
-1
Recursive function to evaluate an expression, returns temporary variable
public static Temp evalExpression(CommonTree tree){ // leaf node, int/float/id if (tree.getChildCount() == 0){ Temp temp = new Temp(temperaryNum++,tree.getType(),tree.getText()); if (tree.getType() == LittleParser.INTLITERAL){ ircode.add(new ThreeOpCode("STOREI",tree.getText(),temp.getName())); } else if(tree.getType() == LittleParser.FLOATLITERAL){ ircode.add(new ThreeOpCode("STOREF",tree.getText(),temp.getName())); } else{ // look up the variable in the symbol table to set type, use var_name instead of $Tx and recycle $Tx temp.setType(allTables.lookupType(temp.getValue().trim())); temp.setName(tree.getText()); temperaryNum--; } return temp; } // Not a leaf node, evaluate children expressions else{ // test for function call if (tree.getType() == LittleParser.FUNC_CALL){ // add IR for evaluating the function and return temperary for return value // after it has been popped off the stack return evalFunction(tree); } // if (tree.getChild(0).getChildCount() == 0 && tree.getChild(1).getChildCount() == 0){ // if () // } Temp left = evalExpression((CommonTree) tree.getChild(0)); Temp right = evalExpression((CommonTree) tree.getChild(1)); Temp temp = new Temp(temperaryNum++,left.getType(), "EXP"); if (tree.getText().contains("+")){ // add if (left.getType() == LittleParser.INTLITERAL && right.getType() == LittleParser.INTLITERAL){ ircode.add(new ThreeOpCode("ADDI",left.getName(),right.getName(),temp.getName())); } else if (left.getType() == LittleParser.FLOATLITERAL || right.getType() == LittleParser.FLOATLITERAL){ ircode.add(new ThreeOpCode("ADDR",left.getName(),right.getName(),temp.getName())); } //both parameters else if (left.getType() == -1 && right.getType() == -1){ //System.out.println(left.getName() + ": " + left.getType() + " " + right.getName() + ": " + right.getType()); // need to lookup symbol in main and then global to find type int ltype = allTables.lookupType(left.name); int rtype = allTables.lookupType(right.name); if (ltype == LittleParser.INTLITERAL && rtype == LittleParser.INTLITERAL){ ircode.add(new ThreeOpCode("ADDI", left.getName(),right.getName(),temp.getName())); } else{ ircode.add(new ThreeOpCode("ADDR", left.getName(),right.getName(),temp.getName())); } } else{ ircode.add(new ThreeOpCode("ADDI",left.getName(),right.getName(),temp.getName())); temp.setType(LittleParser.INTLITERAL); } } else if (tree.getText().contains("-")){ // subtract if (left.getType() == LittleParser.INTLITERAL && right.getType() == LittleParser.INTLITERAL){ ircode.add(new ThreeOpCode("SUBI",left.getName(),right.getName(),temp.getName())); } else if (left.getType() == LittleParser.FLOATLITERAL || right.getType() == LittleParser.FLOATLITERAL){ ircode.add(new ThreeOpCode("SUBR",left.getName(),right.getName(),temp.getName())); } else if (left.getType() == -1 && right.getType() == -1){ //System.out.println(left.getName() + ": " + left.getType() + " " + right.getName() + ": " + right.getType()); // need to lookup symbol in main and then global to find type int ltype = allTables.lookupType(left.name); int rtype = allTables.lookupType(right.name); if (ltype == LittleParser.INTLITERAL && rtype == LittleParser.INTLITERAL){ ircode.add(new ThreeOpCode("SUBI", left.getName(),right.getName(),temp.getName())); } else{ ircode.add(new ThreeOpCode("SUBR", left.getName(),right.getName(),temp.getName())); } } else{ ircode.add(new ThreeOpCode("SUBI",left.getName(),right.getName(),temp.getName())); temp.setType(LittleParser.INTLITERAL); } } else if (tree.getText().contains("*")){ // multiply if (left.getType() == LittleParser.INTLITERAL && right.getType() == LittleParser.INTLITERAL){ //System.out.println("MULTI " + left.getName() + " " + right.getName() + " "+temp.getName()); ircode.add(new ThreeOpCode("MULI",left.getName(),right.getName(),temp.getName())); } else if (left.getType() == LittleParser.FLOATLITERAL || right.getType() == LittleParser.FLOATLITERAL){ //System.out.println("MULTF " + left.getName() + " " + right.getName() + " "+temp.getName()); ircode.add(new ThreeOpCode("MULR",left.getName(),right.getName(),temp.getName())); } else if (left.getType() == -1 && right.getType() == -1){ //System.out.println(left.getName() + ": " + left.getType() + " " + right.getName() + ": " + right.getType()); // need to lookup symbol in main and then global to find type int ltype = allTables.lookupType(left.name); int rtype = allTables.lookupType(right.name); if (ltype == LittleParser.INTLITERAL && rtype == LittleParser.INTLITERAL){ ircode.add(new ThreeOpCode("MULI", left.getName(),right.getName(),temp.getName())); } else{ ircode.add(new ThreeOpCode("MULR", left.getName(),right.getName(),temp.getName())); } } else{ //System.out.println("MULTI " + left.getName() + " " + right.getName() + " "+temp.getName()); ircode.add(new ThreeOpCode("MULI",left.getName(),right.getName(),temp.getName())); temp.setType(LittleParser.INTLITERAL); } } else{ // divide if (right.getType() == LittleParser.INTLITERAL && left.getType() == LittleParser.FLOATLITERAL){ //System.out.println("DIVI " + left.getName() + " " + right.getName() + " "+temp.getName()); ircode.add(new ThreeOpCode("DIVI",left.getName(),right.getName(),temp.getName())); } else if (right.getType() == LittleParser.FLOATLITERAL || left.getType() == LittleParser.FLOATLITERAL){ //System.out.println("DIVF " + left.getName() + " " + right.getName() + " "+temp.getName()); ircode.add(new ThreeOpCode("DIVR",left.getName(),right.getName(),temp.getName())); } else if (left.getType() == -1 && right.getType() == -1){ //System.out.println(left.getName() + ": " + left.getType() + " " + right.getName() + ": " + right.getType()); // need to lookup symbol in main and then global to find type int ltype = allTables.lookupType(left.name); int rtype = allTables.lookupType(right.name); if (ltype == LittleParser.INTLITERAL && rtype == LittleParser.INTLITERAL){ ircode.add(new ThreeOpCode("DIVI", left.getName(),right.getName(),temp.getName())); } else{ ircode.add(new ThreeOpCode("DIVR", left.getName(),right.getName(),temp.getName())); } } else{ //System.out.println("DIVI " + left.getName() + " " + right.getName() + " "+temp.getName()); ircode.add(new ThreeOpCode("DIVI",left.getName(),right.getName(),temp.getName())); temp.setType(LittleParser.INTLITERAL); } } return temp; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "EvaluationResult evalExpression(ValueExp expr) { return evalExpression(expr, true); }", "private String evaluate(String expression) {\n String separators = \"()*+/-\";\n String result;\n // Stack for using in algorithm\n Stack<String> stackOperations = new Stack<String>();\n // Stack for RPN - reverse polish notation\n Stack<String> stackRPN = new Stack<String>();\n // Stack for evaluating answer\n Stack<String> stackTemp = new Stack<String>();\n //splitting expression into tokens\n StringTokenizer stringTokenizer = new StringTokenizer(updateUnaryMinus(expression), separators, true);\n\n while (stringTokenizer.hasMoreTokens()) {\n String token = stringTokenizer.nextToken();\n if (isNumber(token)) {\n stackRPN.push(token);\n } else if (isOpenBracket(token)) {\n stackOperations.push(token);\n } else if (isCloseBracket(token)) {\n while (!isOpenBracket(stackOperations.lastElement())) {\n stackRPN.push(stackOperations.pop());\n }\n stackOperations.pop();\n } else if (isOperator(token)) {\n while (!stackOperations.empty() && isOperator(stackOperations.lastElement())\n && getPrecedence(stackOperations.lastElement()) > getPrecedence(token)) {\n stackRPN.push(stackOperations.pop());\n }\n stackOperations.push(token);\n }\n }\n while (!stackOperations.empty()) {\n stackRPN.push(stackOperations.pop());\n }\n Collections.reverse(stackRPN);\n\n // Evaluation if RPN expression\n while (!stackRPN.empty()) {\n if (isNumber(stackRPN.lastElement())) stackTemp.push(stackRPN.pop());\n else stackTemp.push(makeOperation(stackRPN.pop(), stackTemp.pop(), stackTemp.pop()));\n }\n result = stackTemp.pop();\n return result;\n }", "Result evaluate();", "public Double evaluate() {\n Stack<Operator> operatorStack = new Stack<>();\n Stack<Operand> operandStack = new Stack<>();\n while (!getTokenQueue().isEmpty()) {\n Token token = getTokenQueue().dequeue();\n if (token instanceof Operand) {\n operandStack.push(((Operand) token));\n } else if (token instanceof LeftParen) {\n operatorStack.push(((LeftParen) token));\n } else if (token instanceof RightParen) {\n while (!(operatorStack.peek() instanceof LeftParen)) {\n topEval(operatorStack, operandStack);\n }\n operatorStack.pop();\n } else {\n Operator operator = (((Operator) token));\n while (keepEvaluating(operatorStack, operator)) {\n topEval(operatorStack, operandStack);\n }\n operatorStack.push(operator);\n }\n }\n while (!operatorStack.isEmpty()) {\n topEval(operatorStack, operandStack);\n }\n return operandStack.pop().getValue();\n }", "public static String evaluate( String expr ) \n {\n\tString[] arr = expr.split(\"\\\\s+\");\n\tLLStack<String> nums = new LLStack<String>();\n\tLLStack<String> noClose = new LLStack<String>();\n\tint op = 0;\n\n\tfor(String i : arr){ \n\t if(i.equals(\")\")){ //when you reach the closing parenthesis\n\t\tString top = noClose.pop(); //start going through this part of the expression\n\t\tnums.push(i); //add ( to stack for unload\n\t\t\n\t\twhile(!top.equals(\"(\")){ //until you reach the (, where the expression ends\n\t\t\t \n\t\t if(top.equals(\"+\")) op = 1;\n\t\t else if(top.equals(\"-\")) op = 2;\n\t\t else if(top.equals(\"*\")) op = 3;\n\n\t\t else nums.push(top); //if it's not an operand\n\n\t\t top = noClose.pop();\n\t\t}\n\n\t\tnoClose.push(unload(op, nums));\n\t }\n\t \n\t else noClose.push(i); //pushed into a stack of what's in this ()\n \n\t}//end of for loop \n \n\treturn noClose.peek();\n }", "public int evaluate(){\r\n\t\tString value = expressionTree.getValue();\r\n\t\tint result = 0;\r\n\t\tif (isNumber(value)){\r\n\t\t\treturn stringToNumber(value);\r\n\t\t}\r\n\t\tif (value.equals(\"+\")){\r\n\t\t\tresult = 0;\r\n\t\t\tfor (Iterator<Tree<String>> i = expressionTree.iterator(); i.hasNext();){\r\n\t\t\t\tresult += (new Expression(i.next().toString())).evaluate();\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (value.equals(\"*\")){\r\n\t\t\tresult = 1;\r\n\t\t\tfor (Iterator<Tree<String>> i = expressionTree.iterator(); i.hasNext();){\r\n\t\t\t\tresult *= (new Expression(i.next().toString())).evaluate();\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (value.equals(\"-\")){\r\n\t\t\tresult = (new Expression(expressionTree.getChild(0).toString())).evaluate() -\r\n\t\t\t(new Expression(expressionTree.getChild(1).toString())).evaluate();\r\n\t\t}\r\n\t\tif (value.equals(\"/\")){\r\n\t\t\tresult = (new Expression(expressionTree.getChild(0).toString())).evaluate() /\r\n\t\t\t(new Expression(expressionTree.getChild(1).toString())).evaluate();\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "public Object eval (Object expression);", "public static Temp evalFunction(CommonTree tree){\n\t\tLinkedList<Temp> temps = new LinkedList<Temp>();\n\t\tfor (int k=1; k<tree.getChildCount(); k++){\n\t\t\t//System.out.println(\"SDFJSDF:LJSDL:FJSDF\");\n\t\t\ttemps.add(evalExpression((CommonTree) tree.getChild(k)));\n\t\t\t//\t\t\tircode.add(new ThreeOpCode())\n\t\t}\n\t\tircode.add(new ThreeOpCode(\"PUSH\"));\n\t\t// push the parameters on to the stack\n\t\tfor (int i=1; i < tree.getChildCount(); i++){\n\t\t\tircode.add(new ThreeOpCode(\"PUSH\", temps.get(i-1).name));\n\t\t}\n\t\t// add JSR command\n\t\tircode.add(new ThreeOpCode(\"JSR\", tree.getChild(0).getText()));\n\t\t// pop parameters off the stack\n\t\tfor (int i=1; i < tree.getChildCount(); i++){\n\t\t\tircode.add(new ThreeOpCode(\"POP\"));\n\t\t}\n\t\t// create temperary for return value\n\t\tTemp temp = new Temp(temperaryNum++,tree.getType(),tree.getText());\n\t\t// pop the return value\n\t\tircode.add(new ThreeOpCode(\"POP\", temp.name));\n\t\treturn temp;\n\t}", "Expr expr();", "public int calculate(String s) {\n Deque<Integer> stack = new ArrayDeque<>();\n\n // Init\n int result = 0; // For the on-going result\n int sign = 1; // 1 means positive, -1 means negative\n int operand = 0;\n\n // 1 + 2 + 1\n // The tricky part is that we find an operator/sign first, then we know\n // the operand after that. We save the sign first, and when we evaluate the\n // expression so far, we use that sign.\n\n // Go through the expression string character by character.\n // Evaluate to the left when we find '+', '-', ')', or end of loop.\n // We use a stack when we find parenthesis.\n for (int i = 0; i < s.length(); i++) {\n char c = s.charAt(i);\n if (Character.isDigit(c)) {\n // Form operand, since it could be more than one digit.\n operand = 10 * operand + (c - '0');\n } else if (c == '+') {\n // We can evaluate the expression to the left,\n // with result, sign, operand\n result += sign * operand;\n // Save the recently encountered '+' sign\n sign = 1;\n // Reset operand\n operand = 0;\n } else if (c == '-') {\n // We can evaluate the expression to the left,\n result += sign * operand;\n // Save the '-' sign.\n sign = -1;\n operand = 0;\n } else if (c == '(') {\n // Push the result so far and sign onto the stack, for later use.\n // We push the result first, then sign in the stack.\n stack.push(result);\n stack.push(sign);\n // Reset result, sign, and operand, as if new evaluation begins for the new\n // sub-expression\n result = 0;\n sign = 1;\n operand = 0;\n } else if (c == ')') {\n // We can evaluate the sub-expression to the left.\n result += sign * operand;\n // Now that we know the sub-expression ended, we can also evaluate to the left.\n // First we take the sign out of the stack, and then add the result we saved\n // before to the result of the sub-expression.\n result *= stack.pop();\n result += stack.pop();\n // Reset sign and operand.\n sign = 1;\n operand = 0;\n }\n }\n\n // We need to evaluate again.\n result += sign * operand;\n\n return result;\n }", "public int expressionEval(String expression){\n\n int result = 0;\n\n\n\n return result;\n }", "public String evaluate(String expression);", "public Object eval(String expression) throws Exception;", "public static int evaluateExpression(String expression) {\r\n // Create operandStack of ints to store operands\r\n Stack<Integer> operandStack = new Stack<>();\r\n \r\n // Create operatorStack of characters to store operators\r\n Stack<Character> operatorStack = new Stack<>();\r\n \r\n // Insert Blanks\r\n expression = insertBlanks(expression);\r\n \r\n // Extract operands and operators by splitting around blanks\r\n String[] tokens = expression.split(\" \");\r\n \r\n /* Phase 1: Scan tokens\r\n Enhanced for loop, puts every element of tokens in token each time\r\n Like writing token = tokens[i] every time\r\n */\r\n for (String token: tokens) { \r\n if(token.length() == 0) // It's a blank\r\n continue; // Go to the while loop\r\n else if (token.charAt(0) == '+' || token.charAt(0) == '-') {\r\n // process all +, -, *, / in the top of the operator stack\r\n while (!operatorStack.isEmpty() && // While stack isn't empty\r\n (operatorStack.peek() == '+' || // and has an operator on top\r\n operatorStack.peek() == '-' || // Like if you had (2 * 3) + 5 \r\n operatorStack.peek() == '*' || // Or if you had (2 - 3) + 5, do that last no matter what b/c +- is lowest priority\r\n operatorStack.peek() == '/' ||\r\n operatorStack.peek() == '^')) {\r\n processAnOperator(operandStack, operatorStack);\r\n }\r\n \r\n // After processing the all the previous operations, push the +- operator onto the stack\r\n operatorStack.push(token.charAt(0));\r\n }\r\n else if (token.charAt(0) == '*' || token.charAt(0) == '/') {\r\n // Proess all *, / in the top of the operator stack\r\n while(!operatorStack.isEmpty() &&\r\n (operatorStack.peek() == '*' ||\r\n operatorStack.peek() == '/' ||\r\n operatorStack.peek() == '^')) {\r\n processAnOperator(operandStack, operatorStack);\r\n }\r\n \r\n //Push the * or / onto the stack\r\n operatorStack.push(token.charAt(0));\r\n }\r\n else if (token.charAt(0) == '^') {\r\n // Proess all ^ in the top of the operator stack\r\n while(!operatorStack.isEmpty() &&\r\n (operatorStack.peek() == '^')) {\r\n processAnOperator(operandStack, operatorStack);\r\n }\r\n \r\n //Push the ^ onto the stack\r\n operatorStack.push(token.charAt(0));\r\n }\r\n else if(token.trim().charAt(0) == '(') {\r\n operatorStack.push('(');\r\n } \r\n else if(token.trim().charAt(0) == ')') {\r\n while(operatorStack.peek() != '(') {\r\n processAnOperator(operandStack, operatorStack);\r\n }\r\n operatorStack.pop(); // pop\r\n }\r\n else {\r\n operandStack.push(new Integer(token));\r\n }\r\n }\r\n // Phase two: process everything left over\r\n while (!operatorStack.isEmpty()) {\r\n processAnOperator(operandStack, operatorStack);\r\n }\r\n \r\n return operandStack.pop(); \r\n }", "private double expr(boolean get){\n\t\t// compute the left argument which has to be a primary value or an expression with a higher priority than sums\n\t\tdouble left = term(get);\n\t\t// add all addends until the end of the sum is reached\n\t\tfor(;;){ \n\t\t\tswitch(curr_tok){\n\t\t\t\tcase PLUS:{\n\t\t\t\t\tleft += term(true);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase MINUS:{\n\t\t\t\t\tleft -= term(true);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tdefault:{\n\t\t\t\t\treturn left;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public T expr(final Expression expression) {\r\n\t\tif (expression.values() == null)\r\n\t\t\treturn expr(expression.expression());\r\n\t\treturn expr(expression.expression(), expression.values()\r\n\t\t\t\t.toArray());\r\n\t}", "public static int evaluate(String expression) {\n\n\t\tchar[] tokens = expression.toCharArray();\n\t\t// Stack for numbers: 'values'\n\t\tStack<Integer> values = new Stack<Integer>();\n\t\t// Stack for Operators: 'operators'\n\t\tStack<Character> operators = new Stack<Character>();\n\n\t\tfor (int i = 0; i < tokens.length; i++) {\n\t\t\t// Current token is a whitespace, skip it\n\t\t\tif (tokens[i] == ' ')\n\t\t\t\tcontinue;\n\t\t\t// Current token is a number, push it to stack for numbers\n\t\t\tif (tokens[i] >= '0' && tokens[i] <= '9') {\n\t\t\t\tStringBuffer stringBuffer = new StringBuffer();\n\t\t\t\t// There may be more than one digits in number\n\t\t\t\twhile (i < tokens.length && tokens[i] >= '0' && tokens[i] <= '9') {\n\t\t\t\t\tstringBuffer.append(tokens[i++]);\n\t\t\t\t}\n\t\t\t\tvalues.push(Integer.parseInt(stringBuffer.toString()));\n\t\t\t i--;\n\t\t\t} else if (tokens[i] == '(') {\n\t\t\t // Current token is an opening brace, push it to 'operators'\n\t\t\t\toperators.push(tokens[i]);\n\t\t\t} else if (tokens[i] == ')') {\n\t\t\t // Closing brace encountered, solve entire brace\n\t\t\t\twhile (operators.peek() != '(') {\n\t\t\t\t values.push(applyOperation(operators.pop(), values.pop(), values.pop()));\n\t\t\t }\n\t\t\t\toperators.pop();\n\t\t\t} else if (tokens[i] == '+' || tokens[i] == '-' ||tokens[i] == '*' || tokens[i] == '/') {\n\t\t\t // Current token is an operator.\n\t\t\t\twhile (!operators.empty() && hasPrecedence(tokens[i], operators.peek())) {\n\t\t\t\t values.push(applyOperation(operators.pop(), values.pop(),values.pop()));\n\t\t\t // System.out.println(values.peek());\n\t\t\t }\n\t\t\t\t// Push current token to 'operators'.\n\t\t\t\toperators.push(tokens[i]);\n\t\t\t}\n\t\t}\n\t\t// Entire expression has been parsed at this point, apply remaining operators to remaining values\n\t\twhile (!operators.empty()) {\n\t\t\tvalues.push(applyOperation(operators.pop(), values.pop(), values.pop()));\n\t\t}\n\t\t// Top of 'values' contains result, return it\n\t\treturn values.pop();\n\t}", "private Object eval(Fact expr) {\n if (expr.getBool() != null) {\n if (\"true\".equals(expr.getBool())) {\n return true;\n } else {\n return false;\n }\n } else if (expr.getString() != null) {\n return expr.getString();\n } else if (expr.getIdent() != null) {\n if (RESULT_TYPE_VARIABLE.equals(resultType)) {\n return expr.getIdent();\n }\n return scope.getVariable(expr.getIdent());\n } else if (expr.getExpr() != null) {\n return eval(expr.getExpr(), resultType);\n } else if (expr.getLocator() != null) {\n return evalLocator(expr.getLocator());\n } else {\n return expr.getNumber();\n }\n }", "protected Evaluable parseExpression() throws ParsingException {\n Evaluable sub = parseSubExpression();\n\n while (_token != null &&\n _token.type == TokenType.Operator &&\n \">=<==!=\".indexOf(_token.text) >= 0) {\n\n String op = _token.text;\n\n next(true);\n\n Evaluable sub2 = parseSubExpression();\n\n sub = new OperatorCallExpr(new Evaluable[] { sub, sub2 }, op);\n }\n\n return sub;\n }", "@NotNull\n public final Promise<XExpression> calculateEvaluationExpression() {\n return myValueContainer.calculateEvaluationExpression();\n }", "public static String evaluate( String expr )\n {\n\n\tString[] arr = expr.split(\"//s+\");\n\tString ret = \"\";\n\tALStack<String> stack = new ALStack<String>();\n\tfor( String s: arr)\n\t stack.push(s);\n\n\tif( stack.peek().equals(\"(\")){\n\t stack.pop();\n\t int operator = findOp(stack.pop());\n\t ret = unload(operator, stack);\n\t return ret;\n\t}\n\treturn \"\";\n }", "public static int expression()\r\n {\r\n //get the start state of this term\r\n int r,t1,f1;\r\n t1=r=term();\r\n\r\n //if there is no more input, we are done\r\n if(index>expression.length()-1)\r\n {\r\n return r;\r\n }\r\n\r\n //if this is concatenation\r\n if(expression.charAt(index)=='.'||isVocab(expression.charAt(index))||expression.charAt(index)=='\\\\'\r\n ||expression.charAt(index)=='['||expression.charAt(index)=='(')\r\n {\r\n //get the start state of this expression and\r\n //update next1 and next2\r\n int t2,cur;\r\n cur=state-1;\r\n t2=expression();\r\n if(stateList.get(cur).getNext1()==stateList.get(cur).getNext2())\r\n {\r\n stateList.get(cur).setNext1(t2);\r\n }\r\n stateList.get(cur).setNext2(t2);\r\n\r\n }\r\n\r\n //if there is no more input, we are done\r\n if(index>=expression.length())\r\n {\r\n return r;\r\n }\r\n\r\n //if this is alternation\r\n if(expression.charAt(index)=='|')\r\n {\r\n //if there is nothing after '|', it is a invalid expression\r\n index++;\r\n if(index>expression.length()-1)\r\n {\r\n error();\r\n }\r\n else\r\n {\r\n //create a branch state,set the nex1 of the branch state to the term\r\n //so a|b and a|b|c both work\r\n int t2;\r\n f1=state-1;\r\n\r\n state st=new state(state,\"BR\",t1,-1);\r\n stateList.add(st);\r\n r=state;\r\n state++;\r\n\r\n //get the start state of this expression\r\n t2=expression();\r\n\r\n //update the branch state's next2 to the start state of the expression\r\n stateList.get(f1+1).setNext2(t2);\r\n\r\n //update term's next1 and next2\r\n if(stateList.get(f1).getNext1()==stateList.get(f1).getNext2())\r\n {\r\n stateList.get(f1).setNext1(state);\r\n }\r\n stateList.get(f1).setNext2(state);\r\n\r\n }\r\n\r\n }\r\n\r\n\r\n return r;\r\n }", "private Object evalETree(ETreeNode node) throws FSException{\n Object lVal,rVal;\n\n if ( node == null )\n {\n parseError(\"Malformed expression\");\n // this is never reached, just for readability\n return null;\n }\n\n if (node.type==ETreeNode.E_VAL){\n return node.value;\n }\n lVal=evalETree(node.left);\n rVal=evalETree(node.right);\n\n switch (((Integer)node.value).intValue()){\n //call the various eval functions\n case LexAnn.TT_PLUS:{\n return evalPlus(lVal,rVal);\n }\n case LexAnn.TT_MINUS:{\n return evalMinus(lVal,rVal);\n }\n case LexAnn.TT_MULT:{\n return evalMult(lVal,rVal);\n }\n case LexAnn.TT_DIV:{\n return evalDiv(lVal,rVal);\n }\n case LexAnn.TT_LEQ:{\n return evalEq(lVal,rVal);\n }\n case LexAnn.TT_LNEQ:{\n return evalNEq(lVal,rVal);\n }\n case LexAnn.TT_LLS:{\n return evalLs(lVal,rVal);\n }\n case LexAnn.TT_LLSE:{\n return evalLse(lVal,rVal);\n }\n case LexAnn.TT_LGR:{\n return evalGr(lVal,rVal);\n }\n case LexAnn.TT_LGRE:{\n return evalGre(lVal,rVal);\n }\n case LexAnn.TT_MOD:{\n return evalMod(lVal,rVal);\n }\n case LexAnn.TT_LAND:{\n return evalAnd(lVal,rVal);\n }\n case LexAnn.TT_LOR:{\n return evalOr(lVal,rVal);\n }\n }\n\n return null;\n }", "private double processExpression() throws ParsingException {\n double result = processTerm();\n\n while (true) {\n if (tryCaptureChar('+')) {\n result += processTerm();\n } else if (tryCaptureChar('-')) {\n result -= processTerm();\n } else {\n break;\n }\n }\n return result;\n }", "public String evaluate(String statement) {\n // TODO: Implement the logic here\n\n if (statement == null | statement == \"\"){\n return null;\n }\n\n String addition = \"+\";\n String substraction = \"-\";\n String multiplication = \"*\";\n String division = \"/\";\n String leftbracket = \"(\";\n String rightbracket = \")\";\n\n Stack<String> temporaryStack = new Stack<>();\n Stack<String> inputStack = new Stack<>();\n Stack<String> outputStack = new Stack<>();\n Stack<String> stackOperators = new Stack<>();\n Stack<String> reverseStack = new Stack<>();\n Stack<Double> computingStack = new Stack<>();\n\n String crutch = \"crutch\";\n stackOperators.push(crutch);\n inputStack.push(crutch);\n\n Double leftNumber;\n Double rightNumber;\n Double outResult;\n int stackCounter = 1;\n int reverseCounter = 0;\n\n String solution;\n\n if (statement.contains(\",\") | statement.contains(\"..\") | statement.contains(\"//\")| statement.contains(\"**\") | statement.contains(\"++\") |\n statement.contains(\"--\")) {\n return null;\n }\n\n//преобразование выражения в обратную польскую нотацию\n StringTokenizer stTok = new StringTokenizer(statement, \"+-*/()\", true);\n while (stTok.hasMoreTokens()) {\n temporaryStack.push(stTok.nextToken());\n stackCounter++;\n }\n while (!temporaryStack.isEmpty()){\n inputStack.push(temporaryStack.peek());\n temporaryStack.pop();\n }\n\n for (int i=1; i<stackCounter; i++){\n if (Character.isDigit(inputStack.peek().charAt(0))){\n outputStack.push(inputStack.peek());\n inputStack.pop();\n }\n else if (stackOperators.peek().equals(crutch) && (inputStack.peek().equals(addition) |\n inputStack.peek().equals(substraction) | inputStack.peek().equals(multiplication) |\n inputStack.peek().equals(division))){\n stackOperators.push(inputStack.peek());\n inputStack.pop();\n }\n else if (inputStack.peek().equals(addition) | inputStack.peek().equals(substraction)){\n while (stackOperators.peek().equals(addition) | stackOperators.peek().equals(substraction) |\n stackOperators.peek().equals(multiplication) | stackOperators.peek().equals(division)){\n outputStack.push(stackOperators.peek());\n stackOperators.pop();\n }\n stackOperators.push(inputStack.peek());\n inputStack.pop();\n }\n else if (inputStack.peek().equals(multiplication) | inputStack.peek().equals(division)){\n while (stackOperators.peek().equals(multiplication) | stackOperators.peek().equals(division)){\n outputStack.push(stackOperators.peek());\n stackOperators.pop();\n }\n stackOperators.push(inputStack.peek());\n inputStack.pop();\n }\n else if (inputStack.peek().equals(leftbracket)){\n stackOperators.push(inputStack.peek());\n inputStack.pop();\n }\n else if (inputStack.peek().equals(rightbracket)){\n while (!stackOperators.peek().equals(leftbracket)){\n outputStack.push(stackOperators.peek());\n stackOperators.pop();\n }\n if (stackOperators.peek().equals(crutch)){\n return null;\n }\n inputStack.pop();\n stackOperators.pop();\n }\n }\n while (!stackOperators.peek().equals(crutch)){\n if (stackOperators.peek().equals(leftbracket) | stackOperators.peek().equals(rightbracket)){\n return null;\n } else {\n outputStack.push(stackOperators.peek());\n stackOperators.pop();\n }\n\n }\n while (!outputStack.isEmpty()){\n reverseStack.push(outputStack.peek());\n outputStack.pop();\n reverseCounter++;\n }\n\n//вычисление выражения\n for (int i=0; i<reverseCounter; i++){\n if (Character.isDigit(reverseStack.peek().charAt(0))) {\n computingStack.push(Double.parseDouble(reverseStack.peek()));\n }\n else if (reverseStack.peek().equals(addition)){\n rightNumber = computingStack.peek();\n computingStack.pop();\n leftNumber = computingStack.peek();\n computingStack.pop();\n outResult = leftNumber + rightNumber;\n computingStack.push(outResult);\n }\n else if (reverseStack.peek().equals(substraction)){\n rightNumber = computingStack.peek();\n computingStack.pop();\n leftNumber = computingStack.peek();\n computingStack.pop();\n outResult = leftNumber - rightNumber;\n computingStack.push(outResult);\n }\n else if (reverseStack.peek().equals(multiplication)){\n rightNumber = computingStack.peek();\n computingStack.pop();\n leftNumber = computingStack.peek();\n computingStack.pop();\n outResult = leftNumber * rightNumber;\n computingStack.push(outResult);\n }\n else if (reverseStack.peek().equals(division)){\n rightNumber = computingStack.peek();\n computingStack.pop();\n leftNumber = computingStack.peek();\n computingStack.pop();\n if (rightNumber!=0){\n outResult = leftNumber / rightNumber;\n computingStack.push(outResult);\n } else\n return null;\n }\n reverseStack.pop();\n }\n\n DecimalFormat myFormatter = new DecimalFormat(\"#.####\");\n String format = myFormatter.format(computingStack.peek());\n\n solution = format.replace( ',', '.');\n\n return solution;\n }", "String evaluate();", "public float evaluate() \n {\n return evaluate(expr, expr.length()-1);\n }", "Expression getValue();", "Expression getValue();", "protected abstract Value evaluate();", "public String evaluate(ArrayList<String> expression)\n {\n Stack<String> Values = new Stack<String>(), Operations = new Stack<String>();\n\n for (int i = 0; i < expression.size(); i++)\n\t\t{\n\t\t\tif (expression.get(i).equals(\"(\"))\n Operations.push(expression.get(i));\n else if (expression.get(i).equals(\")\"))\n {\n while (Operations.peek().equals(\"(\"))\n Values.push(apply(Operations.pop(), Values.pop(), Values.pop()));\n Operations.pop();\n }\n else if (expression.get(i).equals(\"+\") || expression.get(i).equals(\"-\") || expression.get(i).equals(\"*\") || expression.get(i).equals(\"/\"))\n {\n while (!Operations.empty() && precedence(expression.get(i), Operations.peek()))\n Values.push(apply(Operations.pop(), Values.pop(), Values.pop()));\n Operations.push(expression.get(i));\n }\n\t\t\telse\n\t\t\t{\n\t\t\t\tValues.push(expression.get(i));\n\t\t\t}\n }\n while (!Operations.empty())\n Values.push(apply(Operations.pop(), Values.pop(), Values.pop()));\n return Values.pop();\n }", "@Override\n public double evaluate() {\n setState(State.START);\n while (true) {\n switch(getState()) {\n case START:\n start();\n break;\n case NUMBER:\n number();\n break;\n case OPERATOR:\n operator();\n break;\n case LEFT_PAREN:\n leftParen();\n break;\n case RIGHT_PAREN:\n rightParen();\n break;\n case END:\n end();\n return (Double)getStack().pop();\n default:\n throw new Error(\"Something is wrong in ParenthesisCalculator.evaluate\");\n }\n }\n }", "@Override\n\tpublic double evaluate() {\n\t\tString var = myChildren.get(0).myChildren.get(0).toString(); //goes two levels down to get variable\n\t\tint start = (int) myChildren.get(0).myChildren.get(1).evaluate(); \n\t\tint end = (int) myChildren.get(0).myChildren.get(2).evaluate(); \n\t\tint increment = (int) myChildren.get(0).myChildren.get(3).evaluate(); \n\t\tdouble returnVal = 0;\n\t\tfor(int i = start; i < end; i += increment) {\n\t\t\tUserVariables.add(var, i);\n\t\t\tfor(Node child : myChildren) {\n\t\t\t\treturnVal = child.evaluate(); //repeatNode will contain a GroupNode, but GroupNodes know how to evaluate themselves\n\t\t\t}\n\t\t}\n\t\treturn returnVal;\n\t}", "public T evaluate(String expr) {\n List<Token> tokens = ExpressionParser.parse(expr);\n Expression expression = ExpressionBuilder.build(tokens);\n Visitor<T> visitor = new ExpressionVisitor<>();\n return visitor.visit(expression);\n }", "private String evaluateExpr(String expr){\n\t\t//bigdecimal used for long user inputs\n\t\tBigDecimal num1, num2, ans, temp = new BigDecimal(\"0\");\n\t\tint check = 1;\n\t\t//find the position of function\n\t\twhile(Character.isDigit(expr.charAt(check)) || expr.charAt(check) == '.')\n\t\t\tcheck++;\n\t\t//extract numbers from expression\n\t\tnum1 = new BigDecimal(expr.substring(0,check));\n\t\tnum2 = new BigDecimal(expr.substring(check + 1,expr.length()));\n\t\t//division by zero error\n\t\tif(num2.compareTo(temp) == 0 && expr.charAt(check) == '/')\n\t\t\treturn \"Invalid\";\n\t\t//evaluate functions\n\t\tif(expr.charAt(check) == '*')\n\t\t\tans = num1.multiply(num2);\n\t\telse if(expr.charAt(check) == '+')\n\t\t\tans = num1.add(num2);\n\t\telse if(expr.charAt(check) == '/')\n\t\t\tans = num1.divide(num2, MathContext.DECIMAL32);\n\t\telse\n\t\t\tans = num1.subtract(num2);\n\t\treturn ans.toString();\n\t}", "public double evaluate(String expression) throws InvalidExpressionException {\n assertProperExpression(expression);\n \n // creating postfix\n String postfix = \"\";\n while (expression.length() > 0) {\n char item = expression.charAt(0);\n expression = expression.substring(1);\n // disregard spaces by\n if (item == ' ') continue;\n // add digits straight to postfix expression\n else if (isDigit(item)) postfix += item;\n // always push '(' on stack no matter what\n else if (item == '(') postfixStack.push('(');\n // dump stack until you hit end parenthesis which is voided\n else if (item == ')') {\n while (postfixStack.peek() != '(') {\n postfix += postfixStack.pop();\n }\n postfixStack.pop();\n continue;\n }\n // item must be operator, so push onto stack after removing higher precedents below it\n else if (isOperator(item)) {\n while (!postfixStack.isEmpty() &&\n isOperator(item) &&\n precedenceOf(postfixStack.peek()) >= precedenceOf(item)) postfix += postfixStack.pop();\n postfixStack.push(item);\n }\n }\n while (!postfixStack.isEmpty()) postfix += postfixStack.pop();\n\n // solving the postfix expression \n while (postfix.length() > 0) {\n char item = postfix.charAt(0);\n postfix = postfix.substring(1);\n\n if (isDigit(item)) solutionStack.push((double) (item - '0'));\n if (isOperator(item)) {\n double y = solutionStack.pop();\n double x = solutionStack.pop();\n if (item == '^') solutionStack.push(Math.pow(x, y));\n if (item == '*') solutionStack.push(x * y);\n if (item == '/') solutionStack.push(x / y);\n if (item == '+') solutionStack.push(x + y);\n if (item == '-') solutionStack.push(x - y);\n }\n }\n\n Double solution = solutionStack.pop();\n return solution;\n }", "private Expr expression() {\n return assignment();\n }", "public int evaluate(String expression) {\n\t\tStack oPSt = new Stack();\n\t\tfor (int i = 0; i < expression.length(); i++) {\n\t\t\tString x = expression.substring(i, i + 1);\n\t\t\tStringBuilder longIntegers = new StringBuilder();\n\t\t\tif (x.equals(\" \"))\n\t\t\t\tcontinue;\n\t\t\telse {\n\t\t\t\tint counter = 0;\n\t\t\t\twhile (counter + i < expression.length()\n\t\t\t\t\t\t&& !expression.substring(i + counter, i + counter + 1).equals(\" \")) {\n\t\t\t\t\tlongIntegers.append(expression.substring(i + counter, i + 1 + counter));\n\t\t\t\t\tcounter++;\n\t\t\t\t}\n\t\t\t\ti = i + counter;\n\t\t\t}\n\t\t\tx = longIntegers.toString();\n\t\t\tif (isNum(x)) {\n\t\t\t\toPSt.push(Float.parseFloat(x));\n\t\t\t} else if (x.equals(\"*\") || x.equals(\"+\") || x.equals(\"/\") || x.equals(\"-\")) {\n\t\t\t\tFloat num1 = (Float) oPSt.pop(), num2 = (Float) oPSt.pop();\n\t\t\t\tif (x.equals(\"+\"))\n\t\t\t\t\toPSt.push(num1 + num2);\n\t\t\t\telse if (x.equals(\"*\"))\n\t\t\t\t\toPSt.push(num1 * num2);\n\t\t\t\telse if (x.equals(\"/\"))\n\t\t\t\t\toPSt.push(num2 / num1);\n\t\t\t\telse\n\t\t\t\t\toPSt.push(num2 - num1);\n\t\t\t} else\n\t\t\t\tthrow new RuntimeException(\"Invalid Input\");\n\n\t\t}\n\t\tif (oPSt.size() == 0)\n\t\t\treturn 0;\n\t\treturn (int)Math.round((Float) oPSt.pop());\n\t}", "private BigDecimal evaluateResult() throws MathematicalError {\n if (!popOutOperationStack()) {\n throw new MathematicalError(\"Mismatched parentheses in the expression\");\n }\n for (ListIterator<String> iterator = outputQueue.listIterator(); iterator.hasNext(); ) {\n String element = iterator.next();\n if (!element.startsWith(valueBaseName)) {\n iterator.remove();\n Operation<BigDecimal, MathematicalError> operation = operationMap.get(element);\n int argumentsCount = operation.getArgumentsCount();\n BigDecimal[] arguments = new BigDecimal[argumentsCount];\n for (int i = 0; i < argumentsCount; ++i) {\n arguments[i] = valueMap.get(iterator.previous());\n iterator.remove();\n }\n String valueName = valueBaseName + valueCount++;\n BigDecimal tempResult = operation.getResult(arguments);\n if (tempResult == null) {\n return null;\n }\n valueMap.put(valueName, tempResult);\n iterator.add(valueName);\n }\n }\n return valueMap.get(outputQueue.get(0));\n }", "public String evaluate(Node root){\n\t\tObject[] args;\n\t\tClass[] types;\n\t\tint i= 0;\n\t\tNode nxt;\n\t\tString fun;\n\t\tfun = root.getValue();\n\t\tClass c=null;\n\t\t\n\t\tLinkedList<Node> children = root.getChildren();\n\n\t\tIterator<Node> iter = children.listIterator();\n\t\tif (!iter.hasNext()){\n\t\t\treturn fun;\n\t\t}\n\t\ttypes= new Class[children.size()];\n\t\targs = new Object[children.size()];\n\t\t\n\t\t//populates types[] for getmethod and args[] for invoke\n\t\twhile (iter.hasNext()) {\n\t\t\tnxt = iter.next();\n\t\t\tfun = evaluate(nxt);\n\t\t\tswitch ( root.getReturnType()[i+1] & 0b1111 ) {\n\t\t\t\t//the argument should be a string\n\t\t\t\tcase STRING:\n\t\t\t\t\tc=String.class;\n\t\t\t\t\targs[i]=fun.replace(\"\\\"\",\"\");\n\t\t\t\t\tbreak;\n\t\t\t\t//the argument should be a float primitive\n\t\t\t\tcase FLOAT:\n\t\t\t\t\tc=float.class;\n\t\t\t\t\targs[i]=new Float(Float.parseFloat(fun));\n\t\t\t\t\tbreak;\n\t\t\t\t//the argument should be a int primitive\n\t\t\t\tcase INTEGER:\n\t\t\t\t\tc=int.class;\n\t\t\t\t\targs[i]=new Integer(Integer.parseInt(fun));\n\t\t\t\t\tbreak;\n\t\t\t\t//the argument should be a Float class\n\t\t\t\tcase BIGFLOAT:\n\t\t\t\t\tc=Float.class;\n\t\t\t\t\targs[i]=new Float(Float.parseFloat(fun));\n\t\t\t\t\tbreak;\n\t\t\t\t//the argument should be an Integer class\n\t\t\t\tcase BIGINTEGER:\n\t\t\t\t\tc=Integer.class;\n\t\t\t\t\targs[i]=new Integer(Integer.parseInt(fun));\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\n\t\t\ttypes[i]=c;\n\t\t\ti ++;\n\t\t\t\n\t\t}\n\t\tfun = root.getValue();\n\t\t\n\t\ttry {\n\t\t\t//get the method at this node and apply it to the evaluation of its children\n\t\t\tfun = \"\" + coms.getMethod(fun, types).invoke(coms, args);\n\t\t}catch (Exception e){\n\t\t\t//this will never ever happen\n\t\t}\n\t\t\n\t\treturn fun;\n\t}", "public ASTNode visitEvaluate(EvaluateContext ctx) {\n ASTExpr expr = (ctx.expr() == null) ? null : (ASTExpr)visit(ctx.expr());\n return new ASTEval(ctx, expr);\n }", "@Override\n\tpublic int evalTree() {\n\t\tint num;\n\t\tExpressionTree left, right;\n\t\t\n\t\ttry {\n\t\t\tnum = Integer.parseInt(EMPTY + this.getValue());\n\n\t\t\treturn num;\n\t\t}\n\n\t\tcatch (NumberFormatException n) {\n\t\t\tleft = new ExpressionTree(getLeft());\n\t\t\tright = new ExpressionTree(getRight());\n\t\t\tif(TIMES_SIGN.equals(this.getValue()))\n\t\t\t\treturn left.evalTree() * right.evalTree();\n\t\t\telse\n\t\t\t\treturn left.evalTree() + right.evalTree();\n\t\t}\n\t}", "private double parseExpression() {\n\t\tdouble value = parseTerm();\n\t\twhile (true) {\n\t\t\tif (token.getType().equals(Token.Type.PLUS)) { // addition\n\t\t\t\ttoken=lexer.getNextToken();\n\t\t\t\tvalue += parseTerm();\n\t\t\t} else if (token.getType().equals(Token.Type.MINUS)) { // subtraction\n\t\t\t\ttoken = lexer.getNextToken();\n\t\t\t\tvalue -= parseTerm();\n\t\t\t} else {\n\t\t\t\treturn value;\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args) {\n\n System.out.println(\"119.1+(28.2+37.3*(46.4-55.5)-4.6+(3/2)+1) = \" + evaluateExpression(\"119.1 + ( 28.2 + 37.3 * ( 46.4 - 55.5 ) - 4.6 + ( 3 / 2 ) + 1 )\"));\n\n}", "Expression getRValue();", "private Boolean evaluateBooleanExpression(Expression expr, InMemoryExpressionEvaluator eval)\n {\n try\n {\n Object result = expr.evaluate(eval);\n return (result instanceof InMemoryFailure) ? Boolean.FALSE : (Boolean)result;\n }\n catch (VariableNotSetException vnse)\n {\n if (NucleusLogger.QUERY.isDebugEnabled())\n {\n NucleusLogger.QUERY.debug(Localiser.msg(\"021024\", vnse.getVariableExpression().getId(), StringUtils.objectArrayToString(vnse.getValues())));\n }\n\n // TODO The iteration through possible variable values needs improving. We currently just drop out\n // to here with the possible values of a variable when first encountered (and not yet set), which\n // then starts the iteration process. This likely would fail if 2 or more variables (unchecked)\n if (vnse.getValues() == null || vnse.getValues().length == 0)\n {\n // No values available for this variable, so just put null and see the result\n eval.setVariableValue(vnse.getVariableExpression().getId(), null);\n if (NucleusLogger.QUERY.isDebugEnabled())\n {\n NucleusLogger.QUERY.debug(Localiser.msg(\"021025\", vnse.getVariableExpression().getId(), \"(null)\"));\n }\n if (Boolean.TRUE.equals(evaluateBooleanExpression(expr, eval)))\n {\n return Boolean.TRUE;\n }\n }\n else\n {\n // Set this variable and start iteration over the possible variable values\n for (int i=0;i<vnse.getValues().length;i++)\n {\n eval.setVariableValue(vnse.getVariableExpression().getId(), vnse.getValues()[i]);\n if (NucleusLogger.QUERY.isDebugEnabled())\n {\n NucleusLogger.QUERY.debug(Localiser.msg(\"021025\", vnse.getVariableExpression().getId(), vnse.getValues()[i]));\n }\n if (Boolean.TRUE.equals(evaluateBooleanExpression(expr, eval)))\n {\n return Boolean.TRUE;\n }\n }\n }\n\n // No variable value was successful so return FALSE\n if (NucleusLogger.QUERY.isDebugEnabled())\n {\n NucleusLogger.QUERY.debug(Localiser.msg(\"021026\", vnse.getVariableExpression().getId()));\n }\n eval.removeVariableValue(vnse.getVariableExpression().getId());\n return Boolean.FALSE;\n }\n }", "public Node expression()\r\n\t{\r\n\t\tNode lhs = term();\r\n\t\tif(lhs!=null)\r\n\t\t{\r\n\t\t\tint index = lexer.getPosition();\r\n\t\t\tLexer.Token token = lexer.getToken();\r\n\t\t\twhile(token == Lexer.Token.PLUS\r\n\t\t\t\t||token == Lexer.Token.MINUS)\r\n\t\t\t{\r\n\t\t\t\tNode rhs = term(); \r\n\t\t\t\tif(rhs!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tif(token == Lexer.Token.PLUS)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tlhs = new Add(lhs,rhs);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(token == Lexer.Token.MINUS)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tlhs = new Sub(lhs,rhs);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tindex = lexer.getPosition();\r\n\t\t\t\t\ttoken = lexer.getToken();\r\n\t\t\t\t}\r\n\t\t\t\telse break;\r\n\t\t\t}\r\n\t\t\tlexer.setPosition(index);\r\n\t\t}\r\n\t\treturn lhs;\r\n\t}", "double parseExpression() {\n double x = parseTerm();\n for (;;) {\n if (eat('+')) x += parseTerm(); // addition\n else if (eat('-')) x -= parseTerm(); // subtraction\n else return x;\n }\n }", "double parseExpression() {\n double x = parseTerm();\n for (;;) {\n if (eat('+')) x += parseTerm(); // addition\n else if (eat('-')) x -= parseTerm(); // subtraction\n else return x;\n }\n }", "int parseExpression() {\r\n\t\t\t\tint x = parseTerm();\r\n\t\t\t\tfor (;;) {\r\n\t\t\t\t\tif (eat('+'))\r\n\t\t\t\t\t\tx += parseTerm(); // addition\r\n\t\t\t\t\telse if (eat('-'))\r\n\t\t\t\t\t\tx -= parseTerm(); // subtraction\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\treturn x;\r\n\t\t\t\t}\r\n\t\t\t}", "public int eval() {\n\t\t\treturn eval(expression.root);\n\t\t}", "protected Evaluable parseFactor() throws ParsingException {\n if (_token == null) {\n throw makeException(\"Expecting something more at end of expression\");\n }\n\n Evaluable eval = null;\n\n if (_token.type == TokenType.String) {\n eval = new LiteralExpr(_token.text);\n next(false);\n } else if (_token.type == TokenType.Regex) {\n RegexToken t = (RegexToken) _token;\n\n try {\n Pattern pattern = Pattern.compile(_token.text, t.caseInsensitive ? Pattern.CASE_INSENSITIVE : 0);\n eval = new LiteralExpr(pattern);\n next(false);\n } catch (Exception e) {\n throw makeException(\"Bad regular expression (\" + e.getMessage() + \")\");\n }\n } else if (_token.type == TokenType.Number) {\n eval = new LiteralExpr(((NumberToken)_token).value);\n next(false);\n } else if (_token.type == TokenType.Operator && _token.text.equals(\"-\")) { // unary minus?\n next(true);\n\n if (_token != null && _token.type == TokenType.Number) {\n Number n = ((NumberToken)_token).value;\n\n eval = new LiteralExpr(n instanceof Long ? -n.longValue() : -n.doubleValue());\n\n next(false);\n } else {\n throw makeException(\"Bad negative number\");\n }\n } else if (_token.type == TokenType.Identifier) {\n String text = _token.text;\n next(false);\n\n if (_token == null || _token.type != TokenType.Delimiter || !_token.text.equals(\"(\")) {\n eval = \"null\".equals(text) ? new LiteralExpr(null) : new VariableExpr(text);\n } else if( \"PI\".equals(text) ) {\n eval = new LiteralExpr(Math.PI);\n next(false);\n } else {\n Function f = ControlFunctionRegistry.getFunction(text);\n Control c = ControlFunctionRegistry.getControl(text);\n if (f == null && c == null) {\n throw makeException(\"Unknown function or control named \" + text);\n }\n\n next(true); // swallow (\n\n List<Evaluable> args = parseExpressionList(\")\");\n\n if (c != null) {\n Evaluable[] argsA = makeArray(args);\n String errorMessage = c.checkArguments(argsA);\n if (errorMessage != null) {\n throw makeException(errorMessage);\n }\n eval = new ControlCallExpr(argsA, c);\n } else {\n eval = new FunctionCallExpr(makeArray(args), f);\n }\n }\n } else if (_token.type == TokenType.Delimiter && _token.text.equals(\"(\")) {\n next(true);\n\n eval = parseExpression();\n\n if (_token != null && _token.type == TokenType.Delimiter && _token.text.equals(\")\")) {\n next(false);\n } else {\n throw makeException(\"Missing )\");\n }\n } else if (_token.type == TokenType.Delimiter && _token.text.equals(\"[\")) { // [ ... ] array\n next(true); // swallow [\n\n List<Evaluable> args = parseExpressionList(\"]\");\n\n eval = new FunctionCallExpr(makeArray(args), new ArgsToArray());\n } else {\n throw makeException(\"Missing number, string, identifier, regex, or parenthesized expression\");\n }\n\n while (_token != null) {\n if (_token.type == TokenType.Operator && _token.text.equals(\".\")) {\n next(false); // swallow .\n\n if (_token == null || _token.type != TokenType.Identifier) {\n throw makeException(\"Missing function name\");\n }\n\n String identifier = _token.text;\n next(false);\n\n if (_token != null && _token.type == TokenType.Delimiter && _token.text.equals(\"(\")) {\n next(true); // swallow (\n\n Function f = ControlFunctionRegistry.getFunction(identifier);\n if (f == null) {\n throw makeException(\"Unknown function \" + identifier);\n }\n\n List<Evaluable> args = parseExpressionList(\")\");\n args.add(0, eval);\n\n eval = new FunctionCallExpr(makeArray(args), f);\n } else {\n eval = new FieldAccessorExpr(eval, identifier);\n }\n } else if (_token.type == TokenType.Delimiter && _token.text.equals(\"[\")) {\n next(true); // swallow [\n\n List<Evaluable> args = parseExpressionList(\"]\");\n args.add(0, eval);\n\n eval = new FunctionCallExpr(makeArray(args), ControlFunctionRegistry.getFunction(\"get\"));\n } else {\n break;\n }\n }\n\n return eval;\n }", "Expression getExp();", "public static Expression reduce(Expression expression) { throw Extensions.todo(); }", "private Object parseExpr() throws IOException, FSException{\n\n ETreeNode curNode=null;\n boolean end=false;\n Object val;\n boolean negate=false; //flag for unary minus\n boolean not=false;//flag for unary not.\n boolean prevOp=true;//flag - true if previous value was an operator\n\n while (!end){\n\n switch (tok.ttype) {\n\n\n //the various possible 'values'\n case LexAnn.TT_INTEGER:\n case LexAnn.TT_DOUBLE:\n case LexAnn.TT_STRING:\n case LexAnn.TT_WORD:\n case LexAnn.TT_FUNC:\n case LexAnn.TT_NULL:\n case LexAnn.TT_ARRAY:{\n\n if (!prevOp){\n parseError(\"Expected Operator\");\n } else {\n\n val=null;\n ETreeNode node=new ETreeNode();\n node.type=ETreeNode.E_VAL;\n\n switch (tok.ttype){\n //numbers - just get them\n case LexAnn.TT_INTEGER:{\n val=tok.value;\n break;\n }\n case LexAnn.TT_DOUBLE:{\n val=tok.value;\n break;\n }\n //functions - evaluate them\n case LexAnn.TT_FUNC:{\n String name=(String)tok.value;\n getNextToken();\n val=parseCallFunc(name);\n break;\n }\n //arrays - evaluate them\n case LexAnn.TT_ARRAY:{\n String name=(String)tok.value;\n getNextToken(); //should be a '['\n getNextToken(); //should be the index\n Object index=parseExpr();\n try {\n val=host.getVarEntry(name,index);\n } catch (Exception e) {\n parseError(e.getMessage());\n }\n break;\n }\n //variables - resolve them\n case LexAnn.TT_WORD:{\n if (hasVar((String)tok.value)) {\n val=getVar((String)tok.value);\n } else {\n try {\n val=host.getVarEntry((String)tok.value,null);\n } catch (Exception e) {\n parseError(e.getMessage());\n }\n }\n break;\n }\n //strings - just get again\n case LexAnn.TT_STRING:{\n val=tok.value;\n break;\n }\n //null\n case LexAnn.TT_NULL:{\n val=new FSObject(null);\n break;\n }\n }\n\n //unary not\n if (not){\n if (val instanceof Integer){\n if (((Integer)val).intValue()==0){\n val=FS_TRUE;\n } else {\n val=FS_FALSE;\n }\n not=false;\n } else if (val instanceof FSObject && ((FSObject)val).getObject() instanceof Boolean) {\n if (((FSObject)val).getObject().equals(Boolean.FALSE)) {\n val=FS_TRUE;\n } else {\n val=FS_FALSE;\n }\n } else if (val instanceof FSObject && ((FSObject)val).getObject() instanceof Integer) {\n if (((Integer)((FSObject)val).getObject()).intValue()==0) {\n val=FS_TRUE;\n } else {\n val=FS_FALSE;\n }\n } else {\n String msg=val.getClass().getName();\n if (val instanceof FSObject) msg=\"FSObject with \"+((FSObject)val).getNullClass().getName();\n parseError(\"Type mismatch for ! \"+msg);\n }\n }\n\n //unary minus\n if (negate) {\n if (val instanceof Integer){\n val=new Integer(-((Integer)val).intValue());\n } else if (val instanceof Double){\n val=new Double(-((Double)val).doubleValue());\n } else {\n parseError(\"Type mistmatch for unary -\");\n }\n }\n\n node.value=val;\n\n if (curNode!=null){\n if (curNode.left==null){\n curNode.left=node;\n node.parent=curNode;\n curNode=node;\n\n } else if (curNode.right==null){\n curNode.right=node;\n node.parent=curNode;\n curNode=node;\n\n }\n } else {\n curNode=node;\n }\n\n prevOp=false;\n }\n break;\n }\n /*operators - have to be more carefull with these.\n We build an expression tree - inserting the nodes at the right\n points to get a reasonable approximation to correct operator\n precidence*/\n case LexAnn.TT_LEQ:\n case LexAnn.TT_LNEQ:\n case LexAnn.TT_MULT:\n case LexAnn.TT_DIV:\n case LexAnn.TT_MOD:\n case LexAnn.TT_PLUS:\n case LexAnn.TT_MINUS:\n case LexAnn.TT_LGR:\n case LexAnn.TT_LGRE:\n case LexAnn.TT_LLSE:\n case LexAnn.TT_LLS:\n case LexAnn.TT_NOT:\n case LexAnn.TT_LAND:\n case LexAnn.TT_LOR: {\n if (prevOp){\n if (tok.ttype==LexAnn.TT_MINUS){\n negate=true;\n } else if (tok.ttype==LexAnn.TT_NOT){\n not=true;\n } else {\n parseError(\"Expected Expression\");\n }\n } else {\n\n ETreeNode node=new ETreeNode();\n\n node.type=ETreeNode.E_OP;\n node.value=new Integer(tok.ttype);\n\n if (curNode.parent!=null){\n\n int curPrio=getPrio(tok.ttype);\n int parPrio=\n getPrio(((Integer)curNode.parent.value).intValue());\n\n if (curPrio<=parPrio){\n //this nodes parent is the current nodes grandparent\n node.parent=curNode.parent.parent;\n //our nodes left leg is now linked into the current nodes\n //parent\n node.left=curNode.parent;\n //hook into grandparent\n if (curNode.parent.parent!=null){\n curNode.parent.parent.right=node;\n }\n\n //the current nodes parent is now us (because of above)\n curNode.parent=node;\n //set the current node.\n curNode=node;\n } else {\n //current node's parent's right is now us.\n curNode.parent.right=node;\n //our nodes left is the current node.\n node.left=curNode;\n //our nodes parent is the current node's parent.\n node.parent=curNode.parent;\n //curent nodes parent is now us.\n curNode.parent=node;\n //set the current node.\n curNode=node;\n }\n } else {\n //our node's left is the current node\n node.left=curNode;\n //current node's parent is us now\n //we don't have to set our parent, as it is null.\n curNode.parent=node;\n //set current node\n curNode=node;\n }\n prevOp=true;\n }\n break;\n }\n case '(':\n //start of an bracketed expression, recursively call ourself\n //to get a value\n {\n getNextToken();\n val=parseExpr();\n\n if (negate) {\n if (val instanceof Integer){\n val=new Integer(-((Integer)val).intValue());\n } else if (val instanceof Double){\n val=new Double(-((Double)val).doubleValue());\n } else {\n parseError(\"Type mistmatch for unary -\");\n }\n }\n\n ETreeNode node=new ETreeNode();\n node.value=val;\n node.type=ETreeNode.E_VAL;\n\n if (curNode!=null){\n if (curNode.left==null){\n curNode.left=node;\n node.parent=curNode;\n curNode=node;\n\n } else if (curNode.right==null){\n curNode.right=node;\n node.parent=curNode;\n curNode=node;\n\n }\n } else {\n curNode=node;\n }\n prevOp=false;\n break;\n }\n\n default: {\n end=true;\n }\n\n }\n if (!end){\n tok.nextToken();\n }\n }\n\n //find the top of the tree we just built.\n if (curNode==null) parseError(\"Missing Expression\");\n while(curNode.parent!=null){\n curNode=curNode.parent;\n }\n\n\n return evalETree(curNode);\n\n }", "private TreeNode exprTreeHelper(String expr) {\n if (expr.charAt(0) != '(') {\n return new TreeNode(expr); // you fill this in\n } else {\n // expr is a parenthesized expression.\n // Strip off the beginning and ending parentheses,\n // find the main operator (an occurrence of + or * not nested\n // in parentheses, and construct the two subtrees.\n int nesting = 0;\n int opPos = 0;\n for (int k = 1; k < expr.length() - 1; k++) {\n // you supply the missing code\n \tif (nesting == 0) {\n \t\tif (expr.charAt(k) == '+' || expr.charAt(k) == '*') {\n \t\t\topPos = k;\n \t\t}\n \t}\n \tif (expr.charAt(k) == '(') {\n \t\tnesting++;\n \t} else if (expr.charAt(k) == ')') {\n \t\tnesting--;\n \t}\n }\n String opnd1 = expr.substring(1, opPos);\n String opnd2 = expr.substring(opPos + 1, expr.length() - 1);\n String op = expr.substring(opPos, opPos + 1);\n System.out.println(\"expression = \" + expr);\n System.out.println(\"operand 1 = \" + opnd1);\n System.out.println(\"operator = \" + op);\n System.out.println(\"operand 2 = \" + opnd2);\n System.out.println();\n return new TreeNode(op, exprTreeHelper(opnd1), exprTreeHelper(opnd2)); // you fill this in\n }\n }", "XExpression getExpression();", "public double evaluate(double x);", "@Test\n void scEvaluate() {\n StandardCalc sc = new StandardCalc();\n String expression = (\"( 5 * ( 6 + 7 ) ) - 2\");\n float result = 0f;\n try {\n result = sc.evaluate(expression);\n } catch (InvalidExpressionException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n assertEquals(result, 63);\n }", "public static Expression transform(Expression input){\n\t\tshouldBeIgnored = false;\n\t\tif(check(input) == false) return null;\n\n\t\treturn recursiveTransform(input);\n\t}", "protected IExpressionValue expression() throws TableFunctionMalformedException,\r\n\t\t\t\t\t\t\t\t\t\t\t\t InvalidProbabilityRangeException,\r\n\t\t\t\t\t\t\t\t\t\t\t\t SomeStateUndeclaredException{\r\n\t\t\r\n\t\t// temp table already created by upper caller\r\n\t\t\r\n\t\tIExpressionValue temp1 = term();\r\n\t\tIExpressionValue temp2 = null;\r\n\t\t\r\n\t\tFloat temp1Value = null;\r\n\t\tFloat temp2Value = null;\r\n\t\t// LOOK FOR +/- (OPTIONAL)\r\n\t\tswitch (look) {\r\n\t\tcase '+':\r\n\t\t\tmatch('+');\r\n\t\t\ttemp2 = term();\r\n\t\t\ttry {\r\n\t\t\t\ttemp1Value = Float.parseFloat(temp1.getValue());\r\n\t\t\t} catch (NumberFormatException e) {\r\n\t\t\t\ttemp1Value = Float.NaN;\r\n\t\t\t}\r\n\t\t\ttry {\r\n\t\t\t\ttemp2Value = Float.parseFloat(temp2.getValue());\r\n\t\t\t} catch (NumberFormatException e) {\r\n\t\t\t\ttemp2Value = Float.NaN;\r\n\t\t\t}\r\n\t\t\tif (!Float.isNaN(temp1Value) && !Float.isNaN(temp2Value)) {\r\n\t\t\t\t// TODO cut the subtree if it is a known value...\r\n\t\t\t\ttemp1 = new AddOperationProbabilityValue(\r\n\t\t\t\t\t\ttemp1.isFixedValue()?(new SimpleProbabilityValue(temp1Value)):temp1 ,\r\n\t\t\t\t\t\t\t\ttemp2.isFixedValue()?(new SimpleProbabilityValue(temp2Value)):temp2);\r\n\t\t\t}\t\t\r\n\t\t\tbreak;\r\n\t\tcase '-':\r\n\t\t\tmatch('-');\r\n\t\t\ttemp2 = term();\r\n\t\t\ttry {\r\n\t\t\t\ttemp1Value = Float.parseFloat(temp1.getValue());\r\n\t\t\t} catch (NumberFormatException e) {\r\n\t\t\t\ttemp1Value = Float.NaN;\r\n\t\t\t}\r\n\t\t\ttry {\r\n\t\t\t\ttemp2Value = Float.parseFloat(temp2.getValue());\r\n\t\t\t} catch (NumberFormatException e) {\r\n\t\t\t\ttemp2Value = Float.NaN;\r\n\t\t\t}\r\n\t\t\tif (!Float.isNaN(temp1Value) && !Float.isNaN(temp2Value)){\r\n\t\t\t\t// TODO cut the subtree if it is known value...\r\n\t\t\t\ttemp1 = new SubtractOperationProbabilityValue(\r\n\t\t\t\t\t\ttemp1.isFixedValue()?(new SimpleProbabilityValue(temp1Value)):temp1 ,\r\n\t\t\t\t\t\t\t\ttemp2.isFixedValue()?(new SimpleProbabilityValue(temp2Value)):temp2);\r\n\t\t\t}\t\t\t\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t\t// Debug.println(\"Expression returned \" + temp1.getProbability());\r\n\t\treturn temp1;\r\n\t}", "private TreeNode exprTreeHelper(String expr) {\n if (expr.charAt(0) != '(') {\n \n \treturn new TreeNode(expr); // you fill this in\n } else{\n // expr is a parenthesized expression.\n // Strip off the beginning and ending parentheses,\n // find the main operator (an occurrence of + or * not nested\n // in parentheses, and construct the two subtrees.\n int nesting = 0;\n int opPos = 0;\n char myChar='\\0';\n \n for (int k = 1; k < expr.length() - 1; k++) {\n myChar = expr.charAt(k);\n \tif(myChar == '('){\n \tnesting++;\n }\n if(myChar==')'){\n \tnesting--;\n }\n if(nesting == 0){\n \tif(myChar == '+' || myChar == '*'){\n \t\topPos = k;\n \t break;\t\n \t}\n }\n }\n \n String opnd1 = expr.substring(1, opPos);\n String opnd2 = expr.substring(opPos + 1, expr.length() - 1);\n String op = expr.substring(opPos, opPos + 1);\n System.out.println(\"expression = \" + expr);\n System.out.println(\"operand 1 = \" + opnd1);\n System.out.println(\"operator = \" + op);\n System.out.println(\"operand 2 = \" + opnd2);\n System.out.println();\n return new TreeNode(op,exprTreeHelper(opnd1),exprTreeHelper(opnd2));\n \n }\n }", "private void evalExpression () {\n\tif (expr.type != null) {\n\t // Expression ist wie vorgesehen getypt\n\t if (expr.type instanceof M_Bool) {\n\t\t// Expression ist eine boolesche, also :\n\t\tdebug.addMsg(\"# expression to evaluate is boolean.\",3);\n\t\tSimulatorBoolEvaluator boolExpr = new SimulatorBoolEvaluator(process, expr);\n\t\tvalue = new SimulatorBoolValue ( boolExpr.giveResult() );\n\t }\n\t else if (expr.type instanceof M_Int) {\n\t\t// Expression ist eine zu Integer evaluierende, also :\n\t\tdebug.addMsg(\"# expression to evaluate is integer.\",3);\n\t\tSimulatorIntEvaluator intExpr = new SimulatorIntEvaluator(process, expr);\n\t\tvalue = new SimulatorIntValue ( intExpr.giveResult() ); \n\t }\n\t else {\n\t /* Platz für Exception, da Expression falsch getypt */\n\t debug.addMsg(\"!!! EXCEPTION !!! : Expression not properly typed \",0);\n\t debug.addMsg(\"!!! Class: SimulatorExprEvaluator \\n!!! Method : evalExpression\\n!!! Pos.:1 \",0);\n\t }\n\n\t} //--------- end if(1) ------------\n\telse {\n\t // Expression ist nicht getypt also :\n\t debug.addMsg(\"!!! EXCEPTION !!! : Expression not typed \",0);\n\t debug.addMsg(\"!!! Class: SimulatorExprEvaluator \\n!!! Method : evalExpression\\n!!! Pos.:2 \",0);\n\t} //-------- end else --------------\n }", "Object completeExternalFunctionEvaluation() {\n\t\tRTObject returnedObj = null;\r\n\t\twhile (evaluationStack.size() > originalEvaluationStackHeight) {\r\n\t\t\tRTObject poppedObj = popEvaluationStack();\r\n\t\t\tif (returnedObj == null)\r\n\t\t\t\treturnedObj = poppedObj;\r\n\t\t}\r\n\r\n\t\t// Restore our own state\r\n\t\tcallStack = originalCallstack;\r\n\t\toriginalCallstack = null;\r\n\t\toriginalEvaluationStackHeight = 0;\r\n\t\t\r\n\t\t// Restore the callstack that the variablesState uses\r\n\t\tvariablesState.setCallStack(callStack);\r\n\r\n\t\t// What did we get back?\r\n\t\tif (returnedObj != null) {\r\n\t\t\tif (returnedObj instanceof Void)\r\n\t\t\t\treturn null;\r\n\r\n\t\t\t// Some kind of value, if not void\r\n\t\t\tValue<?> returnVal = null;\r\n\r\n\t\t\tif (returnedObj instanceof Value)\r\n\t\t\t\treturnVal = (Value<?>) returnedObj;\r\n\r\n\t\t\t// DivertTargets get returned as the string of components\r\n\t\t\t// (rather than a Path, which isn't public)\r\n\t\t\tif (returnVal.getValueType() == ValueType.DivertTarget) {\r\n\t\t\t\treturn returnVal.getValueObject().toString();\r\n\t\t\t}\r\n\r\n\t\t\t// Other types can just have their exact object type:\r\n\t\t\t// int, float, string. VariablePointers get returned as strings.\r\n\t\t\treturn returnVal.getValueObject();\r\n\t\t}\r\n\r\n\t\treturn null;\r\n\t}", "private Operation expression(Scope scope, Vector queue)\r\n {\r\n Operation root = expression1(scope, queue);\r\n\r\n if (assign.contains(nextSymbol))\r\n {\r\n Operation op = new Operation();\r\n\r\n op.left = root;\r\n\r\n op.operator = assignmentOperator();\r\n op.right = expression(scope, queue);\r\n\r\n root = op;\r\n }\r\n\r\n return root;\r\n }", "public interface IExpressionRuntime\n{\n Object evaluate();\n}", "protected Evaluable parseSubExpression() throws ParsingException {\n Evaluable sub = parseTerm();\n\n while (_token != null &&\n _token.type == TokenType.Operator &&\n \"+-\".indexOf(_token.text) >= 0) {\n\n String op = _token.text;\n\n next(true);\n\n Evaluable sub2 = parseTerm();\n\n sub = new OperatorCallExpr(new Evaluable[] { sub, sub2 }, op);\n }\n\n return sub;\n }", "private static Expression retrieveAssignExpressionValue(Expression expression) {\n return retrieveAssignExpression(expression).getValue();\n }", "private double evaluarExp6() throws Excepciones{\n double resultado;\n if(token.equals(\"(\")) {\n obtieneToken();\n resultado = evaluarExp2();\n if(!token.equals(\")\")){\n obtieneError(PARENTESIS);\n }\n obtieneToken();\n }else{\n resultado = valor();\n }\n return resultado;\n}", "private Object eval(SimpleExpr expr) {\n Object res = eval(expr.getExpr().get(0));\n\n for (int i = 1; i < expr.getExpr().size(); i++) {\n Object res2 = eval(expr.getExpr().get(i));\n String opt = expr.getOpt().get(i - 1);\n\n if (\"+\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = (Double) res + (Double) res2;\n } else if (res instanceof Double && res2 instanceof String) {\n res = \"\" + res + res2;\n } else if (res instanceof Boolean && res2 instanceof String) {\n res = \"\" + res + res2;\n } else if (res instanceof String && res2 instanceof String) {\n res = \"\" + res + res2;\n } else if (res instanceof String && res2 instanceof Double) {\n res = \"\" + res + res2;\n } else if (res instanceof String && res2 instanceof Boolean) {\n res = \"\" + res + res2;\n } else {\n throw new RaydenScriptException(\"Expression error: SimpleExpr error\");\n }\n } else if (\"-\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = (Double) res - (Double) res2;\n } else {\n throw new RaydenScriptException(\"Expression error: SimpleExpr error\");\n }\n } else {\n throw new RaydenScriptException(\"Expression error: Invalid operator '\" + opt + \"'.\");\n }\n }\n\n return res;\n }", "public double calculate(String expression) {\n\t\tString[] inputs = expression.split(\" \");\n\t if(debug) {\n\t\tSystem.out.print(\"Input array: \");\n\t\tfor(String value : inputs) {\n\t\t\tSystem.out.print(value + \" \");\n\t\t}\n\t\tSystem.out.println();\n\t }\t\n\t\t\n\t\t// Go through the string array and pop operators onto the\n\t\t// operators stack and operands onto the the operands stack\n\t\tfor(String value : inputs) {\n\t\t if(debug) System.out.println(\"Evaluating: \" + value);\n\t\t\tif(value.equals(\"*\") || value.equals(\"/\") || value.equals(\"+\") || value.equals(\"-\")) {\n\t\t\t\t// If stack is empty push onto stack\n\t\t\t\tif(operand.empty()) {\n\t\t\t\t\toperand.push(value);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// If new operator is higher than old push onto\n\t\t\t\t// stack\n\t\t\t\telse if(value.equals(\"*\") || value.equals(\"/\")) {\n\t\t\t\t\tString old = (String)operand.peek();\n\t\t\t\t\tif(old.equals(\"*\")) {\n\t\t\t\t\t\tdouble a = (Double)operators.pop();\n\t\t\t\t\t\tdouble b = (Double)operators.pop();\n\t\t\t\t\t if(debug) {\n\t\t\t\t\t\tSystem.out.println(a + old + b);\n\t\t\t\t\t }\n\t\t\t\t\t \ta = a*b;\n\t\t\t\t\t\toperators.push(a);\n\t\t\t\t\t\told = (String)operand.pop();\n\t\t\t\t\t\toperand.push(value);\n\t\t\t\t\t}\n\t\t\t\t\telse if(old.equals(\"/\")) {\n\t\t\t\t\t\tdouble a = (Double)operators.pop();\n\t\t\t\t\t\tdouble b = (Double)operators.pop();\n\t\t\t\t\t if(debug) {\n\t\t\t\t\t\tSystem.out.println(a + old + b);\n\t\t\t\t\t }\n\t\t\t\t\t \ta = b/a;\n\t\t\t\t\t\toperators.push(a);\n\t\t\t\t\t\told = (String)operand.pop();\n\t\t\t\t\t\toperand.push(value);\n\t\t\t\t\t}\n\t\t\t\t\telse operand.push(value);\n\t\t\t\t}\n\n\t\t\t\t// Else pop old operator and evaluate top two\n\t\t\t\t// elements on operand stack then push new\n\t\t\t\t// operator onto stack\n\t\t\t\telse {\n\t\t\t\t\tdouble a = (Double)operators.pop();\n\t\t\t\t\tdouble b = (Double)operators.pop();\n\t\t\t\t\tString old = (String)operand.pop();\n\t\t\t\t if(debug) {\n\t\t\t\t\tSystem.out.println(a + old + b);\n\t\t\t\t }\n\t\t\t\t\tif(old.equals(\"*\")) a = a*b;\n\t\t\t\t\telse if(old.equals(\"/\")) a = b/a;\n\t\t\t\t\telse if(old.equals(\"+\")) a = a+b;\n\t\t\t\t\telse a = b-a;\n\t\t\t\t\toperators.push(a);\n\t\t\t\t\toperand.push(value);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Put operators into operators stack\n\t\t\telse {\n\t\t\t try {\n\t\t\t\tDouble num = Double.parseDouble(value);\n\t\t\t\toperators.push(num);\n\t\t\t }\n\t\t\t catch(NumberFormatException e) {\n\t\t\t\t System.out.println(\"NumberFormatException: Something besides a number or operator entered\");\n\t\t\t }\n\t\t\t}\n\t\t}\n\t\t// Finish up everything left over in stack\n\t\tString old;\n\t\tdouble a;\n\t\tdouble b;\n\t\twhile(!operand.empty()) {\n\t\t\told = (String)operand.pop();\n\t\t\ta = (Double)operators.pop();\n\t\t\tb = (Double)operators.pop();\n\t\t\tif(old.equals(\"*\")) a = a*b;\n\t\t\telse if(old.equals(\"/\")) a = b/a;\n\t\t\telse if(old.equals(\"+\")) a = a+b;\n\t\t\telse a = b-a;\n\t\t\toperators.push(a);\n\t\t}\n\t\treturn (Double)operators.peek();\n\t}", "public double evaluate() throws Exception {\r\n // this expression compare from variable\r\n throw new Exception(\"this expression contains a variable\");\r\n }", "public abstract Object eval();", "double eval();", "Expression getExpression();", "Expression getExpression();", "Expression getExpression();", "Expression getExpression();", "private static NodeValue calcReturn(String result, Node arg) {\n Node n2 = NodeFactory.createLiteral(result, arg.getLiteralLanguage(), arg.getLiteralDatatype()) ;\n return NodeValue.makeNode(n2) ;\n }", "private int eval(Node<String> temp) {\n\t\t\tif(temp==null)\n\t\t\t\treturn 0;\n\t\t\tif(temp.left==null && temp.right==null)\n\t\t\t\treturn Integer.parseInt(temp.data);\n\t\t\t\n\t\t\tint right=eval(temp.right);\n\t\t\tint left=eval(temp.left);\n\t\t\tif(isOperator(temp.data.charAt(0))) {\n\t\t\t\tif(temp.data.charAt(0)=='*') \n\t\t\t\t\treturn right * left;\n\t\t\t\telse if(temp.data.charAt(0)=='/') \n\t\t\t\t\treturn right / left;\n\t\t\t\telse if(temp.data.charAt(0)=='+') \n\t\t\t\t\treturn right + left;\n\t\t\t\telse \n\t\t\t\t\treturn right - left;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn Integer.parseInt(temp.data);\n\t\t\t}\n\t\t}", "@Override\n public TreeNode parse() {\n TreeNode first = ArithmeticSubexpression.getAdditive(environment).parse();\n if (first == null) return null;\n\n // Try to parse something starting with an operator.\n List<Wrapper> wrappers = RightSideSubexpression.createKleene(\n environment, ArithmeticSubexpression.getAdditive(environment),\n BemTeVicTokenType.EQUAL, BemTeVicTokenType.DIFFERENT,\n BemTeVicTokenType.GREATER_OR_EQUALS, BemTeVicTokenType.GREATER_THAN,\n BemTeVicTokenType.LESS_OR_EQUALS, BemTeVicTokenType.LESS_THAN\n ).parse();\n\n // If did not found anything starting with an operator, return the first node.\n if (wrappers.isEmpty()) return first;\n\n // Constructs a binary operator node containing the expression.\n Iterator<Wrapper> it = wrappers.iterator();\n Wrapper secondWrapper = it.next();\n BinaryOperatorNode second = new BinaryOperatorNode(secondWrapper.getTokenType(), first, secondWrapper.getOutput());\n\n if (wrappers.size() == 1) return second;\n\n // If we reach this far, the expression has more than one operator. i.e. (x = y = z),\n // which is a shortcut for (x = y AND y = z).\n\n // Firstly, determine if the operators are compatible.\n RelationalOperatorSide side = RelationalOperatorSide.NONE;\n for (Wrapper w : wrappers) {\n side = side.next(w.getTokenType());\n }\n if (side.isMixed()) {\n environment.emitError(\"XXX\");\n }\n\n // Creates the other nodes. In the expression (a = b = c = d), The \"a = b\"\n // is in the \"second\" node. Creates \"b = c\", and \"c = d\" nodes.\n List<BinaryOperatorNode> nodes = new LinkedList<BinaryOperatorNode>();\n nodes.add(second);\n\n TreeNode prev = secondWrapper.getOutput();\n while (it.hasNext()) {\n Wrapper w = it.next();\n BinaryOperatorNode current = new BinaryOperatorNode(w.getTokenType(), prev, w.getOutput());\n prev = w.getOutput();\n nodes.add(current);\n }\n\n // Combines all of the nodes in a single one using AND.\n return new VariableArityOperatorNode(BemTeVicTokenType.AND, nodes);\n }", "public Integer perform (IExpression left, IExpression right);", "Expr expr() throws IOException {\n\t\tExpr e = term();\n\t\twhile (look.tag == '+' || look.tag == '-') {\n\t\t\tToken tok = look;\n\t\t\tmove();\n\t\t\te = new Arith(tok, e, term());\n\t\t}\n\t\treturn e;\n\t}", "public static int term()\r\n {\r\n //get the start state of this factor\r\n int r;\r\n int t1;\r\n t1=r=factor();\r\n\r\n //if there is no more input, we are done\r\n if(index>expression.length()-1)\r\n {\r\n return r;\r\n }\r\n\r\n //if it is closure\r\n if(expression.charAt(index)=='*')\r\n {\r\n int f=state-1;\r\n //create a branch state and set its next1 and next2\r\n state st=new state(state,\"BR\",t1,state+1);\r\n stateList.add(st);\r\n\r\n //check if the expression is something like (abc)*\r\n //if so, update the corresponding state so both a* and (abc)* work\r\n if(expression.charAt(index-1)!=')')\r\n {\r\n if(stateList.get(f-1).getNext1()==stateList.get(f-1).getNext2())\r\n {\r\n stateList.get(f-1).setNext1(state);\r\n }\r\n stateList.get(f-1).setNext2(state);\r\n\r\n }\r\n\r\n index++;\r\n r=state;\r\n state++;\r\n\r\n }\r\n //preceding regexp can occur one or more times\r\n else if(expression.charAt(index)=='+')\r\n {\r\n int f=state-1;\r\n stateList.get(f).setNext1(t1);\r\n index++;\r\n\r\n }\r\n // preceding regexp can occur zero or one time\r\n else if(expression.charAt(index)=='?')\r\n {\r\n int f =state-1;\r\n //check if the expression is something like (abc)?\r\n //if so update corresponding state so both a? and (abc)? work\r\n if(expression.charAt(index-1)!=')')\r\n {\r\n //create a branch state and update the corresponding state\r\n state st=new state(state,\"BR\",t1,state+1);\r\n\r\n String previousChar=stateList.get(f).getCharacter();\r\n\r\n if(stateList.get(f).getAlter())\r\n {\r\n stateList.get(f).setAlter(false);\r\n st.setAlter(true);\r\n }\r\n\r\n stateList.get(f).setCharacter(\"BR\");\r\n stateList.get(f).setNext2(state+1);\r\n st.setCharacter(previousChar);\r\n st.setNext1(state+1);\r\n stateList.add(st);\r\n\r\n r=f;\r\n state++;\r\n index++;\r\n }\r\n else\r\n {\r\n //create a branch state and update the corresponding state\r\n if(stateList.get(f).getNext1()==stateList.get(f).getNext2())\r\n {\r\n stateList.get(f).setNext1(state+1);\r\n }\r\n stateList.get(f).setNext2(state+1);\r\n\r\n state st=new state(state,\"BR\",t1,state+1);\r\n stateList.add(st);\r\n\r\n r=state;\r\n state++;\r\n index++;\r\n }\r\n\r\n\r\n }\r\n\r\n\r\n return r;\r\n }", "public Object getExpression();", "private Object eval(Term expr) {\n Object res = eval(expr.getExpr().get(0));\n\n for (int i = 1; i < expr.getExpr().size(); i++) {\n Object res2 = eval(expr.getExpr().get(i));\n String opt = expr.getOpt().get(i - 1);\n\n if (\"*\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = (Double) res * (Double) res2;\n } else {\n throw new RaydenScriptException(\"Expression error: Term error\");\n }\n } else if (\"/\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = (Double) res / (Double) res2;\n } else {\n throw new RaydenScriptException(\"Expression error: Term error\");\n }\n } else if (\"%\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = (Double) res % (Double) res2;\n } else {\n throw new RaydenScriptException(\"Expression error: Term error\");\n }\n } else {\n throw new RaydenScriptException(\"Expression error: Invalid operator '\" + opt + \"'.\");\n }\n }\n\n return res;\n }", "private int eval(ExpressionNodes root)\n\t {\n\t \tif (root.right == null && root.left == null) \n\t \t{\n\t \t\t\tint leaf = Integer.parseInt(root.data);\n\t \t\t\treturn leaf; \n\t \t}\n\t \t\n\t \t// if the node is an operator // \n\t \telse \n\t \t{\n\t \t\t\tint op1 = eval(root.left); \n\t \t\t\tint op2 = eval(root.right);\n\t \n\t \t\n\t\t\t \tString operator = root.data; // initialize operator string \n\t\t\t \tint n = 0; // initialize the integer that will be returned \n\t\t\t \t\n\t\t\t \t// switch case to conduct for the different operators \n\t\t\t \tswitch(operator) \n\t\t\t \t{\n\t\t\t\t case \"+\":\n\t\t\t\t \tn = op1 + op2; \n\t\t\t\t \tbreak;\n\t\t\t\t \t\n\t\t\t\t case \"-\":\n\t\t\t\t n = op1 - op2; \n\t\t\t\t break;\n\t\t\t\t \n\t\t\t\t case \"*\":\n\t\t\t\t n = op1 * op2; \n\t\t\t\t break;\n\t\t\t\t \n\t\t\t\t case \"/\":\n\t\t\t\t n = op1 / op2; \n\t\t\t\t break;\n\t\t\t \t}\n\t\t\t \t\n\t\t\t \treturn n; \n\t \t}\n\t\t\t\n\t }", "public int eval() \n\t { \n\t \treturn eval(root);\n\t }", "public abstract Expression getInitialExpression();", "Unary expr(Expr e);", "public Stmt createEval(Expr expr) {\n return xnf.Eval(expr.position(), expr);\n }", "Object getExpressionValue(ExpressionParams params);", "public static Expression reduceAndCheck(Expression expression) { throw Extensions.todo(); }", "public Expression preEvaluate(ExpressionVisitor visitor) throws XPathException {\n \treturn this;\n }", "public int eval(String expression) {\n String token;\n // The 3rd argument is true to indicate that the delimiters should be used\n // as tokens, too. \n this.tokenizer = new StringTokenizer(expression, DELIMITERS, true);\n\n //initialized with # operator, used as bogus to compare priorities and detect end of operatorStack.\n operatorStack.push(new PoundOperator());\n\n //Checks whether there are more tokens to be pushed in stacks\n while (this.tokenizer.hasMoreTokens()) {\n // filter out spaces\n if (!(token = this.tokenizer.nextToken()).equals(\" \")) {\n // check if token is an operand\n if (Operand.check(token)) {\n operandStack.push(new Operand(token));\n\n } else {\n if (!Operator.check(token)) {\n System.out.println(\"*****invalid token******\");\n System.exit(1);\n }\n\n //Gets a newOperator it matches from hashmap.\n Operator newOperator = Operator.getToken(token);\n\n //Processes only, when there is greater priority in stack and there are no '('\n while (operatorStack.peek().priority() >= newOperator.priority() && !newOperator.equals(Operator.getToken(\"(\"))) {\n\n //If the token read is ), then there is already '(' which is inserted in the operator stack.\n if (token.equals(\")\")) {\n //Perform until, the '(' is on top of the stack.\n while (!operatorStack.peek().equals(Operator.getToken(\"(\"))) {\n Operator oldOpr = operatorStack.pop();\n Operand op2 = operandStack.pop();\n Operand op1 = operandStack.pop();\n operandStack.push(oldOpr.execute(op1, op2));\n\n }\n\n //If '(' found on top, pop and break, to continue to read more takens\n if (operatorStack.peek().equals(Operator.getToken(\"(\"))) {\n operatorStack.pop();\n break;\n }\n\n } \n //if ')' not found, it means either its in '(' or there are no parenthesis\n else {\n Operator oldOpr = operatorStack.pop();\n Operand op2 = operandStack.pop();\n Operand op1 = operandStack.pop();\n operandStack.push(oldOpr.execute(op1, op2));\n }\n }\n //Pushes the operator, when the operator!=')'\n if (!newOperator.equals(Operator.getToken(\")\"))) {\n operatorStack.push(newOperator);\n }\n }\n }\n }\n // No more tokens to be read. All the tokens are in stacks, gets processed.\n if (!this.tokenizer.hasMoreTokens()) {\n //Keeps processing, until it reaches #\n while (operatorStack.size() != 1) {\n Operator oldOpr = operatorStack.pop();\n //Checks if there are operand left to be used,\n if (!operandStack.empty()) {\n Operand op2 = operandStack.pop();\n Operand op1 = operandStack.pop();\n operandStack.push(oldOpr.execute(op1, op2));\n } else {\n System.exit(1);\n }\n }\n }\n // Returns, the final result\n return operandStack.pop().getValue();\n }", "@Override\n\tpublic String visitSubexpr(SubexprContext ctx) {\n\t\t\n\t\tif(ctx.getChildCount()==1)\n\t\t{\n\t\t\treturn visitValue(ctx.value())\t;\t}\n\t\telse\n\t\t{\n\t\t\tString result = \"\";\n\t\t\tresult = \"temp\"+count.count++;\n\t\t\tif(ctx.getChild(1).getText().equals(\"*\"))\n\t\t\t{\n\t\t\t\n\t\t\t\n\t\t\tsb.append(\"MUL \"+visit(ctx.children.get(0))+\" \"+visitValue(ctx.value())+\" \"+ result+\"\\n\");\n\t\t\treturn result;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tsb.append(\"DIV \"+visit(ctx.children.get(0))+ \" \"+visitValue(ctx.value())+\" \"+result+\"\\n\");\n\t\t\t\treturn \tresult;\n\t\t\t}\n\t\t}\n\t\n\t}", "public static double evaluate(String expression) {\n\n\t\tStack<String> operators = new Stack<String>();\n\t\tStack<Double> operands = new Stack<Double>();\n\n\t\tfor (String token : expression.split(\" \")) {\n\t\t\tswitch (token) {\n\t\t\t\tcase \"(\":\n\t\t\t\t\tcontinue;\n\t\t\t\tcase \"+\":\n\t\t\t\tcase \"-\":\n\t\t\t\tcase \"*\":\n\t\t\t\tcase \"/\":\n\t\t\t\tcase \"sqrt\":\n\t\t\t\t\toperators.push(token); break;\n\t\t\t\tcase \")\": // Pop operand, apply operator and push result\n\t\t\t\t\tString operator = operators.pop();\n\t\t\t\t\tdouble value = operands.pop();\n\n\t\t\t\t\tswitch (operator) {\n\t\t\t\t\t\tcase \"+\": value = operands.pop() + value; break;\n\t\t\t\t\t\tcase \"-\": value = operands.pop() - value; break;\n\t\t\t\t\t\tcase \"*\": value = operands.pop() * value; break;\n\t\t\t\t\t\tcase \"/\": value = operands.pop() / value; break;\n\t\t\t\t\t\tcase \"sqrt\": value = Math.sqrt(value); break;\n\t\t\t\t\t}\n\t\t\t\t\toperands.push(value);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\toperands.push(Double.parseDouble(token));\n\t\t\t}\n\t\t}\n\t\treturn operands.pop();\n\t}", "public abstract XPathExpression getExpression();", "protected Object subEval(EvalContext ctx, boolean forValue) {\n T.fail(\"A DelayedExpr isn't eval-able\");\n return null; //make compiler happy\n }", "private static UnaryExpr retrieveUnaryExpression(Expression expression) {\n return expression.asUnaryExpr();\n }" ]
[ "0.656998", "0.6244814", "0.61827743", "0.6167873", "0.6139244", "0.6115974", "0.6076333", "0.60615057", "0.60203105", "0.596789", "0.5943718", "0.5908623", "0.5896603", "0.5895061", "0.58337945", "0.58087856", "0.58042276", "0.5803706", "0.5797061", "0.5793098", "0.57889384", "0.57636493", "0.57344383", "0.572231", "0.57211125", "0.5718621", "0.5714355", "0.5712849", "0.5712849", "0.57055414", "0.56978357", "0.5678724", "0.56487525", "0.56405884", "0.56184137", "0.5590546", "0.5586294", "0.55854696", "0.558052", "0.5577362", "0.5541011", "0.55321443", "0.55119425", "0.55099493", "0.5492905", "0.5483821", "0.54774964", "0.5469661", "0.5469661", "0.54655415", "0.54638326", "0.54617524", "0.54517716", "0.5438041", "0.54071814", "0.54010165", "0.5380232", "0.53776926", "0.5375739", "0.53747076", "0.5369929", "0.53673106", "0.5359721", "0.53582233", "0.5356578", "0.53470767", "0.53461164", "0.5339916", "0.53276515", "0.5303864", "0.530016", "0.5298166", "0.5286426", "0.5286242", "0.5284911", "0.5284911", "0.5284911", "0.5284911", "0.52819157", "0.52777374", "0.52736443", "0.52711767", "0.5266233", "0.52622926", "0.5248893", "0.5248645", "0.5241106", "0.5211397", "0.52087396", "0.5204757", "0.52046555", "0.52024436", "0.520135", "0.5195109", "0.5187529", "0.51869375", "0.5185729", "0.5171787", "0.5171188", "0.51676846" ]
0.6792296
0
prints IR code generated
public static void printIRCode(){ for (int i=0; i < ircode.size(); i++){ System.out.println(";"+ircode.get(i).printCode()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void dumpIR_debug(CodeGenEnv cenv){\n try {\n\n System.out.println(\"--- dump \" + class_.name.str + \"--- IR ----\");\n System.out.println(\"struct_typeRef: \");Thread.sleep(10);\n cenv.DumpIR( struct_typeRef );\n\n\n\n System.out.println(\"\\n---constructor: \");Thread.sleep(10);\n cenv.DumpIR(constructorFun);\n\n System.out.println(\"constructor initializer: \");Thread.sleep(10);\n cenv.DumpIR(constructor_initval_fun);\n\n System.out.println(\"\\n----class method: \");\n for (var i:classMethod.members){\n System.out.println(\"method: \" + i.funSymbol.str);Thread.sleep(10);\n cenv.DumpIR(i.funRef);\n }\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }", "public void generate() {\n\t\t// Print generation stamp\n\t\tcontext.getNaming().putStamp(elementInterface, out);\n\t\t// Print the code\n\t\t// Print header\n\t\tout.println(\"package \"+modelPackage+\";\");\n\t\tout.println();\n\t\tout.println(\"public interface \"+elementInterface);\n\t\tif (context.isGenerateVisitor()) {\n\t\t\tout.println(indent+\"extends \"+context.getNaming().getVisitableInterface(modelName));\n\t\t}\n\t\tout.println(\"{\");\n\t\tif (context.isGenerateID()) {\n\t\t\tout.println(indent+\"/** Get the id */\");\n\t\t\tout.println(indent+\"public String getId();\");\n\t\t\tout.println(indent+\"/** Set the id */\");\n\t\t\tout.println(indent+\"public void setId(String id);\");\n\t\t\tout.println();\n\t\t}\n\t\tif (context.isGenerateBidirectional()) {\n\t\t\tout.println(indent+\"/** Delete */\");\n\t\t\tout.println(indent+\"public void delete();\");\n\t\t}\n\t\tout.println(indent+\"/** Override toString */\");\n\t\tout.println(indent+\"public String toString();\");\n//\t\tif (context.isGenerateInvariant()) {\n//\t\t\tout.println();\n//\t\t\tout.println(indent+\"/** Parse all invariants */\");\n//\t\t\tout.println(indent+\"public Boolean parseInvariants(ILog log);\");\n//\t\t\tout.println(indent+\"/** Evaluate all invariants */\");\n//\t\t\tout.println(indent+\"public Boolean evaluateInvariants(ILog log);\");\n//\t\t}\n\t\tout.println(\"}\");\n\t}", "public void dumpIR () {\n\n Chain<SootClass> classes = Scene.v().getApplicationClasses();\n for (SootClass sclass : classes) {\n File jFile = new File(\"tmp/\" + sclass.getName() + \".J\");\n File bFile = new File(\"tmp/\" + sclass.getName() + \".B\");\n try {\n FileWriter jfw = new FileWriter(jFile);\n FileWriter bfw = new FileWriter(bFile);\n BufferedWriter jbw = new BufferedWriter(jfw);\n BufferedWriter bbw = new BufferedWriter(bfw);\n for (SootMethod sm : sclass.getMethods()) {\n jbw.write(\"\\n\" + sm.getSubSignature() + \" { \\n\");\n bbw.write(\"\\n\" + sm.getSubSignature() + \" { \\n\");\n JimpleBody jbody = (JimpleBody) sm.retrieveActiveBody();\n PatchingChain<Unit> units = jbody.getUnits();\n for (Unit u : units) {\n jbw.write(\"\\t\" + u + \" || \" + u.getClass().getName() + \"\\n\");\n if ( u instanceof JAssignStmt) {\n JAssignStmt as = (JAssignStmt) u;\n String a = as.getLeftOp().getType().toString();\n }\n }\n PatchingChain<Unit> bunits = (new BafBody(jbody, null)).getUnits();\n for (Unit u : bunits) {\n bbw.write(\"\\t\" + u + \" || \" + u.getClass().getName() + \"\\n\");\n }\n }\n jbw.close();\n bbw.close();\n jfw.close();\n bfw.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }", "public void codeGen(PrintWriter p){\n\tthis.dotRightOffset = unrollDot();\n\n\tCodegen.p = p;\n\tCodegen.generateIndexed(\"lw\", \"$t0\", \"$fp\", this.dotRightOffset, \"load struct field: \" + myId.name());\n\tCodegen.genPush(\"$t0\");\n }", "public void PrintMe()\r\n\t{\r\n\t\t/************************************/\r\n\t\t/* AST NODE TYPE = EXP NIL AST NODE */\r\n\t\t/************************************/\r\n\t\tSystem.out.print(\"AST NODE EXP NIL\\n\");\r\n\r\n\t\t\r\n\t\t/*********************************/\r\n\t\t/* Print to AST GRAPHIZ DOT file */\r\n\t\t/*********************************/\r\n\t\tAST_GRAPHVIZ.getInstance().logNode(\r\n\t\t\tSerialNumber,\r\n\t\t\t\"EXP\\nNIL\");\r\n\t\t\t\r\n\t}", "public void print() {\n print$$dsl$guidsl$guigs();\n System.out.print( \" eqn =\" + eqn );\n }", "public void PrintMe(){\r\n\t\t/* AST NODE TYPE = AST SUBSCRIPT VAR */\r\n\t\t/*************************************/\r\n\t\tSystem.out.print(\"AST NODE PAREN EXP\\n\");\r\n \r\n\t\t\r\n\t\t/***************************************/\r\n\t\t/* PRINT Node to AST GRAPHVIZ DOT file */\r\n\t\t/***************************************/\r\n\t\tAST_GRAPHVIZ.getInstance().logNode(\r\n\t\t\tSerialNumber,\r\n\t\t\t\"(exp)\");\r\n\t\tif (e != null) AST_GRAPHVIZ.getInstance().logEdge(SerialNumber,e.SerialNumber);\r\n \r\n }", "public void generate(){\n\t// Write constants/static vars section\n\twriteln(\".data\");\n\tfor ( String global : globalVars ) {\n\t // Initialized to zero. Why not?\n\t writeln(global+\":\\t.word 0\");\n\t}\n\twriteln(\"nl:\\t.asciiz \\\"\\\\n\\\"\");\n writeln(\"\\t.align\\t4\");\n\n\t// Write the prefix\n\twriteln(\".text\");\n\twriteln(\"entry:\");\n writeln(\"\\tjal main\");\n writeln(\"\\tli $v0, 10\");\n writeln(\"\\tsyscall\");\n\twriteln(\"printint:\");\n writeln(\"\\tli $v0, 1\");\n writeln(\"\\tsyscall\");\n writeln(\"\\tla $a0, nl\");\n writeln(\"\\tli $v0, 4\");\n writeln(\"\\tsyscall\");\n writeln(\"\\tjr $ra\");\n\n\tString defun = \"\";\t// Holds the place of the current function\n\tint spDisplacement=0;\t// Stores any displacement we do with $sp\n\n\tfor ( int i=0; i<codeTable.size(); i++ ) {\n\t CodeEntry line = codeTable.get(i);\n\n\t if ( line instanceof Label ) {\n\t\tLabel label = (Label)line;\n\t\twriteln( line.toString() );\n\t\tif ( label.isFunction() )\n\t\t makeFrame( defun = label.name() );\n\t }\n\t else if ( line instanceof Tuple ) {\n\t\tTuple tuple = (Tuple)line;\n\t\t// \n\t\t// Pushing arguments onto the stack (op = \"pusharg\"|\"pushaddr\")\n\t\t// \n\t\tif ( tuple.op.equals(\"pusharg\") || tuple.op.equals(\"pushaddr\") ) {\n\t\t ArrayList<Tuple> argLines = new ArrayList<Tuple>();\n\t\t ArrayList<String> lvOrAddr = new ArrayList<String>();\n\t\t while ( (tuple.op.equals(\"pusharg\") || tuple.op.equals(\"pushaddr\") )\n\t\t\t && i < codeTable.size() ) {\n\t\t\targLines.add( tuple );\n\t\t\tlvOrAddr.add( tuple.op );\n\t\t\tline = codeTable.get( ++i );\n\t\t\tif ( line instanceof Tuple )\n\t\t\t tuple = (Tuple)line;\n\t\t }\n\t\t // Move the stack pointer to accomodate args\n\t\t writeInst(\"subi\t$sp, $sp, \"+(4*argLines.size()));\n\t\t spDisplacement = 4;\n\t\t for ( int j=0; j < argLines.size(); j++ ) {\n\t\t\tTuple argLine = argLines.get(j);\n\t\t\tString theOp = lvOrAddr.get(j);\n\t\t\t// Pass a copy of the argument\n\t\t\tif ( theOp.equals(\"pusharg\") ) {\n\t\t\t if ( isNumber(argLine.place) )\n\t\t\t\twriteInst(\"li\t$t0, \"+argLine.place);\n\t\t\t else\n\t\t\t\twriteInst(\"lw\t$t0, \"+printOffset( defun, argLine.place ));\n\t\t\t}\n\t\t\t// Pass-by-reference\n\t\t\telse {\n\t\t\t writeInst(\"la\t$t0, \"+printOffset( defun, argLine.place));\n\t\t\t}\n\t\t\twriteInst(\"sw\t$t0, \"+spDisplacement+\"($sp)\");\n\t\t\tspDisplacement+=4;\n\t\t }\n\t\t spDisplacement-=4;\n\n\t\t // Reset counter, put back instruction we didn't use.\n\t\t i--;\n\t\t continue;\n\t\t}\n\t\t// \n\t\t// Calling a function\n\t\t// \n\t\telse if ( tuple.op.equals(\"jal\") ) {\n\t\t writeInst(\"jal\t\"+tuple.arg1);\n\t\t if ( ! tuple.place.equals(\"\") )\n\t\t\twriteInst(\"sw\t$v0, \"+printOffset( defun, tuple.place ));\n\t\t // Move back the $sp from all the \"pushargs\" we probably did\n\t\t if ( spDisplacement > 0 )\n\t\t\twriteInst(\"addi\t$sp, $sp, \"+spDisplacement);\n\t\t}\n\t\t//\n\t\t// Returning from a function (\"return\")\n\t\t//\n\t\telse if ( tuple.op.equals(\"return\") ) {\n\t\t if ( ! tuple.place.equals(\"\") ) {\n\t\t\twriteInst(\"lw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t\twriteInst(\"move\t$v0, $t0\");\n\t\t }\n\t\t writeInst(\"move\t$sp, $fp\");\n\t\t writeInst(\"lw\t$ra, -4($sp)\");\n\t\t writeInst(\"lw\t$fp, 0($fp)\");\n\t\t writeInst(\"jr\t$ra\");\n\t\t \n\t\t}\n\t\t//\n\t\t// Arithmetic operations requiring two registers for operands\n\t\t//\n\t\telse if ( tuple.op.equals(\"sub\") ||\n\t\t\t tuple.op.equals(\"mul\") ||\n\t\t\t tuple.op.equals(\"div\") ||\n\t\t\t tuple.op.equals(\"rem\") ) {\n\n\t\t if ( isNumber(tuple.arg1) )\n\t\t\twriteInst(\"li\t$t1, \"+tuple.arg1);\n\t\t else\n\t\t\twriteInst(\"lw\t$t1, \"+printOffset( defun, tuple.arg1 ));\n\t\t if ( tuple.op.equals(\"sub\") && isNumber(tuple.arg2) ) {\n\t\t\twriteInst(\"subi\t$t0, $t1, \"+tuple.arg2);\n\t\t }\n\t\t else {\n\t\t\tif ( isNumber(tuple.arg2) )\n\t\t\t writeInst(\"li\t$t2, \"+tuple.arg2);\n\t\t\telse\n\t\t\t writeInst(\"lw\t$t2, \"+printOffset( defun, tuple.arg2 ));\n\t\t\twriteInst(tuple.op+\"\\t$t0, $t1, $t2\");\n\t\t }\n\t\t writeInst(\"sw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t}\n\t\t// \n\t\t// Arithmetic operations that have a separate 'immediate' function,\n\t\t// and where we can reduce # of instructions\n\t\t//\n\t\telse if ( tuple.op.equals(\"add\") ||\n\t\t\t tuple.op.equals(\"and\") ||\n\t\t\t tuple.op.equals(\"or\") ) {\n\t\t if ( isNumber(tuple.arg2) ) {\n\t\t\tif ( isNumber(tuple.arg1) )\n\t\t\t writeInst(\"li\t$t1, \"+tuple.arg1);\n\t\t\telse\n\t\t\t writeInst(\"lw\t$t1, \"+printOffset( defun, tuple.arg1 ));\n\t\t\twriteInst(tuple.op+\"i\t$t0, $t1, \"+tuple.arg2);\n\t\t }\n\t\t else if ( isNumber(tuple.arg1) ) {\n\t\t\tif ( isNumber(tuple.arg2) )\n\t\t\t writeInst(\"li\t$t1, \"+tuple.arg2);\n\t\t\telse\n\t\t\t writeInst(\"lw\t$t1, \"+printOffset( defun, tuple.arg2 ));\n\t\t\twriteInst(tuple.op+\"i\t$t0, $t1, \"+tuple.arg1);\n\t\t }\n\t\t else {\n\t\t\twriteInst(\"lw\t$t1, \"+printOffset( defun, tuple.arg1 ));\n\t\t\twriteInst(\"lw\t$t2, \"+printOffset( defun, tuple.arg2 ));\n\t\t\twriteInst(tuple.op+\"\t$t0, $t1, $t2\");\n\t\t }\n\t\t writeInst(\"sw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t}\n\t\t//\n\t\t// Arithmetic operations requiring only one register for an operand\n\t\t// \n\t\telse if ( tuple.op.equals(\"not\") ||\n\t\t\t tuple.op.equals(\"neg\") ) {\n\t\t if ( isNumber(tuple.arg1) )\n\t\t\twriteInst(\"li\t$t1, \"+tuple.arg1);\n\t\t else\n\t\t\twriteInst(\"lw\t$t1, \"+printOffset( defun, tuple.arg1 ));\n\t\t writeInst(tuple.op+\"\\t$t0, $t1\");\n\t\t writeInst(\"sw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t}\n\t\t//\n\t\t// Immediate arithmetic expressions\n\t\t//\n\t\telse if ( tuple.op.equals(\"addi\") ||\n\t\t\t tuple.op.equals(\"subi\") ) {\n\t\t writeInst(\"lw\t$t1, \"+printOffset( defun, tuple.arg1 ));\n\t\t writeInst(tuple.op+\"\\t$t0, $t1, \"+tuple.arg2);\n\t\t writeInst(\"sw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t}\n\t\t//\n\t\t// Assignment and other stuff that does '='\n\t\t//\n\t\telse if ( tuple.op.equals(\"copy\") ) {\n\t\t if ( isNumber(tuple.arg1) )\n\t\t\twriteInst(\"li\t$t0, \"+tuple.arg1);\n\t\t else\n\t\t\twriteInst(\"lw\t$t0, \"+printOffset( defun, tuple.arg1 ));\n\t\t writeInst(\"sw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t}\n\t\t//\n\t\t// Loading arrays\n\t\t//\n\t\telse if ( tuple.op.equals(\"lw\") ) {\n\t\t // Find the location of the base address, put it in t0\n\t\t // writeInst(\"lw\t$t0, \"+printOffset( defun, tuple.arg2 ));\n\n\t\t // The base address of the array gets loaded into $t0\n\t\t writeInst(\"la\t$t0, \"+printOffset( defun, tuple.arg2 ));\n\t\t // Add to it the precalculated address offset\n\t\t writeInst(\"lw\t$t1, \"+printOffset( defun, tuple.arg1 ));\n\t\t writeInst(\"sub\t$t0, $t0, $t1\");\n\t\t // Store a[n] into a temp\n\t\t writeInst(\"lw\t$t0, 0($t0)\");\n\t\t writeInst(\"sw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t}\n\t\t//\n\t\t// Loading arrays that are passed by reference\n\t\t//\n\t\telse if ( tuple.op.equals(\"la\") ) {\n\t\t // The base address of the array gets loaded into $t0\n\t\t writeInst(\"lw\t$t0, \"+printOffset( defun, tuple.arg2 ));\n\t\t // Add to it the precalculated address offset\n\t\t writeInst(\"lw\t$t1, \"+printOffset( defun, tuple.arg1 ));\n\t\t writeInst(\"sub\t$t0, $t0, $t1\");\n\t\t // Store a[n] into a temp\n\t\t writeInst(\"lw\t$t0, 0($t0)\");\n\t\t writeInst(\"sw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t}\n\t\t//\n\t\t// Writing to arrays\n\t\t//\n\t\telse if ( tuple.op.equals(\"putarray\") || tuple.op.equals(\"putarrayref\") ) {\n\t\t // tuple.place = thing to be stored\n\t\t // tuple.arg1 = base address\n\t\t // tuple.arg2 = offset\n\n\t\t writeInst(\"lw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t if ( tuple.op.equals(\"putarray\") )\n\t\t\twriteInst(\"la\t$t1, \"+printOffset( defun, tuple.arg1 ));\n\t\t else\n\t\t\twriteInst(\"lw\t$t1, \"+printOffset( defun, tuple.arg1 ));\n\t\t writeInst(\"lw\t$t2, \"+printOffset( defun, tuple.arg2 ));\n\t\t writeInst(\"sub\t$t1, $t1, $t2\");\n\t\t writeInst(\"sw\t$t0, 0($t1)\");\n\t\t}\n\t\t//\n\t\t// Writing to pointers\n\t\t//\n\t\telse if ( tuple.op.equals(\"putpointer\") ) {\n\t\t writeInst(\"lw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t writeInst(\"lw\t$t1, \"+printOffset( defun, tuple.arg1 ));\n\t\t writeInst(\"sw\t$t0, ($t1)\");\n\t\t}\n\t\t//\n\t\t// Performing conditional branches\n\t\t// \n\t\telse if ( tuple.op.equals(\"ble\") ||\n\t\t\t tuple.op.equals(\"bge\") ||\n\t\t\t tuple.op.equals(\"beq\") ||\n\t\t\t tuple.op.equals(\"bne\") ||\n\t\t\t tuple.op.equals(\"bgt\") ||\n\t\t\t tuple.op.equals(\"blt\") ||\n\t\t\t tuple.op.equals(\"beq\") ) {\n\t\t writeInst(\"lw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t if ( isNumber(tuple.arg1) )\n\t\t\twriteInst(\"li\t$t1, \"+tuple.arg1);\n\t\t else\n\t\t\twriteInst(\"lw\t$t1, \"+printOffset( defun, tuple.arg1 ));\n\t\t writeInst(tuple.op+\"\\t$t0, $t1, \"+tuple.arg2);\n\t\t}\n\t\t//\n\t\t// Unconditional branch\n\t\t//\n\t\telse if ( tuple.op.equals(\"b\") ) {\n\t\t writeInst(\"b\t\"+tuple.place);\n\t\t}\n\t\t//\n\t\t// Branch equal to zero\n\t\t//\n\t\telse if ( tuple.op.equals(\"beqz\") ) {\n\t\t writeInst(\"lw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t writeInst(\"beqz\t$t0, \"+tuple.arg1);\n\t\t}\n\t\t//\n\t\t// Dereferences\n\t\t//\n\t\telse if ( tuple.op.equals(\"deref\") ) {\n\t\t writeInst(\"lw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t writeInst(\"lw\t$t1, \"+printOffset( defun, tuple.arg1 ));\n\t\t writeInst(\"lw\t$t0, ($t1)\");\n\t\t}\n\t\t//\n\t\t// Address-of (&)\n\t\t//\n\t\telse if ( tuple.op.equals(\"addrof\") ) {\n\t\t writeInst(\"la\t$t0, \"+printOffset( defun, tuple.arg1 ));\n\t\t writeInst(\"sw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t}\n\t }\n\t}\n\n }", "@Override\n\t\t\tpublic void print() {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\tpublic void print() {\n\n\t\t}", "private static void displayXCode() {\n if (dvm.getStartingLine() < 0){\n System.out.println(\"====\"+dvm.getCurrentFunction().toUpperCase()+\"====\");\n }else{\n for (int i = dvm.getStartingLine(); i <= dvm.getEndingLine(); i++) {\n if (dvm.isLineABreakPoint(i)){\n //NOTE: (char)249 is extended ascii for a little solid square.\n //I'm sorry if it comes out as something else on your machine\n //I do not know how (or if its possible) to check if the machine\n //that will run this program supports extended ascii. If it doesnt\n //It should just show up as an empty box, which is acceptable\n //For my purposes as well.\n System.out.print((char)249);\n }else\n System.out.print(\" \");\n\n if (i == dvm.getCurrentLine())\n System.out.println(String.format(\"%1$4s %2$s\", i + \")\", dvm.getLineOfSourceCode(i)+ \" <-----------\"));\n else\n System.out.println(String.format(\"%1$4s %2$s\", i + \")\", dvm.getLineOfSourceCode(i)));\n }\n }\n }", "public void PrintMe()\r\n\t{\r\n\t\t/*************************************************/\r\n\t\t/* AST NODE TYPE = AST NODE FUNCTION DECLARATION */\r\n\t\t/*************************************************/\r\n\t\tSystem.out.format(\"CALL(%s)\\nWITH:\\n\",funcName);\r\n\r\n\t\t/***************************************/\r\n\t\t/* RECURSIVELY PRINT params + body ... */\r\n\t\t/***************************************/\r\n\t\tif (params != null) params.PrintMe();\r\n\t\t\r\n\t\t/***************************************/\r\n\t\t/* PRINT Node to AST GRAPHVIZ DOT file */\r\n\t\t/***************************************/\r\n\t\tAST_GRAPHVIZ.getInstance().logNode(\r\n\t\t\tSerialNumber,\r\n\t\t\tString.format(\"CALL(%s)\\nWITH\",funcName));\r\n\t\t\r\n\t\t/****************************************/\r\n\t\t/* PRINT Edges to AST GRAPHVIZ DOT file */\r\n\t\t/****************************************/\r\n\t\tif (params != null) AST_GRAPHVIZ.getInstance().logEdge(SerialNumber,params.SerialNumber);\t\t\r\n\t}", "public void print()\r\n\t{\r\n\t\tSystem.out.println(\"Method name: \" + name);\r\n\t\tSystem.out.println(\"Return type: \" + returnType);\r\n\t\tSystem.out.println(\"Modifiers: \" + modifiers);\r\n\r\n\t\tif(exceptions != null)\r\n\t\t{\r\n\t\t\tSystem.out.print(\"Exceptions: \" + exceptions[0]);\r\n\t\t\tfor(int i = 1; i < exceptions.length; i++)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\", \" + exceptions[i]);\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Exceptions: none\");\r\n\t\t}\r\n\r\n\t\tif(parameters != null)\r\n\t\t{\r\n\t\t\tSystem.out.print(\"Parameters: \" + parameters[0]);\r\n\t\t\tfor(int i = 1; i < parameters.length; i++)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.print(\", \" + parameters[i]);\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Parameters: none\");\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println();\r\n\t}", "public void PrintMe()\r\n\t{\r\n\t\t/********************************/\r\n\t\t/* AST NODE TYPE = AST EXP METHOD */\r\n\t\t/********************************/\r\n\t\tSystem.out.format(\"EXP\\nMETHOD\\n\");\r\n\r\n\t\t/*************************************/\r\n\t\t/* RECURSIVELY PRINT HEAD + TAIL ... */\r\n\t\t/*************************************/\r\n\t\tif (var != null) var.PrintMe();\r\n\r\n\t\t/**********************************/\r\n\t\t/* PRINT to AST GRAPHVIZ DOT file */\r\n\t\t/**********************************/\r\n\t\tAST_GRAPHVIZ.getInstance().logNode(\r\n\t\t\tSerialNumber,\r\n\t\t\tString.format(\"EXP\\nMETHOD\\n\"));\r\n\t\t\r\n\t\t/****************************************/\r\n\t\t/* PRINT Edges to AST GRAPHVIZ DOT file */\r\n\t\t/****************************************/\r\n\t\tif (var != null) AST_GRAPHVIZ.getInstance().logEdge(SerialNumber,var.SerialNumber);\r\n\t}", "public static void generateCode()\n {\n \n }", "public void PrintMe()\n\t{\n\t\t/**************************************/\n\t\t/* AST NODE TYPE = AST TYPE NAME NODE */\n\t\t/**************************************/\n\t\tSystem.out.format(\"NAME(%s):TYPE(%s)\\n\",name,type);\n\n\t\t/***************************************/\n\t\t/* PRINT Node to AST GRAPHVIZ DOT file */\n\t\t/***************************************/\n\t\tAST_GRAPHVIZ.getInstance().logNode(\n\t\t\tSerialNumber,\n\t\t\tString.format(\"NAME:TYPE\\n%s:%s\",name,type));\n\t}", "@Override\r\n\t\t\tpublic void print() {\n\t\t\t\t\r\n\t\t\t}", "public void printAst(){\n explore(ctx);\n }", "public static void generateProperIRAndPrintToStream(OutputStream out,\n\t\t\tSymbolTable rSymbolTable, \n\t\t\tGeneration g,\n\t\t\tICodeGenerator registerAllocator,\n\t\t\tICodeGenerator instructionSelector,\n\t\t\tObject ... extraArgs\n\t\t\t) throws IOException {\n\t\tString lineSep = System.getProperty(\"line.separator\");\n\n\t\tout.write((\"#Assembly generated by TIGGER on \"\n\t\t\t\t+ (new Date()).toString() + lineSep).getBytes());\n\n\t\t/* first, we need to output the proper data segment header */\n\t\tout.write((\".data\"+lineSep).getBytes());\n\n\t\t//write our special identifier ___linefeed which we will use to print\n\t\t//newlines.\n\t\tout.write((\"___linefeed:.asciiz \\\"\\n\\\"\" + lineSep).getBytes());\n\t\t\n\t\tIterable<VarEntry> toWrite = \n\t\t\t\tIterables.concat(rSymbolTable.getAllVarEntriesForThisAndKids(),\n\t\t\t\tg.getTempSymbolTable().getAllVarEntriesForThisAndKids());\n\t\t\n\t\tfor (VarEntry e : toWrite) {\n\t\t\tif (e.getTigerType().isArray()) {\n\t\t\t\t/* then let's output a .space instruction to make room */\n\t\t\t\tout.write((e.getUniqueVarId() + \":\\t\" \n\t\t\t\t\t\t+ \".align\\t 2\" + lineSep\n\t\t\t\t\t\t+ \".space\\t\"\n\t\t\t\t\t\t+ e.getTotalNumberOfElementsForArrayVar()*4 + lineSep)\n\t\t\t\t\t\t.getBytes());\n\t\t\t} else { // let's output a .word instruction to reserve one slot\n\t\t\t\tout.write((e.getUniqueVarId() + \":\\t\" + \".word\\t\" + \"0\" + lineSep)\n\t\t\t\t\t\t.getBytes());\n\t\t\t}\n\t\t}\n\t\n\t\t/* second, we need to output the proper code! */\n\t\tout.write((\".text\"+lineSep).getBytes());\n\t\tList<IRInstruction> irCode = g.getCodeList();\n\n\t\tList<IRInstruction> regInstrs = registerAllocator \n\t\t\t\t.generateCode(irCode, rSymbolTable, g, extraArgs);\n\n\t\tList<IRInstruction> codeInstrs = instructionSelector\n\t\t\t\t.generateCode(regInstrs, rSymbolTable, g);\n\n\t\tfor (IRInstruction c : codeInstrs) {\n\t\t\tout.write((c.toString() + lineSep).getBytes());\n\t\t}\n\t\t\n\t}", "public void printInstr(int[] instr) {\r\n\t\tswitch (instr[0]) {\r\n\t\t\tcase SET:\r\n\t\t\t\tSystem.out.println(\"SET R\" + instr[1] + \" = \" + instr[2]);\r\n\t\t\t\tbreak;\r\n\t\t\tcase ADD:\r\n\t\t\t\tSystem.out.println(\"ADD R\" + instr[1] + \" = R\" + instr[2]\r\n\t\t\t\t\t\t+ \" + R\" + instr[3]);\r\n\t\t\t\tbreak;\r\n\t\t\tcase SUB:\r\n\t\t\t\tSystem.out.println(\"SUB R\" + instr[1] + \" = R\" + instr[2]\r\n\t\t\t\t\t\t+ \" - R\" + instr[3]);\r\n\t\t\t\tbreak;\r\n\t\t\tcase MUL:\r\n\t\t\t\tSystem.out.println(\"MUL R\" + instr[1] + \" = R\" + instr[2]\r\n\t\t\t\t\t\t+ \" * R\" + instr[3]);\r\n\t\t\t\tbreak;\r\n\t\t\tcase DIV:\r\n\t\t\t\tSystem.out.println(\"DIV R\" + instr[1] + \" = R\" + instr[2]\r\n\t\t\t\t\t\t+ \" / R\" + instr[3]);\r\n\t\t\t\tbreak;\r\n\t\t\tcase COPY:\r\n\t\t\t\tSystem.out.println(\"COPY R\" + instr[1] + \" = R\" + instr[2]);\r\n\t\t\t\tbreak;\r\n\t\t\tcase BRANCH:\r\n\t\t\t\tSystem.out.println(\"BRANCH @\" + instr[1]);\r\n\t\t\t\tbreak;\r\n\t\t\tcase BNE:\r\n\t\t\t\tSystem.out.println(\"BNE (R\" + instr[1] + \" != R\" + instr[2]\r\n\t\t\t\t\t\t+ \") @\" + instr[3]);\r\n\t\t\t\tbreak;\r\n\t\t\tcase BLT:\r\n\t\t\t\tSystem.out.println(\"BLT (R\" + instr[1] + \" < R\" + instr[2]\r\n\t\t\t\t\t\t+ \") @\" + instr[3]);\r\n\t\t\t\tbreak;\r\n\t\t\tcase POP:\r\n\t\t\t\tSystem.out.println(\"POP R\" + instr[1]);\r\n\t\t\t\tbreak;\r\n\t\t\tcase PUSH:\r\n\t\t\t\tSystem.out.println(\"PUSH R\" + instr[1]);\r\n\t\t\t\tbreak;\r\n\t\t\tcase LOAD:\r\n\t\t\t\tSystem.out.println(\"LOAD R\" + instr[1] + \" <-- @R\" + instr[2]);\r\n\t\t\t\tbreak;\r\n\t\t\tcase SAVE:\r\n\t\t\t\tSystem.out.println(\"SAVE R\" + instr[1] + \" --> @R\" + instr[2]);\r\n\t\t\t\tbreak;\r\n\t\t\tcase TRAP:\r\n\t\t\t\tSystem.out.print(\"TRAP \");\r\n\t\t\t\tbreak;\r\n\t\t\tdefault: // should never be reached\r\n\t\t\t\tSystem.out.println(\"?? \");\r\n\t\t\t\tbreak;\r\n\t\t}// switch\r\n\t\t\r\n\t}", "@Override\n public void visitCode() {\n mv.visitFieldInsn(Opcodes.GETSTATIC, \"java/lang/System\", \"out\", \"Ljava/io/PrintStream;\");\n mv.visitLdcInsn( name );\n mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, \"java/io/PrintStream\", \"println\", \"(Ljava/lang/String;)V\", false);\n \n mv.visitCode();\n }", "protected final void emitCode() {\n int bytecodeSize = request.graph.method() == null ? 0 : request.graph.getBytecodeSize();\n request.compilationResult.setHasUnsafeAccess(request.graph.hasUnsafeAccess());\n GraalCompiler.emitCode(request.backend, request.graph.getAssumptions(), request.graph.method(), request.graph.getMethods(), request.graph.getFields(), bytecodeSize, lirGenRes,\n request.compilationResult, request.installedCodeOwner, request.factory);\n }", "public String print();", "@Override\r\n\tpublic void print() {\n\t}", "public void PrintMe() {\n\t\t/* AST NODE TYPE = AST EXP NIL */\n\t\t/**********************************/\n\t\tSystem.out.print(\"AST NODE: EXP_EXP\\n\");\n\n\t\t/*****************************/\n\t\t/* RECURSIVELY PRINT exp ... */\n\t\t/*****************************/\n\t\tif (exp != null) exp.PrintMe();\n\n\t\t/*********************************/\n\t\t/* Print to AST GRAPHIZ DOT file */\n\t\t/*********************************/\n\t\tAST_GRAPHVIZ.getInstance().logNode(\n\t\t\tSerialNumber,\n \"(exp)\");\n \n\t\t/****************************************/\n\t\t/* PRINT Edges to AST GRAPHVIZ DOT file */\n\t\t/****************************************/\n\t\tAST_GRAPHVIZ.getInstance().logEdge(SerialNumber, exp.SerialNumber);\n\n\t}", "public void PrintMe()\r\n\t{\r\n\t\t/********************************************/\r\n\t\t/* AST NODE TYPE = AST VAR.PARAM_FUNC EXPRESSION */\r\n\t\t/********************************************/\r\n\t\tSystem.out.print(\"AST NODE VAR.PARAM_FUNC EXPRESSION \\n\");\r\n\r\n\t\t/***********************************/\r\n\t\t/* RECURSIVELY PRINT var + expList ... */\r\n\t\t/***********************************/\r\n\t\tif (var != null) var.PrintMe();\r\n//\t\tif (expList != null) expList.PrintMe();\r\n\r\n\t\t/***************************************/\r\n\t\t/* PRINT Node to AST GRAPHVIZ DOT file */\r\n\t\t/***************************************/\r\n\t\tAST_GRAPHVIZ.getInstance().logNode(\r\n\t\t\tSerialNumber,\r\n\t\t\tString.format(\"EXP VAR PARAM FUNC\\n()%S\", name));\r\n\t\t\r\n\t\t/****************************************/\r\n\t\t/* PRINT Edges to AST GRAPHVIZ DOT file */\r\n\t\t/****************************************/\r\n\t\tAST_GRAPHVIZ.getInstance().logEdge(SerialNumber,var.SerialNumber);\r\n//\t\tAST_GRAPHVIZ.getInstance().logEdge(SerialNumber,expList.SerialNumber);\r\n\t}", "@Test\n public void printToString() {\n System.out.println(ModuleInfo.getFromModuleCode(\"CS1010\").get());\n }", "@Override\n\tpublic void print() {\n\t\t\n\t}", "public void printInfo(){\n\t}", "public void printInfo(){\n\t}", "@Override\n\tpublic void print() {\n\n\t}", "private void outputSymbol(RebaseFile rf,RebaseJavaSymbol rs,IvyXmlWriter xw)\n{\n rs.outputNameData(rf,xw);\n}", "public void print() {\r\n\t\t System.out.println(toString());\r\n\t }", "public void print() {\n\t\tSystem.out.println(toString());\n\t}", "public void print() {\n System.out.println(toString());\n }", "void Print()\n {\n int quadLabel = 1;\n String separator;\n\n System.out.println(\"CODE\");\n\n Enumeration<Quadruple> e = this.Quadruple.elements();\n e.nextElement();\n\n while (e.hasMoreElements())\n {\n Quadruple nextQuad = e.nextElement();\n String[] quadOps = nextQuad.GetOps();\n System.out.print(quadLabel + \": \" + quadOps[0]);\n for (int i = 1; i < nextQuad.GetQuadSize(); i++)\n {\n System.out.print(\" \" + quadOps[i]);\n if (i != nextQuad.GetQuadSize() - 1)\n {\n System.out.print(\",\");\n } else System.out.print(\"\");\n }\n System.out.println(\"\");\n quadLabel++;\n }\n }", "public void printStatement() {\n\t\t\n\t}", "public void print() {\n\t// Skriv ut en grafisk representation av kösituationen\n\t// med hjälp av klassernas toString-metoder\n System.out.println(\"A -> B\");\n System.out.println(r0);\n System.out.println(\"B -> C\");\n System.out.println(r1);\n System.out.println(\"turn\");\n System.out.println(r2);\n //System.out.println(\"light 1\");\n System.out.println(s1);\n //System.out.println(\"light 2\");\n System.out.println(s2);\n }", "public void printCode( String value )\r\n\t{\r\n\t\tSystem.out.println(\"A suitable number for this : \");\r\n\t\tSystem.out.println(value);\r\n\t}", "@Test\n public void printToString() {\n System.out.println(ModuleInfo.getFromModuleCode(\"CFG1010\").get());\n\n // Test module with preclusions\n System.out.println(ModuleInfo.getFromModuleCode(\"GER1000\").get());\n\n // Test module with prerequisites\n System.out.println(ModuleInfo.getFromModuleCode(\"CS2040\").get());\n }", "public void printRoutine()\n\t{\n\t\tfor (String name: vertices.keySet())\n\t\t{\n\t\t\tString value = vertices.get(name).toString();\n\t\t\tSystem.out.println(value);\n\t\t}\n\t}", "public abstract void debug(RobocodeFileOutputStream output);", "public static void printInfo(){\n }", "public void printRecipt(){\n\n }", "public void print();", "public void print();", "public void print();", "public void print();", "public void dump()\n {\n System.out.println(toString());\n }", "@Override\n public void print() {\n }", "private void print() {\n printInputMessage();\n printFrequencyTable();\n printCodeTable();\n printEncodedMessage();\n }", "public void print(){\r\n System.out.println(toString());\r\n }", "public void emit() {\n\t\tif (label != null)\n\t\t\tSystem.out.print(label + \":\");\n\n\t\tSystem.out.println(\n\t\t\t\t\"\\t\" + getOpcode() + \" \" + source1.toString() + \" => \" + source2.toString() + \" \" + dest.toString());\n\t}", "public void printYourself(){\n\t}", "@Override\n public String codeGen() {\n\n\tString labelFun = \"labelFun\" + MiniFunLib.getLabIndex();\n\tString popParSequence = \"\";\n\tString popLocalVariable = \"\";\n\tString localVariableCodeGen = \"\";\n\n\tfor (int i = 0; i < funParams.size(); i++) {\n\t NodeType nt = this.funParams.get(i).getType().getNodeType();\n\n\t if (nt == NodeType.ARROWTYPE_NODE)\n\t\tpopParSequence += VMCommands.POP + \"\\n\" + VMCommands.POP + \"\\n\";\n\t else\n\t\tpopParSequence += VMCommands.POP + \"\\n\";\n\t}\n\n\tfor (int i = 0; i < funLocalVariables.size(); i++) {\n\t localVariableCodeGen += funLocalVariables.get(i).codeGen();\n\t popLocalVariable += VMCommands.POP + \"\\n\";\n\t}\n\n\tString code = labelFun + \" :\\n\" +\n\t// Preparo parte bassa dell'activation Record\n\n\t\t// Il registro FP punterà al nuovo Activation Record\n\t\tVMCommands.CFP + \"\\n\"\n\n\t\t// PUSH dei dati Locali\n\t\t+ localVariableCodeGen +\n\n\t\t// PUSH return address del chiamante\n\t\tVMCommands.LRA + \"\\n\"\n\n\t\t// Corpo della funzione\n\t\t+ funBody.codeGen() +\n\n\t\t// POP RV e salvo nel registro\n\t\tVMCommands.SRV + \"\\n\" +\n\n\t\t// POP RA e salvo nel registro\n\t\tVMCommands.SRA + \"\\n\" +\n\n\t\t// Rimuovo variabili locali\n\t\tpopLocalVariable +\n\t\t// Rimuovo Access Link\n\t\tVMCommands.POP + \"\\n\" +\n\t\t// Rimuovo Pametri\n\t\tpopParSequence +\n\n\t\t// Ripristino il Registro FP che punterà all'Activation Record\n\t\t// del chiamante\n\t\tVMCommands.SFP + \"\\n\" +\n\n\t\t// PUSH valore di ritorno\n\t\tVMCommands.LRV + \"\\n\" +\n\t\t// PUSH indirizzo di ritorno\n\t\tVMCommands.LRA + \"\\n\" +\n\n\t\t// Salto al Chiamante\n\t\tVMCommands.JS + \"\\n\";\n\n\tMiniFunLib.addFunctionCode(code);\n\n\treturn VMCommands.PUSH + \" \" + labelFun + \"\\n\";\n }", "public static void printInstruction(String msg) {\n out.println(msg);\n }", "@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/lib/IR/AsmWriter.cpp\", line = 3542,\n FQN=\"llvm::Module::dump\", NM=\"_ZNK4llvm6Module4dumpEv\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/AsmWriter.cpp -nm=_ZNK4llvm6Module4dumpEv\")\n //</editor-fold>\n public void dump() /*const*//* __attribute__((used)) __attribute__((noinline))*/ {\n print(dbgs(), (AssemblyAnnotationWriter /*P*/ )null, \n /*ShouldPreserveUseListOrder=*/ false, /*IsForDebug=*/ true);\n }", "void printInfo();", "public void PrintMe()\n {\n /************************************/\n /* AST NODE TYPE = DEC CLASSDEC AST NODE */\n /************************************/\n System.out.print(\"AST NODE DEC CLASSDEC\\n\");\n\n /*****************************/\n /* RECURSIVELY PRINT classDec ... */\n /*****************************/\n if (dataMembers != null) dataMembers.PrintMe();\n if (methods != null) methods.PrintMe();\n\n /*********************************/\n /* Print to AST GRAPHIZ DOT file */\n /*********************************/\n if (parentName!=null)\n {\n AST_GRAPHVIZ.getInstance().logNode(SerialNumber, String.format(\"CLASS %s EXTENDS %s\",idName,parentName));\n }\n else{\n AST_GRAPHVIZ.getInstance().logNode(SerialNumber, String.format(\"CLASS %s\",idName));\n }\n /****************************************/\n /* PRINT Edges to AST GRAPHVIZ DOT file */\n /****************************************/\n\n if (dataMembers != null) AST_GRAPHVIZ.getInstance().logEdge(SerialNumber, dataMembers.SerialNumber);\n if (methods != null) AST_GRAPHVIZ.getInstance().logEdge(SerialNumber, methods.SerialNumber);\n }", "public void printAll() {\n\t\tfor(int i = 0; i<r.length; i++)\n\t\t\tprintReg(i);\n\t\tprintReg(\"hi\");\n\t\tprintReg(\"lo\");\n\t\tprintReg(\"pc\");\n\t}", "@Override\n public String toString(\n ){\n return toXRI(); \n }", "public void println() { System.out.println( toString() ); }", "void print() {\r\n\t\tOperations.print(lexemes, tokens);\r\n\t}", "private void printCodeTable() {\n System.out.println(\"\\nPrinting the code table:\");\n for(int i = 0; i < codeTable.length; i++) {\n if(codeTable[i] != null) {\n if(i == 10) {\n System.out.println(\"\\\\n \" + codeTable[i]);\n } else {\n System.out.println(((char) i) + \" \" + codeTable[i]);\n }\n }\n }\n }", "abstract public void printInfo();", "protected String toStringAsCode() {\r\n \t\treturn \"<\"+toStringAsElement()+\">\";\r\n \t}", "public String toCodeString() {\n return String.format(\"%s = %s;\\n\", this.identifier.toString(), this.exp.toCodeString());\n }", "public void PrintMe()\n\t{\n\t\t/**************************************/\n\t\t/* AST NODE TYPE = AST CFIELD_VARDEC */\n\t\t/**************************************/\n\t\tSystem.out.print(\"AST NODE CFIELD VAR DEC\\n\");\n\n\t\t/*************************************/\n\t\t/* RECURSIVELY PRINT HEAD + TAIL ... */\n\t\t/*************************************/\n\t\tif (vardec != null) vardec.PrintMe();\n\n\t\t/**********************************/\n\t\t/* PRINT to AST GRAPHVIZ DOT file */\n\t\t/**********************************/\n\t\tAST_GRAPHVIZ.getInstance().logNode(\n\t\t\tSerialNumber,\n\t\t\t\"CFIELD\\nVAR DEC\\n\");\n\t\t\n\t\t/****************************************/\n\t\t/* PRINT Edges to AST GRAPHVIZ DOT file */\n\t\t/****************************************/\n\t\tif (vardec != null) AST_GRAPHVIZ.getInstance().logEdge(SerialNumber,vardec.SerialNumber);\n\t}", "@Override\n public void codegen(Emitter output) {\n }", "String print() {\n\t\treturn \"Hi\";\n\t}", "@Override\r\n public void dump ()\r\n {\r\n super.dump();\r\n System.out.println(\" line=\" + getLine());\r\n }", "public void gen(CodeSeq code, ICodeEnv env) {\n\r\n\t}", "public String toString()\n\t{\n\t\tString temp = \"\";\n\t\tfor (int i=0; i< lineCount; i++)\n\t\t{\n\t\t\ttemp += (i+1) + \": \" + codeLines[i] + \"\\n\";\n\t\t}\n\t\treturn temp;\n\t}", "static void print (){\n \t\tSystem.out.println();\r\n \t}", "@Override\r\n\tpublic void prettyPrintProgram(Robot robot, Writer writer)\r\n\t{\r\n\t\tif(robot.getProgram() == null)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"This robot does not yet contain a program in its memory.\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\twriter.append(robot.getProgram().toString());\r\n\t\t\t}\r\n\t\t\tcatch (IOException e)\r\n\t\t\t{\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void print () {\n }", "public void printOut() {\n System.out.println(\"\\t\" + result + \" = icmp \" + cond.toLowerCase() + \" \" + type + \" \" + op1 + \", \" + op2 );\n\n // System.out.println(\"\\t\" + result + \" = bitcast i1 \" + temp + \" to i32\");\n }", "private String genInterfaceMethod(ExecutableElement e, String typeArgs) {\n String[] lTypeArgs = typeArgs.split(\",\");\n String[] lListTypeArgs = new String[lTypeArgs.length];\n\n // Example: List<E> and List<M>\n for (int listTypeArgsCount = 0; listTypeArgsCount < lTypeArgs.length; ++listTypeArgsCount) {\n lListTypeArgs[listTypeArgsCount] = \"java.util.List<\" + lTypeArgs[listTypeArgsCount] + \">\";\n }\n\n String res = \"\";\n res += TAB + \"default IPrint \" + e.getSimpleName() + \"(\";\n // Notice that there is a possibility of this piece of grammar having\n // zero parameters.\n List<? extends VariableElement> params = e.getParameters();\n\n // This is the part where we create the arguments for the header of the\n // print function of this piece of grammar.\n // We go through all the parameters of this piece of grammar.\n for (int tempParamCount = 0; tempParamCount < params.size(); ++tempParamCount) {\n // In this case this parameter is List<E> or List<M>, then we'll\n // pass it in as List<IPrint>\n if (Utils.arrayContains(lListTypeArgs, params.get(tempParamCount).asType().toString()) != -1) {\n res += \"java.util.List<IPrint> p\" + tempParamCount;\n } else if (Utils.arrayContains(lTypeArgs, params.get(tempParamCount).asType().toString()) != -1) { // In\n // this\n // case\n // it's\n // a\n // normal\n // type,\n // so\n // it\n // will\n // only\n // be\n // one\n // IPrint.\n res += \"IPrint p\" + tempParamCount;\n } else { // In the last case it's likely to be a primitive type. We\n // can just put its type directly out there.\n res += params.get(tempParamCount).asType().toString() + \" p\" + tempParamCount;\n }\n // This is to add the , between parameters in Java\n if (tempParamCount < params.size() - 1)\n res += \", \";\n }\n res += \") {\\n\";\n\n // Now let me also try to output what method is being currently invoked\n // to the standard output. Debugging.\n res += TAB2 + \"System.out.println(\\\"We're currently trying to invoke default method \" + e.getSimpleName()\n + \" with parameters \" + e.getParameters() + \"\\\");\\n\";\n\n // This was the beginning of the method body\n res += TAB2 + \"return (Layouter<NoExceptions> pp) -> {\\n\";\n res += TAB3 + \"pp.beginI();\\n\";\n\n // We already defined an annotation in our framework called \"Syntax\" for\n // each language. We're just extracting that information.\n Syntax anno = e.getAnnotation(Syntax.class);\n if (anno == null) {\n System.err.println(\"Warning: method without syntax/token anno: \" + e);\n return \"\";\n }\n String syn = anno.value();\n String[] synList = syn.split(\" \");\n\n // DEBUGGING: Trying to see how NOA produces the grammar production for\n // this piece of grammar.\n List<String> realSyms = Arrays.asList(synList).subList(2, synList.length);\n Level precAnno = e.getAnnotation(Level.class);\n int prec = ConventionsPP.MAX_PRECEDENCE;\n if (precAnno != null) {\n prec = precAnno.value();\n }\n // noa.util.NormalAlt na = new noa.util.NormalAlt(synList[0], prec,\n // e.getSimpleName().toString(), realSyms, 0);\n // noa.util.NormalAlt na = new noa.util.NormalAlt(synList[0], 100,\n // e.getSimpleName().toString(), realSyms, 0);\n NormalAlt na = new NormalAlt(synList[0], 100, e.getSimpleName().toString(), realSyms, 0);\n res += TAB3 + \"// The string produced by NOA is: \" + na.toString() + \"\\n\";\n // labelCounter+=realSyms.size();\n\n // We start from synListCount = 2 bceause the first two\n // things are\n // `form =`, mandatory components of the annotation.\n int paramCount = 0, synListCount = 2;\n // We start processing all the symbols within the @Syntax annotation.\n while (synListCount < synList.length) {\n // // Debugging information\n res += TAB3 + \"// We're currently processing symbol \" + synList[synListCount] + \"\\n\";\n String s = synList[synListCount];\n String paramName = \"p\" + paramCount;\n\n if (isEOF(s)) {\n res += TAB3 + \"pp.nl();\\n\";\n } else if (s.equals(\"NEWLINE\") || s.equals(\"NEWLINE?\") || s.equals(\"NEWLINE*\") || s.equals(\"NEWLINE+\")) {\n res += TAB3 + \"pp.nl();\\n\";\n } else if (s.equals(\"INDENT\")) {\n res += TAB3 + \"pp.beginI();\\n\";\n } else if (s.equals(\"DEDENT\")) {\n res += TAB3 + \"pp.end();\\n\";\n } else if (s.equals(\"(\")) {\n // Handle the case of brackets in the grammar. e.g.\n /*\n * @Syntax(\"except_from_test = test ( 'as' NAME )?\")\n * E except_from_test(E test, String name);\n */\n // The only possible ending is )?\n // Actually we should just do nothing during the printing it seems. If there's nothing to print then it will just print nothing? Or actually no, if there's nothing to print then we shouldn't print the symbol either... In which case the logic would be a bit more complicated.\n\n // We'll have to process the substring and see if there's actually anything to print. OK.\n\n // However this we can only determine at runtime...\n //\t\t\t\tint tempSynListCount = synListCount;\n //\t\t\t\twhile (!synList[tempSynListCount].equals(\")?\")) {\n //\t\t\t\t\ttempSynListCount++;\n //\t\t\t\t}\n //\t\t\t\t// These are the symbols within ( )?\n //\t\t\t\tString[] optionalSynList = Arrays.copyOfRange(synList, synListCount+1, tempSynListCount-1);\n //\t\t\t\t// However how do we detect whether there's anything in them?... This is quite hard actually.\n //\t\t\t\t// Iterate through all those symbols, if they're not String, then see whether they're empty?\n //\t\t\t\tint tempParamCount = paramCount;\n //\t\t\t\tfor (String sym : optionalSynList) {\n //\t\t\t\t\tif (sym.startsWith(\"'\") && sym.endsWith(\"'\")) {\n //\t\t\t\t\t\tcontinue;\n //\t\t\t\t\t} else if (isToken(sym)) {\n //\t\t\t\t\t\ttempParamCount++;\n //\t\t\t\t\t\tcontinue;\n //\t\t\t\t\t} else if (isNonTerminal(sym)) {\n //\t\t\t\t\t\tString tempParamName = \"param\" + tempParamCount;\n ////\t\t\t\t\t\tres += TAB3 + \"if (!(\" + tempParamName + \" == null || \" + tempParamName + \".\"\n //\t\t\t\t\t\t// If we see that there is nothing to print, then we should just jump over this list. However the problem is that how should we perform the detection and jump at runtime?\n //\t\t\t\t\t\tres += TAB3 + \"if ((\" + tempParamName + \" == null)) {\\n\";\n //\t\t\t\t\t\tres += TAB4 + \"\";\n //\t\t\t\t\t\tif (!(tempParamName == null || (Utils.arrayContains(lListTypeArgs, params.get(tempParamCount))) && tempParam))\n //\t\t\t\t\t}\n //\n //\t\t\t\t}\n } else if (s.equals(\")?\") || s.equals(\")\")) {\n // Do nothing\n // I'm not sure if \")\" is something valid. Let's do it now anyways.\n } else if (s.equals(\"?\")) {\n // This indicates the previous thing is optional... I think we shouldn't deal with it at all then.\n }\n else if (isNonTerminal(s)) { // NonTerminals start with lowercase\n // I think it should just correspond with the current parameter.\n // Could it be the parameter with the same id as the current\n // syn? No I don't think that's necessarily related.\n // params.get(paramCount);\n\n // In this case it's just one single printer argument,\n // not a\n // list.\n res += TAB3 + \"if (!(\" + paramName + \" == null)) {\\n\";\n res += TAB4 + paramName + \".printLocal(pp);\\n\";\n res += TAB3 + \"}\\n\";\n paramCount++;\n } else if (isRegular(s)) { // \"regular\" means nonTerminal+/?\n // String n = getRegularSymbol(s);\n // if (n.equals(\"+\")) {\n //\n // } else { // else it's ?\n //\n // }\n // However I don't think being + or ? makes any difference here.\n // For the argument part it will just always be a List argument\n // of length either 1 or 0. Let's see if this assumption is\n // correct.\n // res += TAB3 + \"// The type is \" +\n // params.get(paramCount).asType().toString() + \"\\n\";\n res += TAB3 + \"System.out.println(\\\"In method + \" + e.getSimpleName() + \"\\\");\\n\";\n res += TAB3 + \"if (!(\" + paramName + \" == null)) {\\n\";\n res += TAB4 + \"System.out.println(\\\"The current param \" + paramName + \" has length: \\\" + \" + paramName + \".size());\\n\";\n res += TAB3 + \"}\\n\";\n res += TAB3 + \"else {\\n\";\n res += TAB4 + \"System.out.println(\\\"The current param \" + paramName + \" is null! \\\");\\n\";\n res += TAB3 + \"}\\n\";\n\n res += TAB3 + \"if (!(\" + paramName + \" == null) && !\" + paramName + \".isEmpty()) {\\n\";\n res += TAB4 + \"for (int count = 0; count < \" + paramName + \".size() - 1; count++) {\\n\";\n res += TAB5 + paramName + \".get(count).printLocal(pp);\\n\";\n res += TAB5 + \"pp.brk();\\n\";\n res += TAB4 + \"}\\n\";\n // Print the last element of the list without printing\n // extra breaks.\n res += TAB4 + paramName + \".get(\" + paramName + \".size() - 1).printLocal(pp);\\n\";\n res += TAB3 + \"}\\n\";\n paramCount++;\n } else if (ConventionsPP.isTokenRegular(s)) {\n res += TAB3 + \"System.out.println(\\\"In method + \" + e.getSimpleName() + \"\\\");\\n\";\n res += TAB3 + \"if (!(\" + paramName + \" == null)) {\\n\";\n res += TAB4 + \"System.out.println(\\\"The current param \" + paramName + \" has length: \\\" + \" + paramName + \".size());\\n\";\n res += TAB3 + \"}\\n\";\n res += TAB3 + \"else {\\n\";\n res += TAB4 + \"System.out.println(\\\"The current param \" + paramName + \" is null! \\\");\\n\";\n res += TAB3 + \"}\\n\";\n\n res += TAB3 + \"if (!(\" + paramName + \" == null) && !\" + paramName + \".isEmpty()) {\\n\";\n res += TAB4 + \"for (int count = 0; count < \" + paramName + \".size() - 1; count++) {\\n\";\n String temp = \"\\\"\\\" + \" + paramName + \".get(count);\\n\";\n res += TAB5 + \"pp.print(\" + temp + \");\\n\";\n res += TAB5 + \"pp.brk();\\n\";\n res += TAB4 + \"}\\n\";\n // Print the last element of the list without printing\n // extra breaks.\n res += TAB4 + paramName + \".get(\" + paramName + \".size() - 1).printLocal(pp);\\n\";\n String last = \"\\\"\\\" + \" + paramName + \".get(\" + paramName + \".size() - 1);\\n\";\n res += TAB4 + \"pp.print(\" + last + \");\\n\";\n res += TAB3 + \"}\\n\";\n paramCount++;\n }\n else if (isToken(s)) { // Token is something starting with upper\n // case. Supposedly they should all be\n // primitive types!\n // In this case it's a primitive type. We should just\n // directly print its literal representation.\n // The \\\"\\\" here is just a hack to force the param to be\n // displayed as String without having to call\n // `toString`...\n\n // In these types we will ask the user to\n // manually implement things. The code is in the method\n // \"genClassMethod\"\n\n // First we'll have to ensure there's actually some\n // param\n // out there. Otherwise this will be a mismatch. e.g.\n // newline\n if (!params.isEmpty()) {\n res += TAB3 + \"// Please write manual printing method for this piece of grammar if necessary.\\n\";\n String temp = \"\\\"\\\" + \" + paramName;\n res += TAB3 + \"pp.print(\" + temp + \");\\n\";\n paramCount++;\n } else {\n // Should remind the user to manually write\n // something\n // here.\n // Will try to add warning later.\n res += TAB3 + \"// Please write manual printing method for this piece of grammar.\\n\";\n }\n\n // We add a space unless the literal is the last one or\n // is\n // followed by )\n // However it seems there is another issue where even if\n // the previous argument is completely empty, we'd still\n // add a brk() here.\n } else if (isSepList(s)) {\n // generate seplist rules in 3 situations: token separator,\n // non-terminal separator and symbols\n String n = getSepListSymbol(s);\n // String label = labelFor(labelCounter, n);\n // String eltHead = label + \"=\" + n;\n // String eltTail = label + \"tail+=\" + n;\n String sep = getSepListToken(s);\n if (isToken(sep)) { // isToken means it's a terminal. Then it's\n // likely to be a list of strings.\n String nextParamName = \"p\" + (paramCount + 1);\n res += TAB3 + \"if (!(\" + nextParamName + \" == null) && !\" + paramName + \".isEmpty()) {\\n\";\n res += TAB4 + \"for (int count = 0; count < \" + nextParamName + \".size() - 1; count++) {\\n\";\n res += TAB5 + nextParamName + \".get(count).printLocal(pp);\\n\";\n res += TAB5 + \"pp.brk();\\n\";\n res += TAB5 + \"pp.print(\" + paramName + \".get(count));\\n\";\n res += TAB5 + \"pp.brk();\\n\";\n res += TAB4 + \"}\\n\";\n // Print the last element of the list without printing\n // extra breaks.\n res += TAB4 + nextParamName + \".get(\" + nextParamName + \".size() - 1).printLocal(pp);\\n\";\n res += TAB3 + \"}\\n\";\n paramCount += 2;\n } else if (isNonTerminal(sep)) {\n // In this case the normal pattern is that the current param\n // is the list of separators, while the next param is the\n // list of things being separated.\n String nextParamName = \"p\" + (paramCount + 1);\n res += TAB3 + \"if (!(\" + nextParamName + \" == null) && !\" + paramName + \".isEmpty()) {\\n\";\n res += TAB4 + \"for (int count = 0; count < \" + nextParamName + \".size() - 1; count++) {\\n\";\n res += TAB5 + nextParamName + \".get(count).printLocal(pp);\\n\";\n res += TAB5 + \"pp.brk();\\n\";\n res += TAB5 + paramName + \".get(count).printLocal(pp);\\n\";\n res += TAB5 + \"pp.brk();\\n\";\n res += TAB4 + \"}\\n\";\n // Print the last element of the list without printing\n // extra breaks.\n res += TAB4 + nextParamName + \".get(\" + nextParamName + \".size() - 1).printLocal(pp);\\n\";\n res += TAB3 + \"}\\n\";\n paramCount += 2;\n } else { // Else it's like to be just a symbol\n // In this case the argument itself is a list of\n // printers.\n // However actually this list can be just totally\n // empty.\n // For example (f), which just invokes the function\n // itself without any arguments. So we'll actually\n // have\n // to check this first otherwise there will be a\n // null\n // pointer exception.\n res += TAB3 + \"System.out.println(\\\"In method + \" + e.getSimpleName() + \"\\\");\\n\";\n res += TAB3 + \"if (!(\" + paramName + \" == null)) {\\n\";\n res += TAB4 + \"System.out.println(\\\"The current param \" + paramName + \" has length: \\\" + \" + paramName + \".size());\\n\";\n res += TAB3 + \"}\\n\";\n res += TAB3 + \"else {\\n\";\n res += TAB4 + \"System.out.println(\\\"The current param \" + paramName + \" is null! \\\");\\n\";\n res += TAB3 + \"}\\n\";\n\n res += TAB3 + \"if (!(\" + paramName + \" == null) && !\" + paramName + \".isEmpty()) {\\n\";\n res += TAB4 + \"for (int count = 0; count < \" + paramName + \".size() - 1; count++) {\\n\";\n res += TAB5 + paramName + \".get(count).printLocal(pp);\\n\";\n //\t\t\t\t\tif (isLiteral(sep) && sep.length() > 2 && sep.indexOf(\"'\") != sep.lastIndexOf(\"'\") && sep.indexOf(\"'\") != sep.length() - 1) {\n if (isLiteral(sep)) {\n String tempSep = sep.substring(sep.indexOf(\"'\") + 1, sep.lastIndexOf(\"'\"));\n res += TAB5 + \"pp.print(\\\"\" + tempSep + \"\\\");\\n\";\n res += TAB5 + \"pp.brk();\\n\";\n } else if (sep.isEmpty()) {\n // If no separator, should just give a new line?\n res += TAB5 + \"pp.nl();\\n\";\n } else {\n res += TAB5 + \"pp.print(\\\"\" + sep + \"\\\");\\n\";\n res += TAB5 + \"pp.brk();\\n\";\n }\n res += TAB4 + \"}\\n\";\n // Print the last element of the list without printing\n // extra breaks.\n res += TAB4 + paramName + \".get(\" + paramName + \".size() - 1).printLocal(pp);\\n\";\n res += TAB3 + \"}\\n\";\n paramCount++;\n }\n if (isZeroOrMoreSepList(s)) {\n // Do we need to do anything?\n res += TAB3 + \"// We found zeroOrMoreSepList, so?\\n\";\n }\n }\n\n else if (isLiteral(s)) { // Then it should really just be a keyword string, print it\n // as it is.\n String tempS = s.substring(s.indexOf(\"'\") + 1, s.lastIndexOf(\"'\"));\n res += TAB3 + \"pp.print(\" + \"\\\"\" + tempS + \"\\\");\\n\";\n } else {\n // Is this a bug? Is this supposed to happen at all?\n res += TAB3 + \"// We've likely encountered a bug here. What's the symbol? \" + s + \"\\n\";\n if (s.length() > 1) {\n s = s.substring(1, s.length() - 1);\n }\n res += TAB3 + \"pp.print(\" + \"\\\"\" + s + \"\\\");\\n\";\n\n }\n // If it's not the last element we should probably add a break\n // Actually now I'm not sure whether ) is a good indicator. Let's\n // see.\n //\t\t\tif (!(synListCount == synList.length - 1) && !(synList[synListCount + 1].contains(\")\") && !(s.contains(\"(\")))) {\n if (!(s.contains(\"(\") || synListCount > synList.length - 2 || synList[synListCount + 1].contains(\")\"))) {\n res += TAB3 + \"pp.brk();\\n\";\n }\n synListCount++;\n }\n res += TAB3 + \"pp.end();\\n\";\n res += TAB2 + \"};\\n\";\n res += TAB + \"}\\n\";\n\n /* print debugging info. */\n res += \"/* \\n\";\n res += \"params.size(): \" + params.size() + \"\\n\";\n res += \"Original syn: \" + syn + \"\\n\";\n res += \"Original synList: \" + Arrays.toString(synList) + \"\\n\";\n res += \"synList.length: \" + synList.length + \"\\n\";\n res += \"e.getParameters(): \" + e.getParameters() + \"\\n\";\n for (VariableElement param : params) {\n res += param.toString() + \": \" + param.asType() + \"\\n\";\n }\n res += \"typeArgs: \" + typeArgs + \"\\n\";\n res += \"lListTypeArgs: \";\n for (String t : lListTypeArgs) {\n res += t + \", \";\n }\n res += \"\\n\";\n res += e.getAnnotation(Syntax.class).value() + \"\\n\";\n res += \"\\n */ \\n\\n\";\n\n return res;\n }", "TraceInstructionsView instructions();", "public void generateCode() {\n\t\tfor (int i = 0; i < AsmGen.codes.size(); i++) generateFunctionASMCode(AsmGen.codes.get(i));\n\t\tgenerateMMIXMainBootstrap();\n\t\tfile.printf(\"\\n\");\n\t}", "java.lang.String getOutput();", "public static void main(String[] args) {\n \n fillArrayList();\n getNextToken();\n parseProgram();\n\n //TODO output into file ID.java\n //This seems to work\n// File f = new File(programID+\".java\");\n// try {\n// PrintWriter write = new PrintWriter(f);\n// write.print(sb.toString());\n// write.flush();\n// write.close();\n// } catch (FileNotFoundException ex) {\n// Logger.getLogger(setTranslator.class.getName()).log(Level.SEVERE, null, ex);\n// }\n System.out.println(sb.toString());\n \n }", "public void print() {\r\n System.out.println(c() + \"(\" + x + \", \" + y + \")\");\r\n }", "public void println();", "void printIOMethods(PrintWriter out) {\n\t\t// Print constructor of IO class\n\t\tout.println(\"define %class.IO* @_ZN2IOC2EV( %class.IO* %self ) noreturn {\\n\"\n\t\t\t+ \"entry:\\n\"\n\t\t\t+ \"\\t%self.addr = alloca %class.IO*\\n\"\n\t\t\t+ \"\\tstore %class.IO* %self, %class.IO** %self.addr\\n\"\n\t\t\t+ \"\\t%self1 = load %class.IO*, %class.IO** %self.addr\\n\"\n\t\t\t+\"\\tret %class.IO* %self1\\n\"\n\t\t\t+\"}\\n\");\n\n\t\tout.println(\"define %class.IO* @_ZN2IO10out_string( %class.IO* %self, i8* %str ) {\\n\"\n\t\t\t+ \"entry:\\n\"\n\t\t\t+ \"\\t%0 = call i32 (i8*, ...) @printf( i8* bitcast ( [3 x i8]* @strformatstr to i8* ), i8* %str )\\n\"\n\t\t\t+ \"\\tret %class.IO* %self\\n\"\n\t\t\t+ \"}\\n\");\n\t\n\t\tout.println(\"define %class.IO* @_ZN2IO7out_int( %class.IO* %self, i32 %int ) {\\n\"\n\t\t\t+ \"entry:\\n\"\n\t\t\t+ \"\\t%0 = call i32 (i8*, ...) @printf( i8* bitcast ( [3 x i8]* @intformatstr to i8* ), i32 %int )\\n\"\n\t\t\t+ \"\\tret %class.IO* %self\\n\"\n\t\t\t+ \"}\\n\");\n\t\n\t\tout.println(\"define i8* @_ZN2IO9in_string( %class.IO* %self ) {\\n\"\n\t\t\t+ \"entry:\\n\"\n\t\t\t+ \"\\t%0 = call i8* @malloc( i64 1024 )\\n\"\n\t\t\t+ \"\\t%retval = bitcast i8* %0 to i8*\\n\"\n\t\t\t+ \"\\t%1 = call i32 (i8*, ...) @scanf( i8* bitcast ( [3 x i8]* @strformatstr to i8* ), i8* %retval )\\n\"\n\t\t\t+ \"\\tret i8* %retval\\n\"\n\t\t\t+ \"}\\n\");\n\t\n\t\tout.println(\"define i32 @_ZN2IO6in_int( %class.IO* %self ) {\\n\"\n\t\t\t+ \"entry:\\n\"\n\t\t\t+ \"\\t%0 = call i8* @malloc( i64 4 )\\n\"\n\t\t\t+ \"\\t%1 = bitcast i8* %0 to i32*\\n\"\n\t\t\t+ \"\\t%2 = call i32 (i8*, ...) @scanf( i8* bitcast ( [3 x i8]* @intformatstr to i8* ), i32* %1 )\\n\"\n\t\t\t+ \"\\t%retval = load i32, i32* %1\\n\"\n\t\t\t+ \"\\tret i32 %retval\\n\"\n\t\t\t+ \"}\\n\");\n\t}", "public String toString()\n\t{\n\t\treturn \"#\"+ this.getStepLineNumber() + \" \" + this.getClass().getSimpleName();\n\t}", "public String toString()\n\t{\n\t\treturn \"#\"+ this.getStepLineNumber() + \" \" + this.getClass().getSimpleName();\n\t}", "@Override\n public void print(int n) {\n for (int i = 0; i < n; i++) {\n System.out.print(' ');\n }\n System.out.print(\" #{Built-in Procedure \");\n symbol.print(0);\n for (int i = 0; i < n; i++) {\n System.out.print(' ');\n }\n System.out.print('}');\n System.out.println();\n }", "public void print (){\r\n\t\tSystem.out.print(\" > Inputs (\"+numInputAttributes+\"): \");\r\n\t\tfor (int i=0; i<numInputAttributes; i++){\r\n\t\t\tif (missingValues[Instance.ATT_INPUT][i]){\r\n\t\t\t\tSystem.out.print(\"?\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tswitch(Attributes.getInputAttribute(i).getType()){\r\n\t\t\t\tcase Attribute.NOMINAL:\r\n\t\t\t\t\tSystem.out.print(nominalValues[Instance.ATT_INPUT][i]); \r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.INTEGER:\r\n\t\t\t\t\tSystem.out.print((int)realValues[Instance.ATT_INPUT][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.REAL:\r\n\t\t\t\t\tSystem.out.print(realValues[Instance.ATT_INPUT][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\" \");\r\n\t\t}\r\n\t\tSystem.out.print(\" > Outputs (\"+numOutputAttributes+\"): \");\r\n\t\tfor (int i=0; i<numOutputAttributes; i++){\r\n\t\t\tif (missingValues[Instance.ATT_OUTPUT][i]){\r\n\t\t\t\tSystem.out.print(\"?\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tswitch(Attributes.getOutputAttribute(i).getType()){\r\n\t\t\t\tcase Attribute.NOMINAL:\r\n\t\t\t\t\tSystem.out.print(nominalValues[Instance.ATT_OUTPUT][i]); \r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.INTEGER:\r\n\t\t\t\t\tSystem.out.print((int)realValues[Instance.ATT_OUTPUT][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.REAL:\r\n\t\t\t\t\tSystem.out.print(realValues[Instance.ATT_OUTPUT][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\" \");\r\n\t\t}\r\n\r\n\t\tSystem.out.print(\" > Undefined (\"+numUndefinedAttributes+\"): \");\r\n\t\tfor (int i=0; i<numUndefinedAttributes; i++){\r\n\t\t\tif (missingValues[Instance.ATT_NONDEF][i]){\r\n\t\t\t\tSystem.out.print(\"?\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tswitch(Attributes.getUndefinedAttribute(i).getType()){\r\n\t\t\t\tcase Attribute.NOMINAL:\r\n\t\t\t\t\tSystem.out.print(nominalValues[Instance.ATT_NONDEF][i]); \r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.INTEGER:\r\n\t\t\t\t\tSystem.out.print((int)realValues[Instance.ATT_NONDEF][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.REAL:\r\n\t\t\t\t\tSystem.out.print(realValues[Instance.ATT_NONDEF][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\" \");\r\n\t\t}\r\n\t}", "public void dump ()\n {\n StringBuilder b = new StringBuilder ();\n dump (b, 0);\n System.out.print (b);\n }", "public void dump ()\n {\n StringBuilder b = new StringBuilder ();\n dump (b, 0);\n System.out.print (b);\n }", "public void dump ()\n {\n StringBuilder b = new StringBuilder ();\n dump (b, 0);\n System.out.print (b);\n }", "public void dump ()\n {\n StringBuilder b = new StringBuilder ();\n dump (b, 0);\n System.out.print (b);\n }", "public void dump ()\n {\n StringBuilder b = new StringBuilder ();\n dump (b, 0);\n System.out.print (b);\n }", "public void dump ()\n {\n StringBuilder b = new StringBuilder ();\n dump (b, 0);\n System.out.print (b);\n }", "public void dump ()\n {\n StringBuilder b = new StringBuilder ();\n dump (b, 0);\n System.out.print (b);\n }", "public void dump ()\n {\n StringBuilder b = new StringBuilder ();\n dump (b, 0);\n System.out.print (b);\n }", "public void dump ()\n {\n StringBuilder b = new StringBuilder ();\n dump (b, 0);\n System.out.print (b);\n }", "public void print ()\n\t{\n\t\tSystem.out.println(\"Polyhedron File Name: \" + FileName);\n\t\tSystem.out.println(\"Object active: \" + Boolean.toString(isActive()));\n\t\tprintCoordinates();\n\t}", "public static void printProgram(ParseTree parseTree)\r\n {\r\n printProg(parseTree);\r\n }" ]
[ "0.68460476", "0.64691633", "0.6388171", "0.6358826", "0.63070196", "0.6295262", "0.6255829", "0.6243328", "0.62350994", "0.62350714", "0.6229399", "0.6195792", "0.61915654", "0.6190659", "0.6168702", "0.6159977", "0.6157398", "0.6143124", "0.61399424", "0.6112302", "0.6100639", "0.60881084", "0.6078461", "0.60688376", "0.60608745", "0.6029765", "0.60260385", "0.6002754", "0.5994905", "0.5994905", "0.598666", "0.5957233", "0.5949029", "0.59405524", "0.5917419", "0.590926", "0.5897119", "0.5891488", "0.58879375", "0.5886181", "0.5884765", "0.5880762", "0.5879667", "0.5875087", "0.5874062", "0.5874062", "0.5874062", "0.5874062", "0.5867483", "0.5861899", "0.58438665", "0.58386767", "0.58354765", "0.58332413", "0.58263123", "0.58227193", "0.5822582", "0.5819464", "0.581875", "0.5808895", "0.58066857", "0.5805648", "0.5794546", "0.578807", "0.5784529", "0.5769576", "0.57604516", "0.5759037", "0.573467", "0.57240146", "0.57223433", "0.5720838", "0.5719362", "0.57170385", "0.5716014", "0.57139665", "0.57039654", "0.5703477", "0.569739", "0.56953645", "0.5691447", "0.5683869", "0.567909", "0.56754243", "0.56702405", "0.56701404", "0.56701404", "0.56631505", "0.5661641", "0.56596845", "0.56596845", "0.56596845", "0.56596845", "0.56596845", "0.56596845", "0.56596845", "0.56596845", "0.56596845", "0.5655661", "0.5654487" ]
0.77098286
0
initialize Register Handler if Register Allocation is chosen
public static void generateTiny(boolean regalloc){ RegisterHandler regHand = null; if (regalloc){ regHand = new RegisterHandler(4, allTables); }else{ regHand = new RegisterHandler(0, allTables); } // int to keep track of liveness line within function int liveLine = -1; // cfgraph of the function in use CFGraph liveness = null; // linked list for tiny code generated by the Register Handler LinkedList<String> regcode = null; String fname = "Global"; regHand.setFunctionName(fname); // reserve variables SymbolTable globTable = allTables.getSymbolTable("Global"); ArrayList<Symbol> symbols = globTable.getSymbols(); for (int i=0; i<symbols.size();i++){ if (symbols.get(i).getType().equalsIgnoreCase("string")){ tinycode.add("str " + symbols.get(i).getName() + " " + symbols.get(i).getString()); }else{ tinycode.add("var "+symbols.get(i).getName()); } } // push registers on to stack tinycode.add("push"); tinycode.add("push r0"); tinycode.add("push r1"); tinycode.add("push r2"); tinycode.add("push r3"); tinycode.add("jsr main"); tinycode.add("sys halt"); // ArrayList to keep track of the temporaries in use ArrayList<String> temps = new ArrayList<String>(); // Loop through IR code generating tiny code ListIterator<ThreeOpCode> iter = ircode.listIterator(); while (iter.hasNext()){ ThreeOpCode topcode = iter.next(); //System.out.println(topcode.opcode + topcode.op1); if (topcode.opcode.equals("RET")){ // Function definition (Main only for this step) regHand.setMyRegistersFree(); tinycode.add("unlnk"); tinycode.add("ret"); //create function label // reset the liveness line variable liveLine = -1; } else if (topcode.opcode.equals("POP")){ if (topcode.op1 != null){ tinycode.add("pop r" + regHand.ensure(topcode.op1)); } else { tinycode.add("pop"); } } else if (topcode.opcode.equals("PUSH")){ if (topcode.op1 != null){ tinycode.add("push " + allTables.getTinyVar(fname, topcode.op1)); }else { tinycode.add("push"); } } // catch store instructions, map temperatires to registers or copy op else if (topcode.opcode.equals("READR") || topcode.opcode.equals("READI")){ tinycode.add("sys " + topcode.opcode.toLowerCase() + " " + allTables.getTinyVar(fname,topcode.op1)); } else if (topcode.opcode.contains("JSR")){ // jsr from main, add function calls generated by FunctionTree(main) if (!topcode.op1.contains("main")){ //System.out.println("jsr: " + topcode.op1+" "+ funcTrees.containsKey(topcode.op1.trim())); regHand.setMyRegistersFree(); ArrayList<String>fcall = funcTrees.get("main").generateTinyFunctionCall(funcTrees.get(topcode.op1), funcTrees.get(fname)); for (int i=0; i<fcall.size(); i++){ tinycode.add(fcall.get(i)); } // if (fcall.get(fcall.size()-1) != null){ // int r = regHand.ensure(funcTrees.get(topcode.op1).getReturnValue()); // //tinycode.add(fcall.get(fcall.size()-1).concat(Integer.toString(temps.size()))); // tinycode.add(fcall.get(fcall.size()-1).concat(Integer.toString(r))); // } //temps.add(funcTrees.get(topcode.op1).getReturnValue()); } }// test for conditional branch else if (topcode.opcode.equals("STOREI") || topcode.opcode.equals("STOREF")){ //only one op is memory or stack variable if (topcode.op1.contains("$")){ tinycode.add("move r" + regHand.ensure(topcode.op1) + " " + allTables.getTinyVar(fname, topcode.op2)); }else if (!topcode.op2.equals("$R")){ if (allTables.isGlobal(topcode.op2)){ tinycode.add("move " + topcode.op1 + " " + topcode.op2); }else { tinycode.add("move " + topcode.op1 + " r" + regHand.ensure(topcode.op2)); } } //System.out.println(regHand.ensure(topcode.op1)); //System.out.println(allTables.getTinyVar(fname, topcode.op2)); if (topcode.op2.equals("$R")){ if (!allTables.getTinyVar(fname, topcode.op1).equals("0") ){ tinycode.add("move " + allTables.getTinyVar(fname, topcode.op1) + " r" + regHand.ensure("$S")); }else{ tinycode.add("move " + topcode.op1 + " r" + regHand.ensure("$S")); } tinycode.add("move r" + regHand.ensure("$S") + " $" + Integer.toString(6+allTables.getNumberOfParameters(fname))); } /*String s ="move "; if (!topcode.op1.contains("$")){ LinkedList<String> scode = regHand.ensureStore(topcode.op1); if (scode != null){ // tiny code has been generated to mov op1 into register for (int h=0; h<scode.size(); h++){ tinycode.add(scode.get(h)); } } } s = s.concat("r"+Integer.toString(regHand.ensure(topcode.op1)) + " "); // if second op is a temp (already in a register) set its register to op1s value if (topcode.op2.contains("$")){ regHand.setRegisterVarName(regHand.ensure(topcode.op1), topcode.op2); s = s.concat("r"+ regHand.ensure(topcode.op2)); } else{ }*/ // if (topcode.op1.contains("$")){ //// if (temps.indexOf(topcode.op1) == -1){ // same temperary that is in use //// temps.add(topcode.op1); //// } //// s = s.concat("r"+ temps.indexOf(topcode.op1) +" ");//could mess up if regnum is currently 0 // LinkedList<String> scode = regHand.ensureStore(topcode.op1); // if (scode != null){ // // tiny code has been generated to mov op1 into register // for (int h=0; h<scode.size(); h++){ // tinycode.add(scode.get(h)); // } // } // s = s.concat("r"+Integer.toString(regHand.ensure(topcode.op1)) + " "); // } // didn't find it in symbol tables, number // else if (allTables.getTinyVar(fname,topcode.op1) == "0"){ // s = s.concat(topcode.op1 + " "); // } // else{ // string or global variable matched // LinkedList<String> scode = regHand.ensureStore(topcode.op1); // if (scode != null){ // // tiny code has been generated to mov op1 into register // for (int h=0; h<scode.size(); h++){ // tinycode.add(scode.get(h)); // } // } // s = s.concat(allTables.getTinyVar(fname,topcode.op1) + " "); // } // // op2 // if (topcode.op2.contains("$")){ // //System.out.println(topcode.op2 +"regnum: " + Integer.toString(regnum)); //// if (temps.indexOf(topcode.op2) == -1){ // same temperary that is in use //// temps.add(topcode.op2); //// } //// s = s.concat("r"+ temps.indexOf(topcode.op2)); // LinkedList<String> scode = regHand.ensureStore(topcode.op2); // if (scode != null){ // // tiny code has been generated to mov op1 into register // for (int h=0; h<scode.size(); h++){ // tinycode.add(scode.get(h)); // } // } // s = s.concat("r"+Integer.toString(regHand.ensure(topcode.op2))); // }else{ //variable // LinkedList<String> scode = regHand.ensureStore(topcode.op2); // if (scode != null){ // // tiny code has been generated to mov op1 into register // for (int h=0; h<scode.size(); h++){ // tinycode.add(scode.get(h)); // } // } // s = s.concat("r"+Integer.toString(regHand.ensure(topcode.op2))); // // s = s.concat(allTables.getTinyVar(fname,topcode.op2)); // } } // Catch Write statements else if (topcode.opcode.equals("WRITEI") || topcode.opcode.equals("WRITER")|| topcode.opcode.equals("WRITES")){ tinycode.add("sys " + topcode.opcode.toLowerCase() + " " + allTables.getTinyVar(fname,topcode.op1)); //System.out.println(topcode.op1 + ": "+allTables.getTinyVar(fname,topcode.op1)); }// catch add statements else if (topcode.opcode.contains("ADD") || topcode.opcode.contains("MUL") || topcode.opcode.contains("DIV") || topcode.opcode.contains("SUB")){ // where it was boolean temp1 = topcode.op1.contains("$"); boolean temp2 = topcode.op2.contains("$"); String s = ""; //reg s = topcode.opcode.toLowerCase() + " r" + Integer.toString(regHand.ensure(topcode.op2)) + " r" + Integer.toString(regHand.ensure(topcode.op1)); tinycode.add(s); tinycode.add("move r" + Integer.toString(regHand.ensure(topcode.op1)) + " r" + Integer.toString(regHand.ensure(topcode.op3))); } else if (topcode.opcode.contains("LABEL")){ tinycode.add("label " + topcode.op1); } else if (topcode.opcode.contains("LINK")){ fname = ircode.get(iter.previousIndex()-1).op1; regHand.setFunctionName(fname); tinycode.add("link " + Integer.toString(funcTrees.get(fname).getLink())); //set liveness for the new function // search for function in CFGraphs and set liveness to that function's for (int g = 0; g < cfgraphs.size(); g++){ // found it, set liveness to match the function's liveness if (cfgraphs.get(g).getFname().equals(fname)){ liveness = cfgraphs.get(g); } } }// test for conditional branch else if (topcode.opcode.contains("NE") || topcode.opcode.contains("EQ") || topcode.opcode.contains("GE") || topcode.opcode.contains("LE")){ // compare incremented variable (op1) to the register of op2 tinycode.add("cmpi " + allTables.getTinyVar(fname,topcode.op1) + " r" + regHand.ensure(topcode.op2)); tinycode.add("j".concat(topcode.opcode.toLowerCase()) + " label".concat(topcode.op3.substring(5))); } //Allen TODO unconditional jumps weren't accounted for, but they directly translate else if (topcode.opcode.contains("JUMP")){ tinycode.add("jmp " + topcode.op1); } // if register allocation is enabled update temps to reflect variables in registers if (regalloc && (liveLine > -1) && (liveLine < liveness.getSize())){ // process the next instruction, if register allocation code is needed add to tinycode //System.out.println(topcode.opcode + " "+ircode.get(iter.nextIndex()).opcode); regcode = regHand.processThreeOpCode(ircode.get(iter.nextIndex()),liveness.getLiveness(liveLine)); //System.out.println("regcode: " + regcode); // add the register code to tinycode list, add the return value to list of vals in registers if (regcode != null){ for (int t=0; t<regcode.size()-1; t++){ tinycode.add(regcode.get(t)); } // index in temps is equal to the register the value is assigned to, put the return // in the proper place in temps //temps.set(Integer.parseInt(regcode.get(regcode.size()-1)), ircode.get(iter.nextIndex()).op3); } // temps.clear(); // temps = regHand.getTemps();z } liveLine++; } // add the final return code for the program tinycode.add("unlnk"); tinycode.add("ret"); tinycode.add("end"); //tinycode.add(""); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void beginRegister() {}", "protected void __register()\n {\n }", "protected void __register()\n {\n }", "public abstract void register();", "private void initRegister() {\n this.register = new TreeMap<>();\n register.put(BillDenomination.ONE, ZERO);\n register.put(BillDenomination.TWO, ZERO);\n register.put(BillDenomination.FIVE, ZERO);\n register.put(BillDenomination.TEN, ZERO);\n register.put(BillDenomination.TWENTY, ZERO);\n }", "public Register() {\n\n this.literatureRegister = new ArrayList<>();\n }", "public void register(){\n }", "void register();", "@Override\n protected void onRegister() {\n Core.register(this);\n }", "public static int register() {\n\t\treturn 0;\n\t}", "static void register() {\n }", "public Register() {\n\t\tsuper();\n\t}", "public void initRegisters() {\n\tProcessor processor = Machine.processor();\n\n\t// by default, everything's 0\n\tfor (int i=0; i<processor.numUserRegisters; i++)\n\t processor.writeRegister(i, 0);\n\n\t// initialize PC and SP according\n\tprocessor.writeRegister(Processor.regPC, initialPC);\n\tprocessor.writeRegister(Processor.regSP, initialSP);\n\n\t// initialize the first two argument registers to argc and argv\n\tprocessor.writeRegister(Processor.regA0, argc);\n\tprocessor.writeRegister(Processor.regA1, argv);\n }", "private void initHardware(){\n }", "private Registry() {\n dbgLog.fine(\"Registry constructor is called\");\n }", "public void initDevice() {\r\n\t\t\r\n\t}", "public LiteratureRegister() {\n litRegister = new HashSet<>();\n }", "public Register() {\n }", "public static void init() {\n MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, ModifiersLoadedEvent.class, e -> INVALIDATION_COUNTER.incrementAndGet());\n }", "public Registration() {\r\n initComponents();\r\n handler = new ClientSocketHandler();\r\n }", "@Override\r\n\tpublic void register() {\n\t\t\r\n\t}", "public void register(RegistrationData d) {}", "private void init()\n {\n \t// Make page stateless.\n setStatelessHint(true);\n\n // Add registration form.\n RegistrationForm registrationForm = new RegistrationForm(REGISTRATION_FORM);\n add(registrationForm);\n // AjaxFormValidatingBehavior.addToAllFormComponents(registrationForm, \"onblur\");\n }", "public void autonomousInit() {\n \n }", "public void autonomousInit() {\n }", "public void autonomousInit() {\n }", "private void init() {\n mEventBus = new AsyncEventBus(new HandlerExecutor());\n mEventBus.register(this);\n }", "public void autonomousInit() {\n\t\t\n\t}", "private static void Initialize()\n\t{\n\t\tcurrentPC = 3996;\n\t\tcurrentFilePointer = 0;\n\t\tmemoryBlocks = new int[4000];\n\t\tregisterFile = new HashMap<String, Integer>();\n\t\tstages = new HashMap<String, Instruction>();\n\t\tlatches = new HashMap<String, Instruction>();\n\t\tspecialRegister = 0;\n\t\tisComplete = false;\n\t\tisValidSource = true;\n\t\tSystem.out.println(\"-----Initialization Completed------\");\n\t}", "@Override\n public void onCreate() {\n super.onCreate();\n handler = new Handler();\n BusProvider.register(this);\n }", "public void init() {\n\t\t\n\t\t\n\t\tprepareGaborFilterBankConcurrent();\n\t\t\n\t\tprepareGaborFilterBankConcurrentEnergy();\n\t}", "public void onInitHandler() {\n }", "public Register() {\n \n initComponents();\n \n }", "@Override\n public void register() {\n }", "public void init() {\r\n\tlog.info(\"OsylManagerServiceImpl service init() \");\r\n\t// register functions\r\n\tfor (Iterator<String> i = functionsToRegister.iterator(); i.hasNext();) {\r\n\t String function = i.next();\r\n\t functionManager.registerFunction(function);\r\n\t}\r\n }", "@Before\n\tpublic void initialize() {\n\t\tuser_reg = new UserRegistration();\n\t}", "@Override\r\n\tprotected void processInit() {\n\t\t\r\n\t}", "private native void nRegister();", "public static void init() {\r\n load();\r\n registerEventListener();\r\n }", "public static void registerISTERs() {\n\n\t}", "@Override\n\tpublic void autonomousInit() {\n\t}", "@Override\n public void autonomousInit() {\n }", "@Override\n public void autonomousInit() {\n }", "public static void init() {\n\t\tfinal CxCommandManager ccm = CxCommandManager.getInstance();\n\t\tccm.register( SEND_HOST_INFO,\tnew SendHostInfoCommandDecoder() );\n\t\tccm.register( SEND_MSG, \t\tnew SendMessageCommandDecoder() );\n\t}", "void register(RegisterData data) throws Exception;", "public static void register() {\n // Registers the GUI Handler\n NetworkRegistry.instance().registerGuiHandler(Dendritis.instance, GUIHandler.instance());\n \n OreDictionaryRegistry.oreDictionary();\n BlockRegistry.registerBlocks();\n WorldRegistry.registerWorld();\n RecipeHandler.init();\n }", "public static void init() {\n\t\tregisterRecipes();\n\t\tregisterShapelessRecipes();\n\t\tregisterSmeltingRecipes();\n\t}", "public void openRegister() {\n\n }", "private void init() {\n System.out.println(\"Binding to RMIRegistry...\");\n String theName = getConfigManager().getString(\"REMOTE_NAME\");\n if (null != theName) {\n bind(theName, this);\n } else {\n LoggingServices.getCurrent().logMsg(getClass().getName(), \"init()\"\n , \"Could not find name to bind to in registry.\"\n , \"Make sure loyalty.cfg contains a RMIREGISTRY entry.\", LoggingServices.MAJOR);\n }\n }", "void register() {\n Thread patientLoaderThread = new Thread(new RegistrationRunnable(true));\n patientLoaderThread.start();\n }", "protected void initUIComponents() {\n registerButton = findViewById(R.id.signUpButton);\n\n email = findViewById(R.id.emailInput);\n password = findViewById(R.id.passwordInput);\n password2 = findViewById(R.id.passwordInput2);\n\n registerButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if (checkFields()) {\n createRegistrationInfo();\n registerUser(registrationInfo);\n }\n }\n });\n }", "private reg1() {\n }", "private Speicher initializeRegisterStatus(Speicher speicher){\n Bit[] bits = new Bit[8];\n bits[0] = new Bit( 0, 0);\n bits[1] = new Bit( 0, 0);\n bits[2] = new Bit( 0, 0);\n bits[3] = new Bit( 1, 0);\n bits[4] = new Bit( 1, 0);\n bits[5] = new Bit( 0, 0);\n bits[6] = new Bit( 0, 0);\n bits[7] = new Bit( 0, 0);\n speicher.getSpeicheradressen()[0].getRegister()[3].setBits(bits);\n return speicher;\n }", "public void initSensorListener() {\n SensorManager mSensorManager = (SensorManager) this.mContext.getSystemService(\"sensor\");\n if (mSensorManager == null) {\n Slog.e(\"Fsm_MagnetometerWakeupManager\", \"connect SENSOR_SERVICE fail\");\n return;\n }\n boolean isRegisted = mSensorManager.registerListener(this.mMagnetometerListener, mSensorManager.getDefaultSensor(SENSOR_TYPE_HALL), 100000);\n Slog.d(\"Fsm_MagnetometerWakeupManager\", \"register Hall Sensor result:\" + isRegisted);\n }", "public Register() {\n initComponents();\n \n }", "@Override\r\n\tpublic void startup() {\n\t\tif(!initialized)\r\n\t\t\tinitOperation();\r\n\t\tregisterMBean();\r\n\t}", "private Speicher initializeRegisterA(Speicher speicher){\n Bit[] bits = new Bit[8];\n bits[0] = new Bit( 0, 1);\n bits[1] = new Bit( 0, 1);\n bits[2] = new Bit( 0, 1);\n bits[3] = new Bit( 0, 1);\n bits[4] = new Bit( 0, 1);\n bits[5] = new Bit( 0, 1);\n bits[6] = new Bit( 0, 1);\n bits[7] = new Bit( 1, 1);\n speicher.getSpeicheradressen()[0].getRegister()[5].setBits(bits);\n return speicher;\n }", "abstract protected void init(HardwareMap hardwareMap, TelemetryUtil telemetryUtil);", "@Override\n public void autonomousInit() {\n \n }", "public void onCreation(java.lang.Object init)\n {\n }", "private void init() {\n\t\tinitDesign();\n\t\tinitHandlers();\n\t}", "public RegistryCreator() {\n this.vehicleRegistry = new VehicleRegistry();\n this.inspectionResultRegistry = new InspectionResultRegistry();\n }", "public void premutoRegistrati()\n\t{\n\t\tnew _FINITO_funzione_registrazioneGUI();\n\t}", "protected void _init(){}", "private Speicher initializeRegister0007(Speicher speicher){\n Bit[] bits = new Bit[8];\n bits[0] = new Bit( 0, 0);\n bits[1] = new Bit( 0, 0);\n bits[2] = new Bit( 0, 0);\n bits[3] = new Bit( 0, 0);\n bits[4] = new Bit( 0, 0);\n bits[5] = new Bit( 0, 0);\n bits[6] = new Bit( 0, 0);\n bits[7] = new Bit( 1, 0);\n speicher.getSpeicheradressen()[0].getRegister()[7].setBits(bits);\n return speicher;\n }", "public void init() {\r\n setEventType(4);\r\n }", "public void register()\n {\n menu.registerDisplay();\n chooseRole();\n }", "private void initScanner() {\n /*\n * since barcodeReaderFragment is the child fragment in the ScannerFragment therefore\n * it is get using getChildFragmentManager\n * setting up the custom bar code listener\n */\n\n }", "@Override\n\tpublic void init() {\n\t\tsuper.init();\n\t\tlog.info(getClass().getSimpleName()+\" initialized\");\n\t}", "public void init() {\n\t\t}", "protected abstract void initHardwareInstructions();", "private void registToWX() {\n }", "private void initSensor(){\n sensorManager = (SensorManager) getSystemService(SENSOR_SERVICE);\n\n registerListeners();\n }", "@Override\n public void init() {\n leftDrive = hardwareMap.get(DcMotor.class, \"left_drive\");\n rightDrive = hardwareMap.get(DcMotor.class, \"right_drive\");\n }", "private void initHandlers(){\n\t\thandlers.put((byte) 0x02, new Cmd02());\n\t\t//handlers.put((byte) 0x03, new Cmd03());\n\t\thandlers.put((byte) 0x04, new Cmd04());\n\t\thandlers.put((byte) 0x05, new Cmd05());\n\t\thandlers.put((byte) 0x06, new Cmd06());\n\t\thandlers.put((byte) 0x07, new Cmd07());\n\t\thandlers.put((byte) 0x08, new Cmd08());\n\t\thandlers.put((byte) 0x80, new Cmd80());\n\t\thandlers.put((byte) 0x81, new Cmd81());\n\t\thandlers.put((byte) 0x82, new Cmd82());\n\t\thandlers.put((byte) 0x83, new Cmd83());\n\t\thandlers.put((byte) 0x84, new Cmd84());\n\t\thandlers.put((byte) 0x85, new Cmd85());\n\t\thandlers.put((byte) 0x86, new Cmd86());\n\t}", "public void start() {\n _serverRegisterProcessor = new ServerRegisterProcessor();\n _serverRegisterProcessor.start();\n }", "@objid (\"4bb3363c-38e1-48f1-9894-6dceea1f8d66\")\n public void init() {\n }", "@Override\r\n\tprotected void processInit() {\n\r\n\t}", "public void register() {\r\n\t\tHandlerSet hs = HandlerSet.getHandlerSet();\r\n\t\ths.addHandler(this);\r\n\t}", "@Override\n\tpublic void registrarLlegada() {\n\t\t\n\t}", "RegisterParam getRegister();", "private void init() {\n\n\t}", "@Override\n\t\tpublic void init() {\n\t\t}", "private void regFliter() {\n\t\tIntentFilter filter = new IntentFilter();\r\n\t\tfilter.addAction(OsConstants.JSH.ADD_DEVICES_SUCCES);\r\n\t\tfilter.addAction(OsConstants.JSH.SETTIING_WIFI_SUCCESS);\r\n\t\tregisterReceiver(mReceiver, filter);\r\n\t}", "public void onInitHandle() {\n }", "RegisterSensor() {\n }", "public static void init() {\n\t\t\n\t}", "@Override\n\tpublic void registrarLlegada() {\n\t}", "public ModbusRegisterInfo()\n {\n // set default\n this.requestGapMillis = ModbusInfo.DEFAULT_REQUEST_GAP_MILLIS;\n this.requestTimeoutMillis = ModbusInfo.DEFAULT_REQUEST_TIMEOUT_MILLIS;\n }", "private void Initialize()\n {\n\n }", "@Override\r\n\tpublic void init() {}", "@Override\r\n\tpublic final void init() {\r\n\r\n\t}", "public void setRequiredRegister(int requiredRegister)\n\t{\n\t\tthis.requiredRegister = requiredRegister;\n\t}", "public void init() {\n\t\t\n\t}", "private void init() {\n }", "private void init() {\n }", "private void init() {\n }", "private void init() {\n }", "@Override public void init()\n\t\t{\n\t\t}", "public void init() {\r\n\r\n\t}", "public void init() {}" ]
[ "0.6653703", "0.6491778", "0.6491778", "0.62164897", "0.6213487", "0.62034404", "0.61894315", "0.61554587", "0.61485845", "0.6138956", "0.61273265", "0.60545635", "0.6037054", "0.59940904", "0.5875373", "0.5874374", "0.58471674", "0.58308995", "0.58211154", "0.58199495", "0.5819639", "0.58066463", "0.579305", "0.5790213", "0.57651454", "0.57651454", "0.5748603", "0.57372826", "0.5728935", "0.57110226", "0.56977814", "0.5675389", "0.5656156", "0.5653547", "0.5648183", "0.56403005", "0.5629718", "0.5617903", "0.5615995", "0.5609804", "0.5609042", "0.5599574", "0.5599574", "0.5573763", "0.5573267", "0.5569099", "0.556876", "0.55672675", "0.5563924", "0.5562917", "0.5562536", "0.55579394", "0.5553016", "0.55528384", "0.55516875", "0.55398315", "0.5524661", "0.5523966", "0.5521072", "0.55172634", "0.5517048", "0.5516436", "0.55140275", "0.5513632", "0.55075085", "0.550672", "0.5499931", "0.5475748", "0.5471688", "0.54658186", "0.54642224", "0.54587585", "0.54575044", "0.54517615", "0.54460883", "0.54445416", "0.544333", "0.54414254", "0.544114", "0.5439586", "0.5435878", "0.54151416", "0.54147446", "0.5412738", "0.5410547", "0.5409506", "0.54040515", "0.5394548", "0.539098", "0.53903127", "0.5388933", "0.5387942", "0.5385773", "0.5377287", "0.5375942", "0.5375942", "0.5375942", "0.5375942", "0.5372634", "0.5365888", "0.5364887" ]
0.0
-1
Tree DOTt = tree;
public static void graphTree(CommonTree tree){ DOTTreeGenerator gen = new DOTTreeGenerator(); StringTemplate st = gen.toDOT(tree); String type = "jpg"; GraphViz gv = new GraphViz(); gv.addln(st.toString()); System.out.println("Before"); ImageIcon img = new ImageIcon(gv.getGraph(gv.getDotSource(), type)); System.out.println("After"); int newHeight = 775, newWidth = 1255; /* This is for writing the image to disk*/ File out = new File("graph." + type); // Linux gv.writeGraphToFile( gv.getGraph( gv.getDotSource(), type ), out ); // if (iw > newWidth){ // newHeight = newWidth * ih/iw ; // BufferedImage resizedImg = new BufferedImage(newWidth, newHeight, BufferedImage.TYPE_INT_RGB); // Graphics2D g2 = resizedImg.createGraphics(); // // g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR); // g2.drawImage(img.getImage(), 0, 0, newWidth, newHeight, null); // g2.dispose(); // img = new ImageIcon(resizedImg); // } JFrame jf = new JFrame("Abstract Syntax Tree"); jf.setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); JLabel photographLabel = new JLabel(); photographLabel.setHorizontalAlignment(JLabel.CENTER); //private Image getScaledImage(Image srcImg, int w, int h){ photographLabel.setIcon(img); JScrollPane scrollPane = new JScrollPane(photographLabel); jf.add(scrollPane, BorderLayout.CENTER); jf.pack(); jf.setSize(newWidth+50, newHeight+50); jf.setResizable(true); jf.setVisible(true); /*end graphical display*/ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Tree(){\n root = null;\n }", "TreeNode getTreeNode();", "public void setTree(Tree tree) {\n this.tree = tree;\n }", "public void setTree(MyTree t) {\r\n\t\ttree = t;\r\n\t}", "public MyTree getTree() {\r\n\t\treturn tree;\r\n\t}", "public TernaryTree() {\n root = null;\n\n }", "public Tree() // constructor\n\t{ root = null; }", "public JTree getTree(){\n return tree;\n }", "void makeTree()\n \t{\n \t\t\t \n \t\tobj.insert(5,\"spandu\");\n \tobj.insert(4,\"anshu\");\n \tobj.insert(3,\"anu\");\n \tobj.insert(6,\"himani\");\n \t\t\n \t}", "public TreeNode getLeft(){ return leftChild;}", "public BinaryTree leftTree()\n { return left;}", "public TreeNode() {\n }", "public abstract Type treeCopy();", "public Tree(PApplet t, PImage tree) {\n\t\tthis.t = t;\n\t\tthis.tree = tree;\n\t}", "public void setTreeSearch(Player tree){\n t = tree;\n\n // e = new EvaluationFunction1(t);\n }", "public Node<T> darTope();", "public\nstatic\nvoid\nmain(String args[]) \n\n{ \n\nBinaryTree tree = \nnew\nBinaryTree(); \n\ntree.root = \nnew\nNode(\n20\n); \n\ntree.root.left = \nnew\nNode(\n8\n); \n\ntree.root.left.left = \nnew\nNode(\n4\n); \n\ntree.root.left.right = \nnew\nNode(\n12\n); \n\ntree.root.left.right.left = \nnew\nNode(\n10\n); \n\ntree.root.left.right.right = \nnew\nNode(\n14\n); \n\ntree.root.right = \nnew\nNode(\n22\n); \n\ntree.root.right.right = \nnew\nNode(\n25\n); \n\ntree.printBoundary(tree.root); \n\n}", "public BinaryTree(){\r\n root = null;\r\n }", "public TwoFourTree()\r\n\t{\r\n\t\troot = new TreeNode(); //assign the root to a new tree node\r\n\t}", "public BinaryTree(){}", "public Object clone()\n\t{\n\t\treturn new Tree();\n\t}", "@Override\n\tpublic void visitTdetree(Tdetree p) {\n\n\t}", "TreeNode(){\n this.elem = null;\n this.left = null;\n this.right = null;\n }", "public HIRTree(){\r\n\t\t\r\n\t}", "public Tree()\n\t{\n\t\tsuper(\"Tree\", \"tree\", 0);\n\t}", "public TreeNode() { \n this.name = \"\"; \n this.rule = new ArrayList<String>(); \n this.child = new ArrayList<TreeNode>(); \n this.datas = null; \n this.candAttr = null; \n }", "public NamedTree()\r\n {\r\n head = null;\r\n }", "public TreeNode() {\n // do nothing\n }", "public EntryTree tree() {\n return tree;\n }", "public TreeNode getTreeNode() {\n return treeNode;\n }", "private static Node getTree()\r\n {\r\n Node node1 = new Node( 1 );\r\n Node node2 = new Node( 2 );\r\n Node node3 = new Node( 3 );\r\n Node node4 = new Node( 4 );\r\n Node node5 = new Node( 5 );\r\n Node node6 = new Node( 6 );\r\n Node node7 = new Node( 7 );\r\n\r\n node1.left = node2;\r\n node1.right = node3;\r\n\r\n node2.left = node4;\r\n node2.right = node5;\r\n\r\n node3.left = node6;\r\n node3.right = node7;\r\n return node1;\r\n }", "public abstract Type treeCopyNoTransform();", "public BinaryTree() {\n\t}", "public String treeType();", "public String getTreeType();", "public FamilyTree(){\r\n super();\r\n }", "public AVLTree() {\n\t\tthis.root = null;\n\t}", "FractalTree() {\r\n }", "public BinaryTree() {\n root = null;\n }", "public BinaryTree() {\n root = null;\n }", "public T getCoTU() {\r\n return tree[0];\r\n }", "@Override\n public TreeNode make(Parser parser) {\n Token token = parser.peek();\n if(token.getTokenID() == Token.TIDEN){\n return nAlistNode.make(parser); //alist trans (dont consume token alist will need it)\n }\n return null; //eps trans\n }", "TEdge createTEdge();", "public ExpressionTree()\n\t\t{\n\t root = null;\n\t\t}", "public SegmentTree() {}", "public Call treeCopyNoTransform() {\n Call tree = (Call) copy();\n if (children != null) {\n for (int i = 0; i < children.length; ++i) {\n ASTNode child = (ASTNode) children[i];\n if (child != null) {\n child = child.treeCopyNoTransform();\n tree.setChild(child, i);\n }\n }\n }\n return tree;\n }", "public Call treeCopy() {\n Call tree = (Call) copy();\n if (children != null) {\n for (int i = 0; i < children.length; ++i) {\n ASTNode child = (ASTNode) getChild(i);\n if (child != null) {\n child = child.treeCopy();\n tree.setChild(child, i);\n }\n }\n }\n return tree;\n }", "public static void setOldTree(RootedTree t) {\r\n\t\tsetOldNewickString(createNewickString(t)); // Added by Madhu, it is where I save the newick\r\n\t\t// string for the uploaded tree.\r\n\t\tSystem.out.println(\"OLD NODE:\" + getOldNewickString());\r\n\t\toldTree = t;\r\n\t}", "public BinaryTree()\n {\n //this is the constructor for the BinaryTree object\n data = null;\n left = null;\n right = null;\n }", "private InfixExpression getNode()\n{\n return (InfixExpression) ast_node;\n}", "public AVLTree() {\r\n\r\n\r\n this.root = new AVLTreeNode(9);\r\n Delete(9);\r\n }", "public abstract TreeNode copy();", "public RBTree() {\r\n\t\troot = null;\r\n\t}", "TreeNode returnNode(TreeNode node);", "public RBTree() {\n\t\troot = null;\n\t\tdrawer = new RBTreeDrawer();\n\t}", "public void treeEdge(Edge e) {}", "public ObjectBinaryTree() {\n root = null;\n }", "private static TreeNode getNode() {\n TreeNode treeNode = new TreeNode(1);\n TreeNode left = new TreeNode(2);\n TreeNode right = new TreeNode(3);\n treeNode.left = left;\n treeNode.right = right;\n\n left.left = new TreeNode(4);\n right.left = new TreeNode(5);\n right.right = new TreeNode(6);\n return treeNode;\n }", "public void setGameTree(TttTree theTree) {\r\n\t\tgameTree = theTree;\r\n\t}", "public BTNode getLeft(){\r\n return leftLeaf;\r\n }", "public BinaryTree(String expression) {\n \tString[] arr = expression.split(\" \");\n \troot = parse(arr);\n }", "public SubstitutedBodyDecl treeCopy() {\n SubstitutedBodyDecl tree = (SubstitutedBodyDecl) copy();\n if (children != null) {\n for (int i = 0; i < children.length; ++i) {\n ASTNode child = (ASTNode) getChild(i);\n if (child != null) {\n child = child.treeCopy();\n tree.setChild(child, i);\n }\n }\n }\n return tree;\n }", "public OpTree(String theOp)\n\t{\n\t\tme = ++total;\n\t\tif (DEBUG) System.out.println(\"Terminal Op \" + me);\n\t\top = theOp;\n\t\tdval = null;\n\t\tleft = null;\n\t\tright = null;\n\t}", "public Tree() {\n // constructor. no nodes in tree yet\n root = null;\n }", "public TreeImpl(T dato) {\r\n\t\traiz = new NodeImpl<T>(dato, null);// El null dice que es raiz\r\n\t}", "public RBTree() {\r\n\t\t// well its supposed just create a new Red Black Tree\r\n\t\t// Maybe create a new one that does a array of Objects\r\n\t}", "public static Tree getSentenceTree(CoreMap sentenceAnnotation) {\n\treturn sentenceAnnotation.get(TreeAnnotation.class);\n }", "public static TreeNode getBasicTree(){\n TreeNode one = new TreeNode(1);\n TreeNode two = new TreeNode(2);\n TreeNode three = new TreeNode(3);\n TreeNode four = new TreeNode(4);\n TreeNode five = new TreeNode(5);\n TreeNode six = new TreeNode(6);\n TreeNode seven = new TreeNode(7);\n\n one.left = two;\n one.right = three;\n two.left = four;\n two.right = five;\n four.left = six;\n four.right = seven;\n\n return one;\n }", "public JTreeOperator treePaletteContentsTree() {\n if (_treePaletteContentsTree==null) {\n _treePaletteContentsTree = new JTreeOperator(this);\n }\n return _treePaletteContentsTree;\n }", "public GitTree getTree() { return _cmt.getTree(); }", "public BinaryTree()\n\t{\n\t\troot = null;\n\t}", "public Tree transformTree(Tree t) {\n return QPtransform(t);\n }", "public AVLTree() \r\n\t{\r\n\t\tthis.root = new AVLNode(null);\r\n\t}", "public Tree getDepTree() {\r\n return depTree;\r\n }", "public RedBlackTree()\n { \n \t root = null;\n }", "public SubstitutedBodyDecl treeCopyNoTransform() {\n SubstitutedBodyDecl tree = (SubstitutedBodyDecl) copy();\n if (children != null) {\n for (int i = 0; i < children.length; ++i) {\n ASTNode child = (ASTNode) children[i];\n if (child != null) {\n child = child.treeCopyNoTransform();\n tree.setChild(child, i);\n }\n }\n }\n return tree;\n }", "Node(Team v){\r\n value = v;\r\n }", "public Leaf(){}", "public ExpressionTree(TreeNode treeNode) {\n\t\tsuper(treeNode.getValue(), treeNode.getLeft(), treeNode.getRight());\n\t}", "public Tree(String label) {\n treeName = label;\n root = null;\n }", "public TreeNode(){ this(null, null, 0);}", "public MorseCodeTree()\r\n\t{\r\n\t\tbuildTree();\r\n\t}", "@Test\n public void visualiseTree()\n {\n System.out.println(avlTree.toString());\n }", "@Override public JannotTreeJCExpression getLeftOperand()\n{\n return createTree(getNode().getLeftOperand()); \n}", "public TreeNode getRight(){ return rightChild;}", "public static TreeNode getTree() {\n TreeNode treeNode4 = new TreeNode(4);\n TreeNode treeNode3 = new TreeNode(3);\n TreeNode treeNode1 = new TreeNode(1);\n TreeNode treeNode2 = new TreeNode(2);\n TreeNode treeNode5 = new TreeNode(5);\n TreeNode treeNode6 = new TreeNode(6);\n treeNode4.left = treeNode3;\n treeNode4.right = treeNode5;\n treeNode3.left = treeNode1;\n treeNode3.right = treeNode2;\n treeNode5.right = treeNode6;\n return treeNode4;\n }", "public Node readTree() {\n boolean totuusarvo = b.readBoolean();\n if (totuusarvo == true) {\n return new Node(b.readShort(), -1, null, null);\n } else {\n return new Node(\"9000\", -1, readTree(), readTree());\n }\n }", "public BinaryTree rightTree()\n {return right;}", "protected PhraseTree() {}", "void setLeft(TreeNode<T> left);", "public LinkedBinaryTree() { // constructs an empty binary tree\n\n }", "public TreeNode deserialize1(String tree) {\r\n \r\n // **** sanity checks ****\r\n if (tree.isEmpty())\r\n return null;\r\n\r\n // **** split the tree string ****\r\n String[] strs = tree.split(\" \");\r\n\r\n // **** deserialise BST ****\r\n return deserialize1(strs, 0, strs.length - 1);\r\n }", "public BSTree2(){\n root = null;\n }", "private void CreateTree()\r\n\t{\r\n\r\n\t\t//sample nodes which are not identical\r\n\t\ta = new Node(1);\r\n\t\ta.left = new Node(3);\r\n\t\ta.left.left = new Node(5);\r\n\t\ta.right = new Node(2);\r\n\r\n\r\n\t\tb = new Node(2);\r\n\t\tb.left = new Node(1);\r\n\t\tb.right = new Node(3);\r\n\t\tb.right.right = new Node(7);\r\n\t\tb.left.right = new Node(4);\r\n\r\n\t\t//sample nodes which are identical\r\n\t\ta1 = new Node(1);\r\n\t\ta1.left = new Node(3);\r\n\t\ta1.left.left = new Node(5);\r\n\t\ta1.right = new Node(2);\r\n\r\n\r\n\t\tb1 = new Node(1);\r\n\t\tb1.left = new Node(3);\r\n\t\tb1.right = new Node(2);\r\n\t\tb1.left.left = new Node(5); \r\n\t}", "public static String printTree(Tree t) {\n\tStringWriter sw = new StringWriter();\n\tPrintWriter pw = new PrintWriter(sw);\n\tTreePrint tp = new TreePrint(\"penn\", \"markHeadNodes\", tlp);\n\ttp.printTree(t, pw);\n\treturn sw.toString();\n }", "public myBinaryTree<T> my_mirror();", "public IntTree() {\n overallRoot = null;\n }", "@Test\n public void testPhylogeneticTreeParserNoNamesNoDistance() {\n // create the actual tree\n String tree = \"(,,(,));\";\n PhylogeneticTreeItem rootActual = PhylogeneticTreeParser.parse(tree);\n\n // create the expected Tree\n // root node\n PhylogeneticTreeItem rootExpected = new PhylogeneticTreeItem();\n // add 3 child nodes\n PhylogeneticTreeItem current = new PhylogeneticTreeItem();\n current.setParent(rootExpected);\n current = new PhylogeneticTreeItem();\n current.setParent(rootExpected);\n current = new PhylogeneticTreeItem();\n current.setParent(rootExpected);\n // add 2 child nodes to the third node\n PhylogeneticTreeItem current2 = new PhylogeneticTreeItem();\n current2.setParent(current);\n current2 = new PhylogeneticTreeItem();\n current2.setParent(current);\n\n // compare the trees\n assertEquals(\"both trees do not match\", rootExpected, rootActual);\n\n }", "public KdTree() {\n root = null;\n }", "public JdbTree() {\r\n this(new Object [] {});\r\n }", "public KdTree() {\n }" ]
[ "0.651521", "0.6499429", "0.64721835", "0.63713735", "0.6362542", "0.6309546", "0.62647754", "0.62567335", "0.615262", "0.6075941", "0.60747695", "0.6059355", "0.60488737", "0.6046209", "0.5963573", "0.596295", "0.59573513", "0.59201866", "0.59026235", "0.5891897", "0.58823735", "0.5862931", "0.5846027", "0.58378404", "0.58225715", "0.5786709", "0.57636625", "0.57459253", "0.57308614", "0.5726893", "0.57244617", "0.5721455", "0.571607", "0.5705294", "0.56812185", "0.5677945", "0.5671447", "0.5666066", "0.56648207", "0.56648207", "0.5659887", "0.5659525", "0.56508136", "0.5647405", "0.5644883", "0.56381184", "0.56282365", "0.56259453", "0.5625189", "0.56205875", "0.5619432", "0.56191736", "0.5603536", "0.5602617", "0.55901825", "0.55892956", "0.5585427", "0.55849916", "0.55774397", "0.5574985", "0.55676425", "0.55657864", "0.5562939", "0.5562783", "0.55408293", "0.553881", "0.5532439", "0.5531322", "0.5528706", "0.5527807", "0.5526247", "0.5523967", "0.551907", "0.5515881", "0.55105925", "0.5510381", "0.5509901", "0.55031914", "0.5498114", "0.54836917", "0.54785603", "0.5474842", "0.5469333", "0.5467378", "0.5450542", "0.5449929", "0.54415053", "0.5440331", "0.5433193", "0.5424301", "0.5422998", "0.54149276", "0.54146403", "0.54020905", "0.5397196", "0.5396925", "0.53854656", "0.53849465", "0.5377393", "0.5372822", "0.53702384" ]
0.0
-1
get the current GoogleAPIClient
private GoogleApiClient getGoogleApiClient() { if (mGoogleApiClient == null) { //create location service so that we can interact with Geofence mGoogleApiClient = new GoogleApiClient.Builder(mContext) .addApi(LocationServices.API) .addConnectionCallbacks(this) .addOnConnectionFailedListener(this) .build(); } return mGoogleApiClient; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public GoogleApiClient getGoogleApiCLient()\n {\n return googleApiClient;\n }", "protected GoogleApiClient getGoogleApiClient() {\n return mClient;\n }", "private static GoogleApiClient getClient(@NonNull Context context) {\n final String serverClientId = context.getString(R.string.server_client_id);\n final GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestIdToken(serverClientId)\n .requestEmail()\n .build();\n\n // Build a GoogleApiClient with access to the Google Sign-In API\n return new GoogleApiClient.Builder(context)\n .addApi(Auth.GOOGLE_SIGN_IN_API, gso)\n .build();\n }", "public GoogleApiClient getGoogleApiClient(){\n return googleApiClient;\n }", "protected synchronized void createGoogleAPIClient() {\n googleApiClient = new GoogleApiClient.Builder(this)\n .addConnectionCallbacks(this)\n .addOnConnectionFailedListener(this)\n .addApi(LocationServices.API)\n .build();\n }", "private Calendar getGoogleClient(String email)\t{\n\t\tGoogleCredential credential = getGoogleCredential(email);\n\t\tCalendar client = getGoogleClient(credential);\n\t\treturn client;\n\t}", "public ApiClient getApiClient() {\n return apiClient;\n }", "public ApiClient getApiClient() {\n return apiClient;\n }", "public static synchronized APIClient getINSTANCE() {\n if (INSTANCE == null) {\n INSTANCE = new APIClient();\n }\n return INSTANCE;\n }", "public static Client getHttpClient() {\r\n return c;\r\n }", "protected HttpClient getClient() {\n if (client == null) {\n synchronized (this) {\n if (client == null) {\n client = new DefaultHttpClient(conman, params);\n }\n }\n }\n\n return client;\n }", "public static AuthenticatedClient getAuthenticatedClient() {\n\t\treturn getAuthenticatedClient(false);\n\t}", "public static ApiClient getDefaultApiClient() {\n return defaultApiClient;\n }", "private void configureGoogleClient() {\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n // for the requestIdToken, this is in the values.xml file that\n // is generated from your google-services.json\n .requestIdToken(getString(R.string.default_web_client_id))\n .requestEmail()\n .build();\n // Build a GoogleSignInClient with the options specified by gso.\n googleSignInClient = GoogleSignIn.getClient(this, gso);\n // Initialize Firebase Auth\n firebaseAuth = FirebaseAuth.getInstance();\n }", "public Client getClient() {\n return client;\n }", "public Client getClient() {\n return client;\n }", "public Client getClient() {\r\n\t\treturn this.client;\r\n\t}", "public okhttp3.OkHttpClient getHttpClientInstance() {\r\n return configuration.getHttpClientInstance();\r\n }", "public Client getClient() {\n\t\treturn client;\n\t}", "public Client getClient() {\n\t\treturn client;\n\t}", "public MqttAndroidClient getClient() {\n return client;\n }", "private void initGoogleClient() {\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestIdToken(getString(R.string.default_web_client_id))\n .requestEmail()\n .build();\n\n mGoogleSignInClient = GoogleSignIn.getClient(this, gso);\n\n // [START initialize_auth]\n // Initialize Firebase Auth\n // [END initialize_auth]\n }", "GmailClient getGmailClient(Credential credential);", "public static Client getClient(){\n // Create a new client if it hasn't been created yet\n if(client == null) client = new Client(60000,60000);\n return client;\n }", "public static OkHttpClient getOkHttpClient() {\n return OK_HTTP_CLIENT;\n }", "public static DucktalesClient getClient() {\n \treturn client;\n }", "public GoogleAPI() {\n try {\n ytService = getService();\n } catch (GeneralSecurityException | IOException e) {\n e.printStackTrace();\n }\n DEVELOPER_KEY = DEVELOPER_KEY_Junwei;\n }", "protected MqttAsyncClient getClient() {\n return client;\n }", "public HttpClient getHttpClient() {\n return appContext.getHttpClient();\n }", "public ClientI getClient() {\n\t\treturn client;\n\t}", "protected HttpClient getHttpClient( ) {\r\n\t\treturn httpClient;\r\n\t}", "public WebClient getWebClient() {\n if (this.webClient == null) {\n this.webClient = WebClient.builder().baseUrl(getServiceEndpoint()).build();\n }\n\n return this.webClient;\n }", "public GoogleAuthHelper() {\n\t\t\n\t\tLoadType<ClientCredentials> credentials = ofy().load().type(ClientCredentials.class);\n\t\t\n\t\tfor(ClientCredentials credential : credentials) {\n\t\t\t// static ClientCredentials credentials = new ClientCredentials();\n\t\t\tCALLBACK_URI = credential.getCallBackUri();\n\t\t\tCLIENT_ID = credential.getclientId();\n\t\t\tCLIENT_SECRET = credential.getClientSecret();\n\t\t}\n\t\t\n\t\tflow = new GoogleAuthorizationCodeFlow.Builder(HTTP_TRANSPORT,\n\t\t\t\tJSON_FACTORY, CLIENT_ID, CLIENT_SECRET, SCOPE).setAccessType(\n\t\t\t\t\"offline\").build();\n\t\tgenerateStateToken();\n\t}", "public static Client getClient() {\n if (ClientHandler.client == null) {\n ClientHandler.client = new Client();\n }\n return ClientHandler.client;\n }", "public Client getCurrentClient() {\n return currentClient;\n }", "public static RetrofitClient getInstance() {\n return OUR_INSTANCE;\n }", "public static Client getCurrentClient(){\r\n return currClient;\r\n }", "default Client getClient(Long id) {\r\n return get(Client.class, id);\r\n }", "public ClientTracker getClientTracker() {\n return _clientTracker;\n }", "public static IClient clientAccessor() {\n return Application.getGame().getClientAccessor();\n }", "@Override\n public void onCreate(){\n super.onCreate();\n createGoogleAPIClient();\n Log.i(TAG, \"On Create\");\n }", "protected Client getRealClient() {\n\t\treturn client;\n\t}", "public interface GmailClientFactory {\n /**\n * Creates a GmailClient instance\n *\n * @param credential a valid Google credential object\n * @return a GmailClient instance that contains the user's credentials\n */\n GmailClient getGmailClient(Credential credential);\n}", "public MailjetClient getClient() {\n return client;\n }", "private String getClientId()\n {\n String clientId = null;\n try {\n clientId = IdentificationLoader.usingDefault().getClientId();\n } catch (IOException e) {\n System.out.println(\"Could not load client ID\");\n e.printStackTrace();\n System.exit(1);\n }\n return clientId;\n }", "public Gmail getGmailService() throws IOException {\n\t\tCredential credential = this.googleCred;\n\t\treturn new Gmail.Builder(HTTP_TRANSPORT, JSON_FACTORY, credential)\n\t\t\t\t.setApplicationName(APP_NAME)\n\t\t\t\t.build();\n\t}", "public CountriesApiService getApiService() {\n if (apiService == null) {\n synchronized (RestClient.class) {\n if (apiService == null)\n new RestClient();\n }\n }\n return apiService;\n }", "public HttpClient httpClient() {\n return httpClient;\n }", "Client getClient();", "public static AppClient getInstance() {\n return instance;\n }", "private CloseableHttpClient getHttpClient() {\n return HttpClients.custom()\n .setConnectionManager(httpClientConnectionManager)\n .setConnectionManagerShared(true)\n .build();\n }", "@Bean\n\tpublic ApiClient apiClient() {\n\t\tApiClient apiClient = new ApiClient(grantType, clientId, clientSecret, accessTokenUri, code);\n\n\t\treturn apiClient;\n\t}", "public static Client getInstance() {\n if(client == null) {\n client = new Client();\n }\n return client;\n }", "protected NuxeoClient getClient() {\n if (client == null) {\n initClient();\n }\n return client;\n }", "private void buildGoogleApiClient() {\n if (googleApiClient == null) {\n googleApiClient = new GoogleApiClient.Builder(this)\n .addApi(Drive.API)\n .addScope(Drive.SCOPE_FILE)\n .addConnectionCallbacks(this)\n .addOnConnectionFailedListener(this)\n .build();\n }\n }", "protected synchronized void buildGoogleApiClient() {\n\t\tmGoogleApiClient = new GoogleApiClient.Builder(context)\n\t\t\t\t.addConnectionCallbacks(this)\n\t\t\t\t.addOnConnectionFailedListener(this)\n\t\t\t\t.addApi(LocationServices.API).build();\n\t}", "private YouTube getService() throws GeneralSecurityException, IOException {\n final NetHttpTransport httpTransport = GoogleNetHttpTransport.newTrustedTransport();\n return new YouTube.Builder(httpTransport, JSON_FACTORY, null)\n .setApplicationName(APPLICATION_NAME)\n .build();\n }", "protected synchronized void buildGoogleApiClient() {\n //Confirms no instance of GoogleApiClient has been instantiated\n if (mGoogleApiClient == null) {\n mGoogleApiClient = new GoogleApiClient.Builder(this)\n .addConnectionCallbacks(this)\n .addOnConnectionFailedListener(this)\n .addApi(LocationServices.API)\n .build();\n }\n }", "public Object getClientId()\n {\n return clientId; // Field is final; no need to sync.\n }", "public synchronized void buildGoogleApiClient() {\r\n mGoogleApiClient = new GoogleApiClient.Builder(this)\r\n .addConnectionCallbacks(this)\r\n .addOnConnectionFailedListener(this)\r\n .addApi(LocationServices.API)\r\n .build();\r\n }", "protected synchronized void buildGoogleApiClient() {\n mGoogleApiClient = new GoogleApiClient.Builder(getContext())\n .addConnectionCallbacks(this)\n .addOnConnectionFailedListener(this)\n .addApi(LocationServices.API).build();\n }", "protected synchronized void buildGoogleApiClient() {\r\n googleApiClient = new GoogleApiClient.Builder(this)\r\n .addConnectionCallbacks(this)\r\n .addOnConnectionFailedListener(this)\r\n .addApi(LocationServices.API)\r\n .build();\r\n }", "public static Object httpClient() {\n return new Object();\n// return HttpClient.newBuilder()\n// .version(HttpClient.Version.HTTP_1_1)\n// .followRedirects(HttpClient.Redirect.NORMAL)\n// .connectTimeout(Duration.ofSeconds(300))\n// .build();\n }", "public void connectApiClient()\n {\n googleApiClient.connect();\n }", "public String getGoogleId_() {\n return googleId_;\n }", "public JSONRPC2Session getClient()\n {\n return client;\n }", "protected HeavyClient getClient() {\n\t\treturn client;\n\t}", "public static String getGoogleCookie() {\n return GOOGLE_COOKIE;\n }", "GoogleAuthenticatorKey createCredentials();", "protected synchronized void buildGoogleApiClient() {\n mGoogleApiClient = new GoogleApiClient.Builder(getActivity())\n .addConnectionCallbacks(this)\n .addOnConnectionFailedListener(this)\n .addApi(LocationServices.API)\n .build();\n }", "public abstract Client getClient();", "protected synchronized void buildGoogleApiClient() {\n mGoogleApiClient = new GoogleApiClient.Builder(this)\n .addConnectionCallbacks(this)\n .addOnConnectionFailedListener(this)\n .addApi(LocationServices.API).build();\n }", "protected synchronized void buildGoogleApiClient() {\n mGoogleApiClient = new GoogleApiClient.Builder(this)\n .addConnectionCallbacks(this)\n .addOnConnectionFailedListener(this)\n .addApi(LocationServices.API)\n .build();\n }", "public static Retrofit getClient() {\n if (retrofit == null){ // Nos aseguramos que no se haya creado un objeto retrofit\n Gson gson = new GsonBuilder()\n .setLenient()\n .create();\n\n retrofit = new Retrofit.Builder() // Inicializamos el objeto Retrofit\n .baseUrl(BASE_URL) // Indicamos a cual sitio se estará conectando\n .addConverterFactory(GsonConverterFactory.create(gson)) // Indicamos cual será nuestro serializador y deserializador de objetos (JSON)\n .build(); // Construimos el objeto\n Log.w(\"Retrofit\",\"Retrofit Start\");\n }\n return retrofit;\n }", "protected synchronized void buildGoogleApiClient() {\n mGoogleApiClient = new GoogleApiClient.Builder(this)\n .addConnectionCallbacks(this)\n .addOnConnectionFailedListener(this)\n .addApi(LocationServices.API)\n .build();\n mGoogleApiClient.connect();\n }", "public void buildApiClient(){\n if(c==null){\n c = new GoogleApiClient.Builder(this)\n .addConnectionCallbacks(this)\n .addOnConnectionFailedListener(this)\n .addApi(LocationServices.API)\n .build();\n }\n }", "public interface GoogleAccountDataClient {\n AccountNameCheckResponse checkAccountName(AccountNameCheckRequest accountNameCheckRequest) throws ;\n\n CheckFactoryResetPolicyComplianceResponse checkFactoryResetPolicyCompliance(CheckFactoryResetPolicyComplianceRequest checkFactoryResetPolicyComplianceRequest) throws ;\n\n PasswordCheckResponse checkPassword(PasswordCheckRequest passwordCheckRequest) throws ;\n\n CheckRealNameResponse checkRealName(CheckRealNameRequest checkRealNameRequest) throws ;\n\n void clearFactoryResetChallenges() throws ;\n\n ClearTokenResponse clearToken(ClearTokenRequest clearTokenRequest) throws ;\n\n boolean clearWorkAccountAppWhitelist() throws ;\n\n TokenResponse confirmCredentials(ConfirmCredentialsRequest confirmCredentialsRequest) throws ;\n\n TokenResponse createAccount(GoogleAccountSetupRequest googleAccountSetupRequest) throws ;\n\n TokenResponse createPlusProfile(GoogleAccountSetupRequest googleAccountSetupRequest) throws ;\n\n @Deprecated\n GoogleAccountData getAccountData(@Deprecated String str) throws ;\n\n Bundle getAccountExportData(String str) throws ;\n\n String getAccountId(String str) throws ;\n\n AccountRecoveryData getAccountRecoveryCountryInfo() throws ;\n\n AccountRecoveryData getAccountRecoveryData(AccountRecoveryDataRequest accountRecoveryDataRequest) throws ;\n\n AccountRecoveryGuidance getAccountRecoveryGuidance(AccountRecoveryGuidanceRequest accountRecoveryGuidanceRequest) throws ;\n\n GetAndAdvanceOtpCounterResponse getAndAdvanceOtpCounter(String str) throws ;\n\n GoogleAccountData getGoogleAccountData(Account account) throws ;\n\n String getGoogleAccountId(Account account) throws ;\n\n GplusInfoResponse getGplusInfo(GplusInfoRequest gplusInfoRequest) throws ;\n\n OtpResponse getOtp(OtpRequest otpRequest) throws ;\n\n TokenResponse getToken(TokenRequest tokenRequest) throws ;\n\n boolean installAccountFromExportData(String str, Bundle bundle) throws ;\n\n AccountRemovalResponse removeAccount(AccountRemovalRequest accountRemovalRequest) throws ;\n\n boolean setWorkAccountAppWhitelistFingerprint(String str, String str2) throws ;\n\n TokenResponse signIn(AccountSignInRequest accountSignInRequest) throws ;\n\n AccountRecoveryUpdateResult updateAccountRecoveryData(AccountRecoveryUpdateRequest accountRecoveryUpdateRequest) throws ;\n\n TokenResponse updateCredentials(UpdateCredentialsRequest updateCredentialsRequest) throws ;\n\n ValidateAccountCredentialsResponse validateAccountCredentials(AccountCredentials accountCredentials) throws ;\n}", "public static UserClient getUserClient() {\n if (USER_CLIENT == null) {\n USER_CLIENT =\n new NetworkUserClient(NetworkProvider.SERVER_URL, new DefaultNetworkProvider());\n }\n return USER_CLIENT;\n }", "protected synchronized void buildGoogleApiClient() {\n\n mGoogleApiClient = new GoogleApiClient.Builder(this)\n .addConnectionCallbacks(this)\n .addOnConnectionFailedListener(this)\n .addApi(LocationServices.API)\n .build();\n mGoogleApiClient.connect();\n }", "public BaseHttpXCapClient()\n {\n ServiceReference guiVerifyReference\n = SipActivator.getBundleContext().getServiceReference(\n CertificateService.class.getName());\n\n if(guiVerifyReference != null)\n certificateVerification\n = (CertificateService)SipActivator.getBundleContext()\n .getService(guiVerifyReference);\n }", "private static WebClient getClient(final Context context) {\n if (sInstance == null) {\n sInstance = new WebClient(context);\n }\n return sInstance;\n }", "@java.lang.Override\n public com.google.cloud.networkmanagement.v1beta1.GoogleServiceInfo getGoogleService() {\n if (stepInfoCase_ == 24) {\n return (com.google.cloud.networkmanagement.v1beta1.GoogleServiceInfo) stepInfo_;\n }\n return com.google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.getDefaultInstance();\n }", "public static Gmail getGmailService() throws IOException {\n\t\tCredential credential = authorize();\n\t\treturn new Gmail.Builder(HTTP_TRANSPORT, JSON_FACTORY, credential).setApplicationName(APPLICATION_NAME).build();\n\t}", "private synchronized void buildGoogleApiClient() {\n mGoogleApiClient = new GoogleApiClient.Builder(this)\n .addConnectionCallbacks(this)\n .addOnConnectionFailedListener(this)\n .addApi(ActivityRecognition.API)\n .build();\n }", "public Client getClient() {\n\t\tcheckInit();\n\t\tfinal Client cli = tenant.getContext().getBean(Client.class);\n\t\tif (cli.getEventMapper()==null) {\n\t\t\tcli.setEventMapper(getEventMapper());\n\t\t}\n\t\treturn cli;\n\t}", "public void getGoogleToken() {\n String googleEmail = sharedpreferences.getString(\"GoogleEmail\", \"\");\n String scopes = sharedpreferences.getString(\"GoogleScopes\", \"\");\n if (!\"\".equals(googleEmail)) {\n MyAsyncTask asyncTask = new MyAsyncTask(googleEmail, scopes, this.getBaseContext());\n asyncTask.delegate = this;\n asyncTask.execute();\n }\n }", "public String getClientToken() {\n return clientToken;\n }", "public String getClientToken() {\n return clientToken;\n }", "public ServerInfo clientInterface()\n {\n return client_stub;\n }", "@Override\n\tpublic Player getClient() {\n\t\treturn client;\n\t}", "protected synchronized void buildGoogleApiClient() {\n try {\n System.out.println(\"In GOOGLE API CLIENT\");\n mGoogleApiClient = new GoogleApiClient.Builder(this)\n .addConnectionCallbacks(this)\n .addOnConnectionFailedListener(this)\n .addApi(LocationServices.API).build();\n mGoogleApiClient.connect();\n createLocationRequest();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private ProfileRestClient getProfileRestClient() {\n if (mProfileRestClient == null && mHsConfig != null) {\n mProfileRestClient = new ProfileRestClient(mHsConfig);\n }\n return mProfileRestClient;\n }", "private GoogleUtils() {\n try {\n readClientConfig();\n readRefreshToken();\n httpTransport = GoogleNetHttpTransport.newTrustedTransport();\n jsonFactory = JacksonFactory.getDefaultInstance();\n driveService = this.getDriveService();\n noteList = new LinkedHashMap<>();\n imageList = new LinkedHashMap<>();\n retrieveData(Extension.note, Parameter.LimitDriveNotes.getValueInt());\n retrieveData(Extension.jpg, Parameter.LimitDriveNotes.getValueInt());\n } catch (GeneralSecurityException | IOException e) {\n e.printStackTrace();\n }\n }", "private void initializeGoogleApiClient() {\n\n if (mGoogleApiClient == null) {\n mGoogleApiClient = new GoogleApiClient.Builder(getContext())\n .addConnectionCallbacks(this)\n .addOnConnectionFailedListener(this)\n .addApi(LocationServices.API)\n .build();\n }\n\n }", "@java.lang.Override\n public com.google.cloud.networkmanagement.v1beta1.GoogleServiceInfoOrBuilder\n getGoogleServiceOrBuilder() {\n if (stepInfoCase_ == 24) {\n return (com.google.cloud.networkmanagement.v1beta1.GoogleServiceInfo) stepInfo_;\n }\n return com.google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.getDefaultInstance();\n }", "@Override\n public io.emqx.exhook.ClientInfo getClientinfo() {\n return clientinfo_ == null ? io.emqx.exhook.ClientInfo.getDefaultInstance() : clientinfo_;\n }", "@java.lang.Override\n public com.google.cloud.networkmanagement.v1beta1.GoogleServiceInfo getGoogleService() {\n if (googleServiceBuilder_ == null) {\n if (stepInfoCase_ == 24) {\n return (com.google.cloud.networkmanagement.v1beta1.GoogleServiceInfo) stepInfo_;\n }\n return com.google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.getDefaultInstance();\n } else {\n if (stepInfoCase_ == 24) {\n return googleServiceBuilder_.getMessage();\n }\n return com.google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.getDefaultInstance();\n }\n }", "private void setupGoogleSignin() {\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestIdToken(getString(R.string.default_web_client_id))\n .requestEmail()\n .build();\n\n // Build a GoogleApiClient with access to the Google Sign-In API and the\n // options specified by gso.\n mGoogleApiClient = new GoogleApiClient.Builder(this)\n .enableAutoManage(this /* FragmentActivity */, this /* OnConnectionFailedListener */)\n .addApi(Auth.GOOGLE_SIGN_IN_API, gso)\n .build();\n }", "public static ApiClient getApiClient(String apiToken) {\n return new ApiClient(DEFAULTS.API_URL.value, getHeadersWithAuth(DEFAULTS.SERVER_AUTH_HEADER, apiToken));\n }", "public MCBouncerAPI getAPI() {\n return api;\n }" ]
[ "0.75629157", "0.71220213", "0.7038056", "0.69500583", "0.6790438", "0.67715675", "0.67407805", "0.67407805", "0.67235273", "0.65521973", "0.64913034", "0.6376916", "0.6361682", "0.6328295", "0.63215935", "0.63215935", "0.6309933", "0.6304218", "0.6276222", "0.6276222", "0.62304264", "0.6116536", "0.61072534", "0.60939664", "0.6093719", "0.60898525", "0.6085664", "0.6040198", "0.60223395", "0.60094583", "0.6000446", "0.5986922", "0.596131", "0.595056", "0.5948319", "0.58870494", "0.58749455", "0.58684015", "0.58319974", "0.58013904", "0.5796954", "0.5786773", "0.5786042", "0.578266", "0.5758283", "0.5747061", "0.5714771", "0.5710353", "0.57089084", "0.57008374", "0.56884485", "0.56634253", "0.5656962", "0.5632641", "0.5631038", "0.5621007", "0.5615696", "0.5614609", "0.5599121", "0.5579862", "0.55770826", "0.5575007", "0.55530435", "0.5538225", "0.55334556", "0.5533044", "0.5518658", "0.5510138", "0.5509452", "0.5508555", "0.5506785", "0.549728", "0.54859203", "0.54849863", "0.54810107", "0.5476713", "0.5471894", "0.5469427", "0.546709", "0.5440603", "0.54389024", "0.5435781", "0.5425068", "0.54076463", "0.54020524", "0.539395", "0.5393142", "0.5393142", "0.53883046", "0.5387123", "0.5385195", "0.5370424", "0.53637123", "0.53524446", "0.5347391", "0.5342082", "0.53419423", "0.53387576", "0.53369856", "0.53284085" ]
0.61631095
21
connect to the service
private void requestConnection() { getGoogleApiClient().connect(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void connect() { \t\n \tbindService(IChatService.class, apiConnection);\n }", "public void connect()\n {\n \tLog.d(TAG, \"connect\");\n \t\n \tif(!this.isConnected ) {\n mContext.bindService(new Intent(\"com.google.tungsten.LedService\"), mServiceConnection, \n \t\tContext.BIND_AUTO_CREATE);\n \t}\n }", "public void establishConnection() {\n httpNetworkService = new HTTPNetworkService(handler);\n }", "public void connectService() {\n log_d( \"connectService()\" );\n\t\t// no action if debug\n if ( BT_DEBUG_SERVICE ) {\n\t\t\ttoast_short( \"No Action in debug\" );\n \treturn;\n }\n\t\t// connect the BT device at once\n\t\t// if there is a device address. \n\t\tString address = getPrefAddress();\n\t\tif ( isPrefUseDevice() && ( address != null) && !address.equals(\"\") ) {\n\t \tBluetoothDevice device = mBluetoothAdapter.getRemoteDevice( address );\n\t \tif ( mBluetoothService != null ) {\n\t \t log_d( \"connect \" + address );\n\t \tmBluetoothService.connect( device );\n\t }\n\t\t// otherwise\n\t\t// send message for the intent of the BT device list\n\t\t} else {\n\t\t\tnotifyDeviceList();\n\t\t}\n\t}", "public void connexion() {\r\n\t\ttry {\r\n\r\n\t\t\tsoapConnFactory = SOAPConnectionFactory.newInstance();\r\n\t\t\tconnection = soapConnFactory.createConnection();\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t}\r\n\t}", "public void connect();", "public void connect();", "public void connect();", "public void connect() {\n try {\n // ghetto hardcode the parameters\n ORB orb = ORB.init(new String[]{\"-ORBInitialHost\", \"localhost\", \"-ORBInitialPort\", \"8989\"}, null);\n\n org.omg.CORBA.Object objRef = orb.resolve_initial_references(\"NameService\");\n NamingContext ncRef = NamingContextHelper.narrow(objRef);\n\n NameComponent nc = new NameComponent(station, \"\");\n NameComponent path[] = {nc};\n instance = StationInterfaceHelper.narrow(ncRef.resolve(path));\n\n this.log.log(\"Connected!\");\n } catch (Exception ex) {\n log.log(ex.toString() + ex.getMessage());\n }\n }", "public void connect() {\n aiConfiguration = new AIConfiguration(getClientAccessToken(),\n AIConfiguration.SupportedLanguages.English,\n AIConfiguration.RecognitionEngine.System);\n aiService = AIService.getService(context, aiConfiguration);\n aiService.setListener(this);\n aiDataService = new AIDataService(context, aiConfiguration);\n }", "public void connect() {\n try {\n socket = connectToBackEnd();\n } catch (IOException ioe) {\n ioe.printStackTrace();\n }\n }", "protected void connect() {\n\t\treadProperties();\n\t\tif (validateProperties())\n\t\t\tjuraMqttClient = createClient();\n\t}", "public void connect() {}", "public void connect() throws Exception\n\t{\n\t\tHostnameVerifier hv = new HostnameVerifier()\n\t\t{\n\t\t\t@Override\n\t\t\tpublic boolean verify(String urlHostName, SSLSession session)\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t};\n\t\ttrustAllHttpsCertificates();\n\t\tHttpsURLConnection.setDefaultHostnameVerifier(hv);\n\t\t// These following methods have to be called in this order.\n\t\tinitSvcInstRef();\n\t\tinitVimPort();\n\t\tinitServiceContent();\n\t\tvimPort.login(serviceContent.getSessionManager(), user, password, null);\n\t\tinitPropertyCollector();\n\t\tinitRootFolder();\n\t\tisConnected = true;\n\t}", "public void connect(int id) throws RemoteException {\n\t\t\ttry {\n\t\t\t\t// get info\n\t\t\t\tServiceInfo info = m_services.get(id);\n\t\t\t\tif (info == null)\n\t\t\t\t\tthrow new Throwable();\n\t\t\t\t\n\t\t\t\t// connect and create (fake) sound manager\n\t\t\t\tSocket socket = new Socket(info.getHostAddresses()[0], info.getPort());\n\t\t\t\tm_soundManager.stopManager();\n\t\t\t\tm_soundManager = new RemoteSoundManager(InstrumentService.this, m_handler, socket);\n\t\t\t\tshowToast(R.string.client_connected);\n\t\t\t} catch (Throwable e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tshowToast(R.string.client_error_connecting);\n\t\t\t}\n\t\t}", "public interface IConnectService {\n\n\n}", "public void connect()\n\t{\n\t\tUUID uuid = UUID.fromString(\"00001101-0000-1000-8000-00805f9b34fb\"); //Standard SerialPortService ID\n\t\ttry\n\t\t{\n\t sock = dev.createRfcommSocketToServiceRecord(uuid); \n\t sock.connect();\n\t connected = true;\n\t dev_out = sock.getOutputStream();\n\t dev_in = sock.getInputStream();\n\t write(0);\n\t write(0);\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\t\n\t\t}\n\t}", "public void connect() throws OOBException {\n \t\tlog.debug(\"enter to connect \");\n \t\tJSch jsch = new JSch();\n \t\ttry {\n\t\t\tjsch.addIdentity(PRIVATE_KEY, PASSPHRASE);\n \t\t\tjsch.setKnownHosts(KNOWN_HOSTS);\n \t\t\tlog.debug(\"user \" + user + \"host : \" + host);\n \t\t\tsession = jsch.getSession(user, host, 22);\n \t\t\tsession.connect();\n \t\t} catch (JSchException e) {\n \t\t\te.printStackTrace();\n \t\t}\n \t}", "void connectServiceUnknownThread() {\n mMainHandler.post(() -> {\n try {\n final IAccessibilityServiceClient serviceInterface;\n final IBinder service;\n synchronized (mLock) {\n serviceInterface = mServiceInterface;\n mService = (serviceInterface == null) ? null : mServiceInterface.asBinder();\n service = mService;\n }\n // If the serviceInterface is null, the UiAutomation has been shut down on\n // another thread.\n if (serviceInterface != null) {\n service.linkToDeath(this, 0);\n serviceInterface.init(this, mId, mOverlayWindowToken);\n }\n } catch (RemoteException re) {\n Slog.w(LOG_TAG, \"Error initialized connection\", re);\n destroyUiAutomationService();\n }\n });\n }", "public abstract void connectSystem();", "public static void doConnect() {\r\n\t\tlogger.info(\"Connecting to server......\");\r\n\t\tChannelFuture future = null;\r\n\t\ttry {\r\n\t\t\tfuture = bootstrap.connect(new InetSocketAddress(host, port));\r\n\t\t\tfuture.addListener(channelFutureListener);\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\t// future.addListener(channelFutureListener);\r\n\t\t\tlogger.warn(\"Closed connection.\");\r\n\t\t}\r\n\r\n\t}", "public void doConnect() {\n Debug.logInfo(\"Connecting to \" + client.getServerURI() + \" with device name[\" + client.getClientId() + \"]\", MODULE);\n\n IMqttActionListener conListener = new IMqttActionListener() {\n\n public void onSuccess(IMqttToken asyncActionToken) {\n Debug.logInfo(\"Connected.\", MODULE);\n state = CONNECTED;\n carryOn();\n }\n\n public void onFailure(IMqttToken asyncActionToken, Throwable exception) {\n ex = exception;\n state = ERROR;\n Debug.logError(\"connect failed\" + exception.getMessage(), MODULE);\n carryOn();\n }\n\n public void carryOn() {\n synchronized (caller) {\n donext = true;\n caller.notifyAll();\n }\n }\n };\n\n try {\n // Connect using a non-blocking connect\n client.connect(conOpt, \"Connect sample context\", conListener);\n } catch (MqttException e) {\n // If though it is a non-blocking connect an exception can be\n // thrown if validation of parms fails or other checks such\n // as already connected fail.\n state = ERROR;\n donext = true;\n ex = e;\n }\n }", "public void connecting() {\n\n }", "@Override\n public abstract void connect();", "private void initMSDPService() {\n // Connect to DvKit service\n DvKit.getInstance().connect(getApplicationContext(), new IDvKitConnectCallback() {\n // When the DvKit service is successfully connected\n @Override\n public void onConnect(int i) {\n addLog(\"init MSDPService done\");\n // Get Virtual Device Service Instance\n mVirtualDeviceManager = (VirtualDeviceManager) DvKit.getInstance().getKitService(VIRTUAL_DEVICE_CLASS);\n // Register virtual appliance observer\n mVirtualDeviceManager.subscribe(EnumSet.of(VIRTUALDEVICE), observer);\n }\n\n @Override\n public void onDisconnect() {\n\n }\n });\n }", "public void connect()\r\n\t{\r\n\t\tkonekcija = ConnectionClass.getConnection(adresa, port, imeBaze, korisnickoIme, sifra);\r\n\t\tSystem.out.println(\"Konekcija otvorena: \"+ konekcija.toString());\r\n\t}", "ClientConnection connection();", "public void connected(Service service, String localConnectorName, int peerId) {\n \n }", "public boolean connectTo (RTT.corba.CService svc)\n {\n org.omg.CORBA.portable.InputStream $in = null;\n try {\n org.omg.CORBA.portable.OutputStream $out = _request (\"connectTo\", true);\n RTT.corba.CServiceHelper.write ($out, svc);\n $in = _invoke ($out);\n boolean $result = $in.read_boolean ();\n return $result;\n } catch (org.omg.CORBA.portable.ApplicationException $ex) {\n $in = $ex.getInputStream ();\n String _id = $ex.getId ();\n throw new org.omg.CORBA.MARSHAL (_id);\n } catch (org.omg.CORBA.portable.RemarshalException $rm) {\n return connectTo (svc );\n } finally {\n _releaseReply ($in);\n }\n }", "public static void connect() {\n \t\tconnPool.start();\n \t}", "public abstract void connect(JMXServiceURL url, Map<String, Object> env) throws IOException;", "@Override\r\n\tpublic void connect(URL url) throws RemoteException {\n\t\tclientPool=ClientPoolManager.INSTANCE.getClientPool(url);\r\n\r\n\t}", "public static void connect(Context context) {\n Intent intent = new Intent(context, BandCollectionService.class);\n intent.putExtra(BAND_ACTION, BandAction.CONNECT);\n context.startService(intent);\n }", "public synchronized void connectToCloud() {\n if (!Platform.cloudSelected) {\n // guarantee to execute once\n Platform.cloudSelected = true;\n AppConfigReader reader = AppConfigReader.getInstance();\n String name = reader.getProperty(EventEmitter.CLOUD_CONNECTOR, \"none\");\n if (\"none\".equalsIgnoreCase(name)) {\n // there are no cloud connector. Check if there are cloud services.\n startCloudServices();\n } else {\n SimpleClassScanner scanner = SimpleClassScanner.getInstance();\n List<ClassInfo> services = scanner.getAnnotatedClasses(CloudConnector.class, true);\n if (!startService(name, services, true)) {\n log.error(\"Cloud connector ({}) not found\", name);\n }\n }\n }\n }", "public void connect() {\n\t\ttry {\n\t\t\tsocket = new Socket(host, port);\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"Error connecting: \" + e.getMessage());\n\t\t}\n\t}", "private void connectUsingToken() {\n\t\tString protocol = null;\n\t\tint port = getPortNumber();\n\t\tif (isWebSocket()) {\n\t\t\tprotocol = \"wss://\";\n\t\t\t// If there is no port specified use default\n\t\t\tif(port == -1) {\n\t\t\t\tport = WSS_PORT;\n\t\t\t}\n\t\t} else {\n\t\t\tprotocol = \"ssl://\";\n\t\t\t// If there is no port specified use default\n\t\t\tif(port == -1) {\n\t\t\t\tport = MQTTS_PORT;\n\t\t\t}\n\t\t} \n\n\t\tString mqttServer = getMQTTServer();\n\t\tif(mqttServer != null){\n\t\t\tserverURI = protocol + mqttServer + \":\" + port;\n\t\t} else {\n\t\t\tserverURI = protocol + getOrgId() + \".\" + MESSAGING + \".\" + this.getDomain() + \":\" + port;\n\t\t}\n\t\ttry {\n\t\t\tmqttAsyncClient = new MqttAsyncClient(serverURI, clientId, DATA_STORE);\n\t\t\tmqttAsyncClient.setCallback(mqttCallback);\n\t\t\tmqttClientOptions = new MqttConnectOptions();\n\t\t\tif (clientUsername != null) {\n\t\t\t\tmqttClientOptions.setUserName(clientUsername);\n\t\t\t}\n\t\t\tif (clientPassword != null) {\n\t\t\t\tmqttClientOptions.setPassword(clientPassword.toCharArray());\n\t\t\t}\n\t\t\tmqttClientOptions.setCleanSession(this.isCleanSession());\n\t\t\tif(this.keepAliveInterval != -1) {\n\t\t\t\tmqttClientOptions.setKeepAliveInterval(this.keepAliveInterval);\n\t\t\t}\n\t\t\tmqttClientOptions.setMaxInflight(getMaxInflight());\n\t\t\tmqttClientOptions.setAutomaticReconnect(isAutomaticReconnect());\n\t\t\t\n\t\t\tSSLContext sslContext = SSLContext.getInstance(\"TLSv1.2\");\n\n\t\t\tsslContext.init(null, null, null);\n\t\t\t\n\t\t\tmqttClientOptions.setSocketFactory(sslContext.getSocketFactory());\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void init(){\n taskClient.connect(\"127.0.0.1\", 9123);\n }", "public static Connection connect(){\n\t\ttry {\n\t\t\tadd = Configure.getADDRESS();\n\t\t\tconn = ConnectionFactory.getConnect(add, Configure.port, \"TCP\");\n\t\t} catch (Exception e) {\n\t\t\tConfigure.logger.error(e.getMessage());\n\t\t\t//System.out.println(e.getMessage());\n\t\t\te.printStackTrace();\n\t\t\t//System.exit(0);\n\t\t}\n\t\treturn conn;\n\t}", "private void openConnection () {\n String[] labels = {\"Host :\", \"Port :\"};\n String[] initialValues = {\"localhost\", \"1111\"};\n StandardDialogClient openHandler = new StandardDialogClient () {\n\t@Override\n\tpublic void dialogDismissed (StandardDialog d, int code) {\n\t try {\n\t InputDialog inputD = (InputDialog)d;\n\t if (inputD.wasCancelled ()) return;\n\t String[] results = inputD.getResults ();\n\t String host = results[0];\n\t String port = results[1];\n\t TwGateway connection =\n\t (TwGateway)TwGateway.openConnection (host, port);\n\t // The following call will fail if the G2 is secure.\n\t connection.login();\n\t setConnection (connection);\n\t } catch (Exception e) {\n\t new WarningDialog (null, \"Error During Connect\", true, e.toString (), null).setVisible (true);\n\t }\n\t}\n };\t \n\n new ConnectionInputDialog (getCurrentFrame (), \"Open Connection\",\n\t\t\t\t true, labels, initialValues,\n\t\t\t\t (StandardDialogClient) openHandler).setVisible (true);\n }", "@Override\n public void connect(String name) throws Exception {\n }", "private void openConnection(){}", "<P> ConnectionService<P> getConnectionService();", "public void connectToExternalServer()\n\t{\n\t\tbuildConnectionString(\"10.228.6.204\", \"\", \"ctec\", \"student\");\n\t\tsetupConnection();\n\t\t// createDatabase(\"Kyler\");\n\t}", "@RequestMapping(\"/ibmiot/deviceclient/connect\")\r\n\tpublic String connectDeviceclient() {\r\n\t\tThread t1 = new Thread(commandCallbackSubscriber);\r\n\t\tt1.start();\r\n\t\tmyClient.setCommandCallback(commandCallbackSubscriber);\r\n\t\t\r\n\t\t// Connect to the IBM Watson IoT Platform\r\n\t\ttry {\r\n\t\t\tmyClient.connect();\r\n\t\t} catch (MqttException e) {\r\n\t\t\treturn \"Failed to connected with IBM IoT deviced Client\";\r\n\t\t}\r\n\t\treturn \"Connected to IBM IoT deviced Client\";\r\n\t}", "@Override\n\tpublic void onServiceConnected(ComponentName name, IBinder service) {\n\t\tserviceMessenger = new Messenger(service);\n\t\tsendMessageToService(ConnectionService.GET_MESSENGER);\n\t\tsendMessageToService(ConnectionService.CONNECT, host, port, key,\n\t\t\t\tinterval);\n\t}", "private void setupAndConnect() {\n URL url = getUrl(this.endpointUrl);\n connection = null;\n try {\n connection = (HttpURLConnection) url.openConnection();\n HttpURLConnection.setFollowRedirects(true);\n } catch (IOException e) {\n LOG.severe(\"Error connecting to Url : \" + url);\n LOG.severe(e.toString());\n }\n }", "public void onServiceConnected(ComponentName className, IBinder service) {\n\t\t mIRemoteService = IRemoteService.Stub.asInterface(service);\n\t \t Log.v(MainActivity.ACTIVITY_TAG,\"kevin ---> client:ServiceConnect\"); \n\t\t try {\n\t\t\t int id = mIRemoteService.getPid();\n \t\t\t showMessage(Integer.toString(id));\n\t\t } catch (RemoteException e) {\n\t\t\t e.printStackTrace();\n\t\t }\n\t }", "private synchronized void doConnect() {\n try {\n String host = agent.getHost();\n int port = agent.getPort();\n log.fine(\"Connecting to server \" + host + ':' + port);\n socket = new Socket(host, port);\n input = socket.getInputStream();\n output = new OutputStreamWriter(socket.getOutputStream());\n disconnected = false;\n new Thread(this).start();\n\n // Automatically login! -> give an auth to the agent...\n TACMessage msg = new TACMessage(\"auth\");\n msg.setParameter(\"userName\", agent.getUser());\n msg.setParameter(\"userPW\", agent.getPassword());\n msg.setMessageReceiver(agent);\n sendMessage(msg);\n\n } catch (Exception e) {\n disconnected = true;\n log.log(Level.SEVERE, \"connection to server failed:\", e);\n socket = null;\n }\n }", "private void connect() {\n\t\ttry {\n\t\t\tsocket = new Socket(Server.ADDRESS, Server.PORT_NUMBER);\n\t\t\tthis.oos = new ObjectOutputStream(socket.getOutputStream());\n\t\t\tthis.ois = new ObjectInputStream(socket.getInputStream());\n\t\t\tServerListener serverlistener = new ServerListener();\n\t\t\tserverlistener.start();\n\t\t\tRequest request = new Request(RequestCode.START_DOCUMENT_STREAM);\n\t\t\trequest.setUsername(user.getUsername());\n\t\t\toos.writeObject(request);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void autoConnect() {\n Log.i(TAG, \"HERE AUTOCONNECT\");\n connect(staticIp, staticPort);\n }", "public void connect(String jmxServiceUrl) throws IOException {\n log.debug(\"Creating an RMI connector client and \" +\n \"connect it to the RMI connector server \" + jmxServiceUrl);\n\n url = new JMXServiceURL(jmxServiceUrl);\n jmxc = JMXConnectorFactory.connect(url, null);\n mbsc = jmxc.getMBeanServerConnection();\n\n if (mbsc == null) {\n throw new IOException(\"Connection to \" + url + \" was not estabilshed\");\n }\n }", "public void connect() {\n\n DatabaseGlobalAccess.getInstance().setEmf(Persistence.createEntityManagerFactory(\"PU_dashboarddb\"));\n DatabaseGlobalAccess.getInstance().setEm(DatabaseGlobalAccess.getInstance().getEmf().createEntityManager());\n DatabaseGlobalAccess.getInstance().getDatabaseData();\n DatabaseGlobalAccess.getInstance().setDbReachable(true);\n }", "protected void startConnect() {\n if (tcp) {\n connection = new TCPConnection(this);\n } else {\n connection = new UDPConnection(this, udpSize);\n }\n connection.connect(remoteAddr, localAddr);\n }", "public void InitService() {\n\t\ttry {\r\n\t\t\tgetCommManager().register(this); \r\n\t\t} catch (CommunicationException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "@Override\n\tpublic void connect() {\n\t\t\n\t}", "@Override\n\tpublic void connect() {\n\t\t\n\t}", "public void startService() {\n log_d( \"startService()\" );\n \tint state = execStartService();\n\t\tswitch( state ) {\n\t\t\tcase STATE_CONNECTED:\n\t\t\t\tshowTitleConnected( getDeviceName() );\n\t\t\t\thideButtonConnect();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tshowTitleNotConnected();\n\t\t\t\tbreak;\n\t\t}\n\t}", "public ControlCenter(){\n serverConnect = new Sockets();\n serverConnect.startClient(\"127.0.0.1\", 5000);\n port = 5000;\n }", "public Echange_Client() throws UnknownHostException, IOException {\n start_Connexion(); \n }", "public void start_service() throws ConnectionErrorException, FailLoadingServicesException{\r\n\t\tthis.serviceLocator = new LoginServiceLocator();\r\n\t\ttry {\r\n\t\t\tthis.service = (BasicHttpsBinding_ILoginServiceStub) serviceLocator.getBasicHttpsBinding_ILoginService();\r\n\t\t\ttry {\r\n\t\t\t\tthis.services = this.service.loadAllServices();\r\n\t\t\t} catch (RemoteException e) {\r\n\t\t\t\tthrow new FailLoadingServicesException();\r\n\t\t\t}\r\n\t\t} catch (ServiceException e) {\r\n\t\t\tthrow new ConnectionErrorException();\r\n\t\t}//-catch\r\n\t}", "private void attemptToConnect() {\n LOG.warn(\"Attempting to connect....\");\n \n if (// No connection configuration\n getConnectionConfiguration() == null &&\n (getServerHostname() == null || getServerPort() == 0 ||\n getServiceName() == null || getFromAddress() == null ||\n getPassword() == null || getResource() == null)\n \n ||\n \n // Already logged in.\n getConnection() != null && getConnection().isAuthenticated()) {\n \n return;\n }\n \n try {\n if (getConnectionConfiguration() == null) {\n setConnectionConfiguration(new ConnectionConfiguration(\n getServerHostname(), getServerPort(), getServiceName()));\n }\n\n connect();\n }\n catch (Throwable t) {\n LOG.error(t);\n }\n }", "@SuppressLint(\"NewApi\")\n @Override\n public void onServiceConnected(ComponentName name, IBinder service) {\n bleService = ((BleService.LocalBinder) service).getService();\n if (!bleService.init()) {\n finish();\n }\n bleService.connect(Home_Fragment.Device_Address);\n mpd = ProgressDialog.show(Dialog_Activity.this, null, \"正在连接设备...\");\n Log.i(\"DeviceConnect\", \"onServiceConnected: \");\n }", "public void openConnection(){\r\n try {\r\n Driver dr = new FabricMySQLDriver();\r\n DriverManager.registerDriver(dr);\r\n log.info(\"registrable driver\");\r\n } catch (SQLException e) {\r\n log.error(e.getMessage());\r\n e.printStackTrace();\r\n }\r\n try {\r\n connection = DriverManager.getConnection(URL, USERNAME, PASSWORD);\r\n log.info(\"get connection\");\r\n } catch (SQLException e) {\r\n log.error(e.getMessage());\r\n e.printStackTrace();\r\n }\r\n }", "public static void establishConnection() {\n try {\n PropertiesLoader loader = new PropertiesLoader();\n String sshUser = loader.loadProperty().getProperty(\"sshUser\");\n String sshPassword = loader.loadProperty().getProperty(\"sshPassword\");\n String sshHost = loader.loadProperty().getProperty(\"sshHost\");\n int sshPort = Integer.parseInt(loader.loadProperty().getProperty(\"sshPort\"));\n String remoteHost = loader.loadProperty().getProperty(\"remoteHost\");\n int localPort = Integer.parseInt(loader.loadProperty().getProperty(\"localPort\"));\n int remotePort = Integer.parseInt(loader.loadProperty().getProperty(\"remotePort\"));\n\n String dbUrl = loader.loadProperty().getProperty(\"dbUrl\");\n String dbUser = loader.loadProperty().getProperty(\"dbUser\");\n String dbPassword = loader.loadProperty().getProperty(\"dbPassword\");\n\n DatabaseManager.doSshTunnel(sshUser, sshPassword, sshHost, sshPort, remoteHost, localPort, remotePort);\n connection = DriverManager.getConnection(dbUrl, dbUser, dbPassword);\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n }", "public void acceptConnection(SystemServiceConnection connection);", "void connect() throws Exception;", "private void connect() {\n try {\n Class.forName(\"com.microsoft.sqlserver.jdbc.SQLServerDriver\");\n cnt = DriverManager.getConnection(hosting, user, pass);\n } catch (Exception e) {\n e.printStackTrace();\n JOptionPane.showMessageDialog(this, \"lỗi kết nối\");\n }\n }", "private boolean connect() {\n final Intent intent = new Intent(ACTION_MEDIA_SESSION_COMPAT);\n intent.setComponent(MEDIA_SESSION_COMPAT_PROVIDER_SERVICE);\n\n boolean bound = false;\n try {\n bound = mContext.bindService(intent, mServiceConnection, Context.BIND_AUTO_CREATE);\n } catch (Exception ex) {\n Log.e(TAG, \"Failed binding to the MediaSessionCompatProviderService of the \"\n + \"service app\");\n }\n\n if (bound) {\n try {\n mCountDownLatch.await(PROVIDER_SERVICE_CONNECTION_TIMEOUT_MS,\n TimeUnit.MILLISECONDS);\n } catch (InterruptedException ex) {\n Log.e(TAG, \"InterruptedException while waiting for onServiceConnected.\", ex);\n }\n }\n return mBinder != null;\n }", "boolean testConnection(RemoteService service);", "public void start() {\n gateway.openConnection();\n }", "public interface Provider {\n //Connection connect(String url, java.util.Properties info)\n Service newService();\n}", "void createConnection();", "public void connect() {\n BotConnector newBot = new BotConnector();\n newBot.setEmail(this.email);\n newBot.setAuthenticationKey(key);\n newBot.setBotName(name);\n newBot.setRoom(room);\n //Start Listener Thread\n this.serverListener = new Thread(newBot, \"serverListener\");\n this.serverListener.start();\n }", "public void connect()\n\t{\n try{\n \tClass.forName(\"com.mysql.jdbc.Driver\").newInstance();\n \tconn = DriverManager.getConnection(url,user,pwd);\n \tSystem.out.println(\"Connected...\");\n }\n \n catch(Exception se){\n \tse.printStackTrace();\n }\n\t}", "private void initService() {\n \tlog_d( \"initService()\" );\n\t\t// no action if debug\n if ( BT_DEBUG_SERVICE ) return;\n // Initialize the BluetoothChatService to perform bluetooth connections\n if ( mBluetoothService == null ) {\n log_d( \"new BluetoothService\" );\n \t\tmBluetoothService = new BluetoothService( mContext );\n\t }\n\t\tif ( mBluetoothService != null ) {\n log_d( \"set Handler\" );\n \t\tmBluetoothService.setHandler( sendHandler );\n\t }\t\t\n }", "public void connect() {\n this.disconnect();\n\n Settings settings = ImmutableSettings.settingsBuilder()\n .put(\"cluster.name\", this.cluster)\n .put(\"client.transport.sniff\", true)\n .build();\n this.elasticClient = new TransportClient(settings).addTransportAddresses(\n new InetSocketTransportAddress(this.host, this.port)\n );\n }", "@Override\n public void onServiceConnected(ComponentName className,\n IBinder service) {\n ConnectionService.ConnectionBinder binder = (ConnectionService.ConnectionBinder) service;\n mService = binder.getService();\n mBound = true;\n }", "public static void openConnection() {\n\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.cj.jdbc.Driver\");\n\t\t\tconexion = DriverManager.getConnection(\"jdbc:mysql://192.168.1.51:9090?useTimeone=true&serverTimezone=UTC\",\n\t\t\t\t\t\"remote\", \"Password123\");// credenciales temporales\n\t\t\tSystem.out.print(\"Server Connected\");\n\n\t\t} catch (SQLException | ClassNotFoundException ex) {\n\t\t\tSystem.out.print(\"No se ha podido conectar con mi base de datos\");\n\t\t\tSystem.out.println(ex.getMessage());\n\n\t\t}\n\n\t}", "@Override\n\tprotected void handleServiceConnected()\n\t{\n\t\t\n\t}", "public void connect(){\n if (connected) {\n // connection already established\n return;\n }\n // Create connection to Database\n Properties props = new Properties();\n props.setProperty(\"user\", DB_USER);\n props.setProperty(\"password\", DB_PASSWORD);\n //props.setProperty(\"ssl\", \"true\");\n //\"Connecting to database...\"\n try {\n Class.forName(\"org.postgresql.Driver\");\n String connection_string = generateURL();\n dbConnect = DriverManager.getConnection(connection_string, props);\n //\"Connection established\"\n status = \"Connection established\";\n connected = true;\n } catch (SQLException e) {\n //\"Connection failed: SQL error\"\n status = \"Connection failed: \" + e.getMessage();\n connected = false;\n } catch (Exception e) {\n //\"Connection failed: unknown error\"\n status = \"Connection failed: \" + e.getMessage();\n connected = false;\n }\n }", "@Override\n public void run()\n {\n close(false);\n try\n {\n if (!isConnected())\n connectMS(msServer.getIp(), msServer.getPort());\n }\n catch (Exception e)\n {\n Log.e(\"Dudu_SDK\",\n \"getServer ...failed ...user default server... \");\n }\n }", "public Reply connect(String connectAddress, int connectPort) throws ThingsException, InterruptedException;", "public abstract void connect() throws UnknownHostException, IOException;", "private void connectUsingCertificate() {\n\t\tfinal String METHOD = \"connectUsingCertificate\";\n\t\tString protocol = null;\n\t\tint port = getPortNumber();\n\t\tif (isWebSocket()) {\n\t\t\tprotocol = \"wss://\";\n\t\t\t// If there is no port specified use default\n\t\t\tif(port == -1) {\n\t\t\t\tport = WSS_PORT;\n\t\t\t}\n\t\t} else {\n\t\t\tprotocol = \"ssl://\";\n\t\t\t// If there is no port specified use default\n\t\t\tif(port == -1) {\n\t\t\t\tport = MQTTS_PORT;\n\t\t\t}\n\t\t} \n\n\t\tString mqttServer = getMQTTServer();\n\t\t\n\t\tif(mqttServer != null){\n\t\t\tserverURI = protocol + mqttServer + \":\" + port;\n\t\t} else {\n\t\t\tserverURI = protocol + getOrgId() + \".\" + MESSAGING + \".\" + this.getDomain() + \":\" + port;\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tmqttAsyncClient = new MqttAsyncClient(serverURI, clientId, DATA_STORE);\n\t\t\tmqttAsyncClient.setCallback(mqttCallback);\n\t\t\tmqttClientOptions = new MqttConnectOptions();\n\t\t\tif (clientUsername != null) {\n\t\t\t\tmqttClientOptions.setUserName(clientUsername);\n\t\t\t}\n\t\t\tif (clientPassword != null) {\n\t\t\t\tmqttClientOptions.setPassword(clientPassword.toCharArray());\n\t\t\t}\n\t\t\tmqttClientOptions.setCleanSession(this.isCleanSession());\n\t\t\tif(this.keepAliveInterval != -1) {\n\t\t\t\tmqttClientOptions.setKeepAliveInterval(this.keepAliveInterval);\n\t\t\t}\n\t\t\t\n\t\t\tmqttClientOptions.setMaxInflight(getMaxInflight());\n\t\t\tmqttClientOptions.setAutomaticReconnect(isAutomaticReconnect());\n\t\t\t\n\t\t\t/* This isn't needed as the production messaging.internetofthings.ibmcloud.com \n\t\t\t * certificate should already be in trust chain.\n\t\t\t * \n\t\t\t * See: \n\t\t\t * http://stackoverflow.com/questions/859111/how-do-i-accept-a-self-signed-certificate-with-a-java-httpsurlconnection\n\t\t\t * https://gerrydevstory.com/2014/05/01/trusting-x509-base64-pem-ssl-certificate-in-java/\n\t\t\t * http://stackoverflow.com/questions/12501117/programmatically-obtain-keystore-from-pem\n\t\t\t * https://gist.github.com/sharonbn/4104301\n\t\t\t * \n\t\t\t * CertificateFactory cf = CertificateFactory.getInstance(\"X.509\");\n\t\t\t * InputStream certFile = AbstractClient.class.getResourceAsStream(\"messaging.pem\");\n\t\t\t * Certificate ca = cf.generateCertificate(certFile);\n\t\t\t *\n\t\t\t * KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType());\n\t\t\t * keyStore.load(null, null);\n\t\t\t * keyStore.setCertificateEntry(\"ca\", ca);\n\t\t\t * TrustManager trustManager = TrustManagerUtils.getDefaultTrustManager(keyStore);\n\t\t\t * SSLContext sslContext = SSLContextUtils.createSSLContext(\"TLSv1.2\", null, trustManager);\n\t\t\t * \n\t\t\t */\n\n\t\t\tSSLContext sslContext = SSLContext.getInstance(\"TLSv1.2\");\n\t\t\tsslContext.init(null, null, null);\n\t\t\t\n\t\t\t//Validate the availability of Server Certificate\n\t\t\t\n\t\t\tif (trimedValue(options.getProperty(\"Server-Certificate\")) != null){\n\t\t\t\tif (trimedValue(options.getProperty(\"Server-Certificate\")).contains(\".pem\")||trimedValue(options.getProperty(\"Server-Certificate\")).contains(\".der\")||trimedValue(options.getProperty(\"Server-Certificate\")).contains(\".cer\")){\n\t\t\t\t\tserverCert = trimedValue(options.getProperty(\"Server-Certificate\"));\n\t\t\t\t\t}else{\n\t\t\t\t\t\tLoggerUtility.log(Level.SEVERE, CLASS_NAME, METHOD, \"Only PEM, DER & CER certificate formats are supported at this point of time\");\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t\tLoggerUtility.log(Level.SEVERE, CLASS_NAME, METHOD, \"Value for Server Certificate is missing\");\n\t\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\n\t\t\t//Validate the availability of Client Certificate\n\t\t\tif (trimedValue(options.getProperty(\"Client-Certificate\")) != null){\n\t\t\t\tif (trimedValue(options.getProperty(\"Client-Certificate\")).contains(\".pem\")||trimedValue(options.getProperty(\"Client-Certificate\")).contains(\".der\")||trimedValue(options.getProperty(\"Client-Certificate\")).contains(\".cer\")){\n\t\t\t\t\tclientCert = trimedValue(options.getProperty(\"Client-Certificate\"));\n\t\t\t\t\t}else{\n\t\t\t\t\t\tLoggerUtility.log(Level.SEVERE, CLASS_NAME, METHOD, \"Only PEM, DER & CER certificate formats are supported at this point of time\");\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t\tLoggerUtility.log(Level.SEVERE, CLASS_NAME, METHOD, \"Value for Client Certificate is missing\");\n\t\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t//Validate the availability of Client Certificate Key\n\t\t\tif (trimedValue(options.getProperty(\"Client-Key\")) != null){\n\t\t\t\tif (trimedValue(options.getProperty(\"Client-Key\")).contains(\".key\")){\n\t\t\t\t\tclientCertKey = trimedValue(options.getProperty(\"Client-Key\"));\n\t\t\t\t\t}else{\n\t\t\t\t\t\tLoggerUtility.log(Level.SEVERE, CLASS_NAME, METHOD, \"Only Certificate key in .key format is supported at this point of time\");\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t\tLoggerUtility.log(Level.SEVERE, CLASS_NAME, METHOD, \"Value for Client Key is missing\");\n\t\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\n\t\t\t//Validate the availability of Certificate Password\n\t\t\ttry{\n\t\t\tif (trimedValue(options.getProperty(\"Certificate-Password\")) != null){\n\t\t\t\tcertPassword = trimedValue(options.getProperty(\"Certificate-Password\"));\n\t\t\t\t} else {\n\t\t\t\t\tcertPassword = \"\";\n\t\t\t\t}\n\t\t\t} catch (Exception e){\n\t\t\t\t\tLoggerUtility.log(Level.SEVERE, CLASS_NAME, METHOD, \"Value for Certificate Password is missing\", e);\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tthrow e;\n\t\t\t\t}\n\t\t\t\n\t\t\tmqttClientOptions.setSocketFactory(getSocketFactory(serverCert, clientCert, clientCertKey, certPassword));\n\n\t\t} catch (Exception e) {\n\t\t\tLoggerUtility.warn(CLASS_NAME, METHOD, \"Unable to configure TLSv1.2 connection: \" + e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void connect() throws IOException\n {\n JMXServiceURL jmxUrl = new JMXServiceURL(String.format(fmtUrl, host, port));\n JMXConnector jmxc = JMXConnectorFactory.connect(jmxUrl, null);\n mbeanServerConn = jmxc.getMBeanServerConnection();\n \n try\n {\n ObjectName name = new ObjectName(ssObjName);\n ssProxy = JMX.newMBeanProxy(mbeanServerConn, name, StorageServiceMBean.class);\n } catch (MalformedObjectNameException e)\n {\n throw new RuntimeException(\n \"Invalid ObjectName? Please report this as a bug.\", e);\n }\n \n memProxy = ManagementFactory.newPlatformMXBeanProxy(mbeanServerConn, \n ManagementFactory.MEMORY_MXBEAN_NAME, MemoryMXBean.class);\n runtimeProxy = ManagementFactory.newPlatformMXBeanProxy(\n mbeanServerConn, ManagementFactory.RUNTIME_MXBEAN_NAME, RuntimeMXBean.class);\n }", "public void Connect() {\n run = new Thread(\"Connect\") {\n @Override\n public void run() {\n running = true;\n try {\n server = new ServerSocket(9080);\n waitingForConnection();\n } catch (IOException ex) {\n Logger.getLogger(Dashboard.class\n .getName()).log(Level.SEVERE, null, ex);\n }\n }\n };\n run.start();\n }", "private void initService() {\r\n\t}", "public void connect() {\n\n\t\ttry {\n\n\t\t\tClass.forName(\"com.mysql.cj.jdbc.Driver\");\n\t\t} catch (ClassNotFoundException ex) {\n\t\t\tSystem.err.println(\"Unable to load MySQL Driver\");\n\t\t\t\n\t\t}\n\n\t\tString jdbcUrl = \"jdbc:mysql://localhost:3306/userinfo?useLegacyDatetimeCode=false&serverTimezone=UTC&useSSL=false\";\n\t\ttry {\n\t\t\t// DriverManager.registerDriver(new com.mysql.jdbc.Driver());\n\t\t\tConnection con = DriverManager.getConnection(jdbcUrl, \"root\", \"smmk143143\");\n\t\t\tconn = con;\n\t\t\t// Set auto commit as false.\n\t\t\tconn.setAutoCommit(false);\n\t\t\tSystem.out.println(\"接続済み/Connected\");\n\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"接続エラーが発生しました/Connection Error Occured\");\n\t\t\tSystem.out.println(e.getMessage());\n\n\t\t}\n\t}", "public void connect() throws IOException;", "public void onServiceConnected(ComponentName className, IBinder service) {\n // Following the example above for an AIDL interface,\n // this gets an instance of the IRemoteInterface, which we can use to call on the service\n wsService = IWindscribeInterface.Stub.asInterface(service);\n System.out.println(\"on service connected in activity (#\"+myPid()+\")\");\n try {\n wsService.startVPN(\"LOL\");\n Event res = wsService.sendAndReceive(new Event(\"to service from activity\"));\n System.out.println(\"from service in activity:\"+res);\n\n } catch (RemoteException e) {\n e.printStackTrace();\n }\n }", "void connect() throws TransportException;", "private synchronized int srvConnect() {\n \n\t\ttry {\n\t\t\t// The address to connect to\n\t\t\tSystem.out.println(TAG + \":Address:\" + getAddress());\n\t\t\tSystem.out.println(TAG + \":Port:\" + String.valueOf(getPort()));\n\t\t\taddr = InetAddress.getByName(getAddress());\n\t\t\t// The address plus the port\n\t\t\tservAddress = new InetSocketAddress(addr, getPort());\n\n\t\t\t// Try to connect\n\t\t\tmysock = new Socket();\n\t\t\t// This socket will block/ try connect for 5s\n\t\t\tmysock.connect(servAddress, 5000);\n\t\t\t// Show me if i was connected successfully\n\t\t\tif (mysock.isConnected()) {\n\t\t\t\tif(out == null){\n\t\t\t\t\tout = new PrintWriter(mysock.getOutputStream(),true);\n\t\t\t\t\tSystem.out.println(TAG + \":New socket and new streamer was created.\");\n\t\t\t\t}\n\t\t\t}\n \n\t\t} catch (NullPointerException e) {\n\t\t\tSystem.out.println(TAG + \":Null Pointer occured.\");\n\t\t\treturn -1;\n\t\t} catch (UnknownHostException e) {\n\t\t\tSystem.out.println(TAG + \":Server does not exist.\");\n\t\t\treturn -1;\n\t\t} catch (IOException e) {\n\t\t\tif (e instanceof SocketException && e.getMessage().contains(\"Permission denied\")) {\n\t\t\t\tSystem.out.println(TAG + \":You don't have internet permission:\" + e);\n\t\t\t} else if(e instanceof ConnectException && e.getMessage().contains(\"Connection refused\")){\n\t\t\t\tSystem.out.println(TAG + \":Connection is refused, the service on the server is probably down:\" + e);\n\t\t\t} else {\n\t\t\t\te.printStackTrace();\n\t\t\t\tSystem.out.println(TAG + \":Could not connect\");\n\t\t\t}\n\t\t\treturn -1;\n\t\t}\n \n\t\treturn 0;\n\t}", "private void connect() {\n ftp.connect();\n if (ftp.goodReply()) sendResponse(\"Connected\");\n else sendResponse(\"Could not connect to server\");\n }", "protected abstract void onConnect();", "public abstract void onConnect();", "@Override\n public void run() {\n boolean isOk = mBluetoothLeService.connect(getDeviceName());// 根据地址通过后台services去连接BLE蓝牙\n L.d(reTryCount+\" -----connect ok ? >\"+ isOk);\n if(!isOk) {\n reTryConected();\n }\n }", "public void openConnection(){\n\n\t\tString dbIP = getConfig().getString(\"mysql.ip\");\n\t\tString dbDB = getConfig().getString(\"mysql.databaseName\");\n\t\tString dbUN = getConfig().getString(\"mysql.username\");\n\t\tString dbPW = getConfig().getString(\"mysql.password\");\n\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\tconnection = DriverManager.getConnection(\"jdbc:mysql://\" + dbIP + \"/\" + dbDB, dbUN, dbPW);\n\t\t\tgetLogger().info(\"Connected to databse!\");\n\t\t} catch (SQLException ex) {\n\t\t\t// handle any errors\n\t\t\tgetLogger().info(\"SQLException: \" + ex.getMessage());\n\t\t\tgetLogger().info(\"SQLState: \" + ex.getSQLState());\n\t\t\tgetLogger().info(\"VendorError: \" + ex.getErrorCode());\n\t\t} catch (ClassNotFoundException e) {\n\t\t\tgetLogger().info(\"Gabe, you done goof'd!\");\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "@Override\n public void onConnect(int i) {\n addLog(\"init MSDPService done\");\n // Get Virtual Device Service Instance\n mVirtualDeviceManager = (VirtualDeviceManager) DvKit.getInstance().getKitService(VIRTUAL_DEVICE_CLASS);\n // Register virtual appliance observer\n mVirtualDeviceManager.subscribe(EnumSet.of(VIRTUALDEVICE), observer);\n }", "public Status connect()\n {\n return connect(5.0);\n }", "public void connect() throws IOException {\r\n \t\t \r\n \t\t \tClassLoader saved = Thread.currentThread().getContextClassLoader();\r\n\t\t\ttry {\r\n\t\t\t\t // Parse url (rsuite:/http://host/user/session/moId)\r\n\t\t\t\t log.println(\"INCOMING URL IS: \" + url);\r\n\t\t\t\t log.println(\"PARSING URL TO GET PARAMETERS...\");\r\n\t\t\t\t \r\n\t\t\t\t // url initially comes through with extension to avoid dialog window\r\n\t\t\t\t docURL = RSuiteProtocolUtils.parseRSuiteProtocolURL(url);\r\n\t\t\t\t host = docURL.getHost();\r\n\t\t\t\t protocol = docURL.getProtocol().concat(\"//\");\r\n\t\t\t\t username = docURL.getUserName();\r\n\t\t\t\t sessionKey = docURL.getSessionKey();\r\n\t\t\t\t moId = docURL.getMoId();\r\n\t\t\t\t // set the connection so we have it later\r\n\t\t\t\t _connection = this;\r\n\r\n\t\t\t\t log.println(\"HOST: \" + host);\r\n\t\t\t\t log.println(\"USERNAME: \" + username);\r\n\t\t\t\t log.println(\"SESSION KEY: \" + sessionKey);\r\n\t\t\t\t log.println(\"MOID: \" + moId);\r\n\t\t\t\t \r\n\t\t\t\t Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader());\r\n\t\t\t\t \r\n\t\t\t\t // CONNECT TO RSUITE IF SESSION NOT PRESENT\t\t\t\t \r\n\t\t\t\t log.println(\"CONNECTION TO RSUITE...\");\r\n\t\t\t\t if(sessionKey == null){\r\n\t\t\t\t\t log.println(\"SESSION DOES NOT EXIST, PROMPT FOR LOGIN\");\r\n\t\t\t\t\t RSuiteLoginDialog login = new RSuiteLoginDialog();\r\n\t\t\t\t\t login.setLocationRelativeTo(null);\r\n\t\t\t\t\t login.setVisible(true);\r\n\t\t\t\t }\r\n\t\t\t\t \r\n\t\t\t\t // SESSION WAS PASSED IN, INITIALIZE REPOSITORY\r\n\t\t\t\t if(repository == null){\r\n\t\t\t\t\t log.println(\"SESSION PASSED IN BY URL, INITIALIZE REPOSITORY\");\r\n\t\t\t\t\t repository = new RsuiteRepositoryImpl(username, \"\", host);\r\n\t\t\t\t\t log.println(\"REPOSITORY INITIALIZED.\");\r\n\t\t\t\t\t \r\n\t\t\t\t\t // NO NEED TO LOGIN SINCE WE HAVE SESSION KEY ALREADY\r\n\t\t\t\t\t log.println(\"SETTING THE REPOSITORY SESSION KEY...\");\r\n\t\t\t\t\t repository.sessionKey = sessionKey;\r\n\t\t\t\t\t log.println(\"SESSION KEY SET. NO NEED FOR LOGIN\");\r\n\t\t\t\t }\t\t\t\t \r\n\t\t\t}\r\n\t\t\tcatch (Throwable t) {\r\n\t\t\t if (log != null) {\r\n\t\t\t t.printStackTrace(log);\r\n\t\t\t }\r\n\t\t\t}\r\n\t\t\tfinally{\r\n\t\t\t\tThread.currentThread().setContextClassLoader(saved);\r\n\t\t\t}\r\n\t\t}", "private void start_Connexion()throws UnknownHostException, IOException{\n \tsocket = new Socket(IP,num_Socket);\n \tout = new ObjectOutputStream(socket.getOutputStream());\n \tin = new ObjectInputStream(socket.getInputStream());\n \t\n }" ]
[ "0.7830792", "0.7178796", "0.7152234", "0.70460075", "0.6940854", "0.69137084", "0.69137084", "0.69137084", "0.6884285", "0.68726873", "0.68637013", "0.6849152", "0.68292826", "0.67931557", "0.6641605", "0.65910226", "0.6494143", "0.6486926", "0.6444951", "0.6434864", "0.64082086", "0.6389647", "0.6385612", "0.63490045", "0.6336854", "0.63327605", "0.63296884", "0.63270885", "0.63169473", "0.6305256", "0.6301025", "0.62958425", "0.62669325", "0.6264889", "0.6254795", "0.62535906", "0.6244289", "0.6219699", "0.62144345", "0.62041974", "0.6191963", "0.61872077", "0.61781853", "0.6177527", "0.6161757", "0.6158977", "0.61275345", "0.61061865", "0.6092087", "0.60918176", "0.6086534", "0.60795045", "0.6077131", "0.6063786", "0.6056445", "0.6056445", "0.60510284", "0.6038481", "0.6038183", "0.60287523", "0.60101354", "0.6002383", "0.6000624", "0.60003495", "0.59975624", "0.5989828", "0.59886", "0.59803355", "0.5968907", "0.59625405", "0.5961878", "0.595953", "0.5950649", "0.5948291", "0.5947581", "0.59471184", "0.5931907", "0.591764", "0.5915308", "0.5914818", "0.5913487", "0.5910741", "0.59105635", "0.5907036", "0.59033597", "0.58985925", "0.58968127", "0.58967626", "0.5888442", "0.58840466", "0.58780634", "0.58775353", "0.58753693", "0.5872109", "0.5871943", "0.5866195", "0.5865219", "0.58641416", "0.5852032", "0.58450437", "0.58391976" ]
0.0
-1
whenever we add a geofence, we need to connect to the server and add geofence..
public void addGeofences(List<Geofence> geofences) throws UnsupportedOperationException { //save the geofences mGeofenceList = (ArrayList<Geofence>) geofences; // If a request is not already in progress if (!mAddingGeofenceInProgress) { // Toggle the flag and continue to request a connection to Location Service mAddingGeofenceInProgress = true; // Request a connection to Location Services requestConnection(); // If a request is in progress } else { // Throw an exception and stop the request throw new UnsupportedOperationException(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void addGeofence(GeofencingRequest request) {\n\n T.t(TripMapsActivity.this, \"addGeofence\");\n if (checkPermission())\n LocationServices.GeofencingApi.addGeofences(\n googleApiClient,\n request,\n createGeofencePendingIntent()\n ).setResultCallback(this);// check here\n }", "private void addGeofence(GeofencingRequest request) {\n Log.d(TAG, \"addGeofence\");\n if (checkPermission())\n LocationServices.GeofencingApi.addGeofences(\n googleApiClient,\n request,\n createGeofencePendingIntent()\n ).setResultCallback(this);\n }", "public void addGeofencesButtonHandler() {\n if (!mGoogleApiClient.isConnected()) {\n Toast.makeText(mActivity, getString(R.string.not_connected), Toast.LENGTH_SHORT).show();\n return;\n }\n\n try {\n LocationServices.GeofencingApi.addGeofences(\n mGoogleApiClient,\n // The GeofenceRequest object.\n getGeofencingRequest(),\n // A pending intent that that is reused when calling removeGeofences(). This\n // pending intent is used to generate an intent when a matched geofence\n // transition is observed.\n getGeofencePendingIntent()\n ).setResultCallback(this); // Result processed in onResult().\n } catch (SecurityException securityException) {\n // Catch exception generated if the app does not use ACCESS_FINE_LOCATION permission.\n logSecurityException(securityException);\n }\n }", "public void requestGeoFenceWithNewIntent() {\n try {\n geofenceService.createGeofenceList(getAddGeofenceRequest(), pendingIntent)\n .addOnCompleteListener(task -> {\n if (task.isSuccessful()) {\n Log.i(TAG, \"add geofence success!\");\n } else {\n Log.w(TAG, \"add geofence failed : \" + task.getException().getMessage());\n }\n });\n } catch (Exception e) {\n Log.d(TAG, \"requestGeoFenceWithNewIntent: \" + e.toString());\n }\n }", "public void registerGeofence(LBAction lbAction) {\n if (!(ActivityCompat.checkSelfPermission(mContext, android.Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED &&\n ActivityCompat.checkSelfPermission(mContext, android.Manifest.permission.ACCESS_COARSE_LOCATION) == PackageManager.PERMISSION_GRANTED)) {\n Log.d(LOG_TAG, \"No permissions granted\");\n } else {\n LocationServices.GeofencingApi.addGeofences(\n mGoogleApiClient,\n getGeofencingRequest(lbAction),\n getGeofencePendingIntent(lbAction)\n ).setResultCallback(this);\n }\n }", "public void addGeofences(List<Geofence> geofences) throws UnsupportedOperationException {\n \tLog.d(TAG + \".addGeofences()\", \"Starting to add geofence\");\n \t\n /*\n * Save the geofences so that they can be sent to Location Services once the\n * connection is available.\n */\n currentGeofences = (ArrayList<Geofence>) geofences;\n\n Log.d(TAG + \".addGeofences()\", \"Continuing to add geofence\");\n\n // Get a PendingIntent that Location Services issues when a geofence transition occurs\n geofenceRequestIntent = createRequestPendingIntent();\n\n // Send a request to add the current geofences\n locationClient.addGeofences(currentGeofences, geofenceRequestIntent, this);\n \n Log.d(TAG + \".addGeofences()\", \"geofence was added\");\n }", "protected void createGeofenceList() throws JSONException, MalformedURLException {\n //URL stationUrlObject = new URL(stationUrl);\n //URL bsl = new URL(\"http://lowcost-env.r8dpz7s6b2.us-west-2.elasticbeanstalk.com/stations/bsl\");\n URL mfl = new URL(\"http://lowcost-env.r8dpz7s6b2.us-west-2.elasticbeanstalk.com/stations\");\n //Creates a new thread to get stations asynchronously\n GetStationsTask stationConnection = new GetStationsTask();\n String stations = null;\n try {\n stations = stationConnection.execute(mfl).get();\n } catch (InterruptedException | ExecutionException e) {\n e.printStackTrace();\n }\n\n //Parse JSON returned by server and add to list of stations\n if (stations != null) {\n JSONArray stationJson;\n\n try {\n stationJson = new JSONArray(stations);\n } catch (Throwable t) {\n Log.e(TAG, \"Could not parse malformed JSON: \" + stations);\n return;\n }\n\n if (stationJson.length() > 0) {\n for (int i = 0; i < stationJson.length(); i++) {\n JSONObject stationJsonObject = stationJson.getJSONObject(i);\n //String line = (String)stationJsonObject.get(\"line\");\n /*if(line.contains(\"owl\")){\n Log.d(TAG, \"test\");\n continue;\n }*/\n String name = (String) stationJsonObject.get(\"name_long\");\n double latitude = Double.parseDouble((String) stationJsonObject.get(\"latitude\"));\n double longitude = Double.parseDouble((String) stationJsonObject.get(\"longitude\"));\n int id = Integer.parseInt((String) stationJsonObject.get(\"id_station\"));\n String address = stationJsonObject.getString(\"address\");\n String line = stationJsonObject.getString(\"line\");\n Station station = new Station(id, name, address, new LatLng(latitude, longitude), line);\n STATIONS.add(station);\n //StationMap.put(name, station);\n StationIDMap.put(id, station);\n }\n } else {\n Log.e(TAG, \"Empty JSON returned by server\");\n Toast.makeText(this, \"Error connecting to server\", Toast.LENGTH_LONG).show();\n }\n } else {\n Log.e(TAG, \"No response from server\");\n Toast.makeText(this, \"Could not connect to server\", Toast.LENGTH_LONG).show();\n }\n\n\n //Create Geofence objects\n //NOTE: Geofences will not be activated here\n for (Station station : STATIONS) {\n mGeofenceList.add(new Geofence.Builder()\n .setRequestId(String.valueOf(station.getID()))\n .setCircularRegion(\n station.getLatLng().latitude,\n station.getLatLng().longitude,\n Constants.GEOFENCE_RADIUS_METERS)\n .setExpirationDuration(Constants.GEOFENCE_EXPIRATION)\n .setTransitionTypes(Geofence.GEOFENCE_TRANSITION_ENTER\n | Geofence.GEOFENCE_TRANSITION_EXIT)\n .build());\n }\n }", "public void registerGeofence(LBAction lbAction, GoogleApiClient gac) {\n if (!(ActivityCompat.checkSelfPermission(mContext, android.Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED &&\n ActivityCompat.checkSelfPermission(mContext, android.Manifest.permission.ACCESS_COARSE_LOCATION) == PackageManager.PERMISSION_GRANTED)) {\n Log.d(LOG_TAG, \"No permissions granted\");\n } else {\n LocationServices.GeofencingApi.addGeofences(\n gac,\n getGeofencingRequest(lbAction),\n getGeofencePendingIntent(lbAction)\n ).setResultCallback(this);\n }\n }", "private void startGeofence(int indexPos)\n {\n\n globalIndex = indexPos;\n // Log.e(\"globalIndex\",\"\"+globalIndex);\n T.t(TripMapsActivity.this, \"startGeofence\");\n\n if( GEO_FENCE_MARKER[indexPos] != null )\n {\n Geofence geofence = createGeofence( GEO_FENCE_MARKER[indexPos].getPosition(), GEOFENCE_RADIUS );\n GeofencingRequest geofenceRequest = createGeofenceRequest( geofence );\n addGeofence(geofenceRequest);\n }\n else\n {\n\n T.t(TripMapsActivity.this, \"Geofence marker is null\");\n\n }\n }", "private void beginAddGeofences(ArrayList<String> geoIds) {\n mCurrentGeofences = new ArrayList<>();\n if(geoIds.size() > 0) {\n for(String id : geoIds) {\n mCurrentGeofences.add(mGeofenceStorage.getGeofence(id).toGeofence());\n }\n\n if (!servicesConnected()) {\n return;\n }\n\n if (!mInProgress) {\n mInProgress = true;\n mGoogleApiClient.connect();\n }\n else { //retry\n mInProgress = false;\n beginAddGeofences(geoIds);\n }\n }\n }", "@Override\n public void handleGeofenceChange(ArrayList<GeofenceObjectContent> currentGeofences) {\n super.handleGeofenceChange(currentGeofences);\n MainActivity mainActivity = (MainActivity) getActivity();\n\n for (int i = 0; i<currentGeofenceMarkers.size(); i++){\n boolean removeMarker = true;\n for(int j =0; j<currentGeofences.size(); j++){\n if(currentGeofenceMarkers.get(i).getTitle().equals(currentGeofences.get(j).getName())){\n removeMarker = false;\n }\n }\n if(removeMarker){\n currentGeofenceMarkers.get(i).remove();\n currentGeofencesInfoMap.remove(currentGeofencesInfoMap.get(currentGeofenceMarkers.get(i).getTitle()));\n currentGeofenceMarkers.remove(i);\n }\n }\n\n this.currentGeofences = currentGeofences;\n if(mainActivity != null && currentGeofences != null) {\n if (mainActivity.isConnectedToNetwork()) {\n ArrayList<GeofenceObjectContent> singleGeofence = new ArrayList<>(1);\n for(int i = 0; i<currentGeofences.size(); i++){\n if(!currentGeofencesInfoMap.containsKey(currentGeofences.get(i).getName()) && !geofenceNamesBeingQueriedForInfo.containsKey(currentGeofences.get(i).getName())){\n singleGeofence.clear();\n singleGeofence.add(currentGeofences.get(i));\n geofenceNamesBeingQueriedForInfo.put(currentGeofences.get(i).getName(), 0);\n Log.i(logMessages.VOLLEY, \"handleGeofenceChange : about to query database : \" + singleGeofence.toString());\n volleyRequester.request(this, singleGeofence);\n }\n\n }\n }\n\n }\n }", "private Geofence createGeofence(LatLng latLng) {\n Log.d(TAG, \"createGeofence\");\n return new Geofence.Builder()\n .setRequestId(GEOFENCE_REQ_ID)\n .setCircularRegion(latLng.latitude, latLng.longitude, AppointmentActivity.GEOFENCE_RADIUS)\n .setExpirationDuration(GEO_DURATION)\n .setTransitionTypes(Geofence.GEOFENCE_TRANSITION_ENTER\n | Geofence.GEOFENCE_TRANSITION_EXIT)\n .build();\n }", "private GeofencingRequest getAddGeofencingRequest() {\n List<Geofence> geofencesToAdd = new ArrayList<>();\n geofencesToAdd.add(geofenceToAdd);\n GeofencingRequest.Builder builder = new GeofencingRequest.Builder();\n builder.setInitialTrigger(GeofencingRequest.INITIAL_TRIGGER_EXIT)\n .addGeofences(geofencesToAdd);\n return builder.build();\n\n }", "private GeofencingRequest createGeofenceRequest(Geofence geofence) {\n\n\n T.t(TripMapsActivity.this, \"createGeofenceRequest\");\n return new GeofencingRequest.Builder()\n .setInitialTrigger(GeofencingRequest.INITIAL_TRIGGER_ENTER)\n .addGeofence(geofence)\n .build();\n }", "private void addGeoData(String key, double lat, double lon)\n {\n String type=\"\";\n if(mType=='E')\n type=\"Events/\";\n else if(mType=='G')\n type=\"Groups/\";\n\n DatabaseReference placeRef= database.getReference(type+mEntityID+\"/places\");\n GeoFire geoFire= new GeoFire(placeRef);\n geoFire.setLocation(key,new GeoLocation(lat,lon));\n\n }", "public void registerGeofences(List<LBAction> actions){\n for(LBAction act:actions){\n registerGeofence(act);\n }\n\n Log.d(LOG_TAG, \"GeofenceHelper - registered geofences: \" + actions.size());\n\n }", "private GeofencingRequest createGeofenceRequest(Geofence geofence) {\n Log.d(TAG, \"createGeofenceRequest\");\n return new GeofencingRequest.Builder()\n .setInitialTrigger(GeofencingRequest.INITIAL_TRIGGER_ENTER)\n .addGeofence(geofence)\n .build();\n }", "Geq createGeq();", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent intent) {\n switch (requestCode) {\n case Constants.CONNECTION_FAILURE_RESOLUTION_REQUEST :\n switch (resultCode) {\n // If Google Play services resolved the problem\n case Activity.RESULT_OK:\n mInProgress = false;\n beginAddGeofences(mGeoIds);\n break;\n }\n }\n }", "private void handleGeofenceStatus(Context context, Intent intent) {\n\n }", "private void handleGeofenceStatus(Context context, Intent intent) {\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n mMap.setTrafficEnabled(true);\n mMap.getUiSettings().setZoomGesturesEnabled(true);\n mMap.getUiSettings().setZoomControlsEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n mMap.getUiSettings().setCompassEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n\n LocationManager manager = (LocationManager) this.getSystemService(Context.LOCATION_SERVICE);\n Criteria mCriteria = new Criteria();\n String bestProvider = String.valueOf(manager.getBestProvider(mCriteria, true));\n\n Location mLocation = manager.getLastKnownLocation(bestProvider);\n\n checkLocationPermission();\n mMap.setMyLocationEnabled(true);\n\n final double currentLatitude = mLocation.getLatitude();\n final double currentLongitude = mLocation.getLongitude();\n LatLng loc1 = new LatLng(currentLatitude, currentLongitude);\n mMap.addMarker(new MarkerOptions().position(loc1).title(\"Your Current Location\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(currentLatitude, currentLongitude), 15));\n mMap.animateCamera(CameraUpdateFactory.zoomTo(15), 2000, null);\n\n Geocoder geocoder = new Geocoder(MapsActivity.this, Locale.getDefault());\n List<Address> addresses = null;\n try {\n addresses = geocoder.getFromLocation(currentLatitude, currentLongitude, 1);\n } catch (IOException e) {\n e.printStackTrace();\n }\n cityName = addresses.get(0).getAddressLine(0);\n\n GraphRequest request = GraphRequest.newGraphPathRequest(\n accessToken,\n \"/search\",\n new GraphRequest.Callback() {\n @Override\n public void onCompleted(GraphResponse response) {\n JSONObject eventsInCityObject = response.getJSONObject();\n RealmList<Event> cityEvents = new RealmList<Event>();\n\n\n try {\n JSONArray eventsInCityArray = eventsInCityObject.getJSONArray(\"data\");\n for (int i = 0; i < eventsInCityArray.length(); i++) {\n JSONObject eventJSON = eventsInCityArray.getJSONObject(i);\n JSONObject placeJSON = (JSONObject) eventJSON.get(\"place\");\n\n if (placeJSON.has(getString(R.string.getEventLocation))){\n JSONObject locJSON = (JSONObject) placeJSON.get(getString(R.string.getEventLocation));\n\n String city = locJSON.getString(getString(R.string.getEventCity));\n String country = locJSON.getString(getString(R.string.getEventCountry));\n Double lat = locJSON.getDouble(getString(R.string.getEventLat));\n Double lng = locJSON.getDouble(getString(R.string.getEventLng));\n\n EventLocation loc = getRealm().createObject(EventLocation.class, UUID.randomUUID().toString());\n loc.setCity(city);\n loc.setCountry(country);\n loc.setLat(lat);\n loc.setLng(lng);\n\n String placeName = placeJSON.getString(getString(R.string.getPlaceName));\n String placeID = placeJSON.getString(getString(R.string.getPlaceID));\n Place place = getRealm().createObject(Place.class, UUID.randomUUID().toString());\n place.setName(placeName);\n place.setId(placeID);\n place.setLoc(loc);\n\n Event event = getRealm().createObject(Event.class, UUID.randomUUID().toString());\n event.setDesc(eventJSON.getString(getString(R.string.getDescription)));\n event.setEndTime(eventJSON.getString(getString(R.string.getEndTime)));\n event.setName(eventJSON.getString(getString(R.string.getEventName)));\n event.setPlace(place);\n event.setStartTime(eventJSON.getString(getString(R.string.getStartTime)));\n event.setEventID(eventJSON.getString(getString(R.string.getEventID)));\n\n cityEvents.add(event);\n\n mMap.addMarker(new MarkerOptions().position(new LatLng(event.getPlace().getLoc().getLat(),\n event.getPlace().getLoc().getLng())).title(event.getName()));\n } else {\n String placeName = placeJSON.getString(getString(R.string.getPlaceName));\n Place place = getRealm().createObject(Place.class, UUID.randomUUID().toString());\n place.setName(placeName);\n\n\n Event event = getRealm().createObject(Event.class, UUID.randomUUID().toString());\n event.setDesc(eventJSON.getString(getString(R.string.getDescription)));\n event.setEndTime(eventJSON.getString(getString(R.string.getEndTime)));\n event.setName(eventJSON.getString(getString(R.string.getEventName)));\n event.setPlace(place);\n event.setStartTime(eventJSON.getString(getString(R.string.getStartTime)));\n event.setEventID(eventJSON.getString(getString(R.string.getEventID)));\n }\n }\n } catch (JSONException e){\n e.printStackTrace();\n }\n }\n });\n\n Bundle parameters = new Bundle();\n parameters.putString(getString(R.string.query), cityName);\n parameters.putString(getString(R.string.type), getString(R.string.event));\n request.setParameters(parameters);\n request.executeAsync();\n\n\n }", "private void updateTargetProductGeocoding() {\n }", "private void UploadtoServerSavedLocaiton() {\n\t\tCursor c = database.rawQuery(\"SELECT * from locations \", null);\r\n\t\tString mName = null, mPolygon = null;\r\n\t\tbyte[] blob;\r\n\r\n\t\tif (c != null) {\r\n\t\t\tif (c.moveToFirst()) {\r\n\t\t\t\tdo {\r\n\t\t\t\t\tmName = c.getString(c.getColumnIndex(\"name\"));\r\n\t\t\t\t\tblob = c.getBlob(c.getColumnIndex(\"polygon\"));\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tmPolygon = new String(blob, \"UTF-8\");\r\n\t\t\t\t\t} catch (UnsupportedEncodingException e) {\r\n\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tUploadSavedLocationtoServer(mName, mPolygon);\r\n\t\t\t\t} while (c.moveToNext());\r\n\t\t\t}\r\n\t\t\tif (mResponse.contains(\"Success\")) {\r\n\t\t\t\t// Success alert\r\n\t\t\t\tmaTitle = \"Success\";\r\n\t\t\t\tmaMessage = \"Field added successfully\";\r\n\t\t\t\tShowAlert(maTitle, maMessage);\r\n\t\t\t\tuploadarraylist = new ArrayList<String>();\r\n\t\t\t\tmyList = new ArrayList<LatLng>();\r\n\t\t\t\tdatabase.execSQL(\"delete from locations\");\r\n\t\t\t\tSystem.err.println(\"database empty\");\r\n\r\n\t\t\t} else {\r\n\t\t\t\t// Failure Alert\r\n\t\t\t\tmaTitle = \"Failure\";\r\n\t\t\t\tmaMessage = \"Error in adding field\\nTry again\";\r\n\t\t\t\tShowAlert(maTitle, maMessage);\r\n\t\t\t}\r\n\t\t}\r\n\t\tc.close();\r\n\r\n\t}", "@Override\n public void onConnected(Bundle bundle) {\n\n if (mCurrentLocation == null) {\n mCurrentLocation = LocationServices.FusedLocationApi.getLastLocation(mGoogleApiClient);\n mLastUpdateTime = DateFormat.getTimeInstance().format(new Date());\n updateUI();\n }\n\n if (mRequestingLocationUpdates) {\n startLocationUpdates();\n }\n\n if (addGeofence) {\n addGeofencesButtonHandler();\n }\n }", "public void registerGeofences(List<LBAction> actions, GoogleApiClient gac){\n for(LBAction act:actions){\n registerGeofence(act, gac);\n }\n\n Log.d(LOG_TAG, \"GeofenceHelper - registered geofences: \" + actions.size());\n\n }", "private void markerForGeofence(LatLng latLng)\n {\n Log.e(\"TAGtag\", \"markerForGeofence(\" + latLng + \")\");\n String title = latLng.latitude + \", \" + latLng.longitude;\n Log.e(\"TAGtag\", \"\"+title);\n // Define marker options\n MarkerOptions markerOptions = new MarkerOptions()\n .position(latLng)\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_GREEN))\n .title(title);\n if ( mMap!=null )\n {\n // Remove last geoFenceMarker\n if (geoFenceMarker != null)\n {\n geoFenceMarker.remove();\n }\n\n\n geoFenceMarker = mMap.addMarker(markerOptions);\n //geoFenceMarker = mMap.addMarker(markerOptions);\n }\n\n }", "public GeocodingGoogle() throws Exception{\n //lisdataFileRead();\n //findLocationNameFromApi();\n lisdataDBReadToGoogleAPIAccess();\n }", "public void updateGeofences() {\n MainActivity mainActivity = (MainActivity) getActivity();\n if(view != null) {\n Log.i(logMessages.GEOFENCE_MONITORING, \"HistoryFragment : updateGeofences : view is not null \");\n\n Button btnRequestGeofences = (Button) view.findViewById(R.id.btn_request_geofences);\n TextView txtRequestGeofences = (TextView) view.findViewById(txt_try_getting_geofences);\n\n Log.i(logMessages.GEOFENCE_MONITORING, \"HistoryFragment : updateGeofences : about to get new geofences \");\n boolean gotGeofences = mainActivity.getGeofenceMonitor().getNewGeofences();\n if (!gotGeofences) {\n btnRequestGeofences.setVisibility(View.VISIBLE);\n txtRequestGeofences.setText(getResources().getString(R.string.no_geofences_retrieved));\n }\n\n if (mainActivity.getGeofenceMonitor().allGeopointsByName.size() == 0) {\n gotGeofences = mainActivity.getGeofenceMonitor().getNewGeofences();\n if (!gotGeofences) {\n btnRequestGeofences.setVisibility(View.VISIBLE);\n txtRequestGeofences.setText(getResources().getString(R.string.no_geofences_retrieved));\n }else{\n btnRequestGeofences.setVisibility(View.GONE);\n txtRequestGeofences.setVisibility(View.GONE);\n }\n } else {\n if (txtRequestGeofences != null) {\n txtRequestGeofences.setVisibility(View.GONE);\n btnRequestGeofences.setVisibility(View.GONE);\n }\n }\n }\n }", "@Override\n public void onConnected(Bundle bundle) {\n mLastLocation=LocationServices.FusedLocationApi.getLastLocation(mLocationClient);\n if(mLastLocation!=null){\n double latitude=mLastLocation.getLatitude();\n double longitude=mLastLocation.getLongitude();\n\n Geocoder geocoder=new Geocoder(this, Locale.ENGLISH);\n try{\n List<Address> addresses=geocoder.getFromLocation(latitude,longitude,1);\n if(addresses!=null){\n Address fetchedAddresses=addresses.get(0);\n label=\"Location: \"+fetchedAddresses.getFeatureName()+\", \"+fetchedAddresses.getSubLocality()+\", \"+fetchedAddresses.getLocality()+\", \"+fetchedAddresses.getPostalCode()+\", \"+fetchedAddresses.getAdminArea()+\", \"+fetchedAddresses.getCountryName();\n }\n else{\n tvLocationLabel.setText(\"Location Not Found\");\n Snackbar.make(findViewById(android.R.id.content),\"Location Not Found\",Snackbar.LENGTH_LONG).show();\n }\n }catch (Exception e){\n Snackbar.make(findViewById(android.R.id.content),\"Unable to Get Location\",Snackbar.LENGTH_SHORT).show();\n tvLocationLabel.setText(\"Location Not Found\");\n e.printStackTrace();\n }\n }\n }", "private void displayGeofenceInfo(){\n TextView locationView = (TextView) view.findViewById(R.id.txt_geopoint_info);\n locationView.setVisibility(View.VISIBLE);\n MainActivity mainActivity = (MainActivity) getActivity();\n String displayString = getResources().getString(R.string.currently_in_geofences_for);\n boolean showString = false;\n if(mainActivity.getGeofenceMonitor().curGeofences == null){\n return;\n }\n for(int i = 0; i<mainActivity.getGeofenceMonitor().curGeofences.size(); i++){\n displayString += mainActivity.getGeofenceMonitor().curGeofences.get(i).getName() + \" \";\n showString = true;\n }\n if(showString) {\n locationView.setText(displayString);\n } else {\n locationView.setText(getResources().getString(R.string.no_items));\n }\n }", "private void populateGeofencesList() {\n ArrayList<GeofenceObjects> returnlist = currentList;\n geofences.clear();\n for (GeofenceObjects geofenceObjects : returnlist) {\n geofences.add(geofenceObjects.getGeofenceName());\n }\n }", "private void fineLocationPermissionGranted() {\n UtilityService.addGeofences(this);\n UtilityService.requestLocation(this);\n }", "public void drawGeofences(GeofenceObjectContent[] geofences) {\n MainActivity mainActivity = (MainActivity) getActivity();\n mainActivity.getGeofenceMonitor().geofencesBeingMonitored = geofences;\n if(debugMode) {\n if(geofences != null) {\n mMap.clear();\n for (int i = 0; i < geofences.length; i++) {\n carleton150.edu.carleton.carleton150.POJO.GeofenceObject.Geofence geofence =\n geofences[i].getGeofence();\n CircleOptions circleOptions = new CircleOptions();\n GeofenceObjectLocation location =\n geofence.getLocation();\n double lat = location.getLat();\n double lon = location.getLng();\n circleOptions.center(new LatLng(lat, lon));\n circleOptions.radius(geofence.getRadius());\n circleOptions.strokeColor(R.color.colorPrimary);\n circleOptions.strokeWidth(5);\n mMap.addCircle(circleOptions);\n }\n }\n }\n }", "@Override\n public void onConnected(Bundle connectionHint)\n {\n if (locationHasToBeUpdated)\n {\n createLocationRequest();\n locationHasToBeUpdated = false;\n }\n }", "private Geofence createGeofence( LatLng latLng, float radius )\n {\n T.t(TripMapsActivity.this, \"createGeofence\");\n return new Geofence.Builder()\n .setRequestId(GEOFENCE_REQ_ID)\n .setCircularRegion( latLng.latitude, latLng.longitude, radius)\n .setExpirationDuration(GEO_DURATION)\n .setTransitionTypes(Geofence.GEOFENCE_TRANSITION_ENTER\n | Geofence.GEOFENCE_TRANSITION_EXIT)\n .build();\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent intent) {\n switch (requestCode) {\n case ClientSideUtils.CONNECTION_FAILURE_RESOLUTION_REQUEST :\n\n switch (resultCode) {\n // If Google Play services resolved the problem\n case Activity.RESULT_OK:\n // If the request was to add geofences\n if (ClientSideUtils.GEOFENCE_REQUEST_TYPE.ADD == mGeofenceRequestType) {\n\n // Toggle the request flag and send a new request\n mGeofenceRequester.setInProgressFlag(false);\n\n // Restart the process of adding the current geofences\n mGeofenceRequester.addGeofences(mCurrentGeofenceList);\n\n // If the request was to remove geofences\n } else if (ClientSideUtils.GEOFENCE_REQUEST_TYPE.REMOVE == mGeofenceRequestType ){\n\n // Toggle the removal flag and send a new removal request\n mGeofenceRemover.setInProgressFlag(false);\n\n // If the removal was by Intent\n if (ClientSideUtils.GEOFENCE_REMOVE_TYPE.INTENT == mGeofenceRemoveType) {\n\n \t// TODO support this after fixing the remove by intent\n \tLog.d(ClientSideUtils.APPTAG, \"REMOVE_TYPE.INTENT was found - unsupported in this app\");\n //mGeofenceRemover.removeGeofencesByIntent(\n //mGeofenceRequester.getRequestPendingIntent());\n\n } else {\n // Restart the removal of the geofence list\n \tremoveCurrentGeofecesByID(mCurrentGeofenceList);\n }\n } else if (ClientSideUtils.ACTIVITY_REQUEST_TYPE.ADD == mActivityRequestType) {\n \t\n // Restart the process of requesting activity recognition updates\n mDetectionRequester.requestUpdates();\n \t\n } else if (ClientSideUtils.ACTIVITY_REQUEST_TYPE.REMOVE == mActivityRequestType) {\n \t\n \t// Restart the removal of all activity recognition updates for the PendingIntent\n mDetectionRemover.removeUpdates(mDetectionRequester.getRequestPendingIntent());\n \t\n }\n break;\n\n // If any other result was returned by Google Play services\n default:\n // Report that Google Play services was unable to resolve the problem. \t\n Log.d(ClientSideUtils.APPTAG, getString(R.string.no_resolution));\n }\n default:\n // Report that this Activity received an unknown requestCode\n Log.d(ClientSideUtils.APPTAG, getString(R.string.unknown_activity_request_code, requestCode));\n break;\n }\n }", "@Override\n public void onAddGeofencesResult(int statusCode, String[] geofenceRequestIds) {\n\n // Create a broadcast Intent that notifies other components of success or failure\n Intent broadcastIntent = new Intent();\n\n // Temp storage for messages\n String msg;\n\n // If adding the geocodes was successful\n if (LocationStatusCodes.SUCCESS == statusCode) {\n // Create a message containing all the geofence IDs added.\n msg = activity.getString(R.string.add_geofences_result_success, Arrays.toString(geofenceRequestIds));\n\n // In debug mode, log the result\n Log.d(TAG + \".onAddGeofencesResult()\", msg);\n\n // Create an Intent to broadcast to the app\n broadcastIntent.setAction(LocationUtils.ACTION_GEOFENCES_ADDED)\n .addCategory(LocationUtils.CATEGORY_LOCATION_SERVICES)\n .putExtra(LocationUtils.EXTRA_GEOFENCE_STATUS, msg);\n // If adding the geofences failed\n } else {\n\n /*\n * Create a message containing the error code and the list\n * of geofence IDs you tried to add\n */\n msg = activity.getString(R.string.add_geofences_result_failure, statusCode, \n \t\tArrays.toString(geofenceRequestIds));\n\n // Log an error\n Log.e(TAG + \".onAddGeofencesResult()\", msg);\n\n // Create an Intent to broadcast to the app\n broadcastIntent.setAction(LocationUtils.ACTION_GEOFENCE_ERROR)\n .addCategory(LocationUtils.CATEGORY_LOCATION_SERVICES)\n .putExtra(LocationUtils.EXTRA_GEOFENCE_STATUS, msg);\n }\n\n // Broadcast whichever result occurred\n LocalBroadcastManager.getInstance(activity).sendBroadcast(broadcastIntent);\n }", "@Override\n public void onConnected(Bundle connectionHint) {\n //LocationServices.FusedLocationApi.requestLocationUpdates(mGoogleApiClient, REQUEST, this); // LocationListener\n }", "private void markerForGeofence(LatLng latLng,int indexPos)\n {\n Log.e(\"TAGtag\", \"markerForGeofence(\" + latLng + \")\");\n String title = latLng.latitude + \", \" + latLng.longitude;\n Log.e(\"TAGtag\", \"\"+title);\n // Define marker options\n MarkerOptions markerOptions = new MarkerOptions()\n .position(latLng)\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_BLUE))\n .title(title);\n if ( mMap!=null )\n {\n // Remove last geoFenceMarker\n if (GEO_FENCE_MARKER[indexPos] != null)\n {\n //geoFenceMarker.remove();\n }\n\n\n GEO_FENCE_MARKER[indexPos] = mMap.addMarker(markerOptions);\n //geoFenceMarker = mMap.addMarker(markerOptions);\n }\n startGeofence(indexPos);\n }", "private GeofencingRequest getGeofencingRequest(LBAction lbAction) {\n GeofencingRequest.Builder builder = new GeofencingRequest.Builder();\n builder.setInitialTrigger(GeofencingRequest.INITIAL_TRIGGER_ENTER);// change upon params\n builder.addGeofence(createGeofenceForAction(lbAction));\n return builder.build();\n }", "@Override\n public void onConnected(@Nullable Bundle bundle) {\n Log.i(TAG, \"Location Services Connected\");\n requestLocationUpdates();\n }", "public void startLocationService(Context context){\n createLocationRequest();\n mGoogleApiClient = new GoogleApiClient.Builder(context)\n .addApi(LocationServices.API)\n .addConnectionCallbacks(this)\n .addOnConnectionFailedListener(this)\n .build();\n mGoogleApiClient.connect();\n }", "private void checkLocationandAddToMap() {\n if (ActivityCompat.checkSelfPermission(getActivity(), android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(getActivity(), android.Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n //Requesting the Location permission\n ActivityCompat.requestPermissions(getActivity(), new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION}, LOCATION_REQUEST_CODE);\n return;\n }\n\n locationManager = (LocationManager) getActivity().getSystemService(LOCATION_SERVICE);\n criteria = new Criteria();\n bestProvider = locationManager.getBestProvider(criteria, true);\n\n\n //Fetching the last known location using the Fus\n Location location = locationManager.getLastKnownLocation(bestProvider);\n\n\n if (location != null) {\n\n onLocationChanged(location);\n\n\n } else {\n //This is what you need:\n locationManager.requestLocationUpdates(bestProvider, 1000, 0, (LocationListener) getActivity());\n }\n\n\n }", "public void startLocationUpdate() {\n if (locationCallback != null) {\n try {\n locationCallback = new LocationCallback() {//khoi tao dinh nghia (extent)\n\n @Override\n public void onLocationResult(LocationResult locationResult) {\n super.onLocationResult(locationResult);\n Log.d(TAG, \"onLocationResult: \");\n if (locationResult != null) {\n Log.d(TAG, \"onLocationResult: loaction!==null\");\n myLocation = locationResult.getLastLocation();\n showMarker();//de show hinh len\n }\n }\n };\n fusedLocationProviderClient.requestLocationUpdates(locationRequest, locationCallback, null);//dang ky voi he thong app lang nghe su thay doi cua location\n\n } catch (SecurityException e) {\n e.getMessage();\n\n }\n }\n }", "private void populateGeofences(List<GeofenceDomainModel> geofenceDomainModels) {\n for (int i = 0; i < geofenceDomainModels.size(); i++) {\n Double latitude = geofenceDomainModels.get(i).getLatitude();\n Double longitude = geofenceDomainModels.get(i).getLongitude();\n Float radius = geofenceDomainModels.get(i).getRadius();\n\n geofences.add(new Geofence.Builder()\n .setRequestId(Integer.toString(i))\n .setCircularRegion(\n latitude,\n longitude,\n radius\n )\n .setLoiteringDelay(1000)\n .setExpirationDuration(1000000000)\n .setTransitionTypes(Geofence.GEOFENCE_TRANSITION_ENTER | Geofence.GEOFENCE_TRANSITION_EXIT | Geofence.GEOFENCE_TRANSITION_DWELL)\n .build());\n\n }\n }", "@SuppressLint(\"MissingPermission\")\n private void Locate(){\n locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 2000, 0, (LocationListener) this);\n\n // Obtain the SupportMapFragment and get notified when the map is ready to be used.\n mapFragment = (SupportMapFragment) getSupportFragmentManager()\n .findFragmentById(R.id.map);\n\n //Initialize fused location\n client = LocationServices.getFusedLocationProviderClient(this);\n }", "private void m6906b() {\n LocationClientOption locationClientOption = new LocationClientOption();\n locationClientOption.setOpenGps(true);\n locationClientOption.setPriority(1);\n locationClientOption.setCoorType(\"bd09ll\");\n locationClientOption.setScanSpan(5000);\n locationClientOption.setAddrType(\"all\");\n this.f5657z = new LocationClient(this);\n this.f5657z.registerLocationListener(this);\n this.f5657z.setLocOption(locationClientOption);\n this.f5657z.start();\n this.f5657z.requestLocation();\n }", "private void registerForGPS() {\n Log.d(NAMAZ_LOG_TAG, \"registerForGPS:\");\n Criteria criteria = new Criteria();\n criteria.setAccuracy(Criteria.ACCURACY_COARSE);\n criteria.setPowerRequirement(Criteria.POWER_LOW);\n criteria.setAltitudeRequired(false);\n criteria.setBearingRequired(false);\n criteria.setSpeedRequired(false);\n criteria.setCostAllowed(true);\n LocationManager locationManager = ((LocationManager) getSystemService(Context.LOCATION_SERVICE));\n String provider = locationManager.getBestProvider(criteria, true);\n\n if(!isLocationEnabled()) {\n showDialog(\"Location Access\", getResources().getString(R.string.location_enable), \"Enable Location\", \"Cancel\", 1);\n } else {\n ActivityCompat.requestPermissions(QiblaDirectionActivity.this,\n new String[]{Manifest.permission. ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_LOCATION);\n }\n\n /* if (provider != null) {\n locationManager.requestLocationUpdates(provider, MIN_LOCATION_TIME,\n MIN_LOCATION_DISTANCE, qiblaManager);\n }\n locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER,\n MIN_LOCATION_TIME, MIN_LOCATION_DISTANCE, qiblaManager);\n locationManager.requestLocationUpdates(\n LocationManager.NETWORK_PROVIDER, MIN_LOCATION_TIME,\n MIN_LOCATION_DISTANCE, qiblaManager);*/\n /*Location location = locationManager\n .getLastKnownLocation(LocationManager.GPS_PROVIDER);\n if (location == null) {\n location = ((LocationManager) getSystemService(Context.LOCATION_SERVICE))\n .getLastKnownLocation(LocationManager.GPS_PROVIDER);\n }*/\n\n }", "private void initilizeMap() \n {\n \tmContext = getApplicationContext();\n \ttry \n \t{\n locationManager = (LocationManager) getSystemService(LOCATION_SERVICE);\n \n // Getting GPS status\n isGPSEnabled = locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER);\n\n // Getting network status\n isNetworkEnabled = locationManager.isProviderEnabled(LocationManager.NETWORK_PROVIDER);\n\n if (!isGPSEnabled && !isNetworkEnabled) \n {\n // No network provider is enabled\n } \n else \n {\n this.canGetLocation = true;\n if (isNetworkEnabled) \n {\n locationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 0, 0, this);\n Log.d(\"Network\", \"Network\");\n if (locationManager != null)\n {\n// Criteria criteria = new Criteria();\n// provider = locationManager.getBestProvider(criteria, false);\n location = locationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER);\n if (location != null) \n {\n latitude = location.getLatitude();\n longitude = location.getLongitude();\n// initialLocation = new LatLng(latitude, longitude);\n initialLocation = new Location(\"inicial\");\n initialLocation.setLatitude(latitude);\n initialLocation.setLongitude(longitude);\n }\n }\n }\n // If GPS enabled, get latitude/longitude using GPS Services\n if (isGPSEnabled) \n {\n if (location == null) \n {\n locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, this);\n Log.d(\"GPS Enabled\", \"GPS Enabled\");\n if (locationManager != null) \n {\n location = locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);\n if (location != null)\n {\n latitude = location.getLatitude();\n longitude = location.getLongitude();\n// initialLocation = new LatLng(latitude, longitude);\n initialLocation = new Location(\"inicial\");\n initialLocation.setLatitude(latitude);\n initialLocation.setLongitude(longitude);\n }\n }\n }\n }\n }\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n\n gMap = ((MapFragment) getFragmentManager().findFragmentById(R.id.map)).getMap();\n myLocation = new LatLng(latitude,longitude);\n gMap.animateCamera(CameraUpdateFactory.newLatLngZoom(myLocation, 15));\n// \n// // check if map is created successfully or not\n// if (gMap == null) \n// {\n// Toast.makeText(getApplicationContext(),\n// \"Sorry! unable to create maps\", Toast.LENGTH_SHORT)\n// .show();\n// }\n gMap.setMyLocationEnabled(true);\n// Marker TP = gMap.addMarker(new MarkerOptions().position(myLocation).title(\"Estoy aca\").icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_VIOLET)));\n\n// lstLatLngs = new ArrayList<LatLng>();\n gMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() \n {\n \t@Override\n \tpublic void onMapClick(final LatLng point) \n \t{\n \t\t// TODO Auto-generated method stub\n \t\t\n \t\t AlertDialog.Builder builder = new AlertDialog.Builder(CrearIncidenteGPS.this);\n \t\t builder.setMessage(\"Desea agregar un incidente en este lugar?\")\n \t\t .setCancelable(false)\n \t\t .setPositiveButton(\"Si\", new DialogInterface.OnClickListener() \n \t\t {\n \t\t public void onClick(DialogInterface dialog, int id) \n \t\t {\n \t\t \t//Agregar el incidente\n// \t\t \tlstLatLngs.add(point);\n \t\t \tinsertarIncidente(point);\n// \t\t \tgMap.addMarker(new MarkerOptions().position(point));\n \t\t }\n \t\t })\n \t\t .setNegativeButton(\"No\", new DialogInterface.OnClickListener() \n \t\t {\n \t\t public void onClick(DialogInterface dialog, int id) \n \t\t {\n \t\t dialog.cancel();\n \t\t }\n \t\t });\n \t\t AlertDialog alert = builder.create();\n \t\t alert.show();\n \t\t\n \t}\n });\n \n// HttpRequestFactory httpRequestFactory = createRequestFactory(transport);\n// HttpRequest request = httpRequestFactory.buildGetRequest(new GenericUrl(PLACES_SEARCH_URL));\n// request.url.put(\"key\", \"\");\n// request.url.put(\"location\", latitude + \",\" + longitude);\n// request.url.put(\"radius\", 500);\n// request.url.put(\"sensor\", \"false\");\n// infowindow = new google.maps.InfoWindow();\n \n// var service = new google.maps.places.PlacesService(gMap);\n// service.nearbySearch(request, callback);\n }", "public void add_location() {\n if (currentLocationCheckbox.isChecked()) {\n try {\n CurrentLocation locationListener = new CurrentLocation();\n LocationManager locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);\n locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, locationListener);\n Location location = locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);\n if (location != null) {\n int latitude = (int) (location.getLatitude() * 1E6);\n int longitude = (int) (location.getLongitude() * 1E6);\n currentLocation = new GeoPoint(latitude, longitude);\n }\n } catch (SecurityException e) {\n e.printStackTrace();\n }\n } else {\n currentLocation = null;\n }\n\n }", "public addlocality() {\n initComponents();\n }", "public void callUpdateLocation( AppCompatActivity activity, final Context context, String collName, int recordId, LatLng newLocation ){\r\n\r\n ServiceRequest serviceRequest = new ServiceRequest( ServiceRequest.CORE_SEVICE_NAME, \"updateLocation\", context );\r\n serviceRequest.putParameterValue( \"database_name\", \"update_location\" );\r\n serviceRequest.putParameterValue( \"dataset_name\", \"gis\" );\r\n serviceRequest.putParameterValue( \"collection_name\", collName );\r\n serviceRequest.putParameterValue( \"record_id\", String.valueOf( recordId ) );\r\n serviceRequest.putParameterValue( \"location_x\", String.valueOf( newLocation.longitude ) );\r\n serviceRequest.putParameterValue( \"location_y\", String.valueOf( newLocation.latitude ) );\r\n serviceRequest.putParameterValue( \"username\", LoginAuthentificationHandlerContext.getInstance().getUsername( ) );\r\n serviceRequest.putParameterValue( \"password\", LoginAuthentificationHandlerContext.getInstance( ).getPassword( ) );\r\n L.m( serviceRequest.getServiceRequest( ) );\r\n\r\n SmallWorldServiceTask task = new SmallWorldServiceTask(\r\n serviceRequest.getServiceRequest( ),\r\n activity,\r\n \"Updating new location...\",\r\n new SetOnTaskCompleteListener< List< HashMap< String, String > > >( ){\r\n @Override\r\n public void onTaskComplete( List< HashMap< String, String > > result ) {\r\n HashMap< String, String > response = result.get( 0 );\r\n if( response.containsKey( \"login_response\" )){\r\n L.t( context, response.get( \"login_response\" ) );\r\n }else if( response.containsKey( \"result_update\" ) ){\r\n String updated = response.get( \"result_update\" );\r\n if( updated != null ){\r\n if( updated.equals( \"true\" )){\r\n MapEngine.refreshMap( MobileGatewayMapActivity.masterActivity.getMap( ), MobileGatewayMapActivity.masterActivity.getMap( ).getCameraPosition( ), context );\r\n L.t( context, \"Updated location complete\" );\r\n }else{\r\n L.t( context, \"Updated location failed!!!! \" + updated );\r\n }\r\n }\r\n }\r\n\r\n }\r\n } );\r\n task.execute( );\r\n }", "private GeofencingRequest getGeofencingRequest() {\n GeofencingRequest.Builder builder = new GeofencingRequest.Builder();\n\n // The INITIAL_TRIGGER_ENTER flag indicates that geofencing service should trigger a\n // GEOFENCE_TRANSITION_ENTER notification when the geofence is added and if the device\n // is already inside that geofence.\n builder.setInitialTrigger(GeofencingRequest.INITIAL_TRIGGER_ENTER);\n\n // Add the geofences to be monitored by geofencing service.\n builder.addGeofences(mGeofenceList);\n\n // Return a GeofencingRequest.\n return builder.build();\n }", "private GeofencingRequest getGeofencingRequest() {\n GeofencingRequest.Builder builder = new GeofencingRequest.Builder();\n\n // The INITIAL_TRIGGER_ENTER flag indicates that geofencing service should trigger a\n // GEOFENCE_TRANSITION_ENTER notification when the geofence is added and if the device\n // is already inside that geofence.\n builder.setInitialTrigger(GeofencingRequest.INITIAL_TRIGGER_ENTER);\n\n // Add the geofences to be monitored by geofencing service.\n builder.addGeofences(mGeofenceList);\n\n // Return a GeofencingRequest.\n return builder.build();\n }", "@Override\n public void onResume() {\n super.onResume();\n MainActivity mainActivity = (MainActivity) getActivity();\n if(mainActivity.isConnectedToNetwork()) {\n setUpMapIfNeeded();\n }\n if(mainActivity.checkIfGPSEnabled() && !isMonitoringGeofences) {\n //starts the mainActivity monitoring geofences\n mainActivity.getGeofenceMonitor().startGeofenceMonitoring();\n isMonitoringGeofences = true;\n }\n mMap.setMyLocationEnabled(mainActivity.checkIfGPSEnabled());\n if(needToCallUpdateGeofences) {\n updateGeofences();\n }\n }", "@Override\n public void onSuccess(Location location) {\n if (location != null) {\n Toast.makeText(PassengerLocationActivity.this,\"An Ambulance request had been made ! \",Toast.LENGTH_SHORT).show();\n requestAmbulance.put(\"username\", ParseUser.getCurrentUser().getUsername());\n ParseGeoPoint userLocation = new ParseGeoPoint(location.getLatitude(),location.getLongitude());\n requestAmbulance.put(\"passengerLocation\",userLocation);\n requestAmbulance.saveInBackground(new SaveCallback() {\n @Override\n public void done(ParseException e) {\n if (e == null){\n Toast.makeText(PassengerLocationActivity.this,\"An Ambulance is on the way ! \",Toast.LENGTH_SHORT).show();\n }\n else\n Toast.makeText(PassengerLocationActivity.this,\"Error occurred - could not save!\",Toast.LENGTH_SHORT).show();\n }\n });\n }\n else\n Toast.makeText(PassengerLocationActivity.this,\"Error occurred!Please try again\",Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onLocationChanged(Location location) {\n latitude=String.valueOf(location.getLatitude());\n longitude= String.valueOf(location.getLongitude());\n\n System.out.println(\"asdfgh==\"+latitude);\n\n\n /* Geocoder geocoder;\n List<Address> addresses;\n geocoder = new Geocoder(SafetyActivity.this, Locale.getDefault());\n\n try {\n addresses = geocoder.getFromLocation(location.getLatitude(), location.getLongitude(), 1);\n String address = addresses.get(0).getAddressLine(0); // If any additional address line present than only, check with max available address lines by getMaxAddressLineIndex()\n String city = addresses.get(0).getLocality();\n String state = addresses.get(0).getAdminArea();\n String country = addresses.get(0).getCountryName();\n String postalCode = addresses.get(0).getPostalCode();\n String knownName = addresses.get(0).getFeatureName();\n\n System.out.println(\"addresses==\"+address);\n // Here 1 represent max location result to returned, by documents it recommended 1 to 5\n } catch (IOException e) {\n e.printStackTrace();\n }*/\n }", "private void handleGeofenceError(Context context, Intent intent) {\n String msg = intent.getStringExtra(GeofenceUtils.EXTRA_GEOFENCE_STATUS);\n Log.e(GeofenceUtils.APPTAG, msg);\n Toast.makeText(context, msg, Toast.LENGTH_LONG).show();\n }", "protected GeoFenceActivity(Context context) {\n this.mContext = context;\n // Create a GeofenceService instance.\n geofenceService = LocationServices.getGeofenceService(mContext);\n geofenceList = new ArrayList<>();\n // Obtain a PendingIntent object.\n pendingIntent = getPendingIntent();\n TAG = \"geoFence\";\n geoFenceActivated = false;\n }", "private void geolocate() throws IOException {\n\n\n List<Address> addresses = geocoder.getFromLocationName(bundle.getString(\"starting\"), 1);\n List<Address> addresses1 = geocoder.getFromLocationName(bundle.getString(\"destiny\"), 1);\n\n if (addresses!=null||addresses.size()>0||addresses1!=null||addresses1.size()>0)\n {\n try {\n\n\n Address address=addresses.get(0);\n Address address1=addresses1.get(0);\n\n Double orglat = address.getLatitude();\n Double orglng = address.getLongitude();\n Double dstlat = address1.getLatitude();\n Double dstlng = address1.getLongitude();\n\n origin = new LatLng(orglat, orglng);\n destiny = new LatLng(dstlat, dstlng);\n\n /* Constants.AddrouteOrigin=new LatLng(orglat,orglng);\n Constants.AddrouteDestiny=new LatLng(dstlat,dstlng);*/\n\n\n Log.d(\"origindest\",Constants.AddrouteOrigin+\" \"+Constants.AddrouteDestiny+\"\");\n\n Log.d(\"origindest\",origin+\" \"+destiny+\"\");\n\n }catch (IndexOutOfBoundsException e){\n Toast.makeText(getContext(),e.getMessage(),Toast.LENGTH_LONG).show();\n }\n\n }\n else {\n Toast.makeText(getContext(),\"no address found\",Toast.LENGTH_LONG).show();\n }\n }", "private void requestAddLocationPoint(final String point, final String lPoint , final String city , final String country ) {\n\n // Utils.showLoadingPopup(getActivity());\n if(checkExistLocationPoint(point,lPoint))\n {\n return ;\n }\n String url=\"\";\n HashMap<String, String> data = new HashMap<>();\n switch(point)\n {\n case \"loading\":\n url= Constants.BASE_URL + \"add_loding_point\";\n data.put(\"loding_point\",lPoint);\n data.put(\"loding_city\",city);\n data.put(\"loading_country\",country);\n data.put(\"status\",\"1\");\n break ;\n\n case \"destination\" :\n url= Constants.BASE_URL + \"add_destination_point\";\n data.put(\"destination_point\",lPoint);\n data.put(\"destination_city\",city);\n data.put(\"destination_country\",country);\n data.put(\"status\",\"1\");\n break ;\n }\n\n\n\n HttpPostRequest.doPost(getActivity(), url, Utils.newGson().toJson(data), new HttpRequestCallback() {\n @Override\n public void response(String errorMessage, String responseData) {\n\n // Utils.hideLoadingPopup();\n\n try {\n\n JSONObject jobj = new JSONObject(responseData);\n Boolean status = jobj.getBoolean(\"status\");\n if (status) {\n LocationPointModel locationPointModel = new LocationPointModel();\n locationPointModel.locPoint = lPoint ;\n locationPointModel.city = city ;\n locationPointModel.country = country ;\n switch(point)\n {\n\n case \"loading\" :\n locationPointModel.locId = jobj.getString(\"loding_point_id\") ;\n appGlobal.listLoadingnPoint.add(locationPointModel);\n break ;\n\n case \"destination\" :\n locationPointModel.locId = jobj.getString(\"destination_point_id\") ;\n appGlobal.listDestinationPoint.add(locationPointModel);\n break ;\n }\n\n Toast.makeText(getActivity(), jobj.getString(\"msg\").toString(), Toast.LENGTH_SHORT).show();\n\n } else {\n Toast.makeText(getActivity(), jobj.getString(\"msg\").toString(), Toast.LENGTH_SHORT).show();\n }\n } catch (Exception e) {\n Toast.makeText(getActivity(), \"Error getting Data\", Toast.LENGTH_SHORT).show();\n e.printStackTrace();\n }\n }\n\n @Override\n public void onError(String errorMessage) {\n\n }\n });\n\n }", "@Override\n public void onConnected(Bundle bundle) {\n Log.i(TAG, \"location service connected\");\n }", "private void initLocation() {\n BaiduLocationHolder.OPTION.setLocationMode(LocationClientOption.LocationMode.Hight_Accuracy);\n //可选,默认高精度,设置定位模式,高精度,低功耗,仅设备\n\n BaiduLocationHolder.OPTION.setCoorType(\"bd09ll\");\n //可选,默认gcj02,设置返回的定位结果坐标系\n\n int span = 1000;\n BaiduLocationHolder.OPTION.setScanSpan(span);\n //可选,默认0,即仅定位一次,设置发起定位请求的间隔需要大于等于1000ms才是有效的\n\n BaiduLocationHolder.OPTION.setIsNeedAddress(true);\n //可选,设置是否需要地址信息,默认不需要\n\n BaiduLocationHolder.OPTION.setOpenGps(true);\n //可选,默认false,设置是否使用gps\n\n BaiduLocationHolder.OPTION.setLocationNotify(true);\n //可选,默认false,设置是否当GPS有效时按照1S/1次频率输出GPS结果\n\n BaiduLocationHolder.OPTION.setIsNeedLocationDescribe(true);\n //可选,默认false,设置是否需要位置语义化结果,可以在BDLocation.getLocationDescribe里得到,结果类似于“在北京天安门附近”\n\n BaiduLocationHolder.OPTION.setIsNeedLocationPoiList(true);\n //可选,默认false,设置是否需要POI结果,可以在BDLocation.getPoiList里得到\n\n BaiduLocationHolder.OPTION.setIgnoreKillProcess(false);\n //可选,默认true,定位SDK内部是一个SERVICE,并放到了独立进程,设置是否在stop的时候杀死这个进程,默认不杀死\n\n BaiduLocationHolder.OPTION.SetIgnoreCacheException(false);\n //可选,默认false,设置是否收集CRASH信息,默认收集\n\n BaiduLocationHolder.OPTION.setEnableSimulateGps(false);\n //可选,默认false,设置是否需要过滤GPS仿真结果,默认需要\n\n// BaiduLocationHolder.OPTION.setWifiValidTime(5*60*1000);\n //可选,7.2版本新增能力,如果您设置了这个接口,首次启动定位时,会先判断当前WiFi是否超出有效期,超出有效期的话,会先重新扫描WiFi,然后再定位\n\n BaiduLocationHolder.CLIENT.setLocOption(BaiduLocationHolder.OPTION);\n }", "@Override\n public void onConnected(@Nullable Bundle bundle) {\n app.commonlocation.currentLocation=locationHelper.getLocation();\n try {\n latitude = app.commonlocation.currentLocation.getLatitude();\n longitude = app.commonlocation.currentLocation.getLongitude();\n getAddress();\n }catch (Exception e){\n\n }\n }", "public ArrayList<ArrayList<String>> extractCoordsFromWfsXml(String xml_og, String url_geofenceWfs, String serviceIdentifier) {\r\n\t\t\r\n\t\t//logger.debug(xml_og);\r\n\t\tnameSpaceUri = getArbeitsbereichXmlTagFromWfs(url_geofenceWfs); //z.B. focus\r\n\t\tPointPolygon point = new PointPolygon();\r\n\t\tArrayList<String> list_objectid = new ArrayList<String>();\r\n\t\tArrayList<String> list_coords = new ArrayList<String>();\r\n\t\tArrayList<ArrayList<String>> list_coords_objectid = new ArrayList<ArrayList<String>>();\r\n\t\t\r\n\t\t\r\n\t\tDocumentBuilder dbuilder = null;\r\n\t\ttry {\t\t\t\r\n\t\t\tXPath xPath = XPathFactory.newInstance().newXPath();\r\n\t\t\tDocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\r\n\t\t\tdbFactory.setNamespaceAware(true);\r\n\t DocumentBuilder builder = dbFactory.newDocumentBuilder();\r\n\t Document doc = builder.parse(new InputSource(new StringReader(xml_og)));\r\n\t \t \r\n\t \txPath.setNamespaceContext(new NamespaceContext() {\r\n\t\t\t\t\t\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic Iterator getPrefixes(String namespaceURI) {\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic String getPrefix(String namespaceURI) {\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t @Override\r\n\t\t\t public String getNamespaceURI(String args) {\r\n\t\t\t if(nameSpaceUri.equals(args)){\r\n\t\t\t \treturn nameSpaceUri;\r\n\t\t\t }else if(\"gml\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/gml/3.2\"; \t\r\n\t\t\t }else{\r\n\t\t\t \treturn null;\r\n\t\t\t }\r\n\t\t\t }\r\n\t\t\t\t});\t\t\r\n//\t \tString path_offering = \"/wfs:FeatureCollection/wfs:member/geofence_sbg:geofence_sbg_bbox/@gml:id\";\r\n//\t\t\t\tNode node_offering = (Node)xPath.compile(path_offering).evaluate(doc, XPathConstants.NODE);\r\n//\t\t\t\tSystem.out.println(\"offering: \"+node_offering.getNodeValue());\r\n\t\t\t\t/*\r\n\t\t\t\tString path_offering = \"/soap:Envelope/soap:Body/sos:Capabilities/@version\";\r\n\t\t\t\tNode node_offering = (Node)xPath.compile(path_offering).evaluate(doc, XPathConstants.NODE);\r\n\t\t\t\tSystem.out.println(\"offering: \"+node_offering.getTextContent());\r\n\t\t\t\t\r\n\t\t\t\tString path_procedures = \"//om:OM_Observation[@name='GetObservation']/ows:Parameter[@name='procedure']/ows:AllowedValues/ows:Value\"; */\r\n//\t\t\t\tString pathToLoading = \"//om:OM_Observation[om:observedProperty[@xlink:href='http://ispace.researchstudio.at/ont/swe/property/Loading']]/om:result\";\r\n\t\t\t\t\r\n\r\n\t \tString pathToObjectid = \"//\"+nameSpaceUri +\":objectid\";\r\n\t \tNodeList nodes_Objectid = (NodeList)xPath.compile(pathToObjectid).evaluate(doc, XPathConstants.NODESET);\r\n\t \t\r\n\t\t\t\tString pathToCoordinates =\"//gml:LinearRing/gml:posList\";\r\n\t\t\t\tNodeList nodes_position = (NodeList)xPath.compile(pathToCoordinates).evaluate(doc, XPathConstants.NODESET);\r\n\t\t\t\t//book[title/@lang = 'it'] [@uom='abc']\r\n\t\t\t\t//myNodeList.item(0).setNodeValue(\"Hi test!\");\r\n\t\t\t\tString xy= \"\";\r\n\t\t\t\t\r\n\t\t\t//\tlogger.debug(\"vor for loop ParserXmlJson.extractPointFromIO:\"+ nodes_position.getLength());\t\r\n\t\t\t\tfor(int n = 0; n<nodes_position.getLength(); n++){\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(serviceIdentifier.equals(\"within\")){\r\n\t\t\t\t\t\tpoint.list_ofStrConsistingOf5CoordinatesForBoundingBox.add(nodes_position.item(n).getTextContent());\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tpoint.list_ofStrConsistingOf5CoordinatesForBoundingBoxWithin.add(nodes_position.item(n).getTextContent());\r\n\t\t\t\t\t}\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tlist_coords.add(nodes_position.item(n).getTextContent());\r\n\t\t\t\t\t\r\n\t\t\t\t\tlist_objectid.add(nodes_Objectid.item(n).getTextContent());\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t//node_procedures.item(n).setTextContent(\"4444\");\r\n\t\t\t\t\t//System.out.println(\"ParserXmlJson.parseInsertObservation:parser EDITED:\"+node_procedures.item(n).getTextContent());\r\n\t\t\t\t}\t\t\t\r\n\t\t\t//\tSystem.out.println(TextFiles.xmlDocument2StringWithPrettyPrint(doc, 2));\r\n\t\t\t\ttry{\r\n\t\t\t\t\t\r\n\t\t\t\t}catch(Exception e){\r\n\t\t\t\t\tSystem.out.println(\"Error: maybe no coordinates!\");\r\n\t\t\t\t\te.printStackTrace();\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t}catch(Exception ex){\r\n\t\t\tex.printStackTrace();\r\n\t\t}\t\t\t\r\n\t\tlist_coords_objectid.add(list_coords);\r\n\t\tlist_coords_objectid.add(list_objectid);\r\n\t\treturn list_coords_objectid;//point.list_ofStrConsistingOf5CoordinatesForBoundingBox;\t\t\t\t\r\n\t}", "@Override\n\tpublic void onConnected(Bundle arg0) {\n\t\t Toast.makeText(context, \"Connected\", Toast.LENGTH_SHORT).show();\n\t\t mLocationClient.requestLocationUpdates(mLocationRequest,this);\n\t}", "private void sendRequestAPI(Double lat,Double lng, String places) {\n\n String origin = String.valueOf(lat) + \",\" + String.valueOf(lng);\n Geocoder geocoder = new Geocoder(getActivity(), Locale.getDefault());\n String destination = \"0,0\";\n String wayPoints = \"0,0\";\n\n switch (places) {\n case \"Family Walk\" :\n destination = formatCoordinates(6);\n wayPoints = formatCoordinates(4) + \"|\" + formatCoordinates(5);\n break;\n\n case \"Retro Tour\" :\n destination = formatCoordinates(9);\n wayPoints =formatCoordinates(7) + \"|\" + formatCoordinates(8);\n break;\n\n case \"Sports Tour\" :\n destination = formatCoordinates(11);\n wayPoints = formatCoordinates(9) + \"|\" + formatCoordinates(8);\n break;\n case \"custom\":\n destination = getActivity().getIntent().getStringExtra(\"destination\");\n wayPoints = getActivity().getIntent().getStringExtra(\"waypoints\");\n break;\n\n }\n //String destination = \"-27.494721,153.014262\";\n //String wayPoints = \"-27.498172, 153.013585\";\n try {\n\n new Directions(this, origin, destination, wayPoints).execute();\n Double latDes= Double.parseDouble(destination.split(\",\")[0]);\n Double lngDes= Double.parseDouble(destination.split(\",\")[1]);\n String [] points = wayPoints.split(Pattern.quote(\"|\")) ;\n\n if(wayPoints.equals(\"\")){\n\n }\n else{\n for(String point : points) {\n Double latPoint = Double.parseDouble((point.split(\",\")[0]));\n Double lngPoint = Double.parseDouble((point.split(\",\")[1]));\n List<Address> addressesPoint = geocoder.getFromLocation(latPoint, lngPoint, 1);\n wayPointsMarkers.add(mMap.addMarker(new MarkerOptions().title(addressesPoint.get(0).getAddressLine(0))\n .position(new LatLng(latPoint, lngPoint))));\n }\n }\n\n\n List<Address> addressesStart = geocoder.getFromLocation(lat, lng, 1);\n List<Address> addressesEnd = geocoder.getFromLocation(latDes,\n lngDes, 1);\n //originMarkers.add(mMap.addMarker(new MarkerOptions().title(addressesStart.get(0).getAddressLine(0))\n //.position(new LatLng(lat, lng))));\n destinationMarkers.add(mMap.addMarker((new MarkerOptions().title(addressesEnd.get(0).getAddressLine(0))\n .position(new LatLng(latDes, lngDes)))));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(latDes,\n lngDes), 16));\n\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onLocationChanged(Location location) {\n String myUrl = \"https://a.mapillary.com/v3/map_features?layers=trafficsigns\" +\n \"&radius=600\" +\n \"&client_id=YUNMM3lQRXRUR1Y0MDBwcEVLaFJsUTo2ZWFjY2Y0YWJhM2JmYmM5\" +\n \"&per_page=\" + numberOfResults +\n \"&closeto=\" + location.getLongitude() + \",\" + location.getLatitude();\n //String to place our result in\n String result = null;\n //Instantiate new instance of our class\n HttpGetRequest getRequest = new HttpGetRequest();\n //Perform the doInBackground method, passing in our url\n try {\n result = getRequest.execute(myUrl).get();\n } catch (InterruptedException e) {\n e.printStackTrace();\n } catch (ExecutionException e) {\n e.printStackTrace();\n }\n try {\n JSONObject jObject = new JSONObject(result);\n JSONArray features = jObject.getJSONArray(\"features\");\n for (int i=0; i < numberOfResults; i++){\n try {\n JSONObject featuresObject = features.getJSONObject(i);\n // Pulling items from the array\n JSONObject properties = featuresObject.getJSONObject(\"properties\");\n nearbyRoadSigns[i] = properties.getString(\"value\");\n\n System.out.println(nearbyRoadSigns[i]);\n\n } catch (JSONException e) {\n // Oops\n }\n }\n locationManager.removeUpdates(this);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "private void locationManager()\n\t{\n mMap.setMyLocationEnabled(true);\n\n // Getting LocationManager object from System Service LOCATION_SERVICE\n LocationManager locationManager = (LocationManager) getSystemService(LOCATION_SERVICE);\n\n // Creating a criteria object to retrieve provider\n Criteria criteria = new Criteria();\n\n // Getting the name of the best provider\n String provider = locationManager.getBestProvider(criteria, true);\n\n // Getting Current Location\n Location location = locationManager.getLastKnownLocation(provider);\n\n if(location!=null){\n onLocationChanged(location);\n }\n locationManager.requestLocationUpdates(provider, 20000, 0, this);\n\t\t\n\t}", "@Override\n public void onSuccess(Location location) {\n\n if (location != null) {\n // Logic to handle location object\n\n Geocoder gcd = new Geocoder(MainActivity.this, Locale.getDefault());\n List<Address> addresses = null;\n try {\n addresses = gcd.getFromLocation(location.getLatitude(), location.getLongitude(), 1);\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (addresses.size() > 0) {\n System.out.println(addresses.get(0).getLocality());\n sp.set(SPConstants.location,addresses.get(0).getLocality()+\", \"+addresses.get(0).getCountryName());\n }\n else {\n sp.set(SPConstants.location,\"\");\n\n // do your stuff\n }\n\n }\n }", "private void initLocationData() {\n\n // init google client and request for fused location provider\n fusedLocationProviderClient = LocationServices.getFusedLocationProviderClient(context);\n\n locationRequest = new LocationRequest()\n //.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY) // GPS quality location points\n .setPriority(LocationRequest.PRIORITY_BALANCED_POWER_ACCURACY) // optimized for battery\n .setInterval(20000) // at least once every 20 seconds\n .setFastestInterval(10000); // at most once every 10 seconds\n\n locationCallback = new LocationCallback() {\n @Override\n public void onLocationResult(LocationResult locationResult) {\n\n Point userPoint;\n if (locationResult != null) {\n // update user location\n Location lastLocation = locationResult.getLastLocation();\n userPoint = new Point(lastLocation.getLatitude(), lastLocation.getLongitude());\n // cache location\n PreferencesCache.setLastLatitude(lastLocation.getLatitude());\n PreferencesCache.setLastLongitude(lastLocation.getLongitude());\n } else {\n // get cached data\n userPoint = new Point(PreferencesCache.getLastLatitude(), PreferencesCache.getLastLongitude());\n }\n\n navigator.updateUserLocation(userPoint);\n }\n };\n }", "private void setupLocationProvider() {\n final LocationManager locManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);\n mGPSLocationProvider = new AppLocationProvider(locManager, LocationManager.GPS_PROVIDER, 1000L);\n mGPSLocationProvider.start();\n\n mActiveLocationProvider = new AppLocationProvider(locManager, LocationManager.NETWORK_PROVIDER, 1000L);\n mActiveLocationProvider.start();\n }", "private void reqquestGps() {\n builder = new LocationSettingsRequest.Builder();//mang di request\n builder.addLocationRequest(locationRequest);\n SettingsClient settingsClient = LocationServices.getSettingsClient(context);//dang tao 1 requet vao may va lasy ra thong so\n\n Task<LocationSettingsResponse> task = settingsClient.checkLocationSettings(builder.build());//day la lenh cua thu vien\n\n task.addOnFailureListener(new OnFailureListener() {//lang nghe su kien bi fai kho k lay dc gps,boi nnhieu nhie nghuyen nhan 1 co the la chua bat,\n @Override\n public void onFailure(@NonNull Exception e) {//requye\n if (e instanceof ResolvableApiException) {//chua bat\n ResolvableApiException resolvableApiException = (ResolvableApiException) e;//bat man hinh hien thi bat gps\n ((MainActivity) context).requestOpenGps(resolvableApiException);\n }\n }\n });\n }", "private void uploadToServer(String token, ContentProviderClient provider, List<PlaceVoteModel> records) {\n\n for (PlaceVoteModel obj : records) {\n DefaultHttpClient httpClient = new DefaultHttpClient();\n\n\n HttpGet httpGet = new HttpGet(\"http://192.168.42.217/vote-script/index.php/\" + \"?lat=\"+obj.latitude+\"&lon=\"+obj.longitude+\"&poi=\"+obj.poi_id+\"&ans=\"+obj.answer); /// link for webservice\n String responseString;\n\n try {\n HttpResponse response = httpClient.execute(httpGet);\n responseString = EntityUtils.toString(response.getEntity());\n } catch (Exception e) {\n ;\n }\n }\n }", "@Override\n public void onConnected(Bundle bundle) {\n Log.d(TAG, \"onConnected\");\n\n mLocationRequest = LocationRequest.create();\n mLocationRequest.setInterval(5000); // milliseconds\n mLocationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\n\n LocationServices.FusedLocationApi.requestLocationUpdates(mLocationClient, mLocationRequest, this);\n\n // connect to socket for upload\n mSocket.connect();\n }", "public void removeGeofencesButtonHandler() {\n if (!mGoogleApiClient.isConnected()) {\n Toast.makeText(mActivity, getString(R.string.not_connected), Toast.LENGTH_SHORT).show();\n return;\n }\n try {\n // Remove geofences.\n LocationServices.GeofencingApi.removeGeofences(\n mGoogleApiClient,\n // This is the same pending intent that was used in addGeofences().\n getGeofencePendingIntent()\n ).setResultCallback(this); // Result processed in onResult().\n } catch (SecurityException securityException) {\n // Catch exception generated if the app does not use ACCESS_FINE_LOCATION permission.\n logSecurityException(securityException);\n }\n }", "public void saveFenceInSqliteDB(String name, String address, String city, String province, Double lat, Double lng, String range, String number, String textSMS, int event) {\n boolean active = true; // default whan you add a geofence is active\n boolean match = false; // default whan you add a geofence is not in fence\n\n int id = Controller.insertFenceOnSQLiteDB(name, address, city, province, lat + \"\", lng + \"\", range, 1, number, textSMS, event);\n Fence f = new Fence(id, name, address, city, province, lat, lng, Float.parseFloat(range), active, match, number, textSMS, event);\n Controller.fences.add(f);\n Toast.makeText(this.getContext(), \"Added the fence: \" + f.getName() + \"!\", Toast.LENGTH_LONG).show();\n }", "@Override\n public void onGeoQueryReady() {\n if (!isAgentFound) {\n radius++;\n getNearestAgent();\n }\n }", "public void getNearbyPlaces(double Lat, double Long)\n {\n String type=\"\";\n if(mType=='E')\n type=\"Events/\";\n else if(mType=='G')\n type=\"Groups/\";\n\n final DatabaseReference placeRef= database.getReference(type+mEntityID+\"/places\");\n final GeoFire geoFire= new GeoFire(placeRef);\n\n double R=0.05;\n placesQuery = geoFire.queryAtLocation(new GeoLocation(Lat,Long),R);\n placesQuery.addGeoQueryEventListener(new GeoQueryEventListener() {\n\n double R=1.0;\n int count=0;\n @Override\n public void onKeyEntered(String key, GeoLocation location) {\n try {\n Toast.makeText(getContext(), key+\"added\", Toast.LENGTH_SHORT).show();\n }\n catch (Exception e)\n {\n\n }\n count++;\n }\n\n @Override\n public void onKeyExited(String key) {\n\n try {\n Toast.makeText(getContext(), key+\"removed\", Toast.LENGTH_SHORT).show();\n }\n catch (Exception e)\n {\n\n }\n\n count--;\n\n }\n\n @Override\n public void onKeyMoved(String key, GeoLocation location) {\n\n }\n\n @Override\n public void onGeoQueryReady() {\n\n placesQuery.removeAllListeners();\n\n /* if (count < 2 && R < 25) {\n R += 1;\n placesQuery.setRadius(R);\n try {\n Toast.makeText(getContext(),Double.toString(R),Toast.LENGTH_SHORT).show();\n }\n catch (Exception e)\n {\n\n }\n } else if (count > 20) {\n\n R-=1;\n placesQuery.setRadius(R);\n\n }\n */\n }\n\n @Override\n public void onGeoQueryError(DatabaseError error) {\n\n }\n });\n\n\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_maps);\n\n // Obtain the SupportMapFragment and get notified when the map is ready to be used.\n SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()\n .findFragmentById(R.id.map);\n mapFragment.getMapAsync(this);\n\n\n mGoogleApiClient = new GoogleApiClient.Builder(this)\n .addConnectionCallbacks(this)\n .addOnConnectionFailedListener(this)\n .addApi(LocationServices.API)\n .build();\n mGoogleApiClient.connect();\n\n }", "@Override\n public void onConnected(Bundle connectionHint) {\n LocationServices.FusedLocationApi.requestLocationUpdates(mGoogleApiClient, mLocationRequest,\n this);\n }", "@Override protected void onResume() {\n super.onResume();\n locationClient.connect();\n }", "public void requestLocation() {\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED\n && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) !=\n PackageManager.PERMISSION_GRANTED) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n requestPermissions(new String[]{Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION,\n Manifest.permission.INTERNET}, 12);\n }\n return;\n }\n //this line updates location\n mMap.setMyLocationEnabled(true);\n providerClient.requestLocationUpdates(locationRequest, locationCallback, getMainLooper());\n }", "@SuppressWarnings(\"MissingPermission\")\n private void initializeLocationLayer(){\n locationLayerPlugin = new LocationLayerPlugin(mapView,map,locationEngine);\n locationLayerPlugin.setLocationLayerEnabled(true);\n locationLayerPlugin.setCameraMode(CameraMode.TRACKING);\n locationLayerPlugin.setRenderMode(RenderMode.COMPASS);\n\n }", "private void addMarker(HashMap<String, GeofenceInfoContent[]> geofenceToAdd){\n System.gc();\n MainActivity mainActivity = (MainActivity) getActivity();\n\n for(Map.Entry<String, GeofenceInfoContent[]> e : geofenceToAdd.entrySet()){\n if(!currentGeofencesInfoMap.containsKey(e.getKey())) {\n currentGeofencesInfoMap.put(e.getKey(), e.getValue());\n geofenceNamesBeingQueriedForInfo.remove(e.getKey());\n String curGeofenceName = e.getKey();\n GeofenceObjectContent geofence = mainActivity.getGeofenceMonitor().curGeofencesMap.get(curGeofenceName);\n Bitmap markerIcon = BitmapFactory.decodeResource(getResources(), R.drawable.basic_map_marker);\n LatLng position = new LatLng(geofence.getGeofence().getLocation().getLat(), geofence.getGeofence().getLocation().getLng());\n BitmapDescriptor icon = BitmapDescriptorFactory.fromBitmap(markerIcon);\n MarkerOptions geofenceMarkerOptions = new MarkerOptions()\n .position(position)\n .title(curGeofenceName)\n .icon(icon);\n Marker curGeofenceMarker = mMap.addMarker(geofenceMarkerOptions);\n currentGeofenceMarkers.add(curGeofenceMarker);\n }\n }\n }", "protected synchronized void buildGoogleApiClient() {\n// mGoogleApiClient = new GoogleApiClient.Builder(this).addConnectionCallbacks(this).addOnConnectionFailedListener(this).addApi(LocationServices.API).build();\n mGoogleApiClient = new GoogleApiClient.Builder(this)\n .addConnectionCallbacks(this)\n .addOnConnectionFailedListener(this)\n //.addApi(Places.GEO_DATA_API)\n //.addApi(Places.PLACE_DETECTION_API)\n .addApi(LocationServices.API)\n .build();\n mGoogleApiClient.connect();\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_maps);\n // Obtain the SupportMapFragment and get notified when the map is ready to be used.\n MapFragment mapFragment = (MapFragment) getFragmentManager().findFragmentById(R.id.map);\n mapFragment.getMapAsync(this);\n\n int errorCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);\n if (errorCode != ConnectionResult.SUCCESS)\n GooglePlayServicesUtil.showErrorDialogFragment(errorCode, this, 111, this);\n else {\n spnMapType = (Spinner) findViewById(R.id.spinner1);\n chkTraffic = (CheckBox) findViewById(R.id.checkBox1);\n ArrayAdapter<String> adapter = new ArrayAdapter<>(this, android.R.layout.simple_spinner_dropdown_item, mapType);\n spnMapType.setAdapter(adapter);\n spnMapType.setOnItemSelectedListener(this);\n chkTraffic.setOnCheckedChangeListener(this);\n }\n\n // ATTENTION: This was auto-generated to implement the App Indexing API.\n // See https://g.co/AppIndexing/AndroidStudio for more information.\n client = new GoogleApiClient.Builder(this).addApi(LocationServices.API).build();//addApi參數:6AppIndex.API\n }", "private GeoApiContext getGeoContext(){\n\n GeoApiContext geoApiContext = new GeoApiContext();\n return geoApiContext.setQueryRateLimit(3).setApiKey(\"AIzaSyBUk43bX4UmObgrUZooRrsS-86PxSYelbU\")\n .setConnectTimeout(1, TimeUnit.SECONDS).setReadTimeout(1, TimeUnit.SECONDS)\n .setWriteTimeout(1, TimeUnit.SECONDS);\n }", "protected synchronized void buildGoogleApiClient() {\n GoogleApiClient mGoogleApiClient = new GoogleApiClient.Builder(getActivity()).addApi(LocationServices.API).build();\n mGoogleApiClient.connect();\n\n LocationRequest locationRequest = LocationRequest.create();\n mGoogleApiClient = new GoogleApiClient.Builder(getActivity())\n .addConnectionCallbacks(new GoogleApiClient.ConnectionCallbacks() {\n @Override\n public void onConnected(@Nullable Bundle bundle) {\n if (ActivityCompat.checkSelfPermission(getApplicationContext(), Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n mFusedLocationClient.getLastLocation().addOnSuccessListener(new OnSuccessListener<Location>() {\n @Override\n public void onSuccess(Location location) {\n if (location!=null){\n LatLng loc = new LatLng(location.getLatitude(), location.getLongitude());\n strLatitude = String.valueOf(location.getLatitude());\n strLongitude = String.valueOf(location.getLongitude());\n //mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(loc, 16.0f));\n }\n }\n });\n }\n }\n\n @Override\n public void onConnectionSuspended(int i) {\n //LOG\n }\n })\n .addApi(LocationServices.API)\n .build();\n }", "private void setupGeoAndRetailerService() {\n final GeoLocationUtil geoLocationUtil = new GeoLocationUtil();\n final GeoLocationUtil.LocationResult geoLocationResult = new GeoLocationUtil.LocationResult() {\n @Override\n public void gotLocation(final Location location) {\n new Thread()\n {\n public void run()\n {\n mCenterActivity.runOnUiThread(new Runnable()\n {\n public void run()\n {\n //Do your UI operations like dialog opening or Toast here\n if (location != null) {\n Constants.GEO_LATITUDE = String.valueOf(location.getLatitude());\n Constants.GEO_LONGITUDE = String.valueOf(location.getLongitude());\n setupServiceReceiver();\n mServiceIntent = new Intent(getActivity(), GettingRetailerListService.class);\n mServiceIntent.putExtra(\"gettingStatus\", true);\n mServiceIntent.putExtra(\"receiver\", mReceiverForRetailer);\n getActivity().startService(mServiceIntent);\n } else {\n// new Handler(Looper.getMainLooper()).post(new Runnable() {\n// @Override\n// public void run() {\n Toast.makeText(getActivity(), \"Geo service is not working\", Toast.LENGTH_SHORT).show();\n\n// }\n// });\n\n }\n }\n });\n }\n }.start();\n }\n };\n\n if (!geoLocationUtil.getLocation(getActivity(), geoLocationResult)) {\n Toast.makeText(getActivity(), \"Geo service is not working\", Toast.LENGTH_SHORT).show();\n }\n\n\n }", "public static boolean addNew(GeoPoint position, String text) {\n DefaultHttpClient client = new DefaultHttpClient();\n \n /* Add the Authentication Details if we have a username in the Preferences */\n if (!Settings.OpenstreetmapNotes.getUsername().equals(\"\")) {\n client.getCredentialsProvider().setCredentials(AuthScope.ANY,\n new UsernamePasswordCredentials(Settings.OpenstreetmapNotes.getUsername(),\n Settings.OpenstreetmapNotes.getPassword()));\n }\n \n /* Add all Arguments */\n ArrayList<NameValuePair> arguments = new ArrayList<NameValuePair>();\n \n arguments.add(new BasicNameValuePair(\"key\", Settings.Mapdust.getApiKey()));\n arguments.add(new BasicNameValuePair(\"coordinates\",\n String.valueOf(position.getLongitudeE6() / 1000000.0) + \",\"\n + String.valueOf(position.getLatitudeE6() / 1000000.0)));\n arguments.add(new BasicNameValuePair(\"description\", text));\n arguments.add(new BasicNameValuePair(\"type\", \"other\"));\n arguments.add(new BasicNameValuePair(\"nickname\", Settings.Mapdust.getUsername()));\n \n HttpPost request;\n if (Settings.DEBUG)\n request =\n new HttpPost(\"http://st.www.mapdust.com/api/addBug?\"\n + URLEncodedUtils.format(arguments, \"utf-8\"));\n else\n request =\n new HttpPost(\"http://www.mapdust.com/api/addBug?\"\n + URLEncodedUtils.format(arguments, \"utf-8\"));\n \n try {\n /* Execute commit */\n HttpResponse response = client.execute(request);\n \n /* Check result for Success */\n /* Mapdust returns 201 for addBug as Success */\n if (response.getStatusLine().getStatusCode() != 201)\n return false;\n }\n catch (ClientProtocolException e) {\n e.printStackTrace();\n return false;\n }\n catch (IOException e) {\n e.printStackTrace();\n return false;\n }\n \n return true;\n }", "@Override\n public void handleNewGeofences(GeofenceObjectContent[] geofencesContent){\n /*This is a call from the VolleyRequester, so this check prevents the app from\n crashing if the user leaves the tab while the app is trying\n to get quests from the server\n */\n MainActivity mainActivity = (MainActivity) getActivity();\n if(mainActivity == null){\n return;\n }\n try {\n Button btnRequestGeofences = (Button) view.findViewById(R.id.btn_request_geofences);\n TextView txtRequestGeofences = (TextView) view.findViewById(txt_try_getting_geofences);\n Log.i(logMessages.GEOFENCE_MONITORING, \"HistoryFragment : handleNewGeofences\");\n if (mainActivity != null) {\n Log.i(logMessages.GEOFENCE_MONITORING, \"HistoryFragment : mainActivity not null\");\n if (geofencesContent != null) {\n Log.i(logMessages.GEOFENCE_MONITORING, \"HistoryFragment : geofencesContent not null\");\n btnRequestGeofences.setVisibility(View.GONE);\n txtRequestGeofences.setVisibility(View.GONE);\n mainActivity.getGeofenceMonitor().handleNewGeofences(geofencesContent);\n drawGeofences(geofencesContent);\n } else if (mainActivity.getGeofenceMonitor().allGeopointsByName.size() == 0 || geofencesContent == null){\n btnRequestGeofences.setVisibility(View.VISIBLE);\n txtRequestGeofences.setText(getResources().getString(R.string.no_geofences_retrieved));\n txtRequestGeofences.setVisibility(View.VISIBLE);\n }\n }\n }catch (IllegalStateException e){\n e.printStackTrace();\n }\n }", "private void setupAddLocation() {\n GoogleApiAvailability apiAvailability = GoogleApiAvailability.getInstance();\n int resultCode = apiAvailability.isGooglePlayServicesAvailable(this);\n if (resultCode != ConnectionResult.SUCCESS) {\n // remove add location linear\n mAddLocationLinear.setVisibility(View.INVISIBLE);\n }\n\n }", "void beginGeoField();", "@SuppressLint(\"MissingPermission\")\n private void requestNewLocationData() {\n LocationRequest mLocationRequest = new LocationRequest();\n mLocationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\n mLocationRequest.setInterval(5);\n mLocationRequest.setFastestInterval(0);\n mLocationRequest.setNumUpdates(1);\n\n // setting LocationRequest\n // on FusedLocationClient\n mFusedLocationClient = LocationServices.getFusedLocationProviderClient(this);\n mFusedLocationClient.requestLocationUpdates(mLocationRequest, mLocationCallback, Looper.myLooper());\n }", "@SuppressLint(\"MissingPermission\")\n private void requestNewLocationData() {\n LocationRequest mLocationRequest = new LocationRequest();\n mLocationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\n mLocationRequest.setInterval(5);\n mLocationRequest.setFastestInterval(0);\n mLocationRequest.setNumUpdates(1);\n\n // setting LocationRequest\n // on FusedLocationClient\n mFusedLocationClient = LocationServices.getFusedLocationProviderClient(this);\n mFusedLocationClient.requestLocationUpdates(mLocationRequest, mLocationCallback, Looper.myLooper());\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_maps);\n\n// mGeoDataClient = Places.getGeoDataClient(this, null);\n//\n// mPlaceDetectionClient = Places.getPlaceDetectionClient(this, null);\n//\n// mFusedLocationProviderClient = LocationServices.getFusedLocationProviderClient(this);\n\n setUpMap();\n }", "private void handleGeofenceTransition(Context context, Intent intent) {\n \tString[] ids = (String[])intent.getExtras().get(ClientSideUtils.EXTRA_GEOFENCES_TRANSITION_IDS);\n \tint transitionType = intent.getIntExtra(ClientSideUtils.EXTRA_GEOFENCES_TRANSITION_TYPE, -1);\n \t\n \tboolean hasRootGeofenceTransition = false;\n \tfor (String id : ids){\n \t\tif (id.equals(ClientSideUtils.RootGeofenceId)){\n \t\t\thasRootGeofenceTransition = true;\n \t\t}\n \t}\n \t\n \t// TODO if both root and sons in ids DO SOMETHING\n \t\n \tif (transitionType == Geofence.GEOFENCE_TRANSITION_ENTER) {\n \t\tif (hasRootGeofenceTransition){\n \t\t\taddItemToListView(\"Entered: \" + ClientSideUtils.RootGeofenceId);\n \t\t\tmSonGeofencesList = new ArrayList<Geofence>();\n \t\t\tfor (LotGeofence lotGeofence : mLotsDb.mSonLotGeofencesList){\n \t\t\tmSonGeofencesList.add(lotGeofence.toGeofenceObject());\n \t\t\tmCurrentGeofenceList.add(lotGeofence.toGeofenceObject());\n \t\t\t}\n\t\t \tmGeofenceRequestType = ClientSideUtils.GEOFENCE_REQUEST_TYPE.ADD;\n\t\t try{\n\t\t \t\tmGeofenceRequester.addGeofences(mSonGeofencesList);\n\t\t \t} catch(UnsupportedOperationException e){\n\t\t \t\tLog.d(ClientSideUtils.APPTAG, \"In progress on adding geofences again\");\n\t\t \t}\n\t\t if (!MOCKUP_MODE){\n\t\t \tstartActivityRecognition();// <----- Starting Activity Recognition Here\n\t\t }\n \t\t}else{\n \t\t\tfor (String id : ids){\n \t\t\t\tenteredParkingLot(id);\n \t\t\t}\n \t\t}\n\n \t}else if (transitionType == Geofence.GEOFENCE_TRANSITION_EXIT) {\n \t\tif (hasRootGeofenceTransition){\n \t\t\taddItemToListView(\"Exited: \" + ClientSideUtils.RootGeofenceId);\n \t\t\tmGeofenceRemoveType = ClientSideUtils.GEOFENCE_REMOVE_TYPE.LIST;\n \t\t\tremoveCurrentGeofecesByID(mSonGeofencesList);\n \t\t\t\n \t\t\tmCurrentGeofenceList = new ArrayList<Geofence>();\n \t\t\tmCurrentGeofenceList.add(mLotsDb.mRootLotGeofence.toGeofenceObject());\n \t\t\t\n \t\t\tstopActivityRecognition(); // <----- Stopping Activity Recognition Here\n \t\t}else{\n \t\t\tfor (String id : ids){\n \t\t\t\texitedParkingLot(id);\n \t\t\t}\n \t\t}\n \t}else{\n \t\tLog.e(ClientSideUtils.APPTAG, \"Entered Geofence action handling, the type was not ENTERED nor EXITED\");\n \t}\n }", "@Override\n protected Void doInBackground(Void... voids) {\n\n\n Geocoder gc = new Geocoder(MainActivity.this);\n\n Log.d(\"florianBurel\", \"gc - isPresent : \" + (gc.isPresent() ? \"YES\" : \"NO\"));\n\n try {\n List<Address> addresses = gc.getFromLocation(lastKnownLocation.getLatitude(), lastKnownLocation.getLongitude(), 1);\n\n Log.d(\"florianBurel\", addresses.size() + \" addresses found\");\n\n //city.setName(addresses.get(0).getLocality());\n\n } catch (IOException e) {\n city.setName(\"Unknown Location\");\n }\n\n\n\n\n return null;\n }" ]
[ "0.71093076", "0.69676983", "0.6831948", "0.6789556", "0.667242", "0.6602345", "0.6595952", "0.6484569", "0.6301139", "0.62935245", "0.6228382", "0.61296284", "0.60874766", "0.6083096", "0.60516536", "0.59599656", "0.58913594", "0.5865364", "0.5820707", "0.5799199", "0.5795247", "0.57674164", "0.5765123", "0.5739862", "0.5732876", "0.5724635", "0.57072574", "0.5703098", "0.5700589", "0.56949186", "0.56949115", "0.568075", "0.5670119", "0.5668268", "0.56507516", "0.5623554", "0.5621787", "0.562149", "0.56210226", "0.56208515", "0.56054235", "0.55594546", "0.5531081", "0.55298865", "0.5525191", "0.55249286", "0.55231136", "0.5500876", "0.54897934", "0.5489427", "0.54849654", "0.54829454", "0.54712677", "0.5458975", "0.5458975", "0.5455065", "0.5439616", "0.5435851", "0.5433664", "0.542986", "0.5429669", "0.5427588", "0.54273885", "0.5423441", "0.54157907", "0.5413338", "0.54064393", "0.5390135", "0.53859717", "0.5384634", "0.538138", "0.5377999", "0.5376016", "0.53735334", "0.53687084", "0.536402", "0.5350508", "0.53428435", "0.533927", "0.53368425", "0.5335734", "0.5322472", "0.5311677", "0.5307562", "0.5302745", "0.5301509", "0.52947295", "0.5291315", "0.52795047", "0.5278225", "0.5274127", "0.5257826", "0.52517384", "0.524726", "0.52378976", "0.5231418", "0.5231418", "0.522945", "0.52280647", "0.5227779" ]
0.67051905
4
read the query from the user into queryString variable call the parseQuery method and pass the queryString variable as a parameter
public static void main(String[] args) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings(\"null\")\n\tpublic QueryParameter parseQuery(String queryString) {\n\t\t\n/*\n\t\t * extract the name of the file from the query. File name can be found after the\n\t\t * \"from\" clause.\n\t\t */\n\n\t\t/*\n\t\t * extract the order by fields from the query string. Please note that we will\n\t\t * need to extract the field(s) after \"order by\" clause in the query, if at all\n\t\t * the order by clause exists. For eg: select city,winner,team1,team2 from\n\t\t * data/ipl.csv order by city from the query mentioned above, we need to extract\n\t\t * \"city\". Please note that we can have more than one order by fields.\n\t\t */\n\n\t\t/*\n\t\t * extract the group by fields from the query string. Please note that we will\n\t\t * need to extract the field(s) after \"group by\" clause in the query, if at all\n\t\t * the group by clause exists. For eg: select city,max(win_by_runs) from\n\t\t * data/ipl.csv group by city from the query mentioned above, we need to extract\n\t\t * \"city\". Please note that we can have more than one group by fields.\n\t\t */\n\n\t\t /*\n\t\t * extract the selected fields from the query string. Please note that we will\n\t\t * need to extract the field(s) after \"select\" clause followed by a space from\n\t\t * the query string. For eg: select city,win_by_runs from data/ipl.csv from the\n\t\t * query mentioned above, we need to extract \"city\" and \"win_by_runs\". Please\n\t\t * note that we might have a field containing name \"from_date\" or \"from_hrs\".\n\t\t * Hence, consider this while parsing.\n\t\t */\n\n\t\t/*\n\t\t * extract the conditions from the query string(if exists). for each condition,\n\t\t * we need to capture the following: 1. Name of field 2. condition 3. value\n\t\t * \n\t\t * For eg: select city,winner,team1,team2,player_of_match from data/ipl.csv\n\t\t * where season >= 2008 or toss_decision != bat\n\t\t * \n\t\t * here, for the first condition, \"season>=2008\" we need to capture: 1. Name of\n\t\t * field: season 2. condition: >= 3. value: 2008\n\t\t * \n\t\t * the query might contain multiple conditions separated by OR/AND operators.\n\t\t * Please consider this while parsing the conditions.\n\t\t * \n\t\t */\n\n\t\t /*\n\t\t * extract the logical operators(AND/OR) from the query, if at all it is\n\t\t * present. For eg: select city,winner,team1,team2,player_of_match from\n\t\t * data/ipl.csv where season >= 2008 or toss_decision != bat and city =\n\t\t * bangalore\n\t\t * \n\t\t * the query mentioned above in the example should return a List of Strings\n\t\t * containing [or,and]\n\t\t */\n\n\t\t/*\n\t\t * extract the aggregate functions from the query. The presence of the aggregate\n\t\t * functions can determined if we have either \"min\" or \"max\" or \"sum\" or \"count\"\n\t\t * or \"avg\" followed by opening braces\"(\" after \"select\" clause in the query\n\t\t * string. in case it is present, then we will have to extract the same. For\n\t\t * each aggregate functions, we need to know the following: 1. type of aggregate\n\t\t * function(min/max/count/sum/avg) 2. field on which the aggregate function is\n\t\t * being applied\n\t\t * \n\t\t * Please note that more than one aggregate function can be present in a query\n\t\t * \n\t\t * \n\t\t */\n\n\t\tString file = null;\n\t\tList<Restriction> restrictions = new ArrayList<Restriction>();\n\t\tList<String> logicalOperators = new ArrayList<String>();\n\t\tList<String> fields = new ArrayList<String>();;\n\t\tList<AggregateFunction> aggregateFunction = new ArrayList<AggregateFunction>();\n\t\tList<String> groupByFields = new ArrayList<String>();;\n\t\tList<String> orderByFields = new ArrayList<String>();;\n\t\tString baseQuery=null;\n\t\n\t\tfile = getFile(queryString);\n\n\t\t\n\t\tString[] conditions = getConditions(queryString);\n\t\tif(conditions!=null) {\n\t\tRestriction[] restriction = new Restriction[conditions.length];\n\t\t\n\t\tfor (int i = 0; i < conditions.length; i++) {\n\t\t\trestriction[i] = new Restriction();\n\t\t\t\n\t\t\tString operator=null;\n\t\t\tString value=null;\n\t\t\tString property=null;\n\t\t\t if(conditions[i].contains(\"<=\")) {\n\t\t\t\tString[] split = conditions[i].split(\"<=\");\n\t\t\t\toperator=\"<=\";\n\t\t\t\t value=split[1].trim();\n\t\t\t\t property=split[0].trim();\n\t\t\t\t\n\t\t\t}\n\t\t\telse if(conditions[i].contains(\">=\")) {\n\t\t\t\tString[] split = conditions[i].split(\">=\");\n\t\t\t\toperator=\">=\";\n\t\t\t\t value=split[1].trim();\n\t\t\t\t property=split[0].trim();\n\t\t\t\t\n\t\t\t}\n\t\t\telse if(conditions[i].contains(\">\")) {\n\t\t\t\tString[] split = conditions[i].split(\">\");\n\t\t\t\toperator=\">\";\n\t\t\t\t value=split[1].trim();\n\t\t\t\t property=split[0].trim();\n\t\t\t}\n\t\t\telse if(conditions[i].contains(\"!=\")) {\n\t\t\t\tString[] split = conditions[i].split(\"!=\");\n\t\t\t\toperator=\"!=\";\n\t\t\t\t value=split[1].trim();\n\t\t\t\t property=split[0].trim();\n\t\t\t}\n\t\t\telse if(conditions[i].contains(\"=\")) {\n\t\t\t\tString[] split = conditions[i].split(\"=\");\n\t\t\t\toperator=\"=\";\n\t\t\t\t value=split[1].trim();\n\t\t\t\t property=split[0].trim();\n\t\t\t\t if(value.contains(\"'\")) {\n\t\t\t\t\t value= value.replaceAll(\"'\",\"\").trim();\n\t\t\t\t }\n\t\t\t\t\n\t\t\t}\n\t\t\telse if(conditions[i].contains(\"<\")) {\n\t\t\t\tString[] split = conditions[i].split(\"<\");\n\t\t\t\toperator=\"<\";\n\t\t\t\t value=split[1].trim();\n\t\t\t\t property=split[0].trim();\n\t\t\t}\n\t\t\t \n\t\t\t\n\t\t\trestriction[i].setCondition(operator);\n\t\t\trestriction[i].setPropertyName(property);\n\t\t\trestriction[i].setPropertyValue(value);\n\t\t\trestrictions.add(restriction[i]);\n\n\t\t}\n\t\t}\n\t\n\t\tString[] operators = getLogicalOperators(queryString);\n\t\tif(operators!=null) {\n\t\tfor (String op : operators) {\n\t\t\tlogicalOperators.add(op);\n\t\t}\n\t\t}\n\t\t\n\t\tString[] filds = getFields(queryString);\n\t\tif(filds!=null) {\n\t\tfor (String field : filds) {\n\t\t\tfields.add(field);\n\t\t}\n\t\t}\n\t\t\n\t\tString[] aggregationVal = getAggregateFunctions(queryString);\n\t\tif(aggregationVal!=null) {\n\t\tAggregateFunction[] aggregation = new AggregateFunction[aggregationVal.length];\n\t\tfor (int i = 0; i < aggregationVal.length; i++) {\n\t\t\taggregation[i] = new AggregateFunction();\n\t\t\tString[] split = (aggregationVal[i].replace(\"(\", \" \")).split(\" \");\n\t\t\tSystem.out.println(split[0]);\n\t\t\tSystem.out.println(split[1].replace(\")\", \"\").trim());\n\t\t\t\n\t\t\taggregation[i].setFunction(split[0]);\n\t\t\taggregation[i].setField(split[1].replace(\")\", \"\").trim());\n\t\t\taggregateFunction.add(aggregation[i]);\n\n\t\t}\n\t\t}\n\t\t\n\t\t\t\n\t\t\n\t\tString[] groupBy = getGroupByFields(queryString);\n\t\tif(groupBy!=null) {\n\t\tfor (String group : groupBy) {\n\t\t\tgroupByFields.add(group);\n\t\t}\n\t\t}\n\t\n\t\tString[] orderBy = getOrderByFields(queryString);\n\t\tif(orderBy!=null) {\n\t\tfor (String order : orderBy) {\n\t\t\torderByFields.add(order);\n\t\t}\n\t\t}\n\t\tqueryParameter.setFile(file);\n\t\tif(restrictions.size()!=0) {\n\t\t\tqueryParameter.setRestrictions(restrictions);\n\t\t}\n\t\telse {\n\t\t\tqueryParameter.setRestrictions(null);\n\t\t}\n\t\tif(logicalOperators.size()!=0) {\n\t\tqueryParameter.setLogicalOperators(logicalOperators);\n\t\t}\n\t\telse {\n\t\t\tqueryParameter.setLogicalOperators(null);\n\t\t}\n\t\tbaseQuery=getBaseQuery(queryString);\n\t\t\n\t\tqueryParameter.setFields(fields);\n\t\tqueryParameter.setAggregateFunctions(aggregateFunction);\n\t\tqueryParameter.setGroupByFields(groupByFields);\n\t\tqueryParameter.setOrderByFields(orderByFields);\n\t\tqueryParameter.setBaseQuery(baseQuery.trim());\n\t\treturn queryParameter;\n\n\t}", "public void parseQuery(String queryString) {\r\n\t\t// call the methods\r\n\t\tgetSplitStrings(queryString);\r\n\t\tgetFile(queryString);\r\n\t\tgetBaseQuery(queryString);\r\n\t\tgetConditionsPartQuery(queryString);\r\n\t\tgetConditions(queryString);\r\n\t\tgetLogicalOperators(queryString);\r\n\t\tgetFields(queryString);\r\n\t\tgetOrderByFields(queryString);\r\n\t\tgetGroupByFields(queryString);\r\n\t\tgetAggregateFunctions(queryString);\r\n\t}", "String processQuery(String query);", "java.lang.String getQuery();", "java.lang.String getQuery();", "String getQuery();", "String query();", "public static void parseQueryString(String queryString) {\n Pattern pattern = Pattern.compile(\".+\\\\bfrom\\\\b\\\\s+(\\\\w+)\");\n Matcher matcher = pattern.matcher(queryString);\n if(matcher.find()){\n \t//System.out.println(\"got it\");\n \tString tableName = matcher.group(1);\n \t//System.out.println(\"Table Name\"+tableName);\n \tString fileName = \"data/user_data/\"+tableName+\".tbl\";\n \tUserDataHandler table = new UserDataHandler(fileName);;\n table.displayTable(fileName, tableName);\n }\n }", "public void parseArguments(String queryString) {\n parseArguments(queryString, null);\n }", "public void parseArguments(String queryString) {\n parseArguments(queryString, null);\n }", "public Query(String queryString) {\n parseQuery(queryString);\n }", "public static void parseQueryString(String queryString) {\n\n System.out.println(\"STUB: Calling parseQueryString(String s) to process queries\");\n System.out.println(\"Parsing the string:\\\"\" + queryString + \"\\\"\");\n queryString = queryString.toLowerCase();\n String colName = queryString.substring(0,queryString.indexOf(\"from\")+5).trim();\n String colNames[] = removeWhiteSpacesInArray(colName.split(\" \"));\n ArrayList<String> queryStringList = new ArrayList<String>(Arrays.asList(colNames));\n queryStringList.remove(\"select\");\n queryStringList.remove(\"from\");\n String condition = \"\";\n String keyValueCond[] = new String[]{};\n String tableName = \"\";\n if(queryString.contains(\"where\")) {\n tableName = queryString.substring(queryString.indexOf(\"from\") + 5, queryString.indexOf(\"where\")).trim();\n condition = queryString.substring(queryString.indexOf(\"where\")+6, queryString.length()).trim();\n keyValueCond = removeWhiteSpacesInArray(condition.split(\" \"));\n }else\n tableName = queryString.substring(queryString.indexOf(\"from\")+5).trim();\n try {\n Table table = new Table(tableName.concat(\".tbl\"));\n int noOfRecords = table.page.getNoOfRecords();\n long pos = table.page.getStartofContent();\n TreeMap<String, String> colOrder = columnOrdinalHelper.getColumnsInOrdinalPositionOrder(tableName);\n int recordLength = Integer.parseInt(recordLengthHelper.getProperties(tableName.concat(\".\").concat(Constant.recordLength)));\n if(keyValueCond.length>0){\n\n }else{\n Iterator it = colOrder.entrySet().iterator();\n while (it.hasNext()){\n Map.Entry<String, String> entryPair = (Map.Entry<String, String>) it.next();\n// ReadResult<Object> readResult = table.page.readIntasByte(pos);\n// System.out.println(readResult.getT());\n ReadResult<Object> readResult = RecordFormat.readRecordFormat(columnTypeHelper.getProperties(entryPair.getValue()),table,pos);\n System.out.println(\"RESULT COLUMN NAME : \"+entryPair.getValue()+\" Value : \"+readResult.getT());\n\n }\n\n }\n\n\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "public abstract String createQuery();", "String getQueryString ();", "public Query( String queryString ) {\r\n\tStringTokenizer tok = new StringTokenizer( queryString );\r\n\twhile ( tok.hasMoreTokens() ) {\r\n\t terms.add( tok.nextToken() );\r\n\t weights.add( new Double(1) );\r\n\t} \r\n }", "protected String getQuery(String query) {\r\n\t\treturn query;\r\n\t}", "private String getQueryStringFromParser() {\n return (getString() == null) ? \"\" : getString();\n }", "public void setQueryString(String queryString){\n this.queryString = queryString;\n }", "public void setQuery(String query) {\n this.stringQuery = query;\n }", "public void setQuery (String q)\n\t throws QueryParseException\n {\n\n\tthis.q = new Query ();\n\tthis.q.parse (q);\n\n\tthis.badQuery = false;\n\tthis.exp = null;\n\n\tthis.checkFrom ();\n\n }", "Query createQuery(final String query);", "static String qs(String query) {\n\t\tif (StringUtils.isBlank(query) || \"*\".equals(query.trim())) {\n\t\t\treturn \"*\";\n\t\t}\n\t\tquery = query.trim();\n\t\tif (query.length() > 1 && query.startsWith(\"*\")) {\n\t\t\tquery = query.substring(1);\n\t\t}\n\t\ttry {\n\t\t\tStandardQueryParser parser = new StandardQueryParser();\n\t\t\tparser.setAllowLeadingWildcard(false);\n\t\t\tparser.parse(query, \"\");\n\t\t} catch (Exception ex) {\n\t\t\tlogger.warn(\"Failed to parse query string '{}'.\", query);\n\t\t\tquery = \"*\";\n\t\t}\n\t\treturn query.trim();\n\t}", "@Override\n public String getQueryString() {\n return queryString;\n }", "void setQueryString (String string);", "private static String getQuery(String query) {\n\t\tScanner reader = new Scanner(System.in);\n\t\tString state = \"\";\n\t\twhile (true) {\n\t\t\tSystem.out.println(\"Please Type in a \" + query + \":\");\n\t\t\ttry {\n\t\t\t\tstate = reader.nextLine();\n\t\t\t\treturn state;\n\t\t\t} catch (InputMismatchException e) {\n\t\t\t\tSystem.out.println(\"Invalid Input\");\n\t\t\t}\n\t\t}\n\t}", "public void setQuery(java.lang.String query) {\r\n this.query = query;\r\n }", "public QueryCore(String query)\n {\n this.query = query;\n }", "public void setQueryString(String queryString) {\n this.queryString = queryString;\n }", "@Override\n public void parse(\n ParserProto.ParserRequest request,\n StreamObserver<ParserProto.ParserResponse> responseObserver) {\n\n String q = request.getQuery();\n int epos = -1; // Don't use query.length(), use -1.\n String err = \"\";\n\n try {\n ParseDriver pd = new ParseDriver();\n ASTNode node = pd.parse(q);\n\n } catch (ParseException e) {\n try {\n Field errorsField = ParseException.class.getDeclaredField(\"errors\");\n errorsField.setAccessible(true);\n ArrayList<ParseError> errors = (ArrayList<ParseError>) errorsField.get(e);\n Field reField = ParseError.class.getDeclaredField(\"re\");\n reField.setAccessible(true);\n RecognitionException re = (RecognitionException) reField.get(errors.get(0));\n epos = ParserServer.posToIndex(q, re.line, re.charPositionInLine);\n } catch (Exception all) {\n err = \"Cannot parse the error message from HiveQL parser\";\n }\n\n if (err == \"\") {\n try {\n ParseDriver pd = new ParseDriver();\n ASTNode node = pd.parse(q);\n } catch (ParseException ee) {\n err = ee.getMessage();\n }\n }\n }\n\n responseObserver.onNext(\n ParserProto.ParserResponse.newBuilder().setIndex(epos).setError(err).build());\n responseObserver.onCompleted();\n }", "public static void testQuery() {\n\t\tParameters parameters = new Parameters();\r\n\t\tparameters.setUrl(\"VchicleServlet.json?action=pagequery\");\r\n\t\tparameters.setList(new ArrayList<NameValuePair>());\r\n\t\tparameters.getList().add(new BasicNameValuePair(\"pageSize\", \"2\"));\r\n\t\tparameters.getList().add(new BasicNameValuePair(\"currPage\", \"3\"));\r\n\t\t@SuppressWarnings(\"unused\")\r\n\t\tString string = (String) MainUtilityTools.execute(parameters);\r\n\t}", "public void setQuery(String query) {\n this.query = query;\n }", "public void setQuery(String query) {\n this.query = query;\n }", "public void parseQueryStringAndSearch(String searchString) {\n char[] chars = searchString.toCharArray();\n for (int i = 0; i < chars.length; i++) {\n Queue<Character> queue;\n int k;\n if (Character.isDigit(chars[i])) {\n k = Integer.parseInt(String.valueOf(chars[i]));\n i++;\n queue = new LinkedList<>();\n while (i < chars.length && chars[i] != ')') {\n queue.add(chars[i]);\n i++;\n }\n i++;\n String query = queryToString(queue);\n String[] terms = query.split(\" \");\n //System.out.println(query + \" and k: \" + k);\n positionIntersects(indexMap.get(analyzeTerm(terms[0])), indexMap.get(analyzeTerm(terms[1])), k);\n } else {\n queue = new LinkedList<>();\n while (i < chars.length && !Character.isDigit(chars[i])) {\n queue.add(chars[i]);\n i++;\n }\n i--;\n String query = queryToString(queue);\n String[] terms = query.trim().split(\" \");\n termQuerySearch(terms);\n }\n\n }\n\n }", "public abstract List createQuery(String query);", "protected SelectQuery getQuery(final String query) {\n\t\treturn queryFactory.parseQuery(query);\n\t}", "public String getQueryString() {\n return _query;\n }", "public void setQuery(java.lang.CharSequence value) {\n this.query = value;\n }", "String getAskQuery(String... args);", "public void setQueryString(String queryString) {\r\n\t\tLOG.info(DOLLAR + INSIDE_METHOD + DOLLAR);\r\n\t\tthis.queryString = queryString;\r\n\t\tLOG.info(DOLLAR + OUTSIDE_METHOD + DOLLAR);\r\n\t}", "public void setQuery(String query) {\n this.query = Optional.ofNullable(query);\n }", "private SearchQuery(String _query, WebSearchType webSearchType) {\n this._query = _query;\n this._Web_search = webSearchType;\n }", "private static String getInputQuery() throws IOException {\n\n String inputQuery = \"\";\n\n System.out.print(\"Please enter a search term: \");\n BufferedReader bReader = new BufferedReader(new InputStreamReader(System.in));\n inputQuery = bReader.readLine();\n\n if (inputQuery.length() < 1) {\n // Use the string \"YouTube Developers Live\" as a default.\n inputQuery = \"YouTube Developers Live\";\n }\n return inputQuery;\n }", "public String getQuery(){\n return this.query;\n }", "CampusSearchQuery generateQuery();", "String getQuery() throws RemoteException;", "Boolean callAskQuery(String name, Map<String, String> params);", "public String getQueryString() {\n return queryString;\n }", "private Tuple<String,String> extractQueryAndQueryExecution(String query){\n\t\tString[] elements = query.split(\"--\");\n\t\treturn new Tuple<String,String>(elements[0].trim(), elements[1].trim());\n\t}", "public static Query parse(String userQuery, String defaultOperator) {\n\n\t\ttry\n\t\t{\n\t\t\tif(userQuery != null && !\"\".equals(userQuery))\n\t\t\t{\n\t\t\t\treturn new Query(new QueryEvaluators(userQuery.trim(), defaultOperator));\n\t\t\t}\n\t\t\telse\n\t\t\t\tthrow new QueryParserException();\n\t\t}\n\t\tcatch(QueryParserException e) //QueryParserException -- Need to define.?\n\t\t{\n\t\t\te.printStackTrace(); \n\t\t}\n\t\treturn null;\n\t}", "public void setQueryString(String query) {\n if (query != null && _convertPositionalParametersToNamed && JPQLParser.LANG_JPQL.equals(_language)) {\n query = query.replaceAll(\"[\\\\?]\", \"\\\\:_\");\n }\n _query = query;\n }", "public String getQueryString(){\n return this.queryString;\n }", "public java.lang.String getQuery() {\r\n return query;\r\n }", "public void query()\n\t{\n\t\tJSONObject queryInfo = new JSONObject();\n\t\t\n\t\ttry\n\t\t{\n\t\t\tqueryInfo.put(\"type\", \"query\");\n\t\t\t\n\t\t\tos.println(queryInfo.toString());\n\t\t\tos.flush();\n\t\t\t\n\t\t\tSystem.out.println(\"send query request : \" + queryInfo.toString());\n\t\t}\n\t\tcatch (JSONException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public String getQueryString() {\n return m_queryString;\n }", "public String getQuery() {\r\n return query;\r\n }", "public void createQuery(String s) throws HibException;", "public void parseUserQuery(String userQuery) {\n\t\tuserQuery = userQuery.toUpperCase();\n\t\tString[] selectStage;\n\t\tselectStage = userQuery.split(\"SELECT\\\\s*|\\\\s*FROM\\\\s*\");\n\t\tcolumnNames = new ArrayList<String>(Arrays.asList(selectStage[1].split(\",\\\\s*\")));\n\t\tString[] fromStage = selectStage[2].split(\"\\\\s*WHERE\\\\s*\");\n\t\tfromStage[0] = fromStage[0].replaceAll(\";\", \"\");\n\t\ttableNames = new ArrayList<String>(Arrays.asList(fromStage[0].split(\",\\\\s\")));\n\t\tif (fromStage.length > 1) {\n\t\t\tfromStage[1] = fromStage[1].replaceAll(\";\", \"\");\n\t\t\tList<String> conditions = new ArrayList<String>(Arrays.asList(fromStage[1].split(\"\\\\sAND\\\\s\")));\n\t\t\tseparateConditions(conditions);\n\t\t}\n\t}", "public java.lang.CharSequence getQuery() {\n return query;\n }", "public java.lang.CharSequence getQuery() {\n return query;\n }", "private Map<String, List<String>> parseQueryString(String queryString) {\n\n // Create the appended parameters map:\n // key is the parameter name as a string,\n // value is a List of parameter values (List of String).\n Map<String, List<String>> appendedParameters = new HashMap<String, List<String>>();\n\n // Parse the appended query string.\n if (log.isDebugEnabled()) {\n log.debug(\"Parsing appended query string: \" + queryString);\n }\n try {\n StringTokenizer st = new StringTokenizer(queryString, \"&\", false);\n while (st.hasMoreTokens()) {\n String token = st.nextToken();\n int equalIndex = token.indexOf(\"=\");\n if (equalIndex > 0) {\n String value;\n String key = URLDecoder.decode( token.substring(0, equalIndex), \"utf-8\" );\n if (equalIndex < token.length() - 1) {\n value = URLDecoder.decode( token.substring(equalIndex + 1), \"utf-8\" );\n }\n else {\n value = \"\";\n }\n List<String> values = appendedParameters.get(key);\n if (values == null) {\n values = new ArrayList<String>();\n }\n values.add(value);\n appendedParameters.put(key, values);\n }\n }\n } catch (UnsupportedEncodingException e) {\n String es = \"Error decode parameter string\";\n log.error(es, e);\n throw new IllegalStateException(es, e);\n }\n if (log.isDebugEnabled()) {\n log.debug(appendedParameters.size() + \" parameters appended.\");\n }\n return appendedParameters;\n }", "private static String addQueryEntry(String query) throws IOException {\n\t\t\t\t\n\t\tString submittedQuery=null;\n\t\tString queryParts[]=query.split(\"&\"); // get parameters from query\t\t\n\t\tboolean isNextPage=false;\n\t\tString key=null;\n\t\tInteger value=null;\n\t\tboolean docsProcessed=false; // identifies if 'docs' occurs more than once in the query\t\t\n\t\tboolean termsProcessed=false; // identifies if 'terms' occurs more than once in the query\n\t\t\n\t\t// identify if it is a next page\n\t\tfor (int i=0;i<queryParts.length;i++) { // verifies if it is a next page\n\t\t\tString queryPartsFields[]=queryParts[i].split(\"=\",2);\t\t\t\n\t\t\tqueryPartsFields[0]=queryPartsFields[0].trim();\n\t\t\tif (queryPartsFields.length>1) {\n\t\t\t\tqueryPartsFields[1]=queryPartsFields[1].trim();\n\t\t\t}\n\t\t\t\n\t\t\tif (queryPartsFields[0].equals(DOCS_KEY) && queryPartsFields.length>1 && !queryPartsFields[1].equals(\"\")) {\t\t\t\n\t\t\t\tint ipage;\n\t\t\t\ttry {\n\t\t\t\t\tipage=Integer.parseInt(queryPartsFields[1]);\n\t\t\t\t}\n\t\t\t\tcatch (NumberFormatException e) {\n\t\t\t\t\tipage=0;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (ipage!=0) { // regist only pages>0 \t\t\t\t\t\t\t\n\t\t\t\t\tisNextPage=true;\t\t\t\n\t\t\t\t\tif (ipage%RESULTS_PER_PAGE!=0) {\n\t\t\t\t\t\tSystem.err.println(\"Page results not multiple of \"+RESULTS_PER_PAGE+\": \"+ipage);\n\t\t\t\t\t\tipage+=ipage%RESULTS_PER_PAGE;\n\t\t\t\t\t}\n\t\t\t\t\tif (!docsProcessed) {\n\t\t\t\t\t\tint index=ipage/RESULTS_PER_PAGE>pagesViewedDistAux.length-1 ? pagesViewedDistAux.length-1 : ipage/RESULTS_PER_PAGE;\t\t\t\n\t\t\t\t\t\tif (index==0) { // sanity check\n\t\t\t\t\t\t throw new IOException(\"Error of index=0 on a next page. ipage:\"+ipage);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tpagesViewedDistAux[index]++;\n\t\t\t\t\t}\n\t\t\t\t\tdocsProcessed=true;\t\t\t\t\n\t\t\t\t}\t\t\t\t\t\t\n\t\t\t}\n\t\t\telse if (queryPartsFields[0].equals(QUERY_KEY)) {\n\t\t\t\ttermsProcessed=true;\n\t\t\t}\n\t\t}\n\t\t// check wrong entries\n\t\tif (docsProcessed && !termsProcessed) {\n\t\t\tSystem.err.println(\"Error of query with docs without terms: \"+query);\n\t\t\treturn null;\n\t\t}\t\t\t\t\n\t\tif (isNextPage) {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\t// count only first page\n\t\tdocsProcessed=false;\n\t\tfor (int i=0;i<queryParts.length;i++) {\t\t\t\t\t\t\t\t\t\n\t\t\tString queryPartsFields[]=queryParts[i].split(\"=\",2);\t\t\t\n\t\t\tqueryPartsFields[0]=queryPartsFields[0].trim();\n\t\t\t\n\t\t\tif (!queryPartsFields[0].equals(QUERY_KEY) || queryPartsFields.length!=2) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t// normalize query\t\t\t\n\t\t\ttry {\n\t\t\t\tqueryPartsFields[1]=decodeStrings(decodeNCR(java.net.URLDecoder.decode(queryPartsFields[1],\"ISO8859-1\").toLowerCase()));\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t}\n\t\t\tcatch(IllegalArgumentException e) {\n\t\t\t\tqueryPartsFields[1]=decodeStrings(decodeNCR(queryPartsFields[1].toLowerCase()));\n\t\t\t}\n\t\t\t// remove spaces\n\t\t\tString terms[]=queryPartsFields[1].split(\"\\\\s\");\n\t\t\tqueryPartsFields[1]=\"\";\n\t\t\tfor (int j=0,k=0;j<terms.length;j++) {\t\t\t\t\t\n\t\t\t\tif (terms[j].equals(\"\")) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\t\t\t\t\t\n\t\t\t\tif (k>0) {\n\t\t\t\t\tqueryPartsFields[1]+=\" \";\t\n\t\t\t\t}\n\t\t\t\tqueryPartsFields[1]+=terms[j];\t\t\t\t\t\n\t\t\t\tk++;\n\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t// filter queries\t\t\t\t\t\n\t\t\tif (queryFiltersMap.containsKey(queryPartsFields[1]) || queryPartsFields[1].startsWith(\"cache%3\") || queryPartsFields[1].equals(\"\")) {\t\t\t\t\n\t\t\t\tcontinue;\n\t\t\t}\t\t\t\t\t\t\t\t\n\t\t\t// set first page viewed\n\t\t\tif (!docsProcessed) {\n\t\t\t\tpagesViewedDistAux[0]++;\n\t\t\t\tdocsProcessed=true;\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t//key=queryPartsFields[0]+\" \"+queryPartsFields[1];\n\t\t\tkey=NEW_QUERY_KEY+\" \"+queryPartsFields[1];\t\t\t\n\t\t\tif ((value=queryPartsMap.get(key))==null) {\n\t\t\t\tqueryPartsMap.put(key,1);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tqueryPartsMap.put(key,value+1);\n\t\t\t}\n\t\t\t\n\t\t\t// set submitted query\n\t\t\tif (submittedQuery!=null) { // sanity check\n\t\t\t\tthrow new IOException(\"Submitted query already set.\");\n\t\t\t}\n\t\t\tsubmittedQuery=queryPartsFields[1];\n\t\t\t\t\n\t\t\t// count queries per session\t\n\t\t\tnQueriesSession++;\n\t\t}\n\t\treturn submittedQuery;\n\t}", "private static Boolean specialQueries(String query) throws ClassNotFoundException, InstantiationException, IllegalAccessException {\n clickList = false;\n //newCorpus = true;\n\n if (query.equals(\"q\")) {\n\n System.exit(0);\n return true;\n }\n\n String[] subqueries = query.split(\"\\\\s+\"); //split around white space\n\n if (subqueries[0].equals(\"stem\")) //first term in subqueries tells computer what to do \n {\n GUI.JListModel.clear();\n GUI.ResultsLabel.setText(\"\");\n TokenProcessor processor = new NewTokenProcessor();\n if (subqueries.length > 1) //user meant to stem the token not to search stem\n {\n List<String> stems = processor.processToken(subqueries[1]);\n\n //clears list and repopulates it \n String stem = \"Stem of query '\" + subqueries[1] + \"' is '\" + stems.get(0) + \"'\";\n\n GUI.ResultsLabel.setText(stem);\n\n return true;\n }\n\n } else if (subqueries[0].equals(\"vocab\")) {\n List<String> vocabList = Disk_posIndex.getVocabulary();\n GUI.JListModel.clear();\n GUI.ResultsLabel.setText(\"\");\n\n int vocabCount = 0;\n for (String v : vocabList) {\n if (vocabCount < 1000) {\n vocabCount++;\n GUI.JListModel.addElement(v);\n }\n }\n GUI.ResultsLabel.setText(\"Total size of vocabulary: \" + vocabCount);\n return true;\n }\n\n return false;\n }", "QueryArgs getQueryArgs();", "java.lang.String getQueryName();", "public String getQueryString() {\n\t\treturn queryString;\n\t}", "@Override\n public boolean onQueryTextSubmit(final String query) {\n Log.i(TAG, \"onQueryTextSubmit '\" + query + \"'\");\n mArtistSearch.clearFocus();\n mLatestQuery = query;\n\n mMusicServiceConnection.whenConnected(new Runnable() {\n @Override\n public void run() {\n mMusicServiceConnection.getService().findArtists(query);\n }\n });\n return true;\n }", "public String getQuery() {\r\n\t\treturn query;\r\n\t}", "public java.lang.String getQuery()\n {\n return this.query;\n }", "TSearchQuery prepareSearchQuery(SearchQueryDefinitionAPI searchQueryDefinition);", "public static void checkFormat(String queryString) throws WrongQueryFormatException {\n\t\tString filters[] = queryString.split(\" \");\n\t\tif (filters.length != 7)\n\t\t\tthrow new WrongQueryFormatException(\n\t\t\t\t\t\"the query should be in this format-- QUERY <IP_ADDRESS> <CPU_ID> <START_DATE> <START_HOUR:START_MIN> <END_DATE> <END_HOUR:END_MIN>\");\n\t\tif (!filters[0].equals(\"QUERY\") && !filters[0].equals(\"EXIT\"))\n\t\t\tthrow new WrongQueryFormatException(\"the query should either start with a 'QUERY' or type 'EXIT' to end\");\n\t\tif (!isAnIp(filters[1]))\n\t\t\tthrow new WrongQueryFormatException(\"the second argument must be an ip address\");\n\t\tif (!isCpuId(filters[2]))\n\t\t\tthrow new WrongQueryFormatException(\"the third argument must be a cpu id(0 or 1)\");\n\t\tisDateTime(filters);\n\t}", "public void setQuery(String query) {\n this.query = query == null ? null : query.trim();\n }", "public void setQuery(String query) {\n this.query = query == null ? null : query.trim();\n }", "Query query();", "public String getQuery() {\n return query;\n }", "public void doSearch(String query)\n \t{\n \t\tlistener.onQueryTextSubmit(query);\n \t}", "Object callQuery(String name, Map<String, String> params);", "public String query() {\n return this.query;\n }", "public void newQuery(String query){\n\t\tparser = new Parser(query);\n\t\tQueryClass parsedQuery = parser.createQueryClass();\n\t\tqueryList.add(parsedQuery);\n\t\t\n\t\tparsedQuery.matchFpcRegister((TreeRegistry)ps.getRegistry());\n\t\tparsedQuery.matchAggregatorRegister();\n\t\t\n\t\t\n\t}", "public String getQuery() {\n return query;\n }", "public String getQuery() {\n return query;\n }", "public String getQuery() {\n return query;\n }", "@Override\n public boolean onQueryTextSubmit(String query) {\n queryMain = query;\n consultarDb();\n return true;\n }", "private String checkQuery(String query){\n\t\tif(query != null){\n\t\t\tString[] param = query.split(\"=\");\n\t\t\tif(param[0].equals(\"tenantID\")){\n\t\t\t\treturn param[1];\n\t\t\t}\n\t\t}\n\t\treturn \"\";\n\t}", "public abstract Query<T> setQuery(String oql);", "SearchResponse query(SearchRequest request, Map<SearchParam, String> params);", "private QueryInfo getQueryInfoFromString(String s) {\n\t\treturn null;\n\t}", "public String getQuery() {\n return _query;\n }", "public String getQuery() {\n return this.query;\n }", "public final void setQuery(final String newQuery) {\n this.query = newQuery;\n }", "public void setQueryString(String sQuery) {\n reposDataSourceFactory.setQuery(sQuery);\n }", "public CharSequence toQueryString(EscapeQuerySyntax escapeSyntaxParser);", "private void searchBooks(final String userQuery){\n mTTS = new TextToSpeech(this, this);\n\n //When the search Button is pressed, a query is run\n searchButton = findViewById(R.id.searchButton);\n searchButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n getSupportFragmentManager().beginTransaction()\n .replace(R.id.listLayout, LoadingFragment.newInstance()).commit();\n// query = searchEditText.getText().toString();\n new FetchData(MainActivity.this).execute(userQuery);\n speakText(userQuery);\n }\n });\n }", "protected abstract String getValidationQuery();", "private void onQueryEventFunctionality() {\n hideKeypad();\n // Find a reference to the {@link EditText} in the layout\n EditText bookQuery = (EditText) findViewById(R.id.book_search_text);\n // Get the user typed text from the EditText view\n mbookQueryText = bookQuery.getText().toString();\n // Make the final URL, based on user input, to be used to fetch data from the server\n mGBooksRequestUrl = makeUrlFromInput(mbookQueryText);\n\n // Get a reference to the ConnectivityManager to check state of network connectivity\n ConnectivityManager connMgr = (ConnectivityManager)\n getSystemService(Context.CONNECTIVITY_SERVICE);\n\n // Get details on the currently active default data network\n NetworkInfo networkInfo = connMgr.getActiveNetworkInfo();\n\n mEmptyStateTextView.setVisibility(GONE);\n\n //Show the progress indicator\n View loadingIndicator = findViewById(R.id.loading_indicator);\n loadingIndicator.setVisibility(VISIBLE);\n\n // If there is a network connection, fetch data\n if (networkInfo != null && networkInfo.isConnected()) {\n // Get a reference to the LoaderManager, in order to interact with loaders.\n LoaderManager loaderManager = getLoaderManager();\n // Initialize the loader. Pass in the int ID constant defined above and pass in null for\n // the bundle. Pass in this activity for the LoaderCallbacks parameter (which is valid\n // because this activity implements the LoaderCallbacks interface).\n loaderManager.restartLoader(BOOK_LOADER_ID, null, BookActivity.this);\n } else {\n // Otherwise, display error\n // First, hide loading indicator so error message will be visible\n loadingIndicator.setVisibility(View.GONE);\n\n // Update empty state with no connection error message\n mEmptyStateTextView.setText(R.string.no_internet_connection);\n }\n }", "IQuery getQuery();", "public abstract DbQuery getQuery(String queryName);", "static String parse(String query, Map paramMap) {\n int length = query.length();\n StringBuilder parsedQuery = new StringBuilder(length);\n boolean inSingleQuote = false;\n boolean inDoubleQuote = false;\n int index = 1;\n\n for (int i = 0; i < length; i++) {\n char c = query.charAt(i);\n if (inSingleQuote) {\n if (c == '\\'') {\n inSingleQuote = false;\n }\n } else if (inDoubleQuote) {\n if (c == '\"') {\n inDoubleQuote = false;\n }\n } else {\n if (c == '\\'') {\n inSingleQuote = true;\n } else if (c == '\"') {\n inDoubleQuote = true;\n } else if (c == ':' && i + 1 < length && Character.isJavaIdentifierStart(query.charAt(i + 1))) {\n int j = i + 2;\n while (j < length && Character.isJavaIdentifierPart(query.charAt(j))) {\n j++;\n }\n String name = query.substring(i + 1, j);\n c = '?'; // replace the parameter with a question mark\n i += name.length(); // skip past the end if the parameter\n\n List indexList = (List) paramMap.get(name);\n if (indexList == null) {\n indexList = new LinkedList();\n paramMap.put(name, indexList);\n }\n indexList.add(index);\n\n index++;\n }\n }\n parsedQuery.append(c);\n }\n\n // replace the lists of Integer objects with arrays of ints\n for (Object o : paramMap.entrySet()) {\n Map.Entry entry = (Map.Entry) o;\n List list = (List) entry.getValue();\n int[] indexes = new int[list.size()];\n int i = 0;\n for (Object o1 : list) {\n Integer x = (Integer) o1;\n indexes[i++] = x;\n }\n entry.setValue(indexes);\n }\n\n return parsedQuery.toString();\n }", "public UserQuery(QueryStrings query) {\n \tsuper(query);\n }", "public void setQuery(String query) {\n _query = checkNotNull(query, \"query is null\");\n }", "public void parseArguments(String queryString, String contentEncoding) {\n String[] args = JOrphanUtils.split(queryString, QRY_SEP);\n final boolean isDebug = log.isDebugEnabled();\n for (int i = 0; i < args.length; i++) {\n if (isDebug) {\n log.debug(\"Arg: \" + args[i]);\n }\n // need to handle four cases:\n // - string contains name=value\n // - string contains name=\n // - string contains name\n // - empty string\n \n String metaData; // records the existance of an equal sign\n String name;\n String value;\n int length = args[i].length();\n int endOfNameIndex = args[i].indexOf(ARG_VAL_SEP);\n if (endOfNameIndex != -1) {// is there a separator?\n // case of name=value, name=\n metaData = ARG_VAL_SEP;\n name = args[i].substring(0, endOfNameIndex);\n value = args[i].substring(endOfNameIndex + 1, length);\n } else {\n metaData = \"\";\n name=args[i];\n value=\"\";\n }\n if (name.length() > 0) {\n if (isDebug) {\n log.debug(\"Name: \" + name+ \" Value: \" + value+ \" Metadata: \" + metaData);\n }\n // If we know the encoding, we can decode the argument value,\n // to make it easier to read for the user\n if(!StringUtils.isEmpty(contentEncoding)) {\n addEncodedArgument(name, value, metaData, contentEncoding);\n }\n else {\n // If we do not know the encoding, we just use the encoded value\n // The browser has already done the encoding, so save the values as is\n addNonEncodedArgument(name, value, metaData);\n }\n }\n }\n }", "public void setQuery (Query q)\n\t throws IllegalStateException,\n\t QueryParseException\n {\n\n\tif (!q.parsed ())\n\t{\n\n\t throw new IllegalStateException (\"Query has not yet been parsed.\");\n\n\t}\n\n\tthis.q = q;\n\n\tthis.checkFrom ();\n\n\tthis.badQuery = false;\n\tthis.exp = null;\n\n }" ]
[ "0.75526565", "0.7368085", "0.7297899", "0.692372", "0.692372", "0.6773376", "0.6652048", "0.65748405", "0.65305316", "0.65305316", "0.6473788", "0.6467477", "0.6433598", "0.64328516", "0.6261274", "0.6260642", "0.61342627", "0.61199945", "0.60962117", "0.6066988", "0.60667425", "0.5993881", "0.59029424", "0.5897794", "0.58894134", "0.58748454", "0.58572423", "0.58449566", "0.5829708", "0.58112925", "0.5798196", "0.57917506", "0.57911175", "0.57854396", "0.5768741", "0.5751847", "0.57342273", "0.5722108", "0.57163495", "0.5698327", "0.5691576", "0.5691165", "0.5672512", "0.56698364", "0.5663909", "0.56377345", "0.5625041", "0.5618684", "0.56156296", "0.5610087", "0.5606537", "0.5601595", "0.55988044", "0.55916333", "0.55874634", "0.5570095", "0.55692387", "0.55424553", "0.5541064", "0.553481", "0.55279464", "0.5524507", "0.5521981", "0.5513934", "0.5499709", "0.54984283", "0.54889387", "0.5479118", "0.5470487", "0.5465904", "0.5450541", "0.5450541", "0.5448988", "0.5445832", "0.54429007", "0.5437913", "0.5436323", "0.5433594", "0.5428992", "0.5428992", "0.5428992", "0.54246646", "0.5423484", "0.54139626", "0.5411069", "0.54080474", "0.5404758", "0.5399549", "0.53884", "0.5373932", "0.5372865", "0.5372233", "0.53664064", "0.536325", "0.534777", "0.5343181", "0.5333897", "0.5333742", "0.5320958", "0.5320377", "0.53070515" ]
0.0
-1
/ we are creating multiple methods, each of them are responsible for extracting a specific part of the query. However, the problem statement requires us to print all elements of the parsed queries. Hence, to reduce the complexity, we are using the parseQuery() method. From inside this method, we are calling all the methods together, so that we can call this method only from main() method to print the entire output in console
public void parseQuery(String queryString) { // call the methods getSplitStrings(queryString); getFile(queryString); getBaseQuery(queryString); getConditionsPartQuery(queryString); getConditions(queryString); getLogicalOperators(queryString); getFields(queryString); getOrderByFields(queryString); getGroupByFields(queryString); getAggregateFunctions(queryString); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Tuple<String,String> extractQueryAndQueryExecution(String query){\n\t\tString[] elements = query.split(\"--\");\n\t\treturn new Tuple<String,String>(elements[0].trim(), elements[1].trim());\n\t}", "public static void printQuery(String pSPARQLPath, String pServerURL) {\n\t\tSystem.out.println(\"Methode Query\");\n\t\tString sQuery = readFile(pSPARQLPath);\n\t\tif (sQuery.equals(\"\")) {\n\t\t\treturn;\n\t\t} \n\t\tQueryExecution queryExecution = QueryExecutionFactory.sparqlService(pServerURL , sQuery);\n\t\tResultSet resultSet = queryExecution.execSelect();\n\t\t//System.out.println(resultSet);\n\t\tSystem.out.println(\"Ergebnis:\");\n\t\twhile (resultSet.hasNext() == true) {\n\t\t\tQuerySolution querySolution = resultSet.nextSolution();\n\t\t\tfor (int i = 0; i < resultSet.getResultVars().size(); i++) {\n\t\t\t\tString result = resultSet.getResultVars().get(i);\n\t\t\t\tif(querySolution.get(result).toString().contains(\"#\")) {\n\t\t\t\t\tString[] temp = querySolution.get(result).toString().split(\"#\");\n\t\t\t\t\tSystem.out.println(temp[1]);\n\t\t\t\t}else {\n\t\t\t\t\tString[] temp = querySolution.get(result).toString().split(\"#\");\n\t\t\t\t\tSystem.out.println(temp[0]);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\tqueryExecution.close();\n\t\t\n\t\t\n\t}", "@SuppressWarnings(\"null\")\n\tpublic QueryParameter parseQuery(String queryString) {\n\t\t\n/*\n\t\t * extract the name of the file from the query. File name can be found after the\n\t\t * \"from\" clause.\n\t\t */\n\n\t\t/*\n\t\t * extract the order by fields from the query string. Please note that we will\n\t\t * need to extract the field(s) after \"order by\" clause in the query, if at all\n\t\t * the order by clause exists. For eg: select city,winner,team1,team2 from\n\t\t * data/ipl.csv order by city from the query mentioned above, we need to extract\n\t\t * \"city\". Please note that we can have more than one order by fields.\n\t\t */\n\n\t\t/*\n\t\t * extract the group by fields from the query string. Please note that we will\n\t\t * need to extract the field(s) after \"group by\" clause in the query, if at all\n\t\t * the group by clause exists. For eg: select city,max(win_by_runs) from\n\t\t * data/ipl.csv group by city from the query mentioned above, we need to extract\n\t\t * \"city\". Please note that we can have more than one group by fields.\n\t\t */\n\n\t\t /*\n\t\t * extract the selected fields from the query string. Please note that we will\n\t\t * need to extract the field(s) after \"select\" clause followed by a space from\n\t\t * the query string. For eg: select city,win_by_runs from data/ipl.csv from the\n\t\t * query mentioned above, we need to extract \"city\" and \"win_by_runs\". Please\n\t\t * note that we might have a field containing name \"from_date\" or \"from_hrs\".\n\t\t * Hence, consider this while parsing.\n\t\t */\n\n\t\t/*\n\t\t * extract the conditions from the query string(if exists). for each condition,\n\t\t * we need to capture the following: 1. Name of field 2. condition 3. value\n\t\t * \n\t\t * For eg: select city,winner,team1,team2,player_of_match from data/ipl.csv\n\t\t * where season >= 2008 or toss_decision != bat\n\t\t * \n\t\t * here, for the first condition, \"season>=2008\" we need to capture: 1. Name of\n\t\t * field: season 2. condition: >= 3. value: 2008\n\t\t * \n\t\t * the query might contain multiple conditions separated by OR/AND operators.\n\t\t * Please consider this while parsing the conditions.\n\t\t * \n\t\t */\n\n\t\t /*\n\t\t * extract the logical operators(AND/OR) from the query, if at all it is\n\t\t * present. For eg: select city,winner,team1,team2,player_of_match from\n\t\t * data/ipl.csv where season >= 2008 or toss_decision != bat and city =\n\t\t * bangalore\n\t\t * \n\t\t * the query mentioned above in the example should return a List of Strings\n\t\t * containing [or,and]\n\t\t */\n\n\t\t/*\n\t\t * extract the aggregate functions from the query. The presence of the aggregate\n\t\t * functions can determined if we have either \"min\" or \"max\" or \"sum\" or \"count\"\n\t\t * or \"avg\" followed by opening braces\"(\" after \"select\" clause in the query\n\t\t * string. in case it is present, then we will have to extract the same. For\n\t\t * each aggregate functions, we need to know the following: 1. type of aggregate\n\t\t * function(min/max/count/sum/avg) 2. field on which the aggregate function is\n\t\t * being applied\n\t\t * \n\t\t * Please note that more than one aggregate function can be present in a query\n\t\t * \n\t\t * \n\t\t */\n\n\t\tString file = null;\n\t\tList<Restriction> restrictions = new ArrayList<Restriction>();\n\t\tList<String> logicalOperators = new ArrayList<String>();\n\t\tList<String> fields = new ArrayList<String>();;\n\t\tList<AggregateFunction> aggregateFunction = new ArrayList<AggregateFunction>();\n\t\tList<String> groupByFields = new ArrayList<String>();;\n\t\tList<String> orderByFields = new ArrayList<String>();;\n\t\tString baseQuery=null;\n\t\n\t\tfile = getFile(queryString);\n\n\t\t\n\t\tString[] conditions = getConditions(queryString);\n\t\tif(conditions!=null) {\n\t\tRestriction[] restriction = new Restriction[conditions.length];\n\t\t\n\t\tfor (int i = 0; i < conditions.length; i++) {\n\t\t\trestriction[i] = new Restriction();\n\t\t\t\n\t\t\tString operator=null;\n\t\t\tString value=null;\n\t\t\tString property=null;\n\t\t\t if(conditions[i].contains(\"<=\")) {\n\t\t\t\tString[] split = conditions[i].split(\"<=\");\n\t\t\t\toperator=\"<=\";\n\t\t\t\t value=split[1].trim();\n\t\t\t\t property=split[0].trim();\n\t\t\t\t\n\t\t\t}\n\t\t\telse if(conditions[i].contains(\">=\")) {\n\t\t\t\tString[] split = conditions[i].split(\">=\");\n\t\t\t\toperator=\">=\";\n\t\t\t\t value=split[1].trim();\n\t\t\t\t property=split[0].trim();\n\t\t\t\t\n\t\t\t}\n\t\t\telse if(conditions[i].contains(\">\")) {\n\t\t\t\tString[] split = conditions[i].split(\">\");\n\t\t\t\toperator=\">\";\n\t\t\t\t value=split[1].trim();\n\t\t\t\t property=split[0].trim();\n\t\t\t}\n\t\t\telse if(conditions[i].contains(\"!=\")) {\n\t\t\t\tString[] split = conditions[i].split(\"!=\");\n\t\t\t\toperator=\"!=\";\n\t\t\t\t value=split[1].trim();\n\t\t\t\t property=split[0].trim();\n\t\t\t}\n\t\t\telse if(conditions[i].contains(\"=\")) {\n\t\t\t\tString[] split = conditions[i].split(\"=\");\n\t\t\t\toperator=\"=\";\n\t\t\t\t value=split[1].trim();\n\t\t\t\t property=split[0].trim();\n\t\t\t\t if(value.contains(\"'\")) {\n\t\t\t\t\t value= value.replaceAll(\"'\",\"\").trim();\n\t\t\t\t }\n\t\t\t\t\n\t\t\t}\n\t\t\telse if(conditions[i].contains(\"<\")) {\n\t\t\t\tString[] split = conditions[i].split(\"<\");\n\t\t\t\toperator=\"<\";\n\t\t\t\t value=split[1].trim();\n\t\t\t\t property=split[0].trim();\n\t\t\t}\n\t\t\t \n\t\t\t\n\t\t\trestriction[i].setCondition(operator);\n\t\t\trestriction[i].setPropertyName(property);\n\t\t\trestriction[i].setPropertyValue(value);\n\t\t\trestrictions.add(restriction[i]);\n\n\t\t}\n\t\t}\n\t\n\t\tString[] operators = getLogicalOperators(queryString);\n\t\tif(operators!=null) {\n\t\tfor (String op : operators) {\n\t\t\tlogicalOperators.add(op);\n\t\t}\n\t\t}\n\t\t\n\t\tString[] filds = getFields(queryString);\n\t\tif(filds!=null) {\n\t\tfor (String field : filds) {\n\t\t\tfields.add(field);\n\t\t}\n\t\t}\n\t\t\n\t\tString[] aggregationVal = getAggregateFunctions(queryString);\n\t\tif(aggregationVal!=null) {\n\t\tAggregateFunction[] aggregation = new AggregateFunction[aggregationVal.length];\n\t\tfor (int i = 0; i < aggregationVal.length; i++) {\n\t\t\taggregation[i] = new AggregateFunction();\n\t\t\tString[] split = (aggregationVal[i].replace(\"(\", \" \")).split(\" \");\n\t\t\tSystem.out.println(split[0]);\n\t\t\tSystem.out.println(split[1].replace(\")\", \"\").trim());\n\t\t\t\n\t\t\taggregation[i].setFunction(split[0]);\n\t\t\taggregation[i].setField(split[1].replace(\")\", \"\").trim());\n\t\t\taggregateFunction.add(aggregation[i]);\n\n\t\t}\n\t\t}\n\t\t\n\t\t\t\n\t\t\n\t\tString[] groupBy = getGroupByFields(queryString);\n\t\tif(groupBy!=null) {\n\t\tfor (String group : groupBy) {\n\t\t\tgroupByFields.add(group);\n\t\t}\n\t\t}\n\t\n\t\tString[] orderBy = getOrderByFields(queryString);\n\t\tif(orderBy!=null) {\n\t\tfor (String order : orderBy) {\n\t\t\torderByFields.add(order);\n\t\t}\n\t\t}\n\t\tqueryParameter.setFile(file);\n\t\tif(restrictions.size()!=0) {\n\t\t\tqueryParameter.setRestrictions(restrictions);\n\t\t}\n\t\telse {\n\t\t\tqueryParameter.setRestrictions(null);\n\t\t}\n\t\tif(logicalOperators.size()!=0) {\n\t\tqueryParameter.setLogicalOperators(logicalOperators);\n\t\t}\n\t\telse {\n\t\t\tqueryParameter.setLogicalOperators(null);\n\t\t}\n\t\tbaseQuery=getBaseQuery(queryString);\n\t\t\n\t\tqueryParameter.setFields(fields);\n\t\tqueryParameter.setAggregateFunctions(aggregateFunction);\n\t\tqueryParameter.setGroupByFields(groupByFields);\n\t\tqueryParameter.setOrderByFields(orderByFields);\n\t\tqueryParameter.setBaseQuery(baseQuery.trim());\n\t\treturn queryParameter;\n\n\t}", "@Test\n\tpublic void queryTest() {\n\t\tString query1 = \"(\\\"hello my name is\\\" & my | (!no & yes))\";\n\t\tString query2 = \"(hello & (\\\"yes sir\\\") | !no)\";\n\t\tString query3 = \"\\\"bob dylan\\\" ( big boy | toy ) & \\\"named troy\\\"\";\n\t\tString query4 = \"test \\\"quan what does\\\"\";\n\t\t\n\t\tString query1Result = \"hello+my+name+is my & !no yes & |\";\n\t\tString query2Result = \"hello yes+sir & !no |\";\n\t\tString query3Result = \"bob+dylan big boy & toy | & named+troy &\";\n\t\tString query4Result = \"test quan+what+does &\";\n\t\t\n\t\tassertEquals(query1Result, String.join(\" \", queryTest.getPostFix(query1)));\n\t\tassertEquals(query2Result, String.join(\" \", queryTest.getPostFix(query2)));\n\t\tassertEquals(query3Result, String.join(\" \", queryTest.getPostFix(query3)));\n\t\tassertEquals(query4Result, String.join(\" \", queryTest.getPostFix(query4)));\n\t}", "public List<QueryHit> processQuery(String query) {\n // Do something!\n System.err.println(\"Processing query '\" + query + \"'\");\n return new ArrayList<QueryHit>();\n }", "private static Boolean specialQueries(String query) throws ClassNotFoundException, InstantiationException, IllegalAccessException {\n clickList = false;\n //newCorpus = true;\n\n if (query.equals(\"q\")) {\n\n System.exit(0);\n return true;\n }\n\n String[] subqueries = query.split(\"\\\\s+\"); //split around white space\n\n if (subqueries[0].equals(\"stem\")) //first term in subqueries tells computer what to do \n {\n GUI.JListModel.clear();\n GUI.ResultsLabel.setText(\"\");\n TokenProcessor processor = new NewTokenProcessor();\n if (subqueries.length > 1) //user meant to stem the token not to search stem\n {\n List<String> stems = processor.processToken(subqueries[1]);\n\n //clears list and repopulates it \n String stem = \"Stem of query '\" + subqueries[1] + \"' is '\" + stems.get(0) + \"'\";\n\n GUI.ResultsLabel.setText(stem);\n\n return true;\n }\n\n } else if (subqueries[0].equals(\"vocab\")) {\n List<String> vocabList = Disk_posIndex.getVocabulary();\n GUI.JListModel.clear();\n GUI.ResultsLabel.setText(\"\");\n\n int vocabCount = 0;\n for (String v : vocabList) {\n if (vocabCount < 1000) {\n vocabCount++;\n GUI.JListModel.addElement(v);\n }\n }\n GUI.ResultsLabel.setText(\"Total size of vocabulary: \" + vocabCount);\n return true;\n }\n\n return false;\n }", "public static void parseQueryString(String queryString) {\n\n System.out.println(\"STUB: Calling parseQueryString(String s) to process queries\");\n System.out.println(\"Parsing the string:\\\"\" + queryString + \"\\\"\");\n queryString = queryString.toLowerCase();\n String colName = queryString.substring(0,queryString.indexOf(\"from\")+5).trim();\n String colNames[] = removeWhiteSpacesInArray(colName.split(\" \"));\n ArrayList<String> queryStringList = new ArrayList<String>(Arrays.asList(colNames));\n queryStringList.remove(\"select\");\n queryStringList.remove(\"from\");\n String condition = \"\";\n String keyValueCond[] = new String[]{};\n String tableName = \"\";\n if(queryString.contains(\"where\")) {\n tableName = queryString.substring(queryString.indexOf(\"from\") + 5, queryString.indexOf(\"where\")).trim();\n condition = queryString.substring(queryString.indexOf(\"where\")+6, queryString.length()).trim();\n keyValueCond = removeWhiteSpacesInArray(condition.split(\" \"));\n }else\n tableName = queryString.substring(queryString.indexOf(\"from\")+5).trim();\n try {\n Table table = new Table(tableName.concat(\".tbl\"));\n int noOfRecords = table.page.getNoOfRecords();\n long pos = table.page.getStartofContent();\n TreeMap<String, String> colOrder = columnOrdinalHelper.getColumnsInOrdinalPositionOrder(tableName);\n int recordLength = Integer.parseInt(recordLengthHelper.getProperties(tableName.concat(\".\").concat(Constant.recordLength)));\n if(keyValueCond.length>0){\n\n }else{\n Iterator it = colOrder.entrySet().iterator();\n while (it.hasNext()){\n Map.Entry<String, String> entryPair = (Map.Entry<String, String>) it.next();\n// ReadResult<Object> readResult = table.page.readIntasByte(pos);\n// System.out.println(readResult.getT());\n ReadResult<Object> readResult = RecordFormat.readRecordFormat(columnTypeHelper.getProperties(entryPair.getValue()),table,pos);\n System.out.println(\"RESULT COLUMN NAME : \"+entryPair.getValue()+\" Value : \"+readResult.getT());\n\n }\n\n }\n\n\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "private ArrayList<WordDocument> executeAdvancedQuery(){\n ArrayList<WordDocument> documents = customDijkstrasTwoStack(this.query.split(\" \"));\n ArrayList<WordDocument> result = new ArrayList<WordDocument>();\n\n try{\n String[] orderByPart = query.substring(query.indexOf(\"ORDERBY\")).trim().toLowerCase().split(\" \");\n if(isOrderByCommand(orderByPart[0]))\n result = orderBy(documents, orderByPart[1], orderByPart[2]);\n }catch (StringIndexOutOfBoundsException ex){\n result = documents;\n }\n\n return result;\n }", "String query();", "public void Query() {\n }", "String processQuery(String query);", "private ArrayList<WordDocument> executeRegularQuery(){\n String[] splitedQuery = this.query.split(\" \");\n ArrayList<WordDocument> listOfWordDocuments = new ArrayList<WordDocument>();\n String word = \"\";\n\n for(int i = 0; i < splitedQuery.length; i++){\n if(!isOrderByCommand(splitedQuery[i]) && i == 0) {\n word = splitedQuery[i];\n\n if(cache.isCached(word))\n addWithoutDuplicate(listOfWordDocuments, cache.getCachedResult(word));\n else\n addWithoutDuplicate(listOfWordDocuments, getDocumentsWhereWordExists(word));\n\n }else if(i >= 1 && isOrderByCommand(splitedQuery[i])) {\n subQueries.add(word);\n listOfWordDocuments = orderBy(listOfWordDocuments, splitedQuery[++i], splitedQuery[++i]);\n break;\n }\n else\n throw new IllegalArgumentException();\n }\n\n return listOfWordDocuments;\n }", "void run() {\n Scanner sc = new Scanner(System.in);\r\n int N = sc.nextInt();\r\n while (N-- > 0)\r\n AddSuggestion(sc.next());\r\n\r\n int Q = sc.nextInt();\r\n while (Q-- > 0)\r\n System.out.println(Query(sc.next() )); // subString \r\n \r\n sc.close();\r\n }", "public static void querying(String constructQuery2) {\n\t\t//construct the new query\n\t\t//String constructQuery2 = prefix+\" \"+select+\" \"+selectValues+\" \"+where+openBracket+openBracket+\" \"+local+\" \"+service+\" \"+openBracket+\" \"+remote+\" \"+closeBracket+closeBracket;\n\t\t//constructQuery2 = constructQuery2+\" UNION \"+\" \"+openBracket+\" \"+local+\" \"+service+\" \"+openBracket+\" \"+remote+\" \"+closeBracket+closeBracket+closeBracket;\n\t\t\n\t\tSystem.out.println(constructQuery2);\n\t\tQuery query2 = QueryFactory.create(constructQuery2);\n\t\tQueryExecution qe2 = QueryExecutionFactory.sparqlService(\n\t\t\t\t\"http://localhost:3030/USNA/query\", query2);\n\t\t\n\t\tResultSet results1 = qe2.execSelect();\n\t\tif(constantOutput == \"\") {\n\t\t\tResultSetFormatter.out(System.out, results1);\n\t\t}else {\n\t\t\tString NS = \"http://www.usna.org/ns#\";\n\t\t\tModel rdfssExample = ModelFactory.createDefaultModel();\n\t\t\tString [] constant = constantOutput.trim().split(\" \");\n\t\t\t\n\t\t\tString [] headers = selectValues.split(\" \");\n\t\t System.out.println(\"--------------------------------------------------------------------------------------------------------------------------------------------\");\n\t\t\tfor(int i = 0; i< headers.length; i++) {\n\t\t\t\t//System.out.print(headers[i].substring(1,headers[i].length()).trim()+\"\\t\\t\\t\\t\\t\\t\");\n\t\t\t\tSystem.out.print(headers[i].substring(1,headers[i].length()).trim()+\"\\t\\t\\t\\t\\t\\t\");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\"----------------------------------------------------------------------------------------------------------------------------------------------\");\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t\ttry {\n\t\t\t\t int count = 0;\n\t\t while ( results1.hasNext() ) {\n\t\t \t //Resource Response = rdfssExample.createResource(NS+constant[count]);\n\t\t \t \n\t\t QuerySolution soln = results1.nextSolution();\n\t\t Resource first = soln.getResource(headers[0].substring(1,headers[0].length()).trim());\n\t\t //Resource second = soln.getResource(headers[1].substring(1,headers[1].length()).trim());\n\t\t //Resource third = soln.getResource(headers[2].substring(1,headers[2].length()).trim());\n\t\t //Resource fourth = soln.getResource(headers[3].substring(1,headers[3].length()).trim());\n\t\t for(int i=0; i< constant.length; i++) {\n\t\t \t Resource Response = rdfssExample.createResource(NS+constant[i]);\n\t\t \t System.out.format(\"%10s %50s\",first, Response);\n\t\t \t System.out.println();\n\t\t\t\t\t //count++;\n\t\t }\n\t\t //System.out.format(\"%10s %50s\",first, Response);\n\t\t //System.out.format(\"%10s\",first);\n\t\t\t\t System.out.println();\n\t\t\t\t //count++;\n\t\t\t\t \n\t\t\t\t //System.out.println(count);\n\t\t \n\t\t }\n\t\t } finally {\n\t\t \t qe2.close();\n\t\t}\n\t\t\t \n\t\t}\t\t \n\t}", "public String answerQuery(Query query) {\r\n\t\tString reply = null;\r\n\t\tif(query != null){\r\n\t\t\tif(query.elements != null){\r\n\t\t\t\tArrayList<String> queryReply = query.elements;\r\n\t\t\t\tqueryReply.add(is);\r\n\t\t\t\tqueryReply.add(Float.toString(query.price));\r\n\t\t\t\t\r\n\t\t\t\tif(query.isCredit){\r\n\t\t\t\t\tqueryReply.add(credit);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treply = GalaxyUtil.outputFormatter(queryReply);\r\n\t\t\t}else{\r\n\t\t\t\treply = badQuery;\r\n\t\t\t}\r\n\t\t\treply = query.query+\" \"+reply;\r\n\t\t\t\r\n\t\t\t//System.out.println(query.query+\" \"+reply);\r\n\t\t}\r\n\t\treturn reply;\r\n\t}", "private void debug(int[] query) {\n\t\tSystem.out.print(\"How many rounds you want? \");\n\t\tint round = scanner.nextInt();\n\t\tTJSGM tjsgm = new TJSGM();\n\t\tlong[][][][] result = new long[1][round][query.length][4];\n\t\tfor (int j = 0; j < round; j++) {\n\t\t\tfor (int i = 0; i < query.length; i++) {\n\t\t\t\tresult[0][j][i] = tjsgm.run(QUERY[query[i]]);\n\t\t\t}\n\t\t}\n\n\t\t// print\n\t\tString[] Q = {\"TJSGM\" };\n\t\tfor (int i = 0; i < result.length; i++) {// alg\n\t\t\tSystem.out.println(\"Algorithm:\" + Q[i]);\n\t\t\tfor (int k = 0; k < result[i][0].length; k++) {// query\n\t\t\t\tSystem.out.print(QUERY[query[k]] + \"\\t\");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t\tfor (int j = 0; j < result[i].length; j++) {// round\n\n\t\t\t\tfor (int m = 0; m < 4; m++) {//t\n\t\t\t\t\tfor (long[] q : result[i][j]) {// query\n\t\t\t\t\t\tSystem.out.print(q[m]+\"\\t\");\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t}\t\t\n\t}", "CampusSearchQuery generateQuery();", "public abstract String createQuery();", "Query query();", "public void separateFileToQueries(Indexer indexer, CityIndexer cityIndexer, Ranker ranker, File queriesFile, boolean withSemantic, ArrayList<String> chosenCities, ObservableList<String> citiesByTag, boolean withStemming, String saveInPath) {\n try {\n String allQueries = new String(Files.readAllBytes(Paths.get(queriesFile.getAbsolutePath())), Charset.defaultCharset());\n String[] allQueriesArr = allQueries.split(\"<top>\");\n\n for (String query : allQueriesArr) {\n if(query.equals(\"\")){\n continue;\n }\n String queryId = \"\", queryText = \"\", queryDescription = \"\";\n String[] lines = query.toString().split(\"\\n\");\n for (int i = 0; i < lines.length; i++){\n if(lines[i].contains(\"<num>\")){\n queryId = lines[i].substring(lines[i].indexOf(\":\") + 2);\n }\n else if(lines[i].contains(\"<title>\")){\n queryText = lines[i].substring(8);\n }\n else if(lines[i].contains(\"<desc>\")){\n i++;\n while(i < lines.length && !lines[i].equals(\"\")){\n queryDescription += lines[i];\n i++;\n }\n }\n }\n search(indexer, cityIndexer, ranker, queryText, withSemantic, chosenCities, citiesByTag, withStemming, saveInPath, queryId, queryDescription);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public String getResult(){\n \tString result = \"OK\";\n System.out.print(this.mainQuery);\n Query query = QueryFactory.create(this.mainQuery);\n Query querycount = QueryFactory.create(this.countQuery);\n //System.out.println(this.countQuery);\n QueryExecution qexecCount = QueryExecutionFactory.create(querycount, Initialisation.getModel());\n QueryExecution qexec = QueryExecutionFactory.create(query, Initialisation.getModel());\n try{\n \torg.apache.jena.query.ResultSet results = qexec.execSelect();\n //////////////////////////\n org.apache.jena.query.ResultSet resultsCount = qexecCount.execSelect();\n \tint compteur = 0;\n while (resultsCount.hasNext()){\n QuerySolution soln = resultsCount.nextSolution();\n compteur = soln.getLiteral(\"count\").getInt();\n }\n //System.out.println(\"Compteur = \"+compteur );\n if(compteur>1){\n return \"NONE\";\n }\n else if (compteur==0){\n return \"NF\";\n }\n /////////////////////////\n \twhile (results.hasNext()){\n \t\tcompteur++;\n \t\tQuerySolution soln = results.nextSolution();\n \t\tLiteral title = soln.getLiteral(\"label\");\n \t\tLiteral comment = soln.getLiteral(\"comment\");\n \t\tthis.title = title.getString().replace(\"-\",\" \");\n \t\ttry{\n \t\tthis.comment = comment.getString();\n \t\t}\n \t\tcatch(NullPointerException e){\n \t\t\tthis.comment = \"There is not any summary available for this film.\";\n \t\t}\n \t}\n\n }\n finally{\n \tqexec.close();\n }\n \n return result;\n }", "protected boolean query() {\r\n\t\tqueryStr = new String(processQueryTitle(queryBk.getTitle()) + processQueryAuthor(queryBk.getCreator())\r\n\t\t\t\t+ processQueryPublisher(queryBk.getPublisher()));\r\n\t\tSystem.out.println(queryStr);\r\n\t\t// if edition is 'lastest' (coded '0'), no query is performed; and\r\n\t\t// return false.\r\n\t\tif (queryBk.parseEdition() == 0) {\r\n\t\t\treturn false;\r\n\t\t} // end if\r\n\r\n\t\t/*\r\n\t\t * The following section adds edition info to the query string if edition no. is\r\n\t\t * greater than one. By cataloging practice, for the first edition, probably\r\n\t\t * there is NO input on the associated MARC field. Considering this, edition\r\n\t\t * query string to Primo is NOT added if querying for the first edition or no\r\n\t\t * edition is specified.\r\n\t\t */\r\n\t\tif (queryBk.parseEdition() > 1) {\r\n\t\t\tqueryStr += processQueryEdition(queryBk.parseEdition());\r\n\t\t} // end if\r\n\r\n\t\t/*\r\n\t\t * Querying the Primo X-service; and invoking the matching processes (all done\r\n\t\t * by remoteQuery()).\r\n\t\t */\r\n\t\tif (strHandle.hasSomething(queryBk.getPublisher())) {\r\n\t\t\tif (remoteQuery(queryStr)) {\r\n\t\t\t\tmatch = true;\r\n\t\t\t\tsetBookInfo();\r\n\t\t\t\tcheckAVA(queryBk.parseVolume());\r\n\t\t\t\treturn true;\r\n\t\t\t} else {\r\n\t\t\t\tmatch = false;\r\n\t\t\t} // end if\r\n\t\t} // end if\r\n\r\n\t\t/*\r\n\t\t * For various reasons, there are possibilities that the first query fails while\r\n\t\t * a match should be found. The follow work as remedy queries to ensure the\r\n\t\t * accuracy.\r\n\t\t */\r\n\r\n\t\tif (!match && strHandle.hasSomething(queryBk.getPublisher())) {\r\n\t\t\tqueryStr = new String(\r\n\t\t\t\t\tprocessQueryPublisher(queryBk.getPublisher()) + processQueryAuthor(queryBk.getCreator()));\r\n\t\t\tif (remoteQuery(queryStr)) {\r\n\t\t\t\tmatch = true;\r\n\t\t\t\tsetBookInfo();\r\n\t\t\t\tcheckAVA(queryBk.parseVolume());\r\n\t\t\t\treturn true;\r\n\t\t\t} else {\r\n\t\t\t\tmatch = false;\r\n\t\t\t} // end if\r\n\t\t} // end if\r\n\r\n\t\tif (!match) {\r\n\t\t\tqueryStr = new String(processQueryTitle(queryBk.getTitle()) + processQueryAuthor(queryBk.getCreator()));\r\n\t\t\tif (remoteQuery(queryStr)) {\r\n\t\t\t\tmatch = true;\r\n\t\t\t\tsetBookInfo();\r\n\t\t\t\tcheckAVA(queryBk.parseVolume());\r\n\t\t\t\treturn true;\r\n\t\t\t} else {\r\n\t\t\t\tmatch = false;\r\n\t\t\t} // end if\r\n\t\t} // end if\r\n\r\n\t\tif (!match) {\r\n\t\t\tqueryStr = new String(processQueryTitle(queryBk.getTitle()));\r\n\t\t\tif (remoteQuery(queryStr)) {\r\n\t\t\t\tmatch = true;\r\n\t\t\t\tsetBookInfo();\r\n\t\t\t\tcheckAVA(queryBk.parseVolume());\r\n\t\t\t\treturn true;\r\n\t\t\t} else {\r\n\t\t\t\tmatch = false;\r\n\t\t\t} // end if\r\n\t\t} // end if\r\n\r\n\t\tif (!match && strHandle.hasSomething(queryBk.getPublishYear())) {\r\n\t\t\tqueryStr = new String(\r\n\t\t\t\t\tprocessQueryAuthor(queryBk.getCreator()) + processQueryYear(queryBk.getPublishYear()));\r\n\r\n\t\t\tif (remoteQuery(queryStr)) {\r\n\t\t\t\tmatch = true;\r\n\t\t\t\tsetBookInfo();\r\n\t\t\t\tcheckAVA(queryBk.parseVolume());\r\n\t\t\t\treturn true;\r\n\t\t\t} else {\r\n\t\t\t\tmatch = false;\r\n\t\t\t} // end if\r\n\t\t} // end if\r\n\r\n\t\tif (!match) {\r\n\t\t\tqueryStr = new String(\r\n\t\t\t\t\tprocessQueryAuthor(queryBk.getCreator()) + processQueryTitleShort(queryBk.getTitle()));\r\n\t\t\tif (remoteQuery(queryStr)) {\r\n\t\t\t\tmatch = true;\r\n\t\t\t\tsetBookInfo();\r\n\t\t\t\tcheckAVA(queryBk.parseVolume());\r\n\t\t\t\treturn true;\r\n\t\t\t} else {\r\n\t\t\t\tmatch = false;\r\n\t\t\t} // end if\r\n\t\t} // end if\r\n\r\n\t\t// Additional query for Chinese titles\r\n\r\n\t\tif (!match && (CJKStringHandling.isCJKString(queryBk.getTitle())\r\n\t\t\t\t|| CJKStringHandling.isCJKString(queryBk.getCreator())\r\n\t\t\t\t|| CJKStringHandling.isCJKString(queryBk.getPublisher()))) {\r\n\r\n\t\t\tqueryStr = new String(processQueryTitle(queryBk.getTitle()));\r\n\t\t\tif (remoteQuery(queryStr)) {\r\n\t\t\t\tmatch = true;\r\n\t\t\t\tsetBookInfo();\r\n\t\t\t\tcheckAVA(queryBk.parseVolume());\r\n\t\t\t\treturn true;\r\n\t\t\t} else {\r\n\t\t\t\tmatch = false;\r\n\t\t\t} // end if\r\n\r\n\t\t\tif (!match && queryBk.parseEdition() != -1) {\r\n\t\t\t\tqueryStr = new String(\r\n\t\t\t\t\t\tprocessQueryTitle(queryBk.getTitle()) + processQueryEdition2(queryBk.parseEdition()));\r\n\t\t\t\tif (remoteQuery(queryStr)) {\r\n\t\t\t\t\tmatch = true;\r\n\t\t\t\t\tsetBookInfo();\r\n\t\t\t\t\tcheckAVA(queryBk.parseVolume());\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tmatch = false;\r\n\t\t\t\t} // end if\r\n\r\n\t\t\t\tif (!match && queryBk.parseEdition() != -1) {\r\n\t\t\t\t\tqueryStr = new String(\r\n\t\t\t\t\t\t\tprocessQueryTitle(queryBk.getTitle()) + processQueryEdition3(queryBk.parseEdition()));\r\n\t\t\t\t\tif (remoteQuery(queryStr)) {\r\n\t\t\t\t\t\tmatch = true;\r\n\t\t\t\t\t\tsetBookInfo();\r\n\t\t\t\t\t\tcheckAVA(queryBk.parseVolume());\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tmatch = false;\r\n\t\t\t\t\t} // end if\r\n\t\t\t\t} // end if\r\n\t\t\t} // end if\r\n\t\t} // end if\r\n\r\n\t\t// Additional check for ISO Document number in <search> <genernal> PNX\r\n\t\t// tag\r\n\t\tif (!match && !CJKStringHandling.isCJKString(queryBk.getTitle())) {\r\n\t\t\tqueryStr = new String(processQueryTitleISODoc(queryBk.getTitle()));\r\n\t\t\tif (remoteQuery(queryStr)) {\r\n\t\t\t\tmatch = true;\r\n\t\t\t\tsetBookInfo();\r\n\t\t\t\tcheckAVA(queryBk.parseVolume());\r\n\t\t\t\treturn true;\r\n\t\t\t} else {\r\n\t\t\t\tmatch = false;\r\n\t\t\t\terrMsg += \"Query: No record found on Primo.\" + Config.QUERY_SETTING;\r\n\t\t\t} // end if\r\n\t\t} // end if\r\n\t\treturn false;\r\n\t}", "public CQLQueryResults processQuery(CQLQuery cqlQuery) throws MalformedQueryException, \n\t QueryProcessingException {\n\t\tthrow new RuntimeException(\"not impl yet. port from ncia-core-grid-transfer\");\n\t}", "public void testAdvancedQuery() {\n\t\t//manager.advancedQuery(ElasticIndex.analyzed, \"metropolitan areas\", \"sports clubs\");\n\t\t//manager.advancedQuery(ElasticIndex.analyzed, \"\", \"Award\");\n\n\t//manager.advancedQuery(ElasticIndex.analyzed,\"american actor\", \"list of movies starring Sean Connery\");\n//\tmanager.categorySearch(\"Sportspeople\", \"tennis\",ElasticIndex.analyzed,30);\n\t//manager.advancedQuery(ElasticIndex.analyzed,\"Broadway musicals\", \"Grammy Award\");\n\t//manager.advancedQuery(ElasticIndex.analyzed,\"musical movies\", \"Tony Award\");\n\t//manager.advancedQuery(ElasticIndex.analyzed,\"Top level football leagues\", \"teams\");\n\t//manager.advancedQuery(ElasticIndex.analyzed,\"american movies\", \"directed by Woody Allen\");\n\t//manager.advancedQuery(ElasticIndex.analyzed,\"United states\", \"professional sports teams\");\n\t\t//manager.advancedQuery(\"musical movies\", \"tony award\");\n\t\t//manager.advancedQuery(\"grammy\", \"best album in 2012\"); \n\t\t//manager.advancedQuery(\"american movies\", \"directed by Woody Allen\"); \n\t\t//Canceled manager.advancedQuery(\"tennis\", \"international players\"); \n\t\t// canceled manager.advancedQuery(\"tennis\", \"french open\"); \n\t\t// canceled manager.advancedQuery(\"film movie\", \"1933\"); \n//\t\tmanager.advancedQuery(\"United states\", \"professional sports teams \");\n//\t\t manager.advancedQuery(\"computer games\", \"developed by Ubisoft\");\n//\t\tmanager.advancedQuery(\"movies\", \"academy award nominations\");\n //manager.advancedQuery(\"movies\", \"starring Dustin Hoffman\");\n // manager.advancedQuery(\"movies\", \"best costume design\");\n // manager.advancedQuery(\"concert tours\", \"england\");\n // manager.advancedQuery(\"sport\", \"Francesco\");\n\t\t//System.out.println(\"******* advanced query *******\");\n\t\t//manager.advancedQuery(\"sportspeople\", \"tennis\");\n//\t\tmanager.advancedQuery(ElasticIndex.analyzed, \"Broadway musicals\", \"Grammy Award\");\n //System.out.println(\"*****************************\");\n\n\n\t\t\n\t\t//manager.advancedQuery(\"football\", \"italian championship\");\n\t\t//manager.advancedQuery(\"american basketball\", \"team\");\n\t\t //manager.advancedQuery(\"Goya Award\", \"Winner and nominees from FRA\");\n\t\t//manager.advancedQuery(\"films\", \"american comedy \");\n\t\t//manager.advancedQuery(\"films\", \"american Adventure directed by James P. Hogan\");\n\t\t//manager.advancedQuery(\"NCAA Division\", \"american universities in Arkansas\");\n\t\t//manager.advancedQuery(\"Academy award\", \"winners and nominees in acting in 2011\");\n\t\t//manager.advancedQuery(\"canadian soccer\", \"Alain Rochat position \");\n\n\t}", "public static void main(String[] args) {\n\t\tSession s2=util.getSession();\r\n\t\tQuery qry=s2.getNamedQuery(\"q2\");\r\n\t\t//Query qry=s2.getNamedQuery(\"q3\");\r\n\t\t//qry.setInteger(0, 50);\r\n\t\tList<Object[]> lust=qry.list();\r\n\t\tfor(Object[] row:lust) {\r\n\t\t\tSystem.out.println(Arrays.toString(row));\r\n\t\t}\r\n\t\tSystem.out.println(\"Completed\");\r\n\t}", "public void newQuery(String query){\n\t\tparser = new Parser(query);\n\t\tQueryClass parsedQuery = parser.createQueryClass();\n\t\tqueryList.add(parsedQuery);\n\t\t\n\t\tparsedQuery.matchFpcRegister((TreeRegistry)ps.getRegistry());\n\t\tparsedQuery.matchAggregatorRegister();\n\t\t\n\t\t\n\t}", "public static void main(String[] args){\n SentenceParser sp = new SentenceParser (\"Peas and carrots and potatoes.\");\n System.out.println(sp);\n //then print your results\n \n\n }", "private void parseQuery(String str) {\n String[] parts = str.split(\"orderby\");\n String[] elements = parts[0].split(\"\\\\s+\");\n\n // Use two-stack algorithm to parse prefix notation\n Stack<Comparable<String>> terms = new Stack<Comparable<String>>();\n Stack<Comparable<String>> helper = new Stack<Comparable<String>>();\n\n for (String el : elements) { terms.push(el); }\n while (!terms.isEmpty()) {\n Comparable<String> term = terms.pop();\n String operands = \"+|-\";\n if (operands.contains(term.toString())) {\n Comparable<String> leftSide = helper.pop();\n Comparable<String> rightSide = helper.pop();\n helper.push(new Subquery(leftSide, term.toString(), rightSide));\n } else {\n helper.push(term);\n }\n }\n\n Comparable<String> resultQuery = helper.pop();\n parsedQuery = resultQuery instanceof String ? new Subquery(resultQuery) : (Subquery) resultQuery;\n computeUniqueNotation(parsedQuery);\n\n if (parts.length < 2) {\n return;\n }\n\n // Parse sorting properties\n if (parts[1].contains(\"relevance\")) {\n property = \"RELEVANCE\";\n } else if (parts[1].contains(\"popularity\")) {\n property = \"POPULARITY\";\n }\n\n if (parts[1].contains(\"asc\")) {\n direction = 1;\n } else if (parts[1].contains(\"desc\")) {\n direction = -1;\n }\n }", "private static void printResult(int num, Pair<String,Double> document, String path, String query) throws IOException {\r\n\r\n FileReader r = new FileReader(new File(path+\"/\"+document.getFirst().replace(\".txt\",\".html\")));\r\n BufferedReader br = new BufferedReader(r);\r\n\r\n String line;\r\n String text = \"\";\r\n while ( (line=br.readLine()) != null) {\r\n text += line;\r\n }\r\n\r\n Document html = Jsoup.parse(text);\r\n\r\n System.out.printf(\"Document #%d.\\n\", num);\r\n if (document.getSecond().isNaN()) System.out.printf(\"\\tSimilarity: Not avaiable\\n\");\r\n else System.out.printf(\"\\tSimilarity: %s %% \\n\",document.getSecond()*100);\r\n\r\n\r\n System.out.printf(\"\\tTitle: %s\\n\",html.title());\r\n\r\n System.out.println();\r\n\r\n System.out.printf(\"\\tSentence: %s\\n\", lookForSentenceWhichContains(query.split(\"\\\\s\"),\"documents/\"+document.getFirst().replace(\".txt\",\".html\")));\r\n\r\n }", "public PostingsList phrase_query(Query query){\n\n LinkedList<PostingsList> listQueriedPostings = new LinkedList<PostingsList>();\n // List with postings corresponding to the queries\n for (int i = 0; i<query.size(); i++){\n // If any query has zero matches, return 0 results\n //if(!(new File(\"postings/t\"+hash(query.terms.get(i))+\".json\")).exists()){\n if (!this.index.containsKey(query.terms.get(i))){\n return null;\n }\n // Otherwise store postings in the list\n listQueriedPostings.add(this.getPostings(query.terms.get(i)));\n }\n\n PostingsList result = new PostingsList();\n result = listQueriedPostings.get(0);\n\n // In case only one word is queried\n if (listQueriedPostings.size() == 1){\n return result;\n }\n\n // Apply algorithm as many times as words in the query\n for(int i = 1; i < listQueriedPostings.size(); i++){\n result = phrase_query(result, listQueriedPostings.get(i));\n if (result.isEmpty()){\n return null;\n }\n }\n return result;\n }", "void runQueries();", "public CQLQueryResults processQuery(CQLQuery cqlQuery) throws MalformedQueryException, \r\n\t QueryProcessingException {\r\n\t\tthrow new RuntimeException(\"not impl yet. port from ncia-core-grid-transfer\");\r\n\t}", "public void parseUserQuery(String userQuery) {\n\t\tuserQuery = userQuery.toUpperCase();\n\t\tString[] selectStage;\n\t\tselectStage = userQuery.split(\"SELECT\\\\s*|\\\\s*FROM\\\\s*\");\n\t\tcolumnNames = new ArrayList<String>(Arrays.asList(selectStage[1].split(\",\\\\s*\")));\n\t\tString[] fromStage = selectStage[2].split(\"\\\\s*WHERE\\\\s*\");\n\t\tfromStage[0] = fromStage[0].replaceAll(\";\", \"\");\n\t\ttableNames = new ArrayList<String>(Arrays.asList(fromStage[0].split(\",\\\\s\")));\n\t\tif (fromStage.length > 1) {\n\t\t\tfromStage[1] = fromStage[1].replaceAll(\";\", \"\");\n\t\t\tList<String> conditions = new ArrayList<String>(Arrays.asList(fromStage[1].split(\"\\\\sAND\\\\s\")));\n\t\t\tseparateConditions(conditions);\n\t\t}\n\t}", "@Test \r\n\tpublic void testQParse() throws ParseError, IOException {\n\t\t\r\n\r\n\r\n\t}", "private void addQueries(String query){\n ArrayList <String> idsFullSet = new ArrayList <String>(searchIDs);\n while(idsFullSet.size() > 0){\n ArrayList <String> idsSmallSet = new ArrayList <String>(); \n if(debugMode) {\n System.out.println(\"\\t Pmids not used in query available : \" + idsFullSet.size());\n }\n idsSmallSet.addAll(idsFullSet.subList(0,Math.min(getSearchIdsLimit(), idsFullSet.size())));\n idsFullSet.removeAll(idsSmallSet);\n String idsConstrain =\"\";\n idsConstrain = idsConstrain(idsSmallSet);\n addQuery(query,idsConstrain);\n }\n }", "public void queryDataPreProcess(String queryText) throws Exception {\n StopwordRemover stopwordRemover = new StopwordRemover();\n WordNormalizer wordNormalizer = new WordNormalizer();\n\n // initiate the BufferedWriter to output result\n FilePathGenerator fpg = new FilePathGenerator(\"result.txt\");\n String path = fpg.getPath();\n\n // queryId\n String queryId = \"\";\n if (queryId == null || queryId.length() == 0){\n// queryId = UUID.randomUUID().toString().replace(\"-\", \"\");\n queryId = String.valueOf(FileConst.query_doc_id);\n }\n\n // append query_id:query_text to exiting doc_id:doc_content text file\n try (FileWriter fileWriter = new FileWriter(path, true); // Path.ResultAssignment1\n BufferedWriter bw = new BufferedWriter(fileWriter)){\n // write doc_id into the result file\n bw.write(queryId + '\\n');\n\n // load doc content\n char[] content = queryText.toCharArray();\n\n // initiate a word object to hold a word\n char[] word;\n\n // initiate the WordTokenizer\n WordTokenizer tokenizer = new WordTokenizer(content);\n\n // process the query word by word iteratively\n while ((word = tokenizer.nextWord()) != null){\n word = wordNormalizer.lowercase(word);\n // write only non-stopword into result file\n if (!stopwordRemover.isStopword(Arrays.toString(word))){\n bw.append(wordNormalizer.toStem(word)).append(\" \");\n query_tokens.add(wordNormalizer.toStem(word));\n }\n }\n bw.append(\"\\n\");\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void searchAndWriteQueryResultsToOutput() {\n\n List<String> queryList = fu.textFileToList(QUERY_FILE_PATH);\n\n for (int queryID = 0; queryID < queryList.size(); queryID++) {\n String query = queryList.get(queryID);\n // ===================================================\n // 4. Sort the documents by the BM25 scores.\n // ===================================================\n HashMap<String, Double> docScore = search(query);\n List<Map.Entry<String, Double>> rankedDocList =\n new LinkedList<Map.Entry<String, Double>>(docScore.entrySet());\n Collections.sort(rankedDocList, new MapComparatorByValues());\n\n // ===================================================\n // 5. Write Query Results to output\n // =================================================== \n String outputFilePath =\n RANKING_RESULTS_PATH + \"queryID_\" + (queryID + 1) + \".txt\";\n StringBuilder toOutput = new StringBuilder();\n // display results in console\n System.out.println(\"Found \" + docScore.size() + \" hits.\");\n int i = 0;\n for (Entry<String, Double> scoreEntry : rankedDocList) {\n if (i >= NUM_OF_RESULTS_TO_RETURN)\n break;\n String docId = scoreEntry.getKey();\n Double score = scoreEntry.getValue();\n String resultLine =\n (queryID + 1) + \" Q0 \" + docId + \" \" + (i + 1) + \" \" + score + \" BM25\";\n toOutput.append(resultLine);\n toOutput.append(System.getProperty(\"line.separator\"));\n System.out.println(resultLine);\n i++;\n }\n fu.writeStringToFile(toOutput.toString(), outputFilePath);\n }\n }", "void collectQuery(String system, int processNo, int processQueryNo, String query, double coverage, int pathCount, QueryPathList qpl, PrintStream output) throws SQLException {\n\t\t// Get all paths to print\n\t\t/*\nSELECT DISTINCT pathNo\nFROM evaluation\nWHERE algorithm = 'evosql' \n\tAND system = {system} AND processNo = {processNo} and queryNo = {processQueryNo}\n\tAND success = 0 \n\t\t */\n\t\tString sql = \"SELECT pathNo, SUM(success) success, SUM(1 - success) failures, GROUP_CONCAT(message SEPARATOR ' | ') messages \\r\\n\" + \n\t\t\t\t\"FROM evaluation\\r\\n\" + \n\t\t\t\t\"WHERE algorithm = 'evosql'\\r\\n\" + \n\t\t\t\t\"\tAND system = ? AND processNo = ? and queryNo = ?\\r\\n\" + \n\t\t\t\t\"GROUP BY pathNo\\r\\n\" + \n\t\t\t\t\"HAVING SUM(1 - success) > 0\\r\\n\" + \n\t\t\t\t\"ORDER BY pathNo\";\n\t\t\n\t\tPreparedStatement stmt = conn.prepareStatement(sql);\n\t\tstmt.setString(1, system);\n\t\tstmt.setInt(2, processNo);\n\t\tstmt.setInt(3, processQueryNo);\n\t\tResultSet result = stmt.executeQuery();\n\t\t/*\n\t\t// Print query info\n\t\toutput.print(\"\\n===================================\\n\");\n\t\toutput.print(\"Query: \" + system + \" - Process \" + processNo + \" query \" + processQueryNo + \"\\n\");\n\t\toutput.print(\"Coverage: \" + String.format(\"%.2f\", coverage) + \"\\n\");\n\t\toutput.print(getBeautifulSql(query));\n\t\toutput.print(\"\\n===================================\\n\");\n*/\n\t\tif (query.contains(\"EXISTS\") || query.contains(\"exists\"))\n\t\t\tthis.queriesExists += 1;\n\t\t\n\t\twhile (result.next()) {\n\t\t\tint pathNo = result.getInt(1);\n\t\t\tString pathSql = qpl.pathList.get(pathNo - 1);\n\t\t\tint successes = result.getInt(2);\n\t\t\tint failures = result.getInt(3);\n\t\t\tString messages = result.getString(4);\n\t\t\tif (successes > 0) continue;\n\t\t\t// Print Path info\n\t\t\toutput.print(\"\\n-----------------------------------\\n\");\n\t\t\toutput.print(\"Query: \" + system + \"-process\" + processNo + \", query \" + processQueryNo + \"\\n\");\n\t\t\toutput.print(\"Path \" + pathNo + \"/\" + pathCount + \" - \" + successes + \" successes, \" + failures + \" failures\\n\");\n\t\t\toutput.print(\"Failure messages: \" + messages + \"\\n\");\n\t\t\toutput.print(getBeautifulSql(pathSql));\n\t\t\toutput.print(\"\\n-----------------------------------\\n\");\n\n\t\t\tSystem.out.println(system + \"\\t\" + processNo + \"\\t\" + processQueryNo + \"\\t\" + pathNo);\n\t\t\t\n\t\t\tif (pathSql.contains(\"EXISTS\") || pathSql.contains(\"exists\"))\n\t\t\t\tthis.pathsExists += 1;\n\t\t}\n\t}", "private static String addQueryEntry(String query) throws IOException {\n\t\t\t\t\n\t\tString submittedQuery=null;\n\t\tString queryParts[]=query.split(\"&\"); // get parameters from query\t\t\n\t\tboolean isNextPage=false;\n\t\tString key=null;\n\t\tInteger value=null;\n\t\tboolean docsProcessed=false; // identifies if 'docs' occurs more than once in the query\t\t\n\t\tboolean termsProcessed=false; // identifies if 'terms' occurs more than once in the query\n\t\t\n\t\t// identify if it is a next page\n\t\tfor (int i=0;i<queryParts.length;i++) { // verifies if it is a next page\n\t\t\tString queryPartsFields[]=queryParts[i].split(\"=\",2);\t\t\t\n\t\t\tqueryPartsFields[0]=queryPartsFields[0].trim();\n\t\t\tif (queryPartsFields.length>1) {\n\t\t\t\tqueryPartsFields[1]=queryPartsFields[1].trim();\n\t\t\t}\n\t\t\t\n\t\t\tif (queryPartsFields[0].equals(DOCS_KEY) && queryPartsFields.length>1 && !queryPartsFields[1].equals(\"\")) {\t\t\t\n\t\t\t\tint ipage;\n\t\t\t\ttry {\n\t\t\t\t\tipage=Integer.parseInt(queryPartsFields[1]);\n\t\t\t\t}\n\t\t\t\tcatch (NumberFormatException e) {\n\t\t\t\t\tipage=0;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (ipage!=0) { // regist only pages>0 \t\t\t\t\t\t\t\n\t\t\t\t\tisNextPage=true;\t\t\t\n\t\t\t\t\tif (ipage%RESULTS_PER_PAGE!=0) {\n\t\t\t\t\t\tSystem.err.println(\"Page results not multiple of \"+RESULTS_PER_PAGE+\": \"+ipage);\n\t\t\t\t\t\tipage+=ipage%RESULTS_PER_PAGE;\n\t\t\t\t\t}\n\t\t\t\t\tif (!docsProcessed) {\n\t\t\t\t\t\tint index=ipage/RESULTS_PER_PAGE>pagesViewedDistAux.length-1 ? pagesViewedDistAux.length-1 : ipage/RESULTS_PER_PAGE;\t\t\t\n\t\t\t\t\t\tif (index==0) { // sanity check\n\t\t\t\t\t\t throw new IOException(\"Error of index=0 on a next page. ipage:\"+ipage);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tpagesViewedDistAux[index]++;\n\t\t\t\t\t}\n\t\t\t\t\tdocsProcessed=true;\t\t\t\t\n\t\t\t\t}\t\t\t\t\t\t\n\t\t\t}\n\t\t\telse if (queryPartsFields[0].equals(QUERY_KEY)) {\n\t\t\t\ttermsProcessed=true;\n\t\t\t}\n\t\t}\n\t\t// check wrong entries\n\t\tif (docsProcessed && !termsProcessed) {\n\t\t\tSystem.err.println(\"Error of query with docs without terms: \"+query);\n\t\t\treturn null;\n\t\t}\t\t\t\t\n\t\tif (isNextPage) {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\t// count only first page\n\t\tdocsProcessed=false;\n\t\tfor (int i=0;i<queryParts.length;i++) {\t\t\t\t\t\t\t\t\t\n\t\t\tString queryPartsFields[]=queryParts[i].split(\"=\",2);\t\t\t\n\t\t\tqueryPartsFields[0]=queryPartsFields[0].trim();\n\t\t\t\n\t\t\tif (!queryPartsFields[0].equals(QUERY_KEY) || queryPartsFields.length!=2) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t// normalize query\t\t\t\n\t\t\ttry {\n\t\t\t\tqueryPartsFields[1]=decodeStrings(decodeNCR(java.net.URLDecoder.decode(queryPartsFields[1],\"ISO8859-1\").toLowerCase()));\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t}\n\t\t\tcatch(IllegalArgumentException e) {\n\t\t\t\tqueryPartsFields[1]=decodeStrings(decodeNCR(queryPartsFields[1].toLowerCase()));\n\t\t\t}\n\t\t\t// remove spaces\n\t\t\tString terms[]=queryPartsFields[1].split(\"\\\\s\");\n\t\t\tqueryPartsFields[1]=\"\";\n\t\t\tfor (int j=0,k=0;j<terms.length;j++) {\t\t\t\t\t\n\t\t\t\tif (terms[j].equals(\"\")) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\t\t\t\t\t\n\t\t\t\tif (k>0) {\n\t\t\t\t\tqueryPartsFields[1]+=\" \";\t\n\t\t\t\t}\n\t\t\t\tqueryPartsFields[1]+=terms[j];\t\t\t\t\t\n\t\t\t\tk++;\n\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t// filter queries\t\t\t\t\t\n\t\t\tif (queryFiltersMap.containsKey(queryPartsFields[1]) || queryPartsFields[1].startsWith(\"cache%3\") || queryPartsFields[1].equals(\"\")) {\t\t\t\t\n\t\t\t\tcontinue;\n\t\t\t}\t\t\t\t\t\t\t\t\n\t\t\t// set first page viewed\n\t\t\tif (!docsProcessed) {\n\t\t\t\tpagesViewedDistAux[0]++;\n\t\t\t\tdocsProcessed=true;\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t//key=queryPartsFields[0]+\" \"+queryPartsFields[1];\n\t\t\tkey=NEW_QUERY_KEY+\" \"+queryPartsFields[1];\t\t\t\n\t\t\tif ((value=queryPartsMap.get(key))==null) {\n\t\t\t\tqueryPartsMap.put(key,1);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tqueryPartsMap.put(key,value+1);\n\t\t\t}\n\t\t\t\n\t\t\t// set submitted query\n\t\t\tif (submittedQuery!=null) { // sanity check\n\t\t\t\tthrow new IOException(\"Submitted query already set.\");\n\t\t\t}\n\t\t\tsubmittedQuery=queryPartsFields[1];\n\t\t\t\t\n\t\t\t// count queries per session\t\n\t\t\tnQueriesSession++;\n\t\t}\n\t\treturn submittedQuery;\n\t}", "public ArrayList<Query> processQuery(String[] questionQueryLines){\r\n\t\t\r\n\t\tArrayList<Query> queryReplyList = new ArrayList<Query>();\r\n\t\tfor (String query : questionQueryLines) {\r\n\t\t\t\r\n\t\t\tif (query.toLowerCase().startsWith(galacticToRomanQry)){\r\n\t\t\t\tQuery galacticToRomanQuery = QueryFactory.GalacticToRomanQuery(query);\r\n\t\t\t\tqueryReplyList.add(galacticToRomanQuery);\r\n\t\t\t}\r\n\t\t\telse if (query.toLowerCase().startsWith(metalPriceQry)){\r\n\t\t\t\tQuery metalPriceQuery = QueryFactory.MetalPriceQuery(query);\r\n\t\t\t\tqueryReplyList.add(metalPriceQuery);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn queryReplyList;\r\n\t}", "public static void main(String[] args) {\n TwoThreeTree tree = new TwoThreeTree();\n Scanner input = new Scanner(System.in);\n int numOfLines = input.nextInt();\n \n for (int i = 0; i < numOfLines + 1; i++) {\n String query = input.nextLine();\n String[] data = query.split(\" \");\n \n if (data[0].equals(\"1\")) {\n tree.insert(data[1], Integer.parseInt(data[2]), tree.root, tree.height);\n }\n else if (data[0].equals(\"2\")) {\n System.out.println(search(data[1], tree.root, tree.height));\n }\n }\n }", "public Query getFinalQuery(String field) throws ParseException;", "public QueryCore(String query)\n {\n this.query = query;\n }", "private ParsedQuery parseQuery(Layer layer, Query query) {\n PlainSelect plainSelect;\n try {\n Select select = (Select) CCJSqlParserUtil.parse(query.getSql());\n plainSelect = (PlainSelect) select.getSelectBody();\n } catch (JSQLParserException e) {\n String message =\n String.format(\n \"The layer '%s' contains a malformed query.\\n\" + \"\\tQuery:\\n\\t\\t%s\",\n layer.getId(), query.getSql());\n throw new IllegalArgumentException(message, e);\n }\n\n // Check the number of columns\n if (plainSelect.getSelectItems().size() != 3) {\n String message =\n String.format(\n \"The layer '%s' contains a malformed query.\\n\"\n + \"\\tExpected format:\\n\\t\\tSELECT c1::bigint, c2::hstore, c3::geometry FROM t WHERE c\\n\"\n + \"\\tActual query:\\n\\t\\t%s\",\n layer.getId(), query.getSql());\n throw new IllegalArgumentException(message);\n }\n\n // Remove all the aliases\n for (SelectItem selectItem : plainSelect.getSelectItems()) {\n selectItem.accept(\n new SelectItemVisitorAdapter() {\n @Override\n public void visit(SelectExpressionItem selectExpressionItem) {\n selectExpressionItem.setAlias(null);\n }\n });\n }\n return new ParsedQuery(layer, query, plainSelect);\n }", "private QueryAndProgram queryAndProgFind(ProgramPath pp,String queryClause,String qp) {\n Optional opt = queryAndProgramLink.stream().filter(p -> p.qtp.queryClause.equals(queryClause) \n && p.getPaths().stream().anyMatch(q -> q.pathId.equals(pp.pathId))\n && p.queryPoint.equals(qp)).findFirst();\n // && p.getPaths().contains(pp)).findFirst();\n if(opt.isPresent())\n return (QueryAndProgram)opt.get();\n return null;\n \n \n }", "public static void main(String[] args) {\n StudentDatabase database = null;\n\n try {\n List<String> lines = Files.readAllLines(\n Paths.get(\"./database.txt\"),\n StandardCharsets.UTF_8\n );\n\n database = new StudentDatabase(lines);\n } catch (IOException exc) {\n System.out.println(\"Error while reading the database. Terminating...\");\n System.exit(-1);\n }\n\n try (Scanner sc = new Scanner(System.in)) {\n while (true) {\n System.out.print(\"> \");\n\n if (sc.hasNext()) {\n String input = sc.nextLine().trim();\n\n if (input.equalsIgnoreCase(\"exit\")) {\n System.out.println(\"Goodbye!\");\n break;\n }\n\n if (input.startsWith(\"query \")) {\n String query = input.substring(6);\n\n try {\n List<StudentRecord> printList = query(query, database);\n\n List<String> output = RecordFormatter.format(printList);\n output.forEach(System.out::println);\n System.out.printf(\"%n\");\n } catch (QueryException exc) {\n System.out.println(\"Invalid query.\\n\");\n }\n } else {\n System.out.println(\"Invalid command.\\n\");\n }\n }\n }\n }\n }", "public static void parseQueryString(String queryString) {\n Pattern pattern = Pattern.compile(\".+\\\\bfrom\\\\b\\\\s+(\\\\w+)\");\n Matcher matcher = pattern.matcher(queryString);\n if(matcher.find()){\n \t//System.out.println(\"got it\");\n \tString tableName = matcher.group(1);\n \t//System.out.println(\"Table Name\"+tableName);\n \tString fileName = \"data/user_data/\"+tableName+\".tbl\";\n \tUserDataHandler table = new UserDataHandler(fileName);;\n table.displayTable(fileName, tableName);\n }\n }", "public void testUsingQueriesFromQueryManger(){\n\t\tSet<String> names = testDataMap.keySet();\n\t\tUtils.prtObMess(this.getClass(), \"atm query\");\n\t\tDseInputQuery<BigDecimal> atmq = \n\t\t\t\tqm.getQuery(new AtmDiot());\n\t\tMap<String, ComplexQueryResult<BigDecimal>> bdResult = \n\t\t\t\tatmq.get(names, 1, TimeUnit.SECONDS);\n\t\tCollectionsStaticMethods.prtMapItems(bdResult);\n\n\t\tUtils.prtObMess(this.getClass(), \"vol query\");\n\t\tDseInputQuery<BigDecimal> volq = \n\t\t\t\tqm.getQuery(new VolDiotForTest());\n\t\tMap<String, ComplexQueryResult<BigDecimal>> dbResult = \n\t\t\t\tvolq.get(names, 1, TimeUnit.SECONDS);\n\t\tCollectionsStaticMethods.prtMapItems(dbResult);\n\t\n\t\tUtils.prtObMess(this.getClass(), \"integer query\");\n\t\tDseInputQuery<BigDecimal> strikeq = \n\t\t\t\tqm.getQuery(new StrikeDiotForTest());\n\t\tMap<String, ComplexQueryResult<BigDecimal>> strikeResult = \n\t\t\t\tstrikeq.get(names, 1, TimeUnit.SECONDS);\n\t\tCollectionsStaticMethods.prtMapItems(strikeResult);\n\t\n\t}", "public static void main(String[] args) {\n //Instantiate a new instance of the Queries class called query\n Queries query = new Queries();\n //Instantiate empty strings called search, queryTerm, and cache\n String search = \"\";\n String queryTerm = \"\";\n String cache = \"\";\n\n //For each item in the arguments array\n for (int i = 0; i < args.length; i++) {\n //If the item is --search, run the following\n if (args[i].equals(\"--search\")) {\n //If --search is the last argument, set the search string to null\n if (i == args.length - 1) {\n search = null;\n }\n //Otherwise set the search string to the next argument\n else {\n search = args[i + 1];\n }\n }\n //If the item is --query run the following\n if (args[i].equals(\"--query\")) {\n //If --query is the last argument, set the queryTerm string to null\n if (i == args.length - 1) {\n queryTerm = null;\n }\n else {\n //Add the next item to the query string\n queryTerm = args[i + 1];\n //Instantiate an integer called j as i+1\n int j = i + 1;\n //While j is less than the number of arguments -1, and the argument\n //after j isn't --search or --cache and queryTerm isn't --search or --cache, add the j+1 argument to the queryTerm string\n while (j < args.length - 1 && !args[j + 1].equals(\"--search\") && !args[j + 1].equals(\"--cache\") && !queryTerm.equals(\"--search\") && !queryTerm.equals(\"--cache\")) {\n queryTerm += \" \" + args[j + 1];\n j++;\n }\n }\n }\n //If the item is --cache, run the following\n if (args[i].equals(\"--cache\")) {\n //If --cache is the last argument, set the cache string to null\n if (i == args.length - 1) {\n cache = null;\n }\n //Otherwise, set the cache string to the next argument\n else {\n cache = args[i + 1];\n }\n }\n }\n //Create a new file object from the cache\n File folder = new File(cache);\n //Instantiate a boolean variable called noErrors to true\n Boolean noErrors = true;\n //If the queryTerm string is null, --cache, or --search (indicating a missing argument), print\n //the appropriate error message and set noErrors to false\n if (queryTerm == null || queryTerm.equals(\"--cache\") || queryTerm.equals(\"--search\")) {\n System.out.println(\"Missing value for --query\\n\"\n + \"Malformed command line arguments.\");\n noErrors = false;\n }\n //If the search string is null, --cache, or --query (indicating a missing argument), print\n //the appropriate error message and set noErrors to false\n else if (search == null || search.equals(\"--cache\") || search.equals(\"--query\")) {\n System.out.println(\"Missing value for --search\\n\"\n + \"Malformed command line arguments.\");\n noErrors = false;\n }\n //If the search string isn't any of the valid search options, print the appropriate error messages and set noErrors to false\n else if (!search.equals(\"author\") && !search.equals(\"publication\") && !search.equals(\"venue\")) {\n System.out.println(\"Invalid value for --search: \" + search);\n System.out.println(\"Malformed command line arguments.\");\n noErrors = false;\n }\n //If the folder created from the cache string isn't a directory, print the appropriate error messages and set noErrors to false\n else if (!folder.isDirectory()) {\n System.out.println(\"Cache directory doesn't exist: \" + cache);\n noErrors = false;\n }\n //If noErrors is true, call the appropriate query with the queryTerm string and folder as parameters\n if (noErrors) {\n if (search.equals(\"author\")) {\n query.authorSearch(queryTerm, folder);\n }\n else if (search.equals(\"venue\")) {\n query.venueSearch(queryTerm, folder);\n }\n else if (search.equals(\"publication\")) {\n query.publicationSearch(queryTerm, folder);\n }\n }\n\n }", "public Query parseQuery(String query) {\n\t\tint start = 0;\n\n\t\t// General routine: scan the query to identify a literal, and put that literal into a list.\n\t\t//\tRepeat until a + or the end of the query is encountered; build an AND query with each\n\t\t//\tof the literals found. Repeat the scan-and-build-AND-query phase for each segment of the\n\t\t// query separated by + signs. In the end, build a single OR query that composes all of the built\n\t\t// AND subqueries.\n\n\t\tList<Query> allSubqueries = new ArrayList<>();\n\t\tdo {\n\t\t\t// Identify the next subquery: a portion of the query up to the next + sign.\n\t\t\tStringBounds nextSubquery = findNextSubquery(query, start);\n\t\t\t// Extract the identified subquery into its own string.\n\t\t\tString subquery = query.substring(nextSubquery.start, nextSubquery.start + nextSubquery.length);\n\n\t\t\tint subStart = 0;\n\n\t\t\t// Store all the individual components of this subquery.\n\t\t\tList<Query> subqueryLiterals = new ArrayList<>(0);\n\n\t\t\tdo {\n\t\t\t\t// Extract the next literal from the subquery.\n\t\t\t\tLiteral lit = findNextLiteral(subquery, subStart);\n\n\t\t\t\t// Add the literal component to the conjunctive list.\n\t\t\t\tsubqueryLiterals.add(lit.literalComponent);\n\n\t\t\t\t// Set the next index to start searching for a literal.\n\t\t\t\tsubStart = lit.bounds.start + lit.bounds.length;\n\n\t\t\t} while (subStart < subquery.length()-1);\n\n\t\t\t// After processing all literals, we are left with a conjunctive list\n\t\t\t// of query components, and must fold that list into the final disjunctive list\n\t\t\t// of components.\n\n\t\t\t// If there was only one literal in the subquery, we don't need to AND it with anything --\n\t\t\t// its component can go straight into the list.\n\t\t\tif (subqueryLiterals.size() == 1) {\n\t\t\t\tallSubqueries.add(subqueryLiterals.get(0));\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// With more than one literal, we must wrap them in an AndQuery component.\n\t\t\t\tallSubqueries.add(new AndQuery(subqueryLiterals));\n\t\t\t}\n\t\t\tstart = nextSubquery.start + nextSubquery.length;\n\t\t} while (start < query.length());\n\n\t\t// After processing all subqueries, we either have a single component or multiple components\n\t\t// that must be combined with an OrQuery.\n\t\tif (allSubqueries.size() == 1) {\n\t\t\treturn allSubqueries.get(0);\n\t\t}\n\t\telse if (allSubqueries.size() > 1) {\n\t\t\treturn new OrQuery(allSubqueries);\n\t\t}\n\t\telse {\n\t\t\treturn null;\n\t\t}\n\t}", "public static void findDependencies(String query) throws Exception\n {\n if (query.trim().equalsIgnoreCase(\"exit\"))\n {\n System.exit(0);\n }\n \n String sentence;\n String[] tokens;\n String[] posTags;\n ParseInfo[] parseInfoArr;\n sentence = query;\n\n sentence = sentence.toLowerCase();\n tokens = tokenizer.tokenize(sentence);\n posTags = posTagger.tag(tokens);\n System.out.println();\n\n System.out.println(WHITE_BRIGHT + \"Index\" + \"\\t\" + \"Tokens\" + \"\\t\" + \"POS Tags\");\n parseInfoArr = MaltUtils.getParseInfoArray(tokens, posTags);\n Arrays.stream(parseInfoArr).forEach(x -> System.out.println(x.getIndex() + \"\\t\" + x.getToken() + \"\\t\" + x.getPosTag()));\n DependencyStructure graph = service.parse(MaltUtils.getConllXInput(tokens, posTags));\n\n SortedSet<Edge> edges = graph.getEdges();\n\n MaltUtils.printParseResult3(edges, tokens);\n MaltUtils.printconllX(edges, tokens, posTags);\n\n }", "public static void testQuery() {\n\t\tParameters parameters = new Parameters();\r\n\t\tparameters.setUrl(\"VchicleServlet.json?action=pagequery\");\r\n\t\tparameters.setList(new ArrayList<NameValuePair>());\r\n\t\tparameters.getList().add(new BasicNameValuePair(\"pageSize\", \"2\"));\r\n\t\tparameters.getList().add(new BasicNameValuePair(\"currPage\", \"3\"));\r\n\t\t@SuppressWarnings(\"unused\")\r\n\t\tString string = (String) MainUtilityTools.execute(parameters);\r\n\t}", "public static void main(String[] args) {\n\t\tSystem.out.println(queryporder.querySum(0, 60));\n\t\tSystem.out.println(queryporder.queryName(\"郭靖\"));\n\t\tSystem.out.println(queryporder.queryAll());\n\t\t\n\t\t//List l = queryporder.queryAll();\n\t\t//List l = queryporder.querySum(0, 60);\n\t\tList l = queryporder.queryName(\"郭靖\");\n\t\tfor(Object o : l) {\n\t\t\tporder p = (porder)o;\n\t\t\tSystem.out.println(\n\t\t\t\tp.getId()+\",\"+\n\t\t\t\tp.getName()+\",\"+\n\t\t\t\tp.getProduct1()+\",\"+\n\t\t\t\tp.getProduct2()+\",\"+\n\t\t\t\tp.getProduct3()+\",\"+\n\t\t\t\tp.getSum()+\",\"+\n\t\t\t\tp.getDiscount()\n\t\t\t\t\t\n\t\t\t\t\t);\n\t\t}\n\t\t\n\t}", "String getQuery();", "private static StringBuffer generateProvenanceProcedure(String query,\n\t int qIndex) {\n\n\t/*\n\t * First, we need the list of the FROM clause atoms/aliases that we will\n\t * use to augment the SELECT clause with ROWIDs. assume the query is an\n\t * SPJ Select .... From... Where .\n\t */\n\tString uQuery = query.toUpperCase();\n\n\tint fromIndex = uQuery.indexOf(\"FROM\");\n\tint whereIndex = uQuery.indexOf(\"WHERE\");\n\n\tif (whereIndex == -1) {\n\t whereIndex = uQuery.length();\n\t}\n\tString fromClause = query.substring(fromIndex + 4, whereIndex - 1)\n\t\t.trim();\n\t// System.out.println(\"From: \"+fromClause);\n\tStringTokenizer st = new StringTokenizer(fromClause, \",\");\n\n\t// Keep the list of FROM clause atoms\n\tList<String> fromAtoms = new ArrayList<String>();\n\twhile (st.hasMoreTokens()) {\n\t String thisFromAtom = st.nextToken().trim();\n\n\t // System.out.println(\"Atom:\"+thisFromAtom);\n\n\t // bug fixed\n\t // bug: didn't consider \"as\"\n\t if (thisFromAtom.contains(\"as\")) {\n\t\tStringTokenizer atomTok = new StringTokenizer(thisFromAtom,\n\t\t\t\"as\");\n\t\tString atomAlias = atomTok.nextToken();\n\t\tif (atomTok.hasMoreTokens())\n\t\t atomAlias = atomTok.nextToken();\n\t\tfromAtoms.add(atomAlias);\n\t } else if (thisFromAtom.contains(\"AS\")) {\n\t\tStringTokenizer atomTok = new StringTokenizer(thisFromAtom,\n\t\t\t\"AS\");\n\t\tString atomAlias = atomTok.nextToken();\n\t\tif (atomTok.hasMoreTokens())\n\t\t atomAlias = atomTok.nextToken();\n\t\tfromAtoms.add(atomAlias);\n\t } else {\n\t\tStringTokenizer atomTok = new StringTokenizer(thisFromAtom, \" \");\n\t\tString atomAlias = atomTok.nextToken();\n\t\tif (atomTok.hasMoreTokens())\n\t\t atomAlias = atomTok.nextToken();\n\t\tfromAtoms.add(atomAlias);\n\t }\n\n\t // original code from Bogdan\n\t // StringTokenizer atomTok = new StringTokenizer(thisFromAtom,\" \");\n\t // String atomAlias = atomTok.nextToken();\n\t // if(atomTok.hasMoreTokens())\n\t // atomAlias=atomTok.nextToken();\n\t // fromAtoms.add(atomAlias);\n\n\t}\n\n\t// System.out.println(\"FROM atoms:\"+fromAtoms);\n\n\t/*\n\t * the extension to the SELECT clause which will be used to extract the\n\t * ROWIDs of the source tuples (why-provenance)\n\t */\n\tStringBuffer selectExtension = new StringBuffer();\n\tfor (int i = 1; i <= fromAtoms.size(); i++) {\n\t String fromAtom = fromAtoms.get(i - 1);\n\t selectExtension.append(\", \" + fromAtom + \".\"\n\t\t + Parameters.ROWID_ATT_NAME);\n\t selectExtension.append(\" as src\" + i + \"_ID\");\n\t}\n\tselectExtension.append(\"\\n\\t\\t \");\n\n\t// System.out.println(\"Select extension: \"+selectExtension);\n\tStringBuffer buffer = new StringBuffer();\n\t// buffer.append(\"DELIMITER !\\n\");\n\tbuffer.append(\"CREATE PROCEDURE \" + Parameters.TRACK_PROV_PROCNAME\n\t\t+ \"()\\n\");\n\tbuffer.append(\"BEGIN\\n\\n\");\n\tbuffer.append(\"\\t declare deriv_no int default 0;\\n\");\n\tbuffer.append(\"\\t declare done int default 0;\\n\\n\");\n\n\t// declare res_id_var, src1_id_var, src2_id_var int;\n\tbuffer.append(\"\\t declare res_id_var\");\n\tfor (int i = 1; i <= fromAtoms.size(); i++) {\n\t buffer.append(\", src\" + i + \"_id_var\");\n\t}\n\tbuffer.append(\" int;\\n\");\n\t// declare prov_cursor cursor for\n\t// select __ROWID, src1_ID, src2_ID\n\t// from Q1_RES q_result\n\t// natural join\n\t// (\n\t// select r1.A as A, r1.__ROWID as src1_ID, r2.__ROWID as src2_ID\n\t// from R r1, R r2\n\t// where r1.B=r2.A\n\t// ) prov_query;\n\tbuffer.append(\"\\t declare prov_cursor cursor for\\n\");\n\tbuffer.append(\"\\t\\t select \" + Parameters.ROWID_ATT_NAME);\n\tfor (int i = 1; i <= fromAtoms.size(); i++) {\n\t buffer.append(\", src\" + i + \"_ID\");\n\t}\n\tbuffer.append(\"\\n\");\n\tbuffer.append(\"\\t\\t from \" + Parameters.QUERY_RESULT_PREFIX + qIndex\n\t\t+ Parameters.QUERY_RESULT_SUFFIX);\n\tbuffer.append(\" q_result\\n\");\n\tbuffer.append(\"\\t\\t natural join\\n\");\n\tbuffer.append(\"\\t\\t (\\n\");\n\t// the augmented query here:\n\tStringBuffer queryBuf = new StringBuffer(query);\n\tqueryBuf.insert(fromIndex, selectExtension); // right before the FROM\n\t\t\t\t\t\t // clause\n\tbuffer.append(\"\\t\\t \" + queryBuf + \"\\n\");\n\tbuffer.append(\"\\t\\t ) prov_query;\\n\\n\");\n\tbuffer.append(\"\\t declare continue handler for not found set done = 1;\\n\\n\");\n\tbuffer.append(\"\\t open prov_cursor;\\n\\n\");\n\tbuffer.append(\"\\t read_loop: loop\\n\\n\");\n\tbuffer.append(\"\\t\\t fetch prov_cursor into res_id_var\");\n\t// , src1_id_var, src2_id_var;\n\tfor (int i = 1; i <= fromAtoms.size(); i++) {\n\t buffer.append(\", src\" + i + \"_id_var\");\n\t}\n\tbuffer.append(\";\\n\\n\");\n\tbuffer.append(\"\\t\\t if done then leave read_loop;\\n\");\n\tbuffer.append(\"\\t\\t end if;\\n\\n\");\n\tfor (int i = 1; i <= fromAtoms.size(); i++) {\n\t buffer.append(\"\\t\\t insert ignore into PROV values (res_id_var,deriv_no,src\"\n\t\t + i + \"_id_var);\\n\");\n\t}\n\t// insert ignore into PROV values (res_id_var,deriv_no,src1_id_var);\n\t// insert ignore into PROV values (res_id_var,deriv_no,src2_id_var);\n\tbuffer.append(\"\\n\\t\\t set deriv_no = deriv_no + 1;\\n\\n\");\n\tbuffer.append(\"\\t end loop;\\n\\n\");\n\tbuffer.append(\"\\t close prov_cursor;\\n\\n\");\n\tbuffer.append(\"END\\n\");\n\treturn buffer;\n }", "private Object query(JSONObject jo, String query) {\r\n try {\r\n String[] keys = query.split(\"\\\\.\");\r\n Object r = queryHelper(jo, keys[0]);\r\n for (int i = 1; i < keys.length; i++) {\r\n r = queryHelper(jo.fromObject(r), keys[i]);\r\n }\r\n return r;\r\n } catch (JSONException e) {\r\n return \"\";\r\n }\r\n }", "public static void main(String[] args) {\n String query,input;\n int numberOfInputs;\n Scanner scan=new Scanner(System.in);\n numberOfInputs=scan.nextInt();\n for(int i=0;i<numberOfInputs;i++){\n query=scan.next();\n if(query.equals(\"add\")){\n input=scan.next();\n add(input);\n }\n if(query.equals(\"find\")){\n input=scan.next();\n find(input);\n }\n }\n\n }", "protected abstract void parse(final ArrayList<Command> cmds) throws QueryException;", "java.lang.String getQuery();", "java.lang.String getQuery();", "public static void main (String[] args) {\n EntityQuery query = new EntityQuery();\n Harvestable res = new OaiPmhResource();\n query.setFilter(\"test\", res);\n query.setAcl(\"diku\");\n query.setStartsWith(\"cf\",\"name\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"a\"));\n query.setQuery(\"(usedBy=library)\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"x\"));\n\n query = new EntityQuery();\n query.setQuery(\"(usedBy=library)\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"b\"));\n query.setQuery(\"usedBy=*library\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"c\"));\n query.setQuery(\"(=library\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"d\"));\n query.setQuery(\"usedBy=\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"e\"));\n query.setQuery(\"(usedBy!=library)\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"f\"));\n query.setQuery(\"(usedBy==library)\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"g\"));\n query.setQuery(\"(usedBy===library)\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"h\"));\n }", "public void query()\n\t{\n\t\tJSONObject queryInfo = new JSONObject();\n\t\t\n\t\ttry\n\t\t{\n\t\t\tqueryInfo.put(\"type\", \"query\");\n\t\t\t\n\t\t\tos.println(queryInfo.toString());\n\t\t\tos.flush();\n\t\t\t\n\t\t\tSystem.out.println(\"send query request : \" + queryInfo.toString());\n\t\t}\n\t\tcatch (JSONException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@SuppressWarnings({\"DuplicateExpressions\", \"DuplicatedCode\"})\n public static DataTable executeQuery(String query) throws DataFormatException, FileNotFoundException{\n if(query.isBlank()){\n throw new IllegalArgumentException(\"The query cannot be blank.\");\n }\n\n query = getItemInsideOuterParentheses(query.trim());\n\n String firstLetter = query.substring(0, 1);\n if(firstLetter.equals(MINUS) || firstLetter.equals(UNION) || firstLetter.equals(JOIN) || firstLetter.equals(CROSS_PRODUCT)){\n //noinspection GrazieInspection\n throw new IllegalArgumentException(\"The first item cannot be a two-table operator. It can't be \" + firstLetter + \", which is what you put.\");\n }\n\n //noinspection SwitchStatementWithoutDefaultBranch\n switch(query.substring(0, 4)){\n case SELECT:\n return executeQuery(getItemInsideOuterParentheses(query.substring(query.indexOf(\"}\") + 1))).selectWhere(getItemInsideOuterCurlyBraces(query.substring(query.indexOf(\"{\"), query.indexOf(\"}\") + 1)));\n case PROJECT:\n return executeQuery(getItemInsideOuterParentheses(query.substring(query.indexOf(\"}\") + 1))).project(getItemInsideOuterCurlyBraces(query.substring(query.indexOf(\"{\"), query.indexOf(\"}\") + 1)).split(\",\"));\n }\n\n int firstOperator = Integer.MAX_VALUE;\n String firstOperatorName = null;\n\n if(query.contains(MINUS)){\n firstOperator = query.indexOf(MINUS);\n firstOperatorName = MINUS;\n }\n if(query.contains(UNION) && (query.indexOf(UNION) < firstOperator)){\n firstOperator = query.indexOf(UNION);\n firstOperatorName = UNION;\n }\n if(query.contains(JOIN) && (query.indexOf(JOIN) < firstOperator)){\n firstOperator = query.indexOf(JOIN);\n firstOperatorName = JOIN;\n }\n if(query.contains(CROSS_PRODUCT) && (query.indexOf(CROSS_PRODUCT) < firstOperator)){\n firstOperator = query.indexOf(CROSS_PRODUCT);\n firstOperatorName = CROSS_PRODUCT;\n }\n if(query.contains(INTERSECT) && (query.indexOf(INTERSECT) < firstOperator)){\n firstOperator = query.indexOf(INTERSECT);\n firstOperatorName = INTERSECT;\n }\n\n if(firstOperatorName != null){\n String beforeOperator = query.substring(0, firstOperator);\n String afterOperator = query.substring(firstOperator + 1);\n\n // Since “INTE“ is not a single character, it won't work in the switch above.\n return switch(firstOperatorName){\n case MINUS -> executeQuery(beforeOperator).minus(executeQuery(afterOperator));\n case UNION -> executeQuery(beforeOperator).unionWith(executeQuery(afterOperator));\n case JOIN -> executeQuery(beforeOperator).joinWith(executeQuery(afterOperator));\n case INTERSECT -> executeQuery(beforeOperator).intersectWith(executeQuery(afterOperator));\n case CROSS_PRODUCT -> executeQuery(beforeOperator).crossWith(executeQuery(afterOperator));\n default -> throw new UnsupportedOperationException(\"IDK man, the compiler forced me to put this in here.\");\n };\n }\n\n // If none of the above are satisfied, then we are at a raw table name, so we need to fetch that.\n String tableName = getItemInsideOuterParentheses(query);\n if(tableName.contains(\")\") || tableName.contains(DataTable.EQUALS) || tableName.contains(DataTable.LESS_THAN) || tableName.contains(DataTable.GREATER_THAN) || tableName.contains(MINUS) || tableName.contains(UNION) || tableName.contains(\n INTERSECT) || tableName.contains(JOIN) || tableName.contains(SELECT) || tableName.contains(PROJECT) || tableName.contains(CROSS_PRODUCT)){\n throw new DataFormatException(\n \"The string parsing algorithm was done incorrectly. Please try a simpler query so that the developer does not lose points on this very hard project. Thanks much. The algorithm thinks the table name is \" + \"\\\"\" + tableName +\n \"\\\".\");\n }\n\n File tableFile = new File(tableName + \".txt\");\n if(!tableFile.exists()){\n throw new FileNotFoundException(\"Bruh, please state a table that actually exists, as \" + tableFile + \".txt doesn't. The file must be of the extension \\\".txt\\\" (all lowercase).\");\n }\n\n return new DataTable(tableFile);\n }", "public interface Query {\n\n\t/**\n\t * @return ID of the given query\n\t */\n\tint queryID();\n\t\n\t/**\n\t * @return given query\n\t */\n\tString query();\n\t\n\t/**\n\t * @return list of relevant documents to the corresponding query\n\t */\n\tList<RelevanceInfo> listOfRelevantDocuments();\n\t\n\t/**\n\t * @return list of results to the corresponding query after running one of the retrieval models\n\t */\n\tList<Result> resultList();\n\t\n\t/**\n\t * @param resultList\n\t * @Effects adds results to the result list of the corresponding query\n\t */\n\tvoid putResultList(List<Result> resultList);\n}", "public interface QueryResponseParser {\n Documents<IdolSearchResult> parseQueryResults(AciSearchRequest<String> searchRequest, AciParameters aciParameters, QueryResponseData responseData, IdolDocumentService.QueryExecutor queryExecutor);\n\n List<IdolSearchResult> parseQueryHits(Collection<Hit> hits);\n}", "public static String getAllEvaluationAsString(String query, Vector<String> retrievalResults, Map<String, DocumentRelevances> judgments) throws IOException{\n double precisionAt1 = precisionAtK(retrievalResults, 1, judgments);\n double precisionAt5 = precisionAtK(retrievalResults, 5, judgments);\n double precisionAt10 = precisionAtK(retrievalResults, 10, judgments);\n double recallAt1 = recallAtK(retrievalResults, 1, judgments);\n double recallAt5 = recallAtK(retrievalResults, 5, judgments);\n double recallAt10 = recallAtK(retrievalResults, 10, judgments);\n double F05At1 = F05AtK(retrievalResults, 1, judgments);\n double F05At5 = F05AtK(retrievalResults, 5, judgments);\n double F05At10 = F05AtK(retrievalResults, 10, judgments);\n double[] precisionsAtRecalls = precisionAtRecall(retrievalResults, judgments);\n double averagePrecision = averagePrecision(retrievalResults, judgments);\n double NDCGAt1 = NDCGAtK(retrievalResults, 1, judgments);\n double NDCGAt5 = NDCGAtK(retrievalResults, 5, judgments);\n double NDCGAt10 = NDCGAtK(retrievalResults, 10, judgments);\n double reciprocalRank = reciprocalRank(retrievalResults, judgments);\n \n String output = query+\"\\n\"+\n \t\t \"Precision at 1: \"+Double.toString(precisionAt1)+\"\\n\"+\n \t\t \"Precision at 5: \"+Double.toString(precisionAt5)+\"\\n\"+\n \t\t \"Precision at 10: \"+Double.toString(precisionAt10)+\"\\n\"+\n \t\t \"Recall at 1: \"+Double.toString(recallAt1)+\"\\n\"+\n \t\t \"Recall at 5: \"+Double.toString(recallAt5)+\"\\n\"+\n \t\t \"Recall at 10: \"+Double.toString(recallAt10)+\"\\n\"+\n \t\t \"F05 at 1: \"+Double.toString(F05At1)+\"\\n\"+\n \t\t \"F05 at 5: \"+Double.toString(F05At5)+\"\\n\"+\n \t\t \"F05 at 10: \"+Double.toString(F05At10)+\"\\n\"+\n \t\t \"Precision at Recall 0.0: \"+Double.toString(precisionsAtRecalls[0])+\"\\n\"+\n \t\t \"Precision at Recall 0.1: \"+Double.toString(precisionsAtRecalls[1])+\"\\n\"+\n \t\t \"Precision at Recall 0.2: \"+Double.toString(precisionsAtRecalls[2])+\"\\n\"+\n \t\t \"Precision at Recall 0.3: \"+Double.toString(precisionsAtRecalls[3])+\"\\n\"+\n \t\t \"Precision at Recall 0.4: \"+Double.toString(precisionsAtRecalls[4])+\"\\n\"+\n \t\t \"Precision at Recall 0.5: \"+Double.toString(precisionsAtRecalls[5])+\"\\n\"+\n \t\t \"Precision at Recall 0.6: \"+Double.toString(precisionsAtRecalls[6])+\"\\n\"+\n \t\t \"Precision at Recall 0.7: \"+Double.toString(precisionsAtRecalls[7])+\"\\n\"+\n \t\t \"Precision at Recall 0.8: \"+Double.toString(precisionsAtRecalls[8])+\"\\n\"+\n \t\t \"Precision at Recall 0.9: \"+Double.toString(precisionsAtRecalls[9])+\"\\n\"+\n \t\t \"Precision at Recall 1.0: \"+Double.toString(precisionsAtRecalls[10])+\"\\n\"+\n \t\t \"Average precision: \"+Double.toString(averagePrecision)+\"\\n\"+\n \t\t \"NDCG at 1: \"+Double.toString(NDCGAt1)+\"\\n\"+\n \t\t \"NDCG at 5: \"+Double.toString(NDCGAt5)+\"\\n\"+\n \t\t \"NDCG at 10: \"+Double.toString(NDCGAt10)+\"\\n\"+\n \t\t \"Reciprocal rank: \"+Double.toString(reciprocalRank);\n\t\t\t\t\t\t\t\t\n return output;\n }", "public void parseAndRankQuery(String stringNumber) throws Exception {\n\n if (this.semantics) { //if the user choose semantic\n semantic=new ArrayList<>();\n Word2VecModel model = Word2VecModel.fromTextFile(new File(\"word2vec.c.output.model.txt\"));\n com.medallia.word2vec.Searcher semanticSearchrt = model.forSearch();\n int num = 10;\n String[] semanQuery = query.split(\" \");\n for (String s : semanQuery)\n {\n try {\n List<com.medallia.word2vec.Searcher.Match> matches = semanticSearchrt.getMatches(s.toLowerCase(), num);\n for (com.medallia.word2vec.Searcher.Match match : matches) {\n match.match();\n }\n if(matches.get(0).equals(s)) {\n query = query + \" \" + matches.get(1);\n String dd=\"\"+matches.get(1);\n semantic.add(dd);\n }\n else {\n query = query + \" \" + matches.get(0); //add to query the high semantics 3 top words score\n String dd=\"\"+matches.get(0);\n semantic.add(dd);\n }\n } catch(com.medallia.word2vec.Searcher.UnknownWordException e){\n }\n }\n }\n\n ranker = new Ranker(this.indexer,stringNumber,path,originalString); // new ranker\n ArrayList<String> cleanQuery;\n ArrayList<String> parsedQueryList;\n ReadFile rd=new ReadFile();\n cleanQuery=rd.cleanLine(stemming,query); //clean the query from dots and other signs\n HashMap<String, Pair<Integer,String>> parsedQuery=new HashMap<>();\n parsedQuery=parser.Tokenizer(cleanQuery,\"\",stemming); //parse the query\n Iterator it = parsedQuery.entrySet().iterator();\n parsedQueryList=new ArrayList<>();\n while (it.hasNext()) {\n Map.Entry pair = (Map.Entry)it.next();\n parsedQueryList.add((String)pair.getKey());\n it.remove(); // avoids a ConcurrentModificationException\n }\n ranker.setParseredQuery(parsedQueryList);\n try {\n ranker.orgByPostFile();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n }", "private List<IGraphResult> getAnswerRecursive(Graph query,\n\t\t\tlong[] TimeComponent, int[] Number) {\n\t\t// 1. First, get Answer of the upperLevelIndex\n\t\tlong startTime = System.currentTimeMillis();\n\t\tlong[] temp = new long[4];\n\t\tint[] tempNum = new int[2];\n\t\t// The prefix subgraph isomorphism test is calculated as filtering cost\n\t\tList<IGraphResult> containedFeatures = this.upperLevelIndex.getAnswer(\n\t\t\t\tquery, temp, tempNum);\n\t\tint[] containedFeatureIDs = new int[containedFeatures.size()];\n\t\tfor (int i = 0; i < containedFeatureIDs.length; i++) {\n\t\t\tcontainedFeatureIDs[i] = containedFeatures.get(i).getDocID();\n\t\t}\n\t\tTimeComponent[2] += System.currentTimeMillis() - startTime;\n\t\tList<Integer> nonSubgraphs = this.searcher.nonSubgraphs(\n\t\t\t\tcontainedFeatureIDs, TimeComponent);\n\t\t// 2. Filtering\n\t\tIGraphFetcher candidateFetcher = postingFetcher.getComplement(\n\t\t\t\tnonSubgraphs, TimeComponent);\n\t\tIGraphFetcherPrefix candidateFetcherPrefix = null;\n\t\tif (this.lowerLevelSearcher == null)\n\t\t\tcandidateFetcherPrefix = new GraphFetcherLucenePrefix(\n\t\t\t\t\t(GraphFetcherLucene) candidateFetcher, this.searcher);\n\t\telse\n\t\t\tcandidateFetcherPrefix = new GraphFetcherIndexPrefix(\n\t\t\t\t\t(GraphFetcherDB) candidateFetcher, this.lowerLevelSearcher);\n\n\t\t// 3. Verify\n\t\tNumber[0] = candidateFetcherPrefix.size();\n\t\tList<IGraphResult> answer = this.verifier.verify(\n\t\t\t\tcandidateFetcherPrefix, query, TimeComponent);\n\t\tNumber[1] = answer.size();\n\t\treturn answer;\n\t}", "void query9InterativaPrint(List<ParQuery9> pares);", "public abstract List createQuery(String query);", "private static String PubmedQueryToLucene(String PubmedQuery) {\r\n String luceneQuery = \"\";\r\n //remove hasabstract components\r\n PubmedQuery = PubmedQuery.replaceAll(\"(NOT|AND|OR) hasabstract\\\\[text\\\\]\", \"\");\r\n PubmedQuery = PubmedQuery.replaceAll(\"hasabstract\\\\[text\\\\] (NOT|AND|OR)\", \"\");\r\n PubmedQuery = PubmedQuery.replaceAll(\"hasabstract\\\\[text\\\\]\", \"\");\r\n PubmedQuery = PubmedQuery.replaceAll(\"(NOT|AND|OR) hasabstract\", \"\");\r\n PubmedQuery = PubmedQuery.replaceAll(\"hasabstract (NOT|AND|OR)\", \"\");\r\n PubmedQuery = PubmedQuery.replaceAll(\"hasabstract\", \"\");\r\n\r\n //replace date component\r\n String dateRangeRestriction = \"\";\r\n // e.g. (\\\"0001/01/01\\\"[PDAT] : \\\"2013/03/14\\\"[PDAT])\r\n String dateRange = \"\\\\(\\\"(\\\\d+/\\\\d+/\\\\d+)\\\"\\\\[PDAT\\\\]\\\\s*:\\\\s*\\\"(\\\\d+/\\\\d+/\\\\d+)\\\"\\\\[PDAT\\\\]\\\\)\";\r\n Pattern dateRangePattern = Pattern.compile(dateRange);\r\n Matcher matcher = dateRangePattern.matcher(PubmedQuery);\r\n if(matcher.find()){\r\n String startDate = matcher.group(1);\r\n String endDate = matcher.group(2);\r\n// System.out.println(\" > \" + startDate + \" \" + endDate );\r\n dateRangeRestriction = dateRangeRestriction(startDate, endDate);\r\n PubmedQuery = PubmedQuery.replaceAll(dateRange, \"CustomDateRangeRestriction\");\r\n }\r\n\r\n \r\n// System.out.println(\">>>\" + PubmedQuery );\r\n //Special Case, when query is just a number, consider it as a PMID\r\n // TO DO : add extra cases for more than one PMIDs too \r\n if(PubmedQuery.trim().matches(\"\\\\d+\")){\r\n luceneQuery = \"PMID:\" + PubmedQuery.trim();\r\n } else { //General case of query, not just a number \r\n ArrayList <String> parts = new <String> ArrayList();\r\n //Find parts [between parentheses]\r\n if(PubmedQuery.contains(\"(\") & PubmedQuery.contains(\")\"))//parentheses in the string\r\n {\r\n String tmpStr = \"\";\r\n String indexField =\"\";\r\n boolean insideIndexField = false;\r\n\r\n for(int i = 0; i < PubmedQuery.length() ; i++ ){\r\n if(PubmedQuery.charAt(i) == '(' | PubmedQuery.charAt(i) == ')') { // new part start\r\n tmpStr = tmpStr.trim();\r\n if(!tmpStr.equals(\"\")){\r\n parts.add(handlePhrases(tmpStr));\r\n tmpStr = \"\";\r\n }\r\n parts.add(\" \" + PubmedQuery.charAt(i) + \" \");\r\n } else if(PubmedQuery.charAt(i) == '[' & tmpStr.trim().equals(\"\")) { // index field opening a part, refers to previus part (i.e. ( ... ...)[...] case)\r\n //handle index field here because the previus part will be not available to handlePhrases\r\n insideIndexField = true;\r\n } else if(insideIndexField) { \r\n if(PubmedQuery.charAt(i) == ']'){// end of index field (opening a part)\r\n tmpStr = tmpStr.trim();\r\n if( !tmpStr.equals(\"\")){ // add this index field to previus element\r\n String luceneField = supportedIndexFields.get(tmpStr);\r\n if(luceneField != null){ // field supported\r\n boolean previusPartFound = false;\r\n boolean previusIsParenthesis = false;\r\n int j = parts.size()-1;\r\n while(j >= 0 & !previusPartFound){ \r\n String prevPart = parts.get(j).trim();\r\n if(prevPart.equals(\")\")){\r\n previusIsParenthesis = true;\r\n } else if(prevPart.equals(\"(\") & previusIsParenthesis){ //beginig of previus paretheses reached\r\n String prevClause = \"\";\r\n for(int k = parts.size()-1; k >= j ; k--){\r\n prevClause = parts.get(k) + prevClause;\r\n parts.remove(k);\r\n }\r\n parts.add(luceneField + \":\" + prevClause);\r\n previusPartFound = true;\r\n } else if(!previusIsParenthesis){ // not parentheses, it's a single term\r\n parts.remove(j);// remove part without index field\r\n parts.add( luceneField + \":\" + prevPart);// add again with index field\r\n previusPartFound = true;\r\n }\r\n j--;\r\n }\r\n }\r\n tmpStr = \"\";\r\n }\r\n insideIndexField = false;\r\n } else {\r\n tmpStr += PubmedQuery.charAt(i);\r\n }\r\n } else { // continue existing part\r\n tmpStr += PubmedQuery.charAt(i);\r\n }\r\n }\r\n tmpStr = tmpStr.trim();\r\n if(!tmpStr.equals(\"\")){\r\n parts.add(handlePhrases(tmpStr));\r\n }\r\n } else { // no paretheses, do further handling\r\n luceneQuery = handlePhrases(PubmedQuery); \r\n }\r\n\r\n //handle boolean operators\r\n boolean fisrtPhrase = true;\r\n for(int i = 0 ; i < parts.size() ; i ++){\r\n String currentPart = parts.get(i);\r\n if(!currentPart.startsWith(\" OR \") & !currentPart.startsWith(\" -\") & !currentPart.startsWith(\" +\") & !currentPart.equals(\" ) \")){\r\n if(fisrtPhrase){\r\n luceneQuery += \" +\";\r\n fisrtPhrase = false;\r\n } else {\r\n if(!parts.get(i-1).endsWith(\" OR \") & !parts.get(i-1).endsWith(\" -\") & !parts.get(i-1).endsWith(\" +\")){\r\n luceneQuery += \" +\";\r\n }\r\n } \r\n } // add default operator + when required (no OR or - is present for that term)\r\n luceneQuery += parts.get(i);\r\n }\r\n }\r\n // replace \"CustomDateRangeRestriction\" with real restriction\r\n// System.out.println(\" *>>>\" + luceneQuery );\r\n if(luceneQuery.contains(\"CustomDateRangeRestriction\")){\r\n luceneQuery = luceneQuery.replaceAll(\"CustomDateRangeRestriction\", dateRangeRestriction);\r\n }\r\n // replace \" + (\" with \" +(\"\r\n if(luceneQuery.contains(\" + (\")){\r\n luceneQuery = luceneQuery.replaceAll(\" \\\\+ \\\\(\", \" +(\");\r\n }\r\n // replace \" - (\" with \" -(\"\r\n if(luceneQuery.contains(\" - (\")){\r\n luceneQuery = luceneQuery.replaceAll(\" \\\\- \\\\(\", \" -(\");\r\n } \r\n// System.out.println(\" *>>>\" + luceneQuery );\r\n\r\n return luceneQuery;\r\n }", "private Query getFieldQueryImpl(String field, String queryText, AnalysisMode analysisMode, LuceneFunction luceneFunction) throws ParseException\n {\n\n if (luceneFunction != LuceneFunction.FIELD)\n {\n throw new UnsupportedOperationException(\"Field queries are not supported on lucene functions (UPPER, LOWER, etc)\");\n }\n\n boolean requiresMLTokenDuplication = false;\n String testText = queryText;\n String localeString = null;\n if (field.startsWith(PROPERTY_FIELD_PREFIX))\n {\n if ((queryText.length() > 0) && (queryText.charAt(0) == '\\u0000'))\n {\n int position = queryText.indexOf(\"\\u0000\", 1);\n testText = queryText.substring(position + 1);\n requiresMLTokenDuplication = true;\n localeString = queryText.substring(1, position);\n }\n }\n\n TokenStream source = getAnalyzer().tokenStream(field, new StringReader(queryText), analysisMode);\n\n ArrayList<org.apache.lucene.analysis.Token> list = new ArrayList<org.apache.lucene.analysis.Token>();\n org.apache.lucene.analysis.Token reusableToken = new org.apache.lucene.analysis.Token();\n org.apache.lucene.analysis.Token nextToken;\n int positionCount = 0;\n boolean severalTokensAtSamePosition = false;\n\n while (true)\n {\n try\n {\n nextToken = source.next(reusableToken);\n }\n catch (IOException e)\n {\n nextToken = null;\n }\n if (nextToken == null)\n break;\n list.add((org.apache.lucene.analysis.Token) nextToken.clone());\n if (nextToken.getPositionIncrement() != 0)\n positionCount += nextToken.getPositionIncrement();\n else\n severalTokensAtSamePosition = true;\n }\n try\n {\n source.close();\n }\n catch (IOException e)\n {\n // ignore\n }\n\n // add any alpha numeric wildcards that have been missed\n // Fixes most stop word and wild card issues\n\n for (int index = 0; index < testText.length(); index++)\n {\n char current = testText.charAt(index);\n if ((current == '*') || (current == '?'))\n {\n StringBuilder pre = new StringBuilder(10);\n if (index > 0)\n {\n for (int i = index - 1; i >= 0; i--)\n {\n char c = testText.charAt(i);\n if (Character.isLetterOrDigit(c))\n {\n boolean found = false;\n for (int j = 0; j < list.size(); j++)\n {\n org.apache.lucene.analysis.Token test = list.get(j);\n if ((test.startOffset() <= i) && (i <= test.endOffset()))\n {\n found = true;\n break;\n }\n }\n if (found)\n {\n break;\n }\n else\n {\n pre.insert(0, c);\n }\n }\n }\n if (pre.length() > 0)\n {\n // Add new token followed by * not given by the tokeniser\n org.apache.lucene.analysis.Token newToken = new org.apache.lucene.analysis.Token(index - pre.length(), index);\n newToken.setTermBuffer(pre.toString());\n newToken.setType(\"ALPHANUM\");\n if (requiresMLTokenDuplication)\n {\n Locale locale = I18NUtil.parseLocale(localeString);\n MLAnalysisMode mlAnalysisMode = searchParameters.getMlAnalaysisMode() == null ? defaultSearchMLAnalysisMode : searchParameters\n .getMlAnalaysisMode();\n MLTokenDuplicator duplicator = new MLTokenDuplicator(locale, mlAnalysisMode);\n Iterator<org.apache.lucene.analysis.Token> it = duplicator.buildIterator(newToken);\n if (it != null)\n {\n int count = 0;\n while (it.hasNext())\n {\n list.add(it.next());\n count++;\n if (count > 1)\n {\n severalTokensAtSamePosition = true;\n }\n }\n }\n }\n // content\n else\n {\n list.add(newToken);\n }\n }\n }\n\n StringBuilder post = new StringBuilder(10);\n if (index > 0)\n {\n for (int i = index + 1; i < testText.length(); i++)\n {\n char c = testText.charAt(i);\n if (Character.isLetterOrDigit(c))\n {\n boolean found = false;\n for (int j = 0; j < list.size(); j++)\n {\n org.apache.lucene.analysis.Token test = list.get(j);\n if ((test.startOffset() <= i) && (i <= test.endOffset()))\n {\n found = true;\n break;\n }\n }\n if (found)\n {\n break;\n }\n else\n {\n post.append(c);\n }\n }\n }\n if (post.length() > 0)\n {\n // Add new token followed by * not given by the tokeniser\n org.apache.lucene.analysis.Token newToken = new org.apache.lucene.analysis.Token(index + 1, index + 1 + post.length());\n newToken.setTermBuffer(post.toString());\n newToken.setType(\"ALPHANUM\");\n if (requiresMLTokenDuplication)\n {\n Locale locale = I18NUtil.parseLocale(localeString);\n MLAnalysisMode mlAnalysisMode = searchParameters.getMlAnalaysisMode() == null ? defaultSearchMLAnalysisMode : searchParameters\n .getMlAnalaysisMode();\n MLTokenDuplicator duplicator = new MLTokenDuplicator(locale, mlAnalysisMode);\n Iterator<org.apache.lucene.analysis.Token> it = duplicator.buildIterator(newToken);\n if (it != null)\n {\n int count = 0;\n while (it.hasNext())\n {\n list.add(it.next());\n count++;\n if (count > 1)\n {\n severalTokensAtSamePosition = true;\n }\n }\n }\n }\n // content\n else\n {\n list.add(newToken);\n }\n }\n }\n\n }\n }\n\n Collections.sort(list, new Comparator<org.apache.lucene.analysis.Token>()\n {\n\n public int compare(Token o1, Token o2)\n {\n int dif = o1.startOffset() - o2.startOffset();\n if (dif != 0)\n {\n return dif;\n }\n else\n {\n return o2.getPositionIncrement() - o1.getPositionIncrement();\n }\n }\n });\n\n // Combined * and ? based strings - should redo the tokeniser\n\n // Assume we only string together tokens for the same position\n\n int max = 0;\n int current = 0;\n for (org.apache.lucene.analysis.Token c : list)\n {\n if (c.getPositionIncrement() == 0)\n {\n current++;\n }\n else\n {\n if (current > max)\n {\n max = current;\n }\n current = 0;\n }\n }\n if (current > max)\n {\n max = current;\n }\n\n ArrayList<org.apache.lucene.analysis.Token> fixed = new ArrayList<org.apache.lucene.analysis.Token>();\n for (int repeat = 0; repeat <= max; repeat++)\n {\n org.apache.lucene.analysis.Token replace = null;\n current = 0;\n for (org.apache.lucene.analysis.Token c : list)\n {\n if (c.getPositionIncrement() == 0)\n {\n current++;\n }\n else\n {\n current = 0;\n }\n\n if (current == repeat)\n {\n\n if (replace == null)\n {\n StringBuilder prefix = new StringBuilder();\n for (int i = c.startOffset() - 1; i >= 0; i--)\n {\n char test = testText.charAt(i);\n if ((test == '*') || (test == '?'))\n {\n prefix.insert(0, test);\n }\n else\n {\n break;\n }\n }\n String pre = prefix.toString();\n if (requiresMLTokenDuplication)\n {\n String termText = new String(c.termBuffer(), 0, c.termLength());\n int position = termText.indexOf(\"}\");\n String language = termText.substring(0, position + 1);\n String token = termText.substring(position + 1);\n replace = new org.apache.lucene.analysis.Token(c.startOffset() - pre.length(), c.endOffset());\n replace.setTermBuffer(language + pre + token);\n replace.setType(c.type());\n replace.setPositionIncrement(c.getPositionIncrement());\n }\n else\n {\n String termText = new String(c.termBuffer(), 0, c.termLength());\n replace = new org.apache.lucene.analysis.Token(c.startOffset() - pre.length(), c.endOffset());\n replace.setTermBuffer(pre + termText);\n replace.setType(c.type());\n replace.setPositionIncrement(c.getPositionIncrement());\n }\n }\n else\n {\n StringBuilder prefix = new StringBuilder();\n StringBuilder postfix = new StringBuilder();\n StringBuilder builder = prefix;\n for (int i = c.startOffset() - 1; i >= replace.endOffset(); i--)\n {\n char test = testText.charAt(i);\n if ((test == '*') || (test == '?'))\n {\n builder.insert(0, test);\n }\n else\n {\n builder = postfix;\n postfix.setLength(0);\n }\n }\n String pre = prefix.toString();\n String post = postfix.toString();\n\n // Does it bridge?\n if ((pre.length() > 0) && (replace.endOffset() + pre.length()) == c.startOffset())\n {\n String termText = new String(c.termBuffer(), 0, c.termLength());\n if (requiresMLTokenDuplication)\n {\n int position = termText.indexOf(\"}\");\n @SuppressWarnings(\"unused\")\n String language = termText.substring(0, position + 1);\n String token = termText.substring(position + 1);\n int oldPositionIncrement = replace.getPositionIncrement();\n String replaceTermText = new String(replace.termBuffer(), 0, replace.termLength());\n replace = new org.apache.lucene.analysis.Token(replace.startOffset(), c.endOffset());\n replace.setTermBuffer(replaceTermText + pre + token);\n replace.setType(replace.type());\n replace.setPositionIncrement(oldPositionIncrement);\n }\n else\n {\n int oldPositionIncrement = replace.getPositionIncrement();\n String replaceTermText = new String(replace.termBuffer(), 0, replace.termLength());\n replace = new org.apache.lucene.analysis.Token(replace.startOffset(), c.endOffset());\n replace.setTermBuffer(replaceTermText + pre + termText);\n replace.setType(replace.type());\n replace.setPositionIncrement(oldPositionIncrement);\n }\n }\n else\n {\n String termText = new String(c.termBuffer(), 0, c.termLength());\n if (requiresMLTokenDuplication)\n {\n int position = termText.indexOf(\"}\");\n String language = termText.substring(0, position + 1);\n String token = termText.substring(position + 1);\n String replaceTermText = new String(replace.termBuffer(), 0, replace.termLength());\n org.apache.lucene.analysis.Token last = new org.apache.lucene.analysis.Token(replace.startOffset(), replace.endOffset() + post.length());\n last.setTermBuffer(replaceTermText + post);\n last.setType(replace.type());\n last.setPositionIncrement(replace.getPositionIncrement());\n fixed.add(last);\n replace = new org.apache.lucene.analysis.Token(c.startOffset() - pre.length(), c.endOffset());\n replace.setTermBuffer(language + pre + token);\n replace.setType(c.type());\n replace.setPositionIncrement(c.getPositionIncrement());\n }\n else\n {\n String replaceTermText = new String(replace.termBuffer(), 0, replace.termLength());\n org.apache.lucene.analysis.Token last = new org.apache.lucene.analysis.Token(replace.startOffset(), replace.endOffset() + post.length());\n last.setTermBuffer(replaceTermText + post);\n last.setType(replace.type());\n last.setPositionIncrement(replace.getPositionIncrement());\n fixed.add(last);\n replace = new org.apache.lucene.analysis.Token(c.startOffset() - pre.length(), c.endOffset());\n replace.setTermBuffer(pre + termText);\n replace.setType(c.type());\n replace.setPositionIncrement(c.getPositionIncrement());\n }\n }\n }\n }\n }\n // finish last\n if (replace != null)\n {\n StringBuilder postfix = new StringBuilder();\n if ((replace.endOffset() >= 0) && (replace.endOffset() < testText.length()))\n {\n for (int i = replace.endOffset(); i < testText.length(); i++)\n {\n char test = testText.charAt(i);\n if ((test == '*') || (test == '?'))\n {\n postfix.append(test);\n }\n else\n {\n break;\n }\n }\n }\n String post = postfix.toString();\n int oldPositionIncrement = replace.getPositionIncrement();\n String replaceTermText = new String(replace.termBuffer(), 0, replace.termLength());\n replace = new org.apache.lucene.analysis.Token(replace.startOffset(), replace.endOffset() + post.length());\n replace.setTermBuffer(replaceTermText + post);\n replace.setType(replace.type());\n replace.setPositionIncrement(oldPositionIncrement);\n fixed.add(replace);\n\n }\n }\n\n // Add in any missing words containsing * and ?\n\n // reorder by start position and increment\n\n Collections.sort(fixed, new Comparator<org.apache.lucene.analysis.Token>()\n {\n\n public int compare(Token o1, Token o2)\n {\n int dif = o1.startOffset() - o2.startOffset();\n if (dif != 0)\n {\n return dif;\n }\n else\n {\n return o2.getPositionIncrement() - o1.getPositionIncrement();\n }\n }\n });\n\n list = fixed;\n\n if (list.size() == 0)\n return null;\n else if (list.size() == 1)\n {\n nextToken = (org.apache.lucene.analysis.Token) list.get(0);\n String termText = new String(nextToken.termBuffer(), 0, nextToken.termLength());\n if (termText.contains(\"*\") || termText.contains(\"?\"))\n {\n return newWildcardQuery(new Term(field, termText));\n }\n else\n {\n return newTermQuery(new Term(field, termText));\n }\n }\n else\n {\n if (severalTokensAtSamePosition)\n {\n if (positionCount == 1)\n {\n // no phrase query:\n BooleanQuery q = newBooleanQuery(true);\n for (int i = 0; i < list.size(); i++)\n {\n Query currentQuery;\n nextToken = (org.apache.lucene.analysis.Token) list.get(i);\n String termText = new String(nextToken.termBuffer(), 0, nextToken.termLength());\n if (termText.contains(\"*\") || termText.contains(\"?\"))\n {\n currentQuery = newWildcardQuery(new Term(field, termText));\n }\n else\n {\n currentQuery = newTermQuery(new Term(field, termText));\n }\n q.add(currentQuery, BooleanClause.Occur.SHOULD);\n }\n return q;\n }\n else\n {\n // phrase query:\n MultiPhraseQuery mpq = newMultiPhraseQuery();\n mpq.setSlop(internalSlop);\n ArrayList<Term> multiTerms = new ArrayList<Term>();\n int position = -1;\n for (int i = 0; i < list.size(); i++)\n {\n nextToken = (org.apache.lucene.analysis.Token) list.get(i);\n String termText = new String(nextToken.termBuffer(), 0, nextToken.termLength());\n if (nextToken.getPositionIncrement() > 0 && multiTerms.size() > 0)\n {\n if (getEnablePositionIncrements())\n {\n mpq.add((Term[]) multiTerms.toArray(new Term[0]), position);\n }\n else\n {\n mpq.add((Term[]) multiTerms.toArray(new Term[0]));\n }\n multiTerms.clear();\n }\n position += nextToken.getPositionIncrement();\n\n Term term = new Term(field, termText);\n if ((termText != null) && (termText.contains(\"*\") || termText.contains(\"?\")))\n {\n addWildcardTerms(multiTerms, term);\n }\n else\n {\n multiTerms.add(term);\n }\n }\n if (getEnablePositionIncrements())\n {\n if (multiTerms.size() > 0)\n {\n mpq.add((Term[]) multiTerms.toArray(new Term[0]), position);\n }\n else\n {\n mpq.add(new Term[] { new Term(field, \"\\u0000\") }, position);\n }\n }\n else\n {\n if (multiTerms.size() > 0)\n {\n mpq.add((Term[]) multiTerms.toArray(new Term[0]));\n }\n else\n {\n mpq.add(new Term[] { new Term(field, \"\\u0000\") });\n }\n }\n return mpq;\n }\n }\n else\n {\n MultiPhraseQuery q = new MultiPhraseQuery();\n q.setSlop(internalSlop);\n int position = -1;\n for (int i = 0; i < list.size(); i++)\n {\n nextToken = (org.apache.lucene.analysis.Token) list.get(i);\n String termText = new String(nextToken.termBuffer(), 0, nextToken.termLength());\n Term term = new Term(field, termText);\n if (getEnablePositionIncrements())\n {\n position += nextToken.getPositionIncrement();\n if ((termText != null) && (termText.contains(\"*\") || termText.contains(\"?\")))\n {\n q.add(getMatchingTerms(field, term), position);\n }\n else\n {\n q.add(new Term[] { term }, position);\n }\n }\n else\n {\n if ((termText != null) && (termText.contains(\"*\") || termText.contains(\"?\")))\n {\n q.add(getMatchingTerms(field, term));\n }\n else\n {\n q.add(term);\n }\n }\n }\n return q;\n }\n }\n }", "private Nodes xPathQuery(String query)\r\n \t{\r\n \t\treturn document.query(query, context);\r\n \t}", "public void parseQueryStringAndSearch(String searchString) {\n char[] chars = searchString.toCharArray();\n for (int i = 0; i < chars.length; i++) {\n Queue<Character> queue;\n int k;\n if (Character.isDigit(chars[i])) {\n k = Integer.parseInt(String.valueOf(chars[i]));\n i++;\n queue = new LinkedList<>();\n while (i < chars.length && chars[i] != ')') {\n queue.add(chars[i]);\n i++;\n }\n i++;\n String query = queryToString(queue);\n String[] terms = query.split(\" \");\n //System.out.println(query + \" and k: \" + k);\n positionIntersects(indexMap.get(analyzeTerm(terms[0])), indexMap.get(analyzeTerm(terms[1])), k);\n } else {\n queue = new LinkedList<>();\n while (i < chars.length && !Character.isDigit(chars[i])) {\n queue.add(chars[i]);\n i++;\n }\n i--;\n String query = queryToString(queue);\n String[] terms = query.trim().split(\" \");\n termQuerySearch(terms);\n }\n\n }\n\n }", "private String doParse(String inputText)\n\t{\n\t\tmakeParser(\"program test \" + inputText);\n\t\ttree = parser.dijkstraText();\n\t\tassertTrue(true);\n\t\treturn tree.toStringTree(parser);\n\t}", "public static void main(String[] args) {\n\t\tquery_id_user(1);\n\t\tquery_id_user(2);\n\t\tquery_name_user(\"jan\");\n\t\tquery_name_user(\"frans\");\n\t\tList<Contact> contacts = getContacts();\n\t\tIterator<Contact> cit = contacts.iterator();\n\t\twhile (cit.hasNext()) {\n\t\t\tContact contact = cit.next();\n\t\t\tSystem.out.println(contact.getFirstName() + \" \" + contact.getLastName());\n\t\t\tSet<Address> addresses = contact.getAddresses();\n\t\t\tIterator<Address> ait = addresses.iterator();\n\t\t\twhile (ait.hasNext()) {\n\t\t\t\tAddress address = ait.next();\n\t\t\t\tSystem.out.println(address.getStreet() + \" \" + address.getZipcode() + \" \" + address.getCity() + \" \"\n\t\t\t\t\t\t+ address.getCountry());\n\t\t\t}\n\t\t}\n\t}", "Pair<Boolean, List<Result>> execQuery(int matchLimit);", "T getQueryInfo();", "public /*TreeMap<String, Float>*/void getTopnTermsOverlapWithQuery() throws IOException, ParseException{\n\t\tString outputfile = \"./output/score/test3.txt\";\n\n\t\tFileOutputStream out = new FileOutputStream(outputfile);\n\t\tPrintStream ps = new PrintStream(out);\n\t\t/*-------------------------------------------------------------------------------*/\n\n\t\tTreeMap<String,Float> termsscoressorted = null;\n\t\tCollectionReader reader = new CollectionReader(indexDir); \n\t\tIndexReader ir = reader.getIndexReader();\t\t\n\n\t\tTopicsInMemory topics = new TopicsInMemory(\"data/CLEF-IP-2010/PAC_test/topics/PAC_topics-test2.xml\"/*omit-PAC-1094.xml\"*/);\n\t\tfor(Map.Entry<String, PatentDocument> topic : topics.getTopics().entrySet()){\n\t\t\tString qUcid = topic.getValue().getUcid();\n\t\t\tString queryid = topic.getKey();\n\t\t\tString queryName = topic.getKey() + \"_\" + topic.getValue().getUcid();\n\t\t\tString queryfile = topic.getKey() + \"_\" + topic.getValue().getUcid() + \".xml\";\n\n\t\t\t/*System.out.println(\"=========================================\");\n\t\t\tSystem.out.println(queryName);\n\t\t\tSystem.out.println(\"=========================================\");*/\n\t\t\t/*int docid = reader.getDocId(\"UN-EP-0663270\", PatentDocument.FileName);\n\t\t\tir.getTermVector(docid, field) getTermVectors(b);*/\n\n\t\t\tEvaluateResults er = new EvaluateResults();\n\t\t\tArrayList<String> tps = er.evaluatePatents(queryid, \"TP\");\n\t\t\tArrayList<String> fps = er.evaluatePatents(queryid, \"FP\");\n\t\t\tHashMap<String, Float> /*TFreqs*/ termsscores = new HashMap<>();\n\n\n\t\t\t/*--------------------------------- Query Words -------------------------------*/\n\t\t\t//\t\t\tHashMap<String, Integer> query_termsfreqspair = reader.gettermfreqpair(qUcid, PatentDocument.Description);\n\t\t\tHashSet<String> query_terms = reader.getDocTerms(qUcid, PatentDocument.Description);\n\t\t\t//\t\t\tSystem.out.println(query_termsfreqspair.size() +\"\\t\"+ query_termsfreqspair);\n//\t\t\tSystem.out.println(query_terms.size() + \"\\t\" + query_terms);\n\t\t\t/*-----------------------------------------------------------------------------*/\t\t\t\n\n\n\t\t\t//\t\t\tSystem.out.println(\"-----TPs----\");\n\t\t\tfor (String tp : tps) {\n\t\t\t\t/*System.out.println(\"---------\");\n\t\t\t\tSystem.out.println(tp);*/\n\t\t\t\tHashMap<String, Integer> termsfreqsTP = reader.gettermfreqpairAllsecs(\"UN-\" + tp);\n\n\t\t\t\tfor(Entry<String, Integer> tfTP:termsfreqsTP.entrySet()){\n\t\t\t\t\tif(termsscores.containsKey(tfTP.getKey())){\n\t\t\t\t\t\ttermsscores.put(tfTP.getKey(), termsscores.get(tfTP.getKey()) + (float)tfTP.getValue()/tps.size());\n\t\t\t\t\t}else{\n\t\t\t\t\t\t//\t\t\t\t\t\tfloat test = (float)t.getValue()/tps.size();\n\t\t\t\t\t\t//\t\t\t\t\t\tSystem.out.println(test);\n\t\t\t\t\t\ttermsscores.put(tfTP.getKey(), (float)tfTP.getValue()/tps.size());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//\t\t\t\tSystem.out.println(termsscores.size() + \" \" + termsscores);\t\t\t\t\t\n\t\t\t}\n\n\t\t\t/*System.out.println();\n\t\t\tSystem.out.println(\"-----FNs----\");*/\n\t\t\tfor (String fp : fps) {\n\t\t\t\t/*System.out.println(\"---------\");\n\t\t\t\tSystem.out.println(fp);*/\n\t\t\t\tHashMap<String, Integer> termsfreqsFP = reader.gettermfreqpairAllsecs(\"UN-\" + fp);\n\n\t\t\t\tfor(Entry<String, Integer> t:termsfreqsFP.entrySet()){\n\t\t\t\t\tif(termsscores.containsKey(t.getKey())){\n\t\t\t\t\t\ttermsscores.put(t.getKey(), termsscores.get(t.getKey()) - (float)t.getValue()/fps.size());\n\t\t\t\t\t}else{\t\t\t\t\t\t\n\t\t\t\t\t\ttermsscores.put(t.getKey(), -(float)t.getValue()/fps.size());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//\t\t\t\tSystem.out.println(TFreqs.size() + \" \" + TFreqs);\n\t\t\t}\n\t\t\t//\t\t\tSystem.out.println(termsscores.size() + \" \" + termsscores);\n\t\t\tValueComparator bvc = new ValueComparator(termsscores);\n\t\t\ttermsscoressorted = new TreeMap<String,Float>(bvc);\t\t\t\n\t\t\ttermsscoressorted.putAll(termsscores);\n\t\t\tSystem.out.println(queryid + \"\\t\"+ termsscoressorted.size() + \"\\t\" + termsscoressorted/*.keySet()*/);\n\t\t\tint overlap = 0;\n\t\t\tint i = 0;\n\t\t\tfor(Entry<String, Float> scoresorted:termsscoressorted.entrySet()){\n\t\t\t\ti++;\n\t\t\t\tif(i<=100){\n\t\t\t\t\tif(query_terms.contains(scoresorted.getKey())){\n\t\t\t\t\t\toverlap++;\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\t\n\t\t\tSystem.out.println(queryName + \"\\t\"+overlap);\n//\t\t\tps.println(queryName + \"\\t\"+overlap);\n\t\t}\n\t}", "@Override\n\tvoid executeQuery(String query) {\n\t\tSystem.out.println(\"Mssql ==> \" + query);\n\t}", "public static void main(String[] args) {\n\t\tParser p = new Parser();\n\t\t//p.keyword = \"035420\";\n\t\tu = new UI();\n\t\t\n\t\t//p.goodSearch();\n\t}", "protected String getQuery(String query) {\r\n\t\treturn query;\r\n\t}", "public static void out_top_results(Similarity similarity, String algorithmName) throws IOException, ParseException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException\n\t{\n\t\tTrecTopicsReader trecTopicReader = new TrecTopicsReader();\n\t\tBufferedReader bufferedReader = new BufferedReader(new FileReader(Intialize.topicPath));\n\t\tQualityQuery[] qualityQueries = trecTopicReader.readQueries(bufferedReader);\n\n\t\t// 2. Get calculate query score each document \n\t\tfor(int queryIndex=0; queryIndex < qualityQueries.length; queryIndex++)\n\t\t{\n\t\t\tQualityQuery qualityQuery = qualityQueries[queryIndex];\n\t\t\tString queryID = qualityQuery.getQueryID();\n\n\t\t\t{\n\t\t\t\tString titleQuery = qualityQuery.getValue(Intialize.queryTitle);\n\t\t\t\tString cleanedTitleQuery = title_cleaning(titleQuery);\n\t\t\t\tscoreTrack titleQueryScore = EasySearch.query_scores(cleanedTitleQuery, queryID, similarity);\n\t\t\t\tString OutputFilePath = Intialize.outputDir + \"/\" + algorithmName + \"ShortQuery\" + \".txt\";\n\t\t\t\ttitleQueryScore.write_top_results(OutputFilePath);\n\n\t\t\t}\n\n\t\t\t{\n\t\t\t\tString descQuery = qualityQuery.getValue(Intialize.queryDesc);\n\t\t\t\tString cleanedDescQuery = desc_cleaning(descQuery);\n\t\t\t\tscoreTrack descQueryScore = EasySearch.query_scores(cleanedDescQuery, queryID, similarity);\n\t\t\t\tString OutputFilePath = Intialize.outputDir + \"/\" + algorithmName + \"LongQuery\" + \".txt\";\n\t\t\t\tdescQueryScore.write_top_results(OutputFilePath);\n\n\t\t\t}\n\n\n\t\t}\n\t\tSystem.out.println(\"All the queries have executed successfully.\");\n\t}", "private void generateQuery() {\n\t\tString edgeType = \"\";\n\n\t\tif (isUnionTraversal || isTraversal || isWhereTraversal) {\n\t\t\tString previousNode = prevsNode;\n\t\t\tif (isUnionTraversal) {\n\t\t\t\tpreviousNode = unionMap.get(unionKey);\n\t\t\t\tisUnionTraversal = false;\n\t\t\t}\n\n\t\t\tEdgeRuleQuery edgeRuleQuery = new EdgeRuleQuery.Builder(previousNode, currentNode).build();\n\t\t\tEdgeRule edgeRule = null;\n\n\t\t\ttry {\n\t\t\t\tedgeRule = edgeRules.getRule(edgeRuleQuery);\n\t\t\t} catch (EdgeRuleNotFoundException | AmbiguousRuleChoiceException e) {\n\t\t\t}\n\n\t\t\tif (edgeRule == null) {\n\t\t\t\tedgeType = \"EdgeType.COUSIN\";\n\t\t\t} else if (\"none\".equalsIgnoreCase(edgeRule.getContains())){\n\t\t\t\tedgeType = \"EdgeType.COUSIN\";\n\t\t\t}else {\n\t\t\t\tedgeType = \"EdgeType.TREE\";\n\t\t\t}\n\n\t\t\tquery += \".createEdgeTraversal(\" + edgeType + \", '\" + previousNode + \"','\" + currentNode + \"')\";\n\n\t\t}\n\n\t\telse\n\t\t\tquery += \".getVerticesByProperty('aai-node-type', '\" + currentNode + \"')\";\n\t}", "@Override\n\tprotected void parseResult() {\n\t\t\n\t}", "public static List<ToucheQuery> parseQueries(String file) throws IOException {\n List<ToucheQuery> res = new ArrayList<>();\n DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\n\n try {\n\n DocumentBuilder db = dbf.newDocumentBuilder();\n\n Document doc = db.parse(file);\n\n // optional, but recommended\n doc.getDocumentElement().normalize();\n NodeList list = doc.getElementsByTagName(\"topic\");\n\n // iterate over topics\n for (int i = 0; i < list.getLength(); i++) {\n\n Node node = list.item(i);\n\n if (node.getNodeType() == Node.ELEMENT_NODE) {\n\n Element element = (Element) node;\n\n String id = element.getElementsByTagName(ToucheQuery.TOPIC_FIELDS.ID).item(0).getTextContent();\n String title = element.getElementsByTagName(ToucheQuery.TOPIC_FIELDS.TITLE).item(0).getTextContent();\n\n ToucheQuery topic = new ToucheQuery(id, title);\n res.add(topic);\n }\n }\n\n } catch (ParserConfigurationException | IOException | SAXException e) {\n throw new IOException(e);\n }\n\n return res;\n }", "IQuery getQuery();", "public void queryData() throws SolrServerException {\n\t\tfinal SolrQuery query = new SolrQuery(\"*:*\");\r\n\t\tquery.setRows(2000);\r\n\t\t// 5. Executes the query\r\n\t\tfinal QueryResponse response = client.query(query);\r\n\r\n\t\t/*\t\tassertEquals(1, response.getResults().getNumFound());*/\r\n\r\n\t\t// 6. Gets the (output) Data Transfer Object.\r\n\t\t\r\n\t\t\r\n\t\r\n\t\tif (response.getResults().iterator().hasNext())\r\n\t\t{\r\n\t\t\tfinal SolrDocument output = response.getResults().iterator().next();\r\n\t\t\tfinal String from = (String) output.getFieldValue(\"from\");\r\n\t\t\tfinal String to = (String) output.getFieldValue(\"to\");\r\n\t\t\tfinal String body = (String) output.getFieldValue(\"body\");\r\n\t\t\t// 7.1 In case we are running as a Java application print out the query results.\r\n\t\t\tSystem.out.println(\"It works! I found the following book: \");\r\n\t\t\tSystem.out.println(\"--------------------------------------\");\r\n\t\t\tSystem.out.println(\"ID: \" + from);\r\n\t\t\tSystem.out.println(\"Title: \" + to);\r\n\t\t\tSystem.out.println(\"Author: \" + body);\r\n\t\t}\r\n\t\t\r\n\t\tSolrDocumentList list = response.getResults();\r\n\t\tSystem.out.println(\"list size is: \" + list.size());\r\n\r\n\r\n\r\n\t\t/*\t\t// 7. Otherwise asserts the query results using standard JUnit procedures.\r\n\t\tassertEquals(\"1\", id);\r\n\t\tassertEquals(\"Apache SOLR Essentials\", title);\r\n\t\tassertEquals(\"Andrea Gazzarini\", author);\r\n\t\tassertEquals(\"972-2-5A619-12A-X\", isbn);*/\r\n\t}", "@Override\n\tpublic QanaryMessage process(QanaryMessage myQanaryMessage) throws Exception {\n\t\tlogger.info(\"process: {}\", myQanaryMessage);\n\t\t// TODO: implement processing of question\n\n\t\t// retrive the question\n\t\tQanaryUtils myQanaryUtils = this.getUtils(myQanaryMessage);\n\t\tQanaryQuestion<String> myQanaryQuestion = this.getQanaryQuestion(myQanaryMessage);\n\t\tString myQuestion = myQanaryQuestion.getTextualRepresentation();\n\t\tlogger.info(\"Question: {}\", myQuestion);\n\t\tString myQuery = \"\";\n\n\t\t// Retrieves the spots from the knowledge graph\n\t\tString sparql = \"PREFIX qa: <http://www.wdaqua.eu/qa#> \"\n\t\t\t\t+ \"PREFIX oa: <http://www.w3.org/ns/openannotation/core/> \"\n\t\t\t\t+ \"PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> \"//\n\t\t\t\t+ \"SELECT ?query \" + \"FROM <\" + myQanaryQuestion.getInGraph() + \"> \" //\n\t\t\t\t+ \"WHERE { \" //\n\t\t\t\t+ \" ?a a qa:AnnotationOfAnswerSPARQL . \" //\n\t\t\t\t+ \" ?a oa:hasTarget ?ans . \" //\n\t\t\t\t+ \" ?a oa:hasBody ?query;\" //\n\t\t\t\t+ \" oa:annotatedBy <urn:qanary:geosparqlgenerator> ; \" //\n\t\t\t\t+ \"\t oa:AnnotatedAt ?time . \" //\n\t\t\t\t+ \"} \";\n\n\t\tResultSet r = myQanaryUtils.selectFromTripleStore(sparql);\n\n\t\twhile (r.hasNext()) {\n\t\t\tQuerySolution s = r.next();\n\t\t\tmyQuery = s.get(\"query\").asLiteral().getString();\n\t\t\tlogger.info(\"Fetched geosparql query is: {}\", myQuery);\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tQuery query = QueryFactory.create(myQuery);\n\t\tSystem.out.println(\"sparql query :\"+query.toString());\n\t\tQueryExecution exec = QueryExecutionFactory.sparqlService(\"http://pyravlos2.di.uoa.gr:8080/geoqa/Query\", query);\n\t\tResultSet results = ResultSetFactory.copyResults(exec.execSelect());\n\t\t\n\t\tBufferedWriter bw = new BufferedWriter(new FileWriter(\"/home/dharmen/results_gir.csv\", true));\n\t\tbw.newLine();\n\t\tbw.write(myQuestion+\", \");\n\t\t\n\t\tif (!results.hasNext()) {\n\t\t\t\n\t\t} else {\n\t\t\twhile (results.hasNext()) {\n\t\t\t\t\n\t\t\t\tQuerySolution qs = results.next();\n\t\t\t\t\n\t\t\t\tString selectVariable = \"\";\n\t\t\t\tif(myQuery.contains(\"select ?x\")) {\n\t\t\t\t\tselectVariable = \"x\";\n\t\t\t\t\tString uria = qs.get(\"x\").toString();\n\t\t\t\t\t//String links = qs.get(\"link\").toString();\n//\t\t\t\t\tSystem.out.println(\"x: \"+uria );\n\t\t\t\t\tbw.write(uria);\n\t\t\t\t\tbw.write(\",\");\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tbw.write(\"boolean\");\n\t\t\t\t\tbw.write(\",\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\tbw.close();\n\t\t/*\n\t\t * myQuery = \"PREFIX geo: <http://www.opengis.net/ont/geosparql#> \" +\n\t\t * \" PREFIX geof: <http://www.opengis.net/def/function/geosparql/> \" +\n\t\t * \"PREFIX owl: <http://www.w3.org/2002/07/owl#> \" +\n\t\t * \"PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#label> \" +\n\t\t * \"PREFIX strdf: <http://strdf.di.uoa.gr/ontology#> \" +\n\t\t * \"PREFIX postgis: <http://postgis.net/> \" +\n\t\t * \"PREFIX uom: <http://www.opengis.net/def/uom/OGC/1.0/> \" +\n\t\t * \"select ?poi \" + \" where { \" +\n\t\t * \" ?poi a <http://www.app-lab.eu/osm/ontology#park>; \" +\n\t\t * \" geo:hasGeometry ?poiGeom. \" +\n\t\t * \" ?poiGeom geo:asWKT ?poiWKT. \" + \" \" + \"}\";\n\t\t */\n\n//\t\tProperties prop = new Properties();\n//\t\tInputStream input = GeoSPARQLQueryExecutor.class.getClassLoader().getResourceAsStream(\"application.properties\");\n//\n//\t\tif (input == null) {\n//\t\t\tlogger.info(\"sorry, Unable to find file application.properties \");\n//\t\t}\n//\t\tString host = \"pyravlos1.di.uoa.gr\";\n//\t\tInteger port = 8080;\n//\t\tString appName = \"geoqa/Query\";\n//\t\tString query = myQuery;\n//\t\tString format = \"TSV\";\n//\n//\t\tSPARQLEndpoint endpoint = new SPARQLEndpoint(host, port, appName);\n//\t\tif (query.length() > 2) {\n//\t\t\ttry {\n//\n//\t\t\t\tEndpointResult result = endpoint.query(query,\n//\t\t\t\t\t\t(stSPARQLQueryResultFormat) stSPARQLQueryResultFormat.valueOf(format));\n//\n//\t\t\t\tSystem.out.println(\"<----- Result ----->\");\n//\t\t\t\tSystem.out.println(result.getResponse().replaceAll(\"\\n\", \"\\n\\t\"));\n//\t\t\t\tSystem.out.println(\"<----- Result ----->\");\n//\n//\t\t\t} catch (IOException e) {\n//\t\t\t\te.printStackTrace();\n//\t\t\t}\n//\t\t}\n\t\tlogger.info(\"store data in graph {}\", myQanaryMessage.getValues().get(myQanaryMessage.getEndpoint()));\n\t\t// TODO: insert data in QanaryMessage.outgraph\n\n\t\tlogger.info(\"apply vocabulary alignment on outgraph\");\n\t\t// TODO: implement this (custom for every component)\n\n\t\treturn myQanaryMessage;\n\t}", "public Query( String queryString ) {\r\n\tStringTokenizer tok = new StringTokenizer( queryString );\r\n\twhile ( tok.hasMoreTokens() ) {\r\n\t terms.add( tok.nextToken() );\r\n\t weights.add( new Double(1) );\r\n\t} \r\n }", "public List<Literal> query(Literal q) {\n\r\n\t\t\r\n\t\tList<Literal> result = datalogReasoner.query(compiledClauses, q);\r\n\t\t\r\n\t\tLDLPProgramQueryResultDecompiler decompiler = new LDLPProgramQueryResultDecompiler();\r\n\t\t\r\n\t\tresult = decompiler.decompileLiterals(result);\r\n\t\t\t\t\r\n\t\treturn result;\r\n\r\n\r\n\t}", "public void run(){\n\t\tif(searchHow==0){\n\t\t\tint isbnCount = 0;\n\t\t\tfor(int i=0; i<db.size(); i++){\n\t\t\t\t\tSearchRequest requestIsbn = new SearchRequest(db, searchForThis, isbnCount, db.size());\n\t\t\t\t\tdb.searchByISBN(requestIsbn);\n\t\t\t\t\tisbnCount = requestIsbn.foundPos;\n\t\t\t\t\tif (requestIsbn.foundPos >= 0) {\n\t\t\t\t\t\tisbnCount++;\n\t\t\t\t\t\tString formatThis = \"Matched ISBN at position: \" + requestIsbn.foundPos;\n\t\t\t\t\t\tSystem.out.printf(\"%-35s || Title: \"+db.getBook(requestIsbn.foundPos)+\"\\n\",formatThis);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\ti=db.size();\n\t\t\t}\n\t\t}\n\t\tif(searchHow==1){\n\t\t\tint titleCount = 0;\n\t\t\tfor(int i=0; i<db.size(); i++){\n\t\t\t\t\tSearchRequest requestTitle = new SearchRequest(db, searchForThis, titleCount, db.size());\n\t\t\t\t\tdb.searchByTitle(requestTitle);\n\t\t\t\t\ttitleCount = requestTitle.foundPos;\n\t\t\t\t\tif (requestTitle.foundPos >= 0) {\n\t\t\t\t\t\ttitleCount++;\n\t\t\t\t\t\tString formatThis = \"Matched title at position: \" + requestTitle.foundPos;\n\t\t\t\t\t\tSystem.out.printf(\"%-35s || Title: \"+db.getBook(requestTitle.foundPos)+\"\\n\",formatThis);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\ti=db.size();\n\t\t\t}\n\t\t}\n\t\tif(searchHow==2){\n\t\t\tint authorCount = 0;\n\t\t\tfor(int i=0; i<db.size(); i++){\n\t\t\t\t\tSearchRequest requestAuthor = new SearchRequest(db, searchForThis, authorCount, db.size());\n\t\t\t\t\tdb.searchByAuthor(requestAuthor);\n\t\t\t\t\tauthorCount = requestAuthor.foundPos;\n\t\t\t\t\tif (requestAuthor.foundPos >= 0) {\n\t\t\t\t\t\tauthorCount++;\n\t\t\t\t\t\tString formatThis = \"Matched author at position: \" + requestAuthor.foundPos;\n\t\t\t\t\t\tSystem.out.printf(\"%-35s || Title: \"+db.getBook(requestAuthor.foundPos)+\"\\n\",formatThis);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\ti=db.size();\n\t\t\t}\n\t\t}\n\t\tif(searchHow==3){\n\t\t\tint pageCount = 0;\n\t\t\tfor(int i=0; i<db.size(); i++){\n\t\t\t\t\tSearchRequest requestPage = new SearchRequest(db, searchForThis, pageCount, db.size());\n\t\t\t\t\tdb.searchByNumPages(requestPage);\n\t\t\t\t\tpageCount = requestPage.foundPos;\n\t\t\t\t\tif (requestPage.foundPos >= 0) {\n\t\t\t\t\t\tpageCount++;\n\t\t\t\t\t\tString formatThis = \"Matched pages at position: \" + requestPage.foundPos;\n\t\t\t\t\t\tSystem.out.printf(\"%-35s || Title: \"+db.getBook(requestPage.foundPos)+\"\\n\",formatThis);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\ti=db.size();\n\t\t\t}\n\t\t}\n\t\tif(searchHow==4){\n\t\t\tint yearCount = 0;\n\t\t\tfor(int i=0; i<db.size(); i++){\n\t\t\t\t\tSearchRequest requestYear = new SearchRequest(db, searchForThis, yearCount, db.size());\n\t\t\t\t\tdb.searchByYear(requestYear);\n\t\t\t\t\tyearCount = requestYear.foundPos;\n\t\t\t\t\tif (requestYear.foundPos >= 0) {\n\t\t\t\t\t\tyearCount++;\n\t\t\t\t\t\tString formatThis = \"Matched year at position: \" + requestYear.foundPos;\n\t\t\t\t\t\tSystem.out.printf(\"%-35s || Title: \"+db.getBook(requestYear.foundPos)+\"\\n\",formatThis);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\ti=db.size();\n\t\t\t}\n\t\t}\n\t}", "private static void statsForQuery(String query) {\n\t\tHashMap<String,Integer> oldTerms=newTerms; // record the terms to analyze modified queries\n\t\tnewTerms=new HashMap<String,Integer>();\n\t\t\t\t\n\t\tString terms[]=query.split(\"\\\\s\");\t\t\t\t\n\t\tint matchingTerms=0;\n\t\tint matchingTermsStopwords=0;\n\t\tint matchingTermsOrder=0;\n\t\tfor (int j=0;j<terms.length;j++) {\n\t\t\tif (!terms[j].equals(\"\")) {\n\t\t\t \tif (oldTerms.containsKey(terms[j])) {\n\t\t\t \t\tmatchingTerms++;\t\t\t\t\t \n\t\t\t \t\tif (stopwordsMap.containsKey(terms[j])) { // match if it is stopword\n\t\t\t \t\t\tmatchingTermsStopwords++;\n\t\t\t \t\t}\n\t\t\t \t\tif (oldTerms.get(terms[j])==j) { // match if it has the same order\n\t\t\t \t\t\tmatchingTermsOrder++;\n\t\t\t \t\t}\n\t\t\t \t}\n\t\t\t \tnewTerms.put(terms[j],j);\n\t\t\t}\n\t\t}\t\n\n\t\tif (newTerms.size()==oldTerms.size() && matchingTerms==oldTerms.size() && matchingTerms>0) { // the queries have the same terms\n\t\t totalEqualTermsQueries++;\n\t\t\t\t \t\t\t\t \t\t\t\t\t\t \t\t\t\t \t\t\t\t \n\t\t if (matchingTermsStopwords==oldTerms.size()) {\n\t\t \ttotalEqualTermsStopwordsQueries++;\n\t\t }\n\t\t if (matchingTermsOrder==oldTerms.size()) {\n\t\t \ttotalEqualTermsOrderQueries++;\n\t\t }\n\t\t if (query.equals(oldQuery)) {\n\t\t \ttotalIdenticalQueries++;\n\t\t }\n\t\t if (sessionQueries.contains(query)) {\n\t\t \ttotalIdenticalSessionQueries++;\n\t\t }\n\t\t}\n\t\telse if (matchingTerms-matchingTermsStopwords>0) { // the queries have at least one term equal and diferent from a stopword\n\t\t totalModifiedQueries++;\n\t\t int index=newTerms.size()-oldTerms.size()+N_MODIFIED_TERMS_RANGE/2;\n\t\t if (index<0) {\n\t\t \tindex=0;\n\t\t }\n\t\t else if (index>N_MODIFIED_TERMS_RANGE-1) {\n\t\t \tindex=N_MODIFIED_TERMS_RANGE-1;\n\t\t }\n\t\t nModifiedTerms[index]++;\n\t\t}\n\t\toldQuery=query; \n\t\t\t\t\t\t\n\t\t// store session query\n\t\tsessionQueries.add(query);\n\t}", "public pl.wcislo.sbql4j.java.model.runtime.Struct executeQuery() {\r\n java.util.List<pl.wcislo.sbql4j.examples.model.advanced.Department> _ident_dept =\r\n dept;\r\n java.util.List<java.lang.Integer> _dotResult = new java.util.ArrayList<java.lang.Integer>();\r\n int _dotIndex = 0;\r\n\r\n for (pl.wcislo.sbql4j.examples.model.advanced.Department _dotEl : _ident_dept) {\r\n if (_dotEl == null) {\r\n continue;\r\n }\r\n\r\n java.util.List<pl.wcislo.sbql4j.examples.model.advanced.Employee> _mth_getEmploysResult =\r\n _dotEl.getEmploys();\r\n java.lang.Integer _countResult = _mth_getEmploysResult.size();\r\n _dotResult.add(_countResult);\r\n _dotIndex++;\r\n }\r\n\r\n Number _min0 = null;\r\n\r\n for (Number _minEl0 : _dotResult) {\r\n _min0 = MathUtils.min(_min0, _minEl0);\r\n }\r\n\r\n java.lang.Integer _minResult = (java.lang.Integer) _min0;\r\n java.lang.Integer _asResult_minimum = _minResult;\r\n java.util.List<pl.wcislo.sbql4j.examples.model.advanced.Department> _ident_dept1 =\r\n dept;\r\n java.util.List<java.lang.Integer> _dotResult1 = new java.util.ArrayList<java.lang.Integer>();\r\n int _dotIndex1 = 0;\r\n\r\n for (pl.wcislo.sbql4j.examples.model.advanced.Department _dotEl1 : _ident_dept1) {\r\n if (_dotEl1 == null) {\r\n continue;\r\n }\r\n\r\n java.util.List<pl.wcislo.sbql4j.examples.model.advanced.Employee> _mth_getEmploysResult1 =\r\n _dotEl1.getEmploys();\r\n java.lang.Integer _countResult1 = _mth_getEmploysResult1.size();\r\n _dotResult1.add(_countResult1);\r\n _dotIndex1++;\r\n }\r\n\r\n java.lang.Double _avgResult = 0d;\r\n\r\n if ((_dotResult1 != null) && !_dotResult1.isEmpty()) {\r\n Number _avgSum1 = null;\r\n\r\n for (Number _avgEl1 : _dotResult1) {\r\n _avgSum1 = MathUtils.sum(_avgSum1, _avgEl1);\r\n }\r\n\r\n _avgResult = _avgSum1.doubleValue() / _dotResult1.size();\r\n }\r\n\r\n java.lang.Double _asResult_average = _avgResult;\r\n pl.wcislo.sbql4j.java.model.runtime.Struct _commaResult = OperatorUtils.cartesianProductSS(_asResult_minimum,\r\n _asResult_average, \"minimum\", \"average\");\r\n java.util.List<pl.wcislo.sbql4j.examples.model.advanced.Department> _ident_dept2 =\r\n dept;\r\n java.util.List<java.lang.Integer> _dotResult2 = new java.util.ArrayList<java.lang.Integer>();\r\n int _dotIndex2 = 0;\r\n\r\n for (pl.wcislo.sbql4j.examples.model.advanced.Department _dotEl2 : _ident_dept2) {\r\n if (_dotEl2 == null) {\r\n continue;\r\n }\r\n\r\n java.util.List<pl.wcislo.sbql4j.examples.model.advanced.Employee> _mth_getEmploysResult2 =\r\n _dotEl2.getEmploys();\r\n java.lang.Integer _countResult2 = _mth_getEmploysResult2.size();\r\n _dotResult2.add(_countResult2);\r\n _dotIndex2++;\r\n }\r\n\r\n Number _max0 = null;\r\n\r\n for (Number _maxEl0 : _dotResult2) {\r\n _max0 = MathUtils.max(_max0, _maxEl0);\r\n }\r\n\r\n java.lang.Integer _maxResult = (java.lang.Integer) _max0;\r\n java.lang.Integer _asResult_maximum = _maxResult;\r\n pl.wcislo.sbql4j.java.model.runtime.Struct _queryResult = OperatorUtils.cartesianProductSS(_commaResult,\r\n _asResult_maximum, \"\", \"maximum\");\r\n\r\n return _queryResult;\r\n }", "public String process(String query) {\r\n\t\tString command = query.split(\" \")[0].trim().toUpperCase();\r\n\t\tString response;\r\n\t\t\r\n\t\tswitch ( command ) {\r\n\t\t\tcase \"CREATE\":\r\n\t\t\t\tresponse = this.processCreate(query);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"GET\":\r\n\t\t\t\tresponse = this.processGet(query);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"ADD\":\r\n\t\t\t\tresponse = this.processAdd(query);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"REMOVE\":\r\n\t\t\t\tresponse = this.processRemove(query);\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tresponse = \"ERROR Unknow command - Available command CREATE, GET, ADD, REMOVE\\n\";\r\n\t\t}\r\n\t\t\r\n\t\treturn response;\r\n\t}", "private void montaQuery(Publicacao object, Query q) {\t\t\n\t}", "public static void main (String args[]) {\r\n\t String lspName = args[0];\r\n\t if (!lspName.startsWith (\"http://\")) {\r\n\t lspName = \"http://localhost:8080/\" + lspName;\r\n\t }\r\n\r\n String queryFilename = null;\r\n if (args.length == 2) {\r\n queryFilename = args[1];\r\n }\r\n\r\n try {\r\n SDARTSBean startsBean =\r\n \t new SDARTSBean (lspName);\r\n\r\n System.out.println (\"-----------------------------\");\r\n System.out.println (\"Finding supported interfaces of \" + lspName);\r\n String result1 = startsBean.getInterface();\r\n System.out.println (result1);\r\n System.out.println (\"-----------------------------\");\r\n System.out.println (\"Getting subcollection info for \" + lspName);\r\n String result2 = startsBean.getSubcollectionInfo();\r\n System.out.println (result2);\r\n System.out.println (\"-----------------------------\");\r\n String[] subcolNames = getSubCollectionNames (result2);\r\n int len = subcolNames.length;\r\n for (int i = 0 ; i < len ; i++) {\r\n String name = subcolNames[i];\r\n System.out.println (\"Getting subcollection info for \" + lspName +\r\n \":\" + name);\r\n String result3 = startsBean.getPropertyInfo(name);\r\n System.out.println (result3);\r\n System.out.println (\"-----------------------------\");\r\n }\r\n\r\n if (queryFilename != null) {\r\n StringBuffer sb = new StringBuffer();\r\n String testQuery = \"\";\r\n BufferedReader br =\r\n new BufferedReader (\r\n new InputStreamReader (\r\n new FileInputStream (queryFilename)));\r\n String line = null;\r\n while ( (line = br.readLine()) != null ) {\r\n sb.append (line);\r\n }\r\n\r\n testQuery = sb.toString();\r\n IntHolder total = new IntHolder();\r\n String result3 = startsBean.search (null,testQuery,total,1000);\r\n System.out.println (\"-----------------------------\");\r\n System.out.println (\"Found \" + total.value + \" hits.\");\r\n System.out.println (result3);\r\n System.out.println (\"-----------------------------\");\r\n }\r\n }\r\n catch (SDLIPException e) {\r\n System.out.println (e.getCode());\r\n e.printStackTrace();\r\n XMLObject details = e.getDetails();\r\n if (details != null) {\r\n try {\r\n System.out.println (\"DETAILS:\");\r\n System.out.println (details.getString());\r\n }\r\n catch (Exception e2) {\r\n e2.printStackTrace();\r\n }\r\n }\r\n System.exit(1);\r\n }\r\n catch (Exception e) {\r\n e.printStackTrace();\r\n System.exit(1);\r\n }\r\n }", "@Override\n\tprotected void runData(Query query) throws SQLException {\n\t\tStringBuilder q = new StringBuilder();\n\t\tArrayList<Integer> destinationList = new ArrayList<Integer>();\n\t\tquery.inc(2);\n\t\twhile (!isData(query.part()) || !isComment(query.part()) || !isCode(query.part())) {\n\t\t\tq.append(query.part());\n\t\t\tq.append(\" \");\n\t\t\tquery.inc();\n\t\t}\n\t\tArrayList<Integer> originList = getLinesFromData(q.toString());\n\t\tparseSecondCondition(query, originList, destinationList);\n\t}", "public void prog() {\r\n \t\r\n // First parse declarations\r\n decls();\r\n // Next parse expression\r\n ArrayList<Integer> values = new ArrayList<Integer>(); \r\n values = exprs(values);\r\n for(int i = 0; i < values.size(); i++) {\r\n \tSystem.out.print(values.get(i) + \" \");\r\n }\r\n System.out.println();\r\n \r\n \r\n //int value = expr();\r\n // Finally parse the end of file character\r\n match(TokenType.END_OF_FILE);\r\n //System.out.println(\"Value of expression is: \" + value);\r\n }", "public QueryParser(QueryParserTokenManager tm) {\n token_source = tm;\n token = new Token();\n jj_ntk = -1;\n jj_gen = 0;\n for (int i = 0; i < 117; i++) jj_la1[i] = -1;\n for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();\n }" ]
[ "0.6225192", "0.61957765", "0.6178199", "0.60419714", "0.6030711", "0.59584826", "0.59260094", "0.59198457", "0.58025664", "0.5749155", "0.57471734", "0.5739476", "0.5715343", "0.56911486", "0.5656975", "0.5641728", "0.56277883", "0.55960107", "0.55788165", "0.5547397", "0.55335903", "0.5498746", "0.5485727", "0.5478967", "0.5471737", "0.5466486", "0.5455405", "0.54539853", "0.5450076", "0.544906", "0.5447923", "0.5432884", "0.54149634", "0.54022825", "0.5396328", "0.5394471", "0.5384454", "0.53476524", "0.53417057", "0.5338676", "0.53341424", "0.53308046", "0.532832", "0.5308152", "0.53071576", "0.5298283", "0.5288145", "0.52870536", "0.52848864", "0.5284788", "0.5282253", "0.52689976", "0.5264834", "0.5259588", "0.5255654", "0.52463704", "0.5236685", "0.5236251", "0.52321446", "0.52321446", "0.5231109", "0.5228129", "0.52130026", "0.5199325", "0.51978445", "0.5193603", "0.51878387", "0.517636", "0.5173717", "0.517155", "0.5166222", "0.5156306", "0.5151412", "0.51502573", "0.5147199", "0.514328", "0.51415145", "0.5139775", "0.51251066", "0.51176256", "0.5109755", "0.51050895", "0.51045084", "0.50946736", "0.50896335", "0.5088251", "0.5076071", "0.50689703", "0.50636643", "0.5057583", "0.50561875", "0.5050544", "0.5042662", "0.5038983", "0.5031652", "0.5030926", "0.5029487", "0.50239366", "0.50233555", "0.50178427" ]
0.62076294
1
TODO Autogenerated method stub
@Override public int existseconds() { return seconds; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public String getPrefix() { return getClass().getSimpleName()+":"+prefix; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.66713095", "0.6567948", "0.652319", "0.648097", "0.64770466", "0.64586824", "0.64132667", "0.6376419", "0.62759", "0.62545097", "0.62371093", "0.62237984", "0.6201738", "0.619477", "0.619477", "0.61924416", "0.61872935", "0.6173417", "0.613289", "0.6127952", "0.6080854", "0.6076905", "0.6041205", "0.6024897", "0.60200036", "0.59985113", "0.5967729", "0.5967729", "0.5965808", "0.5949083", "0.5941002", "0.59236866", "0.5909713", "0.59030116", "0.589475", "0.58857024", "0.58837134", "0.586915", "0.58575684", "0.5850424", "0.5847001", "0.5824116", "0.5810248", "0.5809659", "0.58069366", "0.58069366", "0.5800507", "0.5792168", "0.5792168", "0.5792168", "0.5792168", "0.5792168", "0.5792168", "0.57900196", "0.5790005", "0.578691", "0.578416", "0.578416", "0.5774115", "0.5774115", "0.5774115", "0.5774115", "0.5774115", "0.5761079", "0.57592577", "0.57592577", "0.5749888", "0.5749888", "0.5749888", "0.5748457", "0.5733414", "0.5733414", "0.5733414", "0.57209575", "0.57154554", "0.57149583", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.571194", "0.57043016", "0.56993437", "0.5696782", "0.5687825", "0.5677794", "0.5673577", "0.5672046", "0.5669512", "0.5661156", "0.56579345", "0.5655569", "0.5655569", "0.5655569", "0.56546396", "0.56543446", "0.5653163", "0.56502634" ]
0.0
-1
new Thread(new PrintThread1()).start(); new Thread(new PrintThread2()).start();
public static void main(String[] args) { ExecutorService executorService = Executors.newCachedThreadPool(); executorService.execute(() -> { while (count.get() <= 100) { if(flag) { System.out.println("偶数" + count.getAndIncrement()); flag = false; } } }); executorService.execute(() -> { while (count.get() <= 100) { if(!flag) { System.out.println("奇数" + count.getAndIncrement()); flag = true; } } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n\n PrintNumber printNumber = new PrintNumber();\n\n Thread printThread1 = new Thread(printNumber);\n\n Thread printThread2 = new Thread(printNumber);\n\n printThread1.start();\n\n printThread2.start();\n\n }", "public static void main(String[] args) {\n\t\t\n\t\tPrintNumbersThread t1 = new PrintNumbersThread(\"thread 1\");\n\t\t\n\t\tPrintNumbersThread t2 = new PrintNumbersThread(\"thread 2\");\n\t\t\n\t\tt1.start();\n\t\tt2.start();\n\t}", "public static void main(String[] args) {\n\t\tfinal Printer2 p = new Printer2();\n\t\t\n\t\tnew Thread() {\n\t\t\tpublic void run() {\n\t\t\t\twhile(true)\n\t\t\t\t\tp.print1();\t\t\t\t//在匿名内部类使用外部变量\n\t\t\t}\n\t\t}.start();\n\t\t\n\t\tnew Thread() {\n\t\t\tpublic void run() {\n\t\t\t\twhile(true)\n\t\t\t\t\tp.print2();\t\t\t\t//在匿名内部类使用外部变量\n\t\t\t}\n\t\t}.start();\n\t\t\n\t}", "public static void main(String[] args){\r\n\t\tMythread2 mt = new Mythread2(); /* main thread created the child thread*/\r\n\t\t\tmt.start();\r\n\t\tfor(int i=0; i<10; i++){\r\n\t\t\t\tSystem.out.print(\"Main Thread\");\r\n\t\t\t\t\t}\r\n}", "public static void main( String[] args ) throws Exception\n {\n PrintTask task1 = new PrintTask( \"thread1\" );\n PrintTask task2 = new PrintTask( \"thread2\" );\n PrintTask task3 = new PrintTask( \"thread3\" );\n \n System.out.println( \"Starting threads\" );\n \n // create ExecutorService to manage threads \n ExecutorService threadExecutor = Executors.newFixedThreadPool( 3 );\n \n // start threads and place in runnable state \n threadExecutor.execute( task1 ); // start task1\n threadExecutor.execute( task2 ); // start task2\n threadExecutor.execute( task3 ); // start task3\n \n threadExecutor.shutdown(); // shutdown worker threads\n threadExecutor.awaitTermination(10, TimeUnit.SECONDS); \n System.out.println( \"Threads started, main ends\\n\" );\n }", "public static void main(String [] args)\n\t{\n\t\t\n\t\tThread printA = new Thread(new multiThread(\"a\"));\n\t\tThread printB = new Thread(new multiThread(\"b\"));\n\t\tThread printC = new Thread(new multiThread(\"c\"));\n\t\t\n\t\tnames[0] = printA.getName();\n\t\tnames[1] = printB.getName();\n\t\tnames[2] = printC.getName();\n\t\t\n\t\tfor(int i = 0; ; i++)\n\t\t{\t\n\t\t\tprintA.run();\t\n\t\t\tprintB.run();\t\n\t\t\tprintC.run();\n\t\t} \n\t}", "public static void main(String[] args) throws InterruptedException {\n\t\tMyThread t1 = new MyThread();\r\n\t\tt1.setName(\"ram\");\r\n\t\t\r\n\t\tMyThread t2 = new MyThread();\r\n\t\tt2.setName(\"tom\");\r\n\t\t\r\n\t\tt1.start();\r\n\t\tt1.join();\r\n\t\tt2.start();\r\n\t\tt2.join();\r\n\t\tfor(int i=1; i<=200;++i){\r\n\t\t\tSystem.out.println(Thread.currentThread().getName() \r\n\t\t\t\t\t+ \" \" + (i * 5));\r\n\t\t}\r\n\t\tSystem.out.println(\"main thread complete....\");\r\n\t}", "public static void main(String[] args) {\n GreetingPrinting g1=new GreetingPrinting(\"Hello,Java\");\n GreetingPrinting g2=new GreetingPrinting(\"Test Automation\");\n GreetingPrinting g3=new GreetingPrinting(\"Selenium is Fun\");\n GreetingPrinting g4=new GreetingPrinting(\"SDET trainig\");\n //define Thread\n Thread t1=new Thread(g1);\n Thread t2=new Thread(g2);\n Thread t3=new Thread(g3);\n Thread t4=new Thread(g4);\n //start the thread\n t1.start();\n t2.start();\n t3.start();\n t4.start();\n\n }", "public static void main(String[] args) throws InterruptedException \n { \n Barrier BR = new Barrier(); \n Thread t1 = new Thread(new Lect4.MyThread1(BR)); \n Thread t2 = new Thread(new Lect4.MyThread2(BR)); \n t1.start(); \n t2.start(); \n t1.join(); \n t2.join(); \n }", "public static void main(String[] args) {\n\t\tDisplay1 d1 = new Display1();\n\t\tDisplay1 d2 = new Display1();\n\t\tMyThread1 t1 = new MyThread1(d1,\"Dhoni\");\n\t\tMyThread1 t2 = new MyThread1(d2, \"Yuvraj\");\n\t\tt1.start();\n\t\tt2.start();\n\t}", "public static void main(String[] args) {\n\t\tfinal Sync1 object = new Sync1();\n\t\tThread t1 = new Thread() {\n\t\t\tpublic void run() {\n\t\t\t\tobject.print(5);\n\t\t\t}\n\t\t};\n\t\tThread t2 = new Thread() {\n\t\t\tpublic void run() {\n\t\t\t\tobject.print(100);\n\t\t\t}\n\t\t};\n\t\tt1.start();\n\t\tt2.start();\n\t\tSystem.out.println(t1.getState());\n\t\t\n\t\t\n\t}", "public static void main(String[] args){\n\t\tSystem.out.println(\"begin\");\n\t\tSimpleThread t1=new SimpleThread();\n\t\tSimpleThread t2=new SimpleThread();\n\t\tt1.setThread(t2);t1.setDelay(2000);\n\t\tt2.setThread(t1);t2.setDelay(1000);\n\t\tt1.start();\n\t\tt2.start();\n\t\tSystem.out.println(\"=end=\");\n\t}", "public static void main(String[] args) {\n Runnable myRunnable = new TestThread();\n Thread t1 = new Thread(myRunnable,\"t1\");\n Thread t2 = new Thread(myRunnable,\"t2\");\n t1.start();\n t2.start();\n }", "public static void main( String[] args ) {\n Runnable task1 = new TaskPrintC();\n Runnable task2 = new TaskPrintD();\n Runnable task3 = new TaskPrintP();\n\n Thread thread1 = new Thread( task1 );\n Thread thread2 = new Thread( task2 );\n Thread thread3 = new Thread( task3 );\n\n thread1.start();\n thread2.start();\n thread3.start();\n\n // Let them run for 500ms\n try {\n\t\t\tThread.sleep(500);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n \n // put up the stop sign\n runFlag=false;\n \n thread3.interrupt();\n thread2.interrupt();\n thread1.interrupt();\n \n }", "public static void main(String[] args) {\n\n\t\tprintJO p= new printJO();\n\t\t\n\t\tnew Thread(p.new printj()).start();\n\t\tnew Thread(p.new printO()).start();\n\t}", "public static void main(String[] args) {\n\r\n System.out.println(Thread.currentThread().getName());\r\n System.out.println(Thread.currentThread().getId());\r\n\r\n MyFirstThread helloThread1 = new MyFirstThread();\r\n MyFirstThread helloThread2 = new MyFirstThread();\r\n helloThread1.start();\r\n helloThread2.start();\r\n\r\n\r\n }", "public void run() {\n\t\tfor(int i=0;i<2;i++){\n\t\t\tSystem.out.println(Thread.currentThread().getName()+\":\"+i);\n\t\t}\n\t}", "public static void main(String[] args) {\n\n Thread t1 = new Thread(()->Foo.dosome());\n Thread t2 = new Thread(()->Foo.dosome());\n// Thread t1 = new Thread(()->f1.dosome());\n// Thread t2 = new Thread(()->f2.dosome());\n\n t1.start();\n t2.start();\n }", "public static void main(String[] args) {\n\t\t\n\t\tnew ThreadExemplo1().start();\n\t\t\n\t\tnew ThreadExemplo2().start();\n\n\t}", "public static void main(String[] args) {\n\t\tThread thread1 = new Thread(new ThreadOne());\n\t\tthread1.start();\n\t\t\n\t\tThread thread2 = new Thread(new ThreadOne());\n\t\tthread2.start();\n\t\t\n\t\tThread thread3 = new Thread(new ThreadOne());\n\t\tthread3.start();\n\t\t\n//\t\tThreadOne thread2 = new ThreadOne();\n//\t\tthread2.run();\n//\t\t\n//\t\tThreadOne thread3 = new ThreadOne();\n//\t\tthread3.run();\n\t}", "public static void main(String[] args) throws InterruptedException {\n\n Builder builder = new Builder();\n MyThread myThread = new MyThread(builder);\n MyThread myThread2 = new MyThread(builder);\n\n myThread.start();\n myThread2.start();\n\n myThread.join();\n myThread2.join();\n\n System.out.println(\"finished\");\n\n\n }", "public static void main(String[] args) {\n\t\tMythread t1 = new Mythread(\"First\");\n\t\tMythread t2 = new Mythread(\"Second\");\n\t\tt1.start();\n\t\tt2.start();\n\n\t}", "public static void main(String[] args)\n {\n Runnable r1=()->{ \n System.out.println(\"Thread1 is running...\");}; \n Thread t1=new Thread(r1); \n t1.start(); \n }", "public static void main(String[] args) {\n\t\tThread numThread = new MultiThread();\r\n\t\tThread numThread2 = new MultiThread();\r\n\r\n\t\t// Named the thread\r\n\t\tnumThread.setName(\"Thread 1\");\r\n\t\tnumThread2.setName(\"Thread 2\");\r\n\t\t\r\n\t\t// Execute threads\r\n\t\tnumThread.start();\r\n\t\tnumThread2.start();\r\n\r\n\t}", "public static void main(String[] args) {\n\t\tnew firstTh().start();\n\t\tnew Thread(new secondTh()).start();\n\n\t}", "public static void main(String[] args) {\n\n\n Object object = new Object();\n Object object2 = new Object();\n\n Thread thread1 = new Thread(new Runnable() {\n @Override\n public void run() {\n System.out.println(\"Thread 1 start\");\n synchronized (object) {\n // обработка данных\n try {\n Thread.sleep(500);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n System.out.println(\"Thread 1 locked obj1\");\n synchronized (object2) {\n\n System.out.println(\"Thread 1 locked both obj\");\n }\n }\n }\n });\n Thread thread2 = new Thread(new Runnable() {\n @Override\n public void run() {\n System.out.println(\"Thread 2 start\");\n synchronized (object2) {\n\n System.out.println(\"Thread 2 locked obj2\");\n synchronized (object) {\n\n System.out.println(\"Thread 2 locked both\");\n }\n }\n }\n });\n thread1.start();\n thread2.start();\n }", "public static void main(String[] args) {\n\t\tThread t1 = new Thread(() -> {\n\t\t\tfor (int i = 1; i <= 10; i++)\n\t\t\t\tSystem.out.println(i);\n\t\t});\n\t\tt1.start();\n\n\t\t// With Method reference\n\t\tThread t2 = new Thread(ThreadWithMethodReference::print);\n\t\tt2.start();\n\t}", "public static void main(String[] args) {\n\t\tRunnable threadObj = new Runnable() {\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tSystem.out.println(\"Thread working\");\n\t\t\t}\n\t\t};\n\t\tThread t1 = new Thread(threadObj);\n\t\tt1.start();\n\t\n\t\tThread t2 = new Thread(new Runnable() {\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tSystem.out.println(\"Thread2 working\");\n\t\t\t}\n\t\t});\n\t\tt2.start();\n\t}", "public void thread() {\n\t\tnew Thread(first).start();\n\t\trest.thread();\n\t}", "public static void main(String[] args) {\nThreadDemo t1 = new ThreadDemo();\nThreadDemo t2 = new ThreadDemo();\nt1.setName(\"First Thread\");\nt2.setName(\"Second Thread\");\nt1.setPriority(Thread.MAX_PRIORITY);\nt2.setPriority(Thread.MAX_PRIORITY);\nt1.start();\nt2.start();\n\n\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tsynchronized (lock1) {\n\t\t\t\t\tSystem.out.println(\"This is the lock1\");\n\t\t\t\t\tsynchronized (lock2) {\n\t\t\t\t\t\tSystem.out.println(\"This is the lock2\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "public static void main(String[] args) {\n\t\tMythread t = new Mythread();\n\t\tt.start();\n\n\t\ttry {\n\t\t\tt.join(); \n\t }catch(Exception e) {}\n\t\t\n\t\tSystem.out.println(t.total);\n\t\t\n\t\t\n\t\tMythread2 t2 = new Mythread2();\n\t\tsynchronized (t2) {\n\t\t\tt2.start();\n\n\t\t\ttry {\n\t\t\t\tt2.wait(); \n\t\t }catch(Exception e) {}\n\t\t\t\n\t\t\n\t\t\tSystem.out.println(t2.total);\n\n\t\t\t\n\t\t}\n\n\n\t}", "public static void main(String[] args) throws InterruptedException {\n Runnable r1 = new Runnable() {\n @Override public void run() {\n try {\n Thread.sleep( 600);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n System.out.println( \"A1 \" + Thread.currentThread() );\n System.out.println( \"A2 \" + Thread.currentThread() );\n }\n };\n\n Runnable r2 = new Runnable() {\n @Override public void run() {\n try {\n Thread.sleep(600);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n System.out.println( \"B1 \" + Thread.currentThread() );\n System.out.println( \"B2 \" + Thread.currentThread() );\n }\n };\n\n ExecutorService executor = Executors.newCachedThreadPool();\n\n executor.submit( r1 );\n executor.submit( r2 );\n\n System.out.println(\"Pause beginnt ...\");\n Thread.sleep( 5000 );\n System.out.println(\"Pause beendet ...\");\n\n executor.execute( r1 );\n executor.execute( r2 );\n\n executor.shutdown();\n }", "public static void main(String[] args) {\n\t\tFriend f1 = new Friend(\"aaa\");\r\n\t\tFriend f2 = new Friend(\"bbb\");\r\n\t\tnew Thread1(f1, f2).start();\r\n\t\tnew Thread1(f2, f1).start();\r\n\t}", "public static void main(String[] args) {\n\n CountDown countDown = new CountDown();\n\n\n CountDownThread t1 = new CountDownThread(countDown);\n t1.setName(\"Thread 1\");\n\n CountDownThread t2 = new CountDownThread(countDown);\n t2.setName(\"Thread 2\");\n\n t1.start();\n t2.start();\n\n\n }", "public static void main(String[] args) {\n\t\tSystem.out.print(\"\\nTask1 Kicked Off\");\r\n Task1 task1 = new Task1();\r\n task1.start(); //task1.run()\r\n \r\n System.out.print(\"\\nTask2 Kicked Off\");\r\n\t\t//Task2\r\n\t\tTask2 task2 = new Task2();\r\n\t\tThread task2Thread = new Thread(task2);\r\n\t\ttask2Thread.start();\r\n \r\n\t\tSystem.out.print(\"\\nTask1 Kicked Off\");\r\n\t\t//Task3\r\n\t\tfor(int i = 301; i<=399; i++) {\r\n\t\t\tSystem.out.print(i + \" \");\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.print(\"\\n Task3 Done\");\r\n\t\t\r\n\t\tSystem.out.print(\"Main Done\");\r\n\r\n\t}", "public static void main(String[] args) {\n \r\n\t\t Thread_run th=new Thread_run();\r\n\t\t Thread_runnable th2=new Thread_runnable();\r\n\t\t Thread_run[] m=new Thread_run[10];\r\n\t\t Thread_runnable[] n=new Thread_runnable[10];\r\n\t\t th.start();\r\n\t\t th2.run();\r\n\t\t for(int i=0;i<10;i++) {\r\n\t\t\t m[i]=new Thread_run();\r\n\t\t\t n[i]=new Thread_runnable();\r\n\t\t\t m[i].start();\r\n\t\t\t n[i].run();\r\n\t\t }\r\n\t\t \r\n\t\t try {\r\n\t\t\tth.join();\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t for(int i=0;i < 10;i++) {\r\n\t\t\t\tSystem.out.println(\"mainから出力 : \"+i);\r\n\t\t\t}\r\n\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tsynchronized (lock2) {\n\t\t\t\t\tSystem.out.println(\"This is the lock1\");\n\t\t\t\t\tsynchronized (lock1) {\n\t\t\t\t\t\tSystem.out.println(\"This is the lock2\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "public static void main(String[] args) {\n\t\tSystem.out.println(\"begin\");\n\t\t(new ReadInventoryThread()).start();\n\t\t(new Thread(new PrintData())).start();\n\t\t(new ReadInventoryThread()).start();\n\t\tSystem.out.println(\"end\");\n\t}", "public static void main(String[] args) {\n\t\tThreadSynchronization ts = new ThreadSynchronization();\n\t\tThread1 v1=new Thread1(ts);\n\t\tThread2 v2=new Thread2(ts);\n\t\tv1.run();\n\t\tv2.run();\n\n\t}", "public static void main(String[] args) throws InterruptedException {\n Test1 test1 = new Test1();\n new Thread(()->{\n try {\n test1.ts(Thread.currentThread().getName());\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n },\"A1\").start();\n new Thread(()->{\n try {\n test1.ts(Thread.currentThread().getName());\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n },\"A2\").start();\n }", "public static void main(String[] args) throws InterruptedException {\n\r\n\t\tSystem.out.println(\"Main thread starts...\");\r\n\t\tMyThread t1=new MyThread();\r\n\t\tMyThread t2=new MyThread();\r\n\t\t\r\n\t\tt1.start();\r\n\t\t\r\n\t\tt1.join();\r\n\r\n\t\tt2.start();\r\n\r\n\t\tt2.join();\r\n\t\r\n\t\tSystem.out.println(\"Main thread Exits...\");\r\n\t}", "public static void main(String[] args) {\n\t\tMyThread1 t = new MyThread1();\r\n\t\tt.start();\r\n//executed by main thread\r\n\t\tfor (int i = 0; i < 10; i++) {\r\n\t\t\tSystem.out.println(\"main thread\");\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n Table table = new Table();\n MyThread1 t1 = new MyThread1(table);\n MyThread1 t2 = new MyThread1(table);\n MyThread1 t3 = new MyThread1(table);\n MyThread1 t4 = new MyThread1(table);\n\n t1.start();\n t2.start();\n t3.start();\n t4.start();\n\n }", "public static void main(String[] args) throws Exception {\n\r\n\t\tThread t1=new Thread(new Hii());\r\n\t\tThread t2=new Thread(new Helloo());\r\n\t\t\r\n\t\tSystem.out.println(Thread.currentThread().getName());\r\n\t\tSystem.out.println(t1.getName());\r\n\t\tSystem.out.println(t2.getName());\r\n\t\t\r\n\t\tSystem.out.println(\"----------------------------\");\r\n\t\t\r\n\t\tt1.setName(\"Hii Thread\");\r\n\t\tt2.setName(\"Helloo Thread\");\r\n\t\t\r\n\t\tSystem.out.println(Thread.currentThread().getName());\r\n\t\tSystem.out.println(t1.getName());\r\n\t\tSystem.out.println(t2.getName());\r\n\t\t\r\n\t\tSystem.out.println(\"----------------------------\");\r\n\t\t\r\n\t\tt1.start();\r\n\t\ttry {\r\n\t\t\tThread.currentThread().sleep(10);\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tt2.start();\r\n\t\t\r\n\t\tSystem.out.println(\"t1 is alive ? \"+ t1.isAlive());\r\n\t\tt1.join();\r\n\t\tt2.join();\r\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(\"t1 is alive ? \"+ t1.isAlive());\r\n\t\tSystem.out.println(\"Bye ....\");\r\n\t}", "@Override\r\n\tpublic void run() {\n\t\tfor (int i=1; i<0;i++) {\r\n\t\t\ttry {\r\n\t\t\t\tcurrentThread();\r\n\t\t\t\tThread.sleep(1000);\r\n\t\t\t\tSystem.out.println(currentThread());\r\n\t\t\t}catch(Exception e) {}\r\n\t\t}\r\n\t}", "public static void main(String[] args) \r\n\t{\n\r\n\tReadThread r=new ReadThread(); //reation\r\n\tr.start();// geting to runnable and it will call automitacly it will run\r\n\t\r\n\tWriteThread wr=new WriteThread(); //reation\r\n\twr.start();// geting to runnable and it will call automitacly it will run\r\n\t\r\n\ttry\r\n\t{\r\n\t\tThread.sleep(1000);\r\n\tr.join();// not allwed to over Thread\r\n\t}catch(InterruptedException ie)\r\n\t{\r\n\t\t\r\n\t}\r\n\t\r\n\t\r\n\t// read thread to complete its 5 times iteration and\r\n\t//the give the actvity to writer thread\r\n\t\r\n\t/*try\r\n\t{\r\n\t\tThread.sleep(1000);\r\n\twr.join();\r\n\t}catch(InterruptedException ie)\r\n\t{\r\n\t\t\r\n\t\t\r\n\t}\r\n\t*/\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t}", "public static void main(String[] args) {\n\t\tMultiThreading a1= new MultiThreading();\n\t\tMultiThreading2 a2= new MultiThreading2();\n\t\ta1.setName(\"Bhains\");// hamesa start se pahle likha hota hai \n\t\ta2.setName(\"Hero\");\n\t\ta1.start();// agar yaha run ko call kia to multi thread nahi hai\n\t\t\n\t\ta2.start();\n\t//\tThread.sleep(10000);// ek thread pe ek hi baar \n\t\tMultiThreading b1=new MultiThreading();\n\t\t\n\t\t\n\t\t//a1.start();// ek baar start hui use fir nahi initialize nahi kar sakte Run time pe aaega error\n\t\tb1.start();\n\t\t\n\t\t\t//a1.m1();\n\t\t\t//a2.m2();\t\t\t\n\t}", "public static void main(String[] args) { \n\t\tSystem.out.println(\"Part 1 Demo with same instance.\");\n\t\tFoo fooA = new Foo(\"ObjectOne\");\n\t\tMyThread thread1a = new MyThread(fooA, \"Dog\", \"A\");\n\t\tMyThread thread2a = new MyThread(fooA, \"Cat\", \"A\");\n\t\tthread1a.start();\n\t\tthread2a.start();\n\t\twhile (thread1a.isAlive() || thread2a.isAlive()) { };\n\t\tSystem.out.println(\"\\n\\n\");\n\t\t \n\t\t/* Part 1 Demo -- difference instances */ \n\t\tSystem.out.println(\"Part 1 Demo with different instances.\");\n\t\tFoo fooB1 = new Foo(\"ObjectOne\");\n\t\tFoo fooB2 = new Foo(\"ObjectTwo\");\n\t\tMyThread thread1b = new MyThread(fooB1, \"Dog\", \"A\");\n\t\tMyThread thread2b = new MyThread(fooB2, \"Cat\", \"A\");\n\t\tthread1b.start();\n\t\tthread2b.start();\n\t\twhile (thread1b.isAlive() || thread2b.isAlive()) { };\n\t\tSystem.out.println(\"\\n\\n\");\n\t\t \n\t\t/* Part 2 Demo */ \n\t\tSystem.out.println(\"Part 2 Demo.\");\n\t\tFoo fooC = new Foo(\"ObjectOne\");\n\t\tMyThread thread1c = new MyThread(fooC, \"Dog\", \"A\");\n\t\tMyThread thread2c = new MyThread(fooC, \"Cat\", \"B\");\n\t\tthread1c.start();\n\t\tthread2c.start();\n\t}", "ProcessRunner print();", "public static void main(String args[]) {\n\t\t (new Thread(new Threads_and_Executors())).start();\r\n}", "public static void main(String[] args) {\n Message message = new Message();\n Thread t1 = new Thread(new Writer(message));\n Thread t2 = new Thread(new Reader(message));\n\n t1.setName(\"Writer Thread\");\n t2.setName(\"Reader Thread\");\n\n t1.start();\n t2.start();\n }", "public static void main(String[] args) {\n\t\tLockHolder holder = new LockHolder();\r\n\t\tnew Thread(new Task1(holder)).start();\r\n\t\tnew Thread(new Task2(holder)).start();\r\n\t}", "public static void main(String[] args) throws InterruptedException {\n\t\tList<Character> list = new ArrayList<>();\n\n Thread thread1 = new StringThread(list, \"HELLO\");\n thread1.start();\n\n Thread thread2 = new StringThread(list, \"WORLD\");\n thread2.start();\n\n thread1.join();\n thread2.join();\n\t}", "public static void main(String[] args) {\n\n\n Main main = new Main();\n\n Thread thread1 = new Thread(new Runnable() {\n @Override\n public void run() {\n main.value = \"aaaaaa\";\n// Main main = new Main();\n// main.print10();\n System.out.println(main.value);\n\n }\n });\n Thread thread2 = new Thread(new Runnable() {\n @Override\n public void run() {\n main.value = main.value + \"bbbbb\";\n// Main main = new Main();\n// main.print10();\n System.out.println(main.value);\n\n }\n });\n\n\n thread1.start();\n thread2.start();\n\n\n }", "public void first(Runnable printFirst) throws InterruptedException {\n printFirst.run();\n second.countDown();\n }", "public static void main(String[] args) {\n\t\tMyThread thread = new MyThread();\r\n\t\tthread.setName(\"MyThread\");\r\n\t\tThread t1 = new Thread(thread);\r\n\t\tSystem.out.println(\"begin=\" + System.currentTimeMillis());\r\n\t\tt1.setName(\"T1\");\r\n\t\tt1.start();\r\n\t\tSystem.out.println(\"end=\" + System.currentTimeMillis());\r\n\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tfor (int i = 0; i < 10; i++) {\n\t\t\t\t\tconditionThreadCommunication.printA();\n\t\t\t\t}\n\t\t\t}", "@Test\n public void testThread() {\n\n Thread thread1 = new Thread(() -> {\n //i++;\n for (int j = 0; j < 2000000; j++) {\n (this.i)++;\n }\n });\n\n Thread thread2 = new Thread(() -> {\n //System.out.println(\"i = \" + i);\n for (int j = 0; j < 2000000; j++) {\n System.out.println(\"i = \" + this.i);\n }\n });\n\n thread1.start();\n thread2.start();\n /*for (int j = 0; j < 20; j++) {\n thread1.start();\n thread2.start();\n }*/\n\n\n /* ValueTask valueTask = new ValueTask();\n PrintTask printTask = new PrintTask();*/\n\n /*for (int i = 0; i < 20; i++) {\n Worker1 worker1 = new Worker1(valueTask);\n Worker2 worker2 = new Worker2(printTask);\n\n worker1.start();\n worker2.start();\n }*/\n\n }", "public static void main(String[] args)\n\t\t\t{\n\t\t\t\t\n\t\t\t\tThread t1 = new Thread(new MyThread1_RunnableInterface(1,\"Hello from Thread1\"));\n\t\t\t\tThread t2 = new Thread(new MyThread1_RunnableInterface(2,\"Hello from Thread2\"));\n\t\t\t\tThread t3 = new Thread(new MyThread1_RunnableInterface(3,\"Hello from Thread3\"));\n\t\t\t\t\n t1.start();\n t2.start();\n t3.start();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t}", "public void run() {\n\t\tsynchronized (s1) {\n\t\t\ts1.out(threadname);\n\t\t}\n\n//\t\ts1.out(threadname);\n\t\tSystem.out.println(threadname + \" exiting..\");\n\t}", "public static void main(String[] args) {\r\n\t\tfor(int i=0; i<10; i++){\r\n\t\t\tB b = new B();\r\n\t\t\tA a = new A(b);\r\n\t\t\tC c = new C(a);\r\n\t\t\tc.start();\r\n\t\t\tb.start();\r\n\t\t\ta.start();\r\n//\t\t\tSystem.out.println(\"--------------:\"+(i+1));\r\n\t\t\t/*new A().start();\r\n\t\t\tnew B().start();\r\n\t\t\tnew C().start();*/\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t /*final Thread t1 = new Thread(new Runnable() { \r\n\t \r\n\t @Override \r\n\t public void run() { \r\n\t System.out.println(\"t1\"); \r\n\t } \r\n\t }); \r\n\t final Thread t2 = new Thread(new Runnable() { \r\n\t \r\n\t @Override \r\n\t public void run() { \r\n\t try { \r\n\t //引用t1线程,等待t1线程执行完 \r\n\t t1.join(); \r\n\t } catch (InterruptedException e) { \r\n\t e.printStackTrace(); \r\n\t } \r\n\t System.out.println(\"t2\"); \r\n\t } \r\n\t }); \r\n\t Thread t3 = new Thread(new Runnable() { \r\n\t \r\n\t @Override \r\n\t public void run() { \r\n\t try { \r\n\t //引用t2线程,等待t2线程执行完 \r\n\t t2.join(); \r\n\t } catch (InterruptedException e) { \r\n\t e.printStackTrace(); \r\n\t } \r\n\t System.out.println(\"t3\"); \r\n\t } \r\n\t }); \r\n\t t3.start(); \r\n\t t2.start(); \r\n\t t1.start(); */\r\n\t}", "@Override\r\n\tpublic void run() {\n\t\tfor (int i = 6; i <= 10; i++) {\r\n System.out.println(Thread.currentThread().getName() + \": \" + i); \t\r\n\r\n}\r\n\t}", "public void second(Runnable printSecond) throws InterruptedException {\n while (!isFirstPrint) {\n Thread.sleep(1);\n }\n printSecond.run();\n isSecondPrint = true;\n\n }", "public static void main(String[] args) throws Exception {\n System.out.println(\"Main thread!\");\n\n Hi x = new Hi();\n Bye y = new Bye();\n\n\n x.setName(\"Thread - Hi\");\n y.setName(\"Thread - Bye\");\n System.out.println(x.getName());\n System.out.println(y.getName());\n\n\n// thread 1\n x.start();\n \n // Both run simultaneously but see how the below statement affects the output\n // try {Thread.sleep(100);} catch (Exception e) {};\n\n// thread 2\n y.start();\n\n\n x.join();\n y.join();\n// Let above thread die then start further execution\n System.out.println(\"Done...\");\n System.out.println(x.isAlive());\n }", "@Override\n\tpublic void run() {\n\t\tfor(int i=0;i<10;i++)\n\t\t\tSystem.out.println(\"Thread A running \"+i);\n\t}", "public static void main(String[] args) {\n\t\tthreadClass1 tobj = new threadClass1();\n\t\tThread t1 = new Thread(tobj);\n\t\tt1.setName(\"thread1\");\n\t\tt1.setPriority(Thread.MAX_PRIORITY);\n\t\tt1.start();\n\t\t\n\t\tThread t2= new Thread(tobj);\n\t\tt2.setName(\"Thread 2\");\n\t\tt2.setPriority(7);\n\t\tt2.start();\n\t\t\n\t\tThread t3= new Thread(tobj);\n\t\tt3.setName(\"Thread 3\");\n\t\tt3.setPriority(5);\n\t\tt3.start();\n\t\t\n\t\tThread t4= new Thread(tobj);\n\t\tt4.setName(\"Thread 4\");\n\t\tt4.setPriority(3);\n\t\tt4.start();\n\t\t\n\t\t\n//\t\ttry {\n//\t\t\tt1.join();\n//\t\t} catch (InterruptedException e) {\n//\t\t\t// TODO Auto-generated catch block\n//\t\t\te.printStackTrace();\n//\t\t}\n\t\t\n\t\tt1.yield();\n//\t\tThreadClass2 t3 = new ThreadClass2();\n//\t\tt3.setName(\"Thread 3\");\n//\t\t\n//// if we call run() directly - it acts as normal method and not as a THREAD\n////\t\tt3.run();\n//\t\t\n////\t\tThus we need to call start() in order to call run();\n//\t\tt3.start();\n//\t\t\n//\t\t\n//\t\tThreadClass2 t4 = new ThreadClass2();\n//\t\tt4.setName(\"Thread 4\");\n//\t\t\n//\t\tt4.start();\n\n\n\t}", "public static void main(String[] args) {\n classA a = new classA();\n classB b = new classB();\n //classC c = new classC();\n Thread t1 = new Thread(a);\n Thread t2 = new Thread(b);\n //Thread t3 = new Thread(c);\n Thread t3 = new Thread(new classC());\n t1.start();\n t2.start();\n t3.start();\n }", "@Override\r\n\tpublic void run() {\n\t\tSystem.out.println(\"r1 \");\r\n\t\tSystem.out.println(\"r2 \");\r\n\t\t\r\n\t}", "@Override\n\tpublic void run()\n\t{\n\t\tSystem.out.println(\"T2 thread Started\");\n\t\t\n\t\tfor(int j=0;j<=10;j++)\n\t\t\tSystem.out.println(\"j = \"+j);\n\t\t\n\t\tSystem.out.println(\"T2 thread Ended\");\n\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tfor (int i = 0; i < 10; i++) {\n\t\t\t\t\tconditionThreadCommunication.printB();\n\t\t\t\t}\n\t\t\t}", "public synchronized void print(String name) {\n try {\n System.out.println(\"Thread \" + name + \".print(): Starting\" );\n Thread.sleep(3000);\n System.out.println(\"Thread \" + name + \".foo(): ending\");\n } catch (InterruptedException e) {\n e.printStackTrace();\n System.out.println(\"Thread \" + name + \": interrupted\");\n }\n\n }", "public static void main(String[] args) {\r\n HomeWork4 h=new HomeWork4();\r\n new Thread(()->{\r\n String name=Thread.currentThread().getName();\r\n int number=0;\r\n while(true){\r\n synchronized (h) {\r\n if(h.num==1) { //表示要打印A\r\n if(number==5) break;\r\n number++;\r\n h.num = 2;\r\n System.out.print(name);\r\n try {\r\n h.notifyAll();\r\n h.wait();\r\n } catch (InterruptedException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }\r\n }\r\n },\"A\").start();\r\n new Thread(()->{\r\n String name=Thread.currentThread().getName();\r\n int number=0;\r\n while(true) {\r\n synchronized (h) {\r\n if (h.num == 2) { //表示要打印B\r\n if (number == 5) break;\r\n number++;\r\n h.num = 3;\r\n System.out.print(name);\r\n try {\r\n h.notifyAll();\r\n h.wait();\r\n } catch (InterruptedException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }\r\n }\r\n },\"B\").start();\r\n new Thread(()->{\r\n String name=Thread.currentThread().getName();\r\n int number=0;\r\n while(true) {\r\n synchronized (h) {\r\n if (h.num == 3) { //表示要打印C\r\n if (number == 5) break;\r\n number++;\r\n h.num = 1;\r\n System.out.print(name);\r\n try {\r\n h.notifyAll();\r\n h.wait();\r\n } catch (InterruptedException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }\r\n }\r\n },\"C\").start();\r\n }", "@Test\n\tpublic void testForPrintNumbersUsingThreadClass() {\n\t\tList<Integer> list =new ArrayList<Integer>(Arrays.asList(3,15,90,56,34));\n\t\tPrintNumberListUsingThread.consumer1.accept(list);\n\t}", "@Override\r\n\tpublic void run() {\n\t\tSystem.out.println(Thread.currentThread().getName());\r\n\t\tSystem.out.println(\"ThreadTest\");\r\n\t\t\r\n\t\tfor (int i = 0; i < 10; i++) {\r\n\t\t\tSystem.out.println(\"i \" +i);\r\n\t\t\ttry {\r\n\t\t\t\tThread.sleep(1000);\r\n\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\r\n\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tSystem.out.println(\"Thread2 working\");\n\t\t\t}", "public static void main(String[] args) {\n\t\tMyThread mt = new MyThread();\n\t\t// We can assign a name\n\t\tmt.setName(\"Thread 1\");\n\t\tmt.start();\n\t\t\n\t\tMyThreads2 mt2 = new MyThreads2();\n\t\tThread t = new Thread(mt2);\n\t\t\n\t\t//New Thread\n\t\tThread t2 = new Thread(mt2);\n\t\tThread t3 = new Thread(mt2); \n\t\tt.setName(\"Thread 2\");\n\t\tt2.setName(\"Thread 3\");\n\t\tt3.setName(\"Thread 4\");\n\t\tt.start();\n\t\tt2.start();\n\t\tt3.start();\n\t\t\n\t}", "public void secondThread() throws InterruptedException {\n\t\t\n\t\tRandom random = new Random();\n\t\tfor(int i = 0; i < 1000; i++) {\n\t\t\t/*lock1.lock();\n\t\t\tlock2.lock();*/\n\t\t\tacquireLocks(lock2, lock1);\n\t\t\tAccount.transfer(a2, a1, random.nextInt(100));\n\t\t\tlock1.unlock();\n\t\t\tlock2.unlock();\n\t\t}\n\t}", "@Override\n\t\tpublic void run() {\n\t\t\tfor(int i=1;i<=100;i=i+2){\n\t\t\t\t\n\t\t\t\ttry{\n\t\t\t\t\tlock.lock();\n\t\t\t\t\tSystem.out.println(Thread.currentThread().getName()+i);\n\t\t\t\t\tc1.await();\n\t\t\t\t\tc2.signal();\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}finally{\n\t\t\t\t\tlock.unlock();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}", "public static void main(String[] args) {\n\t\tTestThread_1 t = new TestThread_1();\n\t\tnew Thread(t).start();\n\t\tnew Thread(t).start();\n\t\tnew Thread(t).start();\n\t\tnew Thread(t).start();\n\n\t}", "public static void main(String[] args) {\n\t\tThread th = new Thread(new Runnable() {\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tSystem.out.println(\"Thread 1 is running\");\n\t\t\t}\n\t\t});\n\n\t\tth.start();\n\n\t\t// Thread Example using lambda\n\n\t\tRunnable rn = () -> System.out.println(\"Thread 2 is running\");\n\n\t\tThread th2 = new Thread(rn);\n\t\tth2.start();\n\t}", "public static void main(String[] args) {\n\t\t// Create 2 threads\n\t\tThreadNameWithRunnable p = new ThreadNameWithRunnable(\"One\", 700);\n\t\tThreadNameWithRunnable q = new ThreadNameWithRunnable(\"Two\", 600);\n\t\t// Display also the thread that is used for main\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\tSystem.out.println(Thread.currentThread().getName() + \" \" + i);\n\t\t\ttry {\n\t\t\t\tThread.sleep(1200);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\tSystem.out.println(Thread.currentThread().getName()\n\t\t\t\t\t\t+ \" is awake\");\n\t\t\t}\n\t\t}\n\t}", "public void printLog() {\n Runnable runnable = new Runnable() \n\t{\n @Override\n public void run() \n\t {\n\t\tmainClass os=new mainClass();\n\t\tos.run();\t\t\t\n\t\t\t\t\n }\n };\n\tThread thread = new Thread(runnable);\n thread.start();\n }", "@Override\n // Thread creation\n // Run method from the Runnable class.\n public void run() {\n p.println(\"Current thread = \" + Thread.currentThread().getName());\n // Shows when a task is being executed concurrently with another thread,\n // then puts the thread to bed (I like saying that)\n try {\n p.println(\"Doing a task during : \" + name);\n Thread.currentThread().sleep(time);\n }\n // Exception for when a thread is interrupted.\n catch (InterruptedException e) {\n e.printStackTrace();\n }\n }", "public static void main(String[] args) {\n JvmThread jvmThread = new JvmThread(123);\n JvmThread jvmThread1 = new JvmThread(456);\n jvmThread.start();\n jvmThread1.start();\n System.out.println(jvmThread);\n System.out.println(jvmThread1);\n }", "@Override\n\t\tpublic void run() {\n\t\t\tfor(int i=2;i<=100;i=i+2){\n\t\t\t\t\n\t\t\t\ttry{\n\t\t\t\t\tlock.lock();\n\t\t\t\t\tSystem.out.println(Thread.currentThread().getName()+i);\n\t\t\t\t\tc1.signal();\n\t\t\t\t\tc2.await();\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}finally{\n\t\t\t\t\tlock.unlock();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}", "public void first(Runnable printFirst) throws InterruptedException {\n synchronized (mutex) {\n printFirst.run();\n isReadySecond = true;\n mutex.notifyAll();\n }\n }", "@Override\n\tpublic void run() {\n\t\tfor(int i=0;i<10;i++)\n\t\t\tSystem.out.println(\"Thread B running \"+i);\n\t}", "public static void main(String[] args) {\n\t\tTrd t=new Trd();\r\n\t\tTrd2 t2=new Trd2();\r\n\r\n\t\tt2.start();\r\n\t\tt.start();\r\n\t\t//t.setPriority(5);\r\n\t\t//t2.setPriority(4);\r\n\t\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\t//put this function above and below the join statement to show the different results\r\n\t\t\tif(t2.isAlive())\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Thread 1 is still running\");\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Thread exited a while back\");\r\n\t\t\t}\r\n\t\t\tt2.join();\r\n\t\t\tt.join();\r\n\t\t\t\r\n\t\t}\r\n\t\tcatch(InterruptedException e)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Main Thread Interupted\");\r\n\t\t}\r\n\t\tSystem.out.println(\"Main thread exiting\");\r\n\t\t\t\t\r\n\t}", "public static void main(String[] args) {\n Bahasa kata = new Bahasa(\"Thread 1\");\n English word = new English(\"Thread 2\");\n\n // calling getWord method to accept user input\n// kata.getWord();\n// word.getWord();\n\n //objects call start method from the Thread class\n// kata.start();\n// word.start();\n\n// kata.printword();\n// word.printword();\n\n }", "public static void main(String[] args) {\n\t\tRunnable r1 = new ThreadSingleton();\r\n\t\tRunnable r2 = new ThreadSingleton();\r\n\t\t\r\n\t\tnew Thread(r1).start();\r\n\t\tnew Thread(r2).start();\r\n\t}", "@Override\n public void run() {\n System.out.println(\"2\");\n try {\n Thread.sleep(2000);\n } catch (InterruptedException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }", "public static void main(String[] args) {\n\t\tRunnable r1=PlayMethodReference ::m1;\n\t\tThread t1=new Thread(r1);\n\t\tt1.start();\n\t\tfor(int i=0;i<10;i++) {\n\t\t\tSystem.out.println(\"these is child thread\");\n\t\t}\n\t}", "@Override\n public void run() {\n //start the threads\n t1.start();\n t2.start();\n\n LOGGER.log(Level.FINE, \"Starting Server...\");\n\n //wait for the threads to exit.\n try {\n t1.join();\n t2.join();\n } catch (InterruptedException ex) {\n }\n\n //halt (clean up resources).\n halt();\n }", "public static void main(String[] args) {\n Runnable run = new Runnable() {\n private int origin = 0;\n @Override\n public void run() {\n for (int i=0;i<2;i++) {\n int value = ++(origin);\n try {\n TimeUnit.SECONDS.sleep(2);\n }catch (InterruptedException e){\n e.printStackTrace();\n }\n System.out.print(Thread.currentThread().getId()+\":\"+value+\"\\n\");\n }\n }\n };\n for(int i=0;i<100;i++){\n new Thread(run).start();\n }\n }", "public static void main(String[] args) {\n\t\tRunnable r1 = new MyClassA();\n\t\tThread t1 = new Thread(r1);\n\t\t\n\t\tRunnable r2 = new MyClassB();\n\t\tThread t2 = new Thread(r2);\n\t\t\n\t\tt1.start();\n\t\tt2.start();\n\t\t\n\t\t MyClassX obj = new MyClassX();\n\t\tobj.start();\n\t}", "@Override\r\n\tpublic void run() {\n\r\n\t\tfor (int i = 0; i < 20; i++) {\r\n\t\t\ttry {\r\n\t\t\t\tsleep(1000);\r\n\t\t\t\tSystem.out.println(\"TTT\"+i);\r\n\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t}", "public void second(Runnable printSecond) throws InterruptedException {\n ss.acquire();\n printSecond.run();\n st.release();\n }", "public static void main(String[] args) throws InterruptedException {\n\t\tnew Thread() {\r\n\t\t\tpublic void run() {\r\n\t\t\t\tfor(int i = 0; i<10; i++) {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tThread.sleep(1000);\r\n\t\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tSystem.out.println(getName() + \" : aaaaa\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}.start();\r\n\t\t\r\n//\t\tnew thread\r\n\t\tnew Thread() {\r\n\t\t\tpublic void run() {\r\n\t\t\t\tfor(int i = 0; i<10; i++) {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tThread.sleep(1000);\r\n\t\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tSystem.out.println(getName() + \" : bbbbbbbb\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}.start();\r\n\r\n\t}", "public static void main(String[] args) {\n Employee emp=new Employee();\n emp.start();\n Student stu=new Student();\n Thread t1=new Thread(stu);\n t1.start();\n\t}", "public static void main(String[] args) {\n\t\tSystem.out.println(String.format(\"%s is running\", Thread.currentThread().getName()));\n\t\tThreadCreation2 threadCreation2 = new ThreadCreation2();\n\t\tThread thread = new Thread(threadCreation2, \"Thread2\");\n\t\tthread.start();\n\t}" ]
[ "0.7522121", "0.7314232", "0.69284576", "0.66876376", "0.6670946", "0.6657549", "0.6625392", "0.6610653", "0.65735507", "0.648825", "0.646298", "0.646024", "0.64527863", "0.64520943", "0.64518297", "0.6447622", "0.64401644", "0.6410612", "0.63487816", "0.6312904", "0.62956715", "0.62851155", "0.6281438", "0.6189541", "0.6175206", "0.61744314", "0.6162994", "0.61619437", "0.6143783", "0.6123921", "0.61008745", "0.6094921", "0.607516", "0.6069772", "0.60657144", "0.606571", "0.6056263", "0.6037835", "0.6037431", "0.60176533", "0.60157526", "0.5995596", "0.5995082", "0.59914637", "0.5969747", "0.59565926", "0.59522855", "0.5949481", "0.5929181", "0.5927223", "0.592496", "0.59195495", "0.5919466", "0.5918896", "0.5914524", "0.5913873", "0.59137595", "0.59047884", "0.58977807", "0.5887889", "0.58857745", "0.5878214", "0.5870109", "0.58655447", "0.5859692", "0.58537245", "0.5847903", "0.5845756", "0.58432776", "0.58418125", "0.584102", "0.5838727", "0.5826821", "0.58132267", "0.58044577", "0.5803404", "0.5796013", "0.5794653", "0.57889414", "0.57861114", "0.5760291", "0.5758603", "0.57579786", "0.5735891", "0.57313466", "0.5729903", "0.57143044", "0.57139546", "0.5698257", "0.5696877", "0.56912196", "0.5670578", "0.5667288", "0.56659126", "0.56632525", "0.566168", "0.56558305", "0.5652226", "0.56492984", "0.564753", "0.56429595" ]
0.0
-1
this function find the allocation place for argument or temporary
Unit findPlace() { if (!availableRegister.isEmpty()) { Unit result = availableRegister.firstElement(); availableRegister.remove(0); return result; } else { int memId = localPos; localPos++; return new UnitMemory(new String("local[" + String.valueOf(memId) + "]"), memId); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Arginfo visit(AllocationExpression n, Arginfo argu) {\n Arginfo _ret=null;\n argu.isreq=0;\n \n int a=prectr++;\n int b=prectr++;\n int c=prectr++;\n int d=prectr++;\n int e=prectr++;\n \n String classname=n.f1.f0.tokenImage;\n HashMap<String,Integer> methodnum=finaltable.symboltable.get(classname).varnum;\n int num1=finaltable.symboltable.get(classname).varnum.size();\n num1++;\n int num2=finaltable.symboltable.get(classname).methodnum.size();\n int size1=num1*4;\n int size2=num2*4;\n System.out.println(\"BEGIN\\n MOVE TEMP \"+b+\" HALLOCATE \"+size1);\n System.out.println(\"MOVE TEMP \"+c+\" HALLOCATE \"+size2);\n \n Iterator it=finaltable.symboltable.get(classname).methodnum.entrySet().iterator();\n\t while(it.hasNext()){\n\t\t Map.Entry pair = (Map.Entry)it.next();\n\t\t String a1=(String) pair.getKey();\n\t\t int b1=(Integer) pair.getValue();\n\t\t System.out.println(\"HSTORE TEMP \"+c+\" \"+b1+\" \"+a1);\n\t }\n\t System.out.println(\"HSTORE TEMP \"+b+\" 0\"+\" TEMP \"+c);\n\t \n\t int i;\n\t for(i=4;i<size1;i=i+4){\n\t System.out.println(\" HSTORE TEMP \"+b+\" \"+i+\" 0 \\n\");\n\t }\n\t System.out.println(\"RETURN TEMP \"+b+\" \\nEND\\n\");\n\t \n\t \n \n n.f0.accept(this, argu);\n n.f1.accept(this, argu);\n n.f2.accept(this, argu);\n n.f3.accept(this, argu);\n \n \n Arginfo temp1=new Arginfo();\n temp1.str=n.f1.f0.tokenImage;\n return temp1;\n }", "public abstract int allocLocal(String type);", "public String visit(AllocationExpression n, Object argu) \n\t{\n\t\tString _ret=null;\n\t n.f1.accept(this, argu);\n\t String identifier = n.f1.f0.tokenImage;\n\t _ret = symbolTable.get(identifier);\n\t return _ret;\n\t}", "public int getUnallocated(TypeReference type) {\n if (type == null) {\n throw new IllegalArgumentException(\"The argument type may not be null\");\n }\n\n if (seenTypes.containsKey(type)) {\n for (ManagedParameter p : seenTypes.get(type)) {\n if (p.status == ValueStatus.UNALLOCATED) {\n throw new IllegalStateException(\"There may be only one unallocated instance to a type (\" + type + \n \") at a time\" );\n }\n }\n }\n\n ManagedParameter param = new ManagedParameter();\n param.status = ValueStatus.UNALLOCATED;\n param.type = type;\n param.ssa = nextLocal++;\n param.setInScope = currentScope;\n\n if (seenTypes.containsKey(type)) {\n seenTypes.get(type).add(param);\n } else {\n List<ManagedParameter> aParam = new ArrayList<>();\n aParam.add(param);\n\n seenTypes.put(type, aParam);\n }\n\n \n return param.ssa;\n }", "public int allocate() {\n int setIndex = this.freeSet.nextSetBit(this.lastIndex);\n if (setIndex<0) { // means none found in trailing part\n setIndex = this.freeSet.nextSetBit(0);\n }\n if (setIndex<0) return -1;\n this.lastIndex = setIndex;\n this.freeSet.clear(setIndex);\n return setIndex + this.loRange;\n }", "public int getFree(TypeReference type) {\n if (type == null) {\n throw new IllegalArgumentException(\"The argument type may not be null\");\n }\n\n ManagedParameter param = new ManagedParameter();\n param.status = ValueStatus.FREE;\n param.type = type;\n param.ssa = nextLocal++;\n param.setInScope = currentScope;\n\n if (seenTypes.containsKey(type)) {\n seenTypes.get(type).add(param);\n } else {\n List<ManagedParameter> aParam = new ArrayList<>();\n aParam.add(param);\n\n seenTypes.put(type, aParam);\n }\n\n \n return param.ssa;\n }", "long memoryUnused();", "public Arginfo visit(ArrayAllocationExpression n, Arginfo argu) {\n Arginfo _ret=null;\n \n int a=prectr++;\n int b=prectr++;\n int c=prectr++;\n int d=prectr++;\n int e=prectr++;\n int l1=labelctr++;\n int l2=labelctr++;\n System.out.println(\"BEGIN\\nMOVE TEMP \"+d+\" \");\n \n n.f0.accept(this, argu);\n n.f1.accept(this, argu);\n n.f2.accept(this, argu);\n n.f3.accept(this, argu);\n n.f4.accept(this, argu);\n \n System.out.println(\"MOVE TEMP \"+b+\" PLUS TEMP \"+d+\" 1\");\n System.out.println(\"MOVE TEMP \"+a+\" TIMES TEMP \"+b+\" 4\");\n System.out.println(\"MOVE TEMP \"+c+\" HALLOCATE \"+a);\n System.out.println(\"HSTORE TEMP \"+c+\" 0 TEMP \"+d);\n \n System.out.println(\" MOVE TEMP \"+e+\" 4\\n\");\n System.out.println(\" L\"+l1+\" CJUMP LE TEMP \"+e+\" TEMP \"+a+\" L\"+l2);\n System.out.println(\"\\nHSTORE PLUS TEMP \"+c+\" TEMP \"+e+\" 0 0\");\n System.out.println(\"MOVE TEMP \"+e+\" PLUS TEMP \"+e+\" 4\");\n System.out.println(\"JUMP L\"+l1+\" \");\n System.out.println(\"L\"+l2+\" NOOP \\n\"); \n \n \n System.out.println(\"RETURN TEMP \"+c+\"\\nEND\\n\");\n \n return _ret;\n }", "protected final void _verifyAlloc(Object buffer)\n/* */ {\n/* 269 */ if (buffer != null) throw new IllegalStateException(\"Trying to call same allocXxx() method second time\");\n/* */ }", "long getMemory();", "long getMemory();", "public int getCurrent(TypeReference type) {\n if (type == null) {\n throw new IllegalArgumentException(\"The argument type may not be null\");\n }\n\n int candidateSSA = -1;\n int candidateScope = -1;\n\n if (seenTypes.containsKey(type)) {\n for (ManagedParameter param : seenTypes.get(type)) {\n if ((param.status == ValueStatus.FREE) ||\n (param.status == ValueStatus.ALLOCATED)) {\n assert (param.type.equals(type)) : \"Inequal types\";\n if (param.setInScope > currentScope) {\n \n continue;\n } else if (param.setInScope == currentScope) {\n \n return param.ssa;\n } else {\n if (param.setInScope > candidateScope) {\n candidateScope = param.setInScope;\n candidateSSA = param.ssa;\n }\n }\n } else {\n \n }\n }\n } else {\n throw new IllegalArgumentException(\"Type \" + type + \" has never been seen before!\");\n }\n\n if (candidateSSA < 0 ) {\n \n return candidateSSA;\n } else {\n throw new IllegalStateException(\"No suitable candidate has been found for \" + type.getName());\n }\n }", "default long getUnusedMemory() {\n return getMaxMemory() - getMemory();\n }", "public int getALocationToPlaceBlock(){\n int lruIndex=-1,lruVal=-1;\n for(int i=0;i<this.localCache.length;i++){\n if(!this.localCache[i].isOccupied)// checks if the block is occupied\n return i;\n \n if(lruVal<this.localCache[i].lastUsed){// checks the last used of each block\n lruIndex=i;\n lruVal=this.localCache[i].lastUsed;\n }\n }\n \n return lruIndex;\n }", "public int findMemory( int size )\n {\n // represents the smallest available freeBlock within out freeBlock list\n // that will accommodate the size of the entry.\n int smallestFreeBlock = poolSize + 1;\n int position = -1;\n freeBlockList.moveToStart();\n freeBlockList.next();\n while ( !freeBlockList.isAtEnd() )\n {\n Object[] keyArray =\n freeBlockList.getCurrentElement().keySet().toArray();\n Integer key = (Integer)keyArray[0];\n\n if ( ( freeBlockList.getCurrentElement().get( key ) < smallestFreeBlock )\n && ( freeBlockList.getCurrentElement().get( key ) >= size ) )\n {\n position = key;\n smallestFreeBlock = freeBlockList.getCurrentElement().get( key );\n }\n freeBlockList.next();\n }\n\n return position;\n\n }", "AllocAlternative createAllocAlternative();", "public Block allocateAt(long p) {\n for (Block b : freeSpace) {\n if (b.start == p)\n return checkout(b, b.length);\n }\n return null;\n }", "private void savePartialAllocation(MappingVec allocation, VirtualMachineVec leftover_vms) {\n assert(allocation != null);\n assert(leftover_vms != null);\n this.partial_allocation = allocation;\n this.leftover_vms = leftover_vms;\n }", "protected abstract int getBucketIndex(int freeSpace);", "public long memoryAddress()\r\n/* 143: */ {\r\n/* 144:172 */ throw new UnsupportedOperationException();\r\n/* 145: */ }", "public String visit(AllocationExpression n, LLVMRedux argu) throws Exception {\n\n String ID = n.f1.accept(this, argu), reg1 = u.getReg(ID), reg2;\n LLVMClass Class = argu.findClass(ID);\n u.println(reg1+\" = call i8* @calloc(i32 1, i32 \"+Class.getSize()+\")\");\n reg2 = u.getReg();\n u.println(reg2+\" = bitcast i8* \"+reg1+\" to i8***\");\n u.println(u.getReg()+ \" = getelementptr \"+Class.getLLVMVtableFormat()+\", \"+Class.getLLVMVtableFormat()+\"* @.\"+Class.ID+\"_vtable, i32 0, i32 0\");\n u.println(\"store i8** \"+u.getLastReg()+\", i8*** \"+reg2);\n\n return reg1;\n }", "@Override\n public String visit(HAllocate n) {\n String _ret = null;\n /*\n * li $a0, 16\n * jal _halloc\n */\n this.moveReg = \"a0\";\n n.f1.accept(this);\n Global.outputString += \"jal _halloc\\n\";\n return _ret;\n }", "private int checkMemLocation(int location) {\n if (location < memory.length && location >= 0) {\n return location;\n }\n throw new MemoryOutOfBounds(memory.length, location);\n }", "public int maxLocals();", "long memoryUsed();", "long getOccupiedSize();", "public VariType visit(AllocationExpression n, Table argu) {\n\t VariType _ret = new VariType();\n\t n.f0.accept(this, argu);\n\t VariType t1 = n.f1.accept(this, argu);\n\t if(((MethodTable)argu).toptable.getclasstable(n.f1.f0.tokenImage) == null) {\n\t \t PrintError.errorexist = true;\n\t \t String emsg = \"undefined class \\\"\"+n.f1.f0.tokenImage+\"\\\"\";\n\t \t PrintError.print(emsg, n.f2.beginLine, n.f2.beginColumn, 1);\n\t \t _ret.type = \"Undefined\";\n\t \t return _ret;\n\t }\n\t n.f2.accept(this, argu);\n\t n.f3.accept(this, argu);\n\t _ret.type = \"Object\";\n\t _ret.name = n.f1.f0.tokenImage;\n\t return _ret;\n\t }", "BigInteger getLeftoverMemory() {\n return pm.getMemory().subtract(used_mem);\n }", "public String visit(AllocationExpression n, String s) {\n n.f1.accept(this, null);\n return null;\n }", "private Buffer findExistingBuffer(Block blk) {\n //=====================================CS4432-Project1=====================\n //lookup the block from the list of all buffers, and if we can find a frame number\n //we should return that buffer\n if (buffers.get(blk) != null){\n //get the frame number\n int frame = buffers.get(blk);\n\n //since we were looking up the buffer, we need to reorder our LRU array if\n //the block searched for is unpinned\n if (!bufferpool[frame].isPinned()){\n if (replacementPolicy.equalsIgnoreCase(\"LRU\")) {\n int location = leastRecentlyUsedArray.indexOf(frame);\n if (location != -1){\n //remove and re-add at the end of the array\n leastRecentlyUsedArray.remove(location);\n leastRecentlyUsedArray.add(frame);\n }\n }\n }\n\n //return the existing buffer\n return bufferpool[frame];\n }\n //we could not find the frame number (ie. it does not exist) so return null\n return null;\n }", "@Override\r\n public int getSecondArg() {\n return localsNum;\r\n }", "private int analyzeConstPool()\n {\n cp_index = new int[constant_pool_count];\n cp_index[0] = -1;\n\n int index = 1;\n int offset = 10;\n while (index < constant_pool_count)\n {\n cp_index[index] = offset;\n ++index;\n\n EConstPoolItem item = EConstPoolItem.getByTag(bytes[offset]);\n if (item == EConstPoolItem.UTF8_INFO)\n {\n int length = ByteTool.uBigEnd(bytes[offset + 1], bytes[offset + 2]);\n offset += length + 3;\n }\n else\n {\n offset += item.count;\n }\n\n // 这规定mdzz\n if (item == EConstPoolItem.DOUBLE_INFO || item == EConstPoolItem.LONG_INFO)\n {\n ++index;\n }\n }\n\n return offset;\n }", "public Point getLocationUsed() {\n return (Point)this.locationUsed.clone();\n }", "public String visit(HAllocate n, Object argu)\r\n\t {//因为涉及到mips调用函数halloc,这个函数不是从kanga翻译出来的,这里用a0传参数,但要先用t9保存a0,调用完成之后用t9恢复a0\r\n\t\t String Num = n.f1.accept(this,argu);\r\n\t\t MipsOutPut.add(MipsOutPut.Space+\"move $t9 $a0 \\n\");\r\n switch(n.f1.f0.which)\r\n\t\t {\r\n\t\t case 0:MipsOutPut.add(MipsOutPut.Space+\"move $a0 \" + Num +\"\\n\");break;\r\n\t\t case 1:MipsOutPut.add(MipsOutPut.Space+\"li $a0 \" + Num +\"\\n\");break;\r\n\t\t case 2:MipsOutPut.add(MipsOutPut.Space+\"la $a0 \" + Num +\"\\n\");break;\r\n\t\t default:break;\r\n\t\t }\r\n\t\t return null;\r\n\t }", "int memSize() {\n // treat Code as free\n return BASE_NODE_SIZE + 3 * 4;\n }", "public String visit(SpilledArg n, Object argu)\r\n\t {\r\n\t\t return null;\r\n\t }", "@VTID(15)\r\n excel.XlAllocationValue getAllocationValue();", "private E findHelper(Node<E> node, E target,int planes) {\r\n if (node != null && node.data.equals(target)) {\r\n return node.data;\r\n }\r\n else if (node != null && node.data.getItem(planes).compareTo(target.getItem(planes)) > 0) {\r\n return findHelper(node.left,target,(planes+1)%node.data.getNumberOfArgs());\r\n }\r\n\r\n else if (node != null && node.data.getItem(planes).compareTo(target.getItem(planes)) <= 0) {\r\n return findHelper(node.right,target,(planes+1)%node.data.getNumberOfArgs());\r\n }\r\n\r\n else return null;\r\n }", "public R visit(HAllocate n) {\n R _ret=null;\n n.f0.accept(this);\n simple_exp=0;\n String s1 = (String)n.f1.accept(this);\n String s=(\"HALLOCATE \" + s1);\n return (R)s;\n }", "static int size_of_mov(String passed){\n\t\treturn 1;\n\t}", "protected abstract long getCurrentBufferCapacity(long paramLong);", "void alloc() {\n\t\tother = new int[symbol.length + 2];\n\t}", "public String visit(IntegerArrayAllocationExpression n, LLVMRedux argu) throws Exception {\n String tempReg;\n String[] array = u.getNSZTags();\n String exprReg = u.getArg(n.f3.accept(this, argu));\n String alocSize = u.getReg();\n u.allocationSegment(alocSize,exprReg,array,1);\n tempReg=u.getReg();\n u.println(tempReg+\" = call i8* @calloc(i32 \"+alocSize+\", i32 4)\");\n u.println(u.getReg(\"int[]\")+\" = bitcast i8* \"+tempReg+\" to i32*\");\n u.println(\"store i32 \"+exprReg+\", i32* \"+u.getLastReg());\n\n\n return u.getLastReg();\n }", "public abstract Integer gethourNeed();", "default boolean hasEnoughMemory(long memory){\n return getUnusedMemory() >= memory;\n }", "static int size_of_rp(String passed){\n\t\treturn 1;\n\t}", "public void cacheResult(suiluppo_equip_allocation suiluppo_equip_allocation);", "private oa a(int paramInt)\r\n/* 185: */ {\r\n/* 186:195 */ if (c[paramInt] == null) {\r\n/* 187:196 */ c[paramInt] = new oa(String.format(\"textures/font/unicode_page_%02x.png\", new Object[] { Integer.valueOf(paramInt) }));\r\n/* 188: */ }\r\n/* 189:199 */ return c[paramInt];\r\n/* 190: */ }", "abstract public int findTargetToReplace(MemRef r);", "abstract int getMaxMemoryUsage();", "public LocalVariableGen addLocalVariable(String name, Type type, InstructionHandle start, InstructionHandle end) {\n/* 170 */ return this._allocatorInit ? addLocalVariable2(name, type, start) : super.addLocalVariable(name, type, start, end);\n/* */ }", "Integer getCurrentHhint();", "static int size_of_xra(String passed){\n\t\treturn 1;\n\t}", "static int size_of_jmp(String passed){\n\t\treturn 3;\n\t}", "public void a(int paramInt, ItemStack paramamj)\r\n/* 61: */ {\r\n/* 62: 76 */ this.a[paramInt] = paramamj;\r\n/* 63: 77 */ if ((paramamj != null) && (paramamj.stackSize > p_())) {\r\n/* 64: 78 */ paramamj.stackSize = p_();\r\n/* 65: */ }\r\n/* 66: */ }", "private static int calcStackSize(Code32 code) {\r\n\t\tint size = 8 + nofNonVolGPR * 4 + nofNonVolEXTRD * 8 + nofNonVolEXTRS * 4;\t// includes LR and SP for back trace\r\n\t\tsize += callParamSlotsOnStack * 4 + RegAllocator.maxLocVarStackSlots * 4 + (intfMethStorage? 12: 0);\t\r\n\t\tassert(nofNonVolEXTRD < 16);\r\n\t\tif (nofNonVolEXTRD >= 16) ErrorReporter.reporter.error(1000);\r\n\t\t// enFloatsInExc could be true, even if this is no exception method\r\n\t\t// such a case arises when this method is called from within an exception method\r\n\t\tif (enFloatsInExc) size += nonVolStartEXTR * 8 + 4;\t// save volatile FPR's and FPSCR\r\n\t\tparamOffset = 4;\r\n\t\tcode.localVarOffset = paramOffset + callParamSlotsOnStack * 4;\r\n\t\tintfMethStorageOffset = paramOffset + callParamSlotsOnStack * 4 + RegAllocator.maxLocVarStackSlots * 4;\r\n\t\treturn size;\r\n\t}", "public Addr getLocationOnStack() {\n\n\t\tImm immediateStackPointerOffset = new Imm(String.valueOf(this.spOffset));\n\t\tAddr spilledValueLocationOnStack = new Addr(immediateStackPointerOffset, this.sp);\n\t\treturn spilledValueLocationOnStack;\n\t}", "int getLocalOnHeapSize();", "public int locationOf(E elem) {\r\n\t\tInteger tentativeLoc = this.locations.get(elem);\r\n\t\tif (tentativeLoc == null){\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\treturn this.locations.get(elem);\r\n\t}", "long getMaxMemory();", "public void visit(AllocationExpression n) {\n n.f0.accept(this);\n }", "Exp getPointerExp();", "public abstract int getMinimumArguments();", "long getMemLimit();", "public @Override Shape getChildAllocation(int index, Shape a) {\n if (a == null) {\n return null;\n }\n\n Rectangle alloc = reallocate(a); // returned rect can be modified\n int thisViewAllocX = alloc.x;\n int thisViewAllocY = alloc.y;\n\n getChildren().getChildCoreAllocation(index, alloc); // alloc overwritten\n alloc.x += thisViewAllocX;\n alloc.y += thisViewAllocY;\n \n // Add insets if necessary\n ViewInsets insets = getInsets();\n if (insets != null) {\n alloc.x += insets.getLeft();\n alloc.y += insets.getRight();\n }\n\n return alloc;\n }", "public long memory() {\n\treturn 0;\n }", "public abstract long estimateMemorySize();", "public abstract int capacity();", "static int size_of_cpi(String passed){\n\t\treturn 2;\n\t}", "public boolean needsAllocation(TypeReference type) {\n if (type == null) {\n throw new IllegalArgumentException(\"The argument type may not be null\");\n }\n\n if (seenTypes.containsKey(type)) {\n if (seenTypes.get(type).size() > 1) { // TODO INCORRECT may all be UNALLOCATED\n return false;\n } else {\n return (seenTypes.get(type).get(0).status == ValueStatus.UNALLOCATED);\n }\n } else {\n return true;\n }\n }", "public String visit(PassArgStmt n, Object argu)\r\n\t {\r\n\t\t int stackPos = 4*( Integer.parseInt(n.f1.f0.tokenImage)-1);\r\n\t\t int RegNum = n.f2.f0.which;\r\n\t\t MipsOutPut.add(MipsOutPut.Space+\"sw \"+ Regs.RegList[RegNum] + \", \" + stackPos+ \"( $sp ) \\n\" );\r\n\t return null;\r\n\t }", "public Item a(Block parambec, Random paramRandom, int paramInt)\r\n/* 76: */ {\r\n/* 77: 99 */ return null;\r\n/* 78: */ }", "StackManipulation cached();", "protected int resolveLevel(AllocationExpression allocation) {\n char[][] typeName = allocation.type.getTypeName();\n if (this.pattern.declaringSimpleName != null && !matchesName(this.pattern.declaringSimpleName, typeName[typeName.length - 1]))\n return IMPOSSIBLE_MATCH;\n return resolveLevel(allocation.binding);\n }", "private int freeReg(SSAStatement s) {\n return freeRegisters[s.getRegister()];\n }", "private Access getAvailableReg(Var3 variable) {\n Integer index = getVarIndex(variable);\n HashSet<Integer> description = addrDescriptor.get(index);\n if(!description.isEmpty()) {\n //take the first good register\n for(Integer i : description)\n return new Reg(getArmRegNum(i));\n }\n return null;\n }", "static int size_of_call(String passed){\n\t\treturn 3;\n\t}", "abstract protected int getCapacity();", "static int size_of_rpo(String passed){\n\t\treturn 1;\n\t}", "int getUsedPoints();", "int getUsedPoints();", "int getUsedPoints();", "int getCurrentSize();", "private Register allocateANewRegister() {\n\t\tRegister retReg = freeRegisterPool.first();\n\t\tfreeRegisterPool.remove(retReg);\n\t\treturn retReg;\n\t}", "private void findDeadParameters(MethodContext mctx)\n\t{\n\t\tmctx.getInstructionContexts().forEach(this::findDeadParameters);\n\t}", "public double getAllocatedValue()\r\n\t{\r\n\t\tint numberOfAllocatedRecords = 0;\r\n\t\tfor(int i = 0; i < _actuallyAllocatedTuples.size(); ++i)\r\n\t\t\tnumberOfAllocatedRecords += _actuallyAllocatedTuples.get(i);\r\n\t\t\r\n\t\treturn numberOfAllocatedRecords * this.getValue();\r\n\t}", "public BigDecimal getLiterAllocation();", "@Override\n public String visit(PassArgStmt n) {\n // 直接将参数保存到下一个栈帧\n // PASSARG 起始1\n int offset = Integer.parseInt(n.f1.f0.tokenImage);\n String r1 = this.reg[n.f2.f0.which];\n Global.outputString += \"sw $\" + r1 + \", -\" + ((offset + 2) * 4)\n + \"($sp)\\n\";\n return null;\n }", "static int size_of_sta(String passed){\n\t\treturn 3;\n\t}", "public int getTimeAllocated(){\n\t\treturn timeAllocated;\n\t}", "Integer getReuse();", "int capacity();", "int capacity();", "public abstract IContext getUnresolvedContext(IContext totalContext);", "public abstract int getSpotsNeeded();", "static int size_of_rm(String passed){\n\t\treturn 1;\n\t}", "public R visit(Temp n) {\n R _ret=null;\n n.f0.accept(this);\n n.f1.accept(this);\n Integer temp = Integer.parseInt(((String)n.f1.f0.tokenImage));\n //new\n \n if(inCall){\n \t magicNumber++;\n \t ArrayList<Integer> newHold = use.get(statementNumber);\n \t newHold.add(temp);\n \t use.put(statementNumber, newHold);\n }\n \n //new\n \n \n if(temp >= arguments){\n\t if(inCall){\n\t \t ArrayList<Integer> hold = live.get(temp);\n\t \t hold.add(statementNumber);\n\t \t live.put(temp, hold);\n\t }\n }\n _ret = (R)temp;\n return _ret;\n }", "public ItemStack b(int paramInt)\r\n/* 50: */ {\r\n/* 51: 66 */ if (this.a[paramInt] != null)\r\n/* 52: */ {\r\n/* 53: 67 */ ItemStack localamj = this.a[paramInt];\r\n/* 54: 68 */ this.a[paramInt] = null;\r\n/* 55: 69 */ return localamj;\r\n/* 56: */ }\r\n/* 57: 71 */ return null;\r\n/* 58: */ }", "public int memUsage(){\n\t\tint usage = 36;\n\t\tusage += 12 * point.length;\n\t\tusage += 4 * glComannd.length;\n\t\tusage += 12 * glVertex.length;\n\t\tusage += 24 * state.length;\n\t\treturn usage;\n\t}", "private short allocObject() {\n\t\tshort result;\n\t\tint i;\n\t\tfor (i = 0; i < objects.size()\n\t\t\t\t&& ((Boolean) objects.get(i)).booleanValue(); i++)\n\t\t\t;\n\t\tif (i == objects.size()) {\n\t\t\tresult = (short) i;\n\t\t\tobjects.add(Boolean.TRUE);\n\t\t} else {\n\t\t\tresult = (short) i;\n\t\t\tobjects.set(i, Boolean.TRUE);\n\t\t}\n\t\treturn result;\n\t}" ]
[ "0.61748487", "0.582936", "0.5749213", "0.54797876", "0.5446843", "0.54367995", "0.5387506", "0.532964", "0.5275198", "0.5251976", "0.5251976", "0.5239962", "0.5223905", "0.52212477", "0.51540184", "0.51404405", "0.5042118", "0.4991924", "0.4945289", "0.4931171", "0.4912354", "0.48956454", "0.4872393", "0.48574153", "0.48539466", "0.48517388", "0.48322886", "0.48239598", "0.48194194", "0.48080325", "0.48058194", "0.4798504", "0.4784715", "0.47586188", "0.47478265", "0.47473603", "0.47464627", "0.4741274", "0.47408617", "0.47378075", "0.47361878", "0.4722094", "0.4719736", "0.4714765", "0.47030497", "0.47030362", "0.46934617", "0.46883094", "0.46756917", "0.46756032", "0.46721298", "0.46672818", "0.46554974", "0.46519375", "0.46514556", "0.46458977", "0.46417487", "0.46400443", "0.46390262", "0.4638338", "0.4637322", "0.46273416", "0.4622384", "0.4620874", "0.4616431", "0.4610413", "0.4608237", "0.46068317", "0.4595214", "0.45930022", "0.4591689", "0.4587447", "0.4584918", "0.45806506", "0.4578653", "0.45771396", "0.45735705", "0.4573313", "0.4563682", "0.4562675", "0.4562675", "0.4562675", "0.4560309", "0.45598269", "0.45460063", "0.4544212", "0.45405328", "0.4540049", "0.45373994", "0.4536611", "0.45290193", "0.45253715", "0.45253715", "0.45231333", "0.45226374", "0.45225176", "0.4521303", "0.4518393", "0.45143133", "0.45105413" ]
0.56577927
3
if the temporary is existed
public boolean temporaryExist(String temporary) { return temporaryTable.containsKey(temporary); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic boolean isExist() {\n\t\treturn false;\r\n\t}", "@Override\r\n\tpublic boolean isExisting() {\n\t\treturn false;\r\n\t}", "boolean isComponentTempRecordExist(Record inputRecord);", "@SuppressWarnings(\"unchecked\")\n public boolean stillExists(Object obj) {\n \treturn true;\n }", "private boolean putTemporaryVar(String name){\n if(get(name) != null) return false;\n if(temporaryVariables.size() == 0) return false;\n\n boolean b;\n\n for (int i = 0; i < Integer.MAX_VALUE - 1; i++) {\n Map<String, Integer> tmp;\n b = !currentVariables.containsValue(i);\n if(b == false) continue;\n for (Map<String, Integer> x : temporaryVariables) {\n b &= !x.containsValue(i);\n if(b == false) break;\n }\n if(b == true){\n tmp = temporaryVariables.get(temporaryVariables.size() - 1);\n tmp.put(name, i);\n return true;\n }\n }\n return false;\n }", "boolean getTemporaryInMemory();", "boolean getIfNotExist();", "boolean getIfNotExist();", "private boolean putTemporaryConst(String name, String value){\n if(get(name) != null) return false;\n if(temporaryConstants.size() == 0) return false;\n\n Map<String, String> tmp = temporaryConstants.get(temporaryConstants.size() - 1);\n \n return tmp.putIfAbsent(name, value) == null;\n }", "public boolean enterTemporaryScope(){\n if(temporaryConstants == null || temporaryVariables == null){\n temporaryConstants = new ArrayList<>();\n temporaryVariables = new ArrayList<>();\n }\n temporaryConstants.add(new HashMap<>());\n temporaryVariables.add(new HashMap<>());\n return true;\n }", "@Override\n\tpublic boolean isTemp() {\n\t\treturn heldObj.isTemp();\n\t}", "@Override\n\tpublic boolean erTom() {\n\t\treturn (bak == null);\n\t}", "@Override\n public boolean exists()\n {\n return orig.exists();\n }", "@Override\n\tpublic void exist() {\n\t\t\n\t}", "public boolean exist() {\n\t\treturn false;\n\t}", "public boolean isTmpLock() {\n \t\treturn tmpLock;\n \t}", "public void tempcheck(){\r\n \t//clear last data\r\n if(workplace!=null){\r\n \tFile temp = new File(workplace +\"/temp\");\r\n \tif(temp.exists()){\r\n \t\tFile[] dels = temp.listFiles();\r\n \t\tif(dels[0]!=null){\r\n \t\t\tfor(int i=0; i<dels.length; i++){\r\n \t\t\t\tif(dels[i].isFile()){\r\n \t\t\t\t\tdels[i].delete();\r\n \t\t\t\t}else{\r\n \t\t\t\t\tFile[] delss = dels[i].listFiles();\r\n \t\t\t\t\tif(delss[0]!=null){\r\n \t\t\t\t\t\tfor(int k=0; k<delss.length; k++){\r\n \t\t\t\t\t\t\tdelss[k].delete();\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t}\r\n \t\t\t\t\tdels[i].delete();\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t}\r\n \ttemp.delete();\r\n }\r\n }", "@Override\n public boolean getIfNotExist() {\n return ifNotExist_;\n }", "@Override\n public boolean getIfNotExist() {\n return ifNotExist_;\n }", "@Override\r\n\tpublic boolean exists() {\n\t\treturn false;\r\n\t}", "@Override\n public boolean getIfNotExist() {\n return ifNotExist_;\n }", "@Override\n public boolean getIfNotExist() {\n return ifNotExist_;\n }", "public boolean isIsExist() {\n return isExist;\n }", "@Override\n public boolean isExist(Object o) {\n return true;\n }", "private static boolean hasTempPermission() {\n\n if (System.getSecurityManager() == null) {\n return true;\n }\n File f = null;\n boolean hasPerm = false;\n try {\n f = File.createTempFile(\"+~JT\", \".tmp\", null);\n f.delete();\n f = null;\n hasPerm = true;\n } catch (Throwable t) {\n /* inc. any kind of SecurityException */\n }\n return hasPerm;\n }", "public abstract boolean doesExist();", "@Override\n\tpublic boolean exists() {\n\t\treturn false;\n\t}", "boolean getExists();", "public boolean ifDuplicated(String other, String[] temporary) {\n\t\tfor (String s : temporary) {\n\t\t\tif (s != null && s.equals(other)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "private boolean isConsideredFresh() {\n \t\treturn this.isNew || this.area.getPolygon() == null;\n \t}", "private boolean onlyInstance(){\n File dir1 = new File (\".\");\n String location=\"\";\n\n try{\n location = dir1.getCanonicalPath();\n } catch (IOException e) {\n }\n File temp = new File(location+\"\\\\holder.tmp\");\n\n if (!temp.exists())\n return true;\n else\n {\n int result = JOptionPane.showConfirmDialog(null,\n \"Instance of TEWIN already running (or at least I think it is)!\\n\" +\n \"Click YES to load anyway, or NO to exit\",\"I think I'm already running\",\n JOptionPane.YES_NO_OPTION);\n if(result == JOptionPane.YES_OPTION)\n {\n temp.delete();\n return true;\n }else\n return false;\n }\n \n }", "@Override\n\tprotected boolean itemExists() {\n\t\treturn false;\n\t}", "boolean _non_existent();", "boolean hasExists();", "private boolean noVacancy() {\r\n\t\t\treturn removed = false;\r\n\t\t}", "public boolean getExists();", "public boolean isExisting() throws Exception\r\n\t\t{\r\n\t\tRouteGroup myR = (RouteGroup) myRouteGroup.get();\r\n\t\tthis.UUID = myR.getUUID();\r\n\t\t\r\n\t\tVariables.getLogger().debug(\"Item \"+this.name+\" already exist in the CUCM\");\r\n\t\treturn true;\r\n\t\t}", "@Override\n\tpublic boolean isExist(String name) {\n\t\treturn false;\n\t}", "protected boolean arff_exists() {\n\t\tFile tmpDir = new File(arff_path + \"\\\\\" + taskdata_name + \".arff\");\n\t\treturn tmpDir.exists();\n\t}", "private static boolean create() {\n if (removed) return false;\n else if (tag != null) return true;\n else {\n tag = DOM.getElementById(STATUS_TAG_NAME);\n if (tag != null) {\n return true;\n } else {\n removed = true;\n return false;\n }\n } \n }", "private void foundNonExistent() {\n\t\tstate = BridgeState.NON_EXISTENT;\n\t}", "public void checkIfXslCreated() {\n final File extStore = Environment.getExternalStorageDirectory();\n File myFile = new File(extStore.getAbsolutePath() + \"/backup/\" + fileName);\n\n if (myFile.exists()) {\n Log.d(\"YES\", \"YES\");\n } else {\n Log.d(\"NO\", \"NO\");\n }\n }", "protected boolean getUsed(){\n\t\treturn alreadyUsed;\n\t}", "boolean isUsed();", "boolean isUsed();", "void checkInventoryExists() {\n\n MrnInventory[] checkInventory =\n new MrnInventory(survey.getSurveyId()).get();\n inventoryExists = false;\n if (checkInventory.length > 0) {\n inventoryExists = true;\n } // if (checkInventory.length > 0)\n\n\n }", "public boolean setTempFile() {\n try {\n tempFile = File.createTempFile(CleanupThread.DOWNLOAD_FILE_PREFIX_PR, FileExt);\n Log.getInstance().write(Log.LOGLEVEL_TRACE, \"RecordingEpisode.setTempFile: \" + tempFile.getAbsolutePath());\n } catch (IOException e) {\n Log.getInstance().write(Log.LOGLEVEL_ERROR, \"RecordingEpisode.setTempFile: Exception creating tempfile. \" + e.getMessage());\n return false;\n }\n\n if (tempFile==null || !(tempFile instanceof File)) {\n Log.getInstance().write(Log.LOGLEVEL_ERROR, \"RecordingEpisode.setTempFile: Failed to create valid tempFile.\");\n return false;\n }\n\n return true;\n }", "public abstract boolean exists();", "@Override\n\tpublic boolean isFresh() {\n\t\treturn false;\n\t\t//return fresh;\n\t}", "@Override\n\tprotected boolean isExist(AbnormalDevice record) {\n\t\treturn false;\n\t}", "private static boolean assetHasLocalReference(MD5Key id) {\n \n \t\treturn getLocalReference(id) != null;\n \t}", "private boolean isIndexExist(int index) {\n return index >= 0 && index < size();\n }", "public boolean hasResult()\n/* */ {\n/* 119 */ return this.result != RESULT_NONE;\n/* */ }", "public boolean existCache() {\n return false;\n }", "@Override\n\tpublic int IfNameExist(String temp1) {\n\t\treturn SettingMapper.IfNameExist(temp1);\n\t}", "@Transactional(propagation = Propagation.REQUIRED, readOnly = true)\n\tpublic ServiceResult exists(final Object obj){\n\t\tServiceResult result = new ServiceResult();\n\t\tObject temp;\n\t\ttry{\n\t\t\ttemp = dao.isExisted(obj);\n\t\t\tif (temp != null){\n\t\t\t\tresult.setResult(true);\n\t\t\t\tresult.setReturnObject(temp);\n\t\t\t} else {\n\t\t\t\tresult.setResult(false);\n\t\t\t}\n\t\t} catch (Exception e){\n\t\t\tresult.setResult(false);\n\t\t\tresult.setMessage(\"Error:\"+e);\n\t\t\tlog.error(\"Error checking if object is unique: \", e);\n\t\t}\n\t\treturn result;\n\t}", "private boolean checkiforiginal(int copynum) {\n boolean isAvailable = false;\n if (copynum == 0) {\n isAvailable = true;\n }\n return isAvailable;\n }", "@java.lang.Override\n public boolean getExists() {\n return exists_;\n }", "public boolean _non_existent() {\n return false;\n }", "public boolean dropTemporaryTableAfterUse() {\n \t\treturn true;\n \t}", "public boolean supportsTemporaryTables() {\n \t\treturn false;\n \t}", "private boolean acceptAsExpected()\n {\n return saveExpectedDir_ != null;\n }", "private boolean checkPreviousRefs(String ref) {\n\t\t// Prevent stack overflow, when an unlock happens from inside here:\n\t\tList<String> checked = (List<String>) threadLocalManager.get(TwoFactorAuthenticationImpl.class.getName());\n\t\tif (checked == null) {\n\t\t\tchecked = new ArrayList<String>();\n\t\t\tthreadLocalManager.set(TwoFactorAuthenticationImpl.class.getName(), checked);\n\t\t}\n\t\tif (checked.contains(ref)) {\n\t\t\treturn false; // This allows the required entity to load.\n\t\t}\n\t\ttry {\n\t\t\tchecked.add(ref);\n\t\t\treturn findSiteId(ref);\n\t\t} finally {\n\t\t\tif(!checked.isEmpty()) {\n\t\t\t\tchecked.remove(checked.size()-1);\n\t\t\t}\n\t\t}\n\t}", "@java.lang.Override\n public boolean getExists() {\n return exists_;\n }", "protected boolean resourceExists() {\n\t\tIWorkspace workspace = ResourcesPlugin.getWorkspace();\n\t\tif (workspace == null)\n\t\t\treturn false;\n\t\treturn RodinDB.getTarget(workspace.getRoot(), this.getPath()\n\t\t\t\t.makeRelative(), true) != null;\n\t}", "public boolean a() {\r\n try {\r\n this.b = new File(this.c);\r\n if (this.b.exists() && !this.b.delete()) {\r\n this.a = false;\r\n return false;\r\n } else if (this.b.createNewFile()) {\r\n return true;\r\n } else {\r\n this.a = false;\r\n return false;\r\n }\r\n } catch (Throwable th) {\r\n x.a(th);\r\n this.a = false;\r\n return false;\r\n }\r\n }", "public static boolean emptyTempTables() {\n ArrayList temp_tables = new ArrayList();\n // Since the mrblock depends on mrfile it actually\n // could be skipped but this way the program will also\n // check if the tables exist and give an error back if any doesn't.\n temp_tables.add( \"mrfile\" );\n temp_tables.add( \"mrblock\" );\n boolean status = sql_epiII.emptyTables( temp_tables, false );\n return status;\n }", "public boolean exists()\n\t{\n\n\t\treturn true;\n\t}", "public boolean willNotBeResurrected() {\n return state == State.FRESH || state == State.ERROR;\n }", "public boolean isSuccessful() {\r\n return isTargetTemplateSetPresent() && missing.isEmpty();\r\n }", "boolean isUsedForWriting();", "public void checkForTempUsername() {\r\n\t\t// get my profile, and check for a default username\r\n\t\tUserProfile userProfile = authenticationController.getCurrentUserProfile();\r\n\t\tif (userProfile != null && DisplayUtils.isTemporaryUsername(userProfile.getUserName())) {\r\n\t\t\tgotoChangeUsernamePlace();\r\n\t\t} else {\r\n\t\t\tgoToLastPlace();\r\n\t\t}\r\n\t}", "public abstract boolean exists() throws AccessException;", "boolean hasInsertOrUpdate();", "public boolean hasFailed() {\n return creationFailure;\n }", "public boolean isExist(Serializable id);", "@Override\n public boolean callCheck() {\n return last == null;\n }", "public boolean checkTaskExist(CaptureTask task) {\n\t\treturn false;\r\n\t}", "public boolean canBeUsed(){\n\t\treturn !(this.isUsed);\n\t}", "private void checkAndSetTempOrgEntitySet(OrganizationalEntity orgObj) {\n String id = orgObj.getId();\n if(tempOrgEntitySet.contains(id))\n return;\n synchronized(tempOrgEntitySet){\n if(!tempOrgEntitySet.contains(id)){\n TaskServiceSession taskSession = null;\n try {\n taskSession = taskService.createSession();\n if(orgObj instanceof User)\n taskSession.addUser((User)orgObj);\n else\n taskSession.addGroup((Group)orgObj);\n }catch (Exception e) {\n throw new RuntimeException(e);\n }finally {\n if(taskSession != null)\n taskSession.dispose();\n }\n log.info(\"addTask() adding following userId to tempOrgEntitySet to avoid possible duplicate entry complaints: \"+id);\n try{Thread.sleep(1000);}catch(Exception x){x.printStackTrace();}\n tempOrgEntitySet.add(id);\n }\n }\n }", "public Boolean isExist() {\n\t\tif(pfDir.exists())\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "public boolean existeCache() {\n\t\tFile file = new File(Environment.getExternalStorageDirectory() + \"/\" + pasta + \"/\", \"ccentral.html\");\n\t\tFile file2 = new File(Environment.getExternalStorageDirectory() + \"/\" + pasta + \"/\", \"cfisica.html\");\n\t\tFile file3 = new File(Environment.getExternalStorageDirectory() + \"/\" + pasta + \"/\", \"ccocesp.html\");\n\t\tFile file4 = new File(Environment.getExternalStorageDirectory() + \"/\" + pasta + \"/\", \"cquimica.html\");\n\t\tFile file5 = new File(Environment.getExternalStorageDirectory() + \"/\" + pasta + \"/\", \"cprofessores.html\");\n\t\tFile file6 = new File(Environment.getExternalStorageDirectory() + \"/\" + pasta + \"/\", \"cenfermagem.html\");\n\t\tFile file7 = new File(Environment.getExternalStorageDirectory() + \"/\" + pasta + \"/\", \"csaude.html\");\n\t\tFile file8 = new File(Environment.getExternalStorageDirectory() + \"/\" + pasta + \"/\", \"cdireito.html\");\n\t\tboolean f1 = file.exists();\n\t\tboolean f2 = file2.exists();\n\t\tboolean f3 = file3.exists();\n\t\tboolean f4 = file4.exists();\n\t\tboolean f5 = file5.exists();\n\t\tboolean f6 = file6.exists();\n\t\tboolean f7 = file7.exists();\n\t\tboolean f8 = file8.exists();\n\t\tboolean res = f1 && f2 && f3 && f4 && f5 && f6 && f7 && f8 ;\n\t\t\n\t\tif (res) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean isEffective() {\n return !this.isBroken() && !this.isExisted() && this.getId() < 0;\n }", "boolean hasUknown();", "public boolean tienePrepaga() {\r\n\t\treturn obraSocial != null;\r\n\t}", "protected boolean isDuplicate(ELesxUseCase useCase) {\n return false;\n }", "public boolean isDontCare(){\n return hasDontCare;\n }", "boolean pullingOnce();", "boolean hasResult();", "boolean hasResult();", "boolean hasResult();", "boolean hasResult();", "boolean hasResult();", "boolean hasResult();", "boolean hasResult();", "boolean hasResult();", "boolean hasResult();", "boolean hasResult();", "boolean hasResult();", "boolean hasResult();" ]
[ "0.6391675", "0.63325715", "0.63324404", "0.62328386", "0.62173814", "0.6198806", "0.6190232", "0.6190232", "0.611831", "0.6048545", "0.59992605", "0.59866786", "0.5970729", "0.59478915", "0.5881922", "0.58348036", "0.57976145", "0.5750552", "0.5750552", "0.5738876", "0.5736334", "0.5736334", "0.5711575", "0.5711209", "0.5679408", "0.56582093", "0.5649949", "0.56030476", "0.5597606", "0.5584695", "0.5566845", "0.55207074", "0.5506556", "0.54830736", "0.5467059", "0.5456894", "0.5444254", "0.5436137", "0.5434834", "0.54326564", "0.5425643", "0.541579", "0.54093736", "0.5408577", "0.5408577", "0.53948605", "0.5349501", "0.5349221", "0.5341226", "0.53161067", "0.53106755", "0.5308336", "0.5300383", "0.52848643", "0.5281676", "0.52629185", "0.5258341", "0.52562237", "0.5250023", "0.5244715", "0.5238066", "0.52373654", "0.52277637", "0.5223707", "0.52165365", "0.5208582", "0.5194246", "0.5182221", "0.5181579", "0.5175599", "0.51719785", "0.5171653", "0.516757", "0.51568663", "0.5154232", "0.5152841", "0.5142546", "0.51302826", "0.5130006", "0.5119084", "0.51171684", "0.5112881", "0.51044255", "0.5102358", "0.510208", "0.5088034", "0.5080059", "0.5073895", "0.50735563", "0.50735563", "0.50735563", "0.50735563", "0.50735563", "0.50735563", "0.50735563", "0.50735563", "0.50735563", "0.50735563", "0.50735563", "0.50735563" ]
0.72398436
0
=========================================================== Constructors =========================================================== This generates a pipeline to output a module's AST as a string.
public RawASTOutputPipeline(CompileEnvironment ce, MathSymbolTableBuilder symbolTable) { super(ce, symbolTable); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void genAst();", "public Module build() {\n return new Module(moduleCode, moduleTitle, academicYear, semester,\n students, tags);\n }", "public Node program() {\r\n\r\n this.CheckError(\"PROGRAM\");\r\n\r\n\r\n Node n_program = new Node(\"program\");\r\n n_program.setParent(null);\r\n System.out.println(\"read node from app: \"+n_program.getData());\r\n System.out.println(\" :parent: \"+n_program.getParent());\r\n\r\n Node n_declarations = n_program.setChildren(\"decl list\");\r\n System.out.println(\"read node from app :data: \"+n_declarations.getData());\r\n System.out.println(\" :parent: \"+n_declarations.getParent().getData());\r\n\r\n this.declaration(n_declarations);\r\n\r\n this.CheckError(\"BEGIN\");\r\n\r\n Node n_statementSequence = n_program.setChildren(\"stmt list\");\r\n this.statementSequence(n_statementSequence);\r\n\r\n this.CheckError(\"END\");\r\n\r\n System.out.println(\":::: Parsing Successful Hamid ::::\");\r\n\r\n return n_program;\r\n //////////////////////////////////////////// writeout PROGRAM treee -----------------\r\n //////////////////////////////////////////////////////////////////////////////////////\r\n ///////////////////////////////////////////////////////////////////////////////////\r\n ///////////output test generator\r\n /////////////////////////////////////////////////////////////////////////////////\r\n\r\n\r\n /*Node iteration = n_program;\r\n for (int i=0; i<iteration.childrenSize();i++){\r\n System.out.print(\"| \"+iteration.getChildren(i).getData()+\"|\");\r\n System.out.print(\" \");\r\n }\r\n System.out.println();\r\n iteration = n_program.getChildren(0);\r\n for (int i=0; i<iteration.childrenSize();i++){\r\n System.out.print(\"| \"+iteration.getChildren(i).getData()+\" |\");\r\n }\r\n System.out.print(\" \");\r\n iteration = n_program.getChildren(1);\r\n for (int i=0; i<iteration.childrenSize();i++){\r\n System.out.print(\"| \"+iteration.getChildren(i).getData()+\" |\");\r\n }\r\n System.out.println(\"\");\r\n System.out.print(\" \");\r\n Node iteration0= iteration.getChildren(0);\r\n for (int i=0; i<iteration0.childrenSize();i++){\r\n System.out.print(\"| \"+iteration0.getChildren(i).getData()+\" |\");\r\n }\r\n System.out.println();\r\n System.out.print(\" \");\r\n Node iteration1= iteration.getChildren(1);\r\n for (int i=0; i<iteration1.childrenSize();i++){\r\n System.out.print(\"| \"+iteration1.getChildren(i).getData()+\" |\");\r\n }\r\n System.out.println();\r\n System.out.print(\" \");\r\n Node iteration2= iteration.getChildren(2);\r\n for (int i=0; i<iteration2.childrenSize();i++){\r\n System.out.print(\"| \"+iteration2.getChildren(i).getData()+\" |\");\r\n }\r\n System.out.println();\r\n System.out.print(\" \");\r\n Node iteration3= iteration.getChildren(3);\r\n for (int i=0; i<iteration3.childrenSize();i++){\r\n System.out.print(\"| \"+iteration3.getChildren(i).getData()+\" |\");\r\n }\r\n System.out.println();\r\n System.out.print(\" \");\r\n Node iteration4= iteration.getChildren(4);\r\n for (int i=0; i<iteration4.childrenSize();i++){\r\n System.out.print(\"| \"+iteration4.getChildren(i).getData()+\" |\");\r\n }\r\n System.out.println();\r\n System.out.print(\" w\\n\");\r\n System.out.print(\" \");\r\n Node iteration0w= iteration2.getChildren(0);\r\n for (int i=0; i<iteration0w.childrenSize();i++){\r\n System.out.print(\"| \"+iteration0w.getChildren(i).getData()+\" |\");\r\n }\r\n System.out.print(\"\\n \");\r\n Node iteration1w= iteration2.getChildren(1);\r\n for (int i=0; i<iteration1w.childrenSize();i++){\r\n System.out.print(\"| \"+iteration1w.getChildren(i).getData()+\" |\");\r\n }\r\n System.out.print(\"\\n \");\r\n iteration= iteration0w.getChildren(0);\r\n for (int i=0; i<iteration.childrenSize();i++){\r\n System.out.print(\"| \"+iteration.getChildren(i).getData()+\" |\");\r\n }*/\r\n\r\n }", "public Module compileModule(String module) throws Exception, Error\n {\n Module m;\n while(containsCall(module))\n {\n \n Call call = getCall(module);\n module = resolveCall(module, call);\n }\n m = new Module(name(module), module);\n m.displayResults();\n return m;\n }", "public Module() {\n\t\tthis(new Function[0]);\n\t}", "@Override\n public void codegen(Emitter output) {\n }", "@Override\n public String toString() {\n return String.format(\"Module '%s'\", getName());\n }", "ModuleAssembly module( String name );", "public Engine build() {\n this.extensions.add(new CoreExtension());\n \n // load extensions\n this.extensions.forEach(extension -> {\n this.renderers.putAll(extension.getRenderers());\n this.directives.putAll(extension.getDirectives());\n this.nodeParsers.putAll(extension.getNodeParsers());\n this.filters.putAll(extension.getFilters());\n this.tests.putAll(extension.getTests());\n this.unaryOperators.putAll(extension.getUnaryOperators());\n this.binaryOperators.putAll(extension.getBinaryOperators());\n this.factories.addAll(extension.getNodeVisitorFactories());\n this.safeNodes.addAll(extension.getSafeNodes());\n });\n \n // create an operator token parser\n TokenParser unaryOperatorParser = TokenParser.in(TokenType.OPERATOR, this.unaryOperators.keySet().toArray(new String[]{}));\n TokenParser binaryOperatorParser = TokenParser.in(TokenType.OPERATOR, this.binaryOperators.keySet().toArray(new String[]{}));\n TokenParser operatorParser = unaryOperatorParser.or(binaryOperatorParser);\n \n // create a execute token parser\n TokenParser executeOpenParser = TokenParser.from(TokenType.EXECUTE_OPEN, compile(quote(this.executeOpen)), false);\n TokenParser executeCloseParser = TokenParser.from(TokenType.EXECUTE_CLOSE, compile(quote(this.executeClose)), false);\n TokenParser executeParser = executeOpenParser.then(NAME).then(operatorParser.or(EXPRESSION).until(executeCloseParser));\n this.starts.add(this.executeOpen);\n \n // create a print token parser\n TokenParser printOpenParser = TokenParser.from(TokenType.PRINT_OPEN, compile(quote(this.printOpen)), false);\n TokenParser printCloseParser = TokenParser.from(TokenType.PRINT_CLOSE, compile(quote(this.printClose)), false);\n TokenParser printParser = printOpenParser.then(operatorParser.or(EXPRESSION).until(printCloseParser));\n this.starts.add(this.printOpen);\n \n // create a comment token parser\n TokenParser commentOpenParser = TokenParser.from(TokenType.COMMENT_OPEN, compile(quote(this.commentOpen)), false);\n TokenParser commentCloseParser = TokenParser.from(TokenType.COMMENT_CLOSE, compile(quote(this.commentClose)), false);\n TokenParser commentInner = TokenParser.until(TokenType.TEXT, this.commentClose);\n TokenParser commentParser = commentOpenParser.then(commentInner.optional()).then(commentCloseParser);\n this.starts.add(this.commentOpen);\n \n // create a text token parser\n TokenParser leadingText = TokenParser.until(TokenType.TEXT, this.starts);\n TokenParser text = TokenParser.from(TokenType.TEXT, Pattern.compile(\"^.*\", Pattern.DOTALL | Pattern.MULTILINE), false);\n \n TokenParser principal = commentParser.or(executeParser).or(printParser).or(leadingText).zeroOrMore().then(text.optional()).then(EOF);\n this.tokenizerBuilder.parser(principal);\n Tokenizer tokenizer = this.tokenizerBuilder.build();\n \n ExpressionParser expressionParser = new ExpressionParser(this.unaryOperators, this.binaryOperators);\n \n Engine engine = new Engine(this.environment, expressionParser,\n renderers, directives, nodeParsers, \n filters, tests, factories, safeNodes,\n tokenizer);\n return engine;\n }", "public void printAst(){\n explore(ctx);\n }", "public String toString()\n{\n StringBuffer buf = new StringBuffer();\n buf.append(\"[SOURCE: \" + for_source.getName() + \",\\n\");\n if (getTransforms() != null) {\n buf.append(\"TRANS:\");\n for (S6Transform.Memo m : getTransforms()) {\n\tbuf.append(\" \");\n\tbuf.append(m.getTransformName());\n }\n }\n else {\n buf.append(\" TEXT: \" + getFragment().getText());\n }\n buf.append(\"]\");\n\n return buf.toString();\n}", "public PipelineImpl() {\n }", "@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/lib/IR/AsmWriter.cpp\", line = 3542,\n FQN=\"llvm::Module::dump\", NM=\"_ZNK4llvm6Module4dumpEv\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/AsmWriter.cpp -nm=_ZNK4llvm6Module4dumpEv\")\n //</editor-fold>\n public void dump() /*const*//* __attribute__((used)) __attribute__((noinline))*/ {\n print(dbgs(), (AssemblyAnnotationWriter /*P*/ )null, \n /*ShouldPreserveUseListOrder=*/ false, /*IsForDebug=*/ true);\n }", "public String toString() {\n Class<? extends AST> tclass = this.getClass();\n // isolate relative name (starting after the rightmost '.')\n String absoluteClassName = tclass.toString();\n int dotIndex = absoluteClassName.lastIndexOf(\".\", absoluteClassName.length());\n String relativeClassName = absoluteClassName.substring(dotIndex+1);\n // retrieving fields (note that, unfortunately, they are not ordered)\n // TO DO : get rid of static fields (pb in case of singletons)\n Field[] fields = tclass.getDeclaredFields();\n // building string representation of the arguments of the nodes\n int arity = fields.length;\n String args = \"\";\n for(int index = 0; index < arity; index++) {\n String arg;\n try {\n arg = fields[index].get(this).toString(); // retrieve string representation of all arguments\n } catch (Exception e) {\n arg = \"?\"; // IllegalArgument or IllegalAccess Exception (this shouldn't happen)\n }\n if (index != 0) // a separator is required before each argument except the first\n args = args + \", \" + arg;\n//\t\t\t\targs = args + \" \" + arg;\n else\n args = args + arg;\n }\n return relativeClassName + \"(\" + args + \")\";\n//\t\treturn \"<\" + relativeClassName + \">\" + args + \"</\" + relativeClassName + \">\";\n }", "public interface Ast {\n /**\n * Method for generating abstract syntactic structure for the source code\n * written in a programming language(Java or Python for example)\n */\n void genAst();\n\n}", "@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/include/llvm/IR/Module.h\", line = 241,\n FQN=\"llvm::Module::getModuleInlineAsm\", NM=\"_ZNK4llvm6Module18getModuleInlineAsmEv\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/AsmWriter.cpp -nm=_ZNK4llvm6Module18getModuleInlineAsmEv\")\n //</editor-fold>\n public /*const*/std.string/*&*/ getModuleInlineAsm() /*const*/ {\n return GlobalScopeAsm;\n }", "Module createModule();", "public String toString() {\n\t\t//|| (this.equals(new StatementParse(\"sequence\", 0)))\n\t\tif (this.equals(Parser.FAIL)) {\n\t\t\treturn \"\";\n\t\t}\n String result = \"\";\n result += \"(\";\n result += this.name;\n for (Parse child: this.children) {\n \tresult += \" \" + child.toString();\n }\n result += \")\";\n return result;\t\n }", "public String genCode() {\n StringBuilder childCode = new StringBuilder();\n for (Node node : this.getChildren()) {\n childCode.append(node.genCode());\n }\n return childCode.toString();\n }", "public AST(RuleContext ctx){\n this.ctx = ctx;\n }", "public StandardPipeline() {\n this(null);\n }", "@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/lib/IR/Module.cpp\", line = 414,\n FQN=\"llvm::Module::materializeAll\", NM=\"_ZN4llvm6Module14materializeAllEv\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/Module.cpp -nm=_ZN4llvm6Module14materializeAllEv\")\n //</editor-fold>\n public std.error_code materializeAll() {\n if (!Materializer.$bool()) {\n return new std.error_code();\n }\n std.unique_ptr<GVMaterializer> M = new std.unique_ptr<GVMaterializer>(JD$Move.INSTANCE, std.move(Materializer));\n return M.$arrow().materializeModule();\n }", "@Override\n\tpublic String visitProgram(ProgramContext ctx) {\n\t\tfor(int i=0; i< ctx.getChildCount();i++)\n\t\t visit(ctx.getChild(i));\n\t\treturn sb.toString();\n\t}", "public Assembler() {\r\n // Instantiate internals\r\n instructionMap = new HashMap<String, Method>();\r\n instructionSpec = new HashMap<String, Processor>();\r\n codeSectionList = new LinkedList<Section>();\r\n // Regular expressions\r\n patternInstruction = Pattern.compile(\"\\\\s*(?:(\\\\w+):)?\\\\s*(?:(\\\\w+)(?:\\\\s+(.*))?)?\");\r\n patternSection = Pattern.compile(\"\\\\s*SECTION\\\\s+(\\\\.\\\\w+)\\\\s*\", Pattern.CASE_INSENSITIVE);\r\n patternOpBoolean = Pattern.compile(\"\\\\$true|\\\\$false\", Pattern.CASE_INSENSITIVE);\r\n patternOpString = Pattern.compile(\"\\\"[^\\\"]*\\\"\");\r\n patternOpLabel = Pattern.compile(\"[a-zA-Z_]\\\\w*\");\r\n // Instantiate the code emitter\r\n codeEmitter = new AssemblerIREmitter();\r\n // Populate instruction processors\r\n populateProcessors();\r\n }", "public String toStringAST()\r\n/* 75: */ {\r\n/* 76: 94 */ StringBuilder s = new StringBuilder();\r\n/* 77: */ \r\n/* 78: 96 */ s.append('{');\r\n/* 79: 97 */ int count = getChildCount();\r\n/* 80: 98 */ for (int c = 0; c < count; c++)\r\n/* 81: */ {\r\n/* 82: 99 */ if (c > 0) {\r\n/* 83:100 */ s.append(',');\r\n/* 84: */ }\r\n/* 85:102 */ s.append(getChild(c).toStringAST());\r\n/* 86: */ }\r\n/* 87:104 */ s.append('}');\r\n/* 88:105 */ return s.toString();\r\n/* 89: */ }", "abstract protected T createModuleNode(NodeDescriptor node);", "private Pipeline getPipelineObject() throws Exception{\n String populatorClassname = \"\";\n try { \n populatorClassname = getStringProperty(ParameterList.POP_PIPELINE, false).replaceAll(\"\\\\s\", \"\");\n Class<?> populatorClass = Class.forName(populatorClassname);\n Constructor<?> populatorConstructor = populatorClass.getConstructor();\n return (Pipeline)populatorConstructor.newInstance();\n } \n catch (ClassNotFoundException e) {\n throw new ClassNotFoundException(\"Error loading the pipeline. Class \" + populatorClassname + \" not found\", e);\n } \n }", "public Object seq(IModule module1, IModule module2);", "@Override\r\n protected void writeActual (RecordOutputStream s) throws IOException {\r\n s.startRecord (ModuleSerializationTags.LECC_MODULE, serializationSchema);\r\n s.writeModuleName(getName());\r\n classNameMapper.write(s);\r\n super.writeContent (s);\r\n s.endRecord ();\r\n }", "@Test\n public void printToString() {\n System.out.println(ModuleInfo.getFromModuleCode(\"CFG1010\").get());\n\n // Test module with preclusions\n System.out.println(ModuleInfo.getFromModuleCode(\"GER1000\").get());\n\n // Test module with prerequisites\n System.out.println(ModuleInfo.getFromModuleCode(\"CS2040\").get());\n }", "public Codegen() {\n assembler = new LinkedList<LlvmInstruction>();\n symTab = new SymTab();\n }", "@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/include/llvm/IR/Module.h\", line = 469,\n FQN=\"llvm::Module::getMaterializer\", NM=\"_ZNK4llvm6Module15getMaterializerEv\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/AsmWriter.cpp -nm=_ZNK4llvm6Module15getMaterializerEv\")\n //</editor-fold>\n public GVMaterializer /*P*/ getMaterializer() /*const*/ {\n return Materializer.get();\n }", "public MutablePipeline() {\r\n\t\tstages = new ArrayList<>();\r\n\r\n\t\tname = \"Unnamed Pipeline\";\r\n\t}", "public interface Program extends AstItem {\n}", "@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/include/llvm/IR/Module.h\", line = 214,\n FQN=\"llvm::Module::getSourceFileName\", NM=\"_ZNK4llvm6Module17getSourceFileNameEv\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/AsmWriter.cpp -nm=_ZNK4llvm6Module17getSourceFileNameEv\")\n //</editor-fold>\n public /*const*/std.string/*&*/ getSourceFileName() /*const*/ {\n return SourceFileName;\n }", "public void flattenASTChangesToString(){\n\t\tthis.codeBlob = getCodeString();\n\t\tthis.compUnit = null;\n\t\tthis.rewriter = null;\n\t}", "@Override\n public void run() {\n if ((generate_modules_based_on_keyword==null)||(generate_modules_based_on_keyword.equals(\"\"))) {\n System.err.println(\"Error in module generation definition. Check format 'key:name1;name2;'\");\n } else {\n String[] parts = generate_modules_based_on_keyword.split(\":\",2);\n if (parts.length==2) {\n ArrayList<String> channelsToGenerate = new ArrayList<>();\n String[] channelNames = parts[1].split(\";\");\n for (int i=0;i<channelNames.length;i++) {\n channelsToGenerate.add(channelNames[i]);\n }\n pipe_out = pipe_in.generatePipe(parts[0], channelsToGenerate);\n pipe_out.name=pipe_in.toString()+pipe_suffix;\n } else {\n System.err.println(\"Error in module generation definition. Check format 'key:name1;name2;'\");\n }\n }\n }", "public interface AstFactory\n{\n\tIdNode IdNode(Token t, String text);\n\tExtIdNode ExtIdNode(Token t, String text);\n\n\tAmbigNameNode AmbigNameNode(Token t, String text);\t // Deprecate? Never need to make ambigname \"manually\" via af? (constructed only by ScribbleParser)\n\tDataParamNode DataParamNode(Token t, String text);\n\tOpNode OpNode(Token t, String text);\n\tRecVarNode RecVarNode(Token t, String text);\n\tRoleNode RoleNode(Token t, String text);\n\tSigParamNode SigParamNode(Token t, String text);\n\n\tDataNameNode DataNameNode(Token t, List<IdNode> elems);\n\tGProtoNameNode GProtoNameNode(Token t, List<IdNode> elems);\n\tLProtoNameNode LProtoNameNode(Token t, List<IdNode> elems);\n\tModuleNameNode ModuleNameNode(Token t, List<IdNode> elems);\n\tSigNameNode SigNameNode(Token t, List<IdNode> elems);\n\t\n\tModule Module(Token t, ModuleDecl mdecl,\n\t\t\tList<? extends ImportDecl<?>> imports,\n\t\t\tList<? extends NonProtoDecl<?>> nonprotos,\n\t\t\tList<? extends ProtoDecl<?>> protos);\n\n\tModuleDecl ModuleDecl(Token t, ModuleNameNode fullname);\n\tImportModule ImportModule(Token t, ModuleNameNode modname,\n\t\t\tModuleNameNode alias); // alias == null for no alias (child not added)\n\n\tDataDecl DataDecl(Token t, IdNode schema, ExtIdNode extName,\n\t\t\tExtIdNode extSource, DataNameNode name);\n\tSigDecl SigDecl(Token t, IdNode schema, ExtIdNode extName,\n\t\t\tExtIdNode extSource, SigNameNode name);\n\tGProtoDecl GProtoDecl(Token t, ProtoModList mods, GProtoHeader header,\n\t\t\tGProtoDef def);\n\n\t// TODO: refactor to use ProtoModList, etc.\n\tProtoModList ProtoModList(Token t, List<ProtoModNode> mods);\n\tAuxMod AuxMod(Token t);\n\tExplicitMod ExplicitMod(Token t);\n\n\tGProtoHeader GProtocolHeader(Token t, GProtoNameNode name, RoleDeclList rs,\n\t\t\tNonRoleParamDeclList ps);\n\tRoleDeclList RoleDeclList(Token t, List<RoleDecl> ds);\n\tRoleDecl RoleDecl(Token t, RoleNode r);\n\tNonRoleParamDeclList NonRoleParamDeclList(Token t, \n\t\t\tList<NonRoleParamDecl<? extends NonRoleParamKind>> ds);\n\tDataParamDecl DataParamDecl(Token t, DataParamNode p);\n\tSigParamDecl SigParamDecl(Token t, SigParamNode p);\n\n\tGProtoDef GProtoDef(Token t, GProtoBlock block);\n\tGProtoBlock GProtoBlock(Token t, GInteractionSeq seq);\n\tGInteractionSeq GInteractionSeq(Token t, List<GSessionNode> elems); // CHECKME: ? extends GSessionNode ? -- and similar others?\n\n\tSigLitNode SigLitNode(Token t, OpNode op, PayElemList pay);\n\tPayElemList PayElemList(Token t, List<PayElem<?>> elems);\n\t<K extends PayElemKind> UnaryPayElem<K> UnaryPayElem(Token t, \n\t\t\tPayElemNameNode<K> name);\n\tGDelegPayElem GDelegPayElem(Token t, GProtoNameNode name, RoleNode r);\n\n\tGMsgTransfer GMsgTransfer(Token t, RoleNode src, MsgNode msg,\n\t\t\tList<RoleNode> dsts);\n\tGConnect GConnect(Token t, RoleNode src, MsgNode msg, RoleNode dst);\n\tGDisconnect GDisconnect(Token t, RoleNode left, RoleNode right);\n\tGWrap GWrap(Token t, RoleNode client, RoleNode server);\n\n\tGContinue GContinue(Token t, RecVarNode rv);\n\tGDo GDo(Token t, GProtoNameNode proto, NonRoleArgList args, RoleArgList rs);\n\n\tRoleArgList RoleArgList(Token t, List<RoleArg> rs);\n\tRoleArg RoleArg(Token t, RoleNode r);\n\tNonRoleArgList NonRoleArgList(Token t, List<NonRoleArg> args);\n\tNonRoleArg NonRoleArg(Token t, NonRoleArgNode arg);\n\n\tGChoice GChoice(Token t, RoleNode subj, List<GProtoBlock> blocks);\n\tGRecursion GRecursion(Token t, RecVarNode rv, GProtoBlock block);\n\n\t/*LProtoDecl LProtoDecl(Token t, ProtoModList mods,\n\t\t\tLProtoHeader header, LProtoDef def); // Not currently used -- local protos not yet parsed, only projected*/\n\n\tLProjectionDecl LProjectionDecl(Token t, ProtoModList mods,\n\t\t\tLProtoHeader header, LProtoDef def, GProtoNameNode fullname,\n\t\t\tRoleNode self); // del extends that of LProtoDecl\n\n\tLProtoHeader LProtoHeader(Token t, LProtoNameNode name, RoleDeclList rs,\n\t\t\tNonRoleParamDeclList ps);\n\tLSelfDecl LSelfDecl(Token t, RoleNode r);\n\n\tLProtoDef LProtoDef(Token t, LProtoBlock block);\n\tLProtoBlock LProtoBlock(Token t, LInteractionSeq seq);\n\tLInteractionSeq LInteractionSeq(Token t, List<LSessionNode> elems);\n\n\t// Following take \"self\" param in case of parsed Token (not actually supported yet)\n\tLSend LSend(Token t, RoleNode self, MsgNode msg, RoleNode dst);\n\tLRecv LRecv(Token t, RoleNode src, MsgNode msg, RoleNode self);\n\tLAcc LAcc(Token t, RoleNode src, MsgNode msg, RoleNode self);\n\tLReq LReq(Token t, RoleNode self, MsgNode msg, RoleNode dst);\n\tLDisconnect LDisconnect(Token t, RoleNode self, RoleNode peer); \n\tLClientWrap LClientWrap(Token t, RoleNode client, RoleNode server);\n\tLServerWrap LServerWrap(Token t, RoleNode client, RoleNode server);\n\n\tLContinue LContinue(Token t, RecVarNode rv); \n\tLDo LDo(Token t, LProtoNameNode proto, NonRoleArgList as, RoleArgList rs);\n\n\tLChoice LChoice(Token t, RoleNode subj, List<LProtoBlock> blocks);\n\tLRecursion LRecursion(Token t, RecVarNode rv, LProtoBlock block);\n}", "public String toProgram()\n\t{\n\t\tString prog = \"\";\n\t\tif(this.type == nodetype.root)\n\t\t{\n\t\t\tfor(ParseTreeNode node:this.children)\n\t\t\t{\n\t\t\t\tprog+= node.toProgram()+\"+\";\n\t\t\t}\n\t\t\tif(prog.length() > 0)\n\t\t\t{\n\t\t\t\tprog = prog.substring(0,prog.length()-1);\n\t\t\t}\n\t\t}\n\t\telse if(this.type == nodetype.segment)\n\t\t{\n\t\t\tif(this.children.size()==0)\n\t\t\t{\n\t\t\t\tprog = this.value;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tprog = String.format(\"substr(value,%s,%s)\", this.children.get(0).value,this.children.get(1).value);\n\t\t\t}\n\t\t}\n\t\treturn prog;\n\t}", "public java.lang.CharSequence getModule() {\n return module;\n }", "public ZEPipelineBindLayout build();", "private void writeFactory(GenModule module) throws Exception {\n\t\tMustacheFactory mf = new DefaultMustacheFactory();\n\t\tMustache template = mf.compile(\"factoryTemplate.hbs\"); \n\t\tElement[] sources = getSourcesOf(module);\n\t\tJavaFileObject fileObject = filer.createSourceFile(module\n\t\t\t\t.getPackageName() + \".\" + module.getClassName()); //we dont report the sources so that we keep the generated file on touching e.g. a @singleton component \n\t\tOutputStream outputStream = fileObject.openOutputStream();\n\t\ttry (Writer writer = new PrintWriter(outputStream)) {\n\t\t\t//template.apply(module, writer);\n\t\t\ttemplate.execute(writer, module);\n\t\t\twriter.flush();\n\t\t}\n\t\t;\n\t}", "public java.lang.CharSequence getModule() {\n return module;\n }", "public String getCompiler();", "@Override\n\t\tpublic String toString() {\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tpreOrderTraverse(expression.root, 1, sb);\n\t\t\treturn sb.toString();\n\t\t}", "public String toString() {\n return \"Module Dependency : \" + getName() + \":\" + getVersion();\n }", "public StructureParserOutputStream ()\n {\n this(new NullOutputStream());\n }", "public HelloWorldProgramOutput ()\n {\n initialize();\n }", "public void outputSource(int module, int line, String s)\n\t{\n\t\tStringBuilder sb = new StringBuilder();\n\t\tappendSource(sb, module, line, s, true);\n\t\tout( sb.toString() );\n\t}", "public String getModuleName() {\n\t\treturn \"IGA: Prepare data for Model (Decision Tree)\";\n\t}", "protected AST_Node() {\r\n\t}", "public String compile () throws IOException, RhinoEvaluatorException {\n return compile(1, null);\n }", "public PipelineFilter()\n {\n }", "@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/include/llvm/IR/Module.h\", line = 220,\n FQN=\"llvm::Module::getName\", NM=\"_ZNK4llvm6Module7getNameEv\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/AsmWriter.cpp -nm=_ZNK4llvm6Module7getNameEv\")\n //</editor-fold>\n public StringRef getName() /*const*/ {\n return new StringRef(ModuleID);\n }", "private FilterPipeline createPipeline() {\n Filter filterZero = createDefaultPatternFilter(0);\n Filter filterTwo = createDefaultPatternFilter(2); \n Sorter sorter = new ShuttleSorter();\n Filter[] filters = new Filter[] {filterZero, filterTwo, sorter};\n FilterPipeline pipeline = new FilterPipeline(filters);\n return pipeline;\n }", "public ProgramModule getModule(String treeName, String name);", "@Converted(kind = Converted.Kind.AUTO_NO_BODY,\n source = \"${LLVM_SRC}/llvm/lib/Analysis/LoopAccessAnalysis.cpp\", line = 1981,\n FQN=\"llvm::LoopAccessLegacyAnalysis::print\", NM=\"_ZNK4llvm24LoopAccessLegacyAnalysis5printERNS_11raw_ostreamEPKNS_6ModuleE\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.analysis/llvmToClangType ${LLVM_SRC}/llvm/lib/Analysis/LoopAccessAnalysis.cpp -nm=_ZNK4llvm24LoopAccessLegacyAnalysis5printERNS_11raw_ostreamEPKNS_6ModuleE\")\n //</editor-fold>\n public void print(final raw_ostream /*&*/ OS) /*const*//* override*/ {\n print(OS, (/*const*/ Module /*P*/ )null);\n }", "private ExpressionTools(){\n\t\t\n\t}", "ModulePackage createModulePackage();", "public ResponseContainerModule() {\n\t\tsuper(TYPE_MODULE);\n\t}", "public interface Program {\n\n\t/**\n\t * The name of the string class\n\t */\n\tpublic static final String STRING_CLASS = \"String\";\n\n\t/**\n\t * The name of the object class\n\t */\n\tpublic static final String OBJECT_CLASS = \"Object\";\n\n\t/**\n\t * Yields an unmodifiable view of all the methods and constructors that are part\n\t * of the program to analyze.\n\t * \n\t * @return the collection of method and constructors\n\t */\n\tCollection<MCodeMember> getAllCodeMembers();\n\n\t/**\n\t * Yields an unmodifiable view of all the methods and constructors that are part\n\t * of the program to analyze, excluding ones from the String and Object classes.\n\t * \n\t * @return the collection of method and constructors\n\t */\n\tCollection<MCodeMember> getAllSubmittedCodeMembers();\n}", "OutputDecl createOutputDecl();", "Module module() {\n return module;\n }", "@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/include/llvm/IR/Module.h\", line = 743,\n FQN=\"llvm::Module::debug_compile_units\", NM=\"_ZNK4llvm6Module19debug_compile_unitsEv\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/AsmWriter.cpp -nm=_ZNK4llvm6Module19debug_compile_unitsEv\")\n //</editor-fold>\n public iterator_range<DICompileUnit /*P*/ > debug_compile_units() /*const*/ {\n NamedMDNode /*P*/ CUs = getNamedMetadata(new Twine(/*KEEP_STR*/\"llvm.dbg.cu\"));\n return make_range(new debug_compile_units_iterator(CUs, 0), \n new debug_compile_units_iterator(CUs, (CUs != null) ? CUs.getNumOperands() : 0));\n }", "@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/include/llvm/IR/Module.h\", line = 281,\n FQN=\"llvm::Module::appendModuleInlineAsm\", NM=\"_ZN4llvm6Module21appendModuleInlineAsmENS_9StringRefE\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/AsmWriter.cpp -nm=_ZN4llvm6Module21appendModuleInlineAsmENS_9StringRefE\")\n //</editor-fold>\n public void appendModuleInlineAsm(StringRef Asm) {\n $addassign_string_StringRef(GlobalScopeAsm, /*NO_COPY*/Asm);\n if (!GlobalScopeAsm.empty() && GlobalScopeAsm.back() != $$LF) {\n GlobalScopeAsm.$addassign_T($$LF);\n }\n }", "@Override\r\n \t@Deprecated\r\n \tpublic final String toString() {\n \t\treturn toStringClassName() +\" \"+ toStringAsCode();\r\n \t\t//return ASTPrinter.toStringAsFullNodeTree(this, true);\r\n \t}", "@Test\n public void printToString() {\n System.out.println(ModuleInfo.getFromModuleCode(\"CS1010\").get());\n }", "public interface AST {\n \n /**\n * Returns the label or tag for this AST node.\n */\n public int getNodeLabel ();\n \n /**\n * Returns the textual value of this AST node.\n */\n public String getNodeValue ();\n \n /**\n * Returns a list of child nodes, or null if there are no child nodes. The value returned is a shallow copy\n * which can be manipulated by the caller.\n */\n public List<AST> getChildNodes ();\n \n /**\n * Returns the position of the node in the original source(s).\n */\n public CodePosition getCodePosition ();\n \n}", "@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/include/llvm/IR/Module.h\", line = 237,\n FQN=\"llvm::Module::getContext\", NM=\"_ZNK4llvm6Module10getContextEv\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/AsmWriter.cpp -nm=_ZNK4llvm6Module10getContextEv\")\n //</editor-fold>\n public LLVMContext /*&*/ getContext() /*const*/ {\n return Context;\n }", "public Pipeline getPipeline(){\n return pipeline;\n }", "@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/include/llvm/IR/Module.h\", line = 224,\n FQN=\"llvm::Module::getDataLayoutStr\", NM=\"_ZNK4llvm6Module16getDataLayoutStrEv\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/AsmWriter.cpp -nm=_ZNK4llvm6Module16getDataLayoutStrEv\")\n //</editor-fold>\n public /*const*/std.string/*&*/ getDataLayoutStr() /*const*/ {\n return DL.getStringRepresentation();\n }", "public ModuleSnippet(String className) {\n super();\n this.className = className;\n moduleClass = findClass(className);\n if (moduleClass != null) {\n Exception exception = isModule(moduleClass);\n if (exception == null) {\n try {\n defaultConstructor = moduleClass.getConstructor((Class[]) null);\n } catch (NoSuchMethodException e) {\n defaultConstructor = null;\n }\n try {\n setDefaultConstructor();\n } catch (Exception e) {\n defaultConstructor = null;\n }\n } else {\n problems.add(new InvalidModuleProblem(className,exception));\n defaultConstructor = null;\n }\n }\n }", "@Override\n\tpublic void generate() {\n\t\tJavaObject object = new JavaObject(objectType);\n\n\t\t// Fields\n\t\taddFields(object);\n\n\t\t// Empty constructor\n\t\taddEmptyConstructor(object);\n\n\t\t// Types constructor\n\t\taddTypesConstructor(object);\n\n\t\t// Clone constructor\n\t\taddCloneConstructor(object);\n\n\t\t// Setters\n\t\taddSetters(object);\n\n\t\t// Build!\n\t\taddBuild(object);\n\n\t\t// Done!\n\t\twrite(object);\n\t}", "protected final void emitCode() {\n int bytecodeSize = request.graph.method() == null ? 0 : request.graph.getBytecodeSize();\n request.compilationResult.setHasUnsafeAccess(request.graph.hasUnsafeAccess());\n GraalCompiler.emitCode(request.backend, request.graph.getAssumptions(), request.graph.method(), request.graph.getMethods(), request.graph.getFields(), bytecodeSize, lirGenRes,\n request.compilationResult, request.installedCodeOwner, request.factory);\n }", "Builder(String name) {\n var synthetic = Set.of(ModuleDescriptor.Modifier.SYNTHETIC);\n this.descriptor = ModuleDescriptor.newModule(name, synthetic);\n }", "public void PrintMe(){\r\n\t\t/* AST NODE TYPE = AST SUBSCRIPT VAR */\r\n\t\t/*************************************/\r\n\t\tSystem.out.print(\"AST NODE PAREN EXP\\n\");\r\n \r\n\t\t\r\n\t\t/***************************************/\r\n\t\t/* PRINT Node to AST GRAPHVIZ DOT file */\r\n\t\t/***************************************/\r\n\t\tAST_GRAPHVIZ.getInstance().logNode(\r\n\t\t\tSerialNumber,\r\n\t\t\t\"(exp)\");\r\n\t\tif (e != null) AST_GRAPHVIZ.getInstance().logEdge(SerialNumber,e.SerialNumber);\r\n \r\n }", "private void loadOutputModules() {\n\t\tthis.outputModules = new ModuleLoader<IOutput>(\"/Output_Modules\", IOutput.class).loadClasses();\n\t}", "public static void main(String [] args) {\n List<Ast.Param> pl = new ArrayList<Ast.Param>(); // empty param list\n List<Ast.VarDecl> vl = new ArrayList<Ast.VarDecl>(); // empty var list\n List<Ast.Stmt> sl = new ArrayList<Ast.Stmt>(); // empty stmt list\n\n // Construct a print stmt and add it to stmt list\n Ast.Exp arg = new Ast.StrLit(\"Hello World!\"); // create an arg\n Ast.Stmt s = new Ast.Print(arg); // create a print stmt\n sl.add(s); // add stmt to list\n \n // Construct a MethodDecl ---\n // Ast.MethodDecl(Ast.Type rt, String m, List<Ast.Param> pl, \n // List<Ast.VarDecl> vl, List<Ast.Stmt> sl)\n Ast.MethodDecl md = new Ast.MethodDecl(null, \t// null represents 'void'\n\t\t\t\t\t \"main\",\t// method's name\n\t\t\t\t\t pl, \t\t// formal params\n\t\t\t\t\t vl, \t\t// local var decls\n\t\t\t\t\t sl); \t// method body\n List<Ast.MethodDecl> ml = new ArrayList<Ast.MethodDecl>();\n ml.add(md);\n\n // Construct a ClassDecl ---\n // Ast.ClassDecl(String nm, String pnm, \n // List<Ast.VarDecl> vl, List<Ast.MethodDecl> ml)\n Ast.ClassDecl cd = new Ast.ClassDecl(\"Hello\",\t// class name\n\t\t\t\t\t null, \t\t// parent's name\n\t\t\t\t\t vl, \t\t// field decls \n\t\t\t\t\t ml); \t\t// method decls\n List<Ast.ClassDecl> cl = new ArrayList<Ast.ClassDecl>();\n cl.add(cd);\n\n // Construct a Program ---\n // Ast.Program(List<Ast.ClassDecl> cl)\n Ast.Program p = new Ast.Program(cl); \t// create the whole AST\n System.out.print(p); \t\t\t// dump out the AST\n }", "public DynamicStencilOperator generate(Python pythonSpec, MutableModule module) {\n\t\tassert module != null : \"Null moduled passed.\";\n\t\t\n\t\tregisterEnv(pythonSpec.getEnvironment());\n\t\tJythonOperator legend = new JythonOperator(module.getModuleData().getName(), pythonSpec.getName());\n\t\tfor (PythonFacet b: pythonSpec.getFacets()) {\n\t\t\tif (b.getName().equals(INIT_BLOCK_TAG)) {invokeInitBlock(b, pythonSpec.getEnvironment()); continue;}\n\t\t\t\n\t\t\ttry {legend.add(new JythonEncapsulation(pythonSpec,b,this), b);}\n\t\t\tcatch (Exception e) {throw new RuntimeException(String.format(\"Error creating encapsulation for facet %1$s (%2$s).\", b.getName(), b.getBody()),e);}\n\t\t}\n\n\t\tmodule.addOperator(legend);\n\t\t\n\t\treturn legend;\n\t}", "public String getModuleInfo() {\n\t\tString s =\n\t\t\t\"<p>Overview: Automatically discretize scalar data for the \"\n\t\t\t\t+ \"Naive Bayesian classification model.\"\n\t\t\t\t+ \"<p>Detailed Description: Given a table of Examples, define the bins for each \"\n\t\t\t\t+ \"scalar input column. </P><P>When binning Uniformly, \"\n\t\t\t\t+ \"the number of bins is determined by '<i>Number of Bins</i>' property, \"\n\t\t\t\t+ \"and the boundaries of the bins are set so that they divide evenly over the range \"\n\t\t\t\t+ \"of the binned column.</p><P>\"\n\t\t\t\t+ \" When binning by weight, '<i>Number of Items per Bin</I>' sets the size of each bin. \"\n\t\t\t\t+ \"The values are then binned so that in each bin there is the same number of items. \"\n\t\t\t\t+ \"For more details see description of property '<i>Number of Items per Bin</I>'.\"\n\t\t\t\t+ \"</P><P>Data Handling: This module does not modify the input data.\"\n\t\t\t\t+ \"<p>Scalability: The module requires enough memory to make copies of \"\n\t\t\t\t+ \"each of the scalar input columns.\";\n\n\t\treturn s;\n\t}", "public Rule compilationUnit()\n \t{\n \t\treturn sequence(\n \t\t\t\tOPT_SP,\n \t\t\t\tzeroOrMore(firstOf(using(), incUsing())),\n \t\t\t\tzeroOrMore(typeDef()),\n \t\t\t\tOPT_SP,\n \t\t\t\tzeroOrMore(doc()), // allow for extra docs at end of file (if last type commented out)\n \t\t\t\tOPT_SP,\n \t\t\t\teoi());\n \t}", "public void generate() {\n\t\t// Print generation stamp\n\t\tcontext.getNaming().putStamp(elementInterface, out);\n\t\t// Print the code\n\t\t// Print header\n\t\tout.println(\"package \"+modelPackage+\";\");\n\t\tout.println();\n\t\tout.println(\"public interface \"+elementInterface);\n\t\tif (context.isGenerateVisitor()) {\n\t\t\tout.println(indent+\"extends \"+context.getNaming().getVisitableInterface(modelName));\n\t\t}\n\t\tout.println(\"{\");\n\t\tif (context.isGenerateID()) {\n\t\t\tout.println(indent+\"/** Get the id */\");\n\t\t\tout.println(indent+\"public String getId();\");\n\t\t\tout.println(indent+\"/** Set the id */\");\n\t\t\tout.println(indent+\"public void setId(String id);\");\n\t\t\tout.println();\n\t\t}\n\t\tif (context.isGenerateBidirectional()) {\n\t\t\tout.println(indent+\"/** Delete */\");\n\t\t\tout.println(indent+\"public void delete();\");\n\t\t}\n\t\tout.println(indent+\"/** Override toString */\");\n\t\tout.println(indent+\"public String toString();\");\n//\t\tif (context.isGenerateInvariant()) {\n//\t\t\tout.println();\n//\t\t\tout.println(indent+\"/** Parse all invariants */\");\n//\t\t\tout.println(indent+\"public Boolean parseInvariants(ILog log);\");\n//\t\t\tout.println(indent+\"/** Evaluate all invariants */\");\n//\t\t\tout.println(indent+\"public Boolean evaluateInvariants(ILog log);\");\n//\t\t}\n\t\tout.println(\"}\");\n\t}", "@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/lib/IR/Module.cpp\", line = 58,\n FQN=\"llvm::Module::~Module\", NM=\"_ZN4llvm6ModuleD0Ev\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/Module.cpp -nm=_ZN4llvm6ModuleD0Ev\")\n //</editor-fold>\n public void $destroy() {\n Context.removeModule(this);\n dropAllReferences();\n GlobalList.clear();\n FunctionList.clear();\n AliasList.clear();\n IFuncList.clear();\n NamedMDList.clear();\n /*delete*/Destructors.$destroy((Destructors.ClassWithDestructor)ValSymTab);\n /*delete*/Destructors.$destroy((Destructors.ClassWithDestructor)((/*static_cast*/StringMap<NamedMDNode /*P*/ > /*P*/)(NamedMDSymTab)));\n //START JDestroy\n DL.$destroy();\n TargetTriple.$destroy();\n SourceFileName.$destroy();\n ModuleID.$destroy();\n Materializer.$destroy();\n ComdatSymTab.$destroy();\n GlobalScopeAsm.$destroy();\n NamedMDList.$destroy();\n IFuncList.$destroy();\n AliasList.$destroy();\n FunctionList.$destroy();\n GlobalList.$destroy();\n //END JDestroy\n }", "@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/lib/IR/Module.cpp\", line = 70,\n FQN=\"llvm::Module::createRNG\", NM=\"_ZNK4llvm6Module9createRNGEPKNS_4PassE\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/Module.cpp -nm=_ZNK4llvm6Module9createRNGEPKNS_4PassE\")\n //</editor-fold>\n public RandomNumberGenerator /*P*/ createRNG(/*const*/ Pass /*P*/ P) /*const*/ {\n SmallString/*<32>*/ Salt/*J*/= new SmallString/*<32>*/(32, new StringRef(P.getPassName()));\n \n // This RNG is guaranteed to produce the same random stream only\n // when the Module ID and thus the input filename is the same. This\n // might be problematic if the input filename extension changes\n // (e.g. from .c to .bc or .ll).\n //\n // We could store this salt in NamedMetadata, but this would make\n // the parameter non-const. This would unfortunately make this\n // interface unusable by any Machine passes, since they only have a\n // const reference to their IR Module. Alternatively we can always\n // store salt metadata from the Module constructor.\n Salt.$addassign(path.filename(new StringRef(getModuleIdentifier())));\n \n return new RandomNumberGenerator(Salt.$StringRef());\n }", "public com.autodesk.ws.avro.Call.Builder setModule(java.lang.CharSequence value) {\n validate(fields()[2], value);\n this.module = value;\n fieldSetFlags()[2] = true;\n return this; \n }", "private SourcecodePackage() {}", "public static File generateAssemblyPlan(Set<AssignedModule> modulesToTest, String filePath) throws Exception {\n \n //Add testing modules to target modules\n HashSet<AssignedModule> allModules = new HashSet<>();\n HashSet<List<Feature>> moduleFeatureHash = new HashSet<>();\n \n for (AssignedModule targetModule : modulesToTest) {\n if (!moduleFeatureHash.contains(targetModule.getAllModuleFeatures())) {\n allModules.add(targetModule);\n moduleFeatureHash.add(targetModule.getAllModuleFeatures());\n }\n\n List<AssignedModule> controlModules = targetModule.getControlModules();\n for (AssignedModule controlModule : controlModules) {\n if (!moduleFeatureHash.contains(controlModule.getAllModuleFeatures())) {\n allModules.add(controlModule);\n moduleFeatureHash.add(controlModule.getAllModuleFeatures());\n }\n }\n }\n \n ClothoConnection conn = new ClothoConnection(Args.clothoLocation,Args.maxTimeOut);\n Clotho clothoObject = new Clotho(conn); \n \n //Get Phoenix data from Clotho\n JSONObject parameters = ClothoAdaptor.getAssemblyParameters(\"default\",clothoObject).toJSON();\n org.json.JSONObject rParameters = convertJSONs(parameters);\n \n Map polyNucQuery = new HashMap();\n //polyNucQuery.put(\"schema\", \"org.cidarlab.phoenix.core.dom.Polynucleotide\");\n HashSet<Polynucleotide> polyNucs = new HashSet<>(ClothoAdaptor.queryPolynucleotides(polyNucQuery,clothoObject));\n \n Map featureQuery = new HashMap();\n //featureQuery.put(\"schema\", \"org.cidarlab.phoenix.core.dom.Feature\");\n List<Feature> allFeatures = ClothoAdaptor.queryFeatures(featureQuery,clothoObject);\n \n Map fluorophoreQuery = new HashMap();\n //fluorophoreQuery.put(\"schema\", \"org.cidarlab.phoenix.core.dom.Fluorophore\");\n allFeatures.addAll(ClothoAdaptor.queryFluorophores(fluorophoreQuery,clothoObject));\n \n //Determine parts library\n HashSet<org.cidarlab.raven.datastructures.Part> partsLibR = new HashSet();\n HashSet<org.cidarlab.raven.datastructures.Vector> vectorsLibR = new HashSet();\n \n //Convert Phoenix Features to Raven Parts\n partsLibR.addAll(phoenixFeaturesToRavenParts(allFeatures));\n \n //Convert Phoenix Polynucleotides to Raven Parts, Vectors and Plasmids\n HashMap<org.cidarlab.raven.datastructures.Part, org.cidarlab.raven.datastructures.Vector> libPairs = ravenPartVectorPairs(polyNucs, partsLibR, vectorsLibR);\n vectorsLibR.addAll(libPairs.values());\n partsLibR.addAll(libPairs.keySet());\n \n //Convert Phoenix Modules to Raven Plasmids\n ArrayList<HashSet<org.cidarlab.raven.datastructures.Part>> listTargetSets = new ArrayList();\n HashSet<AssignedModule> expressees = new HashSet<>();\n HashSet<AssignedModule> expressors = new HashSet<>();\n for (AssignedModule m : allModules) {\n if (m.getRole() == ModuleRole.EXPRESSEE || m.getRole() == ModuleRole.EXPRESSEE_ACTIVATIBLE_ACTIVATOR || m.getRole() == ModuleRole.EXPRESSEE_ACTIVATOR || m.getRole() == ModuleRole.EXPRESSEE_REPRESSIBLE_REPRESSOR || m.getRole() == ModuleRole.EXPRESSEE_REPRESSOR) {\n expressees.add(m);\n } else if (m.getRole() == ModuleRole.EXPRESSOR) {\n expressors.add(m);\n }\n }\n allModules.removeAll(expressees);\n allModules.removeAll(expressors);\n \n listTargetSets.add(phoenixModulesToRavenParts(expressees, partsLibR));\n listTargetSets.add(phoenixModulesToRavenParts(expressors, partsLibR));\n listTargetSets.add(phoenixModulesToRavenParts(allModules, partsLibR)); \n \n //Run Raven to get assembly instructions\n Raven raven = new Raven(); \n RavenController assemblyObj = raven.assemblyObject(listTargetSets, partsLibR, vectorsLibR, libPairs, new HashMap(), rParameters, filePath);\n \n //This is the information to be saved into Clotho and grabbed for the Owl datasheets\n //This information applies to all polynucleotides currently made in Phoenix\n String assemblyMethod = \"MoClo (GoldenGate)\"; //Right now everythig in Phoenix requires MoClo RFC 94 - can be extended in future, but this is what it is right now\n String assemblyRFC = \"BBa_94\";\n String chassis = \"E. coli\"; //Also always the case for Phoenix right now\n String supplementalComments = \"\"; //Nothing for now, perhaps this can be searched upon plasmid re-enrty?\n \n //This information is specific to each Polynucleotide\n for (HashSet<org.cidarlab.raven.datastructures.Part> partSet : listTargetSets) {\n for (org.cidarlab.raven.datastructures.Part p : partSet) {\n \n ArrayList<String> neighborNames = new ArrayList<>();\n String pigeonCode = \"\";\n \n //This assumes part name and rootNode name are the same - I think this is true, but there might be a bug here\n for (RGraph aG : assemblyObj.getAssemblyGraphs()) {\n if (aG.getRootNode().getName().equalsIgnoreCase(p.getName())) {\n \n //Unclear if we want to use this information... The PrimitiveModules already have feature and direction, but these lists place the scars between those features\n ArrayList<String> composition = aG.getRootNode().getComposition();\n ArrayList<String> direction = aG.getRootNode().getDirection();\n ArrayList<String> linkers = aG.getRootNode().getLinkers();\n ArrayList<String> scars = aG.getRootNode().getScars();\n ArrayList<String> type = aG.getRootNode().getType();\n \n //Neighbor names - Assembly components should be the neighbors of the root node - the parts put together in the last cloning reaction for this polynucleotide\n ArrayList<RNode> neighbors = aG.getRootNode().getNeighbors();\n for (RNode n : neighbors) {\n neighborNames.add(n.getName());\n }\n \n //Pigeon code\n if (assemblyObj.getPigeonTextFiles().containsKey(p.getName())) {\n pigeonCode = assemblyObj.getPigeonTextFiles().get(p.getName());\n }\n }\n }\n }\n }\n \n File assemblyInstructions = assemblyObj.getInstructionsFile();\n \n /*\n THESE ARE THE METHODS FOR MAKING THE RAVEN-PIGEON IMAGES\n */\n// WeyekinPoster.setDotText(RGraph.mergeWeyekinFiles(assemblyObj.getPigeonTextFiles()));\n// WeyekinPoster.postMyVision();\n \n conn.closeConnection();\n return assemblyInstructions;\n }", "private Output() {}", "@Converted(kind = Converted.Kind.MANUAL_COMPILATION,\n source = \"${LLVM_SRC}/llvm/tools/clang/lib/Frontend/FrontendActions.cpp\", line = 186,\n old_source = \"${LLVM_SRC}/llvm/tools/clang/lib/Frontend/FrontendActions.cpp\", old_line = 181,\n FQN=\"collectModuleHeaderIncludes\", NM=\"_ZL27collectModuleHeaderIncludesRKN5clang11LangOptionsERNS_11FileManagerERNS_9ModuleMapEPNS_6ModuleERN4llvm15SmallVectorImplIcEE\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.clang.frontend/llvmToClangType ${LLVM_SRC}/llvm/tools/clang/lib/Frontend/FrontendActions.cpp -nm=_ZL27collectModuleHeaderIncludesRKN5clang11LangOptionsERNS_11FileManagerERNS_9ModuleMapEPNS_6ModuleERN4llvm15SmallVectorImplIcEE\")\n//</editor-fold>\npublic static std.error_code collectModuleHeaderIncludes(/*const*/ LangOptions /*&*/ LangOpts, FileManager /*&*/ FileMgr, \n ModuleMap /*&*/ ModMap, Module /*P*/ _Module, \n SmallString/*&*/ Includes) {\n // Don't collect any headers for unavailable modules.\n if (!_Module.isAvailable()) {\n return new std.error_code();\n }\n \n // Add includes for each of these headers.\n for (HeaderKind HK : new /*const*/ HeaderKind [/*2*/] {Module.HeaderKind.HK_Normal, Module.HeaderKind.HK_Private}) {\n for (Module.Header /*&*/ H : _Module.Headers[HK.getValue()]) {\n _Module.addTopHeader(H.Entry);\n // Use the path as specified in the module map file. We'll look for this\n // file relative to the module build directory (the directory containing\n // the module map file) so this will find the same file that we found\n // while parsing the module map.\n addHeaderInclude(new StringRef(H.NameAsWritten), Includes, LangOpts, _Module.IsExternC);\n }\n }\n {\n Module.Header UmbrellaHeader = null;\n try {\n // Note that Module->PrivateHeaders will not be a TopHeader.\n UmbrellaHeader = _Module.getUmbrellaHeader();\n if (UmbrellaHeader.$bool()) {\n _Module.addTopHeader(UmbrellaHeader.Entry);\n if ((_Module.Parent != null)) {\n // Include the umbrella header for submodules.\n addHeaderInclude(new StringRef(UmbrellaHeader.NameAsWritten), Includes, LangOpts, \n _Module.IsExternC);\n }\n } else {\n Module.DirectoryName UmbrellaDir = null;\n try {\n UmbrellaDir = _Module.getUmbrellaDir();\n if (UmbrellaDir.$bool()) {\n JavaCleaner $c$ = $createJavaCleaner();\n try {\n // Add all of the headers we find in this subdirectory.\n std.error_code EC/*J*/= new std.error_code();\n SmallString/*128*/ DirNative/*J*/= new SmallString/*128*/(128);\n path.__native(new Twine(UmbrellaDir.Entry.getName()), DirNative);\n \n FileSystem /*&*/ FS = $c$.clean($c$.track(FileMgr.getVirtualFileSystem()).$star());\n for (recursive_directory_iterator Dir/*J*/= new recursive_directory_iterator(FS, new Twine(DirNative), EC), End/*J*/= new recursive_directory_iterator();\n Dir.$noteq(End) && !EC.$bool(); Dir.increment(EC)) {\n // Check whether this entry has an extension typically associated with \n // headers.\n if (!new StringSwitchBool(path.extension(Dir.$arrow().getName())).\n Cases(/*KEEP_STR*/\".h\", /*KEEP_STR*/\".H\", /*KEEP_STR*/\".hh\", /*KEEP_STR*/\".hpp\", true).\n Default(false)) {\n continue;\n }\n \n /*const*/ FileEntry /*P*/ Header = FileMgr.getFile(Dir.$arrow().getName());\n // FIXME: This shouldn't happen unless there is a file system race. Is\n // that worth diagnosing?\n if (!(Header != null)) {\n continue;\n }\n \n // If this header is marked 'unavailable' in this module, don't include \n // it.\n if (ModMap.isHeaderUnavailableInModule(Header, _Module)) {\n continue;\n }\n \n // Compute the relative path from the directory to this file.\n SmallVector<StringRef> Components/*J*/= new SmallVector<StringRef>(16, new StringRef());\n path.reverse_iterator PathIt = path.rbegin(Dir.$arrow().getName());\n for (int I = 0; I != Dir.level() + 1; ++I , PathIt.$preInc()) {\n Components.push_back(PathIt.$star());\n }\n SmallString/*128*/ RelativeHeader/*J*/= new SmallString/*128*/(new StringRef(UmbrellaDir.NameAsWritten), 128);\n for (std.reverse_iterator<StringRef /*P*/ > It = Components.rbegin(), _End = Components.rend(); $noteq_reverse_iterator$C(It, _End);\n It.$preInc()) {\n path.append(RelativeHeader, new Twine(It.$star()));\n }\n \n // Include this header as part of the umbrella directory.\n _Module.addTopHeader(Header);\n addHeaderInclude(RelativeHeader.$StringRef(), Includes, LangOpts, _Module.IsExternC);\n }\n if (EC.$bool()) {\n return EC;\n }\n } finally {\n $c$.$destroy();\n }\n }\n } finally {\n if (UmbrellaDir != null) { UmbrellaDir.$destroy(); }\n }\n }\n } finally {\n if (UmbrellaHeader != null) { UmbrellaHeader.$destroy(); }\n }\n }\n \n // Recurse into submodules.\n for (std.vector.iterator<Module /*P*/ > Sub = _Module.submodule_begin(), \n SubEnd = _Module.submodule_end();\n $noteq___normal_iterator$C(Sub, SubEnd); Sub.$preInc()) {\n {\n std.error_code Err = collectModuleHeaderIncludes(LangOpts, FileMgr, ModMap, Sub.$star(), Includes);\n if (Err.$bool()) {\n return Err;\n }\n }\n }\n \n return new std.error_code();\n}", "@Override\n public String visit(ModuleDeclaration n, Object arg) {\n return null;\n }", "public static void main(String []args) {\n ConstantNode ten = new ConstantNode(10);\n ExprNode tree = ten.into(20).plus(30);\n// ExprNode exprNode = new AddOperator(\n// new MultiplyOperator(\n// new ConstantNode(10),\n// new ConstantNode(20)),\n// new ConstantNode(30));\n tree.genCode();\n }", "public void printModules()\n {\n System.out.println(\"Course: \" + codeNo + \" \" + title);\n \n System.out.println(\"Module 1: \" + moduleProgramming.moduleTitle);\n System.out.println(\"Module 2: \" + moduleWeb.moduleTitle);\n System.out.println(\"Module 3: \" + moduleDigitalTech.moduleTitle);\n System.out.println(\"Module 4: \" + moduleCompArchitecture.moduleTitle);\n }", "public String toCodeString() {\n return String.format(\"%s = %s;\\n\", this.identifier.toString(), this.exp.toCodeString());\n }", "public String toYield() {\n\t\tif (label == null && numChildren <= 0)\n\t\t\treturn \"\";\n\t\tif (isEmptyString)\n\t\t\treturn \"\";\n\t\tif (numChildren == 0)\n\t\t\treturn label.toString();\n\t\tStringBuffer ret = new StringBuffer();\n\t\tif (numChildren > 0) {\n\t\t\tfor (int i = 0; i < numChildren; i++) {\n\t\t\t\tret.append(children[i].toYield());\n\t\t\t\tif (i < (numChildren-1) && !children[i].isEmptyString)\n\t\t\t\t\tret.append(\" \");\n\t\t\t}\n\t\t}\n\t\t//\telse\n\t\t//\t ret.append(\":\"+label.hashCode());\n\t\treturn ret.toString();\n\t}", "@Converted(kind = Converted.Kind.MANUAL_SEMANTIC,\n source = \"${LLVM_SRC}/llvm/tools/clang/lib/Frontend/SerializedDiagnosticPrinter.cpp\", line = 324,\n old_source = \"${LLVM_SRC}/llvm/tools/clang/lib/Frontend/SerializedDiagnosticPrinter.cpp\", old_line = 323,\n FQN=\"EmitBlockID\", NM=\"_ZL11EmitBlockIDjPKcRN4llvm15BitstreamWriterERNS1_15SmallVectorImplIyEE\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.clang.frontend/llvmToClangType ${LLVM_SRC}/llvm/tools/clang/lib/Frontend/SerializedDiagnosticPrinter.cpp -nm=_ZL11EmitBlockIDjPKcRN4llvm15BitstreamWriterERNS1_15SmallVectorImplIyEE\")\n//</editor-fold>\npublic static void EmitBlockID(/*uint*/int ID, /*const*/char$ptr/*char P*/ Name, \n BitstreamWriter /*&*/ Stream, \n SmallVectorImplULong /*&*/ Record) {\n Record.clear();\n Record.push_back($uint2ullong(ID));\n Stream.EmitRecord(BlockInfoCodes.BLOCKINFO_CODE_SETBID.getValue(), Record);\n \n // Emit the block name if present.\n if (!(Name != null) || Name.$at(0) == 0) {\n return;\n }\n \n Record.clear();\n Name = Native.$tryClone(Name);\n while ((Name.$star() != 0)) {\n Record.push_back($char2ullong(Name.$postInc().$star()));\n }\n \n Stream.EmitRecord(BlockInfoCodes.BLOCKINFO_CODE_BLOCKNAME.getValue(), Record);\n}", "public static SimpleModule getModule() {\n SimpleModule module = new SimpleModule();\n module.addSerializer(HttpHeaders.class, new HttpHeadersSerializer());\n return module;\n }", "public String out() {\n if (this.implicitMain) {\n this.parse(\"main\");\n }\n Object main = parsedBlocks.get(\"main\");\n if (main == null) {\n throw new IllegalStateException(\"'main' block not parsed\");\n }\n return (main.toString());\n }", "ModuleRule createModuleRule();", "public interface IParser {\n\n /**\n * Coco/R generated function. It is used to inform parser about semantic errors.\n */\n void SemErr(String str);\n\n /**\n * Coco/R generated function for parsing input. The signature was changes in parsers' frame files so that it\n * receives source argument.\n *\n * @param source source to be parsed\n */\n void Parse(Source source);\n\n /**\n * Resets the parser but not the {@link NodeFactory} instance it holds. This way it can be used multiple times with\n * storing current state (mainly identifiers table). This is useful for parsing unit files before parsing the actual\n * source.\n */\n void reset();\n\n /**\n * Returns whether there were any errors throughout the parsing of the last source.\n */\n boolean hadErrors();\n\n /**\n * Sets support for extended goto. If this option is turned on, the parser will generate {@link cz.cuni.mff.d3s.trupple.language.nodes.statement.ExtendedBlockNode}s\n * instead of {@link cz.cuni.mff.d3s.trupple.language.nodes.statement.BlockNode}s.\n */\n void setExtendedGoto(boolean extendedGoto);\n\n /**\n * Returns true if the support for Turbo Pascal extensions is turned on.\n */\n boolean isUsingTPExtension();\n\n /**\n * Reutnrs the root node of the last parsed source.\n */\n RootNode getRootNode();\n\n}", "Output createOutput();" ]
[ "0.5876741", "0.5491563", "0.53905845", "0.5385771", "0.5374244", "0.5367755", "0.5352901", "0.5336392", "0.5324863", "0.5303741", "0.5265849", "0.5261239", "0.52549976", "0.52339953", "0.52327883", "0.5198612", "0.51882714", "0.51463383", "0.5146307", "0.51113707", "0.5000802", "0.49957517", "0.4970819", "0.4966942", "0.49614128", "0.49545506", "0.49480793", "0.49414334", "0.4927721", "0.49226746", "0.4920778", "0.49193916", "0.4906735", "0.488911", "0.48787406", "0.48674262", "0.48560724", "0.48470867", "0.4838218", "0.48278144", "0.4827659", "0.48159555", "0.48098007", "0.48085707", "0.4805166", "0.4801653", "0.47986937", "0.47936302", "0.4766581", "0.4766577", "0.47577977", "0.47548783", "0.47529665", "0.47430217", "0.47425887", "0.47320676", "0.47203368", "0.4714865", "0.47094813", "0.4709132", "0.47072548", "0.4707013", "0.47019246", "0.46979946", "0.46924576", "0.46820426", "0.46753934", "0.46727887", "0.46681237", "0.46652687", "0.46592104", "0.4655833", "0.46452153", "0.46418354", "0.46363124", "0.46341345", "0.463043", "0.46286136", "0.46124193", "0.46113613", "0.4608602", "0.46019876", "0.4600644", "0.45815498", "0.45699707", "0.45699072", "0.45584175", "0.45551583", "0.45474106", "0.45438296", "0.45407638", "0.45395887", "0.45381138", "0.45367023", "0.4535683", "0.4525583", "0.45233187", "0.45188546", "0.4514106", "0.45134172" ]
0.5509059
1
Create the item with a quantity
public ItemQuantity(Item item, int quantity) { this.item = item; this.quantity = quantity; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Quantity createQuantity();", "void createItem (String name, String description, double price);", "@Override\r\n public void ItemQuantity(int quantity) {\n this.quantity = quantity;\r\n }", "@Override\n\tpublic Item create() {\n\t\tLOGGER.info(\"Shoe Name\");\n\t\tString item_name = util.getString();\n\t\tLOGGER.info(\"Shoe Size\");\n\t\tdouble size = util.getDouble();\n\t\tLOGGER.info(\"Set Price\");\n\t\tdouble price = util.getDouble();\n\t\tLOGGER.info(\"Number in Stock\");\n\t\tlong stock = util.getLong();\n\t\tItem newItem = itemDAO.create(new Item(item_name, size, price, stock));\n\t\tLOGGER.info(\"\\n\");\n\t\treturn newItem;\n\t}", "public InventoryItem(){\r\n this.itemName = \"TBD\";\r\n this.sku = 0;\r\n this.price = 0.0;\r\n this.quantity = 0;\r\n nItems++;\r\n }", "public void setQuantity(int quantity) {\n this.quantity = quantity;\n }", "public void setQuantity(int quantity) {\n this.quantity = quantity;\n }", "public void createOrderItem() {\r\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tRestaurantApp.globalMenuManager.printMenu(); //create a globalmenuManager so that other classes can access the menu\r\n\t\ttry {\r\n\t\t\tSystem.out.println(\"Which item would you like to order?\");\r\n\t\t\tint menuIndex = sc.nextInt();\r\n\t\t\tsc.nextLine();\r\n\t\t\tif (menuIndex <= 0 || menuIndex > RestaurantApp.globalMenuManager.getSizeOfMenu()){\r\n\t\t\t\tthrow new ArrayIndexOutOfBoundsException(\"Please input a valid index from 1 to \"+RestaurantApp.globalMenuManager.getSizeOfMenu());\r\n\t\t\t}\r\n\t\t\tthis.menuItem = RestaurantApp.globalMenuManager.getMenuItem(menuIndex-1);\r\n\t\t\tSystem.out.println(\"How many of this are you ordering?\");\r\n\t\t\tthis.quantity = sc.nextInt();\r\n\t\t\tsc.nextLine();\r\n\t\t\tSystem.out.println(\"Order item added. printing details...\");\r\n\t\t\tthis.printOrderItem();\r\n\t\t} catch (ArrayIndexOutOfBoundsException e) {\r\n\t\t\tSystem.out.println(e.getMessage()); \r\n\t\t\tSystem.out.println(\"program exiting ...\");\r\n\t\t\tSystem.exit(0);\r\n\t\t}\r\n\t}", "public void setQuantity(int quantity) {\r\n this.quantity = quantity;\r\n }", "public void setQuantity(int value) {\n this.quantity = value;\n }", "public void setQuantity(int value) {\n this.quantity = value;\n }", "public void setQuantity(int value) {\n this.quantity = value;\n }", "public void setQuantity(Integer quantity) {\n this.quantity = quantity;\n }", "Items(int quantidade,Produto produto){\n\t\tqntd = quantidade;\n\t\tthis.produto = produto;\n\t\t\n\t}", "public void setQuantity(String quantity) {\n this.quantity = quantity;\n }", "public void setQuantity(int quantity)\n\t{\n\t\tthis.quantity = quantity;\n\t}", "public void setQuantity(Integer quantity) {\n this.quantity = quantity;\n }", "public void setQuantity(Integer quantity) {\n this.quantity = quantity;\n }", "public StockItem(T product, Integer quantity) {\n this.product = product;\n this.quantity = quantity;\n }", "public void setQuantity(Integer quantity) {\r\n this.quantity = quantity;\r\n }", "public void insertItemDetails(String itemName, Integer quantityOfItem, Double rateOfItem);", "public abstract Quantity<Q> create(Number value, Unit<Q> unit);", "public void setQuantity(int quantity) {\r\n\t\tthis.quantity = quantity;\r\n\t}", "public OrderItem(MenuItem item, int qty){\r\n\t\tthis.menuItem = item;\r\n\t\tthis.quantity = qty;\r\n\t}", "public void setQuantity(int qty) {\r\n\t\tthis.quantity = qty;\r\n\t}", "public void setQuantity(int quantity) {\n\t\tthis.quantity = quantity;\n\t}", "public void createItemInInventory(Item newItem) {\n\t\tinventory.createItem(newItem);\n\t}", "public void addItem(Product p, int qty){\n //store info as an InventoryItem and add to items array\n this.items.add(new InventoryItem(p, qty));\n }", "Items(double cost){\n\tthis.cost=cost;\n\titemId++;\n\tcurrentID=itemId;\n}", "@Override\n public Item createItem(int itemNum, Item item) throws VendingMachinePersistenceException {\n loadItemFile();\n Item newItem = itemMap.put(itemNum, item);\n writeItemFile();\n return newItem;\n }", "org.hl7.fhir.Quantity addNewValueQuantity();", "public InventoryItem(String name, int quantity) {\n\t\tthis.name = name;\n\t\tthis.quantity = quantity;\n\t}", "public void addToSale(ItemDTO item, int quantity){\n this.saleInfo.addItem(item, quantity);\n }", "public TransactionItem addTransactionItem(int transactionId, int productId, int quantity)\n\t{\n\t\tConnect con=Connect.getConnection();\n\t\tcon.executeQuery(\"USE sudutmeong\");\n\t\tTransactionItem x=new TransactionItem();\n\t\tx.setTransactionId(transactionId);\n\t\tx.setProductId(productId);\n\t\tx.setQuantity(quantity);\n\t\tString query = \"INSERT INTO transactionitem VALUES (\"+transactionId+\",\" + productId + \",\"+ quantity +\")\";\n\t\tcon.executeUpdate(query);\n\t\treturn x;\n\t}", "@NonNull\n public BasketItemBuilder incrementQuantity() {\n this.quantity++;\n return this;\n }", "public org.hl7.fhir.Integer addNewQuantity()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.hl7.fhir.Integer target = null;\n target = (org.hl7.fhir.Integer)get_store().add_element_user(QUANTITY$10);\n return target;\n }\n }", "ShipmentItem createShipmentItem();", "public OrderItem(int id, int quantity) {\n\t\tthis.id = id;\n\t\tthis.quantity = quantity;\n\t}", "public void addItem() {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tSystem.out.print(\"Enter Item Name: \");\n\t\tString itemName = scanner.nextLine();\n\t\tSystem.out.print(\"Enter Item Description: \");\n\t\tString itemDescription = scanner.nextLine();\n\t\tSystem.out.print(\"Enter minimum bid price for item: $\");\n\t\tdouble basePrice = scanner.nextDouble();\n\t\tLocalDate createDate = LocalDate.now();\n\t\tItem item = new Item(itemName, itemDescription, basePrice, createDate);\n\t\taddItem(item);\n\t}", "public InventoryItem(String itemName, int sku, double price,int quantity) {\r\n this.itemName = itemName;\r\n this.sku = sku;\r\n this.setPrice(price);\r\n this.setQuantity(quantity);\r\n nItems++;\r\n }", "@Override\r\n public int getItemQuantity() {\n return this.quantity;\r\n }", "protected abstract void makeItem();", "public void addFuel(int quantity) throws Exception;", "Items(int quantidade,String nome,double preco){\n\t\tthis.qntd=quantidade;\n\t\tthis.produto = new Produto(nome,preco);\n\t}", "public void addItemQty(int itemQty) {\n this.itemQty += itemQty;\n }", "QuoteItem createQuoteItem();", "public LineItem(Product product, int quantity) {\n this.product = product;\n this.quantity = quantity;\n }", "public void setQty(int qty) {\n this.qty = qty;\n }", "public CustomerCartItem(Long itemId, int quantity) {\n this.id = itemId;\n this.quantity = quantity;\n }", "void populateItemQuantity() {\n for (int i = 0; i < 10; i++) {\n String number = String.valueOf(i + 1);\n comboQuantity.getItems().add(i, number);\n }\n comboQuantity.setEditable(true);\n comboQuantity.getSelectionModel().selectFirst();\n }", "public Item createNew(int count) {\r\n Item i = new Item(name, id);\r\n i.setPickedUp(true);\r\n i.setCount(count);\r\n return i;\r\n }", "public void setQuantity(Long quantity) {\n this.quantity = quantity;\n }", "public void setQuantity(Long quantity) {\r\n this.quantity = quantity;\r\n }", "public void addQuantity(int quantity) {\n\t\tif (quantity < 0) {\n\t\t\tthrow new IllegalArgumentException(\"null barcode\");\n\t\t}\n\t\ttotalNumOfItems += quantity;\n\t}", "public Item(String itemName, double itemPrice, int numPurchased)\n {\n \tname = itemName;\n \tprice = itemPrice;\n \tquantity = numPurchased;\n }", "public void addItemToSale(String productId, int quantity) {\r\n if (productId.isEmpty()) {\r\n System.out.println(\"Class CashRegister, method addItemToSale\");\r\n System.out.println(\"product id is missing - enter valid product id\");\r\n System.exit(1);\r\n }\r\n if (quantity <= 0) {\r\n System.out.println(\"Class CashRegister, method addItemToSale\");\r\n System.out.println(\"quantity is less than or equal to 0 - enter valid quantity\");\r\n System.exit(1);\r\n }\r\n FakeDatabase db = new FakeDatabase();\r\n Product product = db.findProduct(productId);\r\n\r\n if (product != null) { //product found in database\r\n receipt.addLineItem(product, quantity);\r\n } else {\r\n System.out.println(\"Class CashRegister, method addItemToSale\");\r\n System.out.println(\"product id not found in database - enter valid product id\");\r\n System.exit(1);\r\n }\r\n }", "@Override\n public void onClick(View view) {\n int tempQty = Integer.parseInt(itemQty.getText().toString());\n tempQty = tempQty + 1;\n itemQty.setText(String.valueOf(tempQty));\n\n //get quantity\n int fillQuantity = Integer.parseInt(itemQty.getText().toString());\n //Create SaleItem\n SaleItem tempSaleItem = new SaleItem(fillName, fillQuantity, fillPrice, fillIngArr);\n //Update SaleItems Array\n saleItems.set(position, tempSaleItem);\n updateTotal();\n }", "public void doCreateItem() {\r\n\t\tlogger.info(\"Se procede a crear el book \" + newItem.getDescription());\r\n\t\tBook entity = newItem.getEntity();\r\n\t\tentity.setUser(Global.activeUser());\r\n\t\tentity.setBookBalance(BigDecimal.ZERO);\r\n\t\tentity.setTotalBudget(BigDecimal.ZERO);\r\n\t\tentity.setTotalIncome(BigDecimal.ZERO);\r\n\t\tentity.setTotalExpenses(BigDecimal.ZERO);\r\n\t\tentity = bookService.create(entity);\r\n\r\n\t\t// Actualizar el mapa de books\r\n\t\tGlobalBook.instance().put(new BookData(entity));\r\n\r\n\t\tlogger.info(\"Se ha creado el book \" + newItem.getDescription());\r\n\t\tnewItem = new BookData(new Book());\r\n\t\tFacesContext.getCurrentInstance().addMessage(null,\r\n\t\t\t\tnew FacesMessage(FacesMessage.SEVERITY_INFO, \"Libro creado\", \"Libro creado correctamente\"));\r\n\t}", "public void addItem() {\r\n\t\tFacesContext fc = FacesContext.getCurrentInstance();\r\n\t\tif (itemInvoice.getQuantidade() <= itemPO.getQuantidadeSaldo()) {\r\n\t\t\tBigDecimal total = itemInvoice.getPrecoUnit().multiply(\r\n\t\t\t\t\tnew BigDecimal(itemInvoice.getQuantidade()));\r\n\t\t\titemInvoice.setTotal(total);\r\n\t\t\tif (!editarItem) {\r\n\r\n\t\t\t\tif (itemInvoice.getPrecoUnit() == null) {\r\n\t\t\t\t\titemInvoice.setPrecoUnit(new BigDecimal(0.0));\r\n\t\t\t\t}\r\n\t\t\t\tif (itemInvoice.getQuantidade() == null) {\r\n\t\t\t\t\titemInvoice.setQuantidade(0);\r\n\t\t\t\t}\r\n\t\t\t\titemInvoice.setInvoice(invoice);\r\n\r\n\t\t\t\tinvoice.getItensInvoice().add(itemInvoice);\r\n\r\n\t\t\t} else {\r\n\t\t\t\tinvoice.getItensInvoice().set(\r\n\t\t\t\t\t\tinvoice.getItensInvoice().indexOf(itemInvoice),\r\n\t\t\t\t\t\titemInvoice);\r\n\t\t\t}\r\n\t\t\tcarregarTotais();\r\n\t\t\tinicializarItemInvoice();\r\n\t\t\trequired = false;\r\n\t\t} else {\r\n\r\n\t\t\tMessages.adicionaMensagemDeInfo(TemplateMessageHelper.getMessage(\r\n\t\t\t\t\tMensagensSistema.INVOICE, \"lblQtdMaioSaldo\", fc\r\n\t\t\t\t\t\t\t.getViewRoot().getLocale()));\r\n\t\t}\r\n\t}", "@Test\n void testAdding100Items() {\n Inventory inventory = new Inventory();\n int itemsToAdd = 100;\n\n assertEquals(0, inventory.getItems(\"\").size());\n\n for (int i = 0; i < itemsToAdd; i++) {\n inventory.addItem(\"XXXXXXXX\" + String.format(\"%02d\", i), \"Name\", 20.00, i);\n }\n\n assertEquals(100, inventory.getItems(\"\").size());\n }", "public void setItemsQuantity(Integer itemsQuantity) {\r\n this.itemsQuantity = itemsQuantity;\r\n }", "private static void addItem( String name, Integer number ) {\n\t\tItem item = container.addItem( itemId );\n\t\tsetValues( name, number, item );\n\t}", "public int addItem(Item i);", "Cart addToCart(String productCode, Long quantity, String userId);", "Item(String name, String description, String userRequirements, int amount, Condition condition, boolean reservable, int locationID) {\n this.name = name;\n this.description = description;\n this.userRequirements = userRequirements;\n this.ID = nextID;\n nextID++;\n this.amount = amount;\n this.condition = condition;\n this.reservable = reservable;\n this.locationID = locationID;\n }", "@Override\n public void onClick(View view) {\n int tempQty = Integer.parseInt(itemQty.getText().toString());\n if(tempQty > 0)\n {\n tempQty = tempQty - 1;\n itemQty.setText(String.valueOf(tempQty));\n }\n //get quantity\n int fillQuantity = Integer.parseInt(itemQty.getText().toString());\n //Create SaleItem\n SaleItem tempSaleItem = new SaleItem(fillName, fillQuantity, fillPrice, fillIngArr);\n //Update SaleItems Array\n saleItems.set(position, tempSaleItem);\n updateTotal();\n }", "public FinalMysteryItem() {\n int randomIndex = new Random().nextInt(7);\n item = new Item(listOfPossibleNames[randomIndex], PRICE_TO_BUY);\n }", "private Item initItem() {\n String name = inputName.getText().toString();\n int quantityToBuy = -1;\n if (!inputQuantityToBuy.getText().toString().equals(\"\"))\n quantityToBuy = Integer.parseInt(inputQuantityToBuy.getText().toString());\n String units = inputUnits.getText().toString();\n double price = 0;\n if (!inputPrice.getText().toString().equals(\"\"))\n price = Double.parseDouble(inputPrice.getText().toString());\n int calories = 0;\n if (!inputCalories.getText().toString().equals(\"\"))\n calories = Integer.parseInt(inputCalories.getText().toString());\n ArrayList<String> allergies = allergyActions.getAllergies();\n return new Item(name, 0, units, quantityToBuy, 0, allergies, calories, price);\n }", "public TotalDTO registerItem(int itemId, int quantity){\n //if quantity is not set, set default value to 1\n if(quantity == 0)\n quantity = 1;\n \n boolean itemFound = inv.findItem(itemId);\n \n if(itemFound){\n registeredItem = inv.fetchItem(itemId);\n total = sale.currentRegisteredItemInfo(registeredItem, quantity);\n }\n \n return total;\n }", "Quantity getQuantity();", "public int getQuantity() {\r\n return quantity;\r\n }", "public void setQuantity(Float quantity) {\n this.quantity = quantity;\n }", "Item(int i, String n, String c, double p) {\n this.id = i;\n this.name = n;\n this.category = c;\n this.price = p;\n }", "public void update() {\n\t\tthis.quantity = item.getRequiredQuantity();\n\t}", "Item(String idIn, String nameIn, String retailIn, String qIn) {\r\n id = idIn;\r\n name = nameIn;\r\n retail = Double.parseDouble(retailIn);\r\n quantity = Integer.parseInt(qIn);\r\n /* Wartość zmiennej price zależąca od tego ile obecnie produktów jest w \r\n magazynie i jaki % zmiennej retail się wtedy przyjmuje */\r\n if (quantity > 400)\r\n price = retail * .5D;\r\n else if (quantity > 200)\r\n price = retail * .6D;\r\n else \r\n price = retail * .7D;\r\n /* Zaokrąglenie wartości price na dwa miejsca po przecinku (do najbliżej \r\n niższej liczby całkowitej */\r\n price = Math.floor( price * 100 + 0.5) / 100;\r\n }", "@Override\n public ID createItem(@NotNull String uid) {\n final long startNs = myStats != null ? System.nanoTime() : 0;\n final ID result = createItemImpl(uid);\n if (myStats != null) {\n myStats.incrementCounter(StatsCounters.itemsCreationDurationNs, System.nanoTime() - startNs);\n }\n return result;\n }", "public void setQuantity(float value) {\n this.quantity = value;\n }", "public Item createItem() {\n if(pickUpImplementation == null)\n {\n pickUpImplementation = new DefaultPickUp();\n }\n\n if(lookImplementation == null)\n {\n lookImplementation = new DefaultLook(R.string.default_look);\n }\n\n if(defaultItemInteraction == null)\n {\n throw new IllegalArgumentException(\"No default interaction specified!\");\n }\n\n\n return new Item(\n id,\n name,\n pickUpImplementation,\n lookImplementation,\n useImplementation,\n defaultItemInteraction\n );\n }", "@Test\n\tpublic void testAddItem() throws IOException{\n\t\tModel.addItem(item, amount + \"\");\n\t\tassertEquals(amount + \"\", Model.hash.get(item));\n\t\t\n\t}", "public void stock(int number) {\r\n quantity += number;\r\n }", "public void adicionarItem(Cerveja cerveja, Integer quantidade){\r\n\t\t\r\n\t\t// filtra o item adicionado\r\n\t\tOptional<ItemVenda> itemVendaOptional = buscarItemPorCerveja(cerveja);\r\n\t\t\r\n\t\tItemVenda itemVenda = null;\r\n\t\t\r\n\t\t// caso o item ja exista no carrinho de compras altere somente a quantidade\r\n\t\tif(itemVendaOptional.isPresent()){\r\n\t\t\titemVenda = itemVendaOptional.get();\r\n\t\t\t\r\n\t\t\t//altera a quantidade somando a quantidade atual + a nova quantidade informada \r\n\t\t\titemVenda.setQuantidade(itemVenda.getQuantidade() + quantidade);\r\n\t\t\t\r\n\t\t\t\r\n\t\t// \tadicione um novo item no carrinho\r\n\t\t}else{\r\n\t\t\titemVenda = new ItemVenda();\r\n\t\t\titemVenda.setCerveja(cerveja);\r\n\t\t\titemVenda.setQuantidade(quantidade);\r\n\t\t\titemVenda.setValorUnitario(cerveja.getValor());\r\n\t\t\t\r\n\t\t\t// possiciona o novo item criado na primeira posicao da lista\r\n\t\t\titens.add(0, itemVenda);\r\n\t\t\t\r\n\t\t}\r\n\t}", "public int getQuantity() {\r\n return quantity;\r\n }", "public int getQuantity() {\r\n return quantity;\r\n }", "public ItemStack generateItem(){\n\t\tItemStack item = new ItemStack(material);\n\t\tif(damage >= 0) item.setDurability(damage);\n\t\t\n\t\tif(itemName.isEmpty() && loreLine.isEmpty()) return item;\n\t\t\n\t\tItemMeta meta = item.getItemMeta();\n\t\tif(meta == null) return item;\n\t\t\n\t\tmeta.setDisplayName(itemName);\n\t\tmeta.setLore(Arrays.asList(loreLine));\n\t\titem.setItemMeta(meta);\n\t\t\n\t\treturn item;\n\t}", "public static void createItem(String inputCommand) {\r\n\t\tString[] value = inputCommand.split(\" \");\r\n\t\tif(value.length == 4 && \"create\".equalsIgnoreCase(value[0])) {\r\n\t\t\tInventory inventory = new Inventory();\r\n\t\t\tinventory.setItemName(value[1]);\r\n\t\t\tinventory.setItemCostPrice(Double.parseDouble(value[2]));\r\n\t\t\tinventory.setItemSellPrice(Double.parseDouble(value[3]));\r\n\t\t\tinventoryList.put(value[1], inventory);\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"Entered wrong input command\");\r\n\t\t}\r\n\t}", "public Item(Integer itemSlot) {\n this.itemSlot = itemSlot;\n }", "public Item createNew(int xpos, int ypos) {\r\n Item i = new Item(name, id);\r\n i.setPosition(xpos, ypos);\r\n return i;\r\n }", "public void addItem(Item newItem){\n // check for duplicate item ID\n for (Item item: items) {\n if (item.getItemID() == newItem.getItemID()) {\n item.setQuantity(item.getQuantity() + 1);\n return;\n }\n }\n newItem.setQuantity(1);\n this.items.add(newItem);\n }", "public void addItem(String name, String quantity)\n\t{\n\t\tingredients.add(new Ingredient(quantity, name));\n\t}", "public GroceryItemOrder(String name, int quantity, double pricePerUnit) {\n this.name = name;\n this.quantity = quantity;\n this.ppu = pricePerUnit;\n }", "public int getQuantity() {\n return quantity;\n }", "public int getQuantity() {\n return quantity;\n }", "public int getQuantity() {\n return quantity;\n }", "public int getQuantity() {\n return quantity;\n }", "public int getQuantity() {\n return quantity;\n }", "public int getQuantity() {\n return quantity;\n }", "public int getQuantity()\n {\n return quantity;\n }", "public Item(int id, String name, int quantity, double price, Supplier supplier){\r\n toolId = id;\r\n toolName = name;\r\n toolQuantity = quantity;\r\n toolPrice = price;\r\n toolSupplier = supplier;\r\n }", "Quantity initQuantity(Quantity iQuantity)\n {\n iQuantity.updateElementValue(\"Quantity\");\n return iQuantity;\n }", "int getQuantity();" ]
[ "0.78892535", "0.7436758", "0.7207074", "0.70960045", "0.7060662", "0.6978814", "0.6978814", "0.69748265", "0.6967905", "0.69084734", "0.69084734", "0.69084734", "0.68633974", "0.6855212", "0.68537956", "0.684045", "0.6820315", "0.6820315", "0.68108433", "0.6809594", "0.6791601", "0.6786793", "0.6778601", "0.6772711", "0.67650783", "0.67393416", "0.6726649", "0.67174065", "0.66955554", "0.6691892", "0.6674114", "0.66686296", "0.66616607", "0.6647939", "0.6610446", "0.6593743", "0.6578207", "0.6551489", "0.6550969", "0.6539429", "0.6514442", "0.65103245", "0.6497397", "0.64907515", "0.6488888", "0.64712274", "0.6457264", "0.6435204", "0.6433039", "0.6423726", "0.63916284", "0.6374809", "0.6358741", "0.6353832", "0.63222927", "0.6320793", "0.629683", "0.6281177", "0.62678355", "0.6258112", "0.62575936", "0.6248122", "0.62400275", "0.6238819", "0.62285197", "0.6221631", "0.6221017", "0.620772", "0.6201665", "0.6196646", "0.61843234", "0.61669236", "0.6165981", "0.615916", "0.6154761", "0.61500794", "0.61483413", "0.61443394", "0.6143657", "0.6136371", "0.6136341", "0.6133298", "0.61316526", "0.61206996", "0.6120649", "0.61197567", "0.6119064", "0.61169916", "0.611651", "0.6104515", "0.60985386", "0.60985386", "0.60985386", "0.60985386", "0.60985386", "0.60985386", "0.6095643", "0.6089622", "0.6081001", "0.60680115" ]
0.74239784
2
Get the quantity of the item
public int getQuantity() { return quantity; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Integer getQuantity();", "int getQuantity();", "public int getItemQty() {\n return itemQty;\n }", "long getQuantity();", "long getQuantity();", "public int getQuantity();", "public Integer getQuantity() {\r\n return this.quantity;\r\n }", "public int getQuantity() \n\t{\n\t\treturn quantity;\n\t}", "public Integer getQuantity() {\n return this.quantity;\n }", "public int getQuantity() {\r\n\t\treturn quantity;\r\n\t}", "public int getQuantity() {\r\n\t\treturn this.quantity;\r\n\t}", "public Integer getQuantity() {\n return this.quantity;\n }", "public Integer getQuantity() {\n return quantity;\n }", "public Integer getQuantity() {\n return quantity;\n }", "@Override\r\n public int getItemQuantity() {\n return this.quantity;\r\n }", "Quantity getQuantity();", "public int getQuantity() {\r\n return quantity;\r\n }", "public int getQuantity() {\n\t\treturn quantity;\n\t}", "public int getQuantity() {\n\t\treturn quantity;\n\t}", "public int getQuantity() {\n\t\treturn quantity;\n\t}", "public int getQuantity() {\n\t\treturn quantity;\n\t}", "public int getQuantity() {\n\t\treturn quantity;\n\t}", "public int getQuantity() {\r\n return quantity;\r\n }", "public long getQuantity() {\n return quantity_;\n }", "public long getQuantity() {\n return quantity_;\n }", "public long getQuantity() {\n return quantity_;\n }", "public long getQuantity() {\n return quantity_;\n }", "public int getQuantity() {\n return this.quantity;\n }", "public int getQuantity()\n {\n \treturn quantity;\n }", "public int getQuantity(){\n\t\treturn quantity;\n\t}", "public int getQuantity()\n {\n return quantity;\n }", "public int getQty() {\n return qty;\n }", "public int quantity(final T item) {\n if (items.containsKey(item)) {\n return items.get(item);\n } else {\n return 0;\n }\n }", "public Long getQuantity() {\r\n return quantity;\r\n }", "public String getQuantity() {\n return quantity;\n }", "public Long getQuantity() {\n return quantity;\n }", "public int getQuantity()\r\n {\r\n return _quantity;\r\n }", "public int getQuantity() {\r\n return quantity;\r\n }", "String getQuantity() {\n return Integer.toString(quantity);\n }", "public double getQuantity() {\n return quantity;\n }", "int getBuyQuantity();", "public Number getQuantity() {\n return (Number) getAttributeInternal(QUANTITY);\n }", "public float getQuantity() {\n return quantity;\n }", "int getSellQuantity();", "public java.math.BigDecimal getQuantity() {\n return quantity;\n }", "public java.math.BigDecimal getQuantity() {\r\n return quantity;\r\n }", "@Schema(description = \"Number of units consumed\")\n public Long getQuantity() {\n return quantity;\n }", "BigDecimal getQuantity();", "private int checkItemQuantity() {\n\n int desiredQuantity = initialQuantity;\n MenusItem tempItem = null;\n tempItem = ItemCart.getInstance().checkItem(menusItem);\n\n if(tempItem != null){\n desiredQuantity = tempItem.getDesiredQuantity();\n }\n\n\n return desiredQuantity;\n }", "public org.hl7.fhir.Integer getQuantity()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.hl7.fhir.Integer target = null;\n target = (org.hl7.fhir.Integer)get_store().find_element_user(QUANTITY$10, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "public int getQty() {\n return (isReturn ? qty * -1 : qty);\n }", "public int getTotalQuantity() {\n\t\treturn totalQuantity;\n\t}", "public Integer getpQuantity() {\n return pQuantity;\n }", "public Float getQuantity() {\n return quantity;\n }", "MeasureType getQuantity();", "protected Double getQuantity() {\n return quantity;\n }", "public int getQuantity() { \n return myOrderQuantity;\n }", "public int getpQuantity() {\n return pQuantity;\n }", "public int getQuantity(String code) {\n if(itemExists(code)) {\n return cart.get(code);\n }\n return 0;\n }", "public java.math.BigDecimal getQty() throws java.rmi.RemoteException;", "public int getQuantity(Product p){\n int count = 0;\n for (Product i : cartContents)\n {\n if (i.getProductID().equals(p.getProductID()))\n {\n count++;\n }\n }\n return count;\n }", "public int getCartQuantity() {\n return cartQuantity;\n }", "public int getQuantite() {\r\n return quantite;\r\n }", "public int getQuantity( String id )\n {\n DatabaseHelper helper = new DatabaseHelper(this);\n Cursor cursor = helper.getQuantity(id);\n int i = 0;\n\n while (cursor.moveToNext())\n {\n String j = cursor.getString(0);\n i = i + Integer.parseInt(j);\n }\n\n return i;\n }", "public int getQuantidade();", "public Integer getItemNo() {\n\t\treturn itemNo;\n\t}", "@Override\n\tpublic int getQuantidade() {\n\t\treturn hamburguer.getQuantidade();\n\t}", "public int getQuantidade() {\r\n\t\treturn quantidade;\r\n\t}", "public Number getSizeQty() {\n return (Number)getAttributeInternal(SIZEQTY);\n }", "@Override\r\n public void ItemQuantity(int quantity) {\n this.quantity = quantity;\r\n }", "@Override\n // This is not right, please do not use.\n public int getQuantity() {\n String a = null;\n a.isEmpty();\n\n return super.getQuantity();\n }", "public int numberProduct() {\n\t\tint number = 0;\n\t\tfor (ItemCart item : listItemcart) {\n\t\t\tnumber += item.getQuantity();\n\t\t}\n\t\treturn number;\n\t}", "public int getBeverageQty() {\n return beverageQty;\n }", "org.hl7.fhir.Quantity getValueQuantity();", "public Number getInseamQty() {\n return (Number)getAttributeInternal(INSEAMQTY);\n }", "public int getQuantidade() {\r\n return quantidade;\r\n }", "public int getQuantidade() {\r\n return quantidade;\r\n }", "BigDecimal getDisplayQuantity();", "@Override\n\tpublic int getNoofQuantity() {\n\t String sql=\"SELECT SUM(quantity) FROM supplier_product\";\n\t int total=this.getJdbcTemplate().queryForObject(sql, Integer.class);\n\t\treturn total;\n\t}", "public String getProductQuantity() throws InterruptedException\n\t{\n\t\tThread.sleep(2000);\n\t\twaitForVisibility(quantityInputFieldShoppingCart);\n\t\treturn quantityInputFieldShoppingCart.getAttribute(\"value\");\n\t}", "public CQ getProductServiceQuantity() { \r\n\t\tCQ retVal = this.getTypedField(12, 0);\r\n\t\treturn retVal;\r\n }", "public void setQuantity(int value) {\n this.quantity = value;\n }", "public void setQuantity(int value) {\n this.quantity = value;\n }", "public void setQuantity(int value) {\n this.quantity = value;\n }", "public int getProductQuantity(String product) {\n //\n try {\n return shoppingBasket.get(product);\n } catch (NullPointerException exception) {\n throw exception;\n }\n }", "@Override\n\tpublic java.lang.String getNeedQuantity() {\n\t\treturn _lineaGastoCategoria.getNeedQuantity();\n\t}", "public int getQuantidade() {\n return quantidade;\n }", "public Double getProductQty() {\n return productQty;\n }", "public String Quantity() {\n return OCCwrapJavaJNI.Units_Dimensions_Quantity(swigCPtr, this);\n }", "public int getQuantityRequired(){\n return quantityRequired1;\n }", "@Override\n public int summarizeQuantity() {\n int sum = 0;\n\n for ( AbstractItem element : this.getComponents() ) {\n sum += element.summarizeQuantity();\n }\n\n return sum;\n }", "@Override\n\tpublic int totalItem() {\n\t\treturn 0;\n\t}", "public int getAgentsQty();", "public void setQuantity(Integer quantity) {\n this.quantity = quantity;\n }", "public void setQuantity(int qty) {\r\n\t\tthis.quantity = qty;\r\n\t}" ]
[ "0.825829", "0.8219336", "0.8216912", "0.81601554", "0.81601554", "0.81390417", "0.81133884", "0.8109856", "0.80921173", "0.8081334", "0.80770123", "0.80500466", "0.80489683", "0.80489683", "0.8019073", "0.80162674", "0.80143", "0.80080307", "0.80080307", "0.80080307", "0.80080307", "0.80080307", "0.8000084", "0.79979485", "0.79979485", "0.79918", "0.79918", "0.7970881", "0.7968922", "0.7932279", "0.7856963", "0.7835328", "0.77985454", "0.77955663", "0.7779291", "0.7775741", "0.7761215", "0.77519786", "0.7741431", "0.76418734", "0.7612889", "0.7593547", "0.7579177", "0.75737524", "0.753907", "0.75141203", "0.7484383", "0.74568504", "0.74497753", "0.7442973", "0.74123204", "0.73916554", "0.7336513", "0.72849506", "0.7277398", "0.726157", "0.7260202", "0.72281563", "0.7167997", "0.71636486", "0.70189637", "0.69706905", "0.6937706", "0.691359", "0.68059397", "0.6790307", "0.6781875", "0.67793804", "0.67775035", "0.6772232", "0.6761097", "0.67583007", "0.6748637", "0.6732203", "0.6730558", "0.6722149", "0.6722149", "0.67086184", "0.6674346", "0.6652665", "0.66504806", "0.6650169", "0.6650169", "0.6650169", "0.6649675", "0.6635224", "0.663483", "0.6629625", "0.6615335", "0.66054595", "0.66037554", "0.6579561", "0.6573466", "0.6573231", "0.65655756" ]
0.79369605
34
boolean doubleCastSucces = false;
private boolean checkIfObjectIsDecimal(Object[] values) { for (Object o : values) { if (o != null) { try { Double.parseDouble(o.toString()); // return true; } catch (NumberFormatException e) { // it's text :) return false; } } } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean getIsBcast();", "public boolean realAsDouble() {\n return false;\n }", "public boolean isDouble();", "public boolean isOkToConvert()\n {\n return _okToConvert;\n }", "public boolean getCastling() {\n return this.castling;\n }", "@ZenCodeType.Caster\n @ZenCodeType.Method\n default boolean asBool() {\n \n return notSupportedCast(BasicTypeID.BOOL);\n }", "boolean hasDouble();", "public boolean isDouble() {\n return false;\n }", "public boolean isDouble() {\n return this.data instanceof Double;\n }", "@Test public void gh1206() {\n execute(new CreateDB(NAME, \"<x>a</x>\"));\n query(\"/* castable as xs:double\", false);\n }", "@Test\n public void booleanInvalidType() throws Exception {\n String retVal = new SynapseHelper().serializeToSynapseType(MOCK_TEMP_DIR, TEST_PROJECT_ID, TEST_RECORD_ID,\n TEST_FIELD_NAME, UploadFieldTypes.BOOLEAN, new TextNode(\"true\"));\n assertNull(retVal);\n }", "public Boolean asBoolean();", "@Test(timeout = 4000)\n public void test064() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"B$\");\n Hidden hidden0 = new Hidden(xmlEntityRef0, \"g&Bc\", \"?B9_wYh|0:BI[t\\\",\");\n Double double0 = new Double((-1495.44408));\n // Undeclared exception!\n try { \n hidden0.strike((Object) double0);\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "public abstract boolean isTypeCorrect();", "private boolean checkDecimalCast() {\n boolean allScalar = true;\n // If there is at least one float, then all the children need to be cast to\n // float (instead of decimal).\n boolean noFloats = true;\n boolean atLeastOneDecimal = false;\n for(int i = 0; i < children_.size(); ++i) {\n if (!children_.get(i).getType().isScalarType()) allScalar = false;\n // If at least one child is a float, then we want to cast all the children to float.\n if (children_.get(i).getType().isFloatingPointType()) noFloats = false;\n if (children_.get(i).getType().isDecimal()) atLeastOneDecimal = true;\n }\n\n return allScalar && noFloats && atLeastOneDecimal;\n }", "@Override\r\n\tpublic void cast() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void cast() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void cast() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void cast() {\n\r\n\t}", "@Override\r\n\tpublic boolean visit(CastExpression node) {\r\n\t\toperator(node,node.getClass().toString());\r\n\t\treturn true;\r\n\t}", "@ZenCodeType.Caster\n @ZenCodeType.Method\n default double asDouble() {\n \n return notSupportedCast(BasicTypeID.DOUBLE);\n }", "abstract public boolean getAsBoolean();", "public static void main(String[] args) {\n int a =0;\n System.out.println((a!=0)?\"true\":\"false\");\n Double d = null;\n System.out.println((d instanceof Double)?true:false);\n\n\n }", "boolean hasConversionAction();", "boolean hasConversionAction();", "public abstract boolean mo66251a(Result<T> result);", "protected boolean areResultSetRowsTransformedImmediately() {\n \t\treturn false;\n \t}", "public boolean isRequiresTaxCertificate() \n{\nObject oo = get_Value(COLUMNNAME_RequiresTaxCertificate);\nif (oo != null) \n{\n if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();\n return \"Y\".equals(oo);\n}\nreturn false;\n}", "@ReflectiveMethod(name = \"d\", types = {})\n public boolean d(){\n return (boolean) NMSWrapper.getInstance().exec(nmsObject);\n }", "abstract public boolean isTyped();", "public void setOkToConvert(boolean okToConvert)\n {\n _okToConvert = okToConvert;\n }", "public void testPositiveScalar() {\n Object value;\n\n /*\n * fixme Boolean converters not implemented value = LocaleConvertUtils.convert(\"true\", Boolean.TYPE); assertTrue(value instanceof Boolean);\n * assertEquals(((Boolean) value).booleanValue(), true);\n *\n * value = LocaleConvertUtils.convert(\"true\", Boolean.class); assertTrue(value instanceof Boolean); assertEquals(((Boolean) value).booleanValue(),\n * true);\n *\n * value = LocaleConvertUtils.convert(\"yes\", Boolean.TYPE); assertTrue(value instanceof Boolean); assertEquals(((Boolean) value).booleanValue(), true);\n *\n * value = LocaleConvertUtils.convert(\"yes\", Boolean.class); assertTrue(value instanceof Boolean); assertEquals(((Boolean) value).booleanValue(), true);\n *\n * value = LocaleConvertUtils.convert(\"y\", Boolean.TYPE); assertTrue(value instanceof Boolean); assertEquals(((Boolean) value).booleanValue(), true);\n *\n * value = LocaleConvertUtils.convert(\"y\", Boolean.class); assertTrue(value instanceof Boolean); assertEquals(((Boolean) value).booleanValue(), true);\n *\n * value = LocaleConvertUtils.convert(\"on\", Boolean.TYPE); assertTrue(value instanceof Boolean); assertEquals(((Boolean) value).booleanValue(), true);\n *\n * value = LocaleConvertUtils.convert(\"on\", Boolean.class); assertTrue(value instanceof Boolean); assertEquals(((Boolean) value).booleanValue(), true);\n *\n * value = LocaleConvertUtils.convert(\"false\", Boolean.TYPE); assertTrue(value instanceof Boolean); assertEquals(((Boolean) value).booleanValue(),\n * false);\n *\n * value = LocaleConvertUtils.convert(\"false\", Boolean.class); assertTrue(value instanceof Boolean); assertEquals(((Boolean) value).booleanValue(),\n * false);\n *\n * value = LocaleConvertUtils.convert(\"no\", Boolean.TYPE); assertTrue(value instanceof Boolean); assertEquals(((Boolean) value).booleanValue(), false);\n *\n * value = LocaleConvertUtils.convert(\"no\", Boolean.class); assertTrue(value instanceof Boolean); assertEquals(((Boolean) value).booleanValue(), false);\n *\n * value = LocaleConvertUtils.convert(\"n\", Boolean.TYPE); assertTrue(value instanceof Boolean); assertEquals(((Boolean) value).booleanValue(), false);\n *\n * value = LocaleConvertUtils.convert(\"n\", Boolean.class); assertTrue(value instanceof Boolean); assertEquals(((Boolean) value).booleanValue(), false);\n *\n * value = LocaleConvertUtils.convert(\"off\", Boolean.TYPE); assertTrue(value instanceof Boolean); assertEquals(((Boolean) value).booleanValue(), false);\n *\n * value = LocaleConvertUtils.convert(\"off\", Boolean.class); assertTrue(value instanceof Boolean); assertEquals(((Boolean) value).booleanValue(),\n * false);\n */\n\n value = LocaleConvertUtils.convert(\"123\", Byte.TYPE);\n assertTrue(value instanceof Byte);\n assertEquals(((Byte) value).byteValue(), (byte) 123);\n\n value = LocaleConvertUtils.convert(\"123\", Byte.class);\n assertTrue(value instanceof Byte);\n assertEquals(((Byte) value).byteValue(), (byte) 123);\n\n /*\n * fixme Character conversion not implemented yet value = LocaleConvertUtils.convert(\"a\", Character.TYPE); assertTrue(value instanceof Character);\n * assertEquals(((Character) value).charValue(), 'a');\n *\n * value = LocaleConvertUtils.convert(\"a\", Character.class); assertTrue(value instanceof Character); assertEquals(((Character) value).charValue(), 'a');\n */\n /*\n * fixme - this is a discrepancy with standard converters ( probably not major issue ) value = LocaleConvertUtils.convert(\"java.lang.String\",\n * Class.class); assertTrue(value instanceof Class); assertEquals(String.class, (Class) value);\n */\n\n value = LocaleConvertUtils.convert(\"123\" + decimalSeparator + \"456\", Double.TYPE);\n assertTrue(value instanceof Double);\n assertEquals(((Double) value).doubleValue(), 123.456, 0.005);\n\n value = LocaleConvertUtils.convert(\"123\" + decimalSeparator + \"456\", Double.class);\n assertTrue(value instanceof Double);\n assertEquals(((Double) value).doubleValue(), 123.456, 0.005);\n\n value = LocaleConvertUtils.convert(\"123\" + decimalSeparator + \"456\", Float.TYPE);\n assertTrue(value instanceof Float);\n assertEquals(((Float) value).floatValue(), (float) 123.456, (float) 0.005);\n\n value = LocaleConvertUtils.convert(\"123\" + decimalSeparator + \"456\", Float.class);\n assertTrue(value instanceof Float);\n assertEquals(((Float) value).floatValue(), (float) 123.456, (float) 0.005);\n\n value = LocaleConvertUtils.convert(\"123\", Integer.TYPE);\n assertTrue(value instanceof Integer);\n assertEquals(((Integer) value).intValue(), 123);\n\n value = LocaleConvertUtils.convert(\"123\", Integer.class);\n assertTrue(value instanceof Integer);\n assertEquals(((Integer) value).intValue(), 123);\n\n value = LocaleConvertUtils.convert(\"123\", Long.TYPE);\n assertTrue(value instanceof Long);\n assertEquals(((Long) value).longValue(), 123);\n\n value = LocaleConvertUtils.convert(\"123456\", Long.class);\n assertTrue(value instanceof Long);\n assertEquals(((Long) value).longValue(), 123456);\n\n /*\n * fixme - Short conversion not implemented at this point value = LocaleConvertUtils.convert(\"123\", Short.TYPE); assertTrue(value instanceof Short);\n * assertEquals(((Short) value).shortValue(), (short) 123);\n *\n * value = LocaleConvertUtils.convert(\"123\", Short.class); assertTrue(value instanceof Short); assertEquals(((Short) value).shortValue(), (short) 123);\n */\n\n String input;\n\n input = \"2002-03-17\";\n value = LocaleConvertUtils.convert(input, Date.class);\n assertTrue(value instanceof Date);\n assertEquals(input, value.toString());\n\n input = \"20:30:40\";\n value = LocaleConvertUtils.convert(input, Time.class);\n assertTrue(value instanceof Time);\n assertEquals(input, value.toString());\n\n input = \"2002-03-17 20:30:40.0\";\n value = LocaleConvertUtils.convert(input, Timestamp.class);\n assertTrue(value instanceof Timestamp);\n assertEquals(input, value.toString());\n\n }", "@Test(timeout = 4000)\n public void test049() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n JSONObject jSONObject1 = jSONObject0.put(\"MnMGL\", (Object) \"MnMGL\");\n jSONObject1.put(\"MnMGL\", 0.0);\n try { \n jSONObject1.getBoolean(\"MnMGL\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"MnMGL\\\"] is not a Boolean.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }", "@Test\n\tpublic void test_TCM__double_getDoubleValue() {\n\t\tAttribute attr = new Attribute(\"test\", \"11111111111111\");\n\t\ttry {\n\t\t\tassertTrue(\"incorrect double value\", attr.getDoubleValue() == 11111111111111d );\n\n\t\t\tattr.setValue(\"0\");\n\t\t\tassertTrue(\"incorrect double value\", attr.getDoubleValue() == 0 );\n\n\t\t\tattr.setValue(Double.toString(java.lang.Double.MAX_VALUE));\n\t\t\tassertTrue(\"incorrect double value\", attr.getDoubleValue() == java.lang.Double.MAX_VALUE);\n\n\t\t\tattr.setValue(Double.toString(java.lang.Double.MIN_VALUE));\n\t\t\tassertTrue(\"incorrect double value\", attr.getDoubleValue() == java.lang.Double.MIN_VALUE);\n\n\t\t} catch (DataConversionException e) {\n\t\t\tfail(\"couldn't convert boolean value\");\n\t\t}\n\n\t\ttry {\n\t\t\tattr.setValue(\"foo\");\n\t\t\tfail(\"incorrectly returned double from non double value\" + attr.getDoubleValue());\n\n\t\t} catch (DataConversionException e) {\n\t\t\t// Do nothing\n\t\t} catch (Exception e) {\n\t\t\tfail(\"Unexpected exception \" + e.getClass());\n\t\t}\n\n\t}", "private CheckBoolean() {\n\t}", "@Test\n public void testIsValidDouble() {\n System.out.println(\"isValidDouble\");\n String double_number = \"Mary\";\n boolean expResult = false;\n boolean result = ValidVariables.isValidDouble(double_number);\n assertEquals(expResult, result);\n }", "@Test\n public void test_cast() {\n \n\n }", "boolean mo44967d();", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n float float0 = (-327.5252F);\n Float float1 = new Float((-327.5252F));\n Float.min(0.0F, 0.0F);\n JSONObject jSONObject0 = new JSONObject(float1);\n String string0 = \"{}\";\n JSONObject jSONObject1 = jSONObject0.put(\"{}\", 518.9508);\n LinkedList<Integer> linkedList0 = new LinkedList<Integer>();\n JSONArray jSONArray0 = new JSONArray((Collection) linkedList0);\n jSONObject1.put(\"J,/Ph.9`e('Sb=@\", (Object) jSONArray0);\n try { \n jSONObject1.getBoolean(\"{}\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"{}\\\"] is not a Boolean.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }", "public boolean hasDoublePrecision() {\n return result.hasDoublePrecision();\n }", "public void resetCastling() {\n this.castling = false;\n }", "private static boolean checkIfIsDouble(String num) {\n try {\n Double.parseDouble(num);\n return true;\n } catch (NumberFormatException e) {\n return false;\n }\n }", "public boolean isDirect()\r\n/* 76: */ {\r\n/* 77:111 */ return false;\r\n/* 78: */ }", "@Test(expected=ClassCastException.class)\n public void testWrongValueOf() {\n assertSame(Configuration.Key.isDoubleToDoubleSupported,\n Configuration.Key.valueOf(\"isDoubleToDoubleSupported\", String.class));\n }", "public static void main(String[] args) {\n\n Integer num1 = 100;\n double num2 = num1;\n System.out.println(num2);\n\n float f = 0.5f;\n Float fl = f;\n System.out.println(fl);\n\n System.out.println(Byte.MAX_VALUE);\n\n // parse method --> converting String value to primitives, returne primitive\n // valueOf --> converting String to Wrapper class, return Wrapper class\n\n String str1 = \"123\";\n int result = Integer.parseInt(str1);\n System.out.println(result+1);\n\n String str2 = \"true\";\n boolean r1 = Boolean.parseBoolean(str2);\n System.out.println(r1);\n\n // parse method not case sencetive\n String str3 = \"FaLse\"; // it is work\n boolean r2 = Boolean.parseBoolean(str3);\n System.out.println(r2);\n\n String s1 = \"100.5\";\n Double c1 = Double.parseDouble(s1);\n System.out.println(c1 + 1); // it is call auto boxing\n Double c2 = Double.valueOf(s1); // this in not auto and not unboxing\n\n System.out.println(c1);\n System.out.println(c2);\n\n String s2 = \"TrUe\";\n Boolean b1 = Boolean.valueOf(s2);\n System.out.println(b1); // no sensetive\n\n Double [] arr = new Double[3];\n System.out.println(Arrays.toString(arr));\n // default value of wrapper class always --> null, null, null\n\n String name = \"string\";\n String name1 = new String(\"string\");\n\n Integer I1 = new Integer(\"123\");\n\n System.out.println(addNum(12,13));\n System.out.println(addNum(15.3,7.4));\n \n }", "boolean hasPlainTransferFrom();", "default boolean asBool() {\n\t\tthrow new EvaluatorException(\"Expecting a bool value\");\n\t}", "org.apache.xmlbeans.XmlBoolean xgetFractional();", "Boolean getCompletelyCorrect();", "boolean mo16692d(T t);", "boolean hasProduceResType();", "@Test\n\tpublic void test_TCM__boolean_getBooleanValue() {\n\t\tfinal Attribute attribute = new Attribute(\"test\", \"true\");\n\t\ttry {\n\t\t\tassertTrue(\"incorrect boolean true value\", attribute.getBooleanValue());\n\n attribute.setValue(\"false\");\n\t\t\tassertTrue(\"incorrect boolean false value\", !attribute.getBooleanValue());\n\n attribute.setValue(\"TRUE\");\n\t\t\tassertTrue(\"incorrect boolean TRUE value\", attribute.getBooleanValue());\n\n attribute.setValue(\"FALSE\");\n\t\t\tassertTrue(\"incorrect boolean FALSE value\", !attribute.getBooleanValue());\n\n attribute.setValue(\"On\");\n\t\t\tassertTrue(\"incorrect boolean TRUE value\", attribute.getBooleanValue());\n\n attribute.setValue(\"Yes\");\n\t\t\tassertTrue(\"incorrect boolean TRUE value\", attribute.getBooleanValue());\n\n attribute.setValue(\"1\");\n\t\t\tassertTrue(\"incorrect boolean TRUE value\", attribute.getBooleanValue());\n\n attribute.setValue(\"OfF\");\n\t\t\tassertTrue(\"incorrect boolean FALSE value\", !attribute.getBooleanValue());\n\n attribute.setValue(\"0\");\n\t\t\tassertTrue(\"incorrect boolean FALSE value\", !attribute.getBooleanValue());\n\n attribute.setValue(\"No\");\n\t\t\tassertTrue(\"incorrect boolean FALSE value\", !attribute.getBooleanValue());\n\n\t\t} catch (DataConversionException e) {\n\t\t\tfail(\"couldn't convert boolean value\");\n\t\t}\n\n\t\ttry {\n attribute.setValue(\"foo\");\n\t\t\tassertTrue(\"incorrectly returned boolean from non boolean value\", attribute.getBooleanValue());\n\n\t\t} catch (DataConversionException e) {\n\t\t\t// good\n\t\t} catch (Exception e) {\n\t\t\tfail(\"Expected DataConversionException, but got \" + e.getClass().getName());\n\t\t}\n\n\n\t}", "public boolean isDirect();", "private boolean isMzDoublePrecision()\r\n\t{\r\n\t\treturn this.mz_double_precision;\r\n\t}", "protected boolean dealWithMouseDoubleClick(org.eclipse.swt.events.MouseEvent e)\n {\n setUpMouseState(MOUSE_DOUBLE_CLICKED);\n return true;\n }", "@Override\r\n\tpublic void visit(CastExpression castExpression) {\n\r\n\t}", "private void ex04(){\n int number;\n number = 1;\n\n double number2;\n number2 = 1.5;\n\n String number3;\n number3 = \"3\";\n\n boolean bool = (number == 1);\n\n myWindow.clearOut();\n myWindow.writeOutLine(number);\n myWindow.writeOutLine(new String(String.valueOf(number))); //int to string\n myWindow.writeOutLine((double) number); //int to double\n myWindow.writeOutLine(bool); //int to boolean\n\n /*\n Java can perform number -> string\n method 1: numberType.toString\n method 2: String.valueOf(int/double/float) //used above in the code\n Java can also perform string -> number\n dataType.parseDatatype() // e.g.: Integer.parseInt()\n\n Java allows this only when the conversion is widening (small -> larger)\n alternatively reports a compile error if the conversion is narrowing\n */\n\n //YOUR CODE ABOVE HERE\n }", "protected boolean func_70814_o() { return true; }", "@Override\n\tpublic void VisitCastNode(BunCastNode Node) {\n\n\t}", "@Test(timeout = 4000)\n public void test164() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"java.lang.String@0000000005\");\n MXSerializer mXSerializer0 = new MXSerializer();\n Hidden hidden0 = new Hidden(xmlEntityRef0, \"java.lang.String@0000000005\", \"/o:%Ab+Af@:#h3VI\");\n // Undeclared exception!\n try { \n hidden0.cite((Object) mXSerializer0);\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "public abstract boolean read_boolean();", "@Test\n\tpublic void testStringToBoolean() {\n\n\t\t// forwards for yes and no\n\t\tAssert.assertEquals(converter.convertForward(\"Yes\"), new Boolean(true));\n\t\tAssert.assertEquals(converter.convertForward(\"No\"), new Boolean(false));\n\n\t}", "public boolean method_2434() {\r\n return false;\r\n }", "@Test\n public void testDAM31901002() {\n // in this case, the boolean type is not supported by oracle db.\n // there is separate sql created to be executed for oracle database\n // however, the sql id that for oracle and other db are same.\n testDAM30802001();\n }", "@Override\n\tpublic boolean checkTypes() {\n\t\treturn false;\n\t}", "public static Boolean toBoolean(Object o, byte type) throws ExecException {\n try {\n switch (type) {\n case NULL:\n return null;\n case BOOLEAN:\n return (Boolean) o;\n case BYTE:\n return Boolean.valueOf(((Byte) o).byteValue() != 0);\n case INTEGER:\n return Boolean.valueOf(((Integer) o).intValue() != 0);\n case LONG:\n return Boolean.valueOf(((Long) o).longValue() != 0L);\n case BIGINTEGER:\n return Boolean.valueOf(!BigInteger.ZERO.equals(((BigInteger) o)));\n case BIGDECIMAL:\n return Boolean.valueOf(((BigDecimal) o).signum() != 0);\n case FLOAT:\n return Boolean.valueOf(((Float) o).floatValue() != 0.0F);\n case DOUBLE:\n return Boolean.valueOf(((Double) o).doubleValue() != 0.0D);\n case BYTEARRAY:\n String str = ((DataByteArray) o).toString();\n if (str.equalsIgnoreCase(\"true\")) {\n return Boolean.TRUE;\n } else if (str.equalsIgnoreCase(\"false\")) {\n return Boolean.FALSE;\n } else {\n return null;\n }\n case CHARARRAY:\n if (((String) o).equalsIgnoreCase(\"true\")) {\n return Boolean.TRUE;\n } else if (((String) o).equalsIgnoreCase(\"false\")) {\n return Boolean.FALSE;\n } else {\n return null;\n }\n case DATETIME:\n case MAP:\n case INTERNALMAP:\n case TUPLE:\n case BAG:\n case UNKNOWN:\n default:\n int errCode = 1071;\n String msg = \"Cannot convert a \" + findTypeName(o) + \" to a Boolean\";\n throw new ExecException(msg, errCode, PigException.INPUT);\n }\n } catch (ClassCastException cce) {\n throw cce;\n } catch (ExecException ee) {\n throw ee;\n } catch (NumberFormatException nfe) {\n int errCode = 1074;\n String msg = \"Problem with formatting. Could not convert \" + o + \" to Float.\";\n throw new ExecException(msg, errCode, PigException.INPUT, nfe);\n } catch (Exception e) {\n int errCode = 2054;\n String msg = \"Internal error. Could not convert \" + o + \" to Float.\";\n throw new ExecException(msg, errCode, PigException.BUG);\n }\n }", "@Override\r\n public boolean isHasDirectValue() {\r\n return this.hasDirectValue;\r\n }", "boolean hasPlainTransfer();", "private void m4806a(boolean needConvert) {\n m4810f();\n if (needConvert) {\n JniMethod.convert(f3831d, f3852j, Recorder.f3861b, Recorder.f3862c);\n }\n }", "public void setRequiresTaxCertificate (boolean RequiresTaxCertificate)\n{\nset_Value (COLUMNNAME_RequiresTaxCertificate, Boolean.valueOf(RequiresTaxCertificate));\n}", "private void registerBooleanConversions(ITypeManager typeManager) {\n\t\ttypeManager.registerConverter(BsonBoolean.class, String.class, \n\t\t\t(Object val) -> ToCoreStrUtils.bsonBool2Str((BsonBoolean) val));\n\t\ttypeManager.registerConverter(BsonBoolean.class, Byte.class, \n\t\t\t(Object val) -> ToCoreByteUtils.bsonBool2Byte((BsonBoolean) val));\n\t\ttypeManager.registerConverter(BsonBoolean.class, Character.class, \n\t\t\t(Object val) -> ToCoreChrUtils.bsonBool2Chr((BsonBoolean) val));\n\t\ttypeManager.registerConverter(BsonBoolean.class, Short.class, \n\t\t\t(Object val) -> ToCoreShrtUtils.bsonBool2Shrt((BsonBoolean) val));\n\t\ttypeManager.registerConverter(BsonBoolean.class, Integer.class, \n\t\t\t(Object val) -> ToCoreIntUtils.bsonBool2Int((BsonBoolean) val));\n\t\ttypeManager.registerConverter(BsonBoolean.class, Long.class, \n\t\t\t(Object val) -> ToCoreLngUtils.bsonBool2Lng((BsonBoolean) val));\n\t\ttypeManager.registerConverter(BsonBoolean.class, BigInteger.class, \n\t\t\t(Object val) -> ToCoreBgiUtils.bsonBool2Bgi((BsonBoolean) val));\n\t\ttypeManager.registerConverter(BsonBoolean.class, Float.class, \n\t\t\t(Object val) -> ToCoreFltUtils.bsonBool2Flt((BsonBoolean) val));\n\t\ttypeManager.registerConverter(BsonBoolean.class, Double.class, \n\t\t\t(Object val) -> ToCoreDblUtils.bsonBool2Dbl((BsonBoolean) val));\n\t\ttypeManager.registerConverter(BsonBoolean.class, BigDecimal.class, \n\t\t\t(Object val) -> ToCoreBgdUtils.bsonBool2Bgd((BsonBoolean) val));\n\t}", "@Test\n public void createRightTypeCastTypeCast() throws Exception {\n //\n boolean inLeftTree = false;\n PreparationData prepData = prepareCastedPartOfFaultVar(inLeftTree);\n //\n MapperSwingTreeModel rightTreeModel = prepData.bmm.getRightTreeModel();\n TreePath baseTypeElementPath = BpelMapperTestUtils.findInTree(prepData.treeNode,\n rightTreeModel, \"baseTypeElem\"); // NOI18N\n assertNotNull(baseTypeElementPath);\n //\n // Find global type and cast the left item to it\n GlobalComplexType targetGType = BpelMapperTestUtils.getGlobalTypeByName(\n mBpelModel, \"http://xml.netbeans.org/schema/Synchronous\",\n \"DerivedComplexType\", GlobalComplexType.class); // NOI18N\n assertNotNull(targetGType);\n //\n // Create a new cast\n TreePath castedPartPath = new BpelCastManager().addCastCmd(\n targetGType, baseTypeElementPath, inLeftTree, prepData.tcContext);\n assertNotNull(castedPartPath);\n //\n // Find the attrStr attribute inside of the new Pseudo Element.\n TreePath rightPinPath = BpelMapperTestUtils.findInTree(\n prepData.treeNode, rightTreeModel,\n \"(DerivedComplexType)baseTypeElem/strAttrA\"); // NOI18N\n assertNotNull(rightPinPath);\n //\n MapperSwingTreeModel leftTreeModel = prepData.bmm.getLeftTreeModel();\n TreePath leftPinPath = BpelMapperTestUtils.findInTree(\n leftTreeModel, \"/Variables/SimpleTargetVar/strAttr1\"); // NOI18N\n assertNotNull(leftPinPath);\n //\n BpelMapperTestUtils.addTransitLink(prepData.bmm, leftPinPath, rightPinPath);\n //\n Element peer = prepData.testAssign.getPeer();\n String assignText = new SimpleDomSerializer().serializeNode(peer);\n String snapshot = TestProperties.getMessage(FaultVarLSMsCreationTest.class,\n \"MAPPER_SNAPSHOT_FAULT_RT_CREATE_CAST_CAST\"); // NOI18N\n assertEquals(assignText, snapshot);\n }", "@Override\n public boolean getDataResult() {\n return true;\n }", "@Override\n public boolean getDataResult() {\n return true;\n }", "@Override\n public boolean getDataResult() {\n return true;\n }", "private boolean correctValues() {\n try {\n //TODO: check COM ports\n } catch (Exception e) {\n e.printStackTrace();\n return false;\n }\n return true;\n }", "boolean hasRt();", "protected boolean func_70041_e_() { return false; }", "public boolean esCasting() throws IOException {\n\t\t\n\t\t// Procesamos los 3 tokens\n\t\tToken token1 = this.nextToken();\n\t\ttoken1.setCatLexica(reconoceCategoria(token1.get_lexema()));\n\t\tToken token2 = this.nextToken();\n\t\ttoken2.setCatLexica(reconoceCategoria(token2.get_lexema()));\n\t\tToken token3 = this.nextToken();\n\t\ttoken3.setCatLexica(reconoceCategoria(token3.get_lexema()));\n\t\tboolean casting = false;\n\t\t// Comprobamos que se cumpla que los 3 siguientes tokens corresponden a un operador\n\t\tif (token1.getCatLexica().equals(CategoriaLexica.AbreParentesis) \n\t\t\t\t&& (token2.get_lexema().equals(\"natural\") || token2.get_lexema().equals(\"character\") \n\t\t\t\t\t|| token2.get_lexema().equals(\"integer\") || token2.get_lexema().equals(\"float\")) \n\t\t\t\t&& token3.getCatLexica().equals(CategoriaLexica.CierraParentesis)) {\n\t\t\t\t\tcasting = true;\t\t\t\t\t\n\t\t\t}\t\t\t\n\t\t\n\t\t// Volvemos a poner los tokens en el buffer\n\t\tbufferLocal.insertarEnCabeza(token3);\n\t\tbufferLocal.insertarEnCabeza(token2);\n\t\tbufferLocal.insertarEnCabeza(token1);\n\t\treturn casting;\n\t}", "public boolean method_2453() {\r\n return false;\r\n }", "public boolean getIsBcast() {\n return isBcast_;\n }", "public abstract boolean mo66253b();", "@Test\n public void test_column_type_detection_double() throws SQLException {\n ColumnInfo info = testColumnTypeDetection(\"x\", NodeFactory.createLiteral(\"12.3e4\", XSDDatatype.XSDdouble), true, Types.DOUBLE, Double.class.getCanonicalName());\n Assert.assertEquals(16, info.getScale());\n Assert.assertEquals(16, info.getPrecision());\n Assert.assertTrue(info.isSigned());\n }", "@Test\n public void testMultiCastFunction() throws Exception {\n String sql = \"SELECT cast(cast(a as timestamp) as string) FROM g\";\n Node fileNode = sequenceSql(sql, TSQL_QUERY);\n\n Node queryNode = verify(fileNode, Query.ID, Query.ID);\n\n Node selectNode = verify(queryNode, Query.SELECT_REF_NAME, Select.ID);\n Node function1Node = verifyExpressionSymbol(selectNode, Select.SYMBOLS_REF_NAME, Function.ID);\n verifyProperty(function1Node, Function.NAME_PROP_NAME, \"cast\");\n Node function2Node = verify(function1Node, Function.ARGS_REF_NAME, 1, Function.ID);\n verifyConstant(function1Node, Function.ARGS_REF_NAME, 2, \"string\");\n\n verifyElementSymbol(function2Node, Function.ARGS_REF_NAME, 1, \"a\");\n verifyConstant(function2Node, Function.ARGS_REF_NAME, 2, \"timestamp\");\n \n Node fromNode = verify(queryNode, Query.FROM_REF_NAME, From.ID);\n verifyUnaryFromClauseGroup(fromNode, From.CLAUSES_REF_NAME, 1, \"g\");\n \n verifySql(\"SELECT cast(cast(a AS timestamp) AS string) FROM g\", fileNode);\n }", "public boolean relationalExpressionIsRealConversion2Derivation() {\r\n return this.getImpl().relationalExpressionIsRealConversion2Derivation();\r\n }", "@Test\n void transformtoBoolTest() {\n assertEquals(bot.transformtoBool(),bot);\n assertEquals(bof.transformtoBool(),bof);\n assertNotEquals(bot.transformtoBool(),bof);\n assertNotEquals(bof.transformtoBool(),bot);\n\n //Nulls\n assertEquals(f.transformtoBool(),Null);\n assertEquals(st.transformtoBool(),Null);\n assertEquals(i.transformtoBool(),Null);\n assertEquals(bi.transformtoBool(),Null);\n assertEquals(Null.transformtoBool(),Null);\n }", "public static void main(String[] args) {\n\n double a = 'A';\n String AB = String.valueOf(a);\n System.out.println(AB);\n double BA = Double.parseDouble(AB);\n System.out.println(BA);\n\n long b = '1';\n String ABC = String.valueOf(b);\n System.out.println(ABC);\n long CBA = Long.parseLong(ABC);\n System.out.println(CBA);\n\n boolean C1 = true;\n String display = String.valueOf(C1);\n System.out.println(display);\n boolean C2 = Boolean.parseBoolean(display);\n System.out.println(C2);\n\n }", "boolean mo72115d();", "private double convertDouble()\n\t{\n\t\tString val = tokens[10];\n\t\tdouble value = 0.0;\n\t\ttry {\n\t\t\tvalue = Double.parseDouble(tokens[10]);\n\t\t}\n\t\tcatch(NumberFormatException e) {\n\t\t\tSystem.err.print(\"\");\n\t\t}\n\t\treturn value;\n\t}", "boolean getIsOk();", "@Test(timeout = 4000)\n public void test22() throws Throwable {\n DynamicSelectModel dynamicSelectModel0 = new DynamicSelectModel();\n dynamicSelectModel0.collection(\"?_>Qp*Ds!n\\\"tiJ\");\n // Undeclared exception!\n try { \n dynamicSelectModel0.getObjects();\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // java.lang.Integer cannot be cast to java.lang.Boolean\n //\n verifyException(\"org.mvel.MVELInterpretedRuntime\", e);\n }\n }", "public boolean isSuccessAsPrimitive(final SessionContext ctx)\n\t{\n\t\tBoolean value = isSuccess( ctx );\n\t\treturn value != null ? value.booleanValue() : false;\n\t}", "boolean hasTransformValue();", "protected static double convertNumberToDouble( final Object number )\n\t{\n\t\tdouble returnValue = 0.0d;\n\n\t\tif ( number instanceof Integer )\n\t\t{\n\t\t\treturnValue = ( ( Integer ) number ).doubleValue( );\n\t\t}\n\t\telse if ( number instanceof Double )\n\t\t{\n\t\t\treturnValue = ( ( Double ) number ).doubleValue( );\n\t\t}\n\n\t\treturn returnValue;\n\t}", "public boolean aDy() {\n return true;\n }", "private boolean isValidDouble(String text) {\r\n \ttry {\r\n \t\tDouble value = Double.valueOf(text);\r\n \t} catch (NumberFormatException e) {\r\n \t\treturn false;\r\n \t}\r\n \treturn true;\r\n }", "default boolean isPrimitive() {\n return false;\n }", "public interface BoxedDoubleToBooleanFunction extends ObjectToBooleanFunction<Double> {\n\n}", "@Override\n\tpublic void visit(CastExpression arg0) {\n\t\t\n\t}", "@Override\n public boolean isPrimitive() {\n return true;\n }", "public boolean isProcessed() \n{\nObject oo = get_Value(\"Processed\");\nif (oo != null) \n{\n if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();\n return \"Y\".equals(oo);\n}\nreturn false;\n}" ]
[ "0.605174", "0.6004284", "0.59080803", "0.58850986", "0.57634693", "0.57324815", "0.57162774", "0.5701737", "0.565934", "0.5654111", "0.5643705", "0.56370103", "0.5636743", "0.56209046", "0.5552445", "0.5549967", "0.5549967", "0.5549967", "0.5504154", "0.55008924", "0.5482481", "0.5418937", "0.5399036", "0.5396438", "0.5396438", "0.53911567", "0.53610206", "0.5349762", "0.5337787", "0.53187585", "0.53115994", "0.52862346", "0.52821445", "0.52734005", "0.52726316", "0.5259717", "0.52528405", "0.52414", "0.5235654", "0.5226473", "0.5217261", "0.52130586", "0.5206182", "0.5175072", "0.51692885", "0.51571745", "0.51536", "0.5136182", "0.5127893", "0.51193094", "0.5110685", "0.5101667", "0.51011884", "0.5095566", "0.50925666", "0.50859046", "0.5081542", "0.5069667", "0.505704", "0.50558406", "0.50548327", "0.50547165", "0.5053269", "0.5049841", "0.50496787", "0.50474054", "0.5043661", "0.50425816", "0.5041629", "0.5039493", "0.5038344", "0.5029306", "0.50279117", "0.50279117", "0.50279117", "0.50252044", "0.5021016", "0.50203025", "0.5017942", "0.50071687", "0.5007128", "0.5006335", "0.4994552", "0.4987214", "0.49844444", "0.49785978", "0.49779654", "0.49754357", "0.49752623", "0.49691117", "0.4963838", "0.49611267", "0.494985", "0.4949716", "0.4946114", "0.49372807", "0.49346974", "0.49302784", "0.49295813", "0.49253148", "0.49227062" ]
0.0
-1
Creates a new PlacesAutocompleteTextView with the provided API key and the default history file
public PlacesAutocompleteTextView(@NonNull final Context context, @NonNull final String googleApiKey) { super(context); init(context, null, R.attr.pacv_placesAutoCompleteTextViewStyle, R.style.PACV_Widget_PlacesAutoCompleteTextView, googleApiKey, context.getString(R.string.pacv_default_history_file_name)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public PlacesAutocompleteTextView(@NonNull final Context context, @NonNull final String googleApiKey, @NonNull final String historyFileName) {\n super(context);\n\n init(context, null, R.attr.pacv_placesAutoCompleteTextViewStyle, R.style.PACV_Widget_PlacesAutoCompleteTextView, googleApiKey, historyFileName);\n }", "private void init(@NonNull final Context context, final AttributeSet attrs, final int defAttr, final int defStyle, final String googleApiKey, final String historyFileName) {\n TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.PlacesAutocompleteTextView, defAttr, defStyle);\n String layoutApiKey = typedArray.getString(R.styleable.PlacesAutocompleteTextView_pacv_googleMapsApiKey);\n String layoutAdapterClass = typedArray.getString(R.styleable.PlacesAutocompleteTextView_pacv_adapterClass);\n String layoutHistoryFile = typedArray.getString(R.styleable.PlacesAutocompleteTextView_pacv_historyFile);\n languageCode = typedArray.getString(R.styleable.PlacesAutocompleteTextView_pacv_languageCode);\n countryCode = typedArray.getString(R.styleable.PlacesAutocompleteTextView_pacv_countryCode);\n resultType = AutocompleteResultType.fromEnum(typedArray.getInt(R.styleable.PlacesAutocompleteTextView_pacv_resultType, PlacesApi.DEFAULT_RESULT_TYPE.ordinal()));\n clearEnabled = typedArray.getBoolean(R.styleable.PlacesAutocompleteTextView_pacv_clearEnabled, false);\n typedArray.recycle();\n\n final String finalHistoryFileName = historyFileName != null ? historyFileName : layoutHistoryFile;\n\n if (!TextUtils.isEmpty(finalHistoryFileName)) {\n historyManager = DefaultAutocompleteHistoryManager.fromPath(context, finalHistoryFileName);\n }\n\n final String finalApiKey = googleApiKey != null ? googleApiKey : layoutApiKey;\n\n if (TextUtils.isEmpty(finalApiKey)) {\n throw new InflateException(\"Did not specify googleApiKey!\");\n }\n\n api = new PlacesApiBuilder()\n .setApiClient(PlacesHttpClientResolver.PLACES_HTTP_CLIENT)\n .setGoogleApiKey(finalApiKey)\n .build();\n\n if (languageCode != null) {\n api.setLanguageCode(languageCode);\n }\n\n if (countryCode != null) {\n api.setCountryCode(countryCode);\n }\n\n if (layoutAdapterClass != null) {\n adapter = adapterForClass(context, layoutAdapterClass);\n } else {\n adapter = new DefaultAutocompleteAdapter(context, api, resultType, historyManager);\n }\n\n super.setAdapter(adapter);\n\n super.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(final AdapterView<?> parent, final View view, final int position, final long id) {\n Place place = adapter.getItem(position);\n\n if (listener != null) {\n listener.onPlaceSelected(place);\n }\n\n if (historyManager != null) {\n historyManager.addItemToHistory(place);\n }\n }\n });\n\n this.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n\n }\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n if (clearEnabled) {\n if (s != null && s.length() > 0) {\n showClearButton(true);\n } else {\n showClearButton(false);\n }\n } else {\n showClearButton(false);\n }\n }\n\n @Override\n public void afterTextChanged(Editable s) {\n }\n });\n\n super.setDropDownBackgroundResource(R.drawable.pacv_popup_background_white);\n }", "private void SetViewAndAutoCompleteText(int viewID)\n\t{\n\t\t// Auto complete words\n // !put, !get, !capture, !launch, !autotest are special commands\n\t\tfinal String [] COMMAND_LIST = new String [] { \n\t\t\t\t\"!put a.txt\", \"!get c:/test.txt\", \"!capture 1.jpg\", \"!launch\", \n\t\t\t\t\"dir\", \"cd \", \"cd ..\", \"c:\", \"tasklist\" };\n\t\tfinal String [] KEY_LIST = new String [] { \n\t\t\t\t\"!autotest\", \"!pintest\", \"!stoptest\", \"[KEY_\", \"[KEY_LGUI]\", \"[KEY_LGUI][KEY_R]\", \"[KEY_LGUI][KEY_L]\", \"[KEY_LALT]\", \"[KEY_LALT][KEY_F4]\", \"[KEY_LCONTROL]\", \"[KEY_LCONTROL][KEY_S]\", \"[KEY_UP]\",\n\t\t\t\t\"[KEY_LSHIFT]\",\t\"[KEY_ENTER]\", \"[KEY_BACKSPACE]\", \"cmd.exe\", \"d:/testagent\" };\n\t\t\n\t\t// Set view pointer\n\t\tView view;\n\t\tAutoCompleteTextView autoText;\n\t\tArrayAdapter<String> adapter;\n\t\t\n\t\t// Set view pointer\n\t\tif (viewID == VIEW_ID_COMMAND)\n\t\t{\n\t\t\tview = mTabHost.getTabContentView().findViewById(R.id.commandView);\n\t\t\tmCommandView = (TextView)view.findViewById(R.id.dataview);\n\t\t\tmCommandScrollView = (ScrollView)view.findViewById(R.id.scrollview);\n\t\t\tmCommandInputView = (AutoCompleteTextView) view.findViewById(R.id.commandInput);\n\t\t\tautoText = mCommandInputView;\n\t\t\tadapter = new ArrayAdapter(getApplicationContext(), \n\t\t\t\t\tandroid.R.layout.simple_dropdown_item_1line, COMMAND_LIST);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tview = mTabHost.getTabContentView().findViewById(R.id.keyView);\n\t\t\tmKeyView = (TextView)view.findViewById(R.id.dataview);\n\t\t\tmKeyScrollView = (ScrollView)view.findViewById(R.id.scrollview);\n\t\t\tmKeyInputView = (AutoCompleteTextView) view.findViewById(R.id.keyInput);\n\t\t\tautoText = mKeyInputView;\n\t\t\tadapter = new ArrayAdapter(getApplicationContext(), \n\t\t\t\t\tandroid.R.layout.simple_dropdown_item_1line, KEY_LIST);\t\t\t\n\t\t}\t\t\n\t\t\n\t\t// Set options for autocomplete\n\t\tautoText.setTag(viewID);\n\t\tautoText.setAdapter(adapter);\n\t\tautoText.setThreshold(1);\n\t\t\n\t\t// Process enter key\n\t\tautoText.setOnKeyListener(new OnKeyListener()\n\t\t{\n\t\t\t@Override\n\t\t\tpublic boolean onKey(View arg0, int arg1, KeyEvent arg2) \n\t\t\t{\t\t\t\t\n\t\t\t\tif ((arg0 != null) && (arg2 != null) && \n\t\t\t\t\t(arg2.getAction() == KeyEvent.ACTION_DOWN) &&\n\t\t\t\t\t(arg2.getKeyCode() == KeyEvent.KEYCODE_ENTER))\n\t\t\t\t{\n\t\t\t\t\tAutoCompleteTextView view = (AutoCompleteTextView) arg0;\n\t\t\t\t\tString data;\n\t\t\t\t\tint viewID;\n\t\t\t\t\t\n\t\t\t\t\tdata = view.getText().toString();\n view.setText(\"\");\n viewID = (Integer) view.getTag();\n if (data.equals(\"\") == true)\n {\n if (viewID == VIEW_ID_KEY)\n {\n data = \"[KEY_ENTER]\";\n }\n else\n {\n return true;\n }\n }\n\n SendCommandOrKeys(viewID, data);\n\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\t\t});\t\t\n\t}", "public PlacesAutocompleteTextView(final Context context, final AttributeSet attrs, final int defAttr) {\n super(context, attrs, defAttr);\n\n init(context, attrs, defAttr, R.style.PACV_Widget_PlacesAutoCompleteTextView, null, context.getString(R.string.pacv_default_history_file_name));\n }", "public PlacesAutocompleteTextView(final Context context, final AttributeSet attrs) {\n super(context, attrs);\n\n init(context, attrs, R.attr.pacv_placesAutoCompleteTextViewStyle, R.style.PACV_Widget_PlacesAutoCompleteTextView, null, context.getString(R.string.pacv_default_history_file_name));\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n requestWindowFeature(Window.FEATURE_NO_TITLE);\n setContentView(R.layout.activity_location_search);\n ButterKnife.bind(this);\n placeModels = new ArrayList<>();\n dataAdapter = new GooglePlacesAutocompleteAdapterNew(getApplicationContext(), placeModels);\n edEnterLocation = (EditText) findViewById(R.id.edEnterLocation);\n imgClose = (ImageView) findViewById(R.id.imgClose);\n powered_by_google = (ImageView) findViewById(R.id.powered_by_google);\n listview = (ListView) findViewById(R.id.listview);\n textviewSearchResult = (TextView) findViewById(R.id.textviewSearchResult);\n listview.setAdapter(dataAdapter);\n\n edEnterLocation.addTextChangedListener(new TextWatcher() {\n\n public void afterTextChanged(Editable s) {\n try {\n listview.setVisibility(View.VISIBLE);\n placeModels.clear();\n\n if (placeModels != null) {\n dataAdapter.notifyDataSetChanged();\n }\n progressbarSearch.setVisibility(View.VISIBLE);\n new AutocompleteApi(new LatLng(LocationHelperService.dblLatitude, LocationHelperService.dblLongitude), s.toString()).execute();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n }\n\n public void onTextChanged(final CharSequence s, int start, int before, final int count) {\n\n }\n });\n\n\n listview.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n /*String str = placeModels.get(position).getMainTitle();\n String Data = getLocationFromAddress(LocationSearchActivityNew.this, str);\n Intent returnIntent = new Intent();\n returnIntent.putExtra(\"result\", Data + \",,,\" + str);\n setResult(Activity.RESULT_OK, returnIntent);\n finish();*/\n\n String str = placeModels.get(position).getMainTitle() + \" , \" + placeModels.get(position).getSecondaryTitle();\n\n DataToPref.setSharedPreferanceData(getApplicationContext(), LaoxiConstant.SELECTED_PLACE_ID, LaoxiConstant.SELECTED_PLACE_ID_KEY, placeModels.get(position).getPlaceID() + \"\");\n String Data = getLocationFromAddress(LocationSearchActivityNew.this, str);\n\n if (Data == null || Data.equalsIgnoreCase(\"\")) {\n\n // call methood\n GetLocation(str);\n } else {\n Intent returnIntent = new Intent();\n returnIntent.putExtra(\"result\", Data + \",,,\" + str);\n setResult(Activity.RESULT_OK, returnIntent);\n finish();\n }\n\n\n }\n });\n\n\n imgClose.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n finish();\n }\n });\n\n }", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tsetContentView(R.layout.auto_complete_text_view);\r\n\t\tsetTitle(\"AutoCompleteTextView示例!\");\r\n\t\tautoComplete=(AutoCompleteTextView)findViewById(R.id.auto_complete);\r\n\t\tcleanButton=(Button)findViewById(R.id.cleanButton);\r\n\t\t\r\n\t\tArrayAdapter<String> adapter=new ArrayAdapter<String>(AutoCompleteTextViewActivity.this,android.R.layout.simple_dropdown_item_1line,COUNTRIES);\r\n\t\tautoComplete.setAdapter(adapter);\r\n\t\t\r\n\t\t//清空\r\n\t\tcleanButton.setOnClickListener(new View.OnClickListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\tautoComplete.setText(\"\");\r\n\t\t\t}\r\n\t\t});\r\n\t}", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.main);\n selection = (TextView)findViewById(R.id.con_str);\n editor = (AutoCompleteTextView) findViewById(R.id.editor);\n editor.addTextChangedListener(this);\n editor.setAdapter(new ArrayAdapter<String>(this,android.R.layout.simple_dropdown_item_1line,items)); \n }", "public AutoCompleteTextView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes, Resources.Theme popupTheme) {\n/* 157 */ super((Context)null); throw new RuntimeException(\"Stub!\");\n/* */ }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.aty_using_autocompletetextview);\n\t\tactv=(AutoCompleteTextView)findViewById(R.id.autoCompleteTextView);\n\t\tactvAdapter=new ArrayAdapter<String>(this, R.layout.aty_using_autocompletetextview_dropdown_item, strs);\n\t\tactv.setAdapter(actvAdapter);\n\t\t\n\t\tmactv=(MultiAutoCompleteTextView) findViewById(R.id.multiAutoCompleteTextView);\n\t\tmactvAdapter=new ArrayAdapter<String>(this, R.layout.aty_using_autocompletetextview_dropdown_item,strs);\n\t\tmactv.setTokenizer(new MultiAutoCompleteTextView.CommaTokenizer());\n\t\tmactv.setAdapter(mactvAdapter);\n\t}", "public AutoCompleteTextView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {\n/* 132 */ super((Context)null); throw new RuntimeException(\"Stub!\");\n/* */ }", "public AutoCompleteTextView(Context context, AttributeSet attrs, int defStyleAttr) {\n/* 113 */ super((Context)null); throw new RuntimeException(\"Stub!\");\n/* */ }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.main);\n \n api = new Api();\n \n outputConsole = (TextView) findViewById(R.id.outputConsole);\n \n inputLine = (EditText) findViewById(R.id.inputLine); \n inputLine.setOnKeyListener(this);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View rootView = inflater.inflate(R.layout.fragment_search, container, false);\n //keyword = rootView.findViewById(R.id.keyword);\n category = rootView.findViewById(R.id.category);\n distance = rootView.findViewById(R.id.distance);\n distanceUnit = rootView.findViewById(R.id.distanceUnit);\n radioGroup = rootView.findViewById(R.id.radio_locations);\n radioButtonHere= (RadioButton) rootView.findViewById(R.id.radio_here);\n radioButtonOther = (RadioButton) rootView.findViewById(R.id.radio_other);\n locationText = rootView.findViewById(R.id.locationText);\n search = (Button) rootView.findViewById(R.id.search);\n clear = rootView.findViewById(R.id.clear);\n locationText.setEnabled(false);\n keyword = rootView.findViewById(R.id.keyword);\n autoSuggestAdapter = new AutoCompleteAdapter(getContext(),\n android.R.layout.simple_dropdown_item_1line);\n keyword.setOnItemClickListener(\n new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View view,\n int position, long id) {\n\n itemPositon = autoSuggestAdapter.getObject(position);\n }\n });\n keyword.setThreshold(2);\n keyword.setAdapter(autoSuggestAdapter);\n keyword.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int\n count, int after) {\n\n }\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before,\n int count) {\n handler.removeMessages(TRIGGER_AUTO_COMPLETE);\n handler.sendEmptyMessageDelayed(TRIGGER_AUTO_COMPLETE,\n AUTO_COMPLETE_DELAY);\n }\n\n @Override\n public void afterTextChanged(Editable s) {\n\n }\n });\n\n handler = new Handler(new Handler.Callback() {\n @Override\n public boolean handleMessage(Message msg) {\n if (msg.what == TRIGGER_AUTO_COMPLETE) {\n if (!TextUtils.isEmpty(keyword.getText())) {\n Log.d(\"From autocomplete call\",keyword.getText().toString());\n makeApiCall(keyword.getText().toString());\n }\n }\n return false;\n }\n });\n\n radioButtonHere.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n locationText.setText(\"\");\n locationText.setEnabled(false);\n }\n });\n\n radioButtonOther.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n locationText.setEnabled(true);\n\n }\n });\n\n //Does Validation and if validation passes, then send data to TM.\n search.setOnClickListener(new View.OnClickListener() {\n public void onClick(View v) {\n // Code here executes on main thread after user presses button\n //Keyword field is empty\n if(keyword.getText().toString().trim().length() == 0){\n rootView.findViewById(R.id.errorKeyword).setVisibility(View.VISIBLE);\n Toast toast = Toast.makeText(getActivity().getApplicationContext(),\n \"Please fix all fields with errors\", Toast.LENGTH_SHORT);\n toast.show();\n keywordFlag = false;\n }\n else {\n rootView.findViewById((R.id.errorKeyword)).setVisibility(View.GONE);\n keywordFlag = true;\n }\n if(radioButtonHere.isChecked()){\n //Take current location\n rootView.findViewById(R.id.errorLocation).setVisibility(View.GONE);\n locationFlag = true;\n }\n if(radioButtonOther.isChecked()){\n if(locationText.getText().toString().trim().length()==0) {\n rootView.findViewById(R.id.errorLocation).setVisibility(View.VISIBLE);\n Toast toast = Toast.makeText(getActivity().getApplicationContext(),\n \"Please fix all fields with errors\", Toast.LENGTH_SHORT);\n toast.show();\n locationFlag = false;\n }\n else{\n rootView.findViewById(R.id.errorLocation).setVisibility(View.GONE);\n locationFlag = true;\n }\n }\n if(keywordFlag && locationFlag){\n //Valid data, make the URL for first TM Event search.\n //If User selects here\n if(radioButtonHere.isChecked()){\n //Use current lat and long values\n params = \"current_location?latitude=\"+latitude+\"&longitude=\"+longitude;\n String current_url = URL + params;\n Log.d(\"current_URL\",current_url);\n getCurrentResponse(current_url);\n }\n //If User has typed in custom location\n if(radioButtonOther.isChecked()) {\n params = \"geocoding?location=\" + Uri.encode(locationText.getText().toString()) + \"&api_key=\" + api_key;\n geocoding_url = URL + params;\n Log.d(\"Before Geocoding sent\", geocoding_url);\n getGeocodeResponse(geocoding_url);\n }\n }\n }\n });\n\n clear.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n keyword.setText(\"\");\n distance.setText(\"\");\n locationText.setText(\"\");\n radioButtonHere.setChecked(true);\n locationText.setEnabled(false);\n rootView.findViewById(R.id.errorKeyword).setVisibility(View.GONE);\n rootView.findViewById(R.id.errorLocation).setVisibility(View.GONE);\n }\n });\n return rootView;\n }", "public static APIRequestTask requestAutocomplete(String input) {\n\t\tString url = places_url + \"/autocomplete\" + \"/json\";\n\t\tURLParameter input_param = null;\n\n\t\tinput_param = new URLParameter(\"input\", input);\n\t\tAPIRequestTask task = new APIRequestTask(url);\n\t\ttask.execute(input_param);\n\t\treturn task;\n\t}", "public void generateList(SearchAutoCompleteListener searchAutoCompleteListener) {\n RequestQueue queue= RequestQueueSingleton.getInstance(this.context).getRequestQueue();\n queue.cancelAll(\"search\");\n if (this.nameOrCode.length() > 0) {\n StringRequest request = new StringRequest(Request.Method.GET,\n Api.autoCompleteString +\"?q=\"+this.nameOrCode,\n (String response) -> {\n try {\n JSONObject data = new JSONObject(response);\n JSONArray placearray = data.getJSONArray(\"places\");\n\n if (placearray.length() == 0) {\n Log.d(TAG,\"Place Not Found\");\n searchAutoCompleteListener.onFailure(JsonUtils.logError(TAG,response));\n } else {\n ArrayList<Place> searchPlaces = JsonUtils.getPlaces(placearray);\n searchAutoCompleteListener.onPlaceListReceived(searchPlaces);\n }\n } catch (JSONException e) {\n searchAutoCompleteListener.onFailure(JsonUtils.logError(TAG,response));\n }\n },\n error ->{\n Log.d(TAG,JsonUtils.handleResponse(error));\n searchAutoCompleteListener.onFailure(JsonUtils.handleResponse(error));\n }){\n };\n request.setTag(\"search\");\n queue.add(request);\n }\n }", "@Override\r\n\tpublic void autoCompletedUpdated() {\r\n\t\tmAdapter = new ArrayAdapter<String>(this, R.layout.sdk_list_entry, R.id.sdk_list_entry_text, mModel.getAutocompleteSuggestions());\r\n\r\n\t\tmListView.setAdapter(mAdapter);\r\n\t\tmListView.invalidate();\r\n\t\t\r\n\t\tmLayout.hideText();\r\n\t\t\r\n\t}", "private Handler MakeViewHandler(int viewID)\n\t{\n\t\tHandler handler = new Handler() \n\t\t{\n\t\t\t@Override\n\t\t\tpublic void handleMessage(Message msg)\n\t\t\t{\n\t\t\t\t// Get data from msg\n\t\t\t\tString data = (String) msg.obj;\n\t\t\t\tfinal TextView textView;\n\t\t\t\tfinal StringBuffer buffer;\n\t\t\t\tfinal ScrollView scrollView;\n\t\t\t\tfinal AutoCompleteTextView autoCompleteText;\n\t\t\t\tRunnable scrollPost = null;\n\t\t\t\tint delayTime = 0;\n\t\t\t\t\n\t\t\t\t// Set view pointer\n\t\t\t\tif (msg.what == VIEW_ID_COMMAND)\n\t\t\t\t{\n\t\t\t\t\ttextView = mCommandView;\n\t\t\t\t\tbuffer = mCommandBuffer;\n\t\t\t\t\tscrollView = mCommandScrollView;\n\t\t\t\t\tscrollPost = mCommandScrollPost;\n\t\t\t\t\tif ((mUpdateCount % 20) == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tdelayTime = 0;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tdelayTime = 1000;\n\t\t\t\t\t}\n\t\t\t\t\tmUpdateCount++;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttextView = mKeyView;\n\t\t\t\t\tbuffer = mKeyBuffer;\n\t\t\t\t\tscrollView = mKeyScrollView;\n\t\t\t\t\tscrollPost = mKeyScrollPost;\n\t\t\t\t\tdelayTime = 0;\n\t\t\t\t}\n\n\t\t\t\tif (mTabHost.getCurrentTab() == VIEW_ID_COMMAND)\n\t\t\t\t{\n\t\t\t\t\tautoCompleteText = mCommandInputView;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tautoCompleteText = mKeyInputView;\n\t\t\t\t}\n\n\t\t\t\t\n\t\t\t\t// Update data\n\t\t\t\tbuffer.append(data);\n\t\t\t\tif (buffer.length() > 5000)\n\t\t\t\t{\n\t\t\t\t\tbuffer.delete(0, buffer.length() - 5000);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tremoveCallbacks(scrollPost);\n\n\t\t\t\t// Reduce update frequency\n\t\t\t\tscrollPost = new Runnable() \n\t\t\t\t{\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void run() \n\t\t\t\t\t{\n\t\t\t\t\t\ttextView.setText(buffer);\n\t\t\t\t\t\t\n\t\t\t\t\t\tpostDelayed(new Runnable()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void run() \n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tscrollView.fullScroll(View.FOCUS_DOWN);\n\t\t\t\t\t\t\t\tautoCompleteText.requestFocus();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}, 200);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\t\n\t\t\t\tif (msg.what == VIEW_ID_COMMAND)\n\t\t\t\t{\n\t\t\t\t\tmCommandScrollPost = scrollPost;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tmKeyScrollPost = scrollPost;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tpostDelayed(scrollPost, delayTime);\n\t\t\t}\n\t\t};\n\t\t\n\t\treturn handler;\n\t}", "private void setupSearchView() {\n SearchView search = binding.searchView;\n\n search.setQueryHint(\"Add companies...\");\n search.setIconifiedByDefault(false);\n search.setIconified(false);\n search.clearFocus();\n\n searchAutoComplete = search.findViewById(android.support.v7.appcompat.R.id.search_src_text);\n\n // Styling the search bar\n searchAutoComplete.setHintTextColor(Color.GRAY);\n searchAutoComplete.setTextColor(Color.GRAY);\n\n searchAutoComplete.setOnItemClickListener((adapterView, view, itemIndex, id) -> {\n SearchEntry entry = (SearchEntry) adapterView.getItemAtPosition(itemIndex);\n String ticker = entry.getTicker();\n ArrayList<String> tickers = new ArrayList<>();\n searchAutoComplete.setText(\"\");\n tickers.add(ticker);\n boolean duplicate = false;\n if (comparisonCompaniesAdapter.getDataSet() != null) {\n duplicate = checkDuplicate(comparisonCompaniesAdapter.getDataSet(), ticker);\n }\n if (!duplicate) {\n List<Company> companies = viewModel.getComparisonCompanies().getValue();\n int size = (companies == null) ? 0 : companies.size();\n\n if (size <= 10) {\n viewModel.addToComparisonCompanies(tickers);\n } else {\n Toast.makeText(this, \"Reached comparison limit!\", Toast.LENGTH_LONG).show();\n }\n }\n });\n\n search.setOnQueryTextListener(new SearchView.OnQueryTextListener() {\n @Override\n public boolean onQueryTextSubmit(String query) {\n return false;\n }\n\n @Override\n public boolean onQueryTextChange(String newText) {\n viewModel.loadSearchResults(newText);\n return false;\n }\n });\n }", "@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t super.onCreate(savedInstanceState);\n\n\t // Set it to typing will open up a search box\n setDefaultKeyMode(DEFAULT_KEYS_SEARCH_LOCAL);\n\n setContentView(R.layout.dictionary);\n\n // Setup the handler for clicking cancel button (Need a better way to present this)\n Button cancelsearch = (Button)findViewById(R.id.CancelSearch);\n cancelsearch.setOnClickListener(this);\n\n // Setup the handler for clicking the dictionary direction button\n mToNaviButton = (Button)findViewById(R.id.DictionaryType);\n mToNaviButton.setOnClickListener(this);\n\t\t\n\t\t// Setup handler for clicking the search button\n\t\tmSearchButton = (Button)findViewById(R.id.SearchButton);\n\t\tmSearchButton.setOnClickListener(this);\n \n // Callback to reload the list on part of speech filter change - this will be called before the activity is done loading\n \tSpinner s = (Spinner)findViewById(R.id.Spinner01);\n\t\tArrayAdapter <CharSequence> mySpinnerArrayAdapter = ArrayAdapter.createFromResource(this, R.array.partsOfSpeech, R.layout.spinnerrow);\n\t\tmySpinnerArrayAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n\t\ts.setAdapter(mySpinnerArrayAdapter);\n \ts.setOnItemSelectedListener(this);\n\n // Check if this was created as the result of a search (Shouldn't happen currently)\n checkIntentForSearch(getIntent());\n\n // Open the DB\n\t EntryDBAdapter.getInstance(this).openDataBase();\n\t mDbIsOpen = true;\n\t\t\n\t //Auto Rotate Locky thingy\n \t\t//SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getBaseContext());\n \t\t//if(prefs.getBoolean(\"auto_rotate\", false)){\n \t\t\t//this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);\n \t\t\t//this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR);\n \t\t\tif(! isTablet(this))\n \t\t\t\tthis.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);\n \t\t\t//else\n \t\t\t\t//this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR);\n \t\t//}else{\n \t\t\t//this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR);\n \t\t//}\n\t \n\t // Check if there is saved state and restore it if so\n\t if (savedInstanceState != null)\n\t {\n\t \tif (savedInstanceState.containsKey(\"CurSearch\"))\n\t \t\tmCurSearch = savedInstanceState.getString(\"CurSearch\");\n\t \tif (savedInstanceState.containsKey(\"CurSearchNavi\"))\n\t \t\tmCurSearchNavi = savedInstanceState.getString(\"CurSearchNavi\");\n\t \tif (savedInstanceState.containsKey(\"ToNavi\"))\n\t \t\tmToNavi = savedInstanceState.getBoolean(\"ToNavi\");\n\t \tif (savedInstanceState.containsKey(\"ViewingItem\"))\n\t \t\tmViewingItem = savedInstanceState.getInt(\"ViewingItem\");\n\t }\n\n\t // Populate the list is done automatically by the spinner callback\n\t}", "public static String getPlaceAutoComplete(Context context, String API_KEY, AutocompleteSupportFragment autocompleteSupportFragment) {\n\n final String[] place_str = new String[1];\n Places.initialize(context, API_KEY);\n PlacesClient placesClient = Places.createClient(context);\n\n if (autocompleteSupportFragment != null) {\n autocompleteSupportFragment.setPlaceFields(Arrays.asList(Place.Field.ID, Place.Field.NAME));\n\n autocompleteSupportFragment.setOnPlaceSelectedListener(new PlaceSelectionListener() {\n @Override\n public void onPlaceSelected(Place place) {\n // TODO: Get info about the selected place.\n // textView.setText(place.getName()+\",\"+place.getId());\n // Log.i(TAG, \"Place: \" + place.getName() + \", \" + place.getId());\n\n place_str[0] = place.getName() + \",\" + place.getId();\n }\n\n @Override\n public void onError(Status status) {\n // TODO: Handle the error.\n //Log.i(TAG, \"An error occurred: \" + status);\n }\n });\n }\n\n String places = \"\";\n if (place_str[0] != null) {\n places = place_str[0];\n }\n return places;\n }", "private void createSuggestionsList() {\r\n\t\tmListView = new LabeledListViewElement(this);\r\n\t\tmInputBar.addView(mListView);\r\n\r\n\t\tmListView.setOnItemClickListener(new OnItemClickListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void onItemClick(AdapterView<?> adapter, View view, int pos, long id) {\r\n\t\t\t\tString query = adapter.getItemAtPosition(pos).toString();\r\n\t\t\t\tif(query.contains(\" \"))\r\n\t\t\t\t\tsearch(query);\r\n\t\t\t\telse{\r\n\t\t\t\t\tmInputBar.setInputText(query + \" \");\r\n\t\t\t\t\tmInputBar.setCursorAtEnd();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t}", "private void setupView()\n\t{\n\t\tnameET = (EditText)findViewById(R.id.newPlaceName);\n\t\taddressET = (EditText)findViewById(R.id.placeAddress);\n\t\tcityET = (EditText)findViewById(R.id.cityET);\n\t\t\n\t\tView b = findViewById(R.id.placeBtnCancel);\n\t\tb.setOnTouchListener(TOUCH);\n\t\tb.setOnClickListener(this);\n\n\t\tView b2 = findViewById(R.id.btnAcceptPlace);\n\t\tb2.setOnTouchListener(TOUCH);\n\t\tb2.setOnClickListener(new View.OnClickListener() {\n\t\t @Override\n\t\t public void onClick(View v) {\n\t\t \tplacename = nameET.getText().toString();\n\t\t \tplaceaddress = addressET.getText().toString();\n\t\t \tplacecity = cityET.getText().toString();\n\t\t \tif(placename.equals(\"\") || placeaddress.equals(\"\") || placecity.equals(\"\")){\n\t\t \t\tToast.makeText(context, \"Fill in all fields!\", Toast.LENGTH_SHORT).show();\n\t\t \t\tfinish();\n\t\t \t\treturn;\n\t\t \t}\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tList<Address> list = gc.getFromLocationName(placeaddress + placecity, 1);\n\t\t\t\t\tif(list.size() == 0){\n\t\t\t \t\tToast.makeText(context, \"Place does not exist!\", Toast.LENGTH_SHORT).show();\n\t\t\t \t\tfinish();\n\t\t\t \t\treturn;\n\t\t\t \t}\n\t\t\t\t\tAddress add = list.get(0);\n\t\t\t\t\tDouble lat = add.getLatitude();\n\t\t\t\t\tDouble lng = add.getLongitude();\n\t\t\t\t\tPlace p = new Place(placename, placeaddress, placecity, ID, String.valueOf(lat), String.valueOf(lng));\n\t\t\t\t\tcurrentMember.addPlace(p);\n\t\t\t\t\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\tnew UpdatePlaceTask(lat, lng).execute().get();\n\t\t\t\t\t\tInputMethodManager imm =(InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);\n\t\t\t\t\t\timm.hideSoftInputFromWindow(cityET.getWindowToken(),0);\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t} \n\t\t\t\t\t\n\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t }\n\t\t});\n\t}", "private void fillPlacesList() {\n // Set up an ArrayAdapter to convert likely places into TextViews to populate the ListView\n ArrayAdapter<String> placesAdapter =\n new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, mLikelyPlaceNames);\n lstPlaces.setAdapter(placesAdapter);\n lstPlaces.setOnItemClickListener(listClickedHandler);\n }", "private void setupAutoComplete() {\n // Map between AutoCompleteTextViews and their Adapters. Some text fields have a custom\n // adapter whose data is updated dynamically (rather than being statically set)\n Map<AutoCompleteTextView, ArrayAdapter<String>> map = new HashMap<>();\n map.put(mBind.layoutWidthEdit, new LayoutDimenAutoComplAdapter(this, LAYOUT_DROPDOWN_ITEM));\n map.put(mBind.layoutHeightEdit, new LayoutDimenAutoComplAdapter(this, LAYOUT_DROPDOWN_ITEM));\n map.put(mBind.backgroundEdit, new ArrayAdapter<>(this, LAYOUT_DROPDOWN_ITEM, Data.getArrColors()));\n map.put(mBind.maxWidthEdit, new DimenAutoComplAdapter(this, LAYOUT_DROPDOWN_ITEM));\n map.put(mBind.maxHeightEdit, new DimenAutoComplAdapter(this, LAYOUT_DROPDOWN_ITEM));\n\n for (Map.Entry<AutoCompleteTextView, ArrayAdapter<String>> e : map.entrySet()) {\n e.getKey().setAdapter(e.getValue());\n // For the fields with custom adapters, set up listener, so that the data of the adapter\n // is updated on every keystroke (e.g. \"14\" -> {\"14dp\", \"14in\", \"14mm\", \"14px\", \"14sp\"})\n if (e.getValue() instanceof AutoComplAdapter) {\n e.getKey().addTextChangedListener(new MyTextWatcher() {\n @Override\n public void afterTextChanged(Editable s) {\n // Trigger filtering process on 's', which updates the data of this adapter\n e.getValue().getFilter().filter(s);\n }\n });\n }\n }\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n final AutocompletePrediction item = mAdapter.getItem(position);\n final String placeId = item.getPlaceId();\n final CharSequence primaryText = item.getPrimaryText(null);\n// mAutocompleteViewDest.setText(parent.toString());\n// Log.i(TAG, \"Autocomplete item selected: \" + primaryText);\n\n /*\n Issue a request to the Places Geo Data API to retrieve a Place object with additional\n details about the place.\n */\n PendingResult<PlaceBuffer> placeResult = Places.GeoDataApi\n .getPlaceById(mGoogleApiClient, placeId);\n placeResult.setResultCallback(mUpdatePlaceDetailsCallback);\n\n\n// Toast.makeText(getApplicationContext(), \"Clicked: \" + primaryText,\n// Toast.LENGTH_SHORT).show();\n\n\n }", "public ArrayListFoodAdapter(Context context, FoodDAO foodDAO, AutoCompleteTextView refAutocomplete) {\n super(foodDAO.getAllFood());\n this.foodDAO = foodDAO;\n mResults = foodDAO.getAllFood();\n// refAutocomplete.setAdapter(this);\n }", "@Override\n protected void onCreate(@Nullable Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n btnHit = (Button) findViewById(R.id.button);\n txtJson = (TextView) findViewById(R.id.textView2);\n\n btnHit.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n new JsonTask().execute(apiUrl);\n }\n });\n }", "private void autoCompleteField(int autoCompleteViewId, int editViewId, String dbField, String[] defaultValues) {\r\n\t\tmDbHelper.open();\r\n\t\tAutoCompleteTextView textView = (AutoCompleteTextView) findViewById(autoCompleteViewId);\r\n\t Cursor cursor = mDbHelper.fetch(dbField);\r\n\t if (cursor != null && cursor.getCount() > 0) {\r\n\t \tstartManagingCursor(cursor);\r\n\t\t\tint index = cursor.getColumnIndexOrThrow(dbField);\r\n\t \tList<String> field = new ArrayList<String>();\r\n\t \tif (defaultValues != null)\r\n\t \t\tfor (String value: defaultValues)\r\n\t \t\t\tfield.add(value);\r\n\t \tboolean last = false;\r\n\t \twhile (!last) {\r\n\t \t\tfield.add(cursor.getString(index));\r\n\t \t\tlast = cursor.isLast();\r\n\t \t\tcursor.moveToNext();\r\n\t \t}\r\n \t\tArrayAdapter<String> adapter = new ArrayAdapter<String>(this, editViewId, field);\r\n \t\ttextView.setAdapter(adapter);\r\n\t }\r\n\t mDbHelper.close();\r\n\t}", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n // Check that the result was from the autocomplete widget.\n if (requestCode == REQUEST_CODE_AUTOCOMPLETE) {\n if (resultCode == RESULT_OK) {\n // Get the user's selected place from the Intent.\n Place place = PlaceAutocomplete.getPlace(this, data);\n Log.i(TAG, \"Place Selected: \" + place.getName());\n\n // Format the place's details and display them in the TextView.\n eventEditVenue.setText(place.getName().toString().trim());\n eventEditAddres.setText(place.getAddress().toString().trim());\n\n // Display attributions if required.\n CharSequence attributions = place.getAttributions();\n// if (!TextUtils.isEmpty(attributions)) {\n// mPlaceAttribution.setText(Html.fromHtml(attributions.toString()));\n// } else {\n// mPlaceAttribution.setText(\"\");\n// }\n } else if (resultCode == PlaceAutocomplete.RESULT_ERROR) {\n Status status = PlaceAutocomplete.getStatus(this, data);\n Log.e(TAG, \"Error: Status = \" + status.toString());\n } else if (resultCode == RESULT_CANCELED) {\n // Indicates that the activity closed before a selection was made. For example if\n // the user pressed the back button.\n }\n }\n }", "@Override\n protected void onCreate(@Nullable Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_map);\n mSearchText = (AutoCompleteTextView) findViewById(R.id.input_search);\n mGps = (ImageView) findViewById(R.id.ic_gps);\n // mBd= FirebaseDatabase.getInstance().getReference().child(\"Patients\");\n // mBd.push().setValue(marker);\n\n getLocationPermission();\n Places.initialize(getApplicationContext(),\"AIzaSyCo2VRdwGMQmSeVKzSfvGrgCN0Vuy4i7u0\");\n mSearchText.setFocusable(false);\n mSearchText.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n List<Place.Field> fieldList= Arrays.asList(Place.Field.ADDRESS, Place.Field.LAT_LNG, Place.Field.NAME);\n Intent intent = new Autocomplete.IntentBuilder(AutocompleteActivityMode.OVERLAY, fieldList).build(MapActivity.this);\n startActivityForResult(intent,100);\n }\n });\n\n //getLocationPermission();\n }", "public void onCreateView(JTextPane textEditorView) {\n\t\t\r\n\t\tthis.classNameText = \"JabaProgram\";\r\n\t\tthis.textEditorView = textEditorView;\r\n\t\t\r\n\t\t//this.assignAutoCompleteFunction();\r\n\t\t\r\n\t\t//return this.parentView;\r\n\t}", "public AutoCompleteTextView(Context context, AttributeSet attrs) {\n/* 98 */ super((Context)null); throw new RuntimeException(\"Stub!\");\n/* */ }", "@Override\n public void onHistoryItemClicked(String history_item) {\n editText.setText(history_item);\n editText.setCursorVisible(false);\n editTextMode = false;\n\n previousSearchTerm = editText.getText().toString();\n\n InputMethodManager inputManager = (InputMethodManager) getSystemService\n (Context.INPUT_METHOD_SERVICE);\n inputManager.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(),\n InputMethodManager.HIDE_NOT_ALWAYS);\n searchHistoryView.setVisibility(View.INVISIBLE);\n mCursor = utils.queryCombinedArticleLists(editText.getText().toString());\n\n LinearLayoutManager linearLayoutManager = new LinearLayoutManager(SearchActivity.this);\n SearchArticlesAdapter adapter = new SearchArticlesAdapter(SearchActivity.this, SEARCH_ACTIVITY);\n adapter.setCursor(mCursor);\n mRecyclerView.setAdapter(adapter);\n mRecyclerView.setLayoutManager(linearLayoutManager);\n }", "public AutocompleteProvider(){\r\n root = null;\r\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.sqliteexample);\n\t\t// Buttons\n\t\tsqlUpdate = (Button) findViewById(R.id.bUpdateSQL);\n\t\tsqlView = (Button) findViewById(R.id.bViewSQL);\n\t\tsqlGetInfo = (Button) findViewById(R.id.bGet);\n\t\t\n\t\tsqlModify = (Button) findViewById(R.id.bEdit);\n\t\tsqlDelete = (Button) findViewById(R.id.bDelete);\n\n\t\t// Edit texts\n\t\tsqlName = (EditText) findViewById(R.id.actvName);\n\t\tsqlProduct = (EditText) findViewById(R.id.etProduct);\n\t\tsqlRow = (EditText) findViewById(R.id.etRowId);\n\n\t\tsqlView.setOnClickListener(this);\n\t\tsqlUpdate.setOnClickListener(this);\n\t\tsqlGetInfo.setOnClickListener(this);\n\t\tsqlModify.setOnClickListener(this);\n\t\tsqlDelete.setOnClickListener(this);\n\t\t\n\t\tordersHolder autoComplete = new ordersHolder(DropDown.this);\n\t\t//ALWAYS OPEN AND CLOSE THE HOLDER!!!!!!!!!\n\t\tautoComplete.open();\n\t\tArrayList<String> operativesNames = autoComplete.getNames();\n\t\tautoComplete.close();\n\n\t\t//this auto completes the form\n\t\tArrayAdapter<String> adapter = new ArrayAdapter<String>(this,\n\t\t\t\tandroid.R.layout.simple_dropdown_item_1line, operativesNames);\n\t\t\t\tAutoCompleteTextView textView = (AutoCompleteTextView)\n\t\t\t\tfindViewById(R.id.actvName);\n\t\t\t\ttextView.setThreshold(2);\n\t\t\t\ttextView.setAdapter(adapter);\n\t\t}", "@Override\r\n public void initialize(URL url, ResourceBundle rb) {\r\n \r\n AutoCompletionBinding<Project> txt_name = TextFields.bindAutoCompletion(name, new Callback<AutoCompletionBinding.ISuggestionRequest, Collection<Project>>() {\r\n\r\n @Override\r\n public Collection<Project> call(AutoCompletionBinding.ISuggestionRequest param) {\r\n List<Project> list = null;\r\n HttpHelper helper = new HttpHelper();\r\n try {\r\n LovHandler lovHandler = new LovHandler(\"projects\", \"PROJECT\");\r\n String response = lovHandler.getSuggestions(param.getUserText());\r\n list = (List<Project>) new JsonHelper().convertJsonStringToObject(response, new TypeReference<List<Project>>() {\r\n });\r\n } catch (IOException ex) {\r\n Logger.getLogger(ProjectController.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n\r\n return list;\r\n }\r\n\r\n \r\n }, new StringConverter<Project>() {\r\n\r\n @Override\r\n public String toString(Project object) {\r\n return object.getName() + \" (ID:\" + object.getId() + \")\";\r\n }\r\n\r\n @Override\r\n public Project fromString(String string) {\r\n throw new UnsupportedOperationException(\"Not supported yet.\");\r\n }\r\n });\r\n\r\n //event handler for setting other Client fields with values from selected Client object\r\n //fires after autocompletion\r\n txt_name.setOnAutoCompleted(new EventHandler<AutoCompletionBinding.AutoCompletionEvent<Project>>() {\r\n\r\n @Override\r\n public void handle(AutoCompletionBinding.AutoCompletionEvent<Project> event) {\r\n Project project = event.getCompletion();\r\n //fill other item related fields\r\n \r\n PROJECT.setText(splitName(name.getText()));\r\n \r\n \r\n //populateAuditValues(client);\r\n }\r\n });\r\n // TODO\r\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.main);\n \n keywordList = new String[10];\n incDecList = new String[10];\n valueList = new String[10];\n \n new loadKeywordList().execute(\"\");\n }", "private void getLocation() {\n fields = Arrays.asList(Place.Field.ID, Place.Field.NAME, Place.Field.LAT_LNG);\n\n // Start the autocomplete intent.\n Intent intent = new Autocomplete.IntentBuilder(\n AutocompleteActivityMode.FULLSCREEN, fields)\n .build(this);\n startActivityForResult(intent, AUTOCOMPLETE_REQUEST_CODE);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_search, container, false);\n autoCompViewto = (AutoCompleteTextView) view.findViewById(R.id.autoComplete2);\n citychanged=(Button) view.findViewById(R.id.citychange);\n citySelected=(TextView) view.findViewById(R.id.city);\n //citySelected.setText(\"City Selected \\n Default (Bangalore)\");\n citychanged.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n // TODO Auto-generated method stub\n displayCitylist();\n }\n });\n autoCompViewto.setAdapter(new PlacesAutoCompleteAdapter(context, R.layout.list_item));\n autoCompViewto.setOnItemClickListener(this);\n\n autoCompViewto.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if(!isCitySelected) {\n isCitySelected=true;\n }\n }\n });\n\n\n autoCompViewfrom = (AutoCompleteTextView) view.findViewById(R.id.autoComplete1);\n autoCompViewfrom.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if(!isCitySelected) {\n displayCitylist();\n isCitySelected=true;\n }\n }\n });\n autoCompViewfrom.setAdapter(new PlacesAutoCompleteAdapter(context, R.layout.list_item));\n autoCompViewfrom.setSelection(0);\n autoCompViewfrom.setOnItemClickListener(this);\n isCurr=false;\n Night_fare=(CheckBox) view.findViewById(R.id.NightFare);\n //Night_fare.isChecked(false);\n isNight=false;\n search= (CircleButton) view.findViewById(R.id.search_btn);\n curLoc=(Button) view.findViewById(R.id.Cur_button);\n curLoc.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n isCurr=true;\n autoCompViewfrom.setText(\"My Location\");\n }\n });\n\n\n search.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if (autoCompViewto.getText() == null || autoCompViewfrom.getText() == null || autoCompViewto.getText().length() == 0 || autoCompViewfrom.getText().length() == 0) {\n AlertDialog.Builder builder1 = new AlertDialog.Builder(context);\n builder1.setMessage(\"Please Enter the From and To Address...!!!\");\n builder1.setCancelable(false);\n builder1.setPositiveButton(\"OK\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n }\n });\n\n AlertDialog alert11 = builder1.create();\n alert11.show();\n\n } else {\n\n isNight = false;\n if (Night_fare.isChecked()) isNight = true;\n Log.d(\"shared_preference\", \" \" + isNight);\n Intent intent = new Intent(context, mapGetDirections.class);\n intent.putExtra(\"toLocation\", autoCompViewto.getText().toString());\n intent.putExtra(\"fromLocation\", autoCompViewfrom.getText().toString());\n intent.putExtra(\"cur_location\", isCurr);\n intent.putExtra(\"Itsnight\", isNight);\n isCurr = false;\n isCitySelected=false;\n Night_fare.setChecked(false);\n startActivity(intent);\n autoCompViewfrom.getText().clear();\n autoCompViewto.getText().clear();\n }\n }\n });\n return view;\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_place);\n }", "private void loadAutoCompleteData() {\n List<String> labelsItemName = db.getAllItemsNames();\n // Creating adapter for spinner\n ArrayAdapter<String> dataAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1,\n labelsItemName);\n\n // Drop down layout style - list view with radio button\n dataAdapter.setDropDownViewResource(android.R.layout.simple_list_item_1);\n\n // attaching data adapter to spinner\n autoCompleteTextViewSearchItem.setAdapter(dataAdapter);\n\n // List - Get Menu Code\n List<String> labelsMenuCode = db.getAllMenuCodes();\n // Creating adapter for spinner\n ArrayAdapter<String> dataAdapter1 = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1,\n labelsMenuCode);\n\n // Drop down layout style - list view with radio button\n dataAdapter1.setDropDownViewResource(android.R.layout.simple_list_item_1);\n\n // attaching data adapter to spinner\n autoCompleteTextViewSearchMenuCode.setAdapter(dataAdapter1);\n\n POS_LIST = ArrayAdapter.createFromResource(this, R.array.poscode, android.R.layout.simple_spinner_item);\n spnr_pos.setAdapter(POS_LIST);\n\n // barcode\n List<String> labelsBarCode = db.getAllBarCodes();\n ArrayAdapter<String> dataAdapter11 = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1,\n labelsBarCode);\n dataAdapter11.setDropDownViewResource(android.R.layout.simple_list_item_1);\n autoCompleteTextViewSearchItemBarcode.setAdapter(dataAdapter11);\n\n }", "protected KeyBoardButton(String keyView){\r\n\t\tsuper(keyView); // setting text\r\n\t\t_keyView = keyView; //saving as an internal field\r\n\t\tthis.setToolTipText(_keyView); //setting tooltip\r\n\t\t_keyBoardButtons.add(this); //adding to arraylist\r\n\t}", "@SuppressLint(\"ResourceAsColor\")\r\n\t@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\r\n\t\tsetContentView(R.layout.activity_mycollect);\r\n\t\tsetTitle(\"历史记录\");\r\n\t\tisShowLeftView(true);\r\n\t\tisShowRightView(R.string.edit, false);\r\n\t\tsetRightTextColor(R.color.white);\r\n\t\tViewUtils.inject(this);\r\n\r\n\t\thttp = new HttpUtil(this);\r\n\t\thttp.setHttpCallBack(this);\r\n\t\tgson = new Gson();\r\n\t\thttp.getOilHistory();\r\n\t}", "public interface GooglePlacesApi {\n\n @GET(\"maps/api/place/autocomplete/json?type=(cities)&language=es\")\n Call<PredictionResult> autoComplete(@Query(\"input\") String text);\n\n @GET(\"maps/api/place/details/json\")\n Call<DetailsResult> getPlaceDetails(@Query(\"place_id\") String text);\n\n\n}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n //setup view and toolbar\n setContentView(R.layout.activity_suggestions);\n setupToolbar(R.id.suggestions_toolbar, true);\n\n //read extras from intent\n Intent intent = getIntent();\n String searchTerm = intent.getStringExtra(EXTRA_SEARCH_TERM);\n ArrayList<String> placeIds = intent.getStringArrayListExtra(EXTRA_PLACE_IDS);\n\n //read from save instance state\n if (savedInstanceState != null) {\n //restore last shown state\n showingMap = savedInstanceState.getBoolean(STATE_SHOWING_MAP, false);\n\n //restore latlngs\n userLatLng = savedInstanceState.getParcelable(STATE_USER_LATLNG);\n friendLatLng = savedInstanceState.getParcelable(STATE_FRIEND_LATLNG);\n midLatLng = savedInstanceState.getParcelable(STATE_MID_LATLNG);\n\n //restore info related to data paging\n pageNumber = savedInstanceState.getInt(STATE_PAGE_NUMBER, pageNumber);\n hasMoreData = savedInstanceState.getBoolean(STATE_HAS_MORE_DATA, hasMoreData);\n nextUrl = savedInstanceState.getString(STATE_NEXT_URL, nextUrl);\n Log.d(TAG, String.format(\"onCreate: savedInstanceState != null. PageNumber:%d, HasMoreData:%s, NextUrl:%s\",\n pageNumber, hasMoreData, nextUrl));\n\n //restore map of selected ids\n ArrayList<String> selectedIdsList = savedInstanceState.getStringArrayList(STATE_SELECTED_IDS);\n ArrayList<Integer> selectedPositionsList = savedInstanceState.getIntegerArrayList(STATE_SELECTED_POSITIONS);\n if (selectedIdsList != null && selectedPositionsList != null) {\n selectedIdsMap.ensureCapacity(selectedIdsList.size());\n for (int i=0; i < selectedIdsList.size(); i++) {\n selectedIdsMap.put(selectedIdsList.get(i), selectedPositionsList.get(i));\n }\n }\n }\n\n //initialize and store references to fragments (must be done before calling showFragment)\n FragmentManager fm = getSupportFragmentManager();\n fragments[LIST] = fm.findFragmentById(R.id.list_fragment);\n fragments[MAP] = fm.findFragmentById(R.id.map_fragment);\n fragments[DATA] = fm.findFragmentByTag(FRAGMENT_TAG_SUGGESTION_DATA);\n if (fragments[DATA] == null) {\n Log.d(TAG, \"onCreate: Data fragment is null so creating a new one now\");\n fragments[DATA] = SuggestionsDataFragment.newInstance(searchTerm,\n PreferenceUtils.getPreferredSearchRadiusInMeters(this),\n PreferenceUtils.getPreferredSearchLimit(this),\n getResources().getDimensionPixelSize(R.dimen.profile_image_size),\n PreferenceUtils.getPreferredDataSource(this));\n fm.beginTransaction()\n .add(fragments[DATA], FRAGMENT_TAG_SUGGESTION_DATA)\n .disallowAddToBackStack()\n .commit();\n }\n\n //show the list fragment if this is the first time (i.e. no savedInstanceState) or\n //restore the view to the last fragment when we last left the activity\n if (showingMap) showMapFragment(false); //false == don't add to backstack\n else showListFragment(false);\n\n //check to make sure latlngs are not null\n //note: even in configuration change, it's possible that the activity was destroyed before the latlngs were set with values\n if (userLatLng == null || friendLatLng == null || midLatLng == null) {\n //latlngs are null so start the place service to get the latlngs\n Log.d(TAG, \"onCreate: LatLngs are null. Starting PlacesService\");\n startService(PlacesService.buildGetPlaceByIdIntent(this, placeIds));\n }\n else {\n //latlngs are not null so initialize the loader to fetch suggestions from the network\n Log.d(TAG, \"onCreate: LatLngs are not null. Fetching data from cache\");\n ((SuggestionsDataFragment) fragments[DATA]).fetchSuggestions(pageNumber, nextUrl); //since this is the initial call, nextUrl is null\n }\n }", "public void GetPlace(String placeid,\n String key,\n Callback<GooglePlaceData> cb) {\n if (CMAppGlobals.DEBUG) Logger.i(TAG, \":: GoogleModel.GetAutocomplete placeid : \" + placeid\n + \" : key : \" + key\n + \" : cb : \" + cb);\n\n Call<GooglePlaceData> googleGeocodeCall = googleService.GetPlace(placeid, key);\n googleGeocodeCall.enqueue(cb);\n\n }", "public interface FriendAutoCompleterFactory {\n\n /**\n * Returns a FriendLibraryAutocompleter that will supply suggestions based\n * on category.\n */\n public abstract AutoCompleteDictionary getDictionary(SearchCategory categoryToSearch);\n\n /**\n * Returns a FriendLibraryPropertyAutocompleter that will supply suggestions\n * based on category and FilePropertyKey combination.\n */\n public abstract AutoCompleteDictionary getDictionary(SearchCategory categoryToSearch,\n FilePropertyKey filePropertyKey);\n\n}", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tinit();\r\n\t\taddView = (TextView) findViewById(R.id.id_submit_view);\r\n\t\taddView.setOnClickListener(new OnClickListener() {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tgatewayId = gatewayView.getEditableText().toString();\r\n\t\t\t\tLog.i(TAG, \"gatewayId \" + gatewayId.trim());\r\n\t\t\t\tgatewayId = gatewayId.trim();\r\n\t\t\t\tif(gatewayId.trim().isEmpty()){\r\n\t\t\t\t\tbindHintView.setVisibility(View.VISIBLE);\r\n\t\t\t\t\tbindbarView.setVisibility(View.GONE);\r\n\t\t\t\t\tbindHintView.setText(R.string.bind_gateway_none);\r\n\t\t\t\t\tbindHintView.setTextColor(getResources().getColor((R.color.red)));\r\n\t\t\t\t}else {\r\n\t\t\t\t\tsetHintVisible(true);\r\n\t\t\t\t\tnew Thread(new BindRunnale()).start();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t}", "private void initAutoCompleteAdapter(){\n adapterAcGeneric = new GenericAcAdapter(getActivity(),\n android.R.layout.simple_dropdown_item_1line);\n ac_generics.setThreshold(0);\n ac_generics.setAdapter(adapterAcGeneric);\n ac_generics.setOnItemClickListener(\n new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View view,\n int position, long id) {\n //selectedText.setText(autoSuggestAdapter.getObject(position));\n genericName = adapterAcGeneric.getObject(position);\n makeApiCallForSearch();\n CommonMethods.hideKeybaord(getActivity());\n }\n });\n ac_generics.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int\n count, int after) {\n }\n @Override\n public void onTextChanged(CharSequence s, int start, int before,\n int count) {\n genericName = \"\";\n handlerGeneric.removeMessages(TRIGGER_AUTO_COMPLETE);\n handlerGeneric.sendEmptyMessageDelayed(TRIGGER_AUTO_COMPLETE,\n AUTO_COMPLETE_DELAY);\n }\n @Override\n public void afterTextChanged(Editable s) {\n }\n });\n handlerGeneric = new Handler(new Handler.Callback() {\n @Override\n public boolean handleMessage(Message msg) {\n if (msg.what == TRIGGER_AUTO_COMPLETE) {\n if (!TextUtils.isEmpty(ac_generics.getText())) {\n // Log.d(\"DEBUG\", \"in generic\");\n makeApiCall(ac_generics.getText().toString(), 1);\n }\n }\n return false;\n }\n });\n\n\n adapterAcCompany = new CompanyAcAdapter(getActivity(),\n android.R.layout.simple_dropdown_item_1line);\n ac_companies.setThreshold(0);\n ac_companies.setAdapter(adapterAcCompany);\n ac_companies.setOnItemClickListener(\n new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View view,\n int position, long id) {\n //selectedText.setText(autoSuggestAdapter.getObject(position));\n companyName = adapterAcCompany.getObject(position);\n makeApiCallForSearch();\n CommonMethods.hideKeybaord(getActivity());\n }\n });\n ac_companies.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int\n count, int after) {\n }\n @Override\n public void onTextChanged(CharSequence s, int start, int before,\n int count) {\n companyName = \"\";\n handlerCompany.removeMessages(TRIGGER_AUTO_COMPLETE);\n handlerCompany.sendEmptyMessageDelayed(TRIGGER_AUTO_COMPLETE,\n AUTO_COMPLETE_DELAY);\n }\n @Override\n public void afterTextChanged(Editable s) {\n }\n });\n handlerCompany = new Handler(new Handler.Callback() {\n @Override\n public boolean handleMessage(Message msg) {\n if (msg.what == TRIGGER_AUTO_COMPLETE) {\n if (!TextUtils.isEmpty(ac_companies.getText())) {\n //Log.d(\"DEBUG\", \"in company\");\n makeApiCall(ac_companies.getText().toString(), 2);\n }\n }\n return false;\n }\n });\n\n\n ac_companies.setOnFocusChangeListener(new View.OnFocusChangeListener() {\n @Override\n public void onFocusChange(View view, boolean hasFocus) {\n if (hasFocus) {\n Log.d(\"DEBUG\", \"1\");\n makeApiCall(\"\", 2);\n\n // Toast.makeText(getActivity(), \"Got the focus\", Toast.LENGTH_SHORT).show();\n } else {\n // Toast.makeText(getActivity(), \"Lost the focus\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n\n ac_generics.setOnFocusChangeListener(new View.OnFocusChangeListener() {\n @Override\n public void onFocusChange(View view, boolean hasFocus) {\n if (hasFocus) {\n Log.d(\"DEBUG\", \"2\");\n makeApiCall(\"\", 1);\n // Toast.makeText(getActivity(), \"Got the focus\", Toast.LENGTH_SHORT).show();\n } else {\n // Toast.makeText(getActivity(), \"Lost the focus\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n\n\n }", "private void displayView() {\r\n\t\t/* Layout */\r\n\t\tmLayout = new StandardTitledLayout(this);\r\n\t\tmLayout.setTitle(getString(R.string.directory_searchView_title));\r\n\r\n\t\t//Add the little magnifying glass on the virtual keyboard\r\n\t\tmInputBar = new InputBarElement(this, null,getString(R.string.directory_searchView_hint));\r\n\t\t//and set what it does\r\n\t\tmInputBar.setImeOptions(EditorInfo.IME_ACTION_SEARCH);\r\n\t\tmInputBar.setOnEditorActionListener(new OnEditorActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic boolean onEditorAction(TextView v, int actionId, KeyEvent event) {\r\n\t\t\t\tif(actionId == EditorInfo.IME_ACTION_SEARCH){\r\n\t\t\t\t\tString query = mInputBar.getInputText();\r\n\t\t\t\t\tsearch(query);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tmInputBar.setOnButtonClickListener(new OnClickListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\tString query = mInputBar.getInputText();\r\n\t\t\t\tsearch(query);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tmInputBar.setOnKeyPressedListener(new OnKeyPressedListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void onKeyPressed(String text) {\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tif(mInputBar.getInputText().length() == 0){\r\n\t\t\t\t\tmInputBar.setButtonText(null);\r\n\t\t\t\t\tmAdapter = new ArrayAdapter<String>(getApplicationContext(), R.layout.sdk_list_entry, R.id.sdk_list_entry_text, new ArrayList<String>());\r\n\r\n\t\t\t\t\tmListView.setAdapter(mAdapter);\r\n\t\t\t\t\tmListView.invalidate();\r\n\t\t\t\t\t\r\n\t\t\t\t}else{\r\n\t\t\t\t\tmInputBar.setButtonText(\"\");\r\n\t\t\t\t\tmController.getAutoCompleted(text);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tmLayout.addFillerView(mInputBar);\r\n\t\tsetContentView(mLayout);\r\n\t\t\r\n\t\r\n\t}", "QKeyListTerm createKeyListTerm();", "public void doneClicked(View view)\n {\n EditText locationName = (EditText) findViewById(R.id.nameInput);\n EditText locationDesc = (EditText) findViewById(R.id.descInput);\n EditText locationCat = (EditText) findViewById(R.id.categoryInput);\n EditText locAddrTitle = (EditText) findViewById(R.id.addrTitleInput);\n EditText locAddrStreet = (EditText) findViewById(R.id.addrStreetInput);\n EditText locElevation = (EditText) findViewById(R.id.elevationInput);\n EditText locLatitude = (EditText) findViewById(R.id.latitudeInput);\n EditText locLongitude = (EditText) findViewById(R.id.longitudeInput);\n\n // Validate input\n if (!validEntry())\n {\n createStatusDialog(getResources().getString(R.string.create_title_fail),\n getResources().getString(R.string.create_msg_fail));\n }\n else\n {\n // Retrieve values from fields\n String name = locationName.getText().toString().trim();\n String description = locationDesc.getText().toString().trim();\n String category = locationCat.getText().toString().trim();\n String addrTitle = locAddrTitle.getText().toString().trim();\n String addrStreet = locAddrStreet.getText().toString().trim();\n float elevation = Float.parseFloat(locElevation.getText().toString().trim());\n float latitude = Float.parseFloat(locLatitude.getText().toString().trim());\n float longitude = Float.parseFloat(locLongitude.getText().toString().trim());\n\n // Generate place\n currentPlace = new PlaceDescription(name, description, category, addrTitle, addrStreet,\n elevation, latitude, longitude, currentPlace.id);\n\n // Add intent data and start activity\n Intent intent = new Intent(PlaceActivity.this, LibViewActivity.class);\n Bundle bundle = new Bundle();\n bundle.putSerializable(\"place\", currentPlace);\n intent.putExtras(bundle);\n intent.putExtra(\"edit\", edit);\n startActivity(intent);\n }\n }", "private AutoCompletionTextInputBinding(final TextInputControl textInputControl,\n Callback<ISuggestionRequest, Collection<T>> suggestionProvider) {\n\n this(textInputControl,\n suggestionProvider,\n AutoCompletionTextInputBinding.defaultStringConverter(),\n new ReplaceStrategy());\n }", "public void onModuleLoad() {\n useCorrectRequestBaseUrl();\n ClientFactory clientFactory = GWT.create(ClientFactory.class);\n EventBus eventBus = clientFactory.getEventBus();\n //this is for history\n PlaceController placeController = clientFactory.getPlaceController();\n\n ActivityMapper activityMapper = new TritonActivityMapper(clientFactory);\n ActivityManager activityManager = new ActivityManager(activityMapper, eventBus);\n activityManager.setDisplay(appWidget);\n\n TritonPlaceHistoryMapper historyMapper = GWT.create(TritonPlaceHistoryMapper.class);\n PlaceHistoryHandler historyHandler = new PlaceHistoryHandler(historyMapper);\n historyHandler.register(placeController, eventBus, defaultPlace);\n\n RootPanel.get().add(appWidget);\n historyHandler.handleCurrentHistory();\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n TextView tv = new TextView(this);\n tv.setText(\"请在拨号键盘输入*#*#0123#*#*, 你会有发现哦~\");\n tv.setTextSize(30);\n setContentView(tv);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.set_value);\n mKeyEdit = (EditText) findViewById(R.id.key);\n mKeyEdit.setOnFocusChangeListener(new View.OnFocusChangeListener() {\n @Override\n public void onFocusChange(View view, boolean hasFocus) {\n if (!hasFocus && TextUtils.isEmpty(mValueEdit.getText())) {\n fetchValue(mKeyEdit.getText().toString());\n }\n }\n });\n mKeyEdit.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n mValueEdit.getText().clear();\n }\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n }\n\n @Override\n public void afterTextChanged(Editable s) {\n mHandler.removeCallbacks(mFetchRunnable);\n mHandler.postDelayed(mFetchRunnable, 500);\n }\n });\n mValueEdit = (EditText) findViewById(R.id.value);\n mSetValueBtn = (Button) findViewById(R.id.btn_set_value);\n mSetValueBtn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n new CacheSaveTask().execute(new KeyValue(mKeyEdit.getText().toString(),\n mValueEdit.getText().toString()));\n }\n });\n new CacheLoadTask().execute();\n }", "@Override\n public void onCreate(){\n super.onCreate();\n createGoogleAPIClient();\n Log.i(TAG, \"On Create\");\n }", "@Override\n public void onCreate(Bundle savedInstanceState)\n {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.main);\n\n TextView tv = (TextView) findViewById(R.id.text);\n Gson gson = new Gson();\n String jsonString = gson.toJson(STRINGS);\n tv.setText(jsonString);\n }", "private void initView() {\n wvProvince = findViewById(R.id.wheelv_province);\r\n wvCity = findViewById(R.id.wheelv_city);\r\n wvArea = findViewById(R.id.wheelv_area);\r\n\r\n findViewById(R.id.tv_addresspicker_confirm).setOnClickListener(this);\r\n // findViewById(R.id.tv_addresspicker_exit).setOnClickListener(this);\r\n\r\n // if (!TextUtils.isEmpty(title)) tvAddressTitle.setText(title);\r\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.activity_search_bluetooth);\n\t\tinitView();\n\t}", "private void initAutoTextView() {\n autotxtv.next();\n sCount++;\n autotxtv.setText(sCount % 2 == 0 ? \" 『 “光华戈十” 益行者计划---_李四』上线了!\"\n : \"『停下脚步聆听孩子的声音』上线了!\");\n handler.sendEmptyMessageDelayed(1,2000);\n }", "private void initView() {\n mRetrofit = new Retrofit.Builder()\n .baseUrl(Challenge1Activity.MY_BASE_URL)\n .addConverterFactory(GsonConverterFactory.create())\n .build();\n\n mTextViewDisplayTopRated = findViewById(R.id.text_view_display_toprated_movies);\n\n mTextViewPrev = findViewById(R.id.text_view_prev);\n mTextViewCurrentAndMaxPage = findViewById(R.id.text_view_current_and_max_page);\n mTextViewNext = findViewById(R.id.text_view_next);\n }", "public void createViews(){\n ArrayList<Words> wordsArrayList = new ArrayList<Words>();\n\n //Fill array with english word and hindi translation by creating new word objects\n for(int i = 0; i < defaultWords.size() && i < hindiTranslation.size(); i++){\n wordsArrayList.add(new Words(defaultWords.get(i), hindiTranslation.get(i)));\n }\n\n //ArrayAdapter and ListView used so that not a lot of memory is used to create all textviews when not needed\n //Update** Using WordAdapter which extends ArrayAdapter and only has 2 parameters\n\n WordAdapter adapter = new WordAdapter(this, wordsArrayList);\n\n ListView listView = (ListView) findViewById(R.id.translation_root_view);\n\n listView.setAdapter(adapter);\n\n\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\n\t\tsetContentView(R.layout.inputview);\n\n\t\t//\t\tmTts.setLanguage(Locale.UK);\n\t\t//\t\tprint(\"UK available: \" + mTts.isLanguageAvailable(Locale.UK));\n\n\n\t\tmInputEditText = (EditText) findViewById(R.id.input_edittext);\n\t\tmGoButton = (Button) findViewById(R.id.go_button);\n\n\t\tString extra = getIntent().getStringExtra(Constants.EXTRA_INPUT_STRING);\n\t\tif(null!=extra){\n\t\t\tmInputEditText.setText(extra);\n\t\t}\n\n\t\tmGoButton.setOnClickListener(new OnClickListener() {\n\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tIntent i = new Intent(InputView.this,QuestionView.class);\n\t\t\t\ti.putExtra(Constants.EXTRA_INPUT_STRING, mInputEditText.getText().toString());\n\t\t\t\ti.putExtra(Constants.EXTRA_INPUT_TYPE, State.getDestinationType(mInputEditText.getText().toString()));\n\t\t\t\tstartActivity(i);\n\t\t\t}\n\t\t});\n\n\t\tmInputEditText.setOnKeyListener(new OnKeyListener() {\n\t\t\tpublic boolean onKey(View v, int keyCode, KeyEvent event) {\n\t\t\t\t// If the event is a key-down event on the \"enter\" button\n\t\t\t\tif ((event.getAction() == KeyEvent.ACTION_DOWN) &&\n\t\t\t\t\t\t(keyCode == KeyEvent.KEYCODE_ENTER)) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\t\t});\n\t}", "private void set_autotext_adapters(){\n ArrayAdapter<String> amount_adapter = new ArrayAdapter<>(this,\n android.R.layout.simple_dropdown_item_1line, amount_autos);\n amount_text = (AutoCompleteTextView)\n findViewById(R.id.add_group_transaction_amount);\n amount_text.setAdapter(amount_adapter);\n ArrayAdapter<String> memo_adapter = new ArrayAdapter<>(this,\n android.R.layout.simple_dropdown_item_1line, memo_autos);\n memo_text = (AutoCompleteTextView)\n findViewById(R.id.add_group_transaction_memo);\n memo_text.setAdapter(memo_adapter);\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tthis.setTitle(\"编辑生词本\");\n\t\tthis.setContentView(R.layout.editword);\n\t\tBundle bundle = this.getIntent().getExtras();\n\t\taction = bundle.getString(\"action\");\n\t\tinitWidgets();\n\t}", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.activity_destination);\n\n\t\t// Getting trip info from trip class through intent\n\t\tIntent fromTrip = getIntent();\n\t\ttName = fromTrip.getStringExtra(\"tripVal\");\n\t\tnPeople = fromTrip.getIntExtra(\"peopleVal\", 1);\n\n\t\t//Initializing widgets\n\t\tTextView txtDestinationHeader = (TextView) findViewById(R.id.txtDestinationHeader);\n\t\ttxtDestinationHeader.setText(tName);\n\t\tdestName = (EditText) findViewById(R.id.edtTextDestinationName);\n\t\tedtTextZip = (EditText) findViewById(R.id.edtTextZip);\n\t\tedtTextMemos = (EditText) findViewById(R.id.edtTextMemos);\n\t\tedtTextStreetAdress = (EditText) findViewById(R.id.edtTextStreetAdress);\n\t\tedtTextCity = (EditText) findViewById(R.id.edtTextCity);\n\t\tbtnAdd = (Button) findViewById(R.id.btnAdd);\n\t\tbtnUpdate = (Button) findViewById(R.id.btnUpdate);\n\t\tbtnNext = (Button) findViewById(R.id.btnNext);\n\t\tbtnDelete = (Button) findViewById(R.id.btnDelete);\n\t\tbtnMapView = (Button) findViewById(R.id.btnMapView);\n\n\t\t// List adapter configuration \n\t\taa = new ArrayAdapter<String>(this,\n\t\t\t\tandroid.R.layout.simple_list_item_1, placeName);\n\t\tsetListAdapter(aa);\n\t\t\n\t\t\n\t\t// Adding listeners to buttons\n\t\taa.notifyDataSetChanged();\n\t\tbtnAdd.setOnClickListener(this);\n\t\tbtnUpdate.setOnClickListener(this);\n\t\tbtnDelete.setOnClickListener(this);\n\t\tbtnNext.setOnClickListener(this);\n\t\tbtnMapView.setOnClickListener(this);\n\n\t\t// setting hints to guide user inputs\n\t\tdestName.setHint(\"Name destination\");\n\t\tedtTextZip.setHint(\"Zip Code\");\n\t\tedtTextMemos.setHint(\"Notes for this destination\");\n\t\tedtTextStreetAdress.setHint(\"Street Address\");\n\t\tedtTextCity.setHint(\"City\");\n\n\t}", "@Override\r\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\r\n\r\n\r\n\r\n\r\n new GetPlaces(this,getListView()).execute();\r\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == 1) {\n if (resultCode == RESULT_OK) {\n // retrive the data by using getPlace() method.\n Place place = PlaceAutocomplete.getPlace(this, data);\n String latlang = \"\" + place.getLatLng();\n Log.e(\"Tag\", \"Place: \" + place.getAddress() + place.getPhoneNumber());\n Log.d(\"LatLang\", latlang);\n\n dLat = Double.valueOf(getLattitude(latlang));\n dLang = Double.valueOf(getLangitude(latlang));\n Log.d(\"Lat\", \"\" + dLat);\n Log.d(\"Lang\", \"\" + dLang);\n\n destination.setText(place.getName());\n clearDest.setVisibility(View.VISIBLE);\n //selDest.setVisibility(View.GONE);\n recyclerView.setVisibility(View.VISIBLE);\n\n //Make call to Async\n //new GetRides().execute();\n fetchingRides();\n } else if (resultCode == PlaceAutocomplete.RESULT_ERROR) {\n Status status = PlaceAutocomplete.getStatus(this, data);\n // TODO: Handle the error.\n Log.e(\"Tag\", status.getStatusMessage());\n } else if (resultCode == RESULT_CANCELED) {\n // The user canceled the operation.\n }\n }\n\n else if (requestCode == 2) {\n if (resultCode == RESULT_OK) {\n // retrive the data by using getPlace() method.\n Place place = PlaceAutocomplete.getPlace(this, data);\n String latlang = \"\" + place.getLatLng();\n Log.e(\"Tag\", \"Place: \" + place.getAddress() + place.getPhoneNumber());\n Log.d(\"LatLang\", latlang);\n\n sLat = Double.valueOf(getLattitude(latlang));\n sLang = Double.valueOf(getLangitude(latlang));\n Log.d(\"Lat\", \"\" + sLat);\n Log.d(\"Lang\", \"\" + sLang);\n\n\n\n source.setText(place.getName());\n\n // selDest.setVisibility(View.GONE);\n recyclerView.setVisibility(View.VISIBLE);\n\n //Make call to Async\n //new GetRides().execute();\n fetchingRides();\n } else if (resultCode == PlaceAutocomplete.RESULT_ERROR) {\n Status status = PlaceAutocomplete.getStatus(this, data);\n // TODO: Handle the error.\n Log.e(\"Tag\", status.getStatusMessage());\n } else if (resultCode == RESULT_CANCELED) {\n // The user canceled the operation.\n }\n }\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_view_contact); //set the layout\n Toolbar myToolbar = (Toolbar) findViewById(R.id.my_toolbar); //create and set the toolbar with an options menu\n setSupportActionBar(myToolbar);\n getSupportActionBar().setDisplayHomeAsUpEnabled(true); //create and set the toolbar with an options menu\n\n\n initViews();\n }", "private void populateAdapter(String query) {\n // Create a matrixcursor, add suggtion strings into cursor\n final MatrixCursor c = new MatrixCursor(new String[]{ BaseColumns._ID, SearchManager.SUGGEST_COLUMN_TEXT_1 });\n List<String> suggestions = History.getSuggestion(query);\n String str = \"\";\n for (int i=0;i<suggestions.size();i++){\n c.addRow(new Object[] {i, suggestions.get(i)});\n str += suggestions.get(i);\n }\n Toast.makeText(context, str,Toast.LENGTH_SHORT).show();\n mAdapter.changeCursor(c);\n }", "private void fillWithDictionaries() {\n\t\trecentDictionaries = Preferences.getRecentDictionaries();\n\t\tListAdapter dictionaryList = new ListAdapter();\n\t\tsetListAdapter(dictionaryList);\n\t}", "public void openHistory() {\n usingHistoryScreen = true;\n myActivity.setContentView(R.layout.history);\n Button historyButtonToGame = myActivity.findViewById(R.id.button8);\n TextView historyText = myActivity.findViewById(R.id.textView46);\n historyText.setText(state.getHistory());\n historyText.setMovementMethod(new ScrollingMovementMethod());\n gui.invalidate();\n historyButtonToGame.setOnClickListener(\n new View.OnClickListener() {\n public void onClick(View v) {\n ShogiHumanPlayer.this.setAsGui(myActivity);\n usingHistoryScreen = false;\n if (state != null) {\n receiveInfo(state);\n }\n }\n });\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n final AutocompletePrediction item = mAdapter.getItem(position);\n final String placeId = item.getPlaceId();\n final CharSequence primaryText = item.getPrimaryText(null);\n\n Log.i(TAG, \"Autocomplete item selected: \" + primaryText);\n\n /*\n Issue a request to the Places Geo Data API to retrieve a Place object with additional\n details about the place.\n */\n PendingResult<PlaceBuffer> placeResult = Places.GeoDataApi\n .getPlaceById(mGoogleApiClient, placeId);\n placeResult.setResultCallback(mUpdatePlaceDetailsCallback);\n\n //Toast.makeText(getApplicationContext(), \"Clicked: \" + primaryText,\n // Toast.LENGTH_SHORT).show();\n Log.i(TAG, \"Called getPlaceById to get Place details for \" + placeId);\n }", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) \r\n\t{\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\t\t\r\n\t\t// Get a reference to the tranistbuddy model.\r\n\t\tTransitBuddyApp app = (TransitBuddyApp)this.getApplicationContext();\r\n\t\tmModel = app.getTransitBuddyModel();\r\n\t\tmSettings = app.getTransitBuddySettings();\r\n\t\t\r\n\t\tsetTitle( getString(R.string.title_prefix) + \" \" + mSettings.getSelectedCity());\r\n\t}", "public void btnNewQuote(View view){\n setupTextView();\n newQuote();\n quoteTextView.setText(Variables.quote);\n }", "private void openPlacesDialog() {\n DialogInterface.OnClickListener listener = new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n LatLng markerLatLng = mLikelyPlaceLatLngs[which];\n String markerSnippet = mLikelyPlaceAddresses[which];\n if (mLikelyPlaceAttributions[which] != null) {\n markerSnippet = markerSnippet + \"\\n\" + mLikelyPlaceAttributions[which];\n }\n\n mMap.addMarker(new MarkerOptions()\n .title(mLikelyPlaceNames[which])\n .position(markerLatLng)\n .snippet(markerSnippet));\n\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(markerLatLng,\n DEFAULT_ZOOM));\n }\n };\n\n // Display the dialog.\n AlertDialog dialog = new AlertDialog.Builder(this)\n // .setTitle(R.string.pick_place)\n .setItems(mLikelyPlaceNames, listener)\n .show();\n }", "private void initSearchBar(){\n /////// Code to run the autocomplete search bar\n\n //setContentView(R.layout.activity_item);\n\n //Reference the widget\n //AutoCompleteTextView searchBar = findViewById(R.id.search_items);\n searchBar = findViewById(R.id.search_items);\n\n //Create an array adapter to supply suggestions to the bar\n ArrayAdapter<String> itemAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1,itemsOnlyList);\n\n //Pass the adapter to the text field\n searchBar.setAdapter(itemAdapter);\n\n searchBar.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n InputMethodManager in = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n in.hideSoftInputFromWindow(view.getApplicationWindowToken(), 0);\n }\n });\n\n\n //Add items to the list based on click\n addItemButton = findViewById(R.id.button_AddItem);\n\n //Interact with the recycler view if the user clicks the plus button\n addItemButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n //Behaviour to add a new item to the recycler view\n\n // Find the card info class based on the user selection\n for (int m = 0; m < itemsOnlyList.length; m++){\n\n if(searchBar.getText().toString().equals(itemArray[m].getCardName().intern())){\n //Add the new card to the player hand array??\n playerCards.add(itemArray[m]);\n\n //Add the one card in question to this variable.\n playerCard = itemArray[m];\n\n //Leave the loop if a match is found\n break;\n }\n }\n\n updateListView(playerCards);\n }\n });\n\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.activity_history_appliances);\n\n\t\tgetActionBar().setHomeButtonEnabled(true);\n\t\tgetActionBar().setDisplayHomeAsUpEnabled(true);\n\n\t\ttvDistance = (TextView) findViewById(R.id.tvDistance);\n\t\ttvFuel = (TextView) findViewById(R.id.tvFuel);\n\t\ttvCar = (TextView) findViewById(R.id.tvCar);\n\t\ttvYear = (TextView) findViewById(R.id.tvYear);\n\n\t\tString id = getIntent().getStringExtra(\"id\");\n\t\tpopulateRecord(id);\n\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_word_form);\n score = (TextView) findViewById(R.id.tvScoreDisplay);\n dictionary = (TextView) findViewById(R.id.tvLettersCollected);\n submitButton = (Button) findViewById(R.id.btSubmitWord);\n for(int i = 0; i < str.length(); i++){\n LettersCollected.add(str.charAt(i));\n }\n for(Character l : LettersCollected) {\n dict.append(l + \" \");\n }\n dictionary.setText(dict);\n InputStream is = getResources().openRawResource(R.raw.dictionary);\n BufferedReader reader = new BufferedReader(new InputStreamReader(is));\n String word = null;\n try {\n word = reader.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n try {\n while (word != null) {\n Dictionary.add(word);\n word = reader.readLine();\n }\n reader.close();\n is.close();\n } catch (IOException e1) {\n e1.printStackTrace();\n }\n buttonPressed();\n\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.itemizedoverlay);\n\n\t\tmAutoCompleteTextView = (AutoCompleteTextView) findViewById(R.id.autoCompleteTextView_ItemizedOverlayDemo);\n\t\tmCheckBoxLocationInvisible = (CheckBox) findViewById(R.id.checkBoxLocationInvisible);\n\n\t\tmTextViewMid = (TextView) findViewById(R.id.TextViewmid_ItemizedOverlayDemo);\n\t\tmTextViewCar_name = (TextView) findViewById(R.id.TextViewcar_name_ItemizedOverlayDemo);\n\t\tmTextViewInfotime = (TextView) findViewById(R.id.TextViewinfotime_ItemizedOverlayDemo);\n\t\tmTextViewStatus = (TextView) findViewById(R.id.TextViewstatus_ItemizedOverlayDemo);\n\t\tmTextViewSpeed = (TextView) findViewById(R.id.TextViewspeed_ItemizedOverlayDemo);\n\t\tmTextViewLocation = (TextView) findViewById(R.id.TextViewlocation_ItemizedOverlayDemo);\n\n\t\tNetLocationManager.init(this, this);// 初始化\n\t\tmNetLocation = NetLocationManager.getInstance();\n\t\tResources res = this.getResources();\n\t\t_bmCar = BitmapFactory.decodeResource(res,\n\t\t\t\tR.drawable.i3_car00);\n\n\t\t\n\t\tCVariables.adapter监控车牌 = new com.tencent.mapsdkdemo.raster.ArrayAdapter<String>(\n\t\t\t\tthis, R.layout.simple_dropdown_item_1line, CVariables.List监控车牌);\n\t\tmAutoCompleteTextView.setAdapter(CVariables.adapter监控车牌);\n\n\t\tmAutoCompleteTextView.addTextChangedListener(new TextWatcher() {\n\t\t\t@Override\n\t\t\t// 这段是起什么作用;里面从参数怎么理解呀;谢谢\n\t\t\tpublic void onTextChanged(CharSequence s, int start, int before,\n\t\t\t\t\tint count) {\n\t\t\t\tString car_name = s.toString();\n\t\t\t\tif (count < 5) {\n\t\t\t\t\tCVariables.SelectedCCar = null;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tfor (Iterator Iterator = CVariables.mHashMapMonitor.values()\n\t\t\t\t\t\t.iterator(); Iterator.hasNext();) {\n\t\t\t\t\tCCar car = (CCar) Iterator.next();\n\n\t\t\t\t\tif (car.getCarame().equals(car_name)) {\n\t\t\t\t\t\tCVariables.SelectedCCar = car;\n\t\t\t\t\t\tmMapView.getController().setZoom(14);\n\t\t\t\t\t\tGeoPoint GeoPointCenter = new GeoPoint(\n\t\t\t\t\t\t\t\tCVariables.SelectedCCar.getLat(),\n\t\t\t\t\t\t\t\tCVariables.SelectedCCar.getLon());\n\t\t\t\t\t\tmMapView.getController().setCenter(GeoPointCenter);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tCVariables.SelectedCCar = null;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\t// 这段是起什么作用;里面从参数怎么理解呀;谢谢\n\t\t\tpublic void beforeTextChanged(CharSequence s, int start, int count,\n\t\t\t\t\tint after) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t}\n\n\t\t\t@Override\n\t\t\t// 这段是起什么作用;里面从参数怎么理解呀;谢谢\n\t\t\tpublic void afterTextChanged(Editable s) {\n\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t}\n\t\t});\n\n\t\t// simpleShowList();\n\t\t// 为所有列表项注册上下文菜单\n\t\tButton btnSetup = (Button) findViewById(R.id.btnSetup_ItemizedOverlayDemo);\n\t\tthis.registerForContextMenu(btnSetup);\n\t\tbtnSetup.setOnClickListener(new View.OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tonMonitor();\n\n\t\t\t}\n\t\t});\n\n\t\tButton buttonCancel = (Button) findViewById(R.id.buttonCancel_ItemizedOverlayDemo);\n\t\tbuttonCancel.setOnClickListener(new View.OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(View arg0) {\n\n\t\t\t\tnew AlertDialog.Builder(ItemizedOverlayDemo.this)\n\t\t\t\t\t\t.setTitle(\"提示\")\n\t\t\t\t\t\t.setMessage(\"确定退出?\")\n\t\t\t\t\t\t.setNegativeButton(\"取消\",\n\t\t\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,\n\t\t\t\t\t\t\t\t\t\t\tint which) {\n\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t.setPositiveButton(\"确定\",\n\t\t\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,\n\t\t\t\t\t\t\t\t\t\t\tint which) {\n\t\t\t\t\t\t\t\t\t\tGeoPoint GeoPointCenter = mMapView\n\t\t\t\t\t\t\t\t\t\t\t\t.getMapCenter();\n\t\t\t\t\t\t\t\t\t\tCVariables.centerx = GeoPointCenter\n\t\t\t\t\t\t\t\t\t\t\t\t.getLongitudeE6();\n\t\t\t\t\t\t\t\t\t\tCVariables.centery = GeoPointCenter\n\t\t\t\t\t\t\t\t\t\t\t\t.getLatitudeE6();\n\t\t\t\t\t\t\t\t\t\tCVariables.zoomlevel = mMapView\n\t\t\t\t\t\t\t\t\t\t\t\t.getZoomLevel();\n\t\t\t\t\t\t\t\t\t\tWriteSharedPreferencesForMap(\n\t\t\t\t\t\t\t\t\t\t\t\tCVariables.centerx,\n\t\t\t\t\t\t\t\t\t\t\t\tCVariables.centery,\n\t\t\t\t\t\t\t\t\t\t\t\tCVariables.zoomlevel);\n\t\t\t\t\t\t\t\t\t\thandler.removeCallbacks(Runnable取定位);\n\t\t\t\t\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}).show();\n\t\t\t}\n\t\t});\n\n\t\tButton btnEmpty = (Button) findViewById(R.id.btnEmpty_ItemizedOverlayDemo);\n\t\tbtnEmpty.setOnClickListener(new View.OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tmAutoCompleteTextView.setText(\"\");\n\t\t\t\tmTextViewMid.setText(\"-\");\n\t\t\t\tmTextViewCar_name.setText(\"-\");\n\t\t\t\tmTextViewInfotime.setText(\"-\");\n\t\t\t\tmTextViewStatus.setText(\"-\");\n\t\t\t\tmTextViewSpeed.setText(\"-\");\n\t\t\t\tmTextViewLocation.setText(\"-\");\n\n\t\t\t}\n\t\t});\n\n\t\tLayoutInflater layoutInfla = (LayoutInflater) getSystemService(LAYOUT_INFLATER_SERVICE);\n\t\tviewTip = layoutInfla.inflate(R.layout.layouttipview, null);\n\n\t\tmMapView = (MapView) findViewById(R.id.itemizedoverlayview);\n\t\tmMapView.setBuiltInZoomControls(true); // 设置启用内置的缩放控件\n\t\tmMapController = mMapView.getController();\n\t\tGeoPoint GeoPointCenter = new GeoPoint((CVariables.centery),\n\t\t\t\t(CVariables.centerx));\n\t\tmMapController.setCenter(GeoPointCenter);\n\t\tmMapController.setZoom(CVariables.zoomlevel);\n\n\t\tDrawable marker = getResources().getDrawable(R.drawable.markpoint);\n\t\t// 得到需要标在地图上的资源\n\t\tmarker.setBounds(0, 0, marker.getIntrinsicWidth(),\n\t\t\t\tmarker.getIntrinsicHeight()); // 为maker定义位置和边界\n\t\tmapOverlay = new MapOverlay(marker, this);\n\t\tmapOverlay.setOnTapListener(onTapListener);\n\t\tmMapView.getOverlays().add(mapOverlay);\n\n\t\thandler.postDelayed(Runnable取定位, 1000);// 每两秒执行一次runnable.\n\n\t\t// startLocation();\n\t\t\n\t\tmMapOverlayA = new MapOverlayA(this);\n\t\tmMapView.getOverlayManager().add(mMapOverlayA);\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n\n editKey = (EditText) findViewById(R.id.etKey);\n editText = (EditText) findViewById(R.id.etText);\n buttonSave = (Button) findViewById(R.id.btnSave);\n buttonLoad = (Button) findViewById(R.id.btnLoad);\n\n buttonSave.setOnClickListener(this);\n buttonLoad.setOnClickListener(this);\n }", "public JHistoryTextField()\n {\n this(true);\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.search);\n mActionBar = (ActionBar) findViewById(R.id.actionbar);\n\n mAdapter = new TagsAdapter();\n ListView list = (ListView) findViewById(R.id.list_tags);\n list.setAdapter(mAdapter);\n list.setOnItemClickListener(this);\n\n final EditText search = (EditText) findViewById(R.id.edit_search);\n search.setOnEditorActionListener(new OnEditorActionListener() {\n\n @Override\n public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {\n switch (event.getKeyCode()) {\n case KeyEvent.KEYCODE_ENTER:\n if (KeyEvent.ACTION_DOWN == actionId) {\n openGallery(search.getText().toString().trim());\n return true;\n }\n break;\n }\n return false;\n }\n });\n }", "public void createNewSkateSpot(){\n \t\tEditText skatespot_name = (EditText) findViewById(R.id.new_skatespot_name);\n \t\tString name = skatespot_name.getText().toString();\n \t\t\n \t\t//Finds the description of the SkateSpot\n \t\tEditText skatespot_description = (EditText) findViewById(R.id.new_skatespot_description);\n \t\tString description = skatespot_description.getText().toString();\n \t\t\n \t\t//Finds the chosen type from the spinner\n \t\tSpinner spinner = (Spinner) findViewById(R.id.new_skatespot_spinner);\n \t\tString type = spinner.getSelectedItem().toString();\n \t\t\n \t\t//Finds the current location\n \t\tLocation loc = app.getLocation();\n \t\tdouble latitude = loc.getLatitude();\n \t\tdouble longitude = loc.getLongitude();\n \n \t\tJsonObject obj = new JsonObject();\n \t\tobj.add(\"key\", new JsonPrimitive(\"ourKey\")); // TODO create a secret key\n \t\tobj.add(\"type\", new JsonPrimitive(4));\n \t\tobj.add(\"name\", new JsonPrimitive(name));\n \t\tobj.add(\"description\", new JsonPrimitive(description));\n \t\tobj.add(\"spottype\", new JsonPrimitive(type));\n \t\tobj.add(\"latitude\", new JsonPrimitive(latitude));\n \t\tobj.add(\"longitude\", new JsonPrimitive(longitude));\n \n \t\tAsyncHttpResponseHandler responseHandler = new AsyncHttpResponseHandler();\t\n \t\tSkateSpotsHttpClient.post(getApplicationContext(), obj, responseHandler);\n \t}", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.protal_suggestion);\n\t\tExitApp.getInstance().addActivity(this);\n\t\tConstants.SetTitle(this);\n\t\tBundle bundle = this.getIntent().getExtras();\n\t\tif (null != bundle) {\n\t\t\ttag = bundle.getString(\"tag\");\n\t\t\tflag = bundle.getInt(\"flag\");\n\t\t}\n\t\tinitView();\n\t\tinitData();\n\t}", "private void init() {\n\t\ttxt_account=(TextView) findViewById(R.id.txt_account);\n\t\ttxt_passwd=(TextView) findViewById(R.id.txt_passwd);\n\t\ttxt_passwd_again=(TextView) findViewById(R.id.txt_passwd_again);\n\t\ttxt_hit=(TextView) findViewById(R.id.txt_hit);\n\t\ttxt_hit.setVisibility(View.GONE);\n\t\t\n\t\tedt_account=(EditText) findViewById(R.id.edt_zhanghao);\n\t\tedt_passwd=(EditText) findViewById(R.id.edt_mima);\n\t\tedt_passwd_again=(EditText) findViewById(R.id.edt_passwd_again);\n\t\t\n\t\t\n\t\tbtn_ok=(Button) findViewById(R.id.btn_ok);\n\t\tbtn_ok.setOnClickListener(this);\n\t}", "void setAutoCompleterCallback(AutoCompleterCallback callback);", "public void initialiseSearchView() {\n text.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n // do nothing\n }\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n if (count > 0) {\n clearButton.setVisibility(View.VISIBLE);\n } else {\n clearButton.setVisibility(View.GONE);\n }\n searchHandler.apply(s.toString());\n }\n\n @Override\n public void afterTextChanged(Editable s) {\n // do nothing\n }\n });\n text.setOnEditorActionListener(new TextView.OnEditorActionListener() {\n @Override\n public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {\n if (actionId == EditorInfo.IME_ACTION_SEARCH) {\n //Still perform a search operation, then hide keyboard & search bar\n searchHandler.apply(v.getText().toString());\n hideSearchBar();\n return true;\n }\n return false;\n }\n });\n\n clearButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n text.setText(\"\");\n }\n });\n\n closeButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n hideSearchBar();\n }\n });\n\n clearButton.setVisibility(View.GONE);\n hideSearchBar();\n }", "public interface PlacesAPI {\n// @GET(\"alopezruizDev/tripPlanner/master/1.0/Android/app/src/main/res/raw/places.json\")\n// Call<List<Place>> getList();\n}", "public void initialize(){\n titleBox.setTextFormatter( new TextFormatter<>(c -> {\n if(c.getControlNewText().length() > 30 ) return null;\n boolean error=false;\n char[] chars = c.getText().toCharArray();\n for (char aChar : chars)\n if (aChar == '\\n' ) {\n error = true;\n break;\n }\n if (error) return null;\n else return c;\n }));\n //default settings\n resultBox.setEditable(false);\n formatter.applyPattern(\"dd/MM/yyyy\");\n datePick.getEditor().setText(formatter.format(date));\n //arrayList to store each diaryPage and every words in dictionary\n book= new ArrayList<>();\n dictionary = new ArrayList<>();\n //read from txt file for existing diary pages and dictionary\n try {\n BufferedReader reader = new BufferedReader(new FileReader(new File(\"src/diary/content.txt\")));\n String line= reader.readLine();\n while (line != null){\n String date,title,content=\"\";\n int lineCount;\n date = line;\n title = reader.readLine();\n lineCount = Integer.parseInt(reader.readLine());\n for(int i=0;i<lineCount;i++){\n line = reader.readLine();\n //noinspection StringConcatenationInLoop\n content = content + line + System.lineSeparator();\n }\n book.add(new DiaryPage(date,title,content,lineCount));\n line = reader.readLine();\n }\n reader.close();\n reader = new BufferedReader(new FileReader(new File(\"src/extra/words.txt\")));\n line= reader.readLine();\n while (line != null){\n dictionary.add(line);\n line = reader.readLine();\n }\n reader.close();\n\n } catch (java.io.IOException e) {\n e.printStackTrace();\n }\n //save new diary into txt file after user exit the application\n Main.window.setOnHiding(event -> saveFile());\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.city_search);\n\n\t\tsetupListView();\n\t\tsetupSearchView();\n\n\t\tinitView();\n\t\tinitListener();\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n\n mCallApiButton = (Button) findViewById(R.id.button);\n\n mCallApiButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n mCallApiButton.setEnabled(false);\n mOutputText.setText(\"\");\n getResultsFromApi();\n mCallApiButton.setEnabled(true);\n }\n });\n\n mOutputText = (TextView) findViewById(R.id.textViewStatus);\n mOutputText.setText(\"Fill in all fields please\");\n\n mProgress = new ProgressDialog(this);\n mProgress.setMessage(\"Calling Google Sheets API ...\");\n\n mCredential = GoogleAccountCredential.usingOAuth2(\n getApplicationContext(), Arrays.asList(SCOPES))\n .setBackOff(new ExponentialBackOff());\n\n }", "private void setUpPlaces(){\n db.collection(\"Tokens\").get()\n .addOnCompleteListener(new OnCompleteListener<QuerySnapshot>() {\n @Override\n public void onComplete(@NonNull Task<QuerySnapshot> task) {\n if (task.isSuccessful()) {\n for (QueryDocumentSnapshot document : task.getResult()) {\n String id = document.getId();\n String name = document.get(\"name\").toString();\n String desc = document.get(\"description\").toString();\n String[] latLng = document.get(\"latlng\").toString().split(\",\");\n double latitude = Double.parseDouble(latLng[0]);\n double longitude = Double.parseDouble(latLng[1]);\n places.add(new PlaceToken(id, name, desc, new LatLng(latitude, longitude)));\n }\n }\n }\n });\n }", "@Override\n\tprotected void onCreate(Bundle arg0) {\n\t\tsuper.onCreate(arg0);\n\t\tsetContentView(R.layout.activity_authkey);\n\t\tuserid = getIntent().getStringExtra(\"userid\");\n\t\tauth_key_layout = (LinearLayout) findViewById(R.id.auth_key_layout);\n\t\tauth_key_layout.setOnClickListener(this);\n\t\tstart_time = (TextView) findViewById(R.id.start_time);\n\t\tend_time = (TextView) findViewById(R.id.end_time);\n\t\tlistView = (ExpandableListView) findViewById(R.id.listView);\n\t\tSimpleDateFormat format = new SimpleDateFormat(\"yyyy/MM/dd HH:mm\");\n\t\tString startTime = format.format(new Date(System.currentTimeMillis()));\n\t\tstart_time.setText(startTime);\n\t\tJSONObject parm = new JSONObject();\n\t\ttry {\n\t\t\tparm.put(\"trgUserId\", userid);\n\t\t} catch (JSONException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tgetNetworkData(this, \"/user/api/getFamilyAddr.do\", parm.toString(), true);\n\t\tgetMyKey();\n\t}", "public ApiBuilder() \n\t{\n\t\tthis._data = new LinkedHashMap<String,Object>();\n\t}", "PlaceSearchAdapter(Context context, List<JSONObject> data) {\n this.mInflater = LayoutInflater.from(context);\n this.mData = data;\n \n if(data.isEmpty())\n {\n Log.d(TAG, \"PlaceSearchAdapter: empty\");\n ((PlacesActivity)context).checkEmpty();\n }\n\n this.context=context;\n setHasStableIds(true);\n }", "public void updateNewSuggestDefineOracle() {\n\t\tif (searchSuggestDefineTextBox != null) {\n\t\t\tCQLSuggestOracle cqlSuggestOracle = new CQLSuggestOracle(defineNameMap.values());\n\t\t}\n\t}", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\t\n\t\tLog.i(TAG, \"onCreate().\");\n\t\t// Check if data in SharedPreferences are the newest.\n\t\tSharedPreferences noteWidgetMap = this.getSharedPreferences(\"note_widget_map\",Context.MODE_PRIVATE);\n\t\tSharedPreferences widgetNoteMap = this.getSharedPreferences(\"widget_note_map\",Context.MODE_PRIVATE);\n\t\tSharedPreferences widgetDbMap = this.getSharedPreferences(\"widget_db_map\",Context.MODE_PRIVATE);\n\n\t\tMap<String, ?> map = widgetNoteMap.getAll();\n\t\tif (map == null) {\n\t\t\tLog.i(TAG, \"map is null!\");\n\t\t\treturn;\n\t\t}\n\t\tSet<String> keySet = map.keySet();\n\t\tif (keySet == null || keySet.isEmpty()) {\n\t\t\tLog.i(TAG, \"key is null\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tAppWidgetManager am = AppWidgetManager.getInstance(this);\n\t\tint appWidgetId;\n\t\tEditor noteWidgEditor = noteWidgetMap.edit();\n\t\tEditor widgetNoteEditor = widgetNoteMap.edit();\n\t\tEditor widgetDbEditor = widgetDbMap.edit();\n\t\t\n\t\tfor (String s : keySet) {\n\t\t\tappWidgetId = Integer.valueOf(s);\n\t\t\tif (am.getAppWidgetInfo(appWidgetId) == null) {\n\t\t\t\tLog.w(TAG, \"can not found appWidgetId \" + appWidgetId + \n\t\t\t\t\t\t\" in AppWidgetManager, so remove it from SharedPreferences\");\n\t\t\t\tString note = widgetNoteMap.getString(s, \"\");\n\t\t\t\tnoteWidgEditor.remove(note);\n\t\t\t\twidgetNoteEditor.remove(s);\n\t\t\t\twidgetDbEditor.remove(s);\n\t\t\t}\n\t\t}\n\t\tnoteWidgEditor.apply();\n\t\twidgetNoteEditor.apply();\n\t\twidgetDbEditor.apply();\n\t}" ]
[ "0.7505572", "0.68047243", "0.6116338", "0.59707147", "0.5961966", "0.53144413", "0.52089846", "0.5155266", "0.5146287", "0.51104957", "0.49928504", "0.49668592", "0.49513608", "0.49053794", "0.48750466", "0.48300004", "0.48119366", "0.480346", "0.47743264", "0.4771943", "0.4747101", "0.4718358", "0.4682621", "0.46767572", "0.46547624", "0.46446714", "0.46405908", "0.46377906", "0.46086788", "0.46046302", "0.4595048", "0.45925316", "0.45877308", "0.4557972", "0.45578468", "0.4548726", "0.45458376", "0.4527851", "0.4526672", "0.45208606", "0.45206016", "0.45070502", "0.45034078", "0.44962016", "0.4492076", "0.44725543", "0.4469087", "0.44679412", "0.44541466", "0.44498312", "0.44107705", "0.44091326", "0.43885753", "0.4385339", "0.43804651", "0.43718642", "0.43704408", "0.43673158", "0.4363724", "0.43618", "0.43505344", "0.43338493", "0.43297854", "0.43284154", "0.4326453", "0.43263355", "0.4316256", "0.43140888", "0.43127316", "0.43126363", "0.43120584", "0.43081486", "0.42952147", "0.4293867", "0.4293837", "0.42928618", "0.4289414", "0.4288773", "0.4266957", "0.42623246", "0.42594352", "0.42574406", "0.42536193", "0.42534056", "0.42505452", "0.42498544", "0.42473504", "0.42374566", "0.42372012", "0.4237096", "0.42370024", "0.42335868", "0.4232734", "0.42277828", "0.42267534", "0.4214803", "0.42138934", "0.42121008", "0.42098814", "0.42013618" ]
0.66973126
2
Creates a new PlacesAutocompleteTextView with the provided API key and the provided history file
public PlacesAutocompleteTextView(@NonNull final Context context, @NonNull final String googleApiKey, @NonNull final String historyFileName) { super(context); init(context, null, R.attr.pacv_placesAutoCompleteTextViewStyle, R.style.PACV_Widget_PlacesAutoCompleteTextView, googleApiKey, historyFileName); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void init(@NonNull final Context context, final AttributeSet attrs, final int defAttr, final int defStyle, final String googleApiKey, final String historyFileName) {\n TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.PlacesAutocompleteTextView, defAttr, defStyle);\n String layoutApiKey = typedArray.getString(R.styleable.PlacesAutocompleteTextView_pacv_googleMapsApiKey);\n String layoutAdapterClass = typedArray.getString(R.styleable.PlacesAutocompleteTextView_pacv_adapterClass);\n String layoutHistoryFile = typedArray.getString(R.styleable.PlacesAutocompleteTextView_pacv_historyFile);\n languageCode = typedArray.getString(R.styleable.PlacesAutocompleteTextView_pacv_languageCode);\n countryCode = typedArray.getString(R.styleable.PlacesAutocompleteTextView_pacv_countryCode);\n resultType = AutocompleteResultType.fromEnum(typedArray.getInt(R.styleable.PlacesAutocompleteTextView_pacv_resultType, PlacesApi.DEFAULT_RESULT_TYPE.ordinal()));\n clearEnabled = typedArray.getBoolean(R.styleable.PlacesAutocompleteTextView_pacv_clearEnabled, false);\n typedArray.recycle();\n\n final String finalHistoryFileName = historyFileName != null ? historyFileName : layoutHistoryFile;\n\n if (!TextUtils.isEmpty(finalHistoryFileName)) {\n historyManager = DefaultAutocompleteHistoryManager.fromPath(context, finalHistoryFileName);\n }\n\n final String finalApiKey = googleApiKey != null ? googleApiKey : layoutApiKey;\n\n if (TextUtils.isEmpty(finalApiKey)) {\n throw new InflateException(\"Did not specify googleApiKey!\");\n }\n\n api = new PlacesApiBuilder()\n .setApiClient(PlacesHttpClientResolver.PLACES_HTTP_CLIENT)\n .setGoogleApiKey(finalApiKey)\n .build();\n\n if (languageCode != null) {\n api.setLanguageCode(languageCode);\n }\n\n if (countryCode != null) {\n api.setCountryCode(countryCode);\n }\n\n if (layoutAdapterClass != null) {\n adapter = adapterForClass(context, layoutAdapterClass);\n } else {\n adapter = new DefaultAutocompleteAdapter(context, api, resultType, historyManager);\n }\n\n super.setAdapter(adapter);\n\n super.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(final AdapterView<?> parent, final View view, final int position, final long id) {\n Place place = adapter.getItem(position);\n\n if (listener != null) {\n listener.onPlaceSelected(place);\n }\n\n if (historyManager != null) {\n historyManager.addItemToHistory(place);\n }\n }\n });\n\n this.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n\n }\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n if (clearEnabled) {\n if (s != null && s.length() > 0) {\n showClearButton(true);\n } else {\n showClearButton(false);\n }\n } else {\n showClearButton(false);\n }\n }\n\n @Override\n public void afterTextChanged(Editable s) {\n }\n });\n\n super.setDropDownBackgroundResource(R.drawable.pacv_popup_background_white);\n }", "public PlacesAutocompleteTextView(@NonNull final Context context, @NonNull final String googleApiKey) {\n super(context);\n\n init(context, null, R.attr.pacv_placesAutoCompleteTextViewStyle, R.style.PACV_Widget_PlacesAutoCompleteTextView, googleApiKey, context.getString(R.string.pacv_default_history_file_name));\n }", "private void SetViewAndAutoCompleteText(int viewID)\n\t{\n\t\t// Auto complete words\n // !put, !get, !capture, !launch, !autotest are special commands\n\t\tfinal String [] COMMAND_LIST = new String [] { \n\t\t\t\t\"!put a.txt\", \"!get c:/test.txt\", \"!capture 1.jpg\", \"!launch\", \n\t\t\t\t\"dir\", \"cd \", \"cd ..\", \"c:\", \"tasklist\" };\n\t\tfinal String [] KEY_LIST = new String [] { \n\t\t\t\t\"!autotest\", \"!pintest\", \"!stoptest\", \"[KEY_\", \"[KEY_LGUI]\", \"[KEY_LGUI][KEY_R]\", \"[KEY_LGUI][KEY_L]\", \"[KEY_LALT]\", \"[KEY_LALT][KEY_F4]\", \"[KEY_LCONTROL]\", \"[KEY_LCONTROL][KEY_S]\", \"[KEY_UP]\",\n\t\t\t\t\"[KEY_LSHIFT]\",\t\"[KEY_ENTER]\", \"[KEY_BACKSPACE]\", \"cmd.exe\", \"d:/testagent\" };\n\t\t\n\t\t// Set view pointer\n\t\tView view;\n\t\tAutoCompleteTextView autoText;\n\t\tArrayAdapter<String> adapter;\n\t\t\n\t\t// Set view pointer\n\t\tif (viewID == VIEW_ID_COMMAND)\n\t\t{\n\t\t\tview = mTabHost.getTabContentView().findViewById(R.id.commandView);\n\t\t\tmCommandView = (TextView)view.findViewById(R.id.dataview);\n\t\t\tmCommandScrollView = (ScrollView)view.findViewById(R.id.scrollview);\n\t\t\tmCommandInputView = (AutoCompleteTextView) view.findViewById(R.id.commandInput);\n\t\t\tautoText = mCommandInputView;\n\t\t\tadapter = new ArrayAdapter(getApplicationContext(), \n\t\t\t\t\tandroid.R.layout.simple_dropdown_item_1line, COMMAND_LIST);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tview = mTabHost.getTabContentView().findViewById(R.id.keyView);\n\t\t\tmKeyView = (TextView)view.findViewById(R.id.dataview);\n\t\t\tmKeyScrollView = (ScrollView)view.findViewById(R.id.scrollview);\n\t\t\tmKeyInputView = (AutoCompleteTextView) view.findViewById(R.id.keyInput);\n\t\t\tautoText = mKeyInputView;\n\t\t\tadapter = new ArrayAdapter(getApplicationContext(), \n\t\t\t\t\tandroid.R.layout.simple_dropdown_item_1line, KEY_LIST);\t\t\t\n\t\t}\t\t\n\t\t\n\t\t// Set options for autocomplete\n\t\tautoText.setTag(viewID);\n\t\tautoText.setAdapter(adapter);\n\t\tautoText.setThreshold(1);\n\t\t\n\t\t// Process enter key\n\t\tautoText.setOnKeyListener(new OnKeyListener()\n\t\t{\n\t\t\t@Override\n\t\t\tpublic boolean onKey(View arg0, int arg1, KeyEvent arg2) \n\t\t\t{\t\t\t\t\n\t\t\t\tif ((arg0 != null) && (arg2 != null) && \n\t\t\t\t\t(arg2.getAction() == KeyEvent.ACTION_DOWN) &&\n\t\t\t\t\t(arg2.getKeyCode() == KeyEvent.KEYCODE_ENTER))\n\t\t\t\t{\n\t\t\t\t\tAutoCompleteTextView view = (AutoCompleteTextView) arg0;\n\t\t\t\t\tString data;\n\t\t\t\t\tint viewID;\n\t\t\t\t\t\n\t\t\t\t\tdata = view.getText().toString();\n view.setText(\"\");\n viewID = (Integer) view.getTag();\n if (data.equals(\"\") == true)\n {\n if (viewID == VIEW_ID_KEY)\n {\n data = \"[KEY_ENTER]\";\n }\n else\n {\n return true;\n }\n }\n\n SendCommandOrKeys(viewID, data);\n\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\t\t});\t\t\n\t}", "public PlacesAutocompleteTextView(final Context context, final AttributeSet attrs) {\n super(context, attrs);\n\n init(context, attrs, R.attr.pacv_placesAutoCompleteTextViewStyle, R.style.PACV_Widget_PlacesAutoCompleteTextView, null, context.getString(R.string.pacv_default_history_file_name));\n }", "public PlacesAutocompleteTextView(final Context context, final AttributeSet attrs, final int defAttr) {\n super(context, attrs, defAttr);\n\n init(context, attrs, defAttr, R.style.PACV_Widget_PlacesAutoCompleteTextView, null, context.getString(R.string.pacv_default_history_file_name));\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n requestWindowFeature(Window.FEATURE_NO_TITLE);\n setContentView(R.layout.activity_location_search);\n ButterKnife.bind(this);\n placeModels = new ArrayList<>();\n dataAdapter = new GooglePlacesAutocompleteAdapterNew(getApplicationContext(), placeModels);\n edEnterLocation = (EditText) findViewById(R.id.edEnterLocation);\n imgClose = (ImageView) findViewById(R.id.imgClose);\n powered_by_google = (ImageView) findViewById(R.id.powered_by_google);\n listview = (ListView) findViewById(R.id.listview);\n textviewSearchResult = (TextView) findViewById(R.id.textviewSearchResult);\n listview.setAdapter(dataAdapter);\n\n edEnterLocation.addTextChangedListener(new TextWatcher() {\n\n public void afterTextChanged(Editable s) {\n try {\n listview.setVisibility(View.VISIBLE);\n placeModels.clear();\n\n if (placeModels != null) {\n dataAdapter.notifyDataSetChanged();\n }\n progressbarSearch.setVisibility(View.VISIBLE);\n new AutocompleteApi(new LatLng(LocationHelperService.dblLatitude, LocationHelperService.dblLongitude), s.toString()).execute();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n }\n\n public void onTextChanged(final CharSequence s, int start, int before, final int count) {\n\n }\n });\n\n\n listview.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n /*String str = placeModels.get(position).getMainTitle();\n String Data = getLocationFromAddress(LocationSearchActivityNew.this, str);\n Intent returnIntent = new Intent();\n returnIntent.putExtra(\"result\", Data + \",,,\" + str);\n setResult(Activity.RESULT_OK, returnIntent);\n finish();*/\n\n String str = placeModels.get(position).getMainTitle() + \" , \" + placeModels.get(position).getSecondaryTitle();\n\n DataToPref.setSharedPreferanceData(getApplicationContext(), LaoxiConstant.SELECTED_PLACE_ID, LaoxiConstant.SELECTED_PLACE_ID_KEY, placeModels.get(position).getPlaceID() + \"\");\n String Data = getLocationFromAddress(LocationSearchActivityNew.this, str);\n\n if (Data == null || Data.equalsIgnoreCase(\"\")) {\n\n // call methood\n GetLocation(str);\n } else {\n Intent returnIntent = new Intent();\n returnIntent.putExtra(\"result\", Data + \",,,\" + str);\n setResult(Activity.RESULT_OK, returnIntent);\n finish();\n }\n\n\n }\n });\n\n\n imgClose.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n finish();\n }\n });\n\n }", "@Override\n public void onHistoryItemClicked(String history_item) {\n editText.setText(history_item);\n editText.setCursorVisible(false);\n editTextMode = false;\n\n previousSearchTerm = editText.getText().toString();\n\n InputMethodManager inputManager = (InputMethodManager) getSystemService\n (Context.INPUT_METHOD_SERVICE);\n inputManager.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(),\n InputMethodManager.HIDE_NOT_ALWAYS);\n searchHistoryView.setVisibility(View.INVISIBLE);\n mCursor = utils.queryCombinedArticleLists(editText.getText().toString());\n\n LinearLayoutManager linearLayoutManager = new LinearLayoutManager(SearchActivity.this);\n SearchArticlesAdapter adapter = new SearchArticlesAdapter(SearchActivity.this, SEARCH_ACTIVITY);\n adapter.setCursor(mCursor);\n mRecyclerView.setAdapter(adapter);\n mRecyclerView.setLayoutManager(linearLayoutManager);\n }", "public void openHistory() {\n usingHistoryScreen = true;\n myActivity.setContentView(R.layout.history);\n Button historyButtonToGame = myActivity.findViewById(R.id.button8);\n TextView historyText = myActivity.findViewById(R.id.textView46);\n historyText.setText(state.getHistory());\n historyText.setMovementMethod(new ScrollingMovementMethod());\n gui.invalidate();\n historyButtonToGame.setOnClickListener(\n new View.OnClickListener() {\n public void onClick(View v) {\n ShogiHumanPlayer.this.setAsGui(myActivity);\n usingHistoryScreen = false;\n if (state != null) {\n receiveInfo(state);\n }\n }\n });\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.aty_using_autocompletetextview);\n\t\tactv=(AutoCompleteTextView)findViewById(R.id.autoCompleteTextView);\n\t\tactvAdapter=new ArrayAdapter<String>(this, R.layout.aty_using_autocompletetextview_dropdown_item, strs);\n\t\tactv.setAdapter(actvAdapter);\n\t\t\n\t\tmactv=(MultiAutoCompleteTextView) findViewById(R.id.multiAutoCompleteTextView);\n\t\tmactvAdapter=new ArrayAdapter<String>(this, R.layout.aty_using_autocompletetextview_dropdown_item,strs);\n\t\tmactv.setTokenizer(new MultiAutoCompleteTextView.CommaTokenizer());\n\t\tmactv.setAdapter(mactvAdapter);\n\t}", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.main);\n selection = (TextView)findViewById(R.id.con_str);\n editor = (AutoCompleteTextView) findViewById(R.id.editor);\n editor.addTextChangedListener(this);\n editor.setAdapter(new ArrayAdapter<String>(this,android.R.layout.simple_dropdown_item_1line,items)); \n }", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tsetContentView(R.layout.auto_complete_text_view);\r\n\t\tsetTitle(\"AutoCompleteTextView示例!\");\r\n\t\tautoComplete=(AutoCompleteTextView)findViewById(R.id.auto_complete);\r\n\t\tcleanButton=(Button)findViewById(R.id.cleanButton);\r\n\t\t\r\n\t\tArrayAdapter<String> adapter=new ArrayAdapter<String>(AutoCompleteTextViewActivity.this,android.R.layout.simple_dropdown_item_1line,COUNTRIES);\r\n\t\tautoComplete.setAdapter(adapter);\r\n\t\t\r\n\t\t//清空\r\n\t\tcleanButton.setOnClickListener(new View.OnClickListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\tautoComplete.setText(\"\");\r\n\t\t\t}\r\n\t\t});\r\n\t}", "@Override\n public EditHistory createFromParcel(Parcel in) {\n return new EditHistory(in);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.main);\n \n api = new Api();\n \n outputConsole = (TextView) findViewById(R.id.outputConsole);\n \n inputLine = (EditText) findViewById(R.id.inputLine); \n inputLine.setOnKeyListener(this);\n }", "public void generateList(SearchAutoCompleteListener searchAutoCompleteListener) {\n RequestQueue queue= RequestQueueSingleton.getInstance(this.context).getRequestQueue();\n queue.cancelAll(\"search\");\n if (this.nameOrCode.length() > 0) {\n StringRequest request = new StringRequest(Request.Method.GET,\n Api.autoCompleteString +\"?q=\"+this.nameOrCode,\n (String response) -> {\n try {\n JSONObject data = new JSONObject(response);\n JSONArray placearray = data.getJSONArray(\"places\");\n\n if (placearray.length() == 0) {\n Log.d(TAG,\"Place Not Found\");\n searchAutoCompleteListener.onFailure(JsonUtils.logError(TAG,response));\n } else {\n ArrayList<Place> searchPlaces = JsonUtils.getPlaces(placearray);\n searchAutoCompleteListener.onPlaceListReceived(searchPlaces);\n }\n } catch (JSONException e) {\n searchAutoCompleteListener.onFailure(JsonUtils.logError(TAG,response));\n }\n },\n error ->{\n Log.d(TAG,JsonUtils.handleResponse(error));\n searchAutoCompleteListener.onFailure(JsonUtils.handleResponse(error));\n }){\n };\n request.setTag(\"search\");\n queue.add(request);\n }\n }", "private Handler MakeViewHandler(int viewID)\n\t{\n\t\tHandler handler = new Handler() \n\t\t{\n\t\t\t@Override\n\t\t\tpublic void handleMessage(Message msg)\n\t\t\t{\n\t\t\t\t// Get data from msg\n\t\t\t\tString data = (String) msg.obj;\n\t\t\t\tfinal TextView textView;\n\t\t\t\tfinal StringBuffer buffer;\n\t\t\t\tfinal ScrollView scrollView;\n\t\t\t\tfinal AutoCompleteTextView autoCompleteText;\n\t\t\t\tRunnable scrollPost = null;\n\t\t\t\tint delayTime = 0;\n\t\t\t\t\n\t\t\t\t// Set view pointer\n\t\t\t\tif (msg.what == VIEW_ID_COMMAND)\n\t\t\t\t{\n\t\t\t\t\ttextView = mCommandView;\n\t\t\t\t\tbuffer = mCommandBuffer;\n\t\t\t\t\tscrollView = mCommandScrollView;\n\t\t\t\t\tscrollPost = mCommandScrollPost;\n\t\t\t\t\tif ((mUpdateCount % 20) == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tdelayTime = 0;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tdelayTime = 1000;\n\t\t\t\t\t}\n\t\t\t\t\tmUpdateCount++;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttextView = mKeyView;\n\t\t\t\t\tbuffer = mKeyBuffer;\n\t\t\t\t\tscrollView = mKeyScrollView;\n\t\t\t\t\tscrollPost = mKeyScrollPost;\n\t\t\t\t\tdelayTime = 0;\n\t\t\t\t}\n\n\t\t\t\tif (mTabHost.getCurrentTab() == VIEW_ID_COMMAND)\n\t\t\t\t{\n\t\t\t\t\tautoCompleteText = mCommandInputView;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tautoCompleteText = mKeyInputView;\n\t\t\t\t}\n\n\t\t\t\t\n\t\t\t\t// Update data\n\t\t\t\tbuffer.append(data);\n\t\t\t\tif (buffer.length() > 5000)\n\t\t\t\t{\n\t\t\t\t\tbuffer.delete(0, buffer.length() - 5000);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tremoveCallbacks(scrollPost);\n\n\t\t\t\t// Reduce update frequency\n\t\t\t\tscrollPost = new Runnable() \n\t\t\t\t{\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void run() \n\t\t\t\t\t{\n\t\t\t\t\t\ttextView.setText(buffer);\n\t\t\t\t\t\t\n\t\t\t\t\t\tpostDelayed(new Runnable()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void run() \n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tscrollView.fullScroll(View.FOCUS_DOWN);\n\t\t\t\t\t\t\t\tautoCompleteText.requestFocus();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}, 200);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\t\n\t\t\t\tif (msg.what == VIEW_ID_COMMAND)\n\t\t\t\t{\n\t\t\t\t\tmCommandScrollPost = scrollPost;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tmKeyScrollPost = scrollPost;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tpostDelayed(scrollPost, delayTime);\n\t\t\t}\n\t\t};\n\t\t\n\t\treturn handler;\n\t}", "@SuppressLint(\"ResourceAsColor\")\r\n\t@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\r\n\t\tsetContentView(R.layout.activity_mycollect);\r\n\t\tsetTitle(\"历史记录\");\r\n\t\tisShowLeftView(true);\r\n\t\tisShowRightView(R.string.edit, false);\r\n\t\tsetRightTextColor(R.color.white);\r\n\t\tViewUtils.inject(this);\r\n\r\n\t\thttp = new HttpUtil(this);\r\n\t\thttp.setHttpCallBack(this);\r\n\t\tgson = new Gson();\r\n\t\thttp.getOilHistory();\r\n\t}", "public AutoCompleteTextView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes, Resources.Theme popupTheme) {\n/* 157 */ super((Context)null); throw new RuntimeException(\"Stub!\");\n/* */ }", "private static void addToHistory() {\n\t\tFileInputStream fis = null;\n\t\tFileOutputStream fos = null;\n\t\tFileChannel resultChannel = null;\n\t\tFileChannel historyChannel = null;\n\t\ttry {\n\t\t\tfis = new FileInputStream(new File(\"result.txt\"));\n\t\t\tfos = new FileOutputStream(new File(\"history.txt\"), true);\n\t\t\t\n\t\t\tfos.write(\"\\n\\n\".getBytes(\"utf-8\"));\n\t\t\tfos.flush();\n\t\t\t\n\t\t\tresultChannel = fis.getChannel();\n\t\t\thistoryChannel = fos.getChannel();\n\n\t\t\tresultChannel.transferTo(0, resultChannel.size(), historyChannel);\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (fis != null) {\n\t\t\t\t\tfis.close();\n\t\t\t\t}\n\t\t\t\tif (fos != null) {\n\t\t\t\t\tfos.close();\n\t\t\t\t}\n\t\t\t\tif(resultChannel != null) {\n\t\t\t\t\tresultChannel.close();\n\t\t\t\t}\n\t\t\t\tif(historyChannel != null) {\n\t\t\t\t\thistoryChannel.close();\n\t\t\t\t}\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "@Override\n protected void onCreate(@Nullable Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n btnHit = (Button) findViewById(R.id.button);\n txtJson = (TextView) findViewById(R.id.textView2);\n\n btnHit.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n new JsonTask().execute(apiUrl);\n }\n });\n }", "private void createSuggestionsList() {\r\n\t\tmListView = new LabeledListViewElement(this);\r\n\t\tmInputBar.addView(mListView);\r\n\r\n\t\tmListView.setOnItemClickListener(new OnItemClickListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void onItemClick(AdapterView<?> adapter, View view, int pos, long id) {\r\n\t\t\t\tString query = adapter.getItemAtPosition(pos).toString();\r\n\t\t\t\tif(query.contains(\" \"))\r\n\t\t\t\t\tsearch(query);\r\n\t\t\t\telse{\r\n\t\t\t\t\tmInputBar.setInputText(query + \" \");\r\n\t\t\t\t\tmInputBar.setCursorAtEnd();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t}", "public void botaohistory(View v) {\n startActivity(new Intent(this, com.example.appstore.history.class));\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View rootView = inflater.inflate(R.layout.fragment_search, container, false);\n //keyword = rootView.findViewById(R.id.keyword);\n category = rootView.findViewById(R.id.category);\n distance = rootView.findViewById(R.id.distance);\n distanceUnit = rootView.findViewById(R.id.distanceUnit);\n radioGroup = rootView.findViewById(R.id.radio_locations);\n radioButtonHere= (RadioButton) rootView.findViewById(R.id.radio_here);\n radioButtonOther = (RadioButton) rootView.findViewById(R.id.radio_other);\n locationText = rootView.findViewById(R.id.locationText);\n search = (Button) rootView.findViewById(R.id.search);\n clear = rootView.findViewById(R.id.clear);\n locationText.setEnabled(false);\n keyword = rootView.findViewById(R.id.keyword);\n autoSuggestAdapter = new AutoCompleteAdapter(getContext(),\n android.R.layout.simple_dropdown_item_1line);\n keyword.setOnItemClickListener(\n new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View view,\n int position, long id) {\n\n itemPositon = autoSuggestAdapter.getObject(position);\n }\n });\n keyword.setThreshold(2);\n keyword.setAdapter(autoSuggestAdapter);\n keyword.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int\n count, int after) {\n\n }\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before,\n int count) {\n handler.removeMessages(TRIGGER_AUTO_COMPLETE);\n handler.sendEmptyMessageDelayed(TRIGGER_AUTO_COMPLETE,\n AUTO_COMPLETE_DELAY);\n }\n\n @Override\n public void afterTextChanged(Editable s) {\n\n }\n });\n\n handler = new Handler(new Handler.Callback() {\n @Override\n public boolean handleMessage(Message msg) {\n if (msg.what == TRIGGER_AUTO_COMPLETE) {\n if (!TextUtils.isEmpty(keyword.getText())) {\n Log.d(\"From autocomplete call\",keyword.getText().toString());\n makeApiCall(keyword.getText().toString());\n }\n }\n return false;\n }\n });\n\n radioButtonHere.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n locationText.setText(\"\");\n locationText.setEnabled(false);\n }\n });\n\n radioButtonOther.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n locationText.setEnabled(true);\n\n }\n });\n\n //Does Validation and if validation passes, then send data to TM.\n search.setOnClickListener(new View.OnClickListener() {\n public void onClick(View v) {\n // Code here executes on main thread after user presses button\n //Keyword field is empty\n if(keyword.getText().toString().trim().length() == 0){\n rootView.findViewById(R.id.errorKeyword).setVisibility(View.VISIBLE);\n Toast toast = Toast.makeText(getActivity().getApplicationContext(),\n \"Please fix all fields with errors\", Toast.LENGTH_SHORT);\n toast.show();\n keywordFlag = false;\n }\n else {\n rootView.findViewById((R.id.errorKeyword)).setVisibility(View.GONE);\n keywordFlag = true;\n }\n if(radioButtonHere.isChecked()){\n //Take current location\n rootView.findViewById(R.id.errorLocation).setVisibility(View.GONE);\n locationFlag = true;\n }\n if(radioButtonOther.isChecked()){\n if(locationText.getText().toString().trim().length()==0) {\n rootView.findViewById(R.id.errorLocation).setVisibility(View.VISIBLE);\n Toast toast = Toast.makeText(getActivity().getApplicationContext(),\n \"Please fix all fields with errors\", Toast.LENGTH_SHORT);\n toast.show();\n locationFlag = false;\n }\n else{\n rootView.findViewById(R.id.errorLocation).setVisibility(View.GONE);\n locationFlag = true;\n }\n }\n if(keywordFlag && locationFlag){\n //Valid data, make the URL for first TM Event search.\n //If User selects here\n if(radioButtonHere.isChecked()){\n //Use current lat and long values\n params = \"current_location?latitude=\"+latitude+\"&longitude=\"+longitude;\n String current_url = URL + params;\n Log.d(\"current_URL\",current_url);\n getCurrentResponse(current_url);\n }\n //If User has typed in custom location\n if(radioButtonOther.isChecked()) {\n params = \"geocoding?location=\" + Uri.encode(locationText.getText().toString()) + \"&api_key=\" + api_key;\n geocoding_url = URL + params;\n Log.d(\"Before Geocoding sent\", geocoding_url);\n getGeocodeResponse(geocoding_url);\n }\n }\n }\n });\n\n clear.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n keyword.setText(\"\");\n distance.setText(\"\");\n locationText.setText(\"\");\n radioButtonHere.setChecked(true);\n locationText.setEnabled(false);\n rootView.findViewById(R.id.errorKeyword).setVisibility(View.GONE);\n rootView.findViewById(R.id.errorLocation).setVisibility(View.GONE);\n }\n });\n return rootView;\n }", "public AutoCompleteTextView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {\n/* 132 */ super((Context)null); throw new RuntimeException(\"Stub!\");\n/* */ }", "private void setupSearchView() {\n SearchView search = binding.searchView;\n\n search.setQueryHint(\"Add companies...\");\n search.setIconifiedByDefault(false);\n search.setIconified(false);\n search.clearFocus();\n\n searchAutoComplete = search.findViewById(android.support.v7.appcompat.R.id.search_src_text);\n\n // Styling the search bar\n searchAutoComplete.setHintTextColor(Color.GRAY);\n searchAutoComplete.setTextColor(Color.GRAY);\n\n searchAutoComplete.setOnItemClickListener((adapterView, view, itemIndex, id) -> {\n SearchEntry entry = (SearchEntry) adapterView.getItemAtPosition(itemIndex);\n String ticker = entry.getTicker();\n ArrayList<String> tickers = new ArrayList<>();\n searchAutoComplete.setText(\"\");\n tickers.add(ticker);\n boolean duplicate = false;\n if (comparisonCompaniesAdapter.getDataSet() != null) {\n duplicate = checkDuplicate(comparisonCompaniesAdapter.getDataSet(), ticker);\n }\n if (!duplicate) {\n List<Company> companies = viewModel.getComparisonCompanies().getValue();\n int size = (companies == null) ? 0 : companies.size();\n\n if (size <= 10) {\n viewModel.addToComparisonCompanies(tickers);\n } else {\n Toast.makeText(this, \"Reached comparison limit!\", Toast.LENGTH_LONG).show();\n }\n }\n });\n\n search.setOnQueryTextListener(new SearchView.OnQueryTextListener() {\n @Override\n public boolean onQueryTextSubmit(String query) {\n return false;\n }\n\n @Override\n public boolean onQueryTextChange(String newText) {\n viewModel.loadSearchResults(newText);\n return false;\n }\n });\n }", "@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t super.onCreate(savedInstanceState);\n\n\t // Set it to typing will open up a search box\n setDefaultKeyMode(DEFAULT_KEYS_SEARCH_LOCAL);\n\n setContentView(R.layout.dictionary);\n\n // Setup the handler for clicking cancel button (Need a better way to present this)\n Button cancelsearch = (Button)findViewById(R.id.CancelSearch);\n cancelsearch.setOnClickListener(this);\n\n // Setup the handler for clicking the dictionary direction button\n mToNaviButton = (Button)findViewById(R.id.DictionaryType);\n mToNaviButton.setOnClickListener(this);\n\t\t\n\t\t// Setup handler for clicking the search button\n\t\tmSearchButton = (Button)findViewById(R.id.SearchButton);\n\t\tmSearchButton.setOnClickListener(this);\n \n // Callback to reload the list on part of speech filter change - this will be called before the activity is done loading\n \tSpinner s = (Spinner)findViewById(R.id.Spinner01);\n\t\tArrayAdapter <CharSequence> mySpinnerArrayAdapter = ArrayAdapter.createFromResource(this, R.array.partsOfSpeech, R.layout.spinnerrow);\n\t\tmySpinnerArrayAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n\t\ts.setAdapter(mySpinnerArrayAdapter);\n \ts.setOnItemSelectedListener(this);\n\n // Check if this was created as the result of a search (Shouldn't happen currently)\n checkIntentForSearch(getIntent());\n\n // Open the DB\n\t EntryDBAdapter.getInstance(this).openDataBase();\n\t mDbIsOpen = true;\n\t\t\n\t //Auto Rotate Locky thingy\n \t\t//SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getBaseContext());\n \t\t//if(prefs.getBoolean(\"auto_rotate\", false)){\n \t\t\t//this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);\n \t\t\t//this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR);\n \t\t\tif(! isTablet(this))\n \t\t\t\tthis.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);\n \t\t\t//else\n \t\t\t\t//this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR);\n \t\t//}else{\n \t\t\t//this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR);\n \t\t//}\n\t \n\t // Check if there is saved state and restore it if so\n\t if (savedInstanceState != null)\n\t {\n\t \tif (savedInstanceState.containsKey(\"CurSearch\"))\n\t \t\tmCurSearch = savedInstanceState.getString(\"CurSearch\");\n\t \tif (savedInstanceState.containsKey(\"CurSearchNavi\"))\n\t \t\tmCurSearchNavi = savedInstanceState.getString(\"CurSearchNavi\");\n\t \tif (savedInstanceState.containsKey(\"ToNavi\"))\n\t \t\tmToNavi = savedInstanceState.getBoolean(\"ToNavi\");\n\t \tif (savedInstanceState.containsKey(\"ViewingItem\"))\n\t \t\tmViewingItem = savedInstanceState.getInt(\"ViewingItem\");\n\t }\n\n\t // Populate the list is done automatically by the spinner callback\n\t}", "public AutoCompleteTextView(Context context, AttributeSet attrs, int defStyleAttr) {\n/* 113 */ super((Context)null); throw new RuntimeException(\"Stub!\");\n/* */ }", "public UpdateHistory() {\n this(\"update_history\", null);\n }", "public void getHistory() {\n List<Map<String, String>> HistoryList = null;\n HistoryList = getData();\n String[] fromwhere = {\"Line\", \"Station\", \"Repair_Time_Start\", \"Repair_Time_Finish\", \"Repair_Duration\"};\n int[] viewwhere = {R.id.Line, R.id.Station, R.id.RepairTimeStart, R.id.RepairTimeFinish, R.id.Duration};\n ABH = new SimpleAdapter(BreakdownHistory.this, HistoryList, R.layout.list_history, fromwhere, viewwhere);\n BreakdownHistory.setAdapter(ABH);\n }", "private void nextHistoryEntry()\n {\n // get next history entry (into input text field)\n if (this.historyPos < this.history.size()) {\n this.historyPos++;\n this.textInput.setText(this.history.get(this.historyPos));\n this.textInput.setSelection(this.history.get(this.historyPos).length());\n // if last index => input text must be cleaned\n } else if (this.historyPos == this.history.size()) {\n this.textInput.setText(\"\"); //$NON-NLS-1$\n this.textInput.setSelection(0);\n }\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.sqliteexample);\n\t\t// Buttons\n\t\tsqlUpdate = (Button) findViewById(R.id.bUpdateSQL);\n\t\tsqlView = (Button) findViewById(R.id.bViewSQL);\n\t\tsqlGetInfo = (Button) findViewById(R.id.bGet);\n\t\t\n\t\tsqlModify = (Button) findViewById(R.id.bEdit);\n\t\tsqlDelete = (Button) findViewById(R.id.bDelete);\n\n\t\t// Edit texts\n\t\tsqlName = (EditText) findViewById(R.id.actvName);\n\t\tsqlProduct = (EditText) findViewById(R.id.etProduct);\n\t\tsqlRow = (EditText) findViewById(R.id.etRowId);\n\n\t\tsqlView.setOnClickListener(this);\n\t\tsqlUpdate.setOnClickListener(this);\n\t\tsqlGetInfo.setOnClickListener(this);\n\t\tsqlModify.setOnClickListener(this);\n\t\tsqlDelete.setOnClickListener(this);\n\t\t\n\t\tordersHolder autoComplete = new ordersHolder(DropDown.this);\n\t\t//ALWAYS OPEN AND CLOSE THE HOLDER!!!!!!!!!\n\t\tautoComplete.open();\n\t\tArrayList<String> operativesNames = autoComplete.getNames();\n\t\tautoComplete.close();\n\n\t\t//this auto completes the form\n\t\tArrayAdapter<String> adapter = new ArrayAdapter<String>(this,\n\t\t\t\tandroid.R.layout.simple_dropdown_item_1line, operativesNames);\n\t\t\t\tAutoCompleteTextView textView = (AutoCompleteTextView)\n\t\t\t\tfindViewById(R.id.actvName);\n\t\t\t\ttextView.setThreshold(2);\n\t\t\t\ttextView.setAdapter(adapter);\n\t\t}", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n final AutocompletePrediction item = mAdapter.getItem(position);\n final String placeId = item.getPlaceId();\n final CharSequence primaryText = item.getPrimaryText(null);\n// mAutocompleteViewDest.setText(parent.toString());\n// Log.i(TAG, \"Autocomplete item selected: \" + primaryText);\n\n /*\n Issue a request to the Places Geo Data API to retrieve a Place object with additional\n details about the place.\n */\n PendingResult<PlaceBuffer> placeResult = Places.GeoDataApi\n .getPlaceById(mGoogleApiClient, placeId);\n placeResult.setResultCallback(mUpdatePlaceDetailsCallback);\n\n\n// Toast.makeText(getApplicationContext(), \"Clicked: \" + primaryText,\n// Toast.LENGTH_SHORT).show();\n\n\n }", "private History() {}", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.activity_history_appliances);\n\n\t\tgetActionBar().setHomeButtonEnabled(true);\n\t\tgetActionBar().setDisplayHomeAsUpEnabled(true);\n\n\t\ttvDistance = (TextView) findViewById(R.id.tvDistance);\n\t\ttvFuel = (TextView) findViewById(R.id.tvFuel);\n\t\ttvCar = (TextView) findViewById(R.id.tvCar);\n\t\ttvYear = (TextView) findViewById(R.id.tvYear);\n\n\t\tString id = getIntent().getStringExtra(\"id\");\n\t\tpopulateRecord(id);\n\n\t}", "public static APIRequestTask requestAutocomplete(String input) {\n\t\tString url = places_url + \"/autocomplete\" + \"/json\";\n\t\tURLParameter input_param = null;\n\n\t\tinput_param = new URLParameter(\"input\", input);\n\t\tAPIRequestTask task = new APIRequestTask(url);\n\t\ttask.execute(input_param);\n\t\treturn task;\n\t}", "@Override\r\n\tpublic void autoCompletedUpdated() {\r\n\t\tmAdapter = new ArrayAdapter<String>(this, R.layout.sdk_list_entry, R.id.sdk_list_entry_text, mModel.getAutocompleteSuggestions());\r\n\r\n\t\tmListView.setAdapter(mAdapter);\r\n\t\tmListView.invalidate();\r\n\t\t\r\n\t\tmLayout.hideText();\r\n\t\t\r\n\t}", "private void setupAutoComplete() {\n // Map between AutoCompleteTextViews and their Adapters. Some text fields have a custom\n // adapter whose data is updated dynamically (rather than being statically set)\n Map<AutoCompleteTextView, ArrayAdapter<String>> map = new HashMap<>();\n map.put(mBind.layoutWidthEdit, new LayoutDimenAutoComplAdapter(this, LAYOUT_DROPDOWN_ITEM));\n map.put(mBind.layoutHeightEdit, new LayoutDimenAutoComplAdapter(this, LAYOUT_DROPDOWN_ITEM));\n map.put(mBind.backgroundEdit, new ArrayAdapter<>(this, LAYOUT_DROPDOWN_ITEM, Data.getArrColors()));\n map.put(mBind.maxWidthEdit, new DimenAutoComplAdapter(this, LAYOUT_DROPDOWN_ITEM));\n map.put(mBind.maxHeightEdit, new DimenAutoComplAdapter(this, LAYOUT_DROPDOWN_ITEM));\n\n for (Map.Entry<AutoCompleteTextView, ArrayAdapter<String>> e : map.entrySet()) {\n e.getKey().setAdapter(e.getValue());\n // For the fields with custom adapters, set up listener, so that the data of the adapter\n // is updated on every keystroke (e.g. \"14\" -> {\"14dp\", \"14in\", \"14mm\", \"14px\", \"14sp\"})\n if (e.getValue() instanceof AutoComplAdapter) {\n e.getKey().addTextChangedListener(new MyTextWatcher() {\n @Override\n public void afterTextChanged(Editable s) {\n // Trigger filtering process on 's', which updates the data of this adapter\n e.getValue().getFilter().filter(s);\n }\n });\n }\n }\n }", "private void prevHistoryEntry()\n {\n if (this.historyPos > 0) {\n this.historyPos--;\n this.textInput.setText(this.history.get(this.historyPos));\n this.textInput.setSelection(this.history.get(this.historyPos).length());\n }\n }", "public ArrayListFoodAdapter(Context context, FoodDAO foodDAO, AutoCompleteTextView refAutocomplete) {\n super(foodDAO.getAllFood());\n this.foodDAO = foodDAO;\n mResults = foodDAO.getAllFood();\n// refAutocomplete.setAdapter(this);\n }", "private void populateAdapter(String query) {\n // Create a matrixcursor, add suggtion strings into cursor\n final MatrixCursor c = new MatrixCursor(new String[]{ BaseColumns._ID, SearchManager.SUGGEST_COLUMN_TEXT_1 });\n List<String> suggestions = History.getSuggestion(query);\n String str = \"\";\n for (int i=0;i<suggestions.size();i++){\n c.addRow(new Object[] {i, suggestions.get(i)});\n str += suggestions.get(i);\n }\n Toast.makeText(context, str,Toast.LENGTH_SHORT).show();\n mAdapter.changeCursor(c);\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n // Check that the result was from the autocomplete widget.\n if (requestCode == REQUEST_CODE_AUTOCOMPLETE) {\n if (resultCode == RESULT_OK) {\n // Get the user's selected place from the Intent.\n Place place = PlaceAutocomplete.getPlace(this, data);\n Log.i(TAG, \"Place Selected: \" + place.getName());\n\n // Format the place's details and display them in the TextView.\n eventEditVenue.setText(place.getName().toString().trim());\n eventEditAddres.setText(place.getAddress().toString().trim());\n\n // Display attributions if required.\n CharSequence attributions = place.getAttributions();\n// if (!TextUtils.isEmpty(attributions)) {\n// mPlaceAttribution.setText(Html.fromHtml(attributions.toString()));\n// } else {\n// mPlaceAttribution.setText(\"\");\n// }\n } else if (resultCode == PlaceAutocomplete.RESULT_ERROR) {\n Status status = PlaceAutocomplete.getStatus(this, data);\n Log.e(TAG, \"Error: Status = \" + status.toString());\n } else if (resultCode == RESULT_CANCELED) {\n // Indicates that the activity closed before a selection was made. For example if\n // the user pressed the back button.\n }\n }\n }", "protected KeyBoardButton(String keyView){\r\n\t\tsuper(keyView); // setting text\r\n\t\t_keyView = keyView; //saving as an internal field\r\n\t\tthis.setToolTipText(_keyView); //setting tooltip\r\n\t\t_keyBoardButtons.add(this); //adding to arraylist\r\n\t}", "private void fillPlacesList() {\n // Set up an ArrayAdapter to convert likely places into TextViews to populate the ListView\n ArrayAdapter<String> placesAdapter =\n new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, mLikelyPlaceNames);\n lstPlaces.setAdapter(placesAdapter);\n lstPlaces.setOnItemClickListener(listClickedHandler);\n }", "private void setupView()\n\t{\n\t\tnameET = (EditText)findViewById(R.id.newPlaceName);\n\t\taddressET = (EditText)findViewById(R.id.placeAddress);\n\t\tcityET = (EditText)findViewById(R.id.cityET);\n\t\t\n\t\tView b = findViewById(R.id.placeBtnCancel);\n\t\tb.setOnTouchListener(TOUCH);\n\t\tb.setOnClickListener(this);\n\n\t\tView b2 = findViewById(R.id.btnAcceptPlace);\n\t\tb2.setOnTouchListener(TOUCH);\n\t\tb2.setOnClickListener(new View.OnClickListener() {\n\t\t @Override\n\t\t public void onClick(View v) {\n\t\t \tplacename = nameET.getText().toString();\n\t\t \tplaceaddress = addressET.getText().toString();\n\t\t \tplacecity = cityET.getText().toString();\n\t\t \tif(placename.equals(\"\") || placeaddress.equals(\"\") || placecity.equals(\"\")){\n\t\t \t\tToast.makeText(context, \"Fill in all fields!\", Toast.LENGTH_SHORT).show();\n\t\t \t\tfinish();\n\t\t \t\treturn;\n\t\t \t}\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tList<Address> list = gc.getFromLocationName(placeaddress + placecity, 1);\n\t\t\t\t\tif(list.size() == 0){\n\t\t\t \t\tToast.makeText(context, \"Place does not exist!\", Toast.LENGTH_SHORT).show();\n\t\t\t \t\tfinish();\n\t\t\t \t\treturn;\n\t\t\t \t}\n\t\t\t\t\tAddress add = list.get(0);\n\t\t\t\t\tDouble lat = add.getLatitude();\n\t\t\t\t\tDouble lng = add.getLongitude();\n\t\t\t\t\tPlace p = new Place(placename, placeaddress, placecity, ID, String.valueOf(lat), String.valueOf(lng));\n\t\t\t\t\tcurrentMember.addPlace(p);\n\t\t\t\t\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\tnew UpdatePlaceTask(lat, lng).execute().get();\n\t\t\t\t\t\tInputMethodManager imm =(InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);\n\t\t\t\t\t\timm.hideSoftInputFromWindow(cityET.getWindowToken(),0);\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t} \n\t\t\t\t\t\n\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t }\n\t\t});\n\t}", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.main);\n \n keywordList = new String[10];\n incDecList = new String[10];\n valueList = new String[10];\n \n new loadKeywordList().execute(\"\");\n }", "public void onModuleLoad() {\n useCorrectRequestBaseUrl();\n ClientFactory clientFactory = GWT.create(ClientFactory.class);\n EventBus eventBus = clientFactory.getEventBus();\n //this is for history\n PlaceController placeController = clientFactory.getPlaceController();\n\n ActivityMapper activityMapper = new TritonActivityMapper(clientFactory);\n ActivityManager activityManager = new ActivityManager(activityMapper, eventBus);\n activityManager.setDisplay(appWidget);\n\n TritonPlaceHistoryMapper historyMapper = GWT.create(TritonPlaceHistoryMapper.class);\n PlaceHistoryHandler historyHandler = new PlaceHistoryHandler(historyMapper);\n historyHandler.register(placeController, eventBus, defaultPlace);\n\n RootPanel.get().add(appWidget);\n historyHandler.handleCurrentHistory();\n }", "public void loadHistory(SyncedList<MSensor> history) {\n this.history = history;\n }", "private void loadHistory(VssFile vssFile) {\r\n \tif(config.useComApi)\r\n {\r\n \t\tgetVss().getComApiFileHistory(vssFile);\r\n }\r\n \telse\r\n \t{\r\n File historyFile = getVss().getFileHistory(vssFile);\r\n VssHistoryParser p = new VssHistoryParser(config);\r\n p.parseFileHistory(historyFile, vssFile);\r\n \t}\r\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n //setup view and toolbar\n setContentView(R.layout.activity_suggestions);\n setupToolbar(R.id.suggestions_toolbar, true);\n\n //read extras from intent\n Intent intent = getIntent();\n String searchTerm = intent.getStringExtra(EXTRA_SEARCH_TERM);\n ArrayList<String> placeIds = intent.getStringArrayListExtra(EXTRA_PLACE_IDS);\n\n //read from save instance state\n if (savedInstanceState != null) {\n //restore last shown state\n showingMap = savedInstanceState.getBoolean(STATE_SHOWING_MAP, false);\n\n //restore latlngs\n userLatLng = savedInstanceState.getParcelable(STATE_USER_LATLNG);\n friendLatLng = savedInstanceState.getParcelable(STATE_FRIEND_LATLNG);\n midLatLng = savedInstanceState.getParcelable(STATE_MID_LATLNG);\n\n //restore info related to data paging\n pageNumber = savedInstanceState.getInt(STATE_PAGE_NUMBER, pageNumber);\n hasMoreData = savedInstanceState.getBoolean(STATE_HAS_MORE_DATA, hasMoreData);\n nextUrl = savedInstanceState.getString(STATE_NEXT_URL, nextUrl);\n Log.d(TAG, String.format(\"onCreate: savedInstanceState != null. PageNumber:%d, HasMoreData:%s, NextUrl:%s\",\n pageNumber, hasMoreData, nextUrl));\n\n //restore map of selected ids\n ArrayList<String> selectedIdsList = savedInstanceState.getStringArrayList(STATE_SELECTED_IDS);\n ArrayList<Integer> selectedPositionsList = savedInstanceState.getIntegerArrayList(STATE_SELECTED_POSITIONS);\n if (selectedIdsList != null && selectedPositionsList != null) {\n selectedIdsMap.ensureCapacity(selectedIdsList.size());\n for (int i=0; i < selectedIdsList.size(); i++) {\n selectedIdsMap.put(selectedIdsList.get(i), selectedPositionsList.get(i));\n }\n }\n }\n\n //initialize and store references to fragments (must be done before calling showFragment)\n FragmentManager fm = getSupportFragmentManager();\n fragments[LIST] = fm.findFragmentById(R.id.list_fragment);\n fragments[MAP] = fm.findFragmentById(R.id.map_fragment);\n fragments[DATA] = fm.findFragmentByTag(FRAGMENT_TAG_SUGGESTION_DATA);\n if (fragments[DATA] == null) {\n Log.d(TAG, \"onCreate: Data fragment is null so creating a new one now\");\n fragments[DATA] = SuggestionsDataFragment.newInstance(searchTerm,\n PreferenceUtils.getPreferredSearchRadiusInMeters(this),\n PreferenceUtils.getPreferredSearchLimit(this),\n getResources().getDimensionPixelSize(R.dimen.profile_image_size),\n PreferenceUtils.getPreferredDataSource(this));\n fm.beginTransaction()\n .add(fragments[DATA], FRAGMENT_TAG_SUGGESTION_DATA)\n .disallowAddToBackStack()\n .commit();\n }\n\n //show the list fragment if this is the first time (i.e. no savedInstanceState) or\n //restore the view to the last fragment when we last left the activity\n if (showingMap) showMapFragment(false); //false == don't add to backstack\n else showListFragment(false);\n\n //check to make sure latlngs are not null\n //note: even in configuration change, it's possible that the activity was destroyed before the latlngs were set with values\n if (userLatLng == null || friendLatLng == null || midLatLng == null) {\n //latlngs are null so start the place service to get the latlngs\n Log.d(TAG, \"onCreate: LatLngs are null. Starting PlacesService\");\n startService(PlacesService.buildGetPlaceByIdIntent(this, placeIds));\n }\n else {\n //latlngs are not null so initialize the loader to fetch suggestions from the network\n Log.d(TAG, \"onCreate: LatLngs are not null. Fetching data from cache\");\n ((SuggestionsDataFragment) fragments[DATA]).fetchSuggestions(pageNumber, nextUrl); //since this is the initial call, nextUrl is null\n }\n }", "public void createViews(){\n ArrayList<Words> wordsArrayList = new ArrayList<Words>();\n\n //Fill array with english word and hindi translation by creating new word objects\n for(int i = 0; i < defaultWords.size() && i < hindiTranslation.size(); i++){\n wordsArrayList.add(new Words(defaultWords.get(i), hindiTranslation.get(i)));\n }\n\n //ArrayAdapter and ListView used so that not a lot of memory is used to create all textviews when not needed\n //Update** Using WordAdapter which extends ArrayAdapter and only has 2 parameters\n\n WordAdapter adapter = new WordAdapter(this, wordsArrayList);\n\n ListView listView = (ListView) findViewById(R.id.translation_root_view);\n\n listView.setAdapter(adapter);\n\n\n }", "public void doneClicked(View view)\n {\n EditText locationName = (EditText) findViewById(R.id.nameInput);\n EditText locationDesc = (EditText) findViewById(R.id.descInput);\n EditText locationCat = (EditText) findViewById(R.id.categoryInput);\n EditText locAddrTitle = (EditText) findViewById(R.id.addrTitleInput);\n EditText locAddrStreet = (EditText) findViewById(R.id.addrStreetInput);\n EditText locElevation = (EditText) findViewById(R.id.elevationInput);\n EditText locLatitude = (EditText) findViewById(R.id.latitudeInput);\n EditText locLongitude = (EditText) findViewById(R.id.longitudeInput);\n\n // Validate input\n if (!validEntry())\n {\n createStatusDialog(getResources().getString(R.string.create_title_fail),\n getResources().getString(R.string.create_msg_fail));\n }\n else\n {\n // Retrieve values from fields\n String name = locationName.getText().toString().trim();\n String description = locationDesc.getText().toString().trim();\n String category = locationCat.getText().toString().trim();\n String addrTitle = locAddrTitle.getText().toString().trim();\n String addrStreet = locAddrStreet.getText().toString().trim();\n float elevation = Float.parseFloat(locElevation.getText().toString().trim());\n float latitude = Float.parseFloat(locLatitude.getText().toString().trim());\n float longitude = Float.parseFloat(locLongitude.getText().toString().trim());\n\n // Generate place\n currentPlace = new PlaceDescription(name, description, category, addrTitle, addrStreet,\n elevation, latitude, longitude, currentPlace.id);\n\n // Add intent data and start activity\n Intent intent = new Intent(PlaceActivity.this, LibViewActivity.class);\n Bundle bundle = new Bundle();\n bundle.putSerializable(\"place\", currentPlace);\n intent.putExtras(bundle);\n intent.putExtra(\"edit\", edit);\n startActivity(intent);\n }\n }", "@NonNull\n Hologram newHologram(@NonNull Position position, @NonNull List<String> lines);", "public JHistoryTextField()\n {\n this(true);\n }", "public static String getPlaceAutoComplete(Context context, String API_KEY, AutocompleteSupportFragment autocompleteSupportFragment) {\n\n final String[] place_str = new String[1];\n Places.initialize(context, API_KEY);\n PlacesClient placesClient = Places.createClient(context);\n\n if (autocompleteSupportFragment != null) {\n autocompleteSupportFragment.setPlaceFields(Arrays.asList(Place.Field.ID, Place.Field.NAME));\n\n autocompleteSupportFragment.setOnPlaceSelectedListener(new PlaceSelectionListener() {\n @Override\n public void onPlaceSelected(Place place) {\n // TODO: Get info about the selected place.\n // textView.setText(place.getName()+\",\"+place.getId());\n // Log.i(TAG, \"Place: \" + place.getName() + \", \" + place.getId());\n\n place_str[0] = place.getName() + \",\" + place.getId();\n }\n\n @Override\n public void onError(Status status) {\n // TODO: Handle the error.\n //Log.i(TAG, \"An error occurred: \" + status);\n }\n });\n }\n\n String places = \"\";\n if (place_str[0] != null) {\n places = place_str[0];\n }\n return places;\n }", "private void loadAutoCompleteData() {\n List<String> labelsItemName = db.getAllItemsNames();\n // Creating adapter for spinner\n ArrayAdapter<String> dataAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1,\n labelsItemName);\n\n // Drop down layout style - list view with radio button\n dataAdapter.setDropDownViewResource(android.R.layout.simple_list_item_1);\n\n // attaching data adapter to spinner\n autoCompleteTextViewSearchItem.setAdapter(dataAdapter);\n\n // List - Get Menu Code\n List<String> labelsMenuCode = db.getAllMenuCodes();\n // Creating adapter for spinner\n ArrayAdapter<String> dataAdapter1 = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1,\n labelsMenuCode);\n\n // Drop down layout style - list view with radio button\n dataAdapter1.setDropDownViewResource(android.R.layout.simple_list_item_1);\n\n // attaching data adapter to spinner\n autoCompleteTextViewSearchMenuCode.setAdapter(dataAdapter1);\n\n POS_LIST = ArrayAdapter.createFromResource(this, R.array.poscode, android.R.layout.simple_spinner_item);\n spnr_pos.setAdapter(POS_LIST);\n\n // barcode\n List<String> labelsBarCode = db.getAllBarCodes();\n ArrayAdapter<String> dataAdapter11 = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1,\n labelsBarCode);\n dataAdapter11.setDropDownViewResource(android.R.layout.simple_list_item_1);\n autoCompleteTextViewSearchItemBarcode.setAdapter(dataAdapter11);\n\n }", "public void onCreateView(JTextPane textEditorView) {\n\t\t\r\n\t\tthis.classNameText = \"JabaProgram\";\r\n\t\tthis.textEditorView = textEditorView;\r\n\t\t\r\n\t\t//this.assignAutoCompleteFunction();\r\n\t\t\r\n\t\t//return this.parentView;\r\n\t}", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.set_value);\n mKeyEdit = (EditText) findViewById(R.id.key);\n mKeyEdit.setOnFocusChangeListener(new View.OnFocusChangeListener() {\n @Override\n public void onFocusChange(View view, boolean hasFocus) {\n if (!hasFocus && TextUtils.isEmpty(mValueEdit.getText())) {\n fetchValue(mKeyEdit.getText().toString());\n }\n }\n });\n mKeyEdit.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n mValueEdit.getText().clear();\n }\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n }\n\n @Override\n public void afterTextChanged(Editable s) {\n mHandler.removeCallbacks(mFetchRunnable);\n mHandler.postDelayed(mFetchRunnable, 500);\n }\n });\n mValueEdit = (EditText) findViewById(R.id.value);\n mSetValueBtn = (Button) findViewById(R.id.btn_set_value);\n mSetValueBtn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n new CacheSaveTask().execute(new KeyValue(mKeyEdit.getText().toString(),\n mValueEdit.getText().toString()));\n }\n });\n new CacheLoadTask().execute();\n }", "private static void createHistoryEntry(int docId, String username, String eventType) {\r\n History history = new History();\r\n history.setDocId(docId);\r\n history.setDate(DateBean.toCompactString());\r\n history.setUsername(username);\r\n history.setEvent(eventType);\r\n HistoryDAO historyDao = (HistoryDAO) Context.getInstance().getBean(HistoryDAO.class);\r\n historyDao.store(history);\r\n }", "public void btnClick(final AutoCompleteTextView actv2) {\n button = (Button) findViewById(R.id.button1);\n button.setOnClickListener(new OnClickListener() {\n @Override\n public void onClick(View arg0) {\n \tIntent i = new Intent(getBaseContext(), StockDetailActivity.class); // navigate to NZX50 screen to add stocks to the watchlist\n \t//Create a bundle object\n Bundle b = new Bundle();\n \n //Inserts a String value into the mapping of this Bundle\n String code = actv2.getText().toString();\n b.putString(\"name\", code.substring(code.indexOf(':'), code.length())); \n \n //Add the bundle to the intent.\n i.putExtras(b);\n \t\n \tstartActivity(i);\n }\n });\n\t}", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.fourtagslinkactivity);\n \n editTextTagContents = (EditText)findViewById(R.id.editTextTagId);\n editTextTagUrl = (EditText)findViewById(R.id.editTextRedirectTo);\n \n buttonSave = (Button)findViewById(R.id.buttonSave);\n buttonSave.setOnClickListener(this);\n \n buttonDelete = (Button)findViewById(R.id.buttonDelete);\n buttonDelete.setOnClickListener(this);\n \n buttonBookmark = (Button)findViewById(R.id.buttonBookmarks);\n buttonBookmark.setOnClickListener(this);\n \n editTextTagUrl.requestFocus();\n \n Cursor c = managedQuery(Uri.parse(\"content://browser/bookmarks\"), null, null, null, null);\n c.moveToFirst();\n String[] str = c.getColumnNames();\n for(String string:str){\n \tLog.v(getClass().getSimpleName(),\"Str: \"+string);\n }\n \n resolveIntent(getIntent());\n }", "public void addBookmarks(ActionEvent event) throws IOException{\n bookmarkTxt();\n }", "public void onClickDictionary(View view) {\n Intent intent = new Intent(this, DictionaryActivity.class);\n startActivity(intent);\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_word_form);\n score = (TextView) findViewById(R.id.tvScoreDisplay);\n dictionary = (TextView) findViewById(R.id.tvLettersCollected);\n submitButton = (Button) findViewById(R.id.btSubmitWord);\n for(int i = 0; i < str.length(); i++){\n LettersCollected.add(str.charAt(i));\n }\n for(Character l : LettersCollected) {\n dict.append(l + \" \");\n }\n dictionary.setText(dict);\n InputStream is = getResources().openRawResource(R.raw.dictionary);\n BufferedReader reader = new BufferedReader(new InputStreamReader(is));\n String word = null;\n try {\n word = reader.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n try {\n while (word != null) {\n Dictionary.add(word);\n word = reader.readLine();\n }\n reader.close();\n is.close();\n } catch (IOException e1) {\n e1.printStackTrace();\n }\n buttonPressed();\n\n }", "@Override\n protected void onCreate(@Nullable Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_map);\n mSearchText = (AutoCompleteTextView) findViewById(R.id.input_search);\n mGps = (ImageView) findViewById(R.id.ic_gps);\n // mBd= FirebaseDatabase.getInstance().getReference().child(\"Patients\");\n // mBd.push().setValue(marker);\n\n getLocationPermission();\n Places.initialize(getApplicationContext(),\"AIzaSyCo2VRdwGMQmSeVKzSfvGrgCN0Vuy4i7u0\");\n mSearchText.setFocusable(false);\n mSearchText.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n List<Place.Field> fieldList= Arrays.asList(Place.Field.ADDRESS, Place.Field.LAT_LNG, Place.Field.NAME);\n Intent intent = new Autocomplete.IntentBuilder(AutocompleteActivityMode.OVERLAY, fieldList).build(MapActivity.this);\n startActivityForResult(intent,100);\n }\n });\n\n //getLocationPermission();\n }", "public void showHistory(){\n \tif (historyExample==null) historyExample = new HistoryExample();\n setWidgetAsExample(historyExample);\n }", "@Override\r\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\r\n\r\n\r\n\r\n\r\n new GetPlaces(this,getListView()).execute();\r\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_user_history_activity);\n ActionBar actionBar = this.getSupportActionBar();\n\n if (actionBar != null) {\n actionBar.setDisplayHomeAsUpEnabled(true);\n }\n /* Set up for the RecyclerView */\n recyclerView = findViewById(R.id.user_history_RV);\n recyclerView.setLayoutManager(new LinearLayoutManager(this));\n adapter = new UserHistoryAdapter(this);\n recyclerView.setAdapter(adapter);\n /* Calls the overhead Loader manager to handle and begin loading the database */\n getSupportLoaderManager().initLoader(ORDER_LOADER_ID, null, this );\n\n }", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tinit();\r\n\t\taddView = (TextView) findViewById(R.id.id_submit_view);\r\n\t\taddView.setOnClickListener(new OnClickListener() {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tgatewayId = gatewayView.getEditableText().toString();\r\n\t\t\t\tLog.i(TAG, \"gatewayId \" + gatewayId.trim());\r\n\t\t\t\tgatewayId = gatewayId.trim();\r\n\t\t\t\tif(gatewayId.trim().isEmpty()){\r\n\t\t\t\t\tbindHintView.setVisibility(View.VISIBLE);\r\n\t\t\t\t\tbindbarView.setVisibility(View.GONE);\r\n\t\t\t\t\tbindHintView.setText(R.string.bind_gateway_none);\r\n\t\t\t\t\tbindHintView.setTextColor(getResources().getColor((R.color.red)));\r\n\t\t\t\t}else {\r\n\t\t\t\t\tsetHintVisible(true);\r\n\t\t\t\t\tnew Thread(new BindRunnale()).start();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t}", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetListAdapter(mListAdapter = new ECGRecordListAdapter(\n\t\t\t\tgetHistoryRecordIDs(), this));\n\t}", "public void initialize(){\n titleBox.setTextFormatter( new TextFormatter<>(c -> {\n if(c.getControlNewText().length() > 30 ) return null;\n boolean error=false;\n char[] chars = c.getText().toCharArray();\n for (char aChar : chars)\n if (aChar == '\\n' ) {\n error = true;\n break;\n }\n if (error) return null;\n else return c;\n }));\n //default settings\n resultBox.setEditable(false);\n formatter.applyPattern(\"dd/MM/yyyy\");\n datePick.getEditor().setText(formatter.format(date));\n //arrayList to store each diaryPage and every words in dictionary\n book= new ArrayList<>();\n dictionary = new ArrayList<>();\n //read from txt file for existing diary pages and dictionary\n try {\n BufferedReader reader = new BufferedReader(new FileReader(new File(\"src/diary/content.txt\")));\n String line= reader.readLine();\n while (line != null){\n String date,title,content=\"\";\n int lineCount;\n date = line;\n title = reader.readLine();\n lineCount = Integer.parseInt(reader.readLine());\n for(int i=0;i<lineCount;i++){\n line = reader.readLine();\n //noinspection StringConcatenationInLoop\n content = content + line + System.lineSeparator();\n }\n book.add(new DiaryPage(date,title,content,lineCount));\n line = reader.readLine();\n }\n reader.close();\n reader = new BufferedReader(new FileReader(new File(\"src/extra/words.txt\")));\n line= reader.readLine();\n while (line != null){\n dictionary.add(line);\n line = reader.readLine();\n }\n reader.close();\n\n } catch (java.io.IOException e) {\n e.printStackTrace();\n }\n //save new diary into txt file after user exit the application\n Main.window.setOnHiding(event -> saveFile());\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.activity_destination);\n\n\t\t// Getting trip info from trip class through intent\n\t\tIntent fromTrip = getIntent();\n\t\ttName = fromTrip.getStringExtra(\"tripVal\");\n\t\tnPeople = fromTrip.getIntExtra(\"peopleVal\", 1);\n\n\t\t//Initializing widgets\n\t\tTextView txtDestinationHeader = (TextView) findViewById(R.id.txtDestinationHeader);\n\t\ttxtDestinationHeader.setText(tName);\n\t\tdestName = (EditText) findViewById(R.id.edtTextDestinationName);\n\t\tedtTextZip = (EditText) findViewById(R.id.edtTextZip);\n\t\tedtTextMemos = (EditText) findViewById(R.id.edtTextMemos);\n\t\tedtTextStreetAdress = (EditText) findViewById(R.id.edtTextStreetAdress);\n\t\tedtTextCity = (EditText) findViewById(R.id.edtTextCity);\n\t\tbtnAdd = (Button) findViewById(R.id.btnAdd);\n\t\tbtnUpdate = (Button) findViewById(R.id.btnUpdate);\n\t\tbtnNext = (Button) findViewById(R.id.btnNext);\n\t\tbtnDelete = (Button) findViewById(R.id.btnDelete);\n\t\tbtnMapView = (Button) findViewById(R.id.btnMapView);\n\n\t\t// List adapter configuration \n\t\taa = new ArrayAdapter<String>(this,\n\t\t\t\tandroid.R.layout.simple_list_item_1, placeName);\n\t\tsetListAdapter(aa);\n\t\t\n\t\t\n\t\t// Adding listeners to buttons\n\t\taa.notifyDataSetChanged();\n\t\tbtnAdd.setOnClickListener(this);\n\t\tbtnUpdate.setOnClickListener(this);\n\t\tbtnDelete.setOnClickListener(this);\n\t\tbtnNext.setOnClickListener(this);\n\t\tbtnMapView.setOnClickListener(this);\n\n\t\t// setting hints to guide user inputs\n\t\tdestName.setHint(\"Name destination\");\n\t\tedtTextZip.setHint(\"Zip Code\");\n\t\tedtTextMemos.setHint(\"Notes for this destination\");\n\t\tedtTextStreetAdress.setHint(\"Street Address\");\n\t\tedtTextCity.setHint(\"City\");\n\n\t}", "@Override\r\n public void initialize(URL url, ResourceBundle rb) {\r\n \r\n AutoCompletionBinding<Project> txt_name = TextFields.bindAutoCompletion(name, new Callback<AutoCompletionBinding.ISuggestionRequest, Collection<Project>>() {\r\n\r\n @Override\r\n public Collection<Project> call(AutoCompletionBinding.ISuggestionRequest param) {\r\n List<Project> list = null;\r\n HttpHelper helper = new HttpHelper();\r\n try {\r\n LovHandler lovHandler = new LovHandler(\"projects\", \"PROJECT\");\r\n String response = lovHandler.getSuggestions(param.getUserText());\r\n list = (List<Project>) new JsonHelper().convertJsonStringToObject(response, new TypeReference<List<Project>>() {\r\n });\r\n } catch (IOException ex) {\r\n Logger.getLogger(ProjectController.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n\r\n return list;\r\n }\r\n\r\n \r\n }, new StringConverter<Project>() {\r\n\r\n @Override\r\n public String toString(Project object) {\r\n return object.getName() + \" (ID:\" + object.getId() + \")\";\r\n }\r\n\r\n @Override\r\n public Project fromString(String string) {\r\n throw new UnsupportedOperationException(\"Not supported yet.\");\r\n }\r\n });\r\n\r\n //event handler for setting other Client fields with values from selected Client object\r\n //fires after autocompletion\r\n txt_name.setOnAutoCompleted(new EventHandler<AutoCompletionBinding.AutoCompletionEvent<Project>>() {\r\n\r\n @Override\r\n public void handle(AutoCompletionBinding.AutoCompletionEvent<Project> event) {\r\n Project project = event.getCompletion();\r\n //fill other item related fields\r\n \r\n PROJECT.setText(splitName(name.getText()));\r\n \r\n \r\n //populateAuditValues(client);\r\n }\r\n });\r\n // TODO\r\n }", "public IapHistory() {\n\t\tthis(\"iap_history\", null);\n\t}", "public History() {\n }", "@Override\n public void onCreate(Bundle savedInstanceState)\n {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.main);\n\n TextView tv = (TextView) findViewById(R.id.text);\n Gson gson = new Gson();\n String jsonString = gson.toJson(STRINGS);\n tv.setText(jsonString);\n }", "private void displayView() {\r\n\t\t/* Layout */\r\n\t\tmLayout = new StandardTitledLayout(this);\r\n\t\tmLayout.setTitle(getString(R.string.directory_searchView_title));\r\n\r\n\t\t//Add the little magnifying glass on the virtual keyboard\r\n\t\tmInputBar = new InputBarElement(this, null,getString(R.string.directory_searchView_hint));\r\n\t\t//and set what it does\r\n\t\tmInputBar.setImeOptions(EditorInfo.IME_ACTION_SEARCH);\r\n\t\tmInputBar.setOnEditorActionListener(new OnEditorActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic boolean onEditorAction(TextView v, int actionId, KeyEvent event) {\r\n\t\t\t\tif(actionId == EditorInfo.IME_ACTION_SEARCH){\r\n\t\t\t\t\tString query = mInputBar.getInputText();\r\n\t\t\t\t\tsearch(query);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tmInputBar.setOnButtonClickListener(new OnClickListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\tString query = mInputBar.getInputText();\r\n\t\t\t\tsearch(query);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tmInputBar.setOnKeyPressedListener(new OnKeyPressedListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void onKeyPressed(String text) {\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tif(mInputBar.getInputText().length() == 0){\r\n\t\t\t\t\tmInputBar.setButtonText(null);\r\n\t\t\t\t\tmAdapter = new ArrayAdapter<String>(getApplicationContext(), R.layout.sdk_list_entry, R.id.sdk_list_entry_text, new ArrayList<String>());\r\n\r\n\t\t\t\t\tmListView.setAdapter(mAdapter);\r\n\t\t\t\t\tmListView.invalidate();\r\n\t\t\t\t\t\r\n\t\t\t\t}else{\r\n\t\t\t\t\tmInputBar.setButtonText(\"\");\r\n\t\t\t\t\tmController.getAutoCompleted(text);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tmLayout.addFillerView(mInputBar);\r\n\t\tsetContentView(mLayout);\r\n\t\t\r\n\t\r\n\t}", "private void addArchitectureMarkers() {\n try {\n // Get the text file\n InputStream file = getResources().openRawResource(R.raw.architecture);\n\n // Read the file to get contents\n BufferedReader reader = new BufferedReader(new InputStreamReader(file));\n String line;\n\n // Read every line of the file one line at a time\n while ((line = reader.readLine()) != null) {\n String[] architecture = line.split(\";\", 6);\n\n String architectureName = architecture[0];\n String placeID = architecture[1];\n String architectureDate = architecture[2];\n String architectureInfo = architecture[3];\n String architectureStyle = architecture[4];\n String architect = architecture[5];\n\n // Initialize Places.\n Places.initialize(getApplicationContext(), getString(R.string.google_directions_key));\n // Create a new Places client instance.\n PlacesClient placesClient = Places.createClient(this);\n // Specify the fields to return.\n List<Place.Field> placeFields = Arrays.asList(Place.Field.NAME, Place.Field.LAT_LNG,\n Place.Field.PHOTO_METADATAS);\n // Construct a request object, passing the place ID and fields array.\n FetchPlaceRequest request = FetchPlaceRequest.builder(placeID, placeFields).build();\n\n placesClient.fetchPlace(request).addOnSuccessListener((response) -> {\n Place place = response.getPlace();\n Log.i(\"TAG\", \"Place found: \" + place.getName());\n LatLng latlng = place.getLatLng();\n\n //Get the photo metadata.\n if (place.getPhotoMetadatas() == null) {\n Log.i(\"mylog\", \"no photo\");\n } else {\n //choose better default pictures for these buildings\n PhotoMetadata photoMetadata = place.getPhotoMetadatas().get(0);\n if (place.getName().equals(\"The Cube\")) {\n photoMetadata = place.getPhotoMetadatas().get(2);\n }\n if (place.getName().equals(\"Millennium Point Car Park\")) {\n photoMetadata = place.getPhotoMetadatas().get(1);\n }\n if (place.getName().equals(\"School of Art\")) {\n photoMetadata = place.getPhotoMetadatas().get(1);\n }\n if (place.getName().equals(\"Saint Martin in the Bull Ring\")) {\n photoMetadata = place.getPhotoMetadatas().get(2);\n }\n if (place.getName().equals(\"Bullring & Grand Central\")) {\n photoMetadata = place.getPhotoMetadatas().get(1);\n }\n if (place.getName().equals(\"Mailbox Birmingham\")) {\n photoMetadata = place.getPhotoMetadatas().get(1);\n }\n if (place.getName().equals(\"The International Convention Centre\")) {\n photoMetadata = place.getPhotoMetadatas().get(1);\n }\n if (place.getName().equals(\"Birmingham Museum & Art Gallery\")) {\n photoMetadata = place.getPhotoMetadatas().get(1);\n }\n // Create a FetchPhotoRequest.\n FetchPhotoRequest photoRequest = FetchPhotoRequest.builder(photoMetadata)\n .setMaxWidth(200)\n .setMaxHeight(200)\n .build();\n\n placesClient.fetchPhoto(photoRequest).addOnSuccessListener((fetchPhotoResponse) -> {\n Bitmap bitmap = fetchPhotoResponse.getBitmap();\n // Add border to image\n Bitmap bitmapWithBorder = Bitmap.createBitmap(bitmap.getWidth() + 12, bitmap.getHeight()\n + 12, bitmap.getConfig());\n Canvas canvas = new Canvas(bitmapWithBorder);\n canvas.drawColor(Color.rgb(255, 128, 128));\n canvas.drawBitmap(bitmap, 6, 6, null);\n //Add marker onto map\n Marker marker = mMap.addMarker(new MarkerOptions()\n .position(new LatLng(latlng.latitude, latlng.longitude))\n .title(architectureName)\n .icon(BitmapDescriptorFactory.fromBitmap(bitmapWithBorder)));\n marker.setTag(placeID);\n String url = getUrl(currentPosition, marker.getPosition(), \"walking\");\n new FetchURL(MapsActivity.this).execute(url, \"walking\");\n //Store marker info\n markersList.add(marker);\n markerHashmap.put(marker.getTitle(), bitmap);\n architectureDateHashmap.put(marker.getTitle(), architectureDate);\n architectureInfoHashmap.put(marker.getTitle(), architectureInfo);\n architectureStyleHashmap.put(marker.getTitle(), architectureStyle);\n architectHashmap.put(marker.getTitle(), architect);\n if (markersList.size() == 34) {\n //Set camera position once all markers loaded in\n setCameraPosition(mMap, markersList);\n }\n }).addOnFailureListener((exception) -> {\n if (exception instanceof ApiException) {\n ApiException apiException = (ApiException) exception;\n int statusCode = apiException.getStatusCode();\n // Handle error with given status code.\n Log.e(TAG, \"Photo not found: \" + exception.getMessage());\n }\n });\n }\n }).addOnFailureListener((exception) -> {\n if (exception instanceof ApiException) {\n ApiException apiException = (ApiException) exception;\n int statusCode = apiException.getStatusCode();\n // Handle error with given status code.\n Log.e(\"TAG\", \"Place not found: \" + placeID + exception.getMessage());\n\n }\n });\n }\n reader.close();\n } catch (NullPointerException e) {\n e.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private void createView(Tab tab, VMFile file, PostProcessHandler handler) {\n editResourceService.getFileContent(file.getId(), new AsyncCallback<byte[]>() {\n\n @Override\n public void onFailure(Throwable caught) {\n SC.warn(caught.getMessage());\n }\n\n @Override\n public void onSuccess(byte[] result) {\n BinaryResourceImpl r = new BinaryResourceImpl();\n ByteArrayInputStream bi = new ByteArrayInputStream(result);\n AbstractRootElement root = null;\n try {\n if (file.getExtension() != Extension.TXT && file.getExtension() != Extension.LSC && file.getExtension() != Extension.CSC) {\n r.load(bi, EditOptions.getDefaultLoadOptions());\n root = (AbstractRootElement) r.getContents().get(0);\n }\n } catch (IOException e) {\n SC.warn(e.getMessage());\n }\n Editor editor;\n if (file.getExtension() == null) {\n editor = new TextEditor(tab, file, editResourceService);\n editor.create();\n } else\n switch (file.getExtension()) {\n\n case ARC:\n editor = new ARCEditor((ARCRoot) root, projectId, editResourceService);\n editor.create();\n clickNewStateMachine((ARCEditor) editor, file);\n clickOpenFile((ARCEditor) editor);\n break;\n case FM:\n editor = new FMEditor((FMRoot) root, projectId, file.getId(), editResourceService);\n editor.create();\n clickOpenFile((FMEditor) editor);\n clickCreateChildModel((FMEditor) editor, file);\n setFileNameToReferenceNode((FMEditor) editor);\n break;\n case FMC:\n editor = new FMCEditor((FMCRoot) root, file.getId(), projectId, editResourceService);\n editor.create();\n break;\n case FSM:\n editor = new FSMEditor((FSMDStateMachine) root, file.getId());\n editor.create();\n break;\n case SCD:\n editor = new SCDEditor((SCDRoot) root, tab, projectId, ModelingProjectView.this, editResourceService);\n editor.create();\n clickOpenFile((SCDEditor) editor);\n break;\n case SPQL:\n editor = new SPQLEditor((SPQLRoot) root, tab, projectId, editResourceService);\n editor.create();\n clickOpenFile((SPQLEditor) editor);\n break;\n case TC:\n editor = new TCEditor((TCRoot) root, projectId, file.getName(), editResourceService);\n editor.create();\n break;\n case BPS:\n editor = new BPSEditor((BPSRoot) root, ModelingProjectView.this, projectId, file.getId(), editResourceService);\n editor.create();\n break;\n case BP:\n editor = new BPEditor((BPRoot) root, projectId, file, editResourceService);\n editor.create();\n break;\n case FPS:\n editor = new TPSEditor((TPSRoot) root, ModelingProjectView.this, projectId, file.getId(), editResourceService);\n editor.create();\n break;\n case FP:\n editor = new TPViewer((TPRoot) root, projectId, file, editResourceService);\n editor.create();\n break;\n case CSC:\n editor = new CSCEditor(tab, file, editResourceService);\n editor.create();\n break;\n case SCSS:\n editor = new CBEditor((CBRoot) root, ModelingProjectView.this, projectId, file.getId(), editResourceService);\n editor.create();\n break;\n case SCS:\n editor = new SCSEditor((SCSRoot) root, ModelingProjectView.this, projectId, file, editResourceService);\n editor.create();\n break;\n case CSCS:\n editor = new CSCSEditor((CSCSRoot) root, projectId, file);\n editor.create();\n break;\n default:\n editor = new TextEditor(tab, file, editResourceService);\n editor.create();\n }\n createTabMenu(tab, editor.getSaveItem());\n clickSaveFile(editor, tab);\n\n if (editor instanceof NodeArrangeInterface) {\n NodeArrange.add((NodeArrangeInterface) editor);\n }\n tab.setPane(editor.getLayout());\n tab.setAttribute(EDITOR, editor);\n editorTabSet.addTab(tab);\n editorTabSet.selectTab(tab.getAttributeAsString(\"UniqueId\"));\n if (handler != null) {\n handler.execute();\n }\n }\n });\n }", "@Inject\n public APKFileAnalyzer(@Named(\"aapt.command\") String aaptCommand) {\n this.aaptCommand = aaptCommand;\n }", "@Override\n public void onCreate(Bundle savedInstanceState)\n {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.leagueeditor);\n \n //Set Widget Objects\n txtLeague = (EditText)findViewById(R.id.txtLeague);\n btnAddLeague = (Button)findViewById(R.id.btnAddLeague);\n lstLeagues = (ListView)findViewById(R.id.lstLeagues);\n \n btnAddLeague.setOnClickListener(new View.OnClickListener()\n {\n \t@Override\n\t\t\tpublic void onClick(View v)\n \t{\n \t\tif(txtLeague.getText().toString().length() == 0)\n \t\t{\n \t\t\tToast.makeText(LeagueEditor.this, \"League Must Have A Name\", Toast.LENGTH_SHORT).show();\n \t\t}\n \t\telse\n \t\t{\n \t\t\tContentValues values = new ContentValues(1);\n \t\tvalues.put(LeagueConn.Constants.BOWLING_LEAGUE_NAME, txtLeague.getText().toString());\n \t\tgetContentResolver().insert(LeagueConn.Constants.CONTENT_URI, values);\n \t\tBindGrid();\n \t\t\tToast.makeText(LeagueEditor.this, \"League Has Been Entered\", Toast.LENGTH_SHORT).show();\n \t\t}\n \t}\n\t\t});\n \n BindGrid();\n }", "public interface GooglePlacesApi {\n\n @GET(\"maps/api/place/autocomplete/json?type=(cities)&language=es\")\n Call<PredictionResult> autoComplete(@Query(\"input\") String text);\n\n @GET(\"maps/api/place/details/json\")\n Call<DetailsResult> getPlaceDetails(@Query(\"place_id\") String text);\n\n\n}", "public BuildHistory(ArrayList<Build> buildHistory) {\n this.buildHistory = buildHistory;\n }", "private DetailsEditWatcher(TextView textView) {\n mTextTarget = textView;\n\n }", "private void initSearchBar(){\n /////// Code to run the autocomplete search bar\n\n //setContentView(R.layout.activity_item);\n\n //Reference the widget\n //AutoCompleteTextView searchBar = findViewById(R.id.search_items);\n searchBar = findViewById(R.id.search_items);\n\n //Create an array adapter to supply suggestions to the bar\n ArrayAdapter<String> itemAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1,itemsOnlyList);\n\n //Pass the adapter to the text field\n searchBar.setAdapter(itemAdapter);\n\n searchBar.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n InputMethodManager in = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n in.hideSoftInputFromWindow(view.getApplicationWindowToken(), 0);\n }\n });\n\n\n //Add items to the list based on click\n addItemButton = findViewById(R.id.button_AddItem);\n\n //Interact with the recycler view if the user clicks the plus button\n addItemButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n //Behaviour to add a new item to the recycler view\n\n // Find the card info class based on the user selection\n for (int m = 0; m < itemsOnlyList.length; m++){\n\n if(searchBar.getText().toString().equals(itemArray[m].getCardName().intern())){\n //Add the new card to the player hand array??\n playerCards.add(itemArray[m]);\n\n //Add the one card in question to this variable.\n playerCard = itemArray[m];\n\n //Leave the loop if a match is found\n break;\n }\n }\n\n updateListView(playerCards);\n }\n });\n\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_game_entry);\n\n final Button button = findViewById(R.id.add_game_entry_button);\n final EditText mNameField = findViewById(R.id.activity_game_entry_name);\n final EditText mTagField = findViewById(R.id.activity_game_entry_tag);\n\n mEditPosition = getIntent().getIntExtra(\"position\", -1);\n Log.d(\"Debug\", \">>> \" + mEditPosition);\n\n if (mEditPosition != -1) {\n mNameField.setText(MainActivity.getFromGameEntryArray(mEditPosition).getName());\n mTagField.setText(MainActivity.getFromGameEntryArray(mEditPosition).getTag());\n }\n\n button.setOnClickListener(new View.OnClickListener() {\n public void onClick(View v) {\n GameEntry gameEntry = new GameEntry(mNameField.getText().toString(), mTagField.getText().toString());\n MainActivity.addToGameEntryArray(gameEntry);\n if (mEditPosition != -1) {\n MainActivity.removeFromGameEntryArray(mEditPosition);\n }\n finish();\n }\n });\n }", "public void GetPlace(String placeid,\n String key,\n Callback<GooglePlaceData> cb) {\n if (CMAppGlobals.DEBUG) Logger.i(TAG, \":: GoogleModel.GetAutocomplete placeid : \" + placeid\n + \" : key : \" + key\n + \" : cb : \" + cb);\n\n Call<GooglePlaceData> googleGeocodeCall = googleService.GetPlace(placeid, key);\n googleGeocodeCall.enqueue(cb);\n\n }", "void onHistoryButtonClicked();", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.search);\n mActionBar = (ActionBar) findViewById(R.id.actionbar);\n\n mAdapter = new TagsAdapter();\n ListView list = (ListView) findViewById(R.id.list_tags);\n list.setAdapter(mAdapter);\n list.setOnItemClickListener(this);\n\n final EditText search = (EditText) findViewById(R.id.edit_search);\n search.setOnEditorActionListener(new OnEditorActionListener() {\n\n @Override\n public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {\n switch (event.getKeyCode()) {\n case KeyEvent.KEYCODE_ENTER:\n if (KeyEvent.ACTION_DOWN == actionId) {\n openGallery(search.getText().toString().trim());\n return true;\n }\n break;\n }\n return false;\n }\n });\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_search, container, false);\n autoCompViewto = (AutoCompleteTextView) view.findViewById(R.id.autoComplete2);\n citychanged=(Button) view.findViewById(R.id.citychange);\n citySelected=(TextView) view.findViewById(R.id.city);\n //citySelected.setText(\"City Selected \\n Default (Bangalore)\");\n citychanged.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n // TODO Auto-generated method stub\n displayCitylist();\n }\n });\n autoCompViewto.setAdapter(new PlacesAutoCompleteAdapter(context, R.layout.list_item));\n autoCompViewto.setOnItemClickListener(this);\n\n autoCompViewto.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if(!isCitySelected) {\n isCitySelected=true;\n }\n }\n });\n\n\n autoCompViewfrom = (AutoCompleteTextView) view.findViewById(R.id.autoComplete1);\n autoCompViewfrom.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if(!isCitySelected) {\n displayCitylist();\n isCitySelected=true;\n }\n }\n });\n autoCompViewfrom.setAdapter(new PlacesAutoCompleteAdapter(context, R.layout.list_item));\n autoCompViewfrom.setSelection(0);\n autoCompViewfrom.setOnItemClickListener(this);\n isCurr=false;\n Night_fare=(CheckBox) view.findViewById(R.id.NightFare);\n //Night_fare.isChecked(false);\n isNight=false;\n search= (CircleButton) view.findViewById(R.id.search_btn);\n curLoc=(Button) view.findViewById(R.id.Cur_button);\n curLoc.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n isCurr=true;\n autoCompViewfrom.setText(\"My Location\");\n }\n });\n\n\n search.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if (autoCompViewto.getText() == null || autoCompViewfrom.getText() == null || autoCompViewto.getText().length() == 0 || autoCompViewfrom.getText().length() == 0) {\n AlertDialog.Builder builder1 = new AlertDialog.Builder(context);\n builder1.setMessage(\"Please Enter the From and To Address...!!!\");\n builder1.setCancelable(false);\n builder1.setPositiveButton(\"OK\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n }\n });\n\n AlertDialog alert11 = builder1.create();\n alert11.show();\n\n } else {\n\n isNight = false;\n if (Night_fare.isChecked()) isNight = true;\n Log.d(\"shared_preference\", \" \" + isNight);\n Intent intent = new Intent(context, mapGetDirections.class);\n intent.putExtra(\"toLocation\", autoCompViewto.getText().toString());\n intent.putExtra(\"fromLocation\", autoCompViewfrom.getText().toString());\n intent.putExtra(\"cur_location\", isCurr);\n intent.putExtra(\"Itsnight\", isNight);\n isCurr = false;\n isCitySelected=false;\n Night_fare.setChecked(false);\n startActivity(intent);\n autoCompViewfrom.getText().clear();\n autoCompViewto.getText().clear();\n }\n }\n });\n return view;\n }", "public void btnNewQuote(View view){\n setupTextView();\n newQuote();\n quoteTextView.setText(Variables.quote);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.main);\n \n bookmarkUrlInput = (EditText) findViewById(R.id.bookmarkAdressInput);\n bookmarkNameInput = (EditText) findViewById(R.id.bookmarkNameInput);\n \n bookmarkSaveButton = (Button) findViewById(R.id.saveBookmarkButton);\n\t\tbookmarkSaveButton.setOnClickListener(new Button.OnClickListener() {\n\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\n\t\t\t\tString url = bookmarkUrlInput.getText().toString();\n\t\t\t\tString name = bookmarkNameInput.getText().toString(); \n\t\t\t\t\n\t\t\t\tString errorMsg = \"\";\n\t\t\t\tboolean error = false;\n\t\t\t\tboolean success = false;\n\t\t\t\t\n\t\t\t\tif(url==null || url.equals(\"\")) {\n\t\t\t\t\terror = true;\n\t\t\t\t\terrorMsg += \"Podaj adres zakladki\\n\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(name==null || name.equals(\"\")) {\n\t\t\t\t\terror = true;\n\t\t\t\t\terrorMsg += \"Podaj nazwe zakladki\\n\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(error) {\n\t\t\t\t\tToast.makeText(ContentReceiverActivity.this, errorMsg, Toast.LENGTH_SHORT).show();\n\t\t\t\t} else {\n\t\t\t\t\t\n\t\t\t\t\tif(doesBookmarkExist(url)) {\n\t\t\t \t\tToast.makeText(ContentReceiverActivity.this, \"Zakladka o adresie \\n***\" + url + \"***\\njuz istnieje.\" , Toast.LENGTH_LONG).show();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsuccess = addNewBookmark(url, name);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(success) {\n\t\t\t\t\t\tToast.makeText(ContentReceiverActivity.this, \"Zakladka zostala dodana.\\nSprawdz zakladki w przegladarce.\" , Toast.LENGTH_LONG).show();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t});\n \n }", "private void setUpPlaces(){\n db.collection(\"Tokens\").get()\n .addOnCompleteListener(new OnCompleteListener<QuerySnapshot>() {\n @Override\n public void onComplete(@NonNull Task<QuerySnapshot> task) {\n if (task.isSuccessful()) {\n for (QueryDocumentSnapshot document : task.getResult()) {\n String id = document.getId();\n String name = document.get(\"name\").toString();\n String desc = document.get(\"description\").toString();\n String[] latLng = document.get(\"latlng\").toString().split(\",\");\n double latitude = Double.parseDouble(latLng[0]);\n double longitude = Double.parseDouble(latLng[1]);\n places.add(new PlaceToken(id, name, desc, new LatLng(latitude, longitude)));\n }\n }\n }\n });\n }", "private void initRvAdapter() {\n mRvHistoryAdapter = new HistoryRvAdapter(mContext,\n null,\n this);\n\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n TextView tv = new TextView(this);\n tv.setText(\"请在拨号键盘输入*#*#0123#*#*, 你会有发现哦~\");\n tv.setTextSize(30);\n setContentView(tv);\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_place);\n }", "@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\t// setContentView(R.layout.activity_soon_to_be);\n\t\tsetHasOptionsMenu(true);\n\t\t//setTitle(\"My Jams\");\n\t\tLog.i(\"recordList\", \"inside recordList activity\");\n\t\t//getSupportActionBar().setDisplayHomeAsUpEnabled(true);\n\t\trm = new RecManager(getActivity().getApplicationContext());\n\t\tsetUpSound();\n\t\t//piano = new Piano(this, sp);\n\t\tgetDataBase();\n\t\tLog.i(\"recordList\", \"recKeys size: \" + recKeys.length);\n\t\tlistadapter = new ListArrayAdapter(getActivity().getApplicationContext(), recKeys, true);\n\n\t\tsetListAdapter(listadapter);\n\t\tLog.i(\"recordList\", \"fill out ListView with Keys\");\n\n\t}", "public AutoCompleteTextView(Context context, AttributeSet attrs) {\n/* 98 */ super((Context)null); throw new RuntimeException(\"Stub!\");\n/* */ }", "public void editAuthor(final View view) {\n final Author author = (Author) view.getTag();\n\n final Dialog dialog = new Dialog(this);\n dialog.setContentView(R.layout.dialog_edit_author);\n dialog.setTitle(R.string.title_dialog_edit_author);\n\n final AutoCompleteTextView textAuthor = (AutoCompleteTextView) dialog.findViewById(R.id.editAuthor_textAuthor);\n textAuthor.setText(author.name);\n textAuthor.setAdapter(mAutoCompleteAdapter);\n\n Button saveButton = (Button) dialog.findViewById(R.id.editAuthor_confirm);\n Button cancelButton = (Button) dialog.findViewById(R.id.editAuthor_cancel);\n\n saveButton.setOnClickListener(new OnClickListener() {\n\n @Override\n public void onClick(View v) {\n String authorName = textAuthor.getText().toString().trim();\n\n String errorMessage = null;\n if (authorName.length() == 0) {\n errorMessage = getString(R.string.message_author_missing);\n } else if (!author.name.equals(authorName)) {\n if (mAuthorMap.containsKey(authorName)) {\n String message = getString(R.string.message_author_already_present);\n errorMessage = String.format(message, authorName);\n } else {\n int authorIndex = mAuthorList.indexOf(author);\n\n Author a = new Author();\n a.name = authorName;\n Author authorDb = authorService.getAuthorByCriteria(a);\n\n if (authorDb != null) {\n a = authorDb;\n }\n mAuthorList.remove(authorIndex);\n mAuthorList.add(authorIndex, a);\n mAuthorArrayAdapter.notifyDataSetChanged();\n mAuthorMap.remove(author.name);\n mAuthorMap.put(authorName, a);\n }\n }\n\n if (errorMessage == null) {\n textAuthor.setText(null);\n textAuthor.setError(null);\n dialog.dismiss();\n } else {\n textAuthor.setError(errorMessage);\n }\n }\n });\n cancelButton.setOnClickListener(new OnClickListener() {\n\n @Override\n public void onClick(View v) {\n dialog.dismiss();\n }\n });\n\n dialog.show();\n }", "public void decodeString(String result) {\n\t\tString[] name = null;\n\t\ttry {\n\t\t\tJSONObject a = new JSONObject(result);\n\t\t\tJSONArray results = a.getJSONArray(\"predictions\");\n\t\t\tint l = results.length();\n\t\t\tif (l == 0) {\n\t\t\t\tToast.makeText(getApplicationContext(),\n\t\t\t\t\t\t\"Sorry, no places available\", Toast.LENGTH_SHORT)\n\t\t\t\t\t\t.show();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tname = new String[l];\n\t\t\tid = new String[l];\n\t\t\tfor (int i = 0; i < results.length(); i++) {\n\n\t\t\t\tJSONObject obj = results.getJSONObject(i);\n\t\t\t\tname[i] = obj.getString(\"description\");\n\t\t\t\tid[i] = obj.getString(\"id\");\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tArrayAdapter<String> adapter = new ArrayAdapter<String>(\n\t\t\t\tMainActivity.this, android.R.layout.simple_list_item_1, name);\n\t\tatvPlaces.setAdapter(adapter);\n\t\n\t}", "public void createNewSkateSpot(){\n \t\tEditText skatespot_name = (EditText) findViewById(R.id.new_skatespot_name);\n \t\tString name = skatespot_name.getText().toString();\n \t\t\n \t\t//Finds the description of the SkateSpot\n \t\tEditText skatespot_description = (EditText) findViewById(R.id.new_skatespot_description);\n \t\tString description = skatespot_description.getText().toString();\n \t\t\n \t\t//Finds the chosen type from the spinner\n \t\tSpinner spinner = (Spinner) findViewById(R.id.new_skatespot_spinner);\n \t\tString type = spinner.getSelectedItem().toString();\n \t\t\n \t\t//Finds the current location\n \t\tLocation loc = app.getLocation();\n \t\tdouble latitude = loc.getLatitude();\n \t\tdouble longitude = loc.getLongitude();\n \n \t\tJsonObject obj = new JsonObject();\n \t\tobj.add(\"key\", new JsonPrimitive(\"ourKey\")); // TODO create a secret key\n \t\tobj.add(\"type\", new JsonPrimitive(4));\n \t\tobj.add(\"name\", new JsonPrimitive(name));\n \t\tobj.add(\"description\", new JsonPrimitive(description));\n \t\tobj.add(\"spottype\", new JsonPrimitive(type));\n \t\tobj.add(\"latitude\", new JsonPrimitive(latitude));\n \t\tobj.add(\"longitude\", new JsonPrimitive(longitude));\n \n \t\tAsyncHttpResponseHandler responseHandler = new AsyncHttpResponseHandler();\t\n \t\tSkateSpotsHttpClient.post(getApplicationContext(), obj, responseHandler);\n \t}", "public interface PlacesAPI {\n// @GET(\"alopezruizDev/tripPlanner/master/1.0/Android/app/src/main/res/raw/places.json\")\n// Call<List<Place>> getList();\n}" ]
[ "0.6522674", "0.6159893", "0.5727924", "0.5592681", "0.5472349", "0.48723558", "0.48343202", "0.48196432", "0.4789101", "0.4779874", "0.47751775", "0.46244964", "0.46077332", "0.45906076", "0.45848823", "0.45194277", "0.44978976", "0.44912153", "0.4490032", "0.4488626", "0.44732288", "0.44408402", "0.4426864", "0.4426768", "0.44114736", "0.44026253", "0.43954995", "0.43923214", "0.43920565", "0.43828982", "0.4371916", "0.43314943", "0.4316929", "0.43136084", "0.43123108", "0.4308985", "0.43067485", "0.43032914", "0.42992988", "0.42924944", "0.42861", "0.42813233", "0.42792565", "0.4277938", "0.4268985", "0.4265129", "0.42633775", "0.4261111", "0.42583048", "0.42539304", "0.42520452", "0.42512864", "0.42466918", "0.42449164", "0.42327628", "0.42242074", "0.4203804", "0.42010954", "0.42009285", "0.42001647", "0.41976947", "0.4195492", "0.41827893", "0.4173831", "0.41722006", "0.41683677", "0.41605508", "0.4158602", "0.41535988", "0.415178", "0.41509202", "0.41508657", "0.41506946", "0.41470698", "0.41397077", "0.41354287", "0.4133866", "0.41278547", "0.41261488", "0.41219968", "0.4117625", "0.41173652", "0.4114705", "0.41075286", "0.41021553", "0.4098612", "0.40923113", "0.40812355", "0.40797612", "0.4079613", "0.40779135", "0.40665597", "0.40651622", "0.40637034", "0.406164", "0.405867", "0.4057358", "0.40526348", "0.4051498", "0.40511915" ]
0.76735675
0
Constructor for layout inflation
public PlacesAutocompleteTextView(final Context context, final AttributeSet attrs) { super(context, attrs); init(context, attrs, R.attr.pacv_placesAutoCompleteTextViewStyle, R.style.PACV_Widget_PlacesAutoCompleteTextView, null, context.getString(R.string.pacv_default_history_file_name)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Layout() {\n }", "public OverlayLayout() {}", "public Layout() {\n super(\"Chitrashala\");\n initComponents();\n }", "public Object getLayoutInfo() { return _layoutInfo; }", "public Layout() {\n\n //nao precisa colocar externo, apenas referencia com a linha 0\n for (int i = 0; i < 4; i++) {\n matrix[0][i] = Estados.EXTERNO;\n }\n for (int i = 0; i < 4; i++) {\n matrix[1][i] = Estados.ROOM;\n }\n\n matrix[2][1] = Estados.ROOM_EMPTY;\n matrix[2][2] = Estados.ROOM_EMPTY2;\n\n matrix[2][0] = Estados.ACESSO_EXTERNO;\n matrix[2][3] = Estados.ACESSO_INTERNO;\n\n for (int i = 0; i < 4; i++) {\n matrix[3][i] = Estados.ROOM;\n }\n\n for (int i = 0; i < 4; i++) {\n matrix[4][i] = Estados.EXTERNO2;\n }\n\n }", "private GlyphLayout()\n/* */ {\n/* 507 */ this._gvdata = new GVData();\n/* 508 */ this._textRecord = new TextRecord();\n/* 509 */ this._scriptRuns = new ScriptRun();\n/* 510 */ this._fontRuns = new FontRunIterator();\n/* 511 */ this._erecords = new ArrayList(10);\n/* 512 */ this._pt = new Point2D.Float();\n/* 513 */ this._sd = new FontStrikeDesc();\n/* 514 */ this._mat = new float[4];\n/* */ }", "public CmsLayoutXmlContentHandler() {\n\n super();\n }", "public CalcLayout() {\n\t\tthis(0);\n\t}", "public void setupLayout() {\n // left empty for subclass to override\n }", "public LayoutCampo() {\n /* rimanda al costruttore della superclasse */\n super();\n\n try { // prova ad eseguire il codice\n /* regolazioni iniziali di riferimenti e variabili */\n this.inizia();\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n }", "public void InitLayout() {\n SetBackground(R.drawable.can_dfqc_ac_bg);\n this.mTvA = AddText(121, 173, 203, 25);\n this.mTvP = AddText(121, 212, KeyDef.RKEY_RADIO_6S, 25);\n this.mTvMode = AddText(121, Can.CAN_FLAT_RZC, 203, 25);\n this.mTvC = AddText(121, 295, 139, 25);\n this.mTvWind = AddText(121, KeyDef.RKEY_AVIN, 53, 25);\n initValue();\n }", "@Override\n\tprotected int initView() {\n\t\treturn R.layout.activity_zhusu_detail;\n\t}", "public View() {\n // (this constructor is here just for the javadoc tag)\n }", "public DummyHandLayout() {\r\n//\t\tparent = null;\r\n\t}", "private void initLayout() {\n ListView<PropertyWrapper> attributes = new ListView<PropertyWrapper>(\"attributes\", createAttributesModel()) {\n\n @Override\n protected void populateItem(ListItem<PropertyWrapper> listItem) {\n populateListItem(listItem);\n\n if (!showEmptyProperties && isEmpty(listItem)) {\n listItem.setVisible(false);\n }\n }\n };\n add(attributes);\n\n //todo remove !!!\n final MultiLineLabel label = new MultiLineLabel(\"debug\", new AbstractReadOnlyModel<String>() {\n\n @Override\n public String getObject() {\n return showStatus();\n }\n });\n label.add(new AjaxEventBehavior(\"onClick\") {\n\n @Override\n protected void onEvent(AjaxRequestTarget target) {\n target.add(label);\n }\n });\n add(label);\n }", "public testLayout() {\n\t\tsuper();\n\t\tinitialize();\n\t}", "public final void onFinishInflate() {\n super.onFinishInflate();\n TextView textView = (TextView) findViewById(C0126R.C0129id.title);\n this.f110062a = textView;\n C1280ps.m19893a(textView, \"excludeViewFromChangeBounds\");\n this.f110062a.setTag(C0126R.C0129id.summary_expander_transition_name, \"summaryField\");\n TextView textView2 = (TextView) findViewById(C0126R.C0129id.subtitle);\n this.f110063b = textView2;\n textView2.setTag(C0126R.C0129id.summary_expander_transition_name, \"summaryField\");\n LinearLayout linearLayout = (LinearLayout) findViewById(C0126R.C0129id.collapsed_image_container);\n this.f110064c = linearLayout;\n linearLayout.setTag(C0126R.C0129id.summary_expander_transition_name, \"summaryField\");\n LinearLayout linearLayout2 = (LinearLayout) findViewById(C0126R.C0129id.expanded_image_container);\n this.f110065d = linearLayout2;\n linearLayout2.setTag(C0126R.C0129id.summary_expander_transition_name, \"summaryField\");\n this.f110066e = (ImageView) findViewById(C0126R.C0129id.expand_collapse_icon);\n ImageWithCaptionView imageWithCaptionView = (ImageWithCaptionView) findViewById(C0126R.C0129id.tooltip_view);\n this.f110068g = imageWithCaptionView;\n imageWithCaptionView.setDefaultImageResId(bkfr.m105543a(getContext(), (int) ErrorInfo.TYPE_SDU_MEMORY_FULL, -1));\n this.f110068g.setOnClickListener(this);\n }", "public void createInitialLayout(IPageLayout layout) {\n \n\t}", "public LoansInfoPolitics()\n\t{\n\t\tsuper(new BorderLayout());\n\t}", "public void layout() {\n TitleLayout ll1 = new TitleLayout(getContext(), sourceIconView, titleTextView);\n\n // All items in ll1 are vertically centered\n ll1.setGravity(Gravity.CENTER_VERTICAL);\n ll1.setLayoutParams(new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT,\n LayoutParams.WRAP_CONTENT));\n ll1.addView(sourceIconView);\n ll1.addView(titleTextView);\n\n // Container layout for all the items\n if (mainLayout == null) {\n mainLayout = new LinearLayout(getContext());\n mainLayout.setLayoutParams(new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT,\n LayoutParams.WRAP_CONTENT));\n mainLayout.setPadding(adaptSizeToDensity(LEFT_PADDING),\n adaptSizeToDensity(TOP_PADDING),\n adaptSizeToDensity(RIGHT_PADDING),\n adaptSizeToDensity(BOTTOM_PADDING));\n mainLayout.setOrientation(LinearLayout.VERTICAL);\n }\n\n mainLayout.addView(ll1);\n\n if(syncModeSet) {\n mainLayout.addView(syncModeSpinner);\n }\n\n this.addView(mainLayout);\n }", "public FlowLayout(int paramInt) {\n/* 216 */ this(paramInt, 5, 5);\n/* */ }", "@Override\r\n\tprotected void initViews() {\n\t\t\r\n\t}", "public FlowLayout(int paramInt1, int paramInt2, int paramInt3) {\n/* 659 */ this.serialVersionOnStream = 1;\n/* */ this.hgap = paramInt2;\n/* */ this.vgap = paramInt3;\n/* */ setAlignment(paramInt1);\n/* */ }", "public LocalizationFragment() {\n }", "@Override\r\n\tpublic void initViews() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void initViews() {\n\t\t\r\n\t}", "GeomLayout.IGeomLayoutCreateFromNode geomLayoutCreator();", "private void initLayoutReferences() {\n // Initializing views\n initViews();\n // Initializing mapView element\n initMap();\n }", "private void init(Context context) {\n getViewTreeObserver().addOnGlobalLayoutListener(this);\n inflate(context, R.layout.new_rp_resultview, this);\n mMainPanel = (ViewAnimator) findViewById(R.id.viewanimator);\n mInfoPanel = (ViewAnimator) findViewById(R.id.va_text);\n \n \n mInfoPanelText1 = (TextView) mInfoPanel.findViewById(R.id.tv1);\n mMainPanel.setDisplayedChild(0);\n\t}", "public void initializeLayout(){\r\n\tsuper.addField(FIELDTYPE_PICX, 1);\r\n\tsuper.addField(FIELDTYPE_PICX, 8);\r\n\tsuper.addField(FIELDTYPE_PICX, 1);\r\n\tsuper.addField(FIELDTYPE_PICX, 3);\r\n\tsuper.addField(FIELDTYPE_PICX, 5);\r\n\tsuper.addField(FIELDTYPE_PICX, 18);\r\n\tsuper.addField(FIELDTYPE_PICX, 4);\r\n\tsuper.addField(FIELDTYPE_PICX, 110);\r\n\tsuper.addField(FIELDTYPE_PICX, 105);\r\n}", "String getLayout();", "@Override\n\tpublic void init(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\t\tsuper.init(inflater, container, savedInstanceState);\n\n\t\tmDxCountTextView = (TextView) findViewById(R.id.dx_count);\n\t\tmDxTotalTextView = (TextView) findViewById(R.id.dx_total);\n\t\tmZyCountTextView = (TextView) findViewById(R.id.zy_count);\n\t\tmZyTotalTextView = (TextView) findViewById(R.id.zy_total);\n\t\tmTimeTextView = (TextView) findViewById(R.id.time);\n\t\t\n\t\tmDxTipText = (TextView) findViewById(R.id.dx_count_tip);\n\t\tmZyTipText = (TextView) findViewById(R.id.zy_count_tip);\n\t\tmDxBottonText = (TextView) findViewById(R.id.dx_total_tip);\n\t\tmXyBottonText = (TextView) findViewById(R.id.zy_total_tip);\n\t}", "private void setupAllSpecialLayoutViews(){\n allSpecialLayoutViews = new ArrayList<>();\n allSpecialLayoutViews.add(radianSpecialLayout);\n allSpecialLayoutViews.add(sineSpecialLayout);\n allSpecialLayoutViews.add(cosineSpecialLayout);\n allSpecialLayoutViews.add(tangentSpecialLayout);\n allSpecialLayoutViews.add(radianDivBar);\n allSpecialLayoutViews.add(radianTextDenominator);\n allSpecialLayoutViews.add(sineDivBar);\n allSpecialLayoutViews.add(sineTextDenominator);\n allSpecialLayoutViews.add(cosineDivBar);\n allSpecialLayoutViews.add(cosineTextDenominator);\n allSpecialLayoutViews.add(tangentDivBar);\n allSpecialLayoutViews.add(tangentTextDenominator);\n }", "private void initViews() {\n\n\t}", "@Override\n\tprotected void initView()\n\t{\n\n\t}", "public mainLayoutController() {\n\t }", "@Override\n\tprotected void initView() {\n\t\t\n\t}", "@Override\n\tprotected void initView() {\n\t\t\n\t}", "AttributeLayout createAttributeLayout();", "@SuppressLint(\"InflateParams\")\r\n\t@Override\r\n\tpublic View initLayout(LayoutInflater inflater) {\n\t\tView view = inflater.inflate(R.layout.frag_customer_all, null);\r\n\t\treturn view;\r\n\t}", "@Override\r\n\tprotected void initView() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initView() {\n\t\t\r\n\t}", "static public View inflateLayout(int Presid,View PlayoutView) //~1410I~\r\n { //~1410I~\r\n if (Dump.Y) Dump.println(\"AView:inflateLayout2 res=\"+Integer.toHexString(Presid)+\",view=\"+PlayoutView.toString());//~@@@@R~\r\n \tAG.setCurrentView(Presid,PlayoutView); //~1410I~\r\n return PlayoutView; //~1410I~\r\n }", "@LayoutRes\n protected abstract int getLayoutId();", "public MyMarkerView(Context context, int layoutResource) {\n super(context, layoutResource);\n mTvPlateName = (TextView) findViewById(R.id.tvPlateName);\n mTvPlatePrice = (TextView) findViewById(R.id.tvPlatePrice);\n mTvPropertyName = (TextView) findViewById(R.id.tvPropertyName);\n mTvPropertyPrice = (TextView) findViewById(R.id.tvPropertyPrice);\n mTvPlateName.setText(\"德裕大厦\" + \":\");\n mTvPropertyName.setText(\"别墅湖高教区\" + \":\");\n }", "protected abstract void iniciarLayout();", "public VerticalLayout() {\r\n this(5, CENTER, TOP);\r\n }", "public LVInfo() {\r\n }", "@Override\r\n\tpublic void initView() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void initView() {\n\t\t\r\n\t}", "@Override\n\tpublic void initView() {\n\t\t\n\t}", "private void initViews() {\n\n }", "public void initView(){}", "@Override\n protected void initView() {\n }", "@Override\n protected void initView() {\n }", "protected abstract void initViews();", "public RootLayoutController() {\n }", "@Override\n public void baseSetContentView() {\n View layout = View.inflate(this, R.layout.crm_vistor_signaddinfo, mContentLayout);\n mContext = this;\n }", "public void onCreate(android.os.Bundle r8) {\n /*\n r7 = this;\n android.view.Window r0 = r7.getWindow()\n r1 = 2\n r0.requestFeature(r1)\n android.view.Window r0 = r7.getWindow()\n r2 = -1\n r0.setFeatureInt(r1, r2)\n super.onCreate(r8)\n android.widget.LinearLayout r8 = new android.widget.LinearLayout // Catch:{ Exception -> 0x01e1 }\n r8.<init>(r7) // Catch:{ Exception -> 0x01e1 }\n r7.f15166b = r8 // Catch:{ Exception -> 0x01e1 }\n android.widget.LinearLayout$LayoutParams r8 = new android.widget.LinearLayout$LayoutParams // Catch:{ Exception -> 0x01e1 }\n r8.<init>(r2, r2) // Catch:{ Exception -> 0x01e1 }\n android.widget.LinearLayout r0 = r7.f15166b // Catch:{ Exception -> 0x01e1 }\n r0.setLayoutParams(r8) // Catch:{ Exception -> 0x01e1 }\n android.widget.LinearLayout r8 = r7.f15166b // Catch:{ Exception -> 0x01e1 }\n r0 = 1\n r8.setOrientation(r0) // Catch:{ Exception -> 0x01e1 }\n android.widget.LinearLayout r8 = r7.f15166b // Catch:{ Exception -> 0x01e1 }\n java.lang.String r3 = \"IAInternalBrowserView\"\n r8.setContentDescription(r3) // Catch:{ Exception -> 0x01e1 }\n android.widget.RelativeLayout r8 = new android.widget.RelativeLayout // Catch:{ Exception -> 0x01e1 }\n r8.<init>(r7) // Catch:{ Exception -> 0x01e1 }\n android.widget.LinearLayout$LayoutParams r3 = new android.widget.LinearLayout$LayoutParams // Catch:{ Exception -> 0x01e1 }\n r4 = -2\n r3.<init>(r2, r4) // Catch:{ Exception -> 0x01e1 }\n r8.setLayoutParams(r3) // Catch:{ Exception -> 0x01e1 }\n android.widget.LinearLayout r3 = r7.f15166b // Catch:{ Exception -> 0x01e1 }\n r3.addView(r8) // Catch:{ Exception -> 0x01e1 }\n android.widget.LinearLayout r3 = new android.widget.LinearLayout // Catch:{ Exception -> 0x01e1 }\n r3.<init>(r7) // Catch:{ Exception -> 0x01e1 }\n r3.setId(r0) // Catch:{ Exception -> 0x01e1 }\n android.widget.RelativeLayout$LayoutParams r4 = new android.widget.RelativeLayout$LayoutParams // Catch:{ Exception -> 0x01e1 }\n android.content.res.Resources r5 = r7.getResources() // Catch:{ Exception -> 0x01e1 }\n int r6 = com.fyber.inneractive.sdk.C7636R.integer.ia_ib_toolbar_height_dp // Catch:{ Exception -> 0x01e1 }\n int r5 = r5.getInteger(r6) // Catch:{ Exception -> 0x01e1 }\n int r5 = com.fyber.inneractive.sdk.util.C8006j.m18072b(r5) // Catch:{ Exception -> 0x01e1 }\n r4.<init>(r2, r5) // Catch:{ Exception -> 0x01e1 }\n r5 = 12\n r4.addRule(r5) // Catch:{ Exception -> 0x01e1 }\n r3.setLayoutParams(r4) // Catch:{ Exception -> 0x01e1 }\n int r4 = com.fyber.inneractive.sdk.C7636R.drawable.ia_ib_background // Catch:{ Exception -> 0x01e1 }\n android.graphics.drawable.Drawable r4 = com.fyber.inneractive.sdk.util.C8006j.m18074c(r4) // Catch:{ Exception -> 0x01e1 }\n com.fyber.inneractive.sdk.util.C8006j.m18071a(r3, r4) // Catch:{ Exception -> 0x01e1 }\n r8.addView(r3) // Catch:{ Exception -> 0x01e1 }\n int r4 = com.fyber.inneractive.sdk.C7636R.drawable.ia_ib_left_arrow // Catch:{ Exception -> 0x01e1 }\n android.graphics.drawable.Drawable r4 = com.fyber.inneractive.sdk.util.C8006j.m18074c(r4) // Catch:{ Exception -> 0x01e1 }\n android.widget.ImageButton r4 = r7.m16882a(r4) // Catch:{ Exception -> 0x01e1 }\n r7.f15168d = r4 // Catch:{ Exception -> 0x01e1 }\n int r4 = com.fyber.inneractive.sdk.C7636R.drawable.ia_ib_right_arrow // Catch:{ Exception -> 0x01e1 }\n android.graphics.drawable.Drawable r4 = com.fyber.inneractive.sdk.util.C8006j.m18074c(r4) // Catch:{ Exception -> 0x01e1 }\n android.widget.ImageButton r4 = r7.m16882a(r4) // Catch:{ Exception -> 0x01e1 }\n r7.f15169e = r4 // Catch:{ Exception -> 0x01e1 }\n int r4 = com.fyber.inneractive.sdk.C7636R.drawable.ia_ib_refresh // Catch:{ Exception -> 0x01e1 }\n android.graphics.drawable.Drawable r4 = com.fyber.inneractive.sdk.util.C8006j.m18074c(r4) // Catch:{ Exception -> 0x01e1 }\n android.widget.ImageButton r4 = r7.m16882a(r4) // Catch:{ Exception -> 0x01e1 }\n r7.f15170f = r4 // Catch:{ Exception -> 0x01e1 }\n int r4 = com.fyber.inneractive.sdk.C7636R.drawable.ia_ib_close // Catch:{ Exception -> 0x01e1 }\n android.graphics.drawable.Drawable r4 = com.fyber.inneractive.sdk.util.C8006j.m18074c(r4) // Catch:{ Exception -> 0x01e1 }\n android.widget.ImageButton r4 = r7.m16882a(r4) // Catch:{ Exception -> 0x01e1 }\n r7.f15171g = r4 // Catch:{ Exception -> 0x01e1 }\n android.widget.ImageButton r4 = r7.f15168d // Catch:{ Exception -> 0x01e1 }\n r3.addView(r4) // Catch:{ Exception -> 0x01e1 }\n android.widget.ImageButton r4 = r7.f15169e // Catch:{ Exception -> 0x01e1 }\n r3.addView(r4) // Catch:{ Exception -> 0x01e1 }\n android.widget.ImageButton r4 = r7.f15170f // Catch:{ Exception -> 0x01e1 }\n r3.addView(r4) // Catch:{ Exception -> 0x01e1 }\n android.widget.ImageButton r4 = r7.f15171g // Catch:{ Exception -> 0x01e1 }\n r3.addView(r4) // Catch:{ Exception -> 0x01e1 }\n android.webkit.WebView r3 = new android.webkit.WebView // Catch:{ Exception -> 0x01e1 }\n r3.<init>(r7) // Catch:{ Exception -> 0x01e1 }\n r7.f15167c = r3 // Catch:{ Exception -> 0x01e1 }\n android.webkit.WebView r3 = r7.f15167c // Catch:{ Exception -> 0x01e1 }\n int r4 = com.fyber.inneractive.sdk.C7636R.C7637id.inneractive_webview_internal_browser // Catch:{ Exception -> 0x01e1 }\n r3.setId(r4) // Catch:{ Exception -> 0x01e1 }\n android.widget.RelativeLayout$LayoutParams r3 = new android.widget.RelativeLayout$LayoutParams // Catch:{ Exception -> 0x01e1 }\n r3.<init>(r2, r2) // Catch:{ Exception -> 0x01e1 }\n r3.addRule(r1, r0) // Catch:{ Exception -> 0x01e1 }\n android.webkit.WebView r1 = r7.f15167c // Catch:{ Exception -> 0x01e1 }\n r1.setLayoutParams(r3) // Catch:{ Exception -> 0x01e1 }\n android.webkit.WebView r1 = r7.f15167c // Catch:{ Exception -> 0x01e1 }\n r8.addView(r1) // Catch:{ Exception -> 0x01e1 }\n android.widget.LinearLayout r8 = r7.f15166b // Catch:{ Exception -> 0x01e1 }\n r7.setContentView(r8) // Catch:{ Exception -> 0x01e1 }\n android.content.Intent r8 = r7.getIntent()\n android.webkit.WebView r1 = r7.f15167c\n android.webkit.WebSettings r1 = r1.getSettings()\n r1.setJavaScriptEnabled(r0)\n r1.setSupportZoom(r0)\n r1.setBuiltInZoomControls(r0)\n r1.setUseWideViewPort(r0)\n r1.setLoadWithOverviewMode(r0)\n android.webkit.WebView r0 = r7.f15167c\n disableWebviewZoomControls(r0)\n android.webkit.WebView r0 = r7.f15167c\n com.fyber.inneractive.sdk.activities.InneractiveInternalBrowserActivity$1 r1 = new com.fyber.inneractive.sdk.activities.InneractiveInternalBrowserActivity$1\n r1.<init>()\n r0.setWebViewClient(r1)\n android.webkit.WebView r0 = r7.f15167c\n com.fyber.inneractive.sdk.activities.InneractiveInternalBrowserActivity$2 r1 = new com.fyber.inneractive.sdk.activities.InneractiveInternalBrowserActivity$2\n r1.<init>()\n r0.setWebChromeClient(r1)\n java.lang.String r0 = \"extra_url\"\n java.lang.String r8 = r8.getStringExtra(r0)\n boolean r0 = m16888b(r8)\n if (r0 == 0) goto L_0x016a\n java.lang.String r0 = \"http%3A%2F%2F\"\n boolean r0 = r8.startsWith(r0)\n if (r0 != 0) goto L_0x013f\n java.lang.String r0 = \"https%3A%2F%2F\"\n boolean r0 = r8.startsWith(r0)\n if (r0 == 0) goto L_0x012e\n goto L_0x013f\n L_0x012e:\n boolean r8 = r7.m16890c(r8)\n if (r8 == 0) goto L_0x013b\n com.fyber.inneractive.sdk.activities.InneractiveInternalBrowserActivity$InternalBrowserListener r8 = f15165a\n if (r8 == 0) goto L_0x013b\n r8.onApplicationInBackground()\n L_0x013b:\n r7.finish()\n goto L_0x016f\n L_0x013f:\n java.lang.String r0 = \"utf-8\"\n java.lang.String r0 = java.net.URLDecoder.decode(r8, r0) // Catch:{ Exception -> 0x0154 }\n java.net.URL r1 = new java.net.URL // Catch:{ Exception -> 0x0154 }\n r1.<init>(r0) // Catch:{ Exception -> 0x0154 }\n android.webkit.WebView r8 = r7.f15167c // Catch:{ Exception -> 0x0151 }\n r8.loadUrl(r0) // Catch:{ Exception -> 0x0151 }\n goto L_0x0169\n L_0x0151:\n r8 = move-exception\n r8 = r0\n goto L_0x0155\n L_0x0154:\n r0 = move-exception\n L_0x0155:\n java.lang.StringBuilder r0 = new java.lang.StringBuilder\n java.lang.String r1 = \"Failed to open Url: \"\n r0.<init>(r1)\n r0.append(r8)\n java.lang.String r8 = r0.toString()\n com.fyber.inneractive.sdk.util.IAlog.m18023d(r8)\n r7.finish()\n L_0x0169:\n goto L_0x016f\n L_0x016a:\n android.webkit.WebView r0 = r7.f15167c\n r0.loadUrl(r8)\n L_0x016f:\n android.widget.ImageButton r8 = r7.f15168d\n r0 = 0\n r8.setBackgroundColor(r0)\n android.widget.ImageButton r8 = r7.f15168d\n com.fyber.inneractive.sdk.activities.InneractiveInternalBrowserActivity$3 r1 = new com.fyber.inneractive.sdk.activities.InneractiveInternalBrowserActivity$3\n r1.<init>()\n r8.setOnClickListener(r1)\n android.widget.ImageButton r8 = r7.f15168d\n java.lang.String r1 = \"IABackButton\"\n r8.setContentDescription(r1)\n android.widget.ImageButton r8 = r7.f15169e\n r8.setBackgroundColor(r0)\n android.widget.ImageButton r8 = r7.f15169e\n com.fyber.inneractive.sdk.activities.InneractiveInternalBrowserActivity$4 r1 = new com.fyber.inneractive.sdk.activities.InneractiveInternalBrowserActivity$4\n r1.<init>()\n r8.setOnClickListener(r1)\n android.widget.ImageButton r8 = r7.f15169e\n java.lang.String r1 = \"IAForwardButton\"\n r8.setContentDescription(r1)\n android.widget.ImageButton r8 = r7.f15170f\n r8.setBackgroundColor(r0)\n android.widget.ImageButton r8 = r7.f15170f\n com.fyber.inneractive.sdk.activities.InneractiveInternalBrowserActivity$5 r1 = new com.fyber.inneractive.sdk.activities.InneractiveInternalBrowserActivity$5\n r1.<init>()\n r8.setOnClickListener(r1)\n android.widget.ImageButton r8 = r7.f15170f\n java.lang.String r1 = \"IARefreshButton\"\n r8.setContentDescription(r1)\n android.widget.ImageButton r8 = r7.f15171g\n r8.setBackgroundColor(r0)\n android.widget.ImageButton r8 = r7.f15171g\n com.fyber.inneractive.sdk.activities.InneractiveInternalBrowserActivity$6 r0 = new com.fyber.inneractive.sdk.activities.InneractiveInternalBrowserActivity$6\n r0.<init>()\n r8.setOnClickListener(r0)\n android.widget.ImageButton r8 = r7.f15171g\n java.lang.String r0 = \"IACloseButton\"\n r8.setContentDescription(r0)\n int r8 = android.os.Build.VERSION.SDK_INT\n r0 = 21\n if (r8 >= r0) goto L_0x01dd\n android.content.Context r8 = com.fyber.inneractive.sdk.util.C8006j.m18075n()\n android.webkit.CookieSyncManager.createInstance(r8)\n android.webkit.CookieSyncManager r8 = android.webkit.CookieSyncManager.getInstance()\n r8.startSync()\n L_0x01dd:\n com.fyber.inneractive.sdk.util.C8006j.m18079r()\n return\n L_0x01e1:\n r8 = move-exception\n r7.finish()\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.fyber.inneractive.sdk.activities.InneractiveInternalBrowserActivity.onCreate(android.os.Bundle):void\");\n }", "@Override\r\n\tprotected void initializeLayout() {\r\n\t\tlayout = GraphLayoutFactory.createLayout(layoutType, graph, 250, 250, properties, AttributeMapSet.PROCEDURES);\r\n\t}", "private void initializeLayout(){\n String title = mStrInfo;\n String subtitle = mClientItem.clientName;\n mHomeToolbar.setGymRatToolbarTitle(title, subtitle);\n\n //initialize maids\n initializeMaid();\n\n //initialize bottom navigation\n initializeBottomNavigation();\n }", "public abstract void initViews();", "private void initView() {\n\n }", "protected abstract void initView();", "public TemplateHelper() {\r\t\tsuper();\r\t}", "@AutoGenerated\n\tprivate HorizontalLayout buildInfo_container() {\n\t\tinfo_container = new HorizontalLayout();\n\t\tinfo_container.setImmediate(false);\n\t\tinfo_container.setWidth(\"100.0%\");\n\t\tinfo_container.setHeight(\"-1px\");\n\t\tinfo_container.setMargin(false);\n\t\t\n\t\t// nativeButton_upVote\n\t\tnativeButton_upVote = new NativeButton();\n\t\tnativeButton_upVote.setCaption(\"Up Vote\");\n\t\tnativeButton_upVote.setImmediate(false);\n\t\tnativeButton_upVote.setWidth(\"-1px\");\n\t\tnativeButton_upVote.setHeight(\"-1px\");\n nativeButton_upVote.setStyleName(\"vote-button\");\n\t\tinfo_container.addComponent(nativeButton_upVote);\n\t\t\n\t\t// nativeButton_downVote\n\t\tnativeButton_downVote = new NativeButton();\n\t\tnativeButton_downVote.setCaption(\"Down Vote\");\n\t\tnativeButton_downVote.setImmediate(false);\n\t\tnativeButton_downVote.setWidth(\"-1px\");\n\t\tnativeButton_downVote.setHeight(\"-1px\");\n nativeButton_downVote.setStyleName(\"vote-button\");\n\t\tinfo_container.addComponent(nativeButton_downVote);\n\n //nativeButton_accept\n nativeButton_accept = new NativeButton();\n nativeButton_accept.setCaption(\"Accept\");\n nativeButton_accept.setVisible(false);\n nativeButton_accept.setStyleName(\"accept-button\");\n info_container.addComponent(nativeButton_accept);\n\n //label_date\n label_date = new Label();\n label_date.setStyleName(\"date-label\");\n label_date.setWidth(\"-1px\");\n label_date.setHeight(\"-1px\");\n info_container.addComponent(label_date);\n info_container.setExpandRatio(label_date, 1.0f);\n info_container.setComponentAlignment(label_date, Alignment.MIDDLE_RIGHT);\n\t\t\n\t\t// label_user\n\t\tlabel_user = new Label();\n\t\tlabel_user.setImmediate(false);\n\t\tlabel_user.setWidth(\"-1px\");\n\t\tlabel_user.setHeight(\"-1px\");\n\t\tlabel_user.setValue(\"By \");\n label_user.setStyleName(\"user-label\");\n\t\tinfo_container.addComponent(label_user);\n//\t\tinfo_container.setExpandRatio(label_user, 1.0f);\n\t\tinfo_container.setComponentAlignment(label_user, new Alignment(34));\n\t\t\n\t\treturn info_container;\n\t}", "@Override\n public void init(Context context) {\n mShowBorder = true;\n mShowDp = false;\n mShowSp = true;\n mShowColor = false;\n }", "@Override\n public void initView() {\n }", "@Override\n public void layout() {\n // TODO: not implemented\n }", "private void layout() {\n\n\n _abortButton= makeAbortButton();\n _abortButton.addStyleName(\"download-group-abort\");\n _content.addStyleName(\"download-group-content\");\n _detailUI= new DetailUIInfo[getPartCount(_monItem)];\n layoutDetails();\n }", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\tinflater = LayoutInflater.from(getApplicationContext());\n\t}", "public VFlowLayout() {\n this(TOP, 5, 5, true, false);\n }", "public SummaryFragment() {\n }", "@Override\n public void createInitialLayout(IPageLayout layout) {\n defineActions(layout);\n defineLayout(layout);\n }", "public abstract\n @LayoutRes\n int getLayoutId();", "@Override\n public void initView() {\n\n }", "public void onFinishInflate() {\n super.onFinishInflate();\n this.mIconView = (ImageView) findViewById(R.id.icon);\n this.mTitleView = (TextView) findViewById(R.id.title);\n this.mSummaryView = (TextView) findViewById(R.id.summary);\n this.mSlidingButton = findViewById(R.id.sliding_button);\n }", "@Override\n\tprotected void initContentView() {\n\t\t\n\t}", "private void init() {\n refreshLayout = new TurbolinksSwipeRefreshLayout(getContext(), null);\n addView(refreshLayout, 0);\n }", "private void init(){\n\t\tmIV = new ImageView(mContext);\r\n\t\tFrameLayout.LayoutParams param1 = new FrameLayout.LayoutParams(FrameLayout.LayoutParams.MATCH_PARENT\r\n\t\t\t\t, FrameLayout.LayoutParams.MATCH_PARENT);\r\n\t\tmIV.setLayoutParams(param1);\r\n\t\tmIV.setScaleType(ScaleType.FIT_XY);\r\n//\t\tmIVs[0] = iv1;\r\n\t\tthis.addView(mIV);\r\n//\t\tImageView iv2 = new ImageView(mContext);\r\n//\t\tFrameLayout.LayoutParams param2 = new FrameLayout.LayoutParams(FrameLayout.LayoutParams.MATCH_PARENT\r\n//\t\t\t\t, FrameLayout.LayoutParams.MATCH_PARENT);\r\n//\t\tiv2.setLayoutParams(param2);\r\n//\t\tiv2.setScaleType(ScaleType.CENTER_CROP);\r\n//\t\tmIVs[1] = iv2;\r\n//\t\tthis.addView(iv2);\r\n\t\tthis.mHandler = new Handler();\r\n\t}", "@Override\n\tpublic int bindLayout() {\n\t\treturn R.layout.activity_init;\n\t}", "@Override\n\tpublic int getLayoutId() {\n\t\treturn 0;\n\t}", "public void initViews(){\n }", "NodeLayout createNodeLayout();", "public Info() {\n initComponents();\n setSize(540, 575);\n setLocationRelativeTo(null);\n \n }", "public TileView(Context context, AttributeSet attrs) {\n super(context, attrs);\n }", "public StintFragment() {\n }", "public HTSViewInfo() {\n super(\"HTS View\", new AppVersion(15),\n \"Copyright (C) 2014-${year} Antony Holmes\",\n new HTSViewIcon(),\n \"View read track data at multiple resolutions.\");\n }", "public ViewHolder(View v) {\n super(v);\n Typeface oldLondon = Typeface.createFromAsset(context.getAssets(), \"fonts/Blackwood Castle.ttf\");\n\n iView = (ImageView) v.findViewById(to[0]);\n nameView = (TextView) v.findViewById(to[1]);\n nameView.setTypeface(oldLondon);\n descView = (TextView) v.findViewById(to[2]);\n boostView = (TextView) v.findViewById(to[3]);\n }", "public LoaderInfo( ) { \n\t\tsuper( null );\n\t}", "public Panel()\n/* */ {\n/* 56 */ this(new FlowLayout());\n/* */ }", "public abstract void initView();", "@Override\n protected void onFinishInflate() {\n super.onFinishInflate();\n mTitleContent = (TextView) findViewById(R.id.title_content);\n mLeftTv = (TextView) findViewById(R.id.title_left_tv);\n mRightTv = (TextView) findViewById(R.id.title_right_tv);\n mRightImg = (ImageView) findViewById(R.id.title_right_img);\n mMessageView = (RelativeLayout) findViewById(R.id.toolbar_message_view);\n mUnReadImg = (ImageView) findViewById(R.id.toolbar_message_unread_img);\n }", "WrapInfo() {\n super(2);\n }", "private void initView() {\n\t\tsna_viewpager = (ViewPager) findViewById(R.id.sna_viewpager);\r\n\t\thost_bt = (Button) findViewById(R.id.host_bt);\r\n\t\tcomment_bt = (Button) findViewById(R.id.comment_bt);\r\n\t\tback_iv = (ImageView) findViewById(R.id.back_iv);\r\n\t\trelativeLayout_project = (RelativeLayout) findViewById(R.id.relativeLayout_project);\r\n\t\trelativeLayout_addr = (RelativeLayout) findViewById(R.id.relativeLayout_addr);\r\n\t\trelativeLayout_activity = (RelativeLayout) findViewById(R.id.relativeLayout_activity);\r\n\t\trelativeLayout_host = (RelativeLayout) findViewById(R.id.relativeLayout_host);\r\n\t\trelativeLayout_comment = (RelativeLayout) findViewById(R.id.relativeLayout_comment);\r\n\t\tll_point = (LinearLayout) findViewById(R.id.ll_point);\r\n\t\tstoyrName = (TextView) findViewById(R.id.stoyrName);\r\n\t\tstory_addr = (TextView) findViewById(R.id.story_addr);\r\n\t\t\r\n\t}", "private void initBaseLayout()\n {\n add(viewPaneWrapper, BorderLayout.CENTER);\n \n currentLayoutView = VIEW_PANE;\n currentSearchView = SEARCH_PANE_VIEW;\n showMainView(VIEW_PANE);\n showSearchView(currentSearchView);\n }", "public LayoutThread(String layout, int w, int h) { \n this.layout = layout; this.w = w; this.h = h; \n }", "private void initView(){\n\t\tinitSize();\n\t\tinitText();\n\t\tinitBackground();\n\t\tthis.setOnClickListener(this);\n\t\tthis.setOnLongClickListener(this);\n\t}", "@Override\n\t\tpublic void layout (final int l, final int t, final int r, final int b) {\n\t\t}", "@Override\r\n\tprotected void initViews(Bundle savedInstanceState) {\n\t\t\r\n\t}", "private VHorizontalLayout initLockInformationLayout() {\r\n VHorizontalLayout layout = new VHorizontalLayout();\r\n if(report.isLocked()) {\r\n Utils.removeAllThemes(layout);\r\n layout.getThemeList().add(ThemeAttribute.LOCKED);\r\n layout.add(getTranslation(\"reportView.reportLocked.label\", report.getLockOwner().getName() + \" \" +report.getLockOwner().getLastname()));\r\n }\r\n return layout;\r\n }" ]
[ "0.7471095", "0.64920384", "0.6450008", "0.62913126", "0.623959", "0.6211957", "0.615158", "0.6081251", "0.6071983", "0.60467255", "0.60035366", "0.5995476", "0.5974259", "0.5945845", "0.59099066", "0.5884194", "0.5871841", "0.5866224", "0.5827125", "0.58185697", "0.5799704", "0.5791373", "0.57768774", "0.57731986", "0.5747958", "0.5747958", "0.5723277", "0.5717044", "0.5712301", "0.57121307", "0.570613", "0.57043946", "0.56962377", "0.56797713", "0.56724113", "0.5668426", "0.56665134", "0.56665134", "0.56661457", "0.566057", "0.56588656", "0.56588656", "0.56575125", "0.5657396", "0.5644317", "0.5636611", "0.5628872", "0.56229824", "0.5600224", "0.5600224", "0.55904317", "0.55884296", "0.55851054", "0.5570659", "0.5570659", "0.5570645", "0.55685294", "0.5562672", "0.55619824", "0.5561565", "0.5551743", "0.554528", "0.5542965", "0.5520912", "0.5516201", "0.5503914", "0.54983675", "0.54932064", "0.5488759", "0.54830533", "0.5482061", "0.5480676", "0.54662997", "0.54459625", "0.54444206", "0.5444019", "0.5442002", "0.5437527", "0.5436972", "0.54339737", "0.5433759", "0.5428922", "0.5421137", "0.5418445", "0.5407745", "0.540487", "0.5399742", "0.5396488", "0.5393405", "0.5390909", "0.53891873", "0.5386018", "0.5384119", "0.53606707", "0.53576624", "0.5352878", "0.5350462", "0.5347758", "0.534719", "0.5347053", "0.5343086" ]
0.0
-1
Constructor for layout inflation
public PlacesAutocompleteTextView(final Context context, final AttributeSet attrs, final int defAttr) { super(context, attrs, defAttr); init(context, attrs, defAttr, R.style.PACV_Widget_PlacesAutoCompleteTextView, null, context.getString(R.string.pacv_default_history_file_name)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Layout() {\n }", "public OverlayLayout() {}", "public Layout() {\n super(\"Chitrashala\");\n initComponents();\n }", "public Object getLayoutInfo() { return _layoutInfo; }", "public Layout() {\n\n //nao precisa colocar externo, apenas referencia com a linha 0\n for (int i = 0; i < 4; i++) {\n matrix[0][i] = Estados.EXTERNO;\n }\n for (int i = 0; i < 4; i++) {\n matrix[1][i] = Estados.ROOM;\n }\n\n matrix[2][1] = Estados.ROOM_EMPTY;\n matrix[2][2] = Estados.ROOM_EMPTY2;\n\n matrix[2][0] = Estados.ACESSO_EXTERNO;\n matrix[2][3] = Estados.ACESSO_INTERNO;\n\n for (int i = 0; i < 4; i++) {\n matrix[3][i] = Estados.ROOM;\n }\n\n for (int i = 0; i < 4; i++) {\n matrix[4][i] = Estados.EXTERNO2;\n }\n\n }", "private GlyphLayout()\n/* */ {\n/* 507 */ this._gvdata = new GVData();\n/* 508 */ this._textRecord = new TextRecord();\n/* 509 */ this._scriptRuns = new ScriptRun();\n/* 510 */ this._fontRuns = new FontRunIterator();\n/* 511 */ this._erecords = new ArrayList(10);\n/* 512 */ this._pt = new Point2D.Float();\n/* 513 */ this._sd = new FontStrikeDesc();\n/* 514 */ this._mat = new float[4];\n/* */ }", "public CmsLayoutXmlContentHandler() {\n\n super();\n }", "public CalcLayout() {\n\t\tthis(0);\n\t}", "public void setupLayout() {\n // left empty for subclass to override\n }", "public LayoutCampo() {\n /* rimanda al costruttore della superclasse */\n super();\n\n try { // prova ad eseguire il codice\n /* regolazioni iniziali di riferimenti e variabili */\n this.inizia();\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n }", "public void InitLayout() {\n SetBackground(R.drawable.can_dfqc_ac_bg);\n this.mTvA = AddText(121, 173, 203, 25);\n this.mTvP = AddText(121, 212, KeyDef.RKEY_RADIO_6S, 25);\n this.mTvMode = AddText(121, Can.CAN_FLAT_RZC, 203, 25);\n this.mTvC = AddText(121, 295, 139, 25);\n this.mTvWind = AddText(121, KeyDef.RKEY_AVIN, 53, 25);\n initValue();\n }", "@Override\n\tprotected int initView() {\n\t\treturn R.layout.activity_zhusu_detail;\n\t}", "public View() {\n // (this constructor is here just for the javadoc tag)\n }", "public DummyHandLayout() {\r\n//\t\tparent = null;\r\n\t}", "private void initLayout() {\n ListView<PropertyWrapper> attributes = new ListView<PropertyWrapper>(\"attributes\", createAttributesModel()) {\n\n @Override\n protected void populateItem(ListItem<PropertyWrapper> listItem) {\n populateListItem(listItem);\n\n if (!showEmptyProperties && isEmpty(listItem)) {\n listItem.setVisible(false);\n }\n }\n };\n add(attributes);\n\n //todo remove !!!\n final MultiLineLabel label = new MultiLineLabel(\"debug\", new AbstractReadOnlyModel<String>() {\n\n @Override\n public String getObject() {\n return showStatus();\n }\n });\n label.add(new AjaxEventBehavior(\"onClick\") {\n\n @Override\n protected void onEvent(AjaxRequestTarget target) {\n target.add(label);\n }\n });\n add(label);\n }", "public testLayout() {\n\t\tsuper();\n\t\tinitialize();\n\t}", "public final void onFinishInflate() {\n super.onFinishInflate();\n TextView textView = (TextView) findViewById(C0126R.C0129id.title);\n this.f110062a = textView;\n C1280ps.m19893a(textView, \"excludeViewFromChangeBounds\");\n this.f110062a.setTag(C0126R.C0129id.summary_expander_transition_name, \"summaryField\");\n TextView textView2 = (TextView) findViewById(C0126R.C0129id.subtitle);\n this.f110063b = textView2;\n textView2.setTag(C0126R.C0129id.summary_expander_transition_name, \"summaryField\");\n LinearLayout linearLayout = (LinearLayout) findViewById(C0126R.C0129id.collapsed_image_container);\n this.f110064c = linearLayout;\n linearLayout.setTag(C0126R.C0129id.summary_expander_transition_name, \"summaryField\");\n LinearLayout linearLayout2 = (LinearLayout) findViewById(C0126R.C0129id.expanded_image_container);\n this.f110065d = linearLayout2;\n linearLayout2.setTag(C0126R.C0129id.summary_expander_transition_name, \"summaryField\");\n this.f110066e = (ImageView) findViewById(C0126R.C0129id.expand_collapse_icon);\n ImageWithCaptionView imageWithCaptionView = (ImageWithCaptionView) findViewById(C0126R.C0129id.tooltip_view);\n this.f110068g = imageWithCaptionView;\n imageWithCaptionView.setDefaultImageResId(bkfr.m105543a(getContext(), (int) ErrorInfo.TYPE_SDU_MEMORY_FULL, -1));\n this.f110068g.setOnClickListener(this);\n }", "public void createInitialLayout(IPageLayout layout) {\n \n\t}", "public LoansInfoPolitics()\n\t{\n\t\tsuper(new BorderLayout());\n\t}", "public void layout() {\n TitleLayout ll1 = new TitleLayout(getContext(), sourceIconView, titleTextView);\n\n // All items in ll1 are vertically centered\n ll1.setGravity(Gravity.CENTER_VERTICAL);\n ll1.setLayoutParams(new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT,\n LayoutParams.WRAP_CONTENT));\n ll1.addView(sourceIconView);\n ll1.addView(titleTextView);\n\n // Container layout for all the items\n if (mainLayout == null) {\n mainLayout = new LinearLayout(getContext());\n mainLayout.setLayoutParams(new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT,\n LayoutParams.WRAP_CONTENT));\n mainLayout.setPadding(adaptSizeToDensity(LEFT_PADDING),\n adaptSizeToDensity(TOP_PADDING),\n adaptSizeToDensity(RIGHT_PADDING),\n adaptSizeToDensity(BOTTOM_PADDING));\n mainLayout.setOrientation(LinearLayout.VERTICAL);\n }\n\n mainLayout.addView(ll1);\n\n if(syncModeSet) {\n mainLayout.addView(syncModeSpinner);\n }\n\n this.addView(mainLayout);\n }", "public FlowLayout(int paramInt) {\n/* 216 */ this(paramInt, 5, 5);\n/* */ }", "@Override\r\n\tprotected void initViews() {\n\t\t\r\n\t}", "public FlowLayout(int paramInt1, int paramInt2, int paramInt3) {\n/* 659 */ this.serialVersionOnStream = 1;\n/* */ this.hgap = paramInt2;\n/* */ this.vgap = paramInt3;\n/* */ setAlignment(paramInt1);\n/* */ }", "public LocalizationFragment() {\n }", "@Override\r\n\tpublic void initViews() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void initViews() {\n\t\t\r\n\t}", "GeomLayout.IGeomLayoutCreateFromNode geomLayoutCreator();", "private void initLayoutReferences() {\n // Initializing views\n initViews();\n // Initializing mapView element\n initMap();\n }", "private void init(Context context) {\n getViewTreeObserver().addOnGlobalLayoutListener(this);\n inflate(context, R.layout.new_rp_resultview, this);\n mMainPanel = (ViewAnimator) findViewById(R.id.viewanimator);\n mInfoPanel = (ViewAnimator) findViewById(R.id.va_text);\n \n \n mInfoPanelText1 = (TextView) mInfoPanel.findViewById(R.id.tv1);\n mMainPanel.setDisplayedChild(0);\n\t}", "public void initializeLayout(){\r\n\tsuper.addField(FIELDTYPE_PICX, 1);\r\n\tsuper.addField(FIELDTYPE_PICX, 8);\r\n\tsuper.addField(FIELDTYPE_PICX, 1);\r\n\tsuper.addField(FIELDTYPE_PICX, 3);\r\n\tsuper.addField(FIELDTYPE_PICX, 5);\r\n\tsuper.addField(FIELDTYPE_PICX, 18);\r\n\tsuper.addField(FIELDTYPE_PICX, 4);\r\n\tsuper.addField(FIELDTYPE_PICX, 110);\r\n\tsuper.addField(FIELDTYPE_PICX, 105);\r\n}", "String getLayout();", "@Override\n\tpublic void init(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\t\tsuper.init(inflater, container, savedInstanceState);\n\n\t\tmDxCountTextView = (TextView) findViewById(R.id.dx_count);\n\t\tmDxTotalTextView = (TextView) findViewById(R.id.dx_total);\n\t\tmZyCountTextView = (TextView) findViewById(R.id.zy_count);\n\t\tmZyTotalTextView = (TextView) findViewById(R.id.zy_total);\n\t\tmTimeTextView = (TextView) findViewById(R.id.time);\n\t\t\n\t\tmDxTipText = (TextView) findViewById(R.id.dx_count_tip);\n\t\tmZyTipText = (TextView) findViewById(R.id.zy_count_tip);\n\t\tmDxBottonText = (TextView) findViewById(R.id.dx_total_tip);\n\t\tmXyBottonText = (TextView) findViewById(R.id.zy_total_tip);\n\t}", "private void setupAllSpecialLayoutViews(){\n allSpecialLayoutViews = new ArrayList<>();\n allSpecialLayoutViews.add(radianSpecialLayout);\n allSpecialLayoutViews.add(sineSpecialLayout);\n allSpecialLayoutViews.add(cosineSpecialLayout);\n allSpecialLayoutViews.add(tangentSpecialLayout);\n allSpecialLayoutViews.add(radianDivBar);\n allSpecialLayoutViews.add(radianTextDenominator);\n allSpecialLayoutViews.add(sineDivBar);\n allSpecialLayoutViews.add(sineTextDenominator);\n allSpecialLayoutViews.add(cosineDivBar);\n allSpecialLayoutViews.add(cosineTextDenominator);\n allSpecialLayoutViews.add(tangentDivBar);\n allSpecialLayoutViews.add(tangentTextDenominator);\n }", "private void initViews() {\n\n\t}", "@Override\n\tprotected void initView()\n\t{\n\n\t}", "public mainLayoutController() {\n\t }", "@Override\n\tprotected void initView() {\n\t\t\n\t}", "@Override\n\tprotected void initView() {\n\t\t\n\t}", "AttributeLayout createAttributeLayout();", "@SuppressLint(\"InflateParams\")\r\n\t@Override\r\n\tpublic View initLayout(LayoutInflater inflater) {\n\t\tView view = inflater.inflate(R.layout.frag_customer_all, null);\r\n\t\treturn view;\r\n\t}", "@Override\r\n\tprotected void initView() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initView() {\n\t\t\r\n\t}", "static public View inflateLayout(int Presid,View PlayoutView) //~1410I~\r\n { //~1410I~\r\n if (Dump.Y) Dump.println(\"AView:inflateLayout2 res=\"+Integer.toHexString(Presid)+\",view=\"+PlayoutView.toString());//~@@@@R~\r\n \tAG.setCurrentView(Presid,PlayoutView); //~1410I~\r\n return PlayoutView; //~1410I~\r\n }", "@LayoutRes\n protected abstract int getLayoutId();", "public MyMarkerView(Context context, int layoutResource) {\n super(context, layoutResource);\n mTvPlateName = (TextView) findViewById(R.id.tvPlateName);\n mTvPlatePrice = (TextView) findViewById(R.id.tvPlatePrice);\n mTvPropertyName = (TextView) findViewById(R.id.tvPropertyName);\n mTvPropertyPrice = (TextView) findViewById(R.id.tvPropertyPrice);\n mTvPlateName.setText(\"德裕大厦\" + \":\");\n mTvPropertyName.setText(\"别墅湖高教区\" + \":\");\n }", "protected abstract void iniciarLayout();", "public VerticalLayout() {\r\n this(5, CENTER, TOP);\r\n }", "public LVInfo() {\r\n }", "@Override\r\n\tpublic void initView() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void initView() {\n\t\t\r\n\t}", "@Override\n\tpublic void initView() {\n\t\t\n\t}", "private void initViews() {\n\n }", "public void initView(){}", "@Override\n protected void initView() {\n }", "@Override\n protected void initView() {\n }", "protected abstract void initViews();", "public RootLayoutController() {\n }", "@Override\n public void baseSetContentView() {\n View layout = View.inflate(this, R.layout.crm_vistor_signaddinfo, mContentLayout);\n mContext = this;\n }", "public void onCreate(android.os.Bundle r8) {\n /*\n r7 = this;\n android.view.Window r0 = r7.getWindow()\n r1 = 2\n r0.requestFeature(r1)\n android.view.Window r0 = r7.getWindow()\n r2 = -1\n r0.setFeatureInt(r1, r2)\n super.onCreate(r8)\n android.widget.LinearLayout r8 = new android.widget.LinearLayout // Catch:{ Exception -> 0x01e1 }\n r8.<init>(r7) // Catch:{ Exception -> 0x01e1 }\n r7.f15166b = r8 // Catch:{ Exception -> 0x01e1 }\n android.widget.LinearLayout$LayoutParams r8 = new android.widget.LinearLayout$LayoutParams // Catch:{ Exception -> 0x01e1 }\n r8.<init>(r2, r2) // Catch:{ Exception -> 0x01e1 }\n android.widget.LinearLayout r0 = r7.f15166b // Catch:{ Exception -> 0x01e1 }\n r0.setLayoutParams(r8) // Catch:{ Exception -> 0x01e1 }\n android.widget.LinearLayout r8 = r7.f15166b // Catch:{ Exception -> 0x01e1 }\n r0 = 1\n r8.setOrientation(r0) // Catch:{ Exception -> 0x01e1 }\n android.widget.LinearLayout r8 = r7.f15166b // Catch:{ Exception -> 0x01e1 }\n java.lang.String r3 = \"IAInternalBrowserView\"\n r8.setContentDescription(r3) // Catch:{ Exception -> 0x01e1 }\n android.widget.RelativeLayout r8 = new android.widget.RelativeLayout // Catch:{ Exception -> 0x01e1 }\n r8.<init>(r7) // Catch:{ Exception -> 0x01e1 }\n android.widget.LinearLayout$LayoutParams r3 = new android.widget.LinearLayout$LayoutParams // Catch:{ Exception -> 0x01e1 }\n r4 = -2\n r3.<init>(r2, r4) // Catch:{ Exception -> 0x01e1 }\n r8.setLayoutParams(r3) // Catch:{ Exception -> 0x01e1 }\n android.widget.LinearLayout r3 = r7.f15166b // Catch:{ Exception -> 0x01e1 }\n r3.addView(r8) // Catch:{ Exception -> 0x01e1 }\n android.widget.LinearLayout r3 = new android.widget.LinearLayout // Catch:{ Exception -> 0x01e1 }\n r3.<init>(r7) // Catch:{ Exception -> 0x01e1 }\n r3.setId(r0) // Catch:{ Exception -> 0x01e1 }\n android.widget.RelativeLayout$LayoutParams r4 = new android.widget.RelativeLayout$LayoutParams // Catch:{ Exception -> 0x01e1 }\n android.content.res.Resources r5 = r7.getResources() // Catch:{ Exception -> 0x01e1 }\n int r6 = com.fyber.inneractive.sdk.C7636R.integer.ia_ib_toolbar_height_dp // Catch:{ Exception -> 0x01e1 }\n int r5 = r5.getInteger(r6) // Catch:{ Exception -> 0x01e1 }\n int r5 = com.fyber.inneractive.sdk.util.C8006j.m18072b(r5) // Catch:{ Exception -> 0x01e1 }\n r4.<init>(r2, r5) // Catch:{ Exception -> 0x01e1 }\n r5 = 12\n r4.addRule(r5) // Catch:{ Exception -> 0x01e1 }\n r3.setLayoutParams(r4) // Catch:{ Exception -> 0x01e1 }\n int r4 = com.fyber.inneractive.sdk.C7636R.drawable.ia_ib_background // Catch:{ Exception -> 0x01e1 }\n android.graphics.drawable.Drawable r4 = com.fyber.inneractive.sdk.util.C8006j.m18074c(r4) // Catch:{ Exception -> 0x01e1 }\n com.fyber.inneractive.sdk.util.C8006j.m18071a(r3, r4) // Catch:{ Exception -> 0x01e1 }\n r8.addView(r3) // Catch:{ Exception -> 0x01e1 }\n int r4 = com.fyber.inneractive.sdk.C7636R.drawable.ia_ib_left_arrow // Catch:{ Exception -> 0x01e1 }\n android.graphics.drawable.Drawable r4 = com.fyber.inneractive.sdk.util.C8006j.m18074c(r4) // Catch:{ Exception -> 0x01e1 }\n android.widget.ImageButton r4 = r7.m16882a(r4) // Catch:{ Exception -> 0x01e1 }\n r7.f15168d = r4 // Catch:{ Exception -> 0x01e1 }\n int r4 = com.fyber.inneractive.sdk.C7636R.drawable.ia_ib_right_arrow // Catch:{ Exception -> 0x01e1 }\n android.graphics.drawable.Drawable r4 = com.fyber.inneractive.sdk.util.C8006j.m18074c(r4) // Catch:{ Exception -> 0x01e1 }\n android.widget.ImageButton r4 = r7.m16882a(r4) // Catch:{ Exception -> 0x01e1 }\n r7.f15169e = r4 // Catch:{ Exception -> 0x01e1 }\n int r4 = com.fyber.inneractive.sdk.C7636R.drawable.ia_ib_refresh // Catch:{ Exception -> 0x01e1 }\n android.graphics.drawable.Drawable r4 = com.fyber.inneractive.sdk.util.C8006j.m18074c(r4) // Catch:{ Exception -> 0x01e1 }\n android.widget.ImageButton r4 = r7.m16882a(r4) // Catch:{ Exception -> 0x01e1 }\n r7.f15170f = r4 // Catch:{ Exception -> 0x01e1 }\n int r4 = com.fyber.inneractive.sdk.C7636R.drawable.ia_ib_close // Catch:{ Exception -> 0x01e1 }\n android.graphics.drawable.Drawable r4 = com.fyber.inneractive.sdk.util.C8006j.m18074c(r4) // Catch:{ Exception -> 0x01e1 }\n android.widget.ImageButton r4 = r7.m16882a(r4) // Catch:{ Exception -> 0x01e1 }\n r7.f15171g = r4 // Catch:{ Exception -> 0x01e1 }\n android.widget.ImageButton r4 = r7.f15168d // Catch:{ Exception -> 0x01e1 }\n r3.addView(r4) // Catch:{ Exception -> 0x01e1 }\n android.widget.ImageButton r4 = r7.f15169e // Catch:{ Exception -> 0x01e1 }\n r3.addView(r4) // Catch:{ Exception -> 0x01e1 }\n android.widget.ImageButton r4 = r7.f15170f // Catch:{ Exception -> 0x01e1 }\n r3.addView(r4) // Catch:{ Exception -> 0x01e1 }\n android.widget.ImageButton r4 = r7.f15171g // Catch:{ Exception -> 0x01e1 }\n r3.addView(r4) // Catch:{ Exception -> 0x01e1 }\n android.webkit.WebView r3 = new android.webkit.WebView // Catch:{ Exception -> 0x01e1 }\n r3.<init>(r7) // Catch:{ Exception -> 0x01e1 }\n r7.f15167c = r3 // Catch:{ Exception -> 0x01e1 }\n android.webkit.WebView r3 = r7.f15167c // Catch:{ Exception -> 0x01e1 }\n int r4 = com.fyber.inneractive.sdk.C7636R.C7637id.inneractive_webview_internal_browser // Catch:{ Exception -> 0x01e1 }\n r3.setId(r4) // Catch:{ Exception -> 0x01e1 }\n android.widget.RelativeLayout$LayoutParams r3 = new android.widget.RelativeLayout$LayoutParams // Catch:{ Exception -> 0x01e1 }\n r3.<init>(r2, r2) // Catch:{ Exception -> 0x01e1 }\n r3.addRule(r1, r0) // Catch:{ Exception -> 0x01e1 }\n android.webkit.WebView r1 = r7.f15167c // Catch:{ Exception -> 0x01e1 }\n r1.setLayoutParams(r3) // Catch:{ Exception -> 0x01e1 }\n android.webkit.WebView r1 = r7.f15167c // Catch:{ Exception -> 0x01e1 }\n r8.addView(r1) // Catch:{ Exception -> 0x01e1 }\n android.widget.LinearLayout r8 = r7.f15166b // Catch:{ Exception -> 0x01e1 }\n r7.setContentView(r8) // Catch:{ Exception -> 0x01e1 }\n android.content.Intent r8 = r7.getIntent()\n android.webkit.WebView r1 = r7.f15167c\n android.webkit.WebSettings r1 = r1.getSettings()\n r1.setJavaScriptEnabled(r0)\n r1.setSupportZoom(r0)\n r1.setBuiltInZoomControls(r0)\n r1.setUseWideViewPort(r0)\n r1.setLoadWithOverviewMode(r0)\n android.webkit.WebView r0 = r7.f15167c\n disableWebviewZoomControls(r0)\n android.webkit.WebView r0 = r7.f15167c\n com.fyber.inneractive.sdk.activities.InneractiveInternalBrowserActivity$1 r1 = new com.fyber.inneractive.sdk.activities.InneractiveInternalBrowserActivity$1\n r1.<init>()\n r0.setWebViewClient(r1)\n android.webkit.WebView r0 = r7.f15167c\n com.fyber.inneractive.sdk.activities.InneractiveInternalBrowserActivity$2 r1 = new com.fyber.inneractive.sdk.activities.InneractiveInternalBrowserActivity$2\n r1.<init>()\n r0.setWebChromeClient(r1)\n java.lang.String r0 = \"extra_url\"\n java.lang.String r8 = r8.getStringExtra(r0)\n boolean r0 = m16888b(r8)\n if (r0 == 0) goto L_0x016a\n java.lang.String r0 = \"http%3A%2F%2F\"\n boolean r0 = r8.startsWith(r0)\n if (r0 != 0) goto L_0x013f\n java.lang.String r0 = \"https%3A%2F%2F\"\n boolean r0 = r8.startsWith(r0)\n if (r0 == 0) goto L_0x012e\n goto L_0x013f\n L_0x012e:\n boolean r8 = r7.m16890c(r8)\n if (r8 == 0) goto L_0x013b\n com.fyber.inneractive.sdk.activities.InneractiveInternalBrowserActivity$InternalBrowserListener r8 = f15165a\n if (r8 == 0) goto L_0x013b\n r8.onApplicationInBackground()\n L_0x013b:\n r7.finish()\n goto L_0x016f\n L_0x013f:\n java.lang.String r0 = \"utf-8\"\n java.lang.String r0 = java.net.URLDecoder.decode(r8, r0) // Catch:{ Exception -> 0x0154 }\n java.net.URL r1 = new java.net.URL // Catch:{ Exception -> 0x0154 }\n r1.<init>(r0) // Catch:{ Exception -> 0x0154 }\n android.webkit.WebView r8 = r7.f15167c // Catch:{ Exception -> 0x0151 }\n r8.loadUrl(r0) // Catch:{ Exception -> 0x0151 }\n goto L_0x0169\n L_0x0151:\n r8 = move-exception\n r8 = r0\n goto L_0x0155\n L_0x0154:\n r0 = move-exception\n L_0x0155:\n java.lang.StringBuilder r0 = new java.lang.StringBuilder\n java.lang.String r1 = \"Failed to open Url: \"\n r0.<init>(r1)\n r0.append(r8)\n java.lang.String r8 = r0.toString()\n com.fyber.inneractive.sdk.util.IAlog.m18023d(r8)\n r7.finish()\n L_0x0169:\n goto L_0x016f\n L_0x016a:\n android.webkit.WebView r0 = r7.f15167c\n r0.loadUrl(r8)\n L_0x016f:\n android.widget.ImageButton r8 = r7.f15168d\n r0 = 0\n r8.setBackgroundColor(r0)\n android.widget.ImageButton r8 = r7.f15168d\n com.fyber.inneractive.sdk.activities.InneractiveInternalBrowserActivity$3 r1 = new com.fyber.inneractive.sdk.activities.InneractiveInternalBrowserActivity$3\n r1.<init>()\n r8.setOnClickListener(r1)\n android.widget.ImageButton r8 = r7.f15168d\n java.lang.String r1 = \"IABackButton\"\n r8.setContentDescription(r1)\n android.widget.ImageButton r8 = r7.f15169e\n r8.setBackgroundColor(r0)\n android.widget.ImageButton r8 = r7.f15169e\n com.fyber.inneractive.sdk.activities.InneractiveInternalBrowserActivity$4 r1 = new com.fyber.inneractive.sdk.activities.InneractiveInternalBrowserActivity$4\n r1.<init>()\n r8.setOnClickListener(r1)\n android.widget.ImageButton r8 = r7.f15169e\n java.lang.String r1 = \"IAForwardButton\"\n r8.setContentDescription(r1)\n android.widget.ImageButton r8 = r7.f15170f\n r8.setBackgroundColor(r0)\n android.widget.ImageButton r8 = r7.f15170f\n com.fyber.inneractive.sdk.activities.InneractiveInternalBrowserActivity$5 r1 = new com.fyber.inneractive.sdk.activities.InneractiveInternalBrowserActivity$5\n r1.<init>()\n r8.setOnClickListener(r1)\n android.widget.ImageButton r8 = r7.f15170f\n java.lang.String r1 = \"IARefreshButton\"\n r8.setContentDescription(r1)\n android.widget.ImageButton r8 = r7.f15171g\n r8.setBackgroundColor(r0)\n android.widget.ImageButton r8 = r7.f15171g\n com.fyber.inneractive.sdk.activities.InneractiveInternalBrowserActivity$6 r0 = new com.fyber.inneractive.sdk.activities.InneractiveInternalBrowserActivity$6\n r0.<init>()\n r8.setOnClickListener(r0)\n android.widget.ImageButton r8 = r7.f15171g\n java.lang.String r0 = \"IACloseButton\"\n r8.setContentDescription(r0)\n int r8 = android.os.Build.VERSION.SDK_INT\n r0 = 21\n if (r8 >= r0) goto L_0x01dd\n android.content.Context r8 = com.fyber.inneractive.sdk.util.C8006j.m18075n()\n android.webkit.CookieSyncManager.createInstance(r8)\n android.webkit.CookieSyncManager r8 = android.webkit.CookieSyncManager.getInstance()\n r8.startSync()\n L_0x01dd:\n com.fyber.inneractive.sdk.util.C8006j.m18079r()\n return\n L_0x01e1:\n r8 = move-exception\n r7.finish()\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.fyber.inneractive.sdk.activities.InneractiveInternalBrowserActivity.onCreate(android.os.Bundle):void\");\n }", "@Override\r\n\tprotected void initializeLayout() {\r\n\t\tlayout = GraphLayoutFactory.createLayout(layoutType, graph, 250, 250, properties, AttributeMapSet.PROCEDURES);\r\n\t}", "private void initializeLayout(){\n String title = mStrInfo;\n String subtitle = mClientItem.clientName;\n mHomeToolbar.setGymRatToolbarTitle(title, subtitle);\n\n //initialize maids\n initializeMaid();\n\n //initialize bottom navigation\n initializeBottomNavigation();\n }", "public abstract void initViews();", "private void initView() {\n\n }", "protected abstract void initView();", "public TemplateHelper() {\r\t\tsuper();\r\t}", "@AutoGenerated\n\tprivate HorizontalLayout buildInfo_container() {\n\t\tinfo_container = new HorizontalLayout();\n\t\tinfo_container.setImmediate(false);\n\t\tinfo_container.setWidth(\"100.0%\");\n\t\tinfo_container.setHeight(\"-1px\");\n\t\tinfo_container.setMargin(false);\n\t\t\n\t\t// nativeButton_upVote\n\t\tnativeButton_upVote = new NativeButton();\n\t\tnativeButton_upVote.setCaption(\"Up Vote\");\n\t\tnativeButton_upVote.setImmediate(false);\n\t\tnativeButton_upVote.setWidth(\"-1px\");\n\t\tnativeButton_upVote.setHeight(\"-1px\");\n nativeButton_upVote.setStyleName(\"vote-button\");\n\t\tinfo_container.addComponent(nativeButton_upVote);\n\t\t\n\t\t// nativeButton_downVote\n\t\tnativeButton_downVote = new NativeButton();\n\t\tnativeButton_downVote.setCaption(\"Down Vote\");\n\t\tnativeButton_downVote.setImmediate(false);\n\t\tnativeButton_downVote.setWidth(\"-1px\");\n\t\tnativeButton_downVote.setHeight(\"-1px\");\n nativeButton_downVote.setStyleName(\"vote-button\");\n\t\tinfo_container.addComponent(nativeButton_downVote);\n\n //nativeButton_accept\n nativeButton_accept = new NativeButton();\n nativeButton_accept.setCaption(\"Accept\");\n nativeButton_accept.setVisible(false);\n nativeButton_accept.setStyleName(\"accept-button\");\n info_container.addComponent(nativeButton_accept);\n\n //label_date\n label_date = new Label();\n label_date.setStyleName(\"date-label\");\n label_date.setWidth(\"-1px\");\n label_date.setHeight(\"-1px\");\n info_container.addComponent(label_date);\n info_container.setExpandRatio(label_date, 1.0f);\n info_container.setComponentAlignment(label_date, Alignment.MIDDLE_RIGHT);\n\t\t\n\t\t// label_user\n\t\tlabel_user = new Label();\n\t\tlabel_user.setImmediate(false);\n\t\tlabel_user.setWidth(\"-1px\");\n\t\tlabel_user.setHeight(\"-1px\");\n\t\tlabel_user.setValue(\"By \");\n label_user.setStyleName(\"user-label\");\n\t\tinfo_container.addComponent(label_user);\n//\t\tinfo_container.setExpandRatio(label_user, 1.0f);\n\t\tinfo_container.setComponentAlignment(label_user, new Alignment(34));\n\t\t\n\t\treturn info_container;\n\t}", "@Override\n public void init(Context context) {\n mShowBorder = true;\n mShowDp = false;\n mShowSp = true;\n mShowColor = false;\n }", "@Override\n public void initView() {\n }", "@Override\n public void layout() {\n // TODO: not implemented\n }", "private void layout() {\n\n\n _abortButton= makeAbortButton();\n _abortButton.addStyleName(\"download-group-abort\");\n _content.addStyleName(\"download-group-content\");\n _detailUI= new DetailUIInfo[getPartCount(_monItem)];\n layoutDetails();\n }", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\tinflater = LayoutInflater.from(getApplicationContext());\n\t}", "public VFlowLayout() {\n this(TOP, 5, 5, true, false);\n }", "public SummaryFragment() {\n }", "@Override\n public void createInitialLayout(IPageLayout layout) {\n defineActions(layout);\n defineLayout(layout);\n }", "public abstract\n @LayoutRes\n int getLayoutId();", "@Override\n public void initView() {\n\n }", "public void onFinishInflate() {\n super.onFinishInflate();\n this.mIconView = (ImageView) findViewById(R.id.icon);\n this.mTitleView = (TextView) findViewById(R.id.title);\n this.mSummaryView = (TextView) findViewById(R.id.summary);\n this.mSlidingButton = findViewById(R.id.sliding_button);\n }", "@Override\n\tprotected void initContentView() {\n\t\t\n\t}", "private void init() {\n refreshLayout = new TurbolinksSwipeRefreshLayout(getContext(), null);\n addView(refreshLayout, 0);\n }", "private void init(){\n\t\tmIV = new ImageView(mContext);\r\n\t\tFrameLayout.LayoutParams param1 = new FrameLayout.LayoutParams(FrameLayout.LayoutParams.MATCH_PARENT\r\n\t\t\t\t, FrameLayout.LayoutParams.MATCH_PARENT);\r\n\t\tmIV.setLayoutParams(param1);\r\n\t\tmIV.setScaleType(ScaleType.FIT_XY);\r\n//\t\tmIVs[0] = iv1;\r\n\t\tthis.addView(mIV);\r\n//\t\tImageView iv2 = new ImageView(mContext);\r\n//\t\tFrameLayout.LayoutParams param2 = new FrameLayout.LayoutParams(FrameLayout.LayoutParams.MATCH_PARENT\r\n//\t\t\t\t, FrameLayout.LayoutParams.MATCH_PARENT);\r\n//\t\tiv2.setLayoutParams(param2);\r\n//\t\tiv2.setScaleType(ScaleType.CENTER_CROP);\r\n//\t\tmIVs[1] = iv2;\r\n//\t\tthis.addView(iv2);\r\n\t\tthis.mHandler = new Handler();\r\n\t}", "@Override\n\tpublic int bindLayout() {\n\t\treturn R.layout.activity_init;\n\t}", "@Override\n\tpublic int getLayoutId() {\n\t\treturn 0;\n\t}", "public void initViews(){\n }", "NodeLayout createNodeLayout();", "public Info() {\n initComponents();\n setSize(540, 575);\n setLocationRelativeTo(null);\n \n }", "public TileView(Context context, AttributeSet attrs) {\n super(context, attrs);\n }", "public StintFragment() {\n }", "public HTSViewInfo() {\n super(\"HTS View\", new AppVersion(15),\n \"Copyright (C) 2014-${year} Antony Holmes\",\n new HTSViewIcon(),\n \"View read track data at multiple resolutions.\");\n }", "public ViewHolder(View v) {\n super(v);\n Typeface oldLondon = Typeface.createFromAsset(context.getAssets(), \"fonts/Blackwood Castle.ttf\");\n\n iView = (ImageView) v.findViewById(to[0]);\n nameView = (TextView) v.findViewById(to[1]);\n nameView.setTypeface(oldLondon);\n descView = (TextView) v.findViewById(to[2]);\n boostView = (TextView) v.findViewById(to[3]);\n }", "public LoaderInfo( ) { \n\t\tsuper( null );\n\t}", "public Panel()\n/* */ {\n/* 56 */ this(new FlowLayout());\n/* */ }", "public abstract void initView();", "@Override\n protected void onFinishInflate() {\n super.onFinishInflate();\n mTitleContent = (TextView) findViewById(R.id.title_content);\n mLeftTv = (TextView) findViewById(R.id.title_left_tv);\n mRightTv = (TextView) findViewById(R.id.title_right_tv);\n mRightImg = (ImageView) findViewById(R.id.title_right_img);\n mMessageView = (RelativeLayout) findViewById(R.id.toolbar_message_view);\n mUnReadImg = (ImageView) findViewById(R.id.toolbar_message_unread_img);\n }", "WrapInfo() {\n super(2);\n }", "private void initView() {\n\t\tsna_viewpager = (ViewPager) findViewById(R.id.sna_viewpager);\r\n\t\thost_bt = (Button) findViewById(R.id.host_bt);\r\n\t\tcomment_bt = (Button) findViewById(R.id.comment_bt);\r\n\t\tback_iv = (ImageView) findViewById(R.id.back_iv);\r\n\t\trelativeLayout_project = (RelativeLayout) findViewById(R.id.relativeLayout_project);\r\n\t\trelativeLayout_addr = (RelativeLayout) findViewById(R.id.relativeLayout_addr);\r\n\t\trelativeLayout_activity = (RelativeLayout) findViewById(R.id.relativeLayout_activity);\r\n\t\trelativeLayout_host = (RelativeLayout) findViewById(R.id.relativeLayout_host);\r\n\t\trelativeLayout_comment = (RelativeLayout) findViewById(R.id.relativeLayout_comment);\r\n\t\tll_point = (LinearLayout) findViewById(R.id.ll_point);\r\n\t\tstoyrName = (TextView) findViewById(R.id.stoyrName);\r\n\t\tstory_addr = (TextView) findViewById(R.id.story_addr);\r\n\t\t\r\n\t}", "private void initBaseLayout()\n {\n add(viewPaneWrapper, BorderLayout.CENTER);\n \n currentLayoutView = VIEW_PANE;\n currentSearchView = SEARCH_PANE_VIEW;\n showMainView(VIEW_PANE);\n showSearchView(currentSearchView);\n }", "public LayoutThread(String layout, int w, int h) { \n this.layout = layout; this.w = w; this.h = h; \n }", "private void initView(){\n\t\tinitSize();\n\t\tinitText();\n\t\tinitBackground();\n\t\tthis.setOnClickListener(this);\n\t\tthis.setOnLongClickListener(this);\n\t}", "@Override\n\t\tpublic void layout (final int l, final int t, final int r, final int b) {\n\t\t}", "@Override\r\n\tprotected void initViews(Bundle savedInstanceState) {\n\t\t\r\n\t}", "private VHorizontalLayout initLockInformationLayout() {\r\n VHorizontalLayout layout = new VHorizontalLayout();\r\n if(report.isLocked()) {\r\n Utils.removeAllThemes(layout);\r\n layout.getThemeList().add(ThemeAttribute.LOCKED);\r\n layout.add(getTranslation(\"reportView.reportLocked.label\", report.getLockOwner().getName() + \" \" +report.getLockOwner().getLastname()));\r\n }\r\n return layout;\r\n }" ]
[ "0.7471095", "0.64920384", "0.6450008", "0.62913126", "0.623959", "0.6211957", "0.615158", "0.6081251", "0.6071983", "0.60467255", "0.60035366", "0.5995476", "0.5974259", "0.5945845", "0.59099066", "0.5884194", "0.5871841", "0.5866224", "0.5827125", "0.58185697", "0.5799704", "0.5791373", "0.57768774", "0.57731986", "0.5747958", "0.5747958", "0.5723277", "0.5717044", "0.5712301", "0.57121307", "0.570613", "0.57043946", "0.56962377", "0.56797713", "0.56724113", "0.5668426", "0.56665134", "0.56665134", "0.56661457", "0.566057", "0.56588656", "0.56588656", "0.56575125", "0.5657396", "0.5644317", "0.5636611", "0.5628872", "0.56229824", "0.5600224", "0.5600224", "0.55904317", "0.55884296", "0.55851054", "0.5570659", "0.5570659", "0.5570645", "0.55685294", "0.5562672", "0.55619824", "0.5561565", "0.5551743", "0.554528", "0.5542965", "0.5520912", "0.5516201", "0.5503914", "0.54983675", "0.54932064", "0.5488759", "0.54830533", "0.5482061", "0.5480676", "0.54662997", "0.54459625", "0.54444206", "0.5444019", "0.5442002", "0.5437527", "0.5436972", "0.54339737", "0.5433759", "0.5428922", "0.5421137", "0.5418445", "0.5407745", "0.540487", "0.5399742", "0.5396488", "0.5393405", "0.5390909", "0.53891873", "0.5386018", "0.5384119", "0.53606707", "0.53576624", "0.5352878", "0.5350462", "0.5347758", "0.534719", "0.5347053", "0.5343086" ]
0.0
-1
perform basic initialization of the view by fetching layout attributes and creating the api, etc.
private void init(@NonNull final Context context, final AttributeSet attrs, final int defAttr, final int defStyle, final String googleApiKey, final String historyFileName) { TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.PlacesAutocompleteTextView, defAttr, defStyle); String layoutApiKey = typedArray.getString(R.styleable.PlacesAutocompleteTextView_pacv_googleMapsApiKey); String layoutAdapterClass = typedArray.getString(R.styleable.PlacesAutocompleteTextView_pacv_adapterClass); String layoutHistoryFile = typedArray.getString(R.styleable.PlacesAutocompleteTextView_pacv_historyFile); languageCode = typedArray.getString(R.styleable.PlacesAutocompleteTextView_pacv_languageCode); countryCode = typedArray.getString(R.styleable.PlacesAutocompleteTextView_pacv_countryCode); resultType = AutocompleteResultType.fromEnum(typedArray.getInt(R.styleable.PlacesAutocompleteTextView_pacv_resultType, PlacesApi.DEFAULT_RESULT_TYPE.ordinal())); clearEnabled = typedArray.getBoolean(R.styleable.PlacesAutocompleteTextView_pacv_clearEnabled, false); typedArray.recycle(); final String finalHistoryFileName = historyFileName != null ? historyFileName : layoutHistoryFile; if (!TextUtils.isEmpty(finalHistoryFileName)) { historyManager = DefaultAutocompleteHistoryManager.fromPath(context, finalHistoryFileName); } final String finalApiKey = googleApiKey != null ? googleApiKey : layoutApiKey; if (TextUtils.isEmpty(finalApiKey)) { throw new InflateException("Did not specify googleApiKey!"); } api = new PlacesApiBuilder() .setApiClient(PlacesHttpClientResolver.PLACES_HTTP_CLIENT) .setGoogleApiKey(finalApiKey) .build(); if (languageCode != null) { api.setLanguageCode(languageCode); } if (countryCode != null) { api.setCountryCode(countryCode); } if (layoutAdapterClass != null) { adapter = adapterForClass(context, layoutAdapterClass); } else { adapter = new DefaultAutocompleteAdapter(context, api, resultType, historyManager); } super.setAdapter(adapter); super.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(final AdapterView<?> parent, final View view, final int position, final long id) { Place place = adapter.getItem(position); if (listener != null) { listener.onPlaceSelected(place); } if (historyManager != null) { historyManager.addItemToHistory(place); } } }); this.addTextChangedListener(new TextWatcher() { @Override public void beforeTextChanged(CharSequence s, int start, int count, int after) { } @Override public void onTextChanged(CharSequence s, int start, int before, int count) { if (clearEnabled) { if (s != null && s.length() > 0) { showClearButton(true); } else { showClearButton(false); } } else { showClearButton(false); } } @Override public void afterTextChanged(Editable s) { } }); super.setDropDownBackgroundResource(R.drawable.pacv_popup_background_white); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract void initViews();", "protected abstract void initView();", "public abstract void initViews();", "protected abstract void initializeView();", "private void initViews() {\n\n\t}", "private void viewInit() {\n }", "private void initViews() {\n\n }", "private void initView() {\n\n }", "public abstract void initView();", "@Override\r\n\tpublic void initViews() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void initViews() {\n\t\t\r\n\t}", "public void initView(){}", "void initView();", "@Override\r\n\tprotected void initViews() {\n\t\t\r\n\t}", "@Override\n protected void initViewSetup() {\n }", "public void initViews(){\n }", "private void initializeLayout(){\n String title = mStrInfo;\n String subtitle = mClientItem.clientName;\n mHomeToolbar.setGymRatToolbarTitle(title, subtitle);\n\n //initialize maids\n initializeMaid();\n\n //initialize bottom navigation\n initializeBottomNavigation();\n }", "@Override\r\n\tpublic void initView() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void initView() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initView() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initView() {\n\t\t\r\n\t}", "private void initView(){\n\t\tinitSize();\n\t\tinitText();\n\t\tinitBackground();\n\t\tthis.setOnClickListener(this);\n\t\tthis.setOnLongClickListener(this);\n\t}", "@Override\n\tpublic void initView() {\n\t\t\n\t}", "public void init() {\n\t\tdropViewCollections();\n\t\tbuildViewCollections();\n\t\tthis.populateViewCollections();\n\t}", "private void initView() {\n\t\tsna_viewpager = (ViewPager) findViewById(R.id.sna_viewpager);\r\n\t\thost_bt = (Button) findViewById(R.id.host_bt);\r\n\t\tcomment_bt = (Button) findViewById(R.id.comment_bt);\r\n\t\tback_iv = (ImageView) findViewById(R.id.back_iv);\r\n\t\trelativeLayout_project = (RelativeLayout) findViewById(R.id.relativeLayout_project);\r\n\t\trelativeLayout_addr = (RelativeLayout) findViewById(R.id.relativeLayout_addr);\r\n\t\trelativeLayout_activity = (RelativeLayout) findViewById(R.id.relativeLayout_activity);\r\n\t\trelativeLayout_host = (RelativeLayout) findViewById(R.id.relativeLayout_host);\r\n\t\trelativeLayout_comment = (RelativeLayout) findViewById(R.id.relativeLayout_comment);\r\n\t\tll_point = (LinearLayout) findViewById(R.id.ll_point);\r\n\t\tstoyrName = (TextView) findViewById(R.id.stoyrName);\r\n\t\tstory_addr = (TextView) findViewById(R.id.story_addr);\r\n\t\t\r\n\t}", "@Override\n\tprotected void initView() {\n\t\t\n\t}", "@Override\n\tprotected void initView() {\n\t\t\n\t}", "@Override\n\tprotected void initView()\n\t{\n\n\t}", "private void initLayoutReferences() {\n // Initializing views\n initViews();\n // Initializing mapView element\n initMap();\n }", "@Override\n protected void initView() {\n }", "@Override\n protected void initView() {\n }", "private void init() {\n initView();\n setListener();\n }", "@Override\n public void initView() {\n }", "public void initView() {\n\t\t view.initView(model);\t \n\t }", "protected abstract void initContentView(View view);", "private void initializeViews()\n {\n scrMainContainer = findViewById(R.id.scrMainContainer);\n btnBack = findViewById(R.id.btnBack);\n etEmail = findViewById(R.id.etEmail);\n tvEmailError = findViewById(R.id.tvEmailError);\n etUsername = findViewById(R.id.etUsername);\n tvUsernameError = findViewById(R.id.tvUsernameError);\n etPassword = findViewById(R.id.etPassword);\n tvPasswordError = findViewById(R.id.tvPasswordError);\n btnCreateAccount = findViewById(R.id.btnCreateAccount);\n relLoadingPanel = findViewById(R.id.relLoadingPanel);\n }", "private void initView() {\n TIMManager.getInstance().addMessageListener(this);\n initAdapter();\n initRefresh();\n }", "@Override\n\tpublic void InitView() {\n\t\t\n\t}", "protected abstract void initViews(View mView);", "private void init() {\n refreshLayout = new TurbolinksSwipeRefreshLayout(getContext(), null);\n addView(refreshLayout, 0);\n }", "protected void initialize()\n {\n uiFactory.configureUIComponent(this, UI_PREFIX);\n\n initializeFields();\n initializeLabels();\n initLayout();\n }", "protected abstract void initializeComponent(View view);", "private void init() {\n //set view to presenter\n presenter.setView(this, service);\n\n setupView();\n }", "public MainView() {\r\n\t\tinitialize();\r\n\t}", "private void InitView() {\n\n\t\tframe_element = new Frame_element();// 初始化保存框架元素的类\n\n\t\tframe_element\n\t\t\t\t.setRel_body_content((RelativeLayout) findViewById(R.id.rel_body_content));// 保存中间内容框架\n\t\tframe_element\n\t\t\t\t.setRel_top_bar((RelativeLayout) findViewById(R.id.rel_top_bar));// 保存顶部BAR框架\n\n\t\tframe_element\n\t\t\t\t.setRel_frist_bar((RelativeLayout) findViewById(R.id.rel_frist_bar));// 保存顶部首页BAR\n\t\t// 顶部右侧‘更多’按钮点击事件\n\t\timagebtn_more = (ImageButton) findViewById(R.id.imagebtn_more);\n\t\timagebtn_userhead_icon = (ImageButton) findViewById(R.id.imagebtn_userhead_icon);\n\t\timagebtn_more.setOnClickListener(this);\n\t\timagebtn_userhead_icon.setOnClickListener(this);\n\n\t}", "@Override\n public void initView() {\n\n }", "public void init() {\n fIconkit = new Iconkit(this);\n\n\t\tsetLayout(new BorderLayout());\n\n fView = createDrawingView();\n\n Panel attributes = createAttributesPanel();\n createAttributeChoices(attributes);\n add(\"North\", attributes);\n\n Panel toolPanel = createToolPalette();\n createTools(toolPanel);\n add(\"West\", toolPanel);\n\n add(\"Center\", fView);\n Panel buttonPalette = createButtonPanel();\n createButtons(buttonPalette);\n add(\"South\", buttonPalette);\n\n initDrawing();\n setBufferedDisplayUpdate();\n setupAttributes();\n }", "private void initLayout() {\n ListView<PropertyWrapper> attributes = new ListView<PropertyWrapper>(\"attributes\", createAttributesModel()) {\n\n @Override\n protected void populateItem(ListItem<PropertyWrapper> listItem) {\n populateListItem(listItem);\n\n if (!showEmptyProperties && isEmpty(listItem)) {\n listItem.setVisible(false);\n }\n }\n };\n add(attributes);\n\n //todo remove !!!\n final MultiLineLabel label = new MultiLineLabel(\"debug\", new AbstractReadOnlyModel<String>() {\n\n @Override\n public String getObject() {\n return showStatus();\n }\n });\n label.add(new AjaxEventBehavior(\"onClick\") {\n\n @Override\n protected void onEvent(AjaxRequestTarget target) {\n target.add(label);\n }\n });\n add(label);\n }", "private void initViews() {\n webView = (WebView)findViewById(R.id.crop_webview);\n confirm_location = (Button)findViewById(R.id.btn_confirm_location);\n toolbar = (Toolbar)findViewById(R.id.map_toolbar);\n }", "private void init() {\n\t\tinitDesign();\n\t\tinitHandlers();\n\t}", "@Override\n protected void onCreate(@Nullable Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(getLayoutViewId());\n// presenter = getPresenter(typePresenter);\n init();\n }", "private void setUpVC() {\n\t\tinitializePackageModel();\n\t\tinitializeRootLayout();\n\t\tinitializeStepCountView();\n\t\tinitializeButtonToScanForBluetoothDevices();\n\t\tinitializeButtonToSendCommands();\n\t\taddAllViewsToRootLayout();\n\t\tinitializeUARTControlFragmentInterface();\n\t\tsetListenerOnLaunchScanForBluetoothDevices();\n\t\tsetListenerOnButtonToSendCommands();\n\t}", "private void initView() {\n mRetrofit = new Retrofit.Builder()\n .baseUrl(Challenge1Activity.MY_BASE_URL)\n .addConverterFactory(GsonConverterFactory.create())\n .build();\n\n mTextViewDisplayTopRated = findViewById(R.id.text_view_display_toprated_movies);\n\n mTextViewPrev = findViewById(R.id.text_view_prev);\n mTextViewCurrentAndMaxPage = findViewById(R.id.text_view_current_and_max_page);\n mTextViewNext = findViewById(R.id.text_view_next);\n }", "private void initView() {\n\t\timg_back = (ImageView) findViewById(R.id.img_back_updatejob);\n\t\tedt_content = (EditText) findViewById(R.id.edt_content_updatejob);\n\t\tedt_course = (EditText) findViewById(R.id.edt_course_updatejob);\n\t\tbtn_delete = (Button) findViewById(R.id.btn_delete_updatejob);\n\t\tbtn_update = (Button) findViewById(R.id.btn_update_updatejob);\n\t}", "void initLayout() {\n\t\t/* Randomize the number of rows and columns */\n\t\tNUM = Helper.randomizeNumRowsCols();\n\n\t\t/* Remove all the children of the gridContainer. It will be added again */\n\t\tpiecesGrid.removeAllViews();\n\t\t\n\t\t/* Dynamically calculate the screen positions and sizes of the individual pieces\n\t * Store the starting (x,y) of all the pieces in pieceViewLocations */\n\t\tpieceViewLocations = InitDisplay.initialize(getScreenDimensions(), getRootLayoutPadding());\n\t\t\n\t\t/* Create an array of ImageViews to store the individual piece images */\n\t\tcreatePieceViews();\n\t\t\n\t\t/* Add listeners to the ImageViews that were created above */\n\t\taddImageViewListeners();\n\t}", "protected void viewSetup() {\n\t\t// TODO Auto-generated method stub\n\n\t}", "private void initView() {\r\n\t\tviewerGraz.refresh(true);\r\n\t\tviewerGraz.refresh(true);\r\n\t\tviewerKapfenberg.refresh(true);\r\n\t\tviewerLeoben.refresh(true);\r\n\t\tviewerMariazell.refresh(true);\r\n\t\tviewerWien.refresh(true);\r\n\t}", "private void initViews() {\n\t\tet_area = (EditText) findViewById(R.id.et_area);\r\n\t\tbtn_search = (Button) findViewById(R.id.btn_search);\r\n\t\tll_main = (LinearLayout) findViewById(R.id.ll_main);\r\n\t}", "private void init(Context context) {\n getViewTreeObserver().addOnGlobalLayoutListener(this);\n inflate(context, R.layout.new_rp_resultview, this);\n mMainPanel = (ViewAnimator) findViewById(R.id.viewanimator);\n mInfoPanel = (ViewAnimator) findViewById(R.id.va_text);\n \n \n mInfoPanelText1 = (TextView) mInfoPanel.findViewById(R.id.tv1);\n mMainPanel.setDisplayedChild(0);\n\t}", "protected void initView(View rootView) {\n\n }", "private void initBaseLayout()\n {\n add(viewPaneWrapper, BorderLayout.CENTER);\n \n currentLayoutView = VIEW_PANE;\n currentSearchView = SEARCH_PANE_VIEW;\n showMainView(VIEW_PANE);\n showSearchView(currentSearchView);\n }", "@Override\n\tprotected void initViews(View view) {\n\t\tsuper.initViews(view);\n//\t\tsendRequestData();\n\t}", "private void initViews() {\n user_name = (LinearLayout)findViewById(R.id.user_name);\n user_photo = (LinearLayout)findViewById(R.id.user_photo);\n user_sex = (LinearLayout)findViewById(R.id.user_sex);\n user_notes = (LinearLayout)findViewById(R.id.user_notes);\n name = (TextView)findViewById(R.id.name);\n sex = (TextView)findViewById(R.id.sex);\n notes = (TextView)findViewById(R.id.notes);\n email = (TextView)findViewById(R.id.email);\n photo = (ImageView)findViewById(R.id.photo);\n }", "private void initView() {\n initRefreshListView(mListview);\n }", "private void initView() {\n\n LayoutInflater inflater = getLayoutInflater();\n final int screenWidth = MyUtils.getScreenMetrics(this).widthPixels;\n final int screenHeight = MyUtils.getScreenMetrics(this).heightPixels;\n for (int i = 0; i < 3; i++) {\n ViewGroup layout = (ViewGroup) inflater.inflate(\n R.layout.content_layout, myHorizontal, false);\n layout.getLayoutParams().width = screenWidth;\n TextView textView = (TextView) layout.findViewById(R.id.title);\n textView.setText(\"page \" + (i + 1));\n layout.setBackgroundColor(Color.rgb(255 / (i + 1), 255 / (i + 1), 0));\n createList(layout);\n myHorizontal.addView(layout);\n }\n }", "public void InitLayout() {\n SetBackground(R.drawable.can_dfqc_ac_bg);\n this.mTvA = AddText(121, 173, 203, 25);\n this.mTvP = AddText(121, 212, KeyDef.RKEY_RADIO_6S, 25);\n this.mTvMode = AddText(121, Can.CAN_FLAT_RZC, 203, 25);\n this.mTvC = AddText(121, 295, 139, 25);\n this.mTvWind = AddText(121, KeyDef.RKEY_AVIN, 53, 25);\n initValue();\n }", "private void initViews() {\n /* Intent get data handler */\n fullScreenSnap = (ImageView) findViewById(R.id.fullScreenSnap);\n mToolbar = (Toolbar) findViewById(R.id.toolbar);\n setSupportActionBar(mToolbar);\n getSupportActionBar().setTitle(AppConstants.imageName);\n getSupportActionBar().setDisplayShowHomeEnabled(true);\n mToolbar.setNavigationIcon(R.drawable.back_button);\n }", "@Override\r\n protected void initView() {\n mTitleTV = (TextView) findViewById(R.id.sub_header_bar_tv);\r\n mBackIBtn = (ImageButton) findViewById(R.id.sub_header_bar_left_ibtn);\r\n mChooseVehicleTypeLL = (LinearLayout) findViewById(R.id.choose_vehicle_type_ll);\r\n mVehicleTypeTV = (TextView) findViewById(R.id.vehicle_type_tv);\r\n mVehicleCodeTV = (TextView) findViewById(R.id.car_plate_districe_coding_tv);\r\n mVehiclePlateNumET = (EditText) findViewById(R.id.vehicle_plate_num_et);\r\n mChooseCityLL = (LinearLayout) findViewById(R.id.choose_city_ll);\r\n mQueryCityTV = (TextView) findViewById(R.id.choose_city_tv);\r\n mVehicleFrameNumET = (EditText) findViewById(R.id.vehicle_frame_num_et);\r\n mVehicleEngineNumET = (EditText) findViewById(R.id.vehicle_engine_num_et);\r\n mVehicleFrameHelpIV = (ImageView) findViewById(R.id.vehicle_frame_info_iv);\r\n mVehicleEngineHelpIV = (ImageView) findViewById(R.id.vehicle_engine_info_iv);\r\n mQueryBtn = (Button) findViewById(R.id.illegal_query_btn);\r\n mVehicleFrameNumLL = (LinearLayout) findViewById(R.id.vehicle_frame_num_ll);\r\n mVehicleEngineNumLL = (LinearLayout) findViewById(R.id.vhicle_engine_num_ll);\r\n }", "@Override\r\n\tprotected void initViews(Bundle savedInstanceState) {\n\t\t\r\n\t}", "public testLayout() {\n\t\tsuper();\n\t\tinitialize();\n\t}", "private void initUI() {\n\t\tthis.horizontalLayout = new XdevHorizontalLayout();\n\t\tthis.gridLayout = new XdevGridLayout();\n\t\tthis.button = new XdevButton();\n\t\tthis.button2 = new XdevButton();\n\t\tthis.label = new XdevLabel();\n\n\t\tthis.button.setCaption(\"go to HashdemoView\");\n\t\tthis.button2.setCaption(\"go to CommonView\");\n\t\tthis.label.setValue(\"Go into code tab to view comments\");\n\n\t\tthis.gridLayout.setColumns(2);\n\t\tthis.gridLayout.setRows(2);\n\t\tthis.button.setWidth(200, Unit.PIXELS);\n\t\tthis.button.setHeight(-1, Unit.PIXELS);\n\t\tthis.gridLayout.addComponent(this.button, 0, 0);\n\t\tthis.button2.setWidth(200, Unit.PIXELS);\n\t\tthis.button2.setHeight(-1, Unit.PIXELS);\n\t\tthis.gridLayout.addComponent(this.button2, 1, 0);\n\t\tthis.label.setWidth(100, Unit.PERCENTAGE);\n\t\tthis.label.setHeight(-1, Unit.PIXELS);\n\t\tthis.gridLayout.addComponent(this.label, 0, 1, 1, 1);\n\t\tthis.gridLayout.setComponentAlignment(this.label, Alignment.TOP_CENTER);\n\t\tthis.gridLayout.setSizeUndefined();\n\t\tthis.horizontalLayout.addComponent(this.gridLayout);\n\t\tthis.horizontalLayout.setComponentAlignment(this.gridLayout, Alignment.MIDDLE_CENTER);\n\t\tthis.horizontalLayout.setExpandRatio(this.gridLayout, 10.0F);\n\t\tthis.horizontalLayout.setSizeFull();\n\t\tthis.setContent(this.horizontalLayout);\n\t\tthis.setSizeFull();\n\n\t\tthis.button.addClickListener(event -> this.button_buttonClick(event));\n\t\tthis.button2.addClickListener(event -> this.button2_buttonClick(event));\n\t}", "private void init() {\n recyclerView = findViewById(R.id.mRecyclerView);\n noBudgetData = findViewById(R.id.NoData);\n noDataGif = findViewById(R.id.NoDataGif);\n Amount = findViewById(R.id.Amount);\n WalletName = findViewById(R.id.WalletName);\n TotalCost = findViewById(R.id.TotalCost);\n CostHeading = findViewById(R.id.CostHeading);\n CurrentBalance = findViewById(R.id.CurrentBalance);\n toolbar = findViewById(R.id.tool_bar);\n mainLayout = findViewById(R.id.home_layout);\n editButton = findViewById(R.id.editIcon);\n ux = new UX(this, mainLayout);\n tools = new Tools(this);\n databaseHelper = DatabaseHelper.getHelper(this);\n }", "private void initViews() {\n textViewRole = findViewById(R.id.textViewAddress);\n recyclerViewUsers = findViewById(R.id.recyclerViewUsers);\n appCompatButtonAddProperty = findViewById(R.id.appCompatButtonAddProperty);\n }", "private void initViews() {\n nestedScrollView = (NestedScrollView) findViewById(R.id.nestedScrollView);\n textInputLayoutUsername = (TextInputLayout) findViewById(R.id.textInputLayoutUsername);\n textInputLayoutPassword = (TextInputLayout) findViewById(R.id.textInputLayoutPassword);\n textInputEditTextUsername = (TextInputEditText) findViewById(R.id.textInputEditTextUsername);\n textInputEditTextPassword = (TextInputEditText) findViewById(R.id.textInputEditTextPassword);\n appCompatButtonLogin = (AppCompatButton) findViewById(R.id.appCompatButtonLogin);\n }", "@Override\r\n\tprotected void initView(View view) {\n\t\trly_personal_info = (RelativeLayout) view.findViewById(R.id.rly_personal_info);\r\n\t\t\r\n\t}", "public void init(){\n\t\t//Makes the view\n\t\tsetUpView();\n\n\t\t//Make the controller. Links the action listeners to the view\n\t\tnew Controller(this);\n\t\t\n\t\t//Initilize the array list\n\t\tgameInput = new ArrayList<Integer>();\n\t\tuserInput = new ArrayList<Integer>();\n\t\thighScore = new HighScoreArrayList();\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n initView();\n }", "public void setupLayout() {\n // left empty for subclass to override\n }", "private void initView() {\n\t\tself_info.setOnClickListener(this);\r\n\t\twhich_org.setOnClickListener(this);\r\n\t\tmember_information.setOnClickListener(this);\r\n\t}", "private void initializeViewAndControls() {\r\n txtEmail.setText(\"Email - \"+ AppConstants.ADMIN_EMAIL);\r\n txtCustomerCarePhone.setText(\"Customer Care - \"+ AppConstants.CUSTOMER_CARE_NUMBER);\r\n txtTollFreePhone.setText(\"Toll Free - \"+ AppConstants.TOLL_FREE_NUMBER);\r\n }", "@Override\n public void createInitialLayout(IPageLayout layout) {\n defineActions(layout);\n defineLayout(layout);\n }", "private void setupView() {\n view.setName(advertisement.getTitle());\n view.setPrice(advertisement.getPrice());\n view.setDescription(advertisement.getDescription());\n view.setDate(advertisement.getDatePublished());\n view.setTags(advertisement.getTags());\n setCondition();\n if (advertisement.getImageUrl() != null) { //the url here is null right after upload\n view.setImageUrl(advertisement.getImageUrl());\n }\n }", "private void init()\n\t{\n\t\tsetModel(new Model(Id.model, this, null));\n\t\tsetEnviroment(new Enviroment(Id.enviroment, this, model()));\n\t\tsetVaccinationCenter(new VaccinationCenter(Id.vaccinationCenter, this, model()));\n\t\tsetCanteen(new Canteen(Id.canteen, this, vaccinationCenter()));\n\t\tsetRegistration(new Registration(Id.registration, this, vaccinationCenter()));\n\t\tsetExamination(new Examination(Id.examination, this, vaccinationCenter()));\n\t\tsetVaccination(new Vaccination(Id.vaccination, this, vaccinationCenter()));\n\t\tsetWaitingRoom(new WaitingRoom(Id.waitingRoom, this, vaccinationCenter()));\n\t\tsetSyringes(new Syringes(Id.syringes, this, vaccination()));\n\t}", "private void initView() {\n\t\tcb_show = (CheckBox) findViewById(R.id.cb_show);\r\n\t\tbtn_next = (Button) findViewById(R.id.btn_next);\r\n\t}", "private void initializeViews()\n {\n ButterKnife.bind(this);\n\n LinearLayoutManager layoutManager = new LinearLayoutManager(this);\n rv_my_vehicles.setLayoutManager(layoutManager);\n rv_my_vehicles.setAdapter(myVehiclesAdapter);\n\n myVehiclesAdapter.setParent(getIntent().getIntExtra(COMING_FROM,0));\n presenter.fetchMyVehicles();\n progressDialog = alerts.getProcessDialog(this);\n progressDialog.setCancelable(false);\n\n tv_all_tool_bar_title.setText(my_vehicles);\n tv_all_tool_bar_title.setTypeface(appTypeface.getPro_narMedium());\n tv_add_new_vehicle.setTypeface(appTypeface.getPro_narMedium());\n tv_vehicles_empty.setTypeface(appTypeface.getPro_narMedium());\n }", "private void fillLayout(View view) {\n findViews(view);\n\n //collect our bundle and populate our layout\n Bundle bundle = getArguments();\n\n Long id = bundle.getLong(\"id\", 0);\n String companyName = bundle.getString(\"companyName\");\n String modelName = bundle.getString(\"modelName\");\n double tankVolume = bundle.getDouble(\"tankVolume\", 0);\n String gearbox = bundle.getString(\"gearbox\");\n int seats = bundle.getInt(\"seats\", 0);\n String pictureURL = bundle.getString(\"pictureURL\");\n\n //set elements\n new DownLoadImageTask(modelDetailImageView, id, view.getContext()).execute(pictureURL);\n modelDetailIdTextView.setText(Long.toString(id));\n modelDetailCompanyNameTextView.setText(companyName);\n modelDetailModelNameTextView.setText(modelName);\n modelDetailTankVolumeTextView.setText(Double.toString(tankVolume));\n modelDetailGearboxTextView.setText(gearbox);\n modelDetailSeatsTextView.setText(Integer.toString(seats));\n\n getActivity().setTitle(\"Model #\" + id);\n }", "private void setUpViews() {\n\n updateFooterCarInfo();\n updateFooterUsrInfo();\n\n\n setResultActionListener(new ResultActionListener() {\n @Override\n public void onResultAction(AppService.ActionType actionType) {\n if (ModelManager.getInstance().getGlobalInfo() != null) {\n GlobalInfo globalInfo = ModelManager.getInstance().getGlobalInfo();\n\n switch (actionType) {\n case CarInfo:\n updateFooterCarInfo();\n break;\n case UsrInfo:\n updateFooterUsrInfo();\n break;\n case Charger:\n updateChargeStationList();\n break;\n }\n }\n }\n });\n }", "private void initializeView() {\n InputStream is1 = getContext().getResources().openRawResource(+R.drawable.congratulations);\n mMovie1 = Movie.decodeStream(is1);\n InputStream is2 = getContext().getResources().openRawResource(+R.drawable.giffy3);\n mMovie2 = Movie.decodeStream(is2);\n InputStream is3 = getContext().getResources().openRawResource(+R.drawable.giffy4);\n mMovie3 = Movie.decodeStream(is1);\n InputStream is4 = getContext().getResources().openRawResource(+R.drawable.giphy1);\n mMovie4 = Movie.decodeStream(is4);\n }", "private void initViews() {\n vpSplashPager = findViewById(R.id.vp_splash);\n pageIndicatorView = findViewById(R.id.pageIndicatorView);\n tvSplashDesc = findViewById(R.id.tv_splash_desc);\n tvSplashSkip = findViewById(R.id.tv_splash_skip);\n tvSplashTitle = findViewById(R.id.tv_splash_title);\n }", "private void initViews() {\n\t\t// TODO Auto-generated method stub\n\t\t// venuePager = (ViewPager)findViewById(R.id.pager);\n\n\t\tmyGallery = (LinearLayout) findViewById(R.id.horizontalScrollItems);\n\n\t\tvenueImageLarge = (ImageView) findViewById(R.id.imageVenueLarge);\n\n\t\tinfoImageView = (ImageView) findViewById(R.id.imageInfo);\n\n\t\tcloseBtn = (ImageView) findViewById(R.id.imageclose);\n\n\t\tvenueCapacity = (TextView) findViewById(R.id.venueCapacity);\n\n\t\tvenueDes = (TextView) findViewById(R.id.venueDes);\n\n\t\tvenueName = (TextView) findViewById(R.id.venueName);\n\n\t\tvenueRelative = (RelativeLayout) findViewById(R.id.venue_relative);\n\n\t\tviewAnimator = (ViewAnimator) this.findViewById(R.id.viewFlipper_venue);\n\n\t\tvenueFullname = (TextView) findViewById(R.id.venueFullnameValue);\n\n\t\tvenueCity = (TextView) findViewById(R.id.venueCityValue);\n\n\t\tvenueOwner = (TextView) findViewById(R.id.venueOwnerValue);\n\n\t\tvenueOpened = (TextView) findViewById(R.id.venueOpenedValue);\n\n\t\tvenueSurface = (TextView) findViewById(R.id.venueSurfaceValue);\n\n\t\tvenueWebsite = (TextView) findViewById(R.id.venueWebsiteValue);\n\n\n\t}", "public MainView() {\n initComponents();\n \n }", "private void initViews() {\n mTvBalance = findViewById(R.id.tv_receive_client_balance);\n mListView = findViewById(R.id.lv_list_receive_client);\n mFab = findViewById(R.id.fab_receive_receip);\n mTvEmpty = findViewById(R.id.tv_empty_view);\n mIvEmpty = findViewById(R.id.iv_empty_view);\n mEmptyView = findViewById(R.id.empty_view);\n }", "@Override\n public void init() // set up GUI\n {\n setLayout(new FlowLayout());\n\n customerView = new CustomerView(); // initialize customerView\n \n add(customerView); // add customerView to the GUI\n }", "@Override\n public void Create() {\n\n initView();\n }", "private void initUI() {\r\n\t\tthis.verticalLayout = new XdevVerticalLayout();\r\n\t\tthis.verticalLayout2 = new XdevVerticalLayout();\r\n\t\r\n\t\tthis.setSpacing(false);\r\n\t\tthis.setMargin(new MarginInfo(false));\r\n\t\tthis.verticalLayout.setSpacing(false);\r\n\t\tthis.verticalLayout.setMargin(new MarginInfo(false));\r\n\t\tthis.verticalLayout2.setMargin(new MarginInfo(false));\r\n\t\r\n\t\tthis.verticalLayout2.setSizeFull();\r\n\t\tthis.verticalLayout.addComponent(this.verticalLayout2);\r\n\t\tthis.verticalLayout.setComponentAlignment(this.verticalLayout2, Alignment.MIDDLE_CENTER);\r\n\t\tthis.verticalLayout.setExpandRatio(this.verticalLayout2, 20.0F);\r\n\t\tthis.verticalLayout.setSizeFull();\r\n\t\tthis.addComponent(this.verticalLayout);\r\n\t\tthis.setComponentAlignment(this.verticalLayout, Alignment.MIDDLE_CENTER);\r\n\t\tthis.setExpandRatio(this.verticalLayout, 10.0F);\r\n\t\tthis.setSizeFull();\r\n\t\r\n\t\tthis.addContextClickListener(event -> this.this_contextClick(event));\r\n\t}", "private void initView() {\n btnLoginFacebook = (RelativeLayout) findViewById(R.id.btnLoginFacebook);\n btnLoginGoogle = (RelativeLayout) findViewById(R.id.btnLoginGoogle);\n txtRegister = (TextViewFontAwesome) findViewById(R.id.txtRegister);\n txtForgotPassword = (TextViewFontAwesome) findViewById(R.id.txtForgotPassword);\n txtLogin = (TextViewFontAwesome) findViewById(R.id.txtLogin);\n txtUsername = (EditText) findViewById(R.id.txtUsername);\n txtPassword = (EditText) findViewById(R.id.txtPassword);\n txtForgotPassword.setPaintFlags(txtForgotPassword.getPaintFlags() | Paint.UNDERLINE_TEXT_FLAG);\n }", "private void initView(View view) {\n rlMain = view.findViewById(R.id.rlMain);\n llHeader = view.findViewById(R.id.llHeader);\n tvManually = view.findViewById(R.id.tvManually);\n tbPerson = view.findViewById(R.id.tbPerson);\n viewPagerPerson = view.findViewById(R.id.viewPagerPerson);\n tvPersonHeader = view.findViewById(R.id.tvPersonHeader);\n tvPersonHeader.setText(getString(R.string.choose_vehicle));\n tbPerson.setTabMode(TabLayout.MODE_SCROLLABLE);\n\n isPopulateView();\n\n aRightsMapper = db.getSectionList();\n validateRights();\n setPersonPagerData();\n tvManually.setOnClickListener(this);\n }", "public void initViews(){\n layout_health = (RelativeLayout) findViewById(R.id.layout_health);\n layout_msg = (RelativeLayout) findViewById(R.id.layout_msg);\n layout_usercenter = (RelativeLayout) findViewById(R.id.layout_usercenter);\n\n// img_home = (ImageView) findViewById(R.id.img_home);\n img_health = (ImageView) findViewById(R.id.img_health);\n img_msg = (ImageView) findViewById(R.id.img_msg);\n img_usercenter = (ImageView) findViewById(R.id.img_usercenter);\n\n// tv_home = (TextView) findViewById(R.id.tv_home);\n tv_health = (TextView) findViewById(R.id.tv_health);\n tv_msg = (TextView) findViewById(R.id.tv_msg);\n tv_usercenter = (TextView) findViewById(R.id.tv_usercenter);\n\n }", "public void createInitialLayout(IPageLayout layout) {\n \n\t}", "private void initview() {\n\t\tbtn_connect = (Button) findViewById(R.id.btn_connect);\n\t\tbtn_disconnect = (Button) findViewById(R.id.btn_disconnect);\n\t\tbtn_send = (Button) findViewById(R.id.pinpad_controller_btn_send);\n\t\tbtn_recv = (Button) findViewById(R.id.pinpad_controller_btn_recv);\n\t\tbtn_clear = (Button) findViewById(R.id.btn_clear);\n\t\tbtn_random = (Button) findViewById(R.id.btn_random);\n\t\tbtn_connect.setOnClickListener(this);\n\t\tbtn_recv.setOnClickListener(this);\n\t\tbtn_send.setOnClickListener(this);\n\t\tbtn_disconnect.setOnClickListener(this);\n\t\tbtn_clear.setOnClickListener(this);\n\t\tbtn_random.setOnClickListener(this);\n\t\ttv_read = (TextView) findViewById(R.id.pinpad_controller_tv_recv);\n\t\tet_send = (EditText) findViewById(R.id.pinpad_controller_et_send);\n\t\ttv_version = (TextView) findViewById(R.id.pinpad_controller_tv_version);\n\t\ttv_version.setText(\"\");\n\t\tsetViewEnabledFalse();\n\t}", "private void initialiseViews() {\n setDefaultKeyMode(DEFAULT_KEYS_SEARCH_LOCAL);\n bindings = DataBindingUtil.setContentView(this, R.layout.activity_catalog_product);\n bindings.activityCatalogProductPb.setVisibility(View.GONE);\n\n bindings.activityCatalogProductFab.setOnClickListener(v -> {\n\n Intent addProductIntent = new Intent(ProductCatalogMain.this,\n ProductEditor.class);\n startActivity(addProductIntent);\n\n overridePendingTransition(R.anim.slide_in_right, R.anim.slide_out_left);\n\n });\n\n setSupportActionBar(bindings.activityCatalogProductToolbar);\n getSupportActionBar().setDisplayHomeAsUpEnabled(true);\n\n tabPageAdapter = new ProductCatalogFragmentPageAdapter(getSupportFragmentManager());\n tabViewPager = bindings.activityCatalogProductVp;\n tabViewPager.setAdapter(tabPageAdapter);\n\n if (bindings.activityCatalogProductVp != null) {\n setupViewPager(bindings.activityCatalogProductVp);\n }\n\n // Sets up the Tab's and their titles.\n bindings.activityCatalogProductTl.setupWithViewPager(bindings.activityCatalogProductVp);\n\n }" ]
[ "0.79081947", "0.7856323", "0.78396547", "0.77582365", "0.7724383", "0.770618", "0.7677563", "0.76667136", "0.7665002", "0.75606096", "0.75606096", "0.7553194", "0.75392836", "0.7531199", "0.75299096", "0.75145423", "0.74331886", "0.7379523", "0.7379523", "0.73452103", "0.73452103", "0.72743136", "0.7263792", "0.72459906", "0.7223479", "0.7212594", "0.7212594", "0.7205662", "0.7199054", "0.71718305", "0.71718305", "0.71690404", "0.7161993", "0.7106121", "0.70794916", "0.7057643", "0.70169497", "0.6987476", "0.6983718", "0.69714975", "0.6969707", "0.69663113", "0.69649017", "0.6951778", "0.69454664", "0.6941739", "0.693589", "0.69003445", "0.6881099", "0.6859778", "0.68539387", "0.6850693", "0.683517", "0.682801", "0.6826093", "0.6824929", "0.6812549", "0.6799287", "0.6791384", "0.6781988", "0.6779046", "0.67717636", "0.6767749", "0.6748451", "0.6746802", "0.67322314", "0.6719777", "0.669907", "0.6692879", "0.66892797", "0.66727084", "0.66630477", "0.6646667", "0.6628597", "0.6624246", "0.66136634", "0.66085726", "0.6599823", "0.6596652", "0.659279", "0.65926725", "0.65921295", "0.65874285", "0.6584371", "0.6575391", "0.65701085", "0.6560162", "0.65499437", "0.65497494", "0.6537223", "0.6534074", "0.6517468", "0.65165097", "0.65133417", "0.6506957", "0.65055466", "0.6505368", "0.6490261", "0.648728", "0.64857984", "0.64820015" ]
0.0
-1
Override the default Clear button image and add your own
public void setImgClearButton(Drawable imgClearButton) { this.imgClearButton = imgClearButton; enableClearButton(true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Source(\"images/deleteButton.png\")\n @ImageOptions(flipRtl = true)\n ImageResource removeIcon();", "public void clear() {\n\t\tsetImageResource(R.drawable.barcode);\n\t\tthis.setScaleType(ScaleType.CENTER);\n\t}", "private void clearBtnMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_clearBtnMousePressed\n clearBtn.setBackground(Color.decode(\"#1e5837\"));\n }", "public void clearMainIcon();", "public JButton getClearBox() {\n\t\treturn clearBox;\n\t}", "private void clearxuan() {\n\t\tbtn_Fourgroup6_xuan_big.setBackgroundResource(0);\r\n\t\tbtn_Fourgroup6_xuan_little.setBackgroundResource(0);\r\n\t\tbtn_Fourgroup6_xuan_all.setBackgroundResource(0);\r\n\t\tbtn_Fourgroup6_xuan_odd.setBackgroundResource(0);\r\n\t\tbtn_Fourgroup6_xuan_even.setBackgroundResource(0);\r\n\t\tbtn_Fourgroup6_xuan_clear.setBackgroundResource(0);\r\n\t\tbtn_Fourgroup6_xuan_big.setTextColor(0xffcfcfcf);\r\n\t\tbtn_Fourgroup6_xuan_little.setTextColor(0xffcfcfcf);\r\n\t\tbtn_Fourgroup6_xuan_all.setTextColor(0xffcfcfcf);\r\n\t\tbtn_Fourgroup6_xuan_odd.setTextColor(0xffcfcfcf);\r\n\t\tbtn_Fourgroup6_xuan_even.setTextColor(0xffcfcfcf);\r\n\t\tbtn_Fourgroup6_xuan_clear.setTextColor(0xffcfcfcf);\r\n\r\n\t}", "private void addClearButton() {\n\t\t// make the \"clear\" button\n\t\tclearButton = new JButton(\"Clear\");\n\t\tadd (clearButton, SOUTH);\n\t\tclearButton.addActionListener(this);\n\t}", "private void clearBtnMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_clearBtnMouseReleased\n clearBtn.setBackground(Color.decode(\"#4fc482\"));\n }", "@Override\n public void setNormal()\n {\n setImage(\"Minus.png\");\n }", "@Override\n public void setPressed()\n {\n setImage(\"MinusPressed.png\");\n }", "public static void setupCancelButton() {\n if (imageAdapter.getSelectedSize() == 0) {\n // always set to invisible\n cancel.hide();\n return;\n }\n // set button to be visible\n cancel.show();\n }", "public LevelClear()\n\t{\n\t\ttry \n\t\t{\n\t\t\tgo = ImageIO.read(getClass().getResourceAsStream(\"/GUI/Clear.png\"));\n\t\t} catch (IOException e) \n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void clearBtnMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_clearBtnMouseEntered\n clearBtn.setBackground(Color.decode(\"#339966\"));\n }", "@Source(\"cancel_icon.png\")\n\tpublic DataResource cancelIconResource();", "public void clearStatusIcons();", "public abstract ImageIcon getButtonIcon();", "public Component resetButton() {\n resetButton = new JButton(\"Clear Board\");\n setFocusable(false);\n return resetButton;\n }", "public JButton getRemoveAnswerImageBtn() {\r\n\t\treturn btnRemoveAnswerImage;\r\n\t}", "public LiveBtn() {\n\t\tsuper(\"L\");\n\t\tURL iconUrlLive = getClass().getResource(\"/res/icons/record.png\");\n\t\tif (iconUrlLive != null) {\n\t\t\tImageIcon icon = new ImageIcon(iconUrlLive);\n\t\t\tImage img = icon.getImage();\n\t\t\tImage newimg = img.getScaledInstance(20, 20, java.awt.Image.SCALE_SMOOTH);\n\t\t\tImageIcon newIcon = new ImageIcon(newimg);\n\t\t\tthis.setIcon(newIcon);\n\t\t\tthis.setText(\"\");\n\t\t\tthis.setBorderPainted(false);\n\t\t}\n\t}", "public void becomeEaten(){\n\t\tthis.setIcon(null);\n\t}", "public void clearImage() {\n // Clear Image Area\n paint = false;\n this.repaint();\n }", "public void updateResetButton(){\n if (vertexImages.size() < 1){\n resetButton.setAlpha(0.5f);\n resetButton.setClickable(false);\n }\n else {\n resetButton.setAlpha(1f);\n resetButton.setClickable(true);\n }\n }", "public void Back(){\n setImage(\"button-blue.png\");\n }", "private void clearField(){\n passwordField.setText(\"\");\n mailField.setText(\"\");\n stateImg.setImage( crossImg);\n stateImg.setVisible(false);\n\n }", "private JButton getClearButton() {\n\t\tif (ClearButton == null) {\n\t\t\tClearButton = new JButton();\n\t\t\tClearButton.setBounds(new Rectangle(240, 230, 80, 25));\n\t\t\tClearButton.setText(\"Clear\");\n\t\t\tClearButton.addActionListener(new ActionListener () {\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tNameTextField.setText(\"\");\n\t\t\t\t\tPasswordField.setText(\"\");\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\t\n\t\treturn ClearButton;\n\t}", "public void showButtonNeutral( JButton button ) {\r\n /*------------------------------------------------------------------------*/\r\n button.setIcon(\r\n new javax.swing.ImageIcon(\r\n getClass().getResource(LED_WHITE)));\r\n }", "private void resetButton() {\n for(int x=0;x<buttons.size();x++) {\n if(buttons.get(x).isOpaque())\n buttons.get(x).setOpaque(false);\n }\n }", "@Override\n public void setFocused()\n {\n setImage(\"MinusFocused.png\");\n }", "public Builder clearIcon() {\n bitField0_ = (bitField0_ & ~0x00000002);\n icon_ = getDefaultInstance().getIcon();\n onChanged();\n return this;\n }", "@Override\n\tpublic String getIconURI() {\n\t\treturn null;\n\t}", "public void setClearIconVisible(boolean visible) {\n Drawable right = visible ? mClearDrawable : null;\n setCompoundDrawablesRelative(getCompoundDrawablesRelative()[0],\n getCompoundDrawablesRelative()[1], right, getCompoundDrawablesRelative()[3]);\n }", "@Source(\"close_btn.gif\")\n\tpublic DataResource closeButtonIconResource();", "private void clearBtnMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_clearBtnMouseExited\n clearBtn.setBackground(Color.decode(\"#4fc482\"));\n }", "@Override\n protected void updateItem(Boolean t, boolean empty) {\n super.updateItem(t, empty);\n if(!empty){\n setGraphic(cellButton);\n }\n else{\n setGraphic(null);\n }\n }", "@Source(\"gr/grnet/pithos/resources/editdelete.png\")\n ImageResource delete();", "public JButton getRemoveQuestionImageBtn() {\r\n\t\treturn btnRemoveQuestionImage;\r\n\t}", "@Override\r\n protected final Control createButtonBar(Composite parent) {\n return null;\r\n }", "public void clearImage() {\n IntStream.range(0, bytes.length).forEach(i -> bytes[i] = CLEAR_BYTE);\n }", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tthis.jmf.btnClear_actionPerformed(e);\n\t}", "public void setClearEnabled() {\n clearIsEnabled = true;\n }", "@Override\n\tprotected Button createPushButton(Composite parent, String label, Image image) {\n\t\treturn super.createPushButton(parent, label, image);\n\t}", "public Builder clearIcon() {\n bitField0_ = (bitField0_ & ~0x00000004);\n icon_ = getDefaultInstance().getIcon();\n onChanged();\n return this;\n }", "public void m2262J() {\n try {\n if (this.f2513n != null) {\n this.f2513n.setImageResource(17170445);\n }\n } catch (Exception e) {\n C5017f.m3256a(mo61159b(), C5015d.EXCEPTION, \"MraidMode.removeDefaultCloseButton\", e.getMessage(), \"\");\n }\n }", "@Override\r\n public int getToolbarIconResId(){\r\n return android.R.drawable.ic_menu_close_clear_cancel;\r\n }", "public void getClearButtonSemantics() {\r\n JTextField bodyTextField = addTweet.getBodyTextField();\r\n bodyTextField.setText(\"\");\r\n bodyTextField.requestFocus();\r\n }", "private javax.swing.JButton getJButtonCancelar() {\n\t\tif(jButtonCancelar == null) {\n\t\t\tjButtonCancelar = new JHighlightButton();\n\t\t\tjButtonCancelar.setText(\"Cancelar\");\n\t\t\tjButtonCancelar.setBackground(new java.awt.Color(226,226,222));\n\t\t\tjButtonCancelar.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/com/becoblohm/cr/gui/resources/icons/ix16x16/delete2.png\")));\n\t\t}\n\t\treturn jButtonCancelar;\n\t}", "public JButton getClearCellBtn() {\r\n\t\tthis.clearBtn = new JButton(\"Clear Selected Cell\");\r\n\t\tthis.clearBtn.addActionListener(this);\r\n\t\treturn this.clearBtn;\r\n\t}", "@Override\n\tprotected void cmdClearWidgetSelected() {\n\t\tclearMode();\n\n\t}", "private void decorateCancelButton() {\n cancelButton.setVisible(false);\n ResourceUtils.resButton(cancelButton, Res.getString(\"cancel\"));\n cancelButton.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, new Color(73, 113, 196)));\n cancelButton.setForeground(new Color(73, 113, 196));\n cancelButton.setFont(new Font(\"Dialog\", Font.BOLD, 10));\n \n cancelButton.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n cancelTransfer();\n }\n });\n \n cancelButton.addMouseListener(new MouseAdapter() {\n public void mouseEntered(MouseEvent e) {\n cancelButton.setCursor(new Cursor(Cursor.HAND_CURSOR));\n \n }\n \n public void mouseExited(MouseEvent e) {\n cancelButton.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));\n }\n });\n \n }", "private void getClearButtonSemantics() {\n //TODO implement method\n searchView.getSearchValueTextField().setText(\"\");\n searchView.getFieldComboBox().setSelectedIndex(-1);\n searchView.getResultsTextArea().setText(\"\");\n searchView.getSearchValueTextField().requestFocus();\n }", "private void setButtonIcon(JButton button, ImageIcon myIcon1) {\n //button.setBackground(Color.black);\n button.setBorderPainted(false);\n button.setBorder(null);\n button.setFocusable(false);\n button.setMargin(new Insets(0, 0, 0, 0));\n button.setContentAreaFilled(false);\n button.setIcon(myIcon1);\n button.setOpaque(false);\n }", "public void ClearActionPerformed(java.awt.event.ActionEvent evt) {\n drawingPanel.setPath(\"null\"); \r\n }", "public void resetFilterIcon() {\n removeStyleName(\"appliedfilter\");\n icon.setSource(defaultTheam);\n\n }", "public void resetButtonStyles() {\n\t\tint drawable_id = R.drawable.stockbutton;\n\t\tDrawable stockbutton = getResources().getDrawable(drawable_id);\n\t\t\n\t\t// For now I'm just going to set the bg colors\n\t\tButton outsideButton = (Button) findViewById(R.id.outside);\n\t\toutsideButton.setBackground(stockbutton);\n\t\tButton fridgeButton = (Button) findViewById(R.id.fridge);\n\t\tfridgeButton.setBackground(stockbutton);\n\t\tButton freezerButton = (Button) findViewById(R.id.freezer);\n\t\tfreezerButton.setBackground(stockbutton);\n\t}", "private void initImage() {\n BufferedImage closebtn = null;\n BufferedImage mulaiBtn = null;\n try {\n mulaiBtn = ImageIO.read(new File(\"image\\\\button\\\\mulai_btn.png\"));\n closebtn = ImageIO.read(new File(\"image\\\\button\\\\closeX_btn.png\"));\n ImageIcon mulaiBtnImage = new ImageIcon(mulaiBtn.getScaledInstance(126, 32, Image.SCALE_SMOOTH));\n ImageIcon closeBtnImage = new ImageIcon(closebtn.getScaledInstance(42, 42, Image.SCALE_SMOOTH));\n button_mulai.setIcon(mulaiBtnImage);\n button_close.setIcon(closeBtnImage);\n } catch (IOException ex) {\n ex.printStackTrace();\n } finally {\n button_mulai.setText(\"\");\n button_close.setText(\"\");\n }\n }", "private void updateBaseIcon() {\n this.squareIcon.setDecoratedIcon( getSelectedBaseIcon() );\n this.radialIcon.setDecoratedIcon( getSelectedBaseIcon() );\n }", "public void clearPressed() {\n PresentationCtrl.getInstance().clearHistory();\n refreshPressed();\n }", "public void clear() {\n super.clear();\n locationToWidget.clear();\n widgetToCaptionWrapper.clear();\n }", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t mImgview.resetView();\n\t\t\t\t}", "private void unhighlightView(AdapterList.ViewHolder holder) {\n holder.checkIcon.setImageResource(R.drawable.right_arrow_go);\n }", "String removeImageStyle();", "private void clearButtons()\n {\n // remove all saved search Buttons\n listTableLayout.removeAllViews();\n }", "private void resetIncognito()\n\t{\n\t\teToPower.setBackground (defaultButtonBackground);\n\t\ttwoPower.setBackground (defaultButtonBackground);\n\t\tln.setBackground (defaultButtonBackground);\n\t\txCube.setBackground (defaultButtonBackground);\n\t\txSquare.setBackground (defaultButtonBackground);\n\t\tdel.setBackground (defaultButtonBackground);\n\t\tcubeRoot.setBackground (defaultButtonBackground);\n\t\tC.setBackground (defaultButtonBackground);\n\t\tnegate.setBackground (defaultButtonBackground);\n\t\tsquareRoot.setBackground (defaultButtonBackground);\n\t\tnine.setBackground (defaultButtonBackground);\n\t\teight.setBackground (defaultButtonBackground);\n\t\tseven.setBackground (defaultButtonBackground);\n\t\tsix.setBackground (defaultButtonBackground);\n\t\tfive.setBackground (defaultButtonBackground);\n\t\tfour.setBackground (defaultButtonBackground);\n\t\tthree.setBackground (defaultButtonBackground);\n\t\ttwo.setBackground (defaultButtonBackground);\n\t\tone.setBackground (defaultButtonBackground);\n\t\tzero.setBackground (defaultButtonBackground);\n\t\tdivide.setBackground (defaultButtonBackground);\n\t\tpercent.setBackground (defaultButtonBackground);\n\t\tmultiply.setBackground (defaultButtonBackground);\n\t\treciprocal.setBackground (defaultButtonBackground);\n\t\tadd.setBackground (defaultButtonBackground);\n\t\tsubtract.setBackground (defaultButtonBackground);\n\t\tdecimalPoint.setBackground (defaultButtonBackground);\n\t\tequals.setBackground (defaultButtonBackground);\n\t\te.setBackground (defaultButtonBackground);\n\t\tPI.setBackground (defaultButtonBackground);\n\t\t\n\t\teToPower.setForeground (defaultButtonForeground);\n\t\ttwoPower.setForeground (defaultButtonForeground);\n\t\tln.setForeground (defaultButtonForeground);\n\t\txCube.setForeground (defaultButtonForeground);\n\t\txSquare.setForeground (defaultButtonForeground);\n\t\tdel.setForeground (defaultButtonForeground);\n\t\tcubeRoot.setForeground (defaultButtonForeground);\n\t\tC.setForeground (defaultButtonForeground);\n\t\tnegate.setForeground (defaultButtonForeground);\n\t\tsquareRoot.setForeground (defaultButtonForeground);\n\t\tnine.setForeground (defaultButtonForeground);\n\t\teight.setForeground (defaultButtonForeground);\n\t\tseven.setForeground (defaultButtonForeground);\n\t\tsix.setForeground (defaultButtonForeground);\n\t\tfive.setForeground (defaultButtonForeground);\n\t\tfour.setForeground (defaultButtonForeground);\n\t\tthree.setForeground (defaultButtonForeground);\n\t\ttwo.setForeground (defaultButtonForeground);\n\t\tone.setForeground (defaultButtonForeground);\n\t\tzero.setForeground (defaultButtonForeground);\n\t\tdivide.setForeground (defaultButtonForeground);\n\t\tpercent.setForeground (defaultButtonForeground);\n\t\tmultiply.setForeground (defaultButtonForeground);\n\t\treciprocal.setForeground (defaultButtonForeground);\n\t\tadd.setForeground (defaultButtonForeground);\n\t\tsubtract.setForeground (defaultButtonForeground);\n\t\tdecimalPoint.setForeground (defaultButtonForeground);\n\t\tequals.setForeground (defaultButtonForeground);\n\t\te.setForeground (defaultButtonForeground);\n\t\tPI.setForeground (defaultButtonForeground);\n\t\t\t\t\n\t\tentry.setBackground (white);\n\t\tentry.setForeground(black);\n\n\t\tmenuBar.setBackground(defaultMenuBackground);\n\t\tmenuBar.setForeground(defaultMenuForeground);\n\t\tfileMenu.setForeground(defaultMenuForeground);\n\t\thelpMenu.setForeground (defaultMenuForeground);\n\t\ttoolsMenu.setForeground(defaultMenuForeground);\n\t\t\t\t\n\t\texit.setBackground(defaultButtonBackground);\n\t\tsettings.setBackground(defaultButtonBackground);\n\t\treadme.setBackground(defaultButtonBackground);\n\t\tabout.setBackground(defaultButtonBackground);\n\t\t\t\t\n\t\texit.setForeground(defaultMenuForeground);\n\t\tsettings.setForeground(defaultMenuForeground);\n\t\treadme.setForeground(defaultMenuForeground);\n\t\tabout.setForeground(defaultMenuForeground);\n\t}", "public synchronized void clearImage()\r\n\t{\r\n\t\treferenceImage.clearImage();\r\n\t\tdisplayedImage.clearImage();\r\n\t}", "private void clearButtons(){\n\t\t// remove-all saved search Buttons\n\t\tqueryTableLayout.removeAllViews();\n\t}", "private void clearButton(Floor floor)\r\n\t{\r\n\t\t\tbuttonPanel[floor.getNumber()]=LiftButton.NOT_ACTIVE;\r\n\t}", "public void darkIcons() {\n teamPhoto.setImage((new Image(\"/Resources/Images/emptyTeamLogo.png\")));\n copyIcon.setImage((new Image(\"/Resources/Images/white/copy_white.png\")));\n helpPaneIcon.setImage((new Image(\"/Resources/Images/white/help_white.png\")));\n if (user.getUser().getProfilePhoto() == null) {\n accountPhoto.setImage((new Image(\"/Resources/Images/white/big_profile_white.png\")));\n }\n }", "public void clear(){\n instructions.clear();\n super.repaint();\n }", "public void clear()\n\t{\n\t\tsignCanvas.drawColor(Color.TRANSPARENT, PorterDuff.Mode.CLEAR);\n\t\tpath.reset();\n\t\tinvalidate();\n\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n clear();\n\n }", "public void cancelSelectionBorder(){\n BackgroundImage bgselected= new BackgroundImage(new Image(\"rugbeats/img/Background_selectedhdpi.png\"),BackgroundRepeat.NO_REPEAT, BackgroundRepeat.NO_REPEAT, BackgroundPosition.DEFAULT,\n new BackgroundSize(1.0, 1.0, true, true, false, false));\n ImgStack.setBackground(new Background(bgselected));\n }", "@Override\n\tprotected String getImage(int row, int col) {\n\t\treturn null;\n\t}", "public static void clearEffect(ArrayList<JButton> myGameButton){\n for(int i=0; i<myGameButton.size(); ++i){\n myGameButton.get(i).setBackground(Color.LIGHT_GRAY);\n }\n }", "public RevertDeletedAction() {\n setIcon(null);\n putValue(\"noIconInMenu\", Boolean.TRUE); // NOI18N\n }", "protected void ACTION_ON_CLEAR(ActionEvent arg0) {\n\t\ttextArea_1.setText(\"\");\r\n\t}", "private void toClear()\n {\n tfPaintId.setText(\"\");\n tfName.setText(\"\");\n tfPrice.setText(\"\");\n tfColor.setText(\"\");\n rwCombo.setSelectedIndex(0);\n bCombo.setSelectedIndex(0);\n typeCombo.setSelectedIndex(0);\n tfQuantity.setText(\"\");\n bg.clearSelection();\n \n }", "@Override\r\n\tprotected void paintComponent(Graphics g) {\n\t\tsuper.paintComponent(g);\r\n\t\tImageIcon img = new ImageIcon(this.getClass().getResource(\"After-Noon.png\"));\r\n\t\tg.drawImage(img.getImage(), 0, 0, this.getWidth(), this.getHeight(), null);\r\n\t}", "private JButton getJButtonCancel() {\r\n\t\tif (jButtonCancel == null) {\r\n\t\t\tjButtonCancel = new JButton();\r\n\t\t\tjButtonCancel.setBounds(new Rectangle(220, 215, 90, 30));\r\n\t\t\tjButtonCancel.setText(\"取消\");\r\n\t\t\tjButtonCancel.addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\r\n\t\t\t\t\tjColorChooser.setVisible(false);\r\n\t\t\t\t\tchooserColor = null;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn jButtonCancel;\r\n\t}", "public JButtonOperator btResetPalette() {\n if (_btResetPalette==null) {\n _btResetPalette = new JButtonOperator(this, \"Reset Palette\"); // NOI18N\n }\n return _btResetPalette;\n }", "public void resetShellIcon() {\r\n\t\tGDE.display.asyncExec(new Runnable() {\r\n\t\t\tpublic void run() {\r\n\t\t\t\tGDE.shell.setImage(SWTResourceManager.getImage(GDE.IS_MAC ? \"gde/resource/DataExplorer_MAC.png\" : \"gde/resource/DataExplorer.png\")); //$NON-NLS-1$ //$NON-NLS-2$\r\n\t\t\t}\r\n\t\t});\r\n\t}", "protected abstract String getAddDataIconDefaultCaption () ;", "public void setIcon(boolean b){\n \ttry{\n \t\tsuper.setIcon(b);\n \t}\n \tcatch(java.lang.Exception ex){\n \t\tSystem.out.println (ex);\n \t}\n \tif(!b){\n \t\tgetRootPane().setDefaultButton(jButton1);\n \t}\n }", "@Override\n\tpublic Button getEraseDefineButton() {\n\t\treturn defineButtonBar.getEraseButton();\n\t}", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tclear();\r\n\t\t\t}", "public void paintIcon(Component c, Graphics g, int x, int y)\r\n/* 164: */ {\r\n/* 165:198 */ Graphics2D g2 = (Graphics2D)g;\r\n/* 166:199 */ AbstractButton rb = (AbstractButton)c;\r\n/* 167:200 */ ButtonModel model = rb.getModel();\r\n/* 168:201 */ boolean paintFocus = ((model.isArmed()) && (!model.isPressed())) || ((rb.hasFocus()) && (PlasticXPIconFactory.isBlank(rb.getText())));\r\n/* 169: */ \r\n/* 170: */ \r\n/* 171:204 */ RenderingHints.Key key = RenderingHints.KEY_ANTIALIASING;\r\n/* 172:205 */ Object newAAHint = RenderingHints.VALUE_ANTIALIAS_ON;\r\n/* 173:206 */ Object oldAAHint = g2.getRenderingHint(key);\r\n/* 174:207 */ if (newAAHint != oldAAHint) {\r\n/* 175:208 */ g2.setRenderingHint(key, newAAHint);\r\n/* 176: */ } else {\r\n/* 177:210 */ oldAAHint = null;\r\n/* 178: */ }\r\n/* 179:213 */ drawFill(g2, model.isPressed(), x, y, SIZE - 1, SIZE - 1);\r\n/* 180:214 */ if (paintFocus) {\r\n/* 181:215 */ drawFocus(g2, x + 1, y + 1, SIZE - 3, SIZE - 3);\r\n/* 182: */ }\r\n/* 183:217 */ if (model.isSelected()) {\r\n/* 184:218 */ drawCheck(g2, c, model.isEnabled(), x + 4, y + 4, SIZE - 8, SIZE - 8);\r\n/* 185: */ }\r\n/* 186:220 */ drawBorder(g2, model.isEnabled(), x, y, SIZE - 1, SIZE - 1);\r\n/* 187:222 */ if (oldAAHint != null) {\r\n/* 188:223 */ g2.setRenderingHint(key, oldAAHint);\r\n/* 189: */ }\r\n/* 190: */ }", "private JButton createResetButton() {\r\n reset = new JButton();\r\n reset.setBounds(110, 260, 100, 25);\r\n\r\n add(new SComponent(reset,\r\n new String[] {\"Reset\", \"Reset\"},\r\n new String[] {\"Stellt die Farbeinstellungen \"\r\n + \"wieder her, die beim Öffnen des \"\r\n + \"Fensters ausgewählt waren.\",\r\n \"Reloads the color settings that\"\r\n + \" was used when opening the\"\r\n + \" dialog.\"}));\r\n\r\n reset.addActionListener(new ActionListener() {\r\n\r\n /** Lädt die gesicherten Einstellungen in das Panel\r\n * und zeichnet den Graphen wieder mit den ursprünglichen\r\n * Einstellungen.\r\n *\r\n * @param e ActionEvent\r\n */\r\n public void actionPerformed(final ActionEvent e) {\r\n drawer.setColorSettings(colors);\r\n setColorSelection();\r\n\r\n /*GAModel gam = mainclass.getModel();\r\n if (gam.getGraphComponentState()\r\n == GAModel.COMPONENT_VALID) {\r\n gam.setGraphComponentState(GAModel.COMPONENT_OUTDATED);\r\n }*/\r\n mainclass.repaint();\r\n }\r\n });\r\n\r\n return reset;\r\n }", "public void clearClicked(View sender) {\n gameOver = false;\n int count = 0;\n while (count < this.answerLayout.getChildCount()) {\n ImageView iv = (ImageView) this.answerLayout.getChildAt(count);\n this.answerLayout.removeView(iv);\n this.imageLayout.addView(iv);\n }\n this.convertAnswerString();\n this.shuffleClick(null);\n }", "private void updateButtonImage() {\n\t\tif(fb.isSessionValid())\n\t\t{\n\t\t\tbutton.setImageResource(R.drawable.logout_button);\n\t\t}\n\t\telse\n\t\t\t\n\t\t{\n\t\t\tbutton.setImageResource(R.drawable.login_button);\n\t\t}\n\t}", "@Override\n\tpublic Button getEraseFunctionButton() {\n\t\treturn functionButtonBar.getEraseButton();\n\t}", "@Override\n public JButton get_default_button()\n {\n return BT_OK;\n }", "public void showButtonIcon( boolean b ) {\n if ( b ) {\n URL url = getClass().getClassLoader().getResource( \"images/Play16.gif\" );\n Icon icon = null;\n if ( url != null )\n icon = new ImageIcon( url );\n _run_btn.setIcon( icon );\n\n url = getClass().getClassLoader().getResource( \"images/Zoom16.gif\" );\n icon = null;\n if ( url != null )\n icon = new ImageIcon( url );\n _trace_btn.setIcon( icon );\n\n url = getClass().getClassLoader().getResource( \"images/Edit16.gif\" );\n icon = null;\n if ( url != null )\n icon = new ImageIcon( url );\n _edit_btn.setIcon( icon );\n\n url = getClass().getClassLoader().getResource( \"images/Information16.gif\" );\n icon = null;\n if ( url != null )\n icon = new ImageIcon( url );\n _props_btn.setIcon( icon );\n\n url = getClass().getClassLoader().getResource( \"images/Properties16.gif\" );\n icon = null;\n if ( url != null )\n icon = new ImageIcon( url );\n _options_btn.setIcon( icon );\n\n url = getClass().getClassLoader().getResource( \"images/Refresh16.gif\" );\n icon = null;\n if ( url != null )\n icon = new ImageIcon( url );\n _reload_btn.setIcon( icon );\n }\n else {\n _run_btn.setIcon( null );\n _trace_btn.setIcon( null );\n _edit_btn.setIcon( null );\n _props_btn.setIcon( null );\n _options_btn.setIcon( null );\n _reload_btn.setIcon( null );\n }\n }", "public instructionButton()\n {\n getImage().scale(getImage().getWidth()/10, getImage().getHeight()/10);\n }", "public Button createDeleteButtonWithGraphic() {\n ImageView deleteSign = new ImageView(new Image(\"delete-1-icon.png\"));\n deleteSign.setFitHeight(20);\n deleteSign.setPreserveRatio(true);\n deleteSign.setSmooth(true);\n\n Button delButton = new Button();\n delButton.setGraphic(deleteSign);\n delButton.setTooltip(new Tooltip(\"Delete the Row\"));\n return delButton;\n }", "public void clear()\n {\n clear(BLACK);\n }", "protected void clear(Graphics g) {\n super.paintComponent(g);\n }", "public void clear() throws OmDeveloperException\n \t{\n \t\t// Load image if needed\n \t\tif(isPropertySet(PROPERTY_FILEPATH) &&\n \t\t\t(!getQuestion().isFixedColour() || getBoolean(PROPERTY_REQUIREBG)))\n \t\t{\n \t\t\tif(biBackground!=null)\n \t\t\t{\n \t\t\t\tgetImage().setData(biBackground.getRaster());\n \t\t\t}\n \t\t\telse\n \t\t\t{\n \t\t\t\t// Fill to background\n \t\t\t\tGraphics g=getImage().getGraphics();\n \t\t\t\tg.setColor(getBackground());\n \t\t\t\tg.fillRect(0,0,bi.getWidth(),bi.getHeight());\n \n \t\t\t\t// Load file into it\n \t\t\t\ttry\n \t\t\t\t{\n \t\t\t\t\tbyte[] abData=getQuestion().loadResource(getString(PROPERTY_FILEPATH));\n \t\t\t\t\tBufferedImage loadedImage=ImageIO.read(new ByteArrayInputStream(abData));\n \t\t\t\t\tgetGraphics().drawImage(loadedImage,0,0,null);\n \t\t\t\t}\n \t\t\t\tcatch(IOException ioe)\n \t\t\t\t{\n \t\t\t\t\tthrow new OmDeveloperException(\"Failed to load image: \"+getString(PROPERTY_FILEPATH),ioe);\n \t\t\t\t}\n \n \t\t\t\t// Cache\n \t\t\t\tbiBackground=new BufferedImage(getImage().getWidth(),getImage().getHeight(),\n \t\t\t\t\tBufferedImage.TYPE_INT_RGB);\n \t\t\t\tbiBackground.setData(getImage().getRaster());\n \t\t\t}\n \t\t}\n \t\telse\n \t\t{\n \t\t\t// Fill to background\n \t\t\tGraphics g=getImage().getGraphics();\n \t\t\tg.setColor(getBackground());\n \t\t\tg.fillRect(0,0,bi.getWidth(),bi.getHeight());\n \t\t}\n \n \t\tbChanged=true;\n \t}", "public JButton getbtnViewAnswerImage() {\r\n\t\treturn btnViewAnswerImage;\r\n\t}", "public static ImageIcon getEmptyCardIcon() {\n\t\treturn new ImageIcon(Card.class.getResource(Constants.IMAGES_FOLDER + \"/\" + \"empty_card.png\"));\n\t}", "@Override\r\n public void onClick(View arg0) {\n popWindow.setVisibility(View.INVISIBLE);\r\n mBottomBar.setVisibility(View.VISIBLE);\r\n mEditLayout.setVisibility(View.INVISIBLE);\r\n mFaceEditor.updateImage(false);\r\n\r\n mImgView.setImageBitmap(null);\r\n mImgView.setImageBitmap(mFaceEditor.getDisplayImage());\r\n\r\n\r\n }", "public ImageButton(Action action, Icon normal) {\n\t\tthis(new InnerMouseHoverAwareAction(action, normal, null, null));\n\t}" ]
[ "0.69703096", "0.6643163", "0.65423733", "0.64930284", "0.6414319", "0.6377092", "0.6372593", "0.6293062", "0.62712276", "0.6258072", "0.62312096", "0.6160257", "0.612617", "0.6076799", "0.6037418", "0.6016164", "0.598814", "0.5987893", "0.59775585", "0.5943667", "0.5917551", "0.58869654", "0.5868525", "0.5865102", "0.58469206", "0.5832474", "0.58043015", "0.5784043", "0.57787013", "0.57780164", "0.5775817", "0.576507", "0.57575583", "0.57555926", "0.575546", "0.5739258", "0.5737665", "0.5724264", "0.5719155", "0.57086784", "0.57052815", "0.570479", "0.5702776", "0.5690679", "0.56677175", "0.5666678", "0.56630176", "0.5650561", "0.56502885", "0.5646377", "0.5643862", "0.56407464", "0.56395584", "0.5634379", "0.5615134", "0.5609127", "0.5599432", "0.55979073", "0.55824536", "0.55735826", "0.55711395", "0.5556916", "0.5552766", "0.5550696", "0.5549379", "0.5548739", "0.5546257", "0.55329806", "0.5528959", "0.5524215", "0.552229", "0.55148196", "0.54979557", "0.54935765", "0.5492816", "0.5488222", "0.5485075", "0.54631627", "0.54610145", "0.5454979", "0.5445809", "0.544396", "0.5438999", "0.54364246", "0.54362583", "0.54362434", "0.54344887", "0.54336745", "0.5428419", "0.5422397", "0.54100305", "0.54094356", "0.54061913", "0.54045016", "0.5403904", "0.53879166", "0.5386582", "0.53756917", "0.53692156", "0.5364798" ]
0.7428202
0
Override the clear listener like what should happen when the X is pressed
public void setOnClearListener(final OnClearListener clearListener) { this.onClearListener = clearListener; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tclear();\r\n\t\t\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n clear();\n\n }", "void onSwipedClear();", "protected void ACTION_ON_CLEAR(ActionEvent arg0) {\n\t\ttextArea_1.setText(\"\");\r\n\t}", "public void clearPressed() {\n PresentationCtrl.getInstance().clearHistory();\n refreshPressed();\n }", "@Override\n protected void onCleared() {\n }", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tthis.jmf.btnClear_actionPerformed(e);\n\t}", "@Override\n public void clear() {\n view.setText(\"\");\n view.setSelection(view.getText().length());\n }", "private void clearValue(Event e)\n\t{\n\t\tif (e.getSource() == btnClear) \n\t\t{\n\t\t tfNum1.setText(\"\");\n\t\t tfNum2.setText(\"\");\n\t\t FinalAnswer.setText(\"\");\n\t\t FileMenu.setValue(\"\");\n\t\t tfNum1.requestFocus();\n\t\t return;\n\t\t}\n\t}", "@Override\n public void clearSymbolMatchedListener() {\n symbolListener = null;\n }", "@CallSuper\n protected void clear() {\n EventListener eventListener = mUseCaseConfig.getUseCaseEventListener(null);\n if (eventListener != null) {\n eventListener.onUnbind();\n }\n\n mListeners.clear();\n }", "@Override\r\n\tpublic void resetObjectListener(ActionEvent e) {\n\t\t\r\n\t}", "@Override // androidx.lifecycle.ViewModel\n public void onCleared() {\n super.onCleared();\n this.f89534b = null;\n }", "public static void clear() {\n\t\tmouseDelta.set(0, 0);\r\n\t\tmouseDeltaNorm.set(0, 0);\r\n\t\tmouseScrollDirection = 0;\r\n\t\t\r\n\t\tfor (int i = 0; i < keys.length; i++) {\r\n\t\t\tkeys[i] = false;\r\n\t\t}\r\n\t\t\r\n\t\tfor (int i = 0; i < buttonsClicked.length; i++) {\r\n\t\t\tbuttonsClicked[i] = false;\r\n\t\t}\r\n\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\tclear_mousePressed();\n\t\t}", "@FXML\n\tprivate void onClearClicked(){\n\t\ttextArea.clear();\n\t}", "protected void clearOnClickListener() {\n itemView.setOnClickListener(null);\n }", "@Override\n\tpublic void clear() {\n\n\t\tDisplay.findDisplay(uiThread).syncExec(new Runnable() {\n\n\t\t\tpublic void run() {\n\t\t\t\tclearInputs();\n\t\t\t\tsetDefaultValues();\n\t\t\t}\n\t\t});\n\n\t}", "@Override\n public void clearNonSymbolMatchedListener() {\n nonSymbolListener = null;\n }", "public void clickClear2(View v) {\r\n\t\t\r\n\t\tport.setText(\"\");\r\n\t}", "protected void onReset() {\n // Do nothing.\n }", "public void actionPerformed(ActionEvent ev){\r\n\t\t\t//clear out the card list and clear out the text area\r\n\t\t\t\r\n\t\t\tcardList.clear();\r\n\t\t\tclearCard();\r\n\t\t}", "@Override\n public boolean onTouch(View v, MotionEvent event) {\n sv.clearCanvas();\n\n return true;\n }", "@Override\n public void clear() {\n \n }", "public abstract void onReset();", "public void clearCommand(){\n up = false;\n left = false;\n right = false;\n }", "@Override\n public void onDestroyActionMode(ActionMode mode) {\n \tmSelection.clearSelection();\n }", "@Override\n public void clear() //Modify to take in Authenication ID for future logging function\n {\n super.clear();\n comboBoxModelSelectedItem = null;\n modelListenersNotify();\n }", "private void clearButtonActionPerformed(ActionEvent evt) {\r\n\t\tlogger.info(\"Clear button Clicked.\");\r\n\t\tinputTextField.setText(\"\");\r\n\t\toutputScoreTextArea.setText(\"\");\r\n\t}", "void onDataCleared();", "@Override public void clear() {\n }", "public void reset() {\n events.clear();\n }", "@Override\r\n\tpublic void keyReleased(KeyEvent arg0) {\n\t\tcdx = 0;\r\n\t}", "@Override\n public void clear() {\n super.clear();\n }", "@Override\n\t\tpublic void actionPerformed(ActionEvent e)\n\t\t{\n\t\t\tchatArea.setText(\"\");\n\t\t}", "@Override\n protected void clear() {\n\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\ttry {\n\t\t\t\t\ttextArea.getDocument().remove(0,\n\t\t\t\t\t\t\ttextArea.getDocument().getLength());\n\t\t\t\t\tstandardOut.println(\"Text area cleared\");\n\t\t\t\t} catch (BadLocationException ex) {\n\t\t\t\t\tex.printStackTrace();\n\t\t\t\t}\n\t\t\t}", "public void clear() throws ChangeVetoException;", "void clearSelection();", "void unsetKeyBox();", "@Override\n public void clear()\n {\n\n }", "@FXML\n\tprivate void fieldSelectedAction(MouseEvent clickEvent) {\t\t\n\t\t\n\t\t((TextField)clickEvent.getSource()).clear();\n\t}", "public void clear() {\n super.clear();\n locationToWidget.clear();\n widgetToCaptionWrapper.clear();\n }", "void unsetEvent();", "@Override\n public void clear()\n {\n }", "void onItemClear();", "void onItemClear();", "void removeFocus();", "@Override\n public void windowDeiconified( WindowEvent arg0 )\n {\n\n }", "@Override\n public void windowDeiconified( WindowEvent arg0 )\n {\n\n }", "@Override\n\tpublic void onClearCarpet()\n\t{\n\t\t\n\t}", "@Override\n\tpublic void clear() {\n\t\t\n\t}", "@Override\n\tpublic void clear() {\n\t\t\n\t}", "@Override\n\tpublic void clear() {\n\t\t\n\t}", "@Override\n\tpublic void clear() {\n\t\t\n\t}", "@Override\n\tpublic void clear() {\n\t\t\n\t}", "@Override\n\tpublic void clear() {\n\t\t\n\t}", "@Override\n\tpublic void clear() {\n\t\t\n\t}", "protected void onReset() {\n\t\t\n\t}", "public void actionPerformed(ActionEvent event) {\n\t\t\tcardList.clear();\n\t\t\tclearCard();\n\t\t}", "@Override\n\tvoid clear() {\n\n\t}", "void onCancel(int key);", "public void clear(){\n this.clearing = true;\n }", "public void setClearEnabled() {\n clearIsEnabled = true;\n }", "void clear() {\n\t\tdispose();\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent ae){\n\t\treset();\n\t}", "@Override\n\tprotected void cmdClearWidgetSelected() {\n\t\tclearMode();\n\n\t}", "public void mouseClicked(MouseEvent e){\r\n \t input[num].setText(\"\");\r\n \t}", "@Override\r\n\tpublic void clearEventHandlers() {\n\t\t\r\n\t}", "private void fixClearFieldsButtonListener() {\n\t\tclearButton.addActionListener(new ActionListener() {\n\t\t\t\t@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\tclearFields();\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}", "@Override\n\t\t\tpublic void clicked(InputEvent event, float x, float y) {\n\t\t\t\tsuper.clicked(event, x, y);\n\t\t\t\tdialog.remove();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}", "void clearAndNotify();", "void onReset()\n {\n }", "@Override\r\n public void clear() {\r\n super.clear();\r\n this.commandArgs = null;\r\n this.command = null;\r\n this.notifys = null;\r\n this.ctx = null;\r\n }", "@Override\n\tpublic void clear() {\n\n\t}", "@Override\r\n public void onEscapeEvent() {\r\n Hub.getMainWindow().removeWindowListener(cancelOnFocusLost);\r\n openModelsCombo.removeActionListener(onSelectModel);\r\n openModelsCombo.removeAllItems();\r\n templatesCombo.removeActionListener(onSelectTemplate);\r\n templatesCombo.removeAllItems();\r\n canvas.setUIInteraction(false);\r\n setVisible(false);\r\n }", "public void clear(){\n instructions.clear();\n super.repaint();\n }", "@Override\n\tpublic void clear() {\n\t}", "public void onClear(View v) {\r\n /* Clears all selected radio buttons to default */\r\n radioGroup.clearCheck();\r\n }", "@Override\n public boolean onKeyPreIme(int keyCode, KeyEvent event) {\n if (keyCode == KEYCODE_BACK) clearFocus();\n return super.onKeyPreIme(keyCode, event);\n }", "private void clearBtnMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_clearBtnMousePressed\n clearBtn.setBackground(Color.decode(\"#1e5837\"));\n }", "@Override\n\t\t\tpublic boolean onKey(View v, int keyCode, KeyEvent event) {\n\t\t\t\tif(keyCode==KeyEvent.KEYCODE_DEL)\n\t\t\t\t\tcustSelect.setText(\"\");\n\t\t\t\treturn false;\n\t\t\t}", "void clearButton_actionPerformed(ActionEvent e) {\n clearPlot(true);\n }", "@Override\r\n\tpublic void clear() {\n\r\n\t}", "void clearIsChanged();", "@Override\r\n\tpublic void clear() {\n\t\t\r\n\t}", "@Override\n\t\t\tpublic boolean onTouch(View v, MotionEvent event) {\n\t\t\t\t\n\t\t\t\tmRedrawHandler.remove();\n\t\t\t\tfood.setText(null);\n\t\t\t\tqantity.setText(null);\n\t\t\t\tpoints.setText(\"0\");\n\t\t\t\treturn false;\n\t\t\t}", "private void clearBtnMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_clearBtnMouseReleased\n clearBtn.setBackground(Color.decode(\"#4fc482\"));\n }", "void positionCleared();", "public void clearAll()\n\t{\n\t\tClearMarks();\n\t\tpop = null;\n\t\tpopSequence = null;\n\t\ti1.killRoi();\n\t\tic.removeMouseListener(this);\n\t\tic.removeKeyListener(this);\n\t\tStackWindow sw1 = new StackWindow(i1, ic);\n\t\ti1.setWindow(sw1);\n\t\tdispose();\n\t}", "public void clear()\r\n {\r\n super.clear();\r\n }", "private void onClickReset(ActionEvent e) {\n\n }", "private void clear() {\n }", "private void clear() {\n\t\tSystem.out.println(\"Calling clear\");\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tROOM.setSelectedItem(\"\");\n\t\t\t\ttxtrent.setText(\"\");\n\t\t\t\ttxtSeat.setText(\"\");\n\t\t\t\tgrp.clearSelection();\n\t\t\t}", "void clearEventsDetectors();", "public void actionPerformed(ActionEvent e) {\n\t\t\treplaceSelection(\"\");\n\t\t}", "public void clear(View v) {\n myFingerPainterView.clearCanvas();\n }", "@Override\n\tpublic void ClearHandler() {\n\t\teventHandlers.clear();\n\t\t\n\t}", "private void uninstall()\r\n {\r\n // do not listen to any other key strokes\r\n editor.getViewer().removeVerifyKeyListener(this);\r\n\r\n editor.getViewer().getTextWidget().removeFocusListener(this);\r\n\r\n editor.setStatusMessage(\"\");\r\n }", "void clear() ;" ]
[ "0.7454572", "0.7421146", "0.70146984", "0.6982818", "0.6905737", "0.67842776", "0.66701657", "0.6588089", "0.65875596", "0.65813136", "0.6580684", "0.6579089", "0.65769714", "0.6573286", "0.65561765", "0.654041", "0.65328616", "0.6514183", "0.6496575", "0.64924854", "0.64894044", "0.6415539", "0.63991165", "0.6371355", "0.63597995", "0.6352632", "0.6343052", "0.63352084", "0.63174695", "0.6313272", "0.62929964", "0.62832385", "0.62755704", "0.6259704", "0.625822", "0.62580246", "0.6255925", "0.62522787", "0.6249719", "0.6242886", "0.6221255", "0.6214043", "0.62077236", "0.6205226", "0.62020695", "0.6199297", "0.6199297", "0.6192594", "0.6192326", "0.6192326", "0.61887485", "0.61808956", "0.61808956", "0.61808956", "0.61808956", "0.61808956", "0.61808956", "0.61808956", "0.61805", "0.6178257", "0.61747104", "0.6171747", "0.61692363", "0.61690176", "0.61656946", "0.6165264", "0.61604244", "0.6159419", "0.6157624", "0.6153425", "0.614065", "0.6140425", "0.61398923", "0.61377764", "0.6127131", "0.61225003", "0.6115218", "0.6115207", "0.61137366", "0.6113617", "0.61117303", "0.61104244", "0.61041343", "0.6102691", "0.60998964", "0.6097674", "0.60953057", "0.6092117", "0.6085617", "0.6078256", "0.6075729", "0.6073783", "0.60710764", "0.6058825", "0.6056412", "0.60561484", "0.60540986", "0.60461116", "0.6040305", "0.6037517", "0.6034923" ]
0.0
-1
Show the the clear button
public void showClearButton(boolean value) { enableClearButton(value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void addClearButton() {\n\t\t// make the \"clear\" button\n\t\tclearButton = new JButton(\"Clear\");\n\t\tadd (clearButton, SOUTH);\n\t\tclearButton.addActionListener(this);\n\t}", "private void clearBtnMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_clearBtnMouseClicked\n clearFields();\n //by Default hide Update button\n deleteBtn.setVisible(false);\n\n }", "private void btClearActionPerformed(java.awt.event.ActionEvent evt) {\n if(tbphieuphat.isEnabled())\n txMaPM.setText(\"\");\n /*if(EditOrSearch==0){\n tf.setText(\"\");\n txSoLuongMax.setText(\"\");\n txDonGiaMax.setText(\"\");\n }*/\n txMaPM.setText(\"\");\n txTongTien.setText(\"\");\n }", "public void clear() {\n lb.setText(\"\");\n }", "public void setClearEnabled() {\n clearIsEnabled = true;\n }", "private void toClear()\n {\n tfPaintId.setText(\"\");\n tfName.setText(\"\");\n tfPrice.setText(\"\");\n tfColor.setText(\"\");\n rwCombo.setSelectedIndex(0);\n bCombo.setSelectedIndex(0);\n typeCombo.setSelectedIndex(0);\n tfQuantity.setText(\"\");\n bg.clearSelection();\n \n }", "@Override\n public void actionPerformed(ActionEvent e) {\n clear();\n\n }", "private void getClearButtonSemantics() {\n //TODO implement method\n searchView.getSearchValueTextField().setText(\"\");\n searchView.getFieldComboBox().setSelectedIndex(-1);\n searchView.getResultsTextArea().setText(\"\");\n searchView.getSearchValueTextField().requestFocus();\n }", "private void clear() {\n\t\ttxtId.setText(\"\");\n\t\ttxtAlert.setText(\"\");\n\t\ttxtNbMax.setText(\"\");\n\t\t\n\t}", "public void updateBtnClearSearchView() {\n this.mBtnClearSearchView.setVisibility(this.mEdtSearch.getText().length() > 0 ? 0 : 8);\n }", "private void ClearForm() {\n supplierName.setText(\"\");\n supplierDiscription.setText(\"\");\n }", "public void clearBtn(View view){\n formula.editText(\"$$ $$\", 3);\r\n //formula.cursPosition = 3;\r\n refresh();\r\n\r\n }", "public void clear()\n\t\t{\n\t\t\ttxtCustomerName.setText(\"\");\n\t\t\ttxtAddress.setText(\"\");\n\t\t\ttxtContact.setText(\"\");\n\t\t\ttxtProduct.setText(\"\");\n\t\t\ttxtSerialNo.setText(\"\");\n\t\t\ttxtModuleNo.setText(\"\");\n\t\t\ttxtComplaintNo.setText(\"\");\n\t\t\tCategorycomboBox.setSelectedItem(\"Sent\");\n\t\t}", "@FXML\r\n private void clearScreen() {\n if(flag==1)txtDisplay.setText(\"\");\r\n }", "protected void ACTION_ON_CLEAR(ActionEvent arg0) {\n\t\ttextArea_1.setText(\"\");\r\n\t}", "public JButton getClearBox() {\n\t\treturn clearBox;\n\t}", "void txtClear () {\r\n\r\n\t\ttxtNo.setText (\"\");\r\n\t\ttxtName.setText (\"\");\r\n\t\ttxtDeposit.setText (\"\");\r\n\t\ttxtNo.requestFocus ();\r\n\r\n\t}", "public void onClickClear(View view) {\n textView.setText(\" \");\n }", "public void clearButton(ActionEvent event) {\n\t\t//Sets the fields to blank\n\t\tnameField.setText(\"\");\n\t\tdescriptionField.setText(\"\");\n\t\t\n\t\t//Clears the selected values on the drop downs\n\t\tmakeDropDowns();\n\n\t\t//Removes all checks in the check boxes\n\t\tmondayCheck.setSelected(false);\n\t\ttuesdayCheck.setSelected(false);\n\t\twednesdayCheck.setSelected(false);\n\t\tthursdayCheck.setSelected(false);\n\t\tfridayCheck.setSelected(false);\n\t\tsaturdayCheck.setSelected(false);\n\t\tsundayCheck.setSelected(false);\n\t}", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tclear();\r\n\t\t\t}", "public void text_clear()\n {\n C_ID.setText(\"\");\n C_Name.setText(\"\");\n C_NIC.setText(\"\");\n C_P_Id.setText(\"\");\n C_P_Name.setText(\"\");\n C_Address.setText(\"\");\n C_TelNo.setText(\"\");\n C_Age.setText(\"\");\n }", "private void clear() {\r\n\t\tareaTexto.setText(\"\");\r\n\t}", "private void clearButtonActionPerformed(ActionEvent evt) {\r\n\t\tlogger.info(\"Clear button Clicked.\");\r\n\t\tinputTextField.setText(\"\");\r\n\t\toutputScoreTextArea.setText(\"\");\r\n\t}", "public void buttonClear(View v) {\n expression = \"\";\n\n TextView expressionText = (TextView) findViewById(R.id.expressionText);\n expressionText.setText(expression);\n\n EditText calculatorInput = (EditText) findViewById(R.id.calculatorInput);\n calculatorInput.setText(\"\");\n }", "public void ClearAdd(){\n \n PID.setText(\"\");\n MN.setText(\"\");\n PN.setText(\"\");\n price.setText(\"\");\n category.setSelectedIndex(0);\n buttonGroup1.clearSelection();\n }", "private void Clear() {\n AAccLevel_AdEdRe_TextF_AccLevelID.setText(\"\");\n AAccLevel_AdEdRe_TextF_AccLevelName.setText(\"\");\n AAccLevel_AdEdRe_TextA_Discription.setText(\"\");\n }", "private void btnclearActionPerformed(java.awt.event.ActionEvent evt) {\n try\n {\n clearForm();\n }\n catch(Exception e)\n {\n e.printStackTrace();\n }\n }", "public void clear()\n\t{\n\t\treadout.setText(\"\");\n\t\ttxtArea.setText(\"\");\n\t}", "private void butClearActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_butClearActionPerformed\n radDum.setSelected(true);\n radDum2.setSelected(true);\n tfBookID.setText(\"\");\n tfBorrowerID.setText(\"\");\n tfDate.setText(\"\");\n scrollPane.setViewportView(null);\n }", "public void clearButtonClick (ActionEvent e) {\r\n\t\tSearchDate1.setText(\"\");\r\n\t\tSearchDate2.setText(\"\");\r\n\t\tLat1.setText(\"\");\r\n\t\tLat2.setText(\"\");\r\n\t\tLon1.setText(\"\");\r\n\t\tLon2.setText(\"\");\r\n\t\tDepth1.setText(\"\");\r\n\t\tDepth2.setText(\"\");\r\n\t\tMag1.setText(\"\");\r\n\t\tMag2.setText(\"\");\r\n\t\tMagType.setText(\"\");\r\n\t\tPlace.setText(\"\");\r\n\t\tStatus.setText(\"\");\r\n\t\tReportArea.setText(\"\");\r\n\t\tquakes.clear();\r\n\t\treportList.clear();\r\n\t}", "@Override\n public void clear() {\n view.setText(\"\");\n view.setSelection(view.getText().length());\n }", "private void clear() {\n\t\tmRegister.setText(\"\");\n\t\tmName.setText(\"\");\n\t\tmUsername.setText(\"\");\n\t\tmPassword.setText(\"\");\n\t\tmPhone.setText(\"\");\n\t\tmEmail.setText(\"\");\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tthis.jmf.btnClear_actionPerformed(e);\n\t}", "private void clearButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_clearButtonActionPerformed\n textArea.setText(null);\n }", "private void clearField(){\n passwordField.setText(\"\");\n mailField.setText(\"\");\n stateImg.setImage( crossImg);\n stateImg.setVisible(false);\n\n }", "public void clear()\r\n {\r\n \tdisplayUserInput = \" \";\r\n \t\r\n }", "@FXML\n\tprivate void onClearClicked(){\n\t\ttextArea.clear();\n\t}", "private void clear() {//将文本框等状态置零\n\t\tusername.setText(\"\");\n\t\tpass.setText(\"\");\n\t\tname.setText(\"\");\n\t\tsex1.setSelected(true);\n\t\ttel.setText(\"\");\n\t\taddr.setText(\"\");\n\t\trole.setSelectedIndex(0);\n\t\tusername.grabFocus();\n\t}", "private void actionClear() {\n\t\tclearing = true;\n\t\ttableModel.clearDownload(table.getSelectedRow());\n\t\tclearing = false;\n\t\tselectedDownload = null;\n\t\tupdateButtons();\n\t}", "private void btnClearActionPerformed(java.awt.event.ActionEvent evt) {\n txtSentence.setText(\"\");\n Result.setText(\"\");\n Vowel.setSelected(false);\n Notvowel.setSelected(false);\n V3.setSelected(false);\n }", "@Override\n\tpublic void clearForm() {\n\n\t\ttxtStockCenterName.setText(\"\");\n\t\trdBtnPreferredNo.setSelection(true);\n\t\trdBtnPreferredYes.setSelection(false);\n\n\t\t// clear the text fields\n\t\ttxtPharmacyName.setText(\"\");\n\t\ttxtStreetAdd.setText(\"\");\n\t\ttxtCity.setText(\"\");\n\t\ttxtTel.setText(\"\");\n\t\ttxtPharmacistName1.setText(\"\");\n\t\ttxtPharmacyAssistant.setText(\"\");\n\t\tlblCanvasPharmName.setText(\"Facility Name\");\n\t\tlblCanvasPharmacist.setText(\"Pharmacist\");\n\t\tlblCanvasAddress.setText(\"Physical Address\");\n\n\t\tfieldsChanged = false;\n\t\tenableFields();\n\n\t}", "private void bLimparClick() {\n tfValor1.setText(\"\");\n tfValor2.setText(\"\");\n //this.setVisible(false);\n }", "public void clear()\n\t{\n\t\tstatus.setTextFill(BLACK);\n\t\tstatus.setText(\"awaiting input...\");\n\t\tusername.setText(\"\");\n\t\taddress.setText(\"\");\n\t\tport.setText(\"\");\n\t}", "@FXML\n public void clear() {\n }", "@FXML\n public void clear() {\n }", "@Override\n\tpublic void clearForm() {\n\t\t\n\t}", "private void clearAll(){\n txtBox.setText(\"\");\n calc.setNum1(0);\n calc.setNum2(0);\n calc.setOperator('0');\n operatorPressed = false;\n initialised = false;\n equals = false;\n }", "@Override\n\tpublic void clear() {\n\n\t\tDisplay.findDisplay(uiThread).syncExec(new Runnable() {\n\n\t\t\tpublic void run() {\n\t\t\t\tclearInputs();\n\t\t\t\tsetDefaultValues();\n\t\t\t}\n\t\t});\n\n\t}", "public void getClearButtonSemantics() {\r\n JTextField bodyTextField = addTweet.getBodyTextField();\r\n bodyTextField.setText(\"\");\r\n bodyTextField.requestFocus();\r\n }", "public void clickClear2(View v) {\r\n\t\t\r\n\t\tport.setText(\"\");\r\n\t}", "public void clear()\r\n {\r\n throw new RuntimeException(\"Cannot modify the display data.\");\r\n }", "public void clear(){\n this.clearing = true;\n }", "@Override\n\tpublic void clear() {\n\t\t//if accumulate, clear accumulator stuff\n\t\tif(modeButtonGroup.getSelection() == AccumulatingModeButton.getModel()){\n\t\t\tamountTextField.setText(\"\");//set to blank on GUI\n\t\t\ttotalTextField.setText(\"\"); //blank (better than \"0\", which could be a total value.)\n\t\t\ttotal = 0;\n\t\t\tamountTextField.requestFocus(); // set cursor in.\n\t\t}\n\t\t\n\t\t//if expression clear expression stuff\n\t\tif(modeButtonGroup.getSelection() == ExpressionModeButton.getModel()){\n\t\t\texpTextField.setText(\"\");//set to blank on GUI\n\t\t\tforxTextField.setText(\"\");//blank\n\t\t\tresultTextField.setText(\"\"); //blank (better than \"0\", which could be a total value.)\n\t\t\texpTextField.requestFocus(); // set cursor in.\n\t\t}\n\t\t\t\n\t\t//reset error field\n\t\terrorTextField.setText(\"\");\n\t\terrorTextField.setBackground(Color.white);\n\t\t\t\n\t\treturn;\n\n\t}", "private JButton getClearButton() {\n\t\tif (ClearButton == null) {\n\t\t\tClearButton = new JButton();\n\t\t\tClearButton.setBounds(new Rectangle(240, 230, 80, 25));\n\t\t\tClearButton.setText(\"Clear\");\n\t\t\tClearButton.addActionListener(new ActionListener () {\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tNameTextField.setText(\"\");\n\t\t\t\t\tPasswordField.setText(\"\");\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\t\n\t\treturn ClearButton;\n\t}", "private void clear()\n\t{\n\t\tComponent[] comp = contentPanel.getComponents();\n\t\tfor(Component c:comp)\n\t\t{\n\t\t\tif(c instanceof JTextField)\n\t\t\t\t((JTextField)c).setText(\"\");\n\t\t}\n\t\t\n\t}", "private void showConfirmClearDialog() {\n AlertDialog.Builder dialog = new AlertDialog.Builder(getActivity());\n dialog.setTitle(res.getString(R.string.dialog_clear_sale));\n dialog.setPositiveButton(res.getString(R.string.no), new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n\n }\n });\n\n dialog.setNegativeButton(res.getString(R.string.clear), new DialogInterface.OnClickListener() {\n\n @Override\n public void onClick(DialogInterface dialog, int which) {\n register.cancleSale();\n update();\n }\n });\n\n dialog.show();\n }", "void clearButton_actionPerformed(ActionEvent e) {\n clearPlot(true);\n }", "private void actionClear() {\n layoutPanel.inhNList.clear();\n layoutPanel.activeNList.clear();\n layoutPanel.probedNList.clear();\n\n Graphics g = layoutPanel.getGraphics();\n layoutPanel.writeToGraphics(g);\n }", "private void clearHocSinh() {\n\t\ttxtMa.setText(\"\");\n\t\ttxtTen.setText(\"\");\n\t\ttxtTuoi.setText(\"\");\n\t\ttxtSdt.setText(\"\");\n\t\ttxtDiaChi.setText(\"\");\n\t\ttxtEmail.setText(\"\");\n\t}", "public void clear(){\n instructions.clear();\n super.repaint();\n }", "void btnClearPlanning();", "public void clear()\n{\n\ttextArea().setText(\"\");\n}", "private void clearTextBox(){\n txtBox.setText(\"\");\n }", "public void ClearActionPerformed(java.awt.event.ActionEvent evt) {\n drawingPanel.setPath(\"null\"); \r\n }", "public void buttonClearViewOnClick(View view){\n display.setText(\"\");\n operation= \"\";\n result = 0;\n}", "private void jbtn_resetActionPerformed(ActionEvent evt) {\n\t\t\t\ttxtblank();\n\t\t\t\t\n\t\t\t}", "void clear() {\n\t\tdispose();\n\t}", "public final void clearForm() {\n\t\tlb.addItem(\"\");\n\t\tlb.clear();\n\t}", "void clear() ;", "private void clearJButtonActionPerformed(ActionEvent event) {\n securityCodeJPasswordField.setText(\"\");\n\n }", "private void clearBtn1ActionPerformed(java.awt.event.ActionEvent evt) {\n modelTxt.setText(\"\");\n catCombo.setSelectedIndex(0);\n rentTxt.setText(\"\");\n }", "private void clearBtnMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_clearBtnMousePressed\n clearBtn.setBackground(Color.decode(\"#1e5837\"));\n }", "public void clearAnswer(){\r\n textField1.setText(\"\");\r\n }", "public void clear() {\n this.updateComment(\"\");\n this.mdlCtrlr.clearTable();\n this.repaint();\n }", "private void hideShowEmpty() {\n this.mEmpty.setVisibility(View.GONE);\n }", "private void clearEverything(){\n partTime.setSelected(false);\n fullTime.setSelected(false);\n management.setSelected(false);\n addIT.setSelected(false);\n addCS.setSelected(false);\n addECE.setSelected(false);\n dateAddText.clear();\n nameAddText.clear();\n hourlyAddText.clear();\n annualAddText.clear();\n managerRadio.setSelected(false);\n dHeadRadio.setSelected(false);\n directorRadio.setSelected(false);\n\n removeCS.setSelected(false);\n removeECE.setSelected(false);\n removeIT.setSelected(false);\n dateRemoveText.clear();\n nameRemoveText.clear();\n\n setCS.setSelected(false);\n setECE.setSelected(false);\n setIT.setSelected(false);\n dateSetText.clear();\n nameSetText.clear();\n hoursSetText.clear();\n\n }", "private void clearView() {\n\t\tif (this.viewer != null) {\n\t\t\tthis.viewer.getTable().clearAll();\n\t\t}\n\t\tif (this.iException != null) {\n\t\t\tthis.iException.setText(\"\");\n\t\t}\n\t\tif (this.iBrowser != null) {\n\t\t\tthis.iBrowser.setText(iNoHtmlLog);\n\t\t}\n\t}", "public void Clear(View v) {\r\n ClearAll();\r\n ControlsSetEnabled();\r\n\r\n }", "public String btn_cancel_delete_action()\n {\n //show and hidde panels\n this.getMainPanel().setRendered(true);\n this.getAlertMessage().setRendered(false);\n return null;\n }", "private void clearValue(Event e)\n\t{\n\t\tif (e.getSource() == btnClear) \n\t\t{\n\t\t tfNum1.setText(\"\");\n\t\t tfNum2.setText(\"\");\n\t\t FinalAnswer.setText(\"\");\n\t\t FileMenu.setValue(\"\");\n\t\t tfNum1.requestFocus();\n\t\t return;\n\t\t}\n\t}", "public void clear() {\n\t\tdestName.setText(\"\");\n\t\tedtTextZip.setText(\"\");\n\t\tedtTextMemos.setText(\"\");\n\t\tedtTextStreetAdress.setText(\"\");\n\t\tedtTextCity.setText(\"\");\n\t}", "public synchronized void clearMessage() {\n\t\tthis.commonTxtView.setText(\"\");\n\t}", "public void clear() {\n content = \"EMPTY\";\n }", "private void showEmpty() {\n MTool.Toast(getContext(), R.string.netNoGeilible);\n if (getVisibility() != VISIBLE) setVisibility(VISIBLE);\n resetEmptyImg(R.drawable.ic_no_net);\n if (mClick != null) {\n mTvEmpty.setText(R.string.noNetWork);\n mEmptyView.setOnClickListener(v -> mClick.handleOnCallBack());\n } else\n mTvEmpty.setText(R.string.noNetWorkB);\n mEmptyView.setVisibility(VISIBLE);\n }", "private void clearButtons()\n {\n // remove all saved search Buttons\n listTableLayout.removeAllViews();\n }", "private void clear() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "private void btn_clearitemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_clearitemActionPerformed\n //Code to remove only item detailsdsfsdf\n txt_iniId.setText(\"\");\n cbo_iniName.setSelectedItem(0);\n txt_inQty.setText(\"\");\n }", "public void ClearSearch(){\n \n SearchTF.setText(\"\");\n jComboBox1.setSelectedIndex(0);\n }", "public void clearPressed() {\n PresentationCtrl.getInstance().clearHistory();\n refreshPressed();\n }", "public STD_D_clearing1() {\n initComponents();\n }", "private void clear() {\n\t\tSystem.out.println(\"Calling clear\");\n\t}", "public static void clear(){\n System.out.print(\"\\033[H\\033[2J\");\n System.out.flush(); // flushes the stream\n }", "@SuppressWarnings(\"unchecked\")\n /**\n * Method: clearAll\n * Clear and set JTextFields visible\n * @parem void\n * @return void\n * pre-condition: JTextFields with certain information\n * post-condition: empty JTextFields\n */ \n private void clearAll()\n {\n //Clear and set JTextFields visible\n listModel.clear();\n employeeJComboBox.setSelectedIndex(0);\n enablePrint(false);\n }", "@Override\n public void display(AsciiPanel panel){\n panel.clear();\n panel.writeCenter(\"Qui est tu?\", 10);\n }", "@Override\n public void clear() {\n setSize(0);\n }", "private void clearxuan() {\n\t\tbtn_Fourgroup6_xuan_big.setBackgroundResource(0);\r\n\t\tbtn_Fourgroup6_xuan_little.setBackgroundResource(0);\r\n\t\tbtn_Fourgroup6_xuan_all.setBackgroundResource(0);\r\n\t\tbtn_Fourgroup6_xuan_odd.setBackgroundResource(0);\r\n\t\tbtn_Fourgroup6_xuan_even.setBackgroundResource(0);\r\n\t\tbtn_Fourgroup6_xuan_clear.setBackgroundResource(0);\r\n\t\tbtn_Fourgroup6_xuan_big.setTextColor(0xffcfcfcf);\r\n\t\tbtn_Fourgroup6_xuan_little.setTextColor(0xffcfcfcf);\r\n\t\tbtn_Fourgroup6_xuan_all.setTextColor(0xffcfcfcf);\r\n\t\tbtn_Fourgroup6_xuan_odd.setTextColor(0xffcfcfcf);\r\n\t\tbtn_Fourgroup6_xuan_even.setTextColor(0xffcfcfcf);\r\n\t\tbtn_Fourgroup6_xuan_clear.setTextColor(0xffcfcfcf);\r\n\r\n\t}", "private void clear() {\n\n machrefno.setText(null);\n machname.setText(null);\n manu.setSelectedItem(null);\n Date.setDate(null);\n dept.setSelectedItem(null);\n stat.setSelectedItem(null);\n \n }", "public void clear() {\n\t\tString cmd = null;\n\t\ttry {\n\t\t\tif (System.getProperty(\"os.name\").startsWith(\"Windows\"))\n\t\t\t\tcmd = \"cls\";\n\t\t\telse\n\t\t\t\tcmd = \"clear\";\n\t\t\tRuntime.getRuntime().exec(cmd);\n\t\t} catch (Exception ignore) {\n\t\t}\n\t}", "public void clear() {\n\t\ttextArea.setText(\"\");\n\t}", "public void clearScreen()\n {\n showText(\"\", 150, 175);\n List objects = getObjects(null);\n if(objects != null)\n {\n removeObjects(objects);\n }\n }" ]
[ "0.7281341", "0.7153933", "0.70720077", "0.69813", "0.69666994", "0.69527525", "0.69322324", "0.69154245", "0.6898574", "0.6844702", "0.68078226", "0.678894", "0.67814964", "0.6761605", "0.676109", "0.6759873", "0.6727138", "0.671524", "0.670989", "0.670347", "0.6686478", "0.66820014", "0.66785854", "0.66745955", "0.6674075", "0.66551834", "0.6649634", "0.6637261", "0.66240764", "0.66163445", "0.6614443", "0.6603047", "0.6599534", "0.65929", "0.65811896", "0.65467966", "0.65443087", "0.654216", "0.6540878", "0.65170217", "0.6506475", "0.6497715", "0.64918375", "0.64856476", "0.64856476", "0.6482485", "0.64732033", "0.6472951", "0.647019", "0.64605737", "0.64569366", "0.64545166", "0.64528507", "0.6452164", "0.64208466", "0.63979566", "0.6388229", "0.6381609", "0.63709", "0.6369001", "0.6360596", "0.63603485", "0.6358564", "0.6348079", "0.6337151", "0.631603", "0.6301798", "0.62993515", "0.62980247", "0.6288798", "0.62874407", "0.62645113", "0.62614584", "0.62611216", "0.62599504", "0.6251013", "0.6246528", "0.6244254", "0.62402743", "0.6232321", "0.62256634", "0.62230945", "0.6219238", "0.62187177", "0.62083614", "0.6207576", "0.6202773", "0.618755", "0.61842203", "0.6178348", "0.61780024", "0.6175953", "0.61748487", "0.6171457", "0.61692333", "0.6159338", "0.6147704", "0.6145643", "0.6133332", "0.61331326" ]
0.7359292
0
fun way to set adapters as layout attributes
private AbstractPlacesAutocompleteAdapter adapterForClass(final Context context, final String adapterClass) { Class<AbstractPlacesAutocompleteAdapter> adapterClazz; try { adapterClazz = (Class<AbstractPlacesAutocompleteAdapter>) Class.forName(adapterClass); } catch (ClassNotFoundException e) { throw new InflateException("Unable to find class for specified adapterClass: " + adapterClass, e); } catch (ClassCastException e) { throw new InflateException(adapterClass + " must inherit from " + AbstractPlacesAutocompleteAdapter.class.getSimpleName(), e); } Constructor<AbstractPlacesAutocompleteAdapter> adapterConstructor; try { adapterConstructor = adapterClazz.getConstructor(Context.class, PlacesApi.class, AutocompleteResultType.class, AutocompleteHistoryManager.class); } catch (NoSuchMethodException e) { throw new InflateException("Unable to find valid constructor with params " + Context.class.getSimpleName() + ", " + PlacesApi.class.getSimpleName() + ", " + AutocompleteResultType.class.getSimpleName() + ", and " + AutocompleteHistoryManager.class.getSimpleName() + " for specified adapterClass: " + adapterClass, e); } try { return adapterConstructor.newInstance(context, api, resultType, historyManager); } catch (InstantiationException e) { throw new InflateException("Unable to instantiate adapter with name " + adapterClass, e); } catch (IllegalAccessException e) { throw new InflateException("Unable to instantiate adapter with name " + adapterClass, e); } catch (InvocationTargetException e) { throw new InflateException("Unable to instantiate adapter with name " + adapterClass, e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "AttributeLayout createAttributeLayout();", "public void configs() {\n adaptadorRecyclerView = new AdaptadorRecyclerView(new ArrayList<>(), this);//configuramos el adaptador; necesitamos implementar interfaz OnItemClickListener y sobreescribir sus metodos\n recyclerView.setLayoutManager(new LinearLayoutManager(this));//configuramos la recyclerView\n recyclerView.setAdapter(adaptadorRecyclerView);\n }", "private void castLayoutElements() {\n linlaHeaderProgress = (LinearLayout) view.findViewById(R.id.linlaHeaderProgress);\n listPrinters = (RecyclerView) view.findViewById(R.id.listPrinters);\n linlaEmpty = (LinearLayout) view.findViewById(R.id.linlaEmpty);\n \n /* CONFIGURE THE RECYCLERVIEW */\n listPrinters.setHasFixedSize(true);\n LinearLayoutManager llm = new LinearLayoutManager(getActivity());\n llm.setOrientation(LinearLayoutManager.VERTICAL);\n listPrinters.setLayoutManager(llm);\n }", "private void setLayout() {\n if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) {\n recyclerView.setLayoutManager(new StaggeredGridLayoutManager(2, StaggeredGridLayoutManager.VERTICAL));\n\n } else if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT) {\n recyclerView.setLayoutManager(new LinearLayoutManager(getApplicationContext()));\n }\n }", "@Override\n public void onGlobalLayout() {\n\n if (!isFirstLayout) {\n isFirstLayout = true;\n ListAdapter adapter=new MeAdapter(getActivity(),gv.getHeight()/2,resIds,names);\n gv.setAdapter(adapter);\n\n }\n }", "protected abstract int getItemLayoutId();", "private void initAttributes(Context context, AttributeSet attrs, int defStyleAttr) {\n\n textSize *= DENSITY;\n itemMargin *= DENSITY;\n selectedIndex = -1;\n /**\n * Getting values of the attributes from the XML.\n * The default value of the attribute is retained if it is not set from the XML or setters.\n */\n if (attrs != null) {\n final TypedArray array = context.obtainStyledAttributes(attrs, R.styleable.HorizontalPicker, defStyleAttr, 0);\n backgroundSelector = array.getResourceId(R.styleable.HorizontalPicker_backgroundSelector, backgroundSelector);\n colorSelector = array.getResourceId(R.styleable.HorizontalPicker_textColorSelector, colorSelector);\n textSize = array.getDimensionPixelSize(R.styleable.HorizontalPicker_textSize, textSize);\n itemHeight = array.getDimensionPixelSize(R.styleable.HorizontalPicker_itemHeight, itemHeight);\n itemWidth = array.getDimensionPixelSize(R.styleable.HorizontalPicker_itemWidth, itemWidth);\n itemMargin = array.getDimensionPixelSize(R.styleable.HorizontalPicker_itemMargin, itemMargin);\n array.recycle();\n }\n\n }", "public interface LayoutConfiguration<T> {\n void AddElemsToTable(List<T> reportResults);\n void CustomSetTex(TextView[] txV, T periodResults);\n void CustomLayoutParams(TextView[] txV);\n}", "private void setAdaptersForDataToShow() {\n LinearLayoutManager linearLayoutManager_SectionOfDays = new LinearLayoutManager(this);\n linearLayoutManager_SectionOfDays.setOrientation(LinearLayoutManager.HORIZONTAL);\n recyclerView_sectionOfDays.setLayoutManager(linearLayoutManager_SectionOfDays);\n recyclerView_sectionOfDays.setAdapter(new SectionOfDays_RecyclerViewAdapter(this, daysArray, this));\n\n /**\n * Vertical Recycler View showing List Of Trains\n */\n LinearLayoutManager linearLayoutManager_ListOfTrains = new LinearLayoutManager(this);\n linearLayoutManager_ListOfTrains.setOrientation(LinearLayoutManager.VERTICAL);\n recyclerView_listOfTrains.setLayoutManager(linearLayoutManager_ListOfTrains);\n setAdapter_ListOfTrains_Vertical_RecyclerView(0);\n }", "@Override\n\tprotected void onLayout(boolean changed, int l, int t, int r, int b) {\n\t\tl = 0;\n\t\tt = 0;\n\t\tr = getWidth();\n\t\tb = getHeight();\n\n\t\tif (header != null) {\n\t\t\theader.layout(l, t, r, header.getMeasuredHeight());\n\t\t\titem.layout(l, header.getMeasuredHeight(), r, b);\n\t\t} else if (divider != null) {\n\t\t\tdivider.setBounds(l, t, r, dividerHeight);\n\t\t\titem.layout(l, dividerHeight, r, b);\n\t\t} else {\n\t\t\titem.layout(l, t, r, b);\n\t\t}\n\t}", "private void setupAllSpecialLayoutViews(){\n allSpecialLayoutViews = new ArrayList<>();\n allSpecialLayoutViews.add(radianSpecialLayout);\n allSpecialLayoutViews.add(sineSpecialLayout);\n allSpecialLayoutViews.add(cosineSpecialLayout);\n allSpecialLayoutViews.add(tangentSpecialLayout);\n allSpecialLayoutViews.add(radianDivBar);\n allSpecialLayoutViews.add(radianTextDenominator);\n allSpecialLayoutViews.add(sineDivBar);\n allSpecialLayoutViews.add(sineTextDenominator);\n allSpecialLayoutViews.add(cosineDivBar);\n allSpecialLayoutViews.add(cosineTextDenominator);\n allSpecialLayoutViews.add(tangentDivBar);\n allSpecialLayoutViews.add(tangentTextDenominator);\n }", "private void setListAdapter(ListAdapter adapter) {\n\n\t\t}", "public void layout() {\n TitleLayout ll1 = new TitleLayout(getContext(), sourceIconView, titleTextView);\n\n // All items in ll1 are vertically centered\n ll1.setGravity(Gravity.CENTER_VERTICAL);\n ll1.setLayoutParams(new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT,\n LayoutParams.WRAP_CONTENT));\n ll1.addView(sourceIconView);\n ll1.addView(titleTextView);\n\n // Container layout for all the items\n if (mainLayout == null) {\n mainLayout = new LinearLayout(getContext());\n mainLayout.setLayoutParams(new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT,\n LayoutParams.WRAP_CONTENT));\n mainLayout.setPadding(adaptSizeToDensity(LEFT_PADDING),\n adaptSizeToDensity(TOP_PADDING),\n adaptSizeToDensity(RIGHT_PADDING),\n adaptSizeToDensity(BOTTOM_PADDING));\n mainLayout.setOrientation(LinearLayout.VERTICAL);\n }\n\n mainLayout.addView(ll1);\n\n if(syncModeSet) {\n mainLayout.addView(syncModeSpinner);\n }\n\n this.addView(mainLayout);\n }", "public void setupLayout() {\n // left empty for subclass to override\n }", "int getItemViewLayoutId();", "private void initLayout() {\n ListView<PropertyWrapper> attributes = new ListView<PropertyWrapper>(\"attributes\", createAttributesModel()) {\n\n @Override\n protected void populateItem(ListItem<PropertyWrapper> listItem) {\n populateListItem(listItem);\n\n if (!showEmptyProperties && isEmpty(listItem)) {\n listItem.setVisible(false);\n }\n }\n };\n add(attributes);\n\n //todo remove !!!\n final MultiLineLabel label = new MultiLineLabel(\"debug\", new AbstractReadOnlyModel<String>() {\n\n @Override\n public String getObject() {\n return showStatus();\n }\n });\n label.add(new AjaxEventBehavior(\"onClick\") {\n\n @Override\n protected void onEvent(AjaxRequestTarget target) {\n target.add(label);\n }\n });\n add(label);\n }", "private void setupCustomAdapter() {\n AnimalAdapter adapter = new AnimalAdapter(this, animals);\n aListView.setAdapter(adapter);\n }", "public void setAdapter() {\n binding.RvwalletAmount.setLayoutManager(new GridLayoutManager(getActivity(), 2));\n binding.RvwalletAmount.setHasFixedSize(true);\n WalletAdapter kyCuploadAdapter = new WalletAdapter(getActivity(), getListWallet(), this);\n binding.RvwalletAmount.setAdapter(kyCuploadAdapter);\n }", "public void setAdapter(Cursor cursor, String[] columns, int[] to, int layout) {\n\t\tsetListAdapter(\n\t\t\t\tnew MySimpleCursorAdapter(\n\t\t\t\t getActivity().getApplicationContext(), \n\t\t\t\t layout, \n\t\t\t\t cursor, \n\t\t\t\t columns, \n\t\t\t\t to));\n\t}", "public abstract int getLayoutResources();", "private void setAdapters() {\n buildingInput.setAdapter(new ArrayAdapter<>(this, android.R.layout.simple_list_item_1, buildings));\n brandInput.setAdapter(new ArrayAdapter<>(this, android.R.layout.simple_list_item_1, brands));\n osInput.setAdapter(new ArrayAdapter<>(this, android.R.layout.simple_list_item_1, operatingSystems));\n /*\n If we want to use pre-determined lists\n getResources().getStringArray(R.array.brands);\n getResources().getStringArray(R.array.operating_systems);\n */\n }", "private void setViews() {\n\n }", "private void setupAdapter() {\n FullWidthDetailsOverviewRowPresenter detailsPresenter;\n if (isIncomingRequest || isOutgoingRequest) {\n detailsPresenter = new FullWidthDetailsOverviewRowPresenter(\n new TVContactRequestDetailPresenter(),\n new DetailsOverviewLogoPresenter());\n } else {\n detailsPresenter = new FullWidthDetailsOverviewRowPresenter(\n new TVContactDetailPresenter(),\n new DetailsOverviewLogoPresenter());\n }\n\n detailsPresenter.setBackgroundColor(ContextCompat.getColor(requireContext(), R.color.grey_900));\n detailsPresenter.setInitialState(FullWidthDetailsOverviewRowPresenter.STATE_HALF);\n\n // Hook up transition element.\n Activity activity = getActivity();\n if (activity != null) {\n FullWidthDetailsOverviewSharedElementHelper mHelper = new FullWidthDetailsOverviewSharedElementHelper();\n mHelper.setSharedElementEnterTransition(activity, TVContactActivity.SHARED_ELEMENT_NAME);\n detailsPresenter.setListener(mHelper);\n detailsPresenter.setParticipatingEntranceTransition(false);\n prepareEntranceTransition();\n }\n\n detailsPresenter.setOnActionClickedListener(action -> {\n if (action.getId() == ACTION_CALL) {\n presenter.contactClicked();\n } else if (action.getId() == ACTION_DELETE) {\n presenter.removeContact();\n } else if (action.getId() == ACTION_CLEAR_HISTORY) {\n presenter.clearHistory();\n } else if (action.getId() == ACTION_ADD_CONTACT) {\n presenter.onAddContact();\n } else if (action.getId() == ACTION_ACCEPT) {\n presenter.acceptTrustRequest();\n } else if (action.getId() == ACTION_REFUSE) {\n presenter.refuseTrustRequest();\n } else if (action.getId() == ACTION_BLOCK) {\n presenter.blockTrustRequest();\n }\n });\n\n ClassPresenterSelector mPresenterSelector = new ClassPresenterSelector();\n mPresenterSelector.addClassPresenter(DetailsOverviewRow.class, detailsPresenter);\n mPresenterSelector.addClassPresenter(ListRow.class, new ListRowPresenter());\n mAdapter = new ArrayObjectAdapter(mPresenterSelector);\n setAdapter(mAdapter);\n }", "private void setAdapter() {\n resultsRv.setLayoutManager(new LinearLayoutManager(getActivity()));\n resultsRv.setHasFixedSize(true);\n resultsRv.setItemAnimator(new DefaultItemAnimator());\n resultsRv.setAdapter(resultsListAdapter);\n }", "abstract public void setUpAdapter();", "private void setAdapter(){\n ArrayList<Veranstaltung>ver = new ArrayList<>(studium.getLVS());\n recyclerView = findViewById(R.id.rc);\n LinearLayoutManager manager = new LinearLayoutManager(this);\n recyclerView.setLayoutManager(manager);\n recyclerView.setHasFixedSize(true);\n adapter = new StudiumDetailsRecylerAdapter(ver);\n recyclerView.setAdapter(adapter);\n }", "protected abstract\n @LayoutRes\n int getLayoutRes(int position);", "private void initViews() {\n\n myOnClickListener = new MyOnClickListener(getContext());\n recyclerView = (RecyclerView)view.findViewById(R.id.recyclerView_ID);\n recyclerView.setHasFixedSize(true);\n layoutManager = new GridLayoutManager(getActivity(), 2);\n recyclerView.setLayoutManager(layoutManager);\n// adapter = new HomeAdapter(al,al2);\n// recyclerView.setAdapter(adapter);\n\n Log.e(\"adapter value : \",\"\"+this.al +this.al2);\n }", "public void setAdapter() {\n // Create Custom Adapter\n Resources res = getResources();\n adapter = null;\n adapter = new WebsearchListAdapter(this, CustomListViewValuesArr, res);\n list.setAdapter(adapter);\n }", "protected abstract void iniciarLayout();", "private void setLayout(ColumnInfo[] layout)\n\t{\n\t\tthis.m_layout = layout;\n\t\tgetModel().setNoColumns(m_layout.length);\n\n\t\treturn;\n\t}", "public void init(AttributeSet attrs) {\n SharedPreferences prefs = getContext().getSharedPreferences(PREFS_NAME, Context.MODE_PRIVATE);\n int curSkinOrdinal = prefs.getInt(SKIN_PREF,0);\n \n if(attrs!=null) {\n TypedArray ta = getContext().getTheme().obtainStyledAttributes(attrs,R.styleable.WearMockLayout,0, 0);\n try {\n curSkinOrdinal = ta.getInteger(R.styleable.WearMockLayout_skin,0);\n } finally {\n ta.recycle();\n }\n }\n \n setSkin(SkinType.values()[curSkinOrdinal]);\n\n setWillNotDraw(false);\n \n marginDrawable = new ColorDrawable(Color.WHITE);\n }", "void setAdapter(SqueezerItemAdapter<T> adapter);", "private void initAdaptersAndViews() {\n final Context context = getContext();\n mListViewAdapter = new FlickrHomeAdapter();\n mListLayoutManager = new LinearLayoutManager(context);\n mListLayoutManager.setOrientation(LinearLayoutManager.VERTICAL);\n\n mViews.listView.addItemDecoration(new DividerItemDecoration(context, DividerItemDecoration.VERTICAL_LIST));\n mViews.listView.setHasFixedSize(true);\n mViews.listView.setLayoutManager(mListLayoutManager);\n mViews.listView.setAdapter(mListViewAdapter);\n }", "abstract void setLayouts(@Nullable List<LayoutHelper> layouts);", "public interface ICarBingoView extends IView {\n void setCarBingoAdapter(CarBingoAdapter adapter);\n\n void setToolbar();\n}", "public abstract int presentViewLayout();", "private void initializeAdapter() {\n }", "public void setSoundBoardLayout() {\n\n soundBoardList = new SoundBoardListType();\n soundBoardList = db.getAllSoundboards();\n soundBoardNames = new ArrayList();\n\n for (int i = 0; i < soundBoardList.getSoundBoardList().size(); i++) {\n soundBoardNames.add(soundBoardList.getSoundBoardList().get(i).getSoundBoardName());\n }\n\n soundBoardNames.add(\"+\");\n setContentView(R.layout.main_grid);\n GridView gridView = (GridView) findViewById(R.id.soundboardgrid);\n\n soundBoardListAdapter = new ArrayAdapter<String>(this, R.layout.main_sbrowtext, soundBoardNames);\n gridView.setAdapter(soundBoardListAdapter);\n gridView.setOnItemClickListener(openSoundBoardListener);\n gridView.setOnItemLongClickListener(editSoundBoardListener);\n gridView.setBackgroundColor(Color.BLACK);\n gridView.setStretchMode(GridView.STRETCH_COLUMN_WIDTH);\n gridView.getSelector().setAlpha(100);\n\n }", "public void initBaseGridViewAttributes(Context context, AttributeSet attributeSet) {\n TypedArray obtainStyledAttributes = context.obtainStyledAttributes(attributeSet, R$styleable.lbBaseGridView);\n this.mLayoutManager.setFocusOutAllowed(obtainStyledAttributes.getBoolean(R$styleable.lbBaseGridView_focusOutFront, false), obtainStyledAttributes.getBoolean(R$styleable.lbBaseGridView_focusOutEnd, false));\n this.mLayoutManager.setFocusOutSideAllowed(obtainStyledAttributes.getBoolean(R$styleable.lbBaseGridView_focusOutSideStart, true), obtainStyledAttributes.getBoolean(R$styleable.lbBaseGridView_focusOutSideEnd, true));\n this.mLayoutManager.setVerticalSpacing(obtainStyledAttributes.getDimensionPixelSize(R$styleable.lbBaseGridView_android_verticalSpacing, obtainStyledAttributes.getDimensionPixelSize(R$styleable.lbBaseGridView_verticalMargin, 0)));\n this.mLayoutManager.setHorizontalSpacing(obtainStyledAttributes.getDimensionPixelSize(R$styleable.lbBaseGridView_android_horizontalSpacing, obtainStyledAttributes.getDimensionPixelSize(R$styleable.lbBaseGridView_horizontalMargin, 0)));\n if (obtainStyledAttributes.hasValue(R$styleable.lbBaseGridView_android_gravity)) {\n setGravity(obtainStyledAttributes.getInt(R$styleable.lbBaseGridView_android_gravity, 0));\n }\n obtainStyledAttributes.recycle();\n }", "public interface LayoutConstraintAdapter<C, A> {\n\n\t/**\n\t * Adapts the constraint given in the configuration to a constraint suitable\n\t * for a layout.\n\t * \n\t * @param constraint\n\t * Constraint given in the configuration\n\t * @return Constraint suitable for a layout.\n\t */\n\tA adapt(C constraint);\n\n}", "private void initializeLayout(){\n String title = mStrInfo;\n String subtitle = mClientItem.clientName;\n mHomeToolbar.setGymRatToolbarTitle(title, subtitle);\n\n //initialize maids\n initializeMaid();\n\n //initialize bottom navigation\n initializeBottomNavigation();\n }", "private void renderer(int rv, ArrayList<ItemBox> list){\n recyclerView = findViewById(rv);\r\n recyclerView.setHasFixedSize(true);\r\n RecyclerView.LayoutManager layoutManager = new LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false);\r\n RecyclerView.Adapter adapter = new Itembox_Adapter(list, this, 1);\r\n recyclerView.setLayoutManager(layoutManager);\r\n recyclerView.setAdapter(adapter);\r\n }", "private void setLayout() {\n if (!mImageFragment.isAdded()) {\n mNameFrameLayout.setLayoutParams(new LinearLayout.LayoutParams(\n MATCH_PARENT, MATCH_PARENT));\n mImageFrameLayout.setLayoutParams(new LinearLayout.LayoutParams(0,\n MATCH_PARENT));\n } else {\n if (getResources().getConfiguration().orientation\n == Configuration.ORIENTATION_LANDSCAPE){\n mNameFrameLayout.setLayoutParams(new LinearLayout.LayoutParams(0,\n MATCH_PARENT, 1f));\n mImageFrameLayout.setLayoutParams(new LinearLayout.LayoutParams(0,\n MATCH_PARENT, 2f));\n }\n\n else {\n mNameFrameLayout.setLayoutParams(new LinearLayout.LayoutParams(0,\n MATCH_PARENT));\n mImageFrameLayout.setLayoutParams(new LinearLayout.LayoutParams(MATCH_PARENT,\n MATCH_PARENT));\n }\n }\n }", "protected abstract int getResLayout();", "@Override\n\tpublic int bindLayout() {\n\t\treturn R.layout.activity_init;\n\t}", "public void layoutSetting(PlayerHolder mHolder){\r\n // update the layout width\r\n mHolder.number.getLayoutParams().width = MultiDevInit.cellW;\r\n mHolder.name.getLayoutParams().width = MultiDevInit.cellW;\r\n mHolder.twomade.getLayoutParams().width = MultiDevInit.cellW;\r\n mHolder.twotried.getLayoutParams().width = MultiDevInit.cellW;\r\n mHolder.threemade.getLayoutParams().width = MultiDevInit.cellW;\r\n mHolder.threetried.getLayoutParams().width = MultiDevInit.cellW;\r\n mHolder.ftmade.getLayoutParams().width = MultiDevInit.cellW;\r\n mHolder.fttried.getLayoutParams().width = MultiDevInit.cellW;\r\n mHolder.defrebound.getLayoutParams().width = MultiDevInit.cellW;\r\n mHolder.offrebound.getLayoutParams().width = MultiDevInit.cellW;\r\n mHolder.assist.getLayoutParams().width = MultiDevInit.cellW;\r\n mHolder.block.getLayoutParams().width = MultiDevInit.cellW;\r\n mHolder.steal.getLayoutParams().width = MultiDevInit.cellW;\r\n mHolder.turnover.getLayoutParams().width = MultiDevInit.cellW;\r\n mHolder.foul.getLayoutParams().width = MultiDevInit.cellW;\r\n mHolder.point.getLayoutParams().width = MultiDevInit.cellW;\r\n // update the layout height\r\n mHolder.number.getLayoutParams().height = MultiDevInit.recordRowH;\r\n }", "@Override\n protected int getNormalLayoutResId() {\n return itemCommonBinder.layout;\n }", "private void bindToLayout() {\n binding= DataBindingUtil.setContentView(this, R.layout.activity_app_guide);\n }", "public void setupAdaptedItemView() {\r\n ArrayList<Profile> requesterList = new ArrayList<>();\r\n requesterList.add(requester);\r\n setupAdaptedItemView(requesterList);\r\n }", "@Override\n protected void onLayout(boolean b, int left, int top, int right, int bottom) {\n int childCount = this.getChildCount();\n for(int i = 0; i < childCount; i++) {\n View child = this.getChildAt(i);\n LayoutParams lp = (LayoutParams) child.getLayoutParams();\n child.layout(lp.x, lp.y, lp.x + child.getMeasuredWidth(), lp.y + child.getMeasuredHeight());\n }\n\n }", "public interface LayoutItemType {\n int getLayoutId();\n}", "@Override\n\t\tpublic void layout(int l, int t, int r, int b) {\n\t\t\tsuper.layout(l, t, r, b);\n\t\t\tLog.e(\"FYF\", getId() + \" ImageView layout\");\n\t\t}", "protected abstract void setGUIAttributesHelper();", "private void setLayoutsFromMood() {\n\n for (int i = 0; i < historicList.size(); i++) {\n RelativeLayout layout = layoutsList.get(i);\n int mPosition = historicList.get(i).getPosition();\n if (mPosition > 4) {\n mPosition = 4;\n } else if (mPosition < 0) {\n mPosition = 0;\n }\n layout.setBackgroundColor(ContextCompat.getColor(this, historyListMood.get(mPosition).getBackgroundColor()));\n layout.setVisibility(View.VISIBLE);\n\n }\n\n\n }", "public void setLayoutParams(ViewGroup.LayoutParams layoutParams) {\n super.setLayoutParams(layoutParams);\n try {\n if (this.a == null) {\n com.adincube.sdk.h.c.c c2;\n if (layoutParams == null) {\n c2 = com.adincube.sdk.h.c.c.a;\n } else {\n float f2 = this.k.density;\n int n2 = layoutParams.height;\n if (n2 > 0) {\n n2 = (int)((float)n2 / f2);\n }\n c2 = com.adincube.sdk.h.c.c.a(n2);\n }\n this.b(c2);\n new Object[1][0] = this.a;\n if (this.a == com.adincube.sdk.h.c.c.b) {\n this.setVisibility(0);\n }\n }\n this.c.c();\n this.d.c();\n this.e.c();\n return;\n }\n catch (Throwable throwable) {\n com.adincube.sdk.util.a.c(\"BannerView.setLayoutParams\", new Object[]{throwable});\n ErrorReportingHelper.report(\"BannerView.setLayoutParams\", com.adincube.sdk.h.c.b.b, this.c(), throwable);\n return;\n }\n }", "public customAdapter() {\n super(SeekerRatingsListActivity.this, R.layout.rating_content, seekerRatingsList);\n }", "@Override\n protected void onLayout(boolean changed, int l, int t, int r, int b) {\n }", "private void setAdapter() {\n AdapterSymptomList adapter = new AdapterSymptomList(allSymptomsList, ActivityRecordsListSymptoms.this);\n RecyclerView.LayoutManager layoutManager = new LinearLayoutManager(ActivityRecordsListSymptoms.this);\n symptomRecyclerView.setLayoutManager(layoutManager);\n symptomRecyclerView.setItemAnimator(new DefaultItemAnimator());\n symptomRecyclerView.setAdapter(adapter);\n }", "private void initView() {\n\n LayoutInflater inflater = getLayoutInflater();\n final int screenWidth = MyUtils.getScreenMetrics(this).widthPixels;\n final int screenHeight = MyUtils.getScreenMetrics(this).heightPixels;\n for (int i = 0; i < 3; i++) {\n ViewGroup layout = (ViewGroup) inflater.inflate(\n R.layout.content_layout, myHorizontal, false);\n layout.getLayoutParams().width = screenWidth;\n TextView textView = (TextView) layout.findViewById(R.id.title);\n textView.setText(\"page \" + (i + 1));\n layout.setBackgroundColor(Color.rgb(255 / (i + 1), 255 / (i + 1), 0));\n createList(layout);\n myHorizontal.addView(layout);\n }\n }", "@Override\r\n\tpublic void setAdapter(ListAdapter adapter) {\n\t\tsuper.setAdapter(adapter);\r\n\t\tthis.adapter = (FlowListAdapter)adapter;\r\n\t}", "private void init(Context context, AttributeSet attrs, int defStyleAttr) {\n LayoutInflater.from(context).inflate(R.layout.empty_placeholder, this, true);\n ButterKnife.bind(this);\n\n final TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.EmptyPlaceholderView, defStyleAttr, 0);\n if (typedArray != null) {\n\n initialText = typedArray.getText(R.styleable.EmptyPlaceholderView_initialText);\n noSearchResultsText = typedArray.getText(R.styleable.EmptyPlaceholderView_noSearchResultsText);\n\n textView.setText(initialText);\n\n Drawable drawable = typedArray.getDrawable(R.styleable.EmptyPlaceholderView_android_src);\n setDrawableTop(drawable);\n\n typedArray.recycle();\n }\n }", "@Override\n public int itemLayoutRes()\n {\n return R.layout.recommendlist_item;\n }", "@LayoutRes\n protected abstract int getLayoutId();", "public void setLayoutParams(int width, int height) {\n\t\titemsContainer.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT));\n\t}", "private void setLayout() {\n\t\ttxtNickname.setId(\"txtNickname\");\n\t\ttxtPort.setId(\"txtPort\");\n\t\ttxtAdress.setId(\"txtAdress\");\n\t\tlblNickTaken.setId(\"lblNickTaken\");\n\n\t\tgrid.setPrefSize(516, 200);\n\t\tbtnLogin.setDisable(true);\n\t\ttxtNickname.setPrefSize(200, 25);\n\t\tlblNickTaken.setPrefSize(250, 10);\n\t\tlblNickTaken.setText(null);\n\t\tlblNickTaken.setTextFill(Color.RED);\n\t\tlblNick.setPrefSize(120, 50);\n\t\ttxtAdress.setText(\"localhost\");\n\t\ttxtPort.setText(\"4455\");\n\t\tlblCardDesign.setPrefSize(175, 25);\n\t\tcomboBoxCardDesign.getSelectionModel().select(0);\n\t\tbtnLogin.setGraphic(imvStart);\n\t}", "protected abstract MultiTypeAdapter createAdapter();", "public void setAdapter(String adapter) {\n this.adapter = adapter;\n }", "public interface HeaderData extends StickyMainData {\n @LayoutRes\n int getHeaderLayout();\n\n int getHeaderType();\n}", "public void setAdapter(String adapter) {\n this.adapter = adapter;\n }", "private void showArrayAdaptView() {\n\t\tPersonAdapt personAdapt = new PersonAdapt(this, persons, R.layout.listview_item);\n\t\tlistView.setAdapter(personAdapt);\n\t}", "protected abstract int getLayoutResourceId();", "private void setUpLayout() {\n myLinearLayout=(LinearLayout)rootView.findViewById(R.id.container_wartaMingguan);\n\n // Add LayoutParams\n params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT);\n myLinearLayout.setOrientation(LinearLayout.VERTICAL);\n params.setMargins(0, 10, 0, 0);\n\n // Param untuk deskripsi\n paramsDeskripsi = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT);\n myLinearLayout.setOrientation(LinearLayout.VERTICAL);\n paramsDeskripsi.setMargins(0, 0, 0, 0);\n\n tableParams = new TableLayout.LayoutParams(TableLayout.LayoutParams.MATCH_PARENT, TableLayout.LayoutParams.WRAP_CONTENT);\n rowTableParams = new TableLayout.LayoutParams(TableRow.LayoutParams.MATCH_PARENT, TableRow.LayoutParams.WRAP_CONTENT);\n\n // Untuk tag \"warta\"\n LinearLayout rowLayout = new LinearLayout(getActivity());\n rowLayout.setOrientation(LinearLayout.HORIZONTAL);\n\n // Membuat linear layout vertical untuk menampung kata-kata\n LinearLayout colLayout = new LinearLayout(getActivity());\n colLayout.setOrientation(LinearLayout.VERTICAL);\n colLayout.setPadding(0, 5, 0, 0);\n }", "public void onLayout(boolean z, int i, int i2, int i3, int i4) {\n }", "public void InitLayout() {\n SetBackground(R.drawable.can_dfqc_ac_bg);\n this.mTvA = AddText(121, 173, 203, 25);\n this.mTvP = AddText(121, 212, KeyDef.RKEY_RADIO_6S, 25);\n this.mTvMode = AddText(121, Can.CAN_FLAT_RZC, 203, 25);\n this.mTvC = AddText(121, 295, 139, 25);\n this.mTvWind = AddText(121, KeyDef.RKEY_AVIN, 53, 25);\n initValue();\n }", "private void prepareViews() {\n mTextViewHeader = (TextView) mHeaderView.findViewById(R.id.tv_text_header_enhanced_listview);\n mTextViewFooter = (TextView) mFooterView.findViewById(R.id.tv_text_footer_enhanced_listview);\n mTextViewTime = (TextView) mHeaderView.findViewById(R.id.tv_time_update_header);\n\n mArrowHeader = mHeaderView.findViewById(R.id.arrow_header);\n mArrowFooter = mFooterView.findViewById(R.id.arrow_footer);\n\n mPbHeader = mHeaderView.findViewById(R.id.pb_header_enhanced_listview);\n mPbFooter = mFooterView.findViewById(R.id.pb_footer_enhanced_listview);\n\n }", "@Override\r\n\tint setLayout() {\n\t\treturn R.layout.product_bigimg;\r\n\t}", "public Object getLayoutInfo() { return _layoutInfo; }", "private void setLayout() {\n int orientation = getResources().getConfiguration().orientation;\n // if the orientation is Portrait\n if (orientation == Configuration.ORIENTATION_PORTRAIT) {\n if (!webViewFragment.isAdded()) {\n mLandmarkLayout.setLayoutParams(new LinearLayout.LayoutParams(MATCH_PARENT, MATCH_PARENT));\n mWebPageLayout.setLayoutParams(new LinearLayout.LayoutParams(0, MATCH_PARENT));\n } else {\n mLandmarkLayout.setLayoutParams(new LinearLayout.LayoutParams(0, MATCH_PARENT, 0f));\n mWebPageLayout.setLayoutParams(new LinearLayout.LayoutParams(0, MATCH_PARENT, 3f));\n\n }\n }\n else { // if the orientation is Landscape\n if (!webViewFragment.isAdded()) {\n\n mLandmarkLayout.setLayoutParams(new LinearLayout.LayoutParams(MATCH_PARENT, MATCH_PARENT));\n mWebPageLayout.setLayoutParams(new LinearLayout.LayoutParams(0, MATCH_PARENT));\n } else {\n // Make the LandmarkLayout take 1/3 of the layout's width\n mLandmarkLayout.setLayoutParams(new LinearLayout.LayoutParams(0,\n MATCH_PARENT, 1f));\n // Make the WebPageLayout take 2/3's of the layout's width\n mWebPageLayout.setLayoutParams(new LinearLayout.LayoutParams(0,\n MATCH_PARENT, 2f));\n }\n }\n }", "public void a() {\n this.f25458d.a(this.f25457c);\n this.f25457c.a(this);\n Context context = getContext();\n LinearLayout linearLayout = new LinearLayout(context);\n linearLayout.setOrientation(1);\n addView(linearLayout, new ViewGroup.LayoutParams(-1, -2));\n d a2 = ShopAssistantItemView_.a(context);\n a2.a(R.drawable.ic_myproducts, R.string.sp_my_products, 0);\n a2.setTag(\"PRODUCT\");\n a2.setMinimumHeight(this.f25455a);\n linearLayout.addView(a2, new FrameLayout.LayoutParams(-1, -2));\n d a3 = ShopAssistantItemView_.a(context);\n a3.a(R.drawable.ic_mycustomers, R.string.sp_my_customers, 2);\n linearLayout.addView(a3, new FrameLayout.LayoutParams(-1, this.f25455a));\n d a4 = ShopAssistantItemView_.a(context);\n a4.a(R.drawable.ic_shopprofile, R.string.sp_label_shop_profile, 6);\n linearLayout.addView(a4, new FrameLayout.LayoutParams(-1, this.f25455a));\n d a5 = ShopAssistantItemView_.a(context);\n a5.a(R.drawable.img_shopsettings, R.string.sp_shop_settings, 4);\n linearLayout.addView(a5, new FrameLayout.LayoutParams(-1, this.f25455a));\n d a6 = ShopAssistantItemView_.a(context);\n a6.a(R.drawable.ic_categories, R.string.sp_my_shop_categories, 8);\n a6.setSubtitle(this.f25461g.getCategoriesPath());\n linearLayout.addView(a6, new FrameLayout.LayoutParams(-1, this.f25455a));\n View view = new View(context);\n view.setBackgroundColor(b.a(R.color.background));\n linearLayout.addView(view, new FrameLayout.LayoutParams(-1, b.a.k));\n View view2 = new View(context);\n view2.setBackgroundColor(com.garena.android.appkit.tools.b.a(R.color.black06));\n linearLayout.addView(view2, new FrameLayout.LayoutParams(-1, b.a.f7690a));\n View inflate = ((LayoutInflater) context.getSystemService(\"layout_inflater\")).inflate(R.layout.seller_center, (ViewGroup) null);\n ((TextView) inflate.findViewById(R.id.url)).setText(\"http://seller\" + i.f7042e);\n int b2 = com.garena.android.appkit.tools.b.b() - b.a.m;\n w.a(getContext()).a((int) R.drawable.sellercentre_banner).b(b2, (int) (((float) b2) / 1.886f)).e().f().a((ImageView) inflate.findViewById(R.id.banner));\n FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(-1, -2);\n inflate.setOnClickListener(new View.OnClickListener() {\n public void onClick(View view) {\n g.this.f25459e.V();\n }\n });\n linearLayout.addView(inflate, layoutParams);\n this.f25457c.e();\n this.f25457c.f();\n }", "private void setAdapters() \n\t{\n\t\tArrayAdapter<CharSequence> adapter =\n\t\tArrayAdapter.createFromResource(\n\t\tthis, R.array.languages,\n\t\tandroid.R.layout.simple_spinner_item);\n\t\tadapter.setDropDownViewResource(\n\t\tandroid.R.layout.simple_spinner_dropdown_item);\n\t\tfromSpinner.setAdapter(adapter);\n\t\ttoSpinner.setAdapter(adapter);\n\t\t// Automatically select two spinner items\n\t\tfromSpinner.setSelection(8); // English (en)\n\t\ttoSpinner.setSelection(11); // French (fr)\n\t\torigText.setText(data);\n\t}", "public void setAdapter(Adapter adapter) {\n this.adapter = adapter;\n }", "public void setViewResource(int layout) {\n/* 114 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public void setupAdapter() {\n recyclerAdapter = new PhotosAdapter(this);\n recyclerViewPhotos.setAdapter(recyclerAdapter);\n }", "@Override\n public void setUpAdapterAndView(List<ListItem> listOfData) {\n this.listOfData = listOfData;\n LinearLayoutManager layoutManager = new LinearLayoutManager(this);\n\n recyclerView.setLayoutManager(layoutManager);\n\n adapter = new CustomAdapter();\n recyclerView.setAdapter(adapter);\n\n DividerItemDecoration itemDecoration = new DividerItemDecoration(\n recyclerView.getContext(),\n layoutManager.getOrientation()\n );\n\n itemDecoration.setDrawable(\n ContextCompat.getDrawable(\n ListActivity.this,\n R.drawable.divider_white\n )\n );\n\n recyclerView.addItemDecoration(\n itemDecoration\n );\n\n ItemTouchHelper itemTouchHelper = new ItemTouchHelper(createHelperCallback());\n itemTouchHelper.attachToRecyclerView(recyclerView);\n\n\n }", "private void initDefaultAttrs() {\n DisplayMetrics dm = getResources().getDisplayMetrics();\n textSize = (int) TypedValue.applyDimension(\n TypedValue.COMPLEX_UNIT_SP, DEFAULT_TEXT_SIZE_SP, dm);\n iconSize = (int) TypedValue.applyDimension(\n TypedValue.COMPLEX_UNIT_DIP, DEFAULT_ICON_SIZE_DP, dm);\n }", "public void init(Context context, AttributeSet attributeSet) {\n TypedArray typedArray = context.obtainStyledAttributes(attributeSet, R.styleable.sliderIndicator, 0, 0);\n // color when the item is selected\n // should be set in the layout design\n\n selectColor = typedArray.getColor(R.styleable.sliderIndicator_select, Color.BLACK);\n\n // color when the indicator is unselected\n unselectColor = typedArray.getColor(R.styleable.sliderIndicator_unselect, Color.GRAY);\n // define what type of the indicator should be used either circular or the rectangular\n int shape = typedArray.getInt(R.styleable.sliderIndicator_type, 0);\n // show how many indicators is needed\n\n typedArray.recycle();\n LayoutParams layoutParams = new LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);\n this.setOrientation(VERTICAL);\n this.setLayoutParams(layoutParams);\n }", "@Override\n\tprotected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {\n\t\tsuper.onMeasure(widthMeasureSpec, heightMeasureSpec);\n\t\t\n\t ListAdapter listAdapter = this.getAdapter(); \n\t if (listAdapter == null) { \n\t return; \n\t } \n\t \n\t int totalHeight = 0; \n\t for (int i = 0; i < listAdapter.getCount(); i++) { \n\t View listItem = listAdapter.getView(i, null, this); \n\t try\n\t {\n\t \tlistItem.measure(0, 0); \n\t }\n\t catch (Exception e)\n\t {\n\t \te.printStackTrace();\n\t }\n\t \n\t totalHeight += listItem.getMeasuredHeight(); \n\t } \n\t \n\t totalHeight = totalHeight + (this.getDividerHeight() * (listAdapter.getCount() - 1));\n\t totalHeight += this.getPaddingBottom();\n\t totalHeight += this.getPaddingTop();\n\t \n\t this.setMeasuredDimension(this.getMeasuredWidth(), totalHeight);\n\t\t\n\t\t\n\t}", "private void setAdapter() {\n adapter = new MessageAdapter(messages);\n RecyclerView.LayoutManager mLayoutManager = new LinearLayoutManager(getApplicationContext());\n recyclerView.setLayoutManager(mLayoutManager);\n recyclerView.setItemAnimator(new DefaultItemAnimator());\n recyclerView.setAdapter(adapter);\n }", "private void initLayouts() {\n mRelativeLayout1WA = findViewById(R.id.history_layout_one_week_ago);\n mRelativeLayout6DA = findViewById(R.id.history_layout_six_days_ago);\n mRelativeLayout5DA = findViewById(R.id.history_layout_five_days_ago);\n mRelativeLayout4DA = findViewById(R.id.history_layout_four_days_ago);\n mRelativeLayout3DA = findViewById(R.id.history_layout_three_days_ago);\n mRelativeLayout2DA = findViewById(R.id.history_layout_two_days_ago);\n mRelativeLayoutY = findViewById(R.id.history_layout_yesterday);\n\n layoutsList.add(mRelativeLayoutY);\n layoutsList.add(mRelativeLayout2DA);\n layoutsList.add(mRelativeLayout3DA);\n layoutsList.add(mRelativeLayout4DA);\n layoutsList.add(mRelativeLayout5DA);\n layoutsList.add(mRelativeLayout6DA);\n layoutsList.add(mRelativeLayout1WA);\n\n }", "private void setMediaRecyclerViewProperties() {\n RecyclerView.LayoutManager layoutManager = new LinearLayoutManager(getApplicationContext(),\n LinearLayoutManager.HORIZONTAL,\n false);\n recyclerViewMedia.setLayoutManager(layoutManager);\n\n // Add appropriate decorations to the recycler view items.\n recyclerViewMedia.addItemDecoration(new MediaItemDecorator(getApplicationContext(), 16));\n\n // Create adapter that will power this recycler view.\n mMediaRecyclerAdapter = new MediaRecyclerAdapter(null, this);\n recyclerViewMedia.setAdapter(mMediaRecyclerAdapter);\n\n // Add snaphelper that will snap the recycler view items at start.\n SnapHelper snapHelper = new StartSnapHelper();\n snapHelper.attachToRecyclerView(recyclerViewMedia);\n }", "private void setLayout(){\n Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar1);\n setSupportActionBar(toolbar);\n\n drawerLayoutgesamt = (DrawerLayout) findViewById(R.id.drawerlayoutgesamt);\n drawerToggle = new ActionBarDrawerToggle(MenueDrawer.this,drawerLayoutgesamt,R.string.auf, R.string.zu);\n drawerLayoutgesamt.addDrawerListener(drawerToggle);\n }", "public interface WrapperAdapter {\n\n RecyclerView.Adapter getWrappedAdapter();\n}", "private void setupViews() {\n this.rvArticles = (RecyclerView) findViewById(R.id.rvArticles);\n this.articles = new ArrayList<>();\n this.articleArrayAdapter = new ArticleArrayAdapter(this, this.articles);\n this.rvArticles.setAdapter(this.articleArrayAdapter);\n StaggeredGridLayoutManager gridLayoutManager =\n new StaggeredGridLayoutManager(GRID_NUM_COLUMNS,\n StaggeredGridLayoutManager.VERTICAL);\n this.rvArticles.setLayoutManager(gridLayoutManager);\n ItemClickSupport.addTo(this.rvArticles).setOnItemClickListener(\n (recyclerView, position, v) -> launchArticleView(position)\n );\n SpacesItemDecoration decoration = new SpacesItemDecoration(GRID_SPACE_SIZE);\n this.rvArticles.addItemDecoration(decoration);\n this.rvArticles.addOnScrollListener(\n new EndlessRecyclerViewScrollListener(gridLayoutManager) {\n @Override\n public void onLoadMore(int page, int totalItemsCount) {\n articleSearch(searchView.getQuery().toString(), page);\n }\n });\n }", "public interface Layout extends Alias {\n}", "private void initViews() {\n\n }", "@Override\r\n\t\tpublic View newView(Context arg0, Cursor arg1, ViewGroup arg2) {\n\t\t\t\t LayoutInflater inflater = LayoutInflater.from(arg2.getContext());\r\n\t\t\t View retView = inflater.inflate(R.layout.report_listitems, arg2, false);\r\n\t\t\t int j=i%2;\r\n\t\t\t retView.setBackgroundColor(colors[j]);\r\n\t\t\t i++;\r\n\t\t\t bindView(retView,arg0,arg1);\r\n\t\t\t return retView;\r\n\t\t\t \r\n\t\t}", "private void setLayoutProperties(\n InfoBarLayout layout, DownloadInfoBarController.DownloadProgressInfoBarData info) {\n mInfo = info;\n\n if (mAnimatedDrawable != null && mAnimatedDrawable.isRunning()) {\n // Wait for the current animation to finish.\n mUpdatePending = true;\n } else {\n updateLayout(layout);\n }\n }", "@Override\n protected void onLayout(boolean changed, int l, int t, int r, int b) {\n Log.v(TAG, \"onLayout l = \" + l + \"; t = \" + t + \"; r = \" + r + \"; b = \" + b);\n int count = getChildCount();\n int x = l;\n int y = t;\n for(int i = 0; i < count; i++){\n View child = (View)getChildAt(i);\n child.layout(x, y, x + r, y + b);\n x = x + r;\n }\n }", "public interface Proxy<T> {\n\n /**\n * return item layout id\n *\n * @return item layout id\n */\n int getItemViewLayoutId();\n\n /**\n * @param item T\n * @param position position\n * @return return true program will apply the layout which is fill this type, otherwise return false.\n */\n boolean isApplyFromViewType(T item, int position);\n\n /**\n * you can convert data in this method\n *\n * @param holder ViewHolder\n * @param item T\n * @param position position\n */\n void convert(ViewHolder holder, T item, int position);\n\n}", "protected void onBindData(Context context, int position, T item, int itemLayoutId, ViewHelper2 helper){\n\n }" ]
[ "0.61113524", "0.60324234", "0.6031596", "0.59027755", "0.58896136", "0.58802587", "0.58533585", "0.5800369", "0.5778607", "0.57524157", "0.5735082", "0.57000893", "0.56470674", "0.5644467", "0.5643828", "0.5643282", "0.56255645", "0.56189364", "0.560965", "0.55875504", "0.5577697", "0.5576858", "0.5576587", "0.55474484", "0.5543559", "0.5540978", "0.55266386", "0.55263406", "0.55079633", "0.5505358", "0.5501123", "0.5470883", "0.546693", "0.5463886", "0.54623574", "0.5452756", "0.5440164", "0.5439591", "0.5416384", "0.54163164", "0.5416025", "0.5391858", "0.53888935", "0.5378964", "0.5370035", "0.5369811", "0.53602934", "0.5354117", "0.5342839", "0.5323821", "0.53155684", "0.531322", "0.5307183", "0.5303204", "0.53004396", "0.5292278", "0.52900237", "0.5288994", "0.52820826", "0.5280635", "0.5270455", "0.5262563", "0.5259467", "0.5250295", "0.52428275", "0.5241452", "0.52401346", "0.5230981", "0.52306205", "0.52274436", "0.5227349", "0.5225187", "0.5219298", "0.5217076", "0.52144647", "0.5213852", "0.52118635", "0.5211054", "0.5210871", "0.520843", "0.5208089", "0.52066624", "0.52031773", "0.5195334", "0.51927716", "0.5178471", "0.51759887", "0.5174214", "0.516686", "0.5163561", "0.51537126", "0.51531535", "0.51502836", "0.51493406", "0.5148378", "0.51473933", "0.5146147", "0.5140065", "0.5139159", "0.5138818", "0.51381063" ]
0.0
-1
Controls the autocompletion feature.
public void setCompletionEnabled(boolean isEnabled) { completionEnabled = isEnabled; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setAutoComplete(Boolean autoComplete) {\n this.autoComplete = autoComplete;\n }", "void itemSuggested(String autoCompleteString, boolean keepPopupVisible, boolean triggerAction);", "public interface AutoCompleter {\n \n /** Sets the callback that will be notified when items are selected. */\n void setAutoCompleterCallback(AutoCompleterCallback callback);\n\n /** \n * Sets the new input to the autocompleter. This can change what is\n * currently visible as suggestions.\n * \n * The returned Future returns true if the lookup for autocompletions\n * completed succesfully. True does not indicate autocompletions are\n * available. It merely indicates that the lookup completed.\n * \n * Because AutoCompleters are allowed to be asynchronous, one should\n * use Future.get or listen to the future in order to see when\n * the future has completed.\n */\n ListeningFuture<Boolean> setInput(String input);\n\n /**\n * Returns true if any autocomplete suggestions are currently available, based the data\n * that was given to {@link #setInput(String)}.\n */\n boolean isAutoCompleteAvailable();\n\n /** Returns a component that renders the autocomplete items. */\n JComponent getRenderComponent();\n\n /** Returns the currently selected string. */\n String getSelectedAutoCompleteString();\n\n /** Increments the selection. */\n void incrementSelection();\n \n /** Decrements the selection. */\n void decrementSelection();\n \n /** A callback for users of autocompleter, so they know when items have been suggested. */\n public interface AutoCompleterCallback {\n /** Notification that an item is suggested. */\n void itemSuggested(String autoCompleteString, boolean keepPopupVisible, boolean triggerAction);\n }\n\n}", "void setAutoCompleterCallback(AutoCompleterCallback callback);", "private void suggestCategory() {\n String[] allCat = {\"Pizza\", \"Pasta\", \"Dessert\", \"Salad\", \"SoftDrinks\"};\n// for (ItemDTO i : allDetails) {\n// names.add(i.getName());\n// }\n\n TextFields.bindAutoCompletion(txtCat, allCat);\n }", "public static void setupAutoComplete(JComboBox comboBox)\n\t{\n\t\tcomboBox.setEditable(true);\n\t\tJTextComponent editor = (JTextComponent) comboBox.getEditor().getEditorComponent();\n\t\teditor.setDocument(new AutoComplete(comboBox));\n\t}", "String getSelectedAutoCompleteString();", "public void completionActivated(AutocompletionEvent<T> e);", "public EditableComboBoxAutoCompletion(JComboBox comboBox) {\n this.comboBox = comboBox;\n editor = (JTextField)comboBox.getEditor().getEditorComponent();\n editor.addKeyListener(this);\n editor.addFocusListener(focusHandler);\n }", "@Override\n\t\t\tpublic void insertUpdate(DocumentEvent e) {if(!updateFromSelectedValue) updateAutocomplete(e);}", "public interface AutoCompleterCallback {\n /** Notification that an item is suggested. */\n void itemSuggested(String autoCompleteString, boolean keepPopupVisible, boolean triggerAction);\n }", "private void initAutoCompleteAdapter(){\n adapterAcGeneric = new GenericAcAdapter(getActivity(),\n android.R.layout.simple_dropdown_item_1line);\n ac_generics.setThreshold(0);\n ac_generics.setAdapter(adapterAcGeneric);\n ac_generics.setOnItemClickListener(\n new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View view,\n int position, long id) {\n //selectedText.setText(autoSuggestAdapter.getObject(position));\n genericName = adapterAcGeneric.getObject(position);\n makeApiCallForSearch();\n CommonMethods.hideKeybaord(getActivity());\n }\n });\n ac_generics.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int\n count, int after) {\n }\n @Override\n public void onTextChanged(CharSequence s, int start, int before,\n int count) {\n genericName = \"\";\n handlerGeneric.removeMessages(TRIGGER_AUTO_COMPLETE);\n handlerGeneric.sendEmptyMessageDelayed(TRIGGER_AUTO_COMPLETE,\n AUTO_COMPLETE_DELAY);\n }\n @Override\n public void afterTextChanged(Editable s) {\n }\n });\n handlerGeneric = new Handler(new Handler.Callback() {\n @Override\n public boolean handleMessage(Message msg) {\n if (msg.what == TRIGGER_AUTO_COMPLETE) {\n if (!TextUtils.isEmpty(ac_generics.getText())) {\n // Log.d(\"DEBUG\", \"in generic\");\n makeApiCall(ac_generics.getText().toString(), 1);\n }\n }\n return false;\n }\n });\n\n\n adapterAcCompany = new CompanyAcAdapter(getActivity(),\n android.R.layout.simple_dropdown_item_1line);\n ac_companies.setThreshold(0);\n ac_companies.setAdapter(adapterAcCompany);\n ac_companies.setOnItemClickListener(\n new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View view,\n int position, long id) {\n //selectedText.setText(autoSuggestAdapter.getObject(position));\n companyName = adapterAcCompany.getObject(position);\n makeApiCallForSearch();\n CommonMethods.hideKeybaord(getActivity());\n }\n });\n ac_companies.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int\n count, int after) {\n }\n @Override\n public void onTextChanged(CharSequence s, int start, int before,\n int count) {\n companyName = \"\";\n handlerCompany.removeMessages(TRIGGER_AUTO_COMPLETE);\n handlerCompany.sendEmptyMessageDelayed(TRIGGER_AUTO_COMPLETE,\n AUTO_COMPLETE_DELAY);\n }\n @Override\n public void afterTextChanged(Editable s) {\n }\n });\n handlerCompany = new Handler(new Handler.Callback() {\n @Override\n public boolean handleMessage(Message msg) {\n if (msg.what == TRIGGER_AUTO_COMPLETE) {\n if (!TextUtils.isEmpty(ac_companies.getText())) {\n //Log.d(\"DEBUG\", \"in company\");\n makeApiCall(ac_companies.getText().toString(), 2);\n }\n }\n return false;\n }\n });\n\n\n ac_companies.setOnFocusChangeListener(new View.OnFocusChangeListener() {\n @Override\n public void onFocusChange(View view, boolean hasFocus) {\n if (hasFocus) {\n Log.d(\"DEBUG\", \"1\");\n makeApiCall(\"\", 2);\n\n // Toast.makeText(getActivity(), \"Got the focus\", Toast.LENGTH_SHORT).show();\n } else {\n // Toast.makeText(getActivity(), \"Lost the focus\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n\n ac_generics.setOnFocusChangeListener(new View.OnFocusChangeListener() {\n @Override\n public void onFocusChange(View view, boolean hasFocus) {\n if (hasFocus) {\n Log.d(\"DEBUG\", \"2\");\n makeApiCall(\"\", 1);\n // Toast.makeText(getActivity(), \"Got the focus\", Toast.LENGTH_SHORT).show();\n } else {\n // Toast.makeText(getActivity(), \"Lost the focus\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n\n\n }", "void autoCompleteSelectionChanged(Event event) {\n Events.sendEvent(new Event(\"onValueSelected\", this));\n }", "@Test\n public void autoCompleteTest() throws InterruptedException {\n assertTrue(CommonUtils.autoCompleteExists(index,autocomplete_searchTerm));\n }", "@Override\r\n\tpublic void autoCompletedUpdated() {\r\n\t\tmAdapter = new ArrayAdapter<String>(this, R.layout.sdk_list_entry, R.id.sdk_list_entry_text, mModel.getAutocompleteSuggestions());\r\n\r\n\t\tmListView.setAdapter(mAdapter);\r\n\t\tmListView.invalidate();\r\n\t\t\r\n\t\tmLayout.hideText();\r\n\t\t\r\n\t}", "public interface FriendAutoCompleterFactory {\n\n /**\n * Returns a FriendLibraryAutocompleter that will supply suggestions based\n * on category.\n */\n public abstract AutoCompleteDictionary getDictionary(SearchCategory categoryToSearch);\n\n /**\n * Returns a FriendLibraryPropertyAutocompleter that will supply suggestions\n * based on category and FilePropertyKey combination.\n */\n public abstract AutoCompleteDictionary getDictionary(SearchCategory categoryToSearch,\n FilePropertyKey filePropertyKey);\n\n}", "void setCompletionCase(String text, int cursorPos);", "public void showSuggestionList() {\n \t\tif (isAttached()) {\n \t\t\tcurrentText = null;\n \t\t\trefreshSuggestions();\n \t\t}\n \t}", "private void populateAutoComplete() {\n if (!mayRequestContacts()) {\n return;\n }\n\n getLoaderManager().initLoader(0, null, this);\n }", "public void startAutocompletePrefetch() {\n if (!mNativeInitialized) return;\n mAutocompleteCoordinator.prefetchZeroSuggestResults();\n }", "public interface AutocompletionListener<T> {\n\t/**\n\t * The user has activated a suggested item.\n\t * \n\t * This means the user has explicitly activate the item, i.e., pressed enter on or clicked the\n\t * item.\n\t * @param e the event describing the activation\n\t */\n\tpublic void completionActivated(AutocompletionEvent<T> e);\n}", "public void setSelection( String strSelection )\n {\n List<String> suggestionNames = getPopupSuggestions();\n for( int currentIndex = 0; currentIndex < suggestionNames.size(); currentIndex++ )\n {\n if( suggestionNames.get( currentIndex ).equals( strSelection ) )\n {\n //select the matching suggestion's index\n _list.setSelectedIndex( currentIndex );\n break;\n }\n }\n }", "public void setSuggestion(String value) {\n setAttributeInternal(SUGGESTION, value);\n }", "private void setupAutoComplete() {\n // Map between AutoCompleteTextViews and their Adapters. Some text fields have a custom\n // adapter whose data is updated dynamically (rather than being statically set)\n Map<AutoCompleteTextView, ArrayAdapter<String>> map = new HashMap<>();\n map.put(mBind.layoutWidthEdit, new LayoutDimenAutoComplAdapter(this, LAYOUT_DROPDOWN_ITEM));\n map.put(mBind.layoutHeightEdit, new LayoutDimenAutoComplAdapter(this, LAYOUT_DROPDOWN_ITEM));\n map.put(mBind.backgroundEdit, new ArrayAdapter<>(this, LAYOUT_DROPDOWN_ITEM, Data.getArrColors()));\n map.put(mBind.maxWidthEdit, new DimenAutoComplAdapter(this, LAYOUT_DROPDOWN_ITEM));\n map.put(mBind.maxHeightEdit, new DimenAutoComplAdapter(this, LAYOUT_DROPDOWN_ITEM));\n\n for (Map.Entry<AutoCompleteTextView, ArrayAdapter<String>> e : map.entrySet()) {\n e.getKey().setAdapter(e.getValue());\n // For the fields with custom adapters, set up listener, so that the data of the adapter\n // is updated on every keystroke (e.g. \"14\" -> {\"14dp\", \"14in\", \"14mm\", \"14px\", \"14sp\"})\n if (e.getValue() instanceof AutoComplAdapter) {\n e.getKey().addTextChangedListener(new MyTextWatcher() {\n @Override\n public void afterTextChanged(Editable s) {\n // Trigger filtering process on 's', which updates the data of this adapter\n e.getValue().getFilter().filter(s);\n }\n });\n }\n }\n }", "@Override\n\tpublic void updateSuggestFuncOracle() {\n\t\tif (searchSuggestFuncTextBox != null) {\n\t\t\tMultiWordSuggestOracle multiWordSuggestOracle = (MultiWordSuggestOracle) searchSuggestFuncTextBox\n\t\t\t\t\t.getSuggestOracle();\n\t\t\tmultiWordSuggestOracle.clear();\n\t\t\tmultiWordSuggestOracle.addAll(funcNameMap.values());\n\t\t}\n\t}", "private void configureSuggestion(final boolean requestedExplicitly) {\n myView.removeSuggestions();\n final RangeInfo rangeInfo = findNearestRangeInfo();\n final String text = getTextByRange(rangeInfo);\n\n final SuggestionInfo suggestionInfo = rangeInfo.getSuggestions();\n if (suggestionInfo == null || (!suggestionInfo.isShowSuggestionsAutomatically() && !requestedExplicitly)) {\n return;\n }\n final List<String> suggestions = new ArrayList<String>(suggestionInfo.getSuggestions());\n if (text != null && !requestedExplicitly) {\n filterLeaveOnlyMatching(suggestions, text);\n }\n // TODO: Place to add history\n if (!suggestions.isEmpty()) {\n // No need to display empty suggestions\n myView\n .displaySuggestions(new SuggestionsBuilder(suggestions), suggestionInfo.isShowAbsolute(), text);\n }\n }", "public AutocompleteProvider(){\r\n root = null;\r\n }", "private void addNamesToAutoComplete(List<String> nameCollection)\n\t{\n\t\tArrayAdapter<String> adapter =\n\t\t\t\tnew ArrayAdapter<>(SignupPersonalActivity.this,\n\t\t\t\t\t\tandroid.R.layout.simple_dropdown_item_1line, nameCollection);\n\n\t\tmNameView.setAdapter(adapter);\n\t}", "public Suggestion (CCombo combo, String[] suggestions) {\n\t\tthis.combo = combo;\n\t\tthis.suggestions = suggestions;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_auto_complete, menu);\n return true;\n }", "@Override\n public boolean onSuggestionSelect(int position) {\n return true;\n }", "public void enableSuggestionAndSyntaxHighlightingFor(String com, List<Prefix> pre, List<Prefix> optionalPrefixes) {\n commandTextField.addSupport(com, pre, optionalPrefixes);\n }", "public static void autoComplete(final JTextField field, final String column) {\n\n field.addKeyListener(new KeyAdapter() {\n @Override\n public void keyReleased(KeyEvent e) {\n\n String low = field.getText().toLowerCase();\n if (low.length() == 0\n || e.isActionKey()\n || e.getKeyCode() == KeyEvent.VK_BACK_SPACE) {\n return;\n }\n\n ResultSet res = null;\n String sql = \"SELECT DISTINCT \" + column\n + \" FROM buch WHERE LOWER(\"\n + column + \") LIKE '\" + low + \"%' LIMIT 1\";\n try {\n res = BookDatabase.getInstance().query(sql);\n if (res.next()) {\n int pos = field.getCaretPosition();\n field.setText(res.getString(1));\n field.setSelectionStart(pos);\n field.setSelectionEnd(field.getText().length());\n }\n } catch (Exception ex) {\n // bewusst ignoriert\n } finally {\n try {\n if (res != null && res.getStatement() != null) {\n res.getStatement().close();\n }\n } catch (Exception ex2) {\n // bewusst ignoriert\n }\n }\n }\n });\n }", "public ArrayListFoodAdapter(Context context, FoodDAO foodDAO, AutoCompleteTextView refAutocomplete) {\n super(foodDAO.getAllFood());\n this.foodDAO = foodDAO;\n mResults = foodDAO.getAllFood();\n// refAutocomplete.setAdapter(this);\n }", "public void setCompletionHint(CharSequence hint) {\n/* 173 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public Autocomplete(Term[] terms) {\r\n if (terms == null) {\r\n throw new java.lang.NullPointerException();\r\n }\r\n this.queries = terms;\r\n Arrays.sort(queries);\r\n }", "public void complete() {\r\n\t\tcomplete(suggestBox.getText());\r\n\t}", "public List<String> getAutoComplete(String prefix) {\r\n List<String> words = dict.getAutoComplete(prefix); //get list of words from prefix\r\n System.out.println();\r\n System.out.println(\"Autocomplete words : \");\r\n for (String s : words) {\r\n System.out.println(s);\r\n }\r\n return words;\r\n }", "@ZAttr(id=599)\n public void setGalTokenizeAutoCompleteKey(ZAttrProvisioning.GalTokenizeAutoCompleteKey zimbraGalTokenizeAutoCompleteKey) throws com.zimbra.common.service.ServiceException {\n HashMap<String,Object> attrs = new HashMap<String,Object>();\n attrs.put(Provisioning.A_zimbraGalTokenizeAutoCompleteKey, zimbraGalTokenizeAutoCompleteKey.toString());\n getProvisioning().modifyAttrs(this, attrs);\n }", "protected void showSuggestions(\n \t\t\tArrayList<SuggestFieldSuggestionImpl> suggestions,\n \t\t\tboolean isAutoSelectEnabled,\n \t\t\tfinal SuggestionSelectedCallback callback) {\n \t\tboolean anySuggestions = (suggestions != null && suggestions.size() > 0);\n \t\tif (!anySuggestions && hideWhenEmpty) {\n \t\t\thideSuggestions();\n \t\t\treturn;\n \t\t}\n \n \t\t// Hide the popup before we manipulate the menu within it. If we do not\n \t\t// do this, some browsers will redraw the popup as items are removed\n \t\t// and added to the menu.\n \t\tif (suggestPopup.isAttached()) {\n \t\t\tsuggestPopup.hide();\n \t\t}\n \n \t\tsuggestPopup.menu.clearItems();\n \n \t\tfor (final SuggestFieldSuggestionImpl suggestion : suggestions) {\n \n \t\t\tfinal VSuggestionMenuItem menuItem = new VSuggestionMenuItem(\n \t\t\t\t\t(SuggestFieldSuggestionImpl) suggestion, isDisplayStringHTML);\n \t\t\tmenuItem.setCommand(new ScheduledCommand() {\n \t\t\t\tpublic void execute() {\n \t\t\t\t\tcallback.onSuggestionSelected(suggestion);\n \t\t\t\t}\n \t\t\t});\n \t\t\tsuggestPopup.menu.addItem(menuItem);\n \t\t}\n \n \t\tif (isAutoSelectEnabled && anySuggestions) {\n \t\t\t// Select the first item in the suggestion menu.\n \t\t\tsuggestPopup.menu.selectItemAtIndex(0);\n \t\t}\n \n \t\t// Link the popup autoHide to the TextBox.\n \t\tif (lastSuggestBox != VSuggestFieldWidget.this) {\n \t\t\t// If the suggest box has changed, free the old one first.\n \t\t\tif (lastSuggestBox != null) {\n \t\t\t\tsuggestPopup.removeAutoHidePartner(lastSuggestBox.getElement());\n \t\t\t}\n \t\t\tlastSuggestBox = VSuggestFieldWidget.this;\n \t\t\tsuggestPopup.addAutoHidePartner(VSuggestFieldWidget.this\n \t\t\t\t\t.getElement());\n \t\t}\n \n \t\t// Show the popup under the TextBox.\n \t\tsuggestPopup.showRelativeTo(VSuggestFieldWidget.this);\n \n \t}", "public interactOption()\n\t{\n\t\tsuper();\n\t\toptionType = \"interact with the\";\n\t\toptionFocus = \"nothing\";\n\t\toptionText = optionType + \" \" + optionFocus;\n\t}", "private void SetViewAndAutoCompleteText(int viewID)\n\t{\n\t\t// Auto complete words\n // !put, !get, !capture, !launch, !autotest are special commands\n\t\tfinal String [] COMMAND_LIST = new String [] { \n\t\t\t\t\"!put a.txt\", \"!get c:/test.txt\", \"!capture 1.jpg\", \"!launch\", \n\t\t\t\t\"dir\", \"cd \", \"cd ..\", \"c:\", \"tasklist\" };\n\t\tfinal String [] KEY_LIST = new String [] { \n\t\t\t\t\"!autotest\", \"!pintest\", \"!stoptest\", \"[KEY_\", \"[KEY_LGUI]\", \"[KEY_LGUI][KEY_R]\", \"[KEY_LGUI][KEY_L]\", \"[KEY_LALT]\", \"[KEY_LALT][KEY_F4]\", \"[KEY_LCONTROL]\", \"[KEY_LCONTROL][KEY_S]\", \"[KEY_UP]\",\n\t\t\t\t\"[KEY_LSHIFT]\",\t\"[KEY_ENTER]\", \"[KEY_BACKSPACE]\", \"cmd.exe\", \"d:/testagent\" };\n\t\t\n\t\t// Set view pointer\n\t\tView view;\n\t\tAutoCompleteTextView autoText;\n\t\tArrayAdapter<String> adapter;\n\t\t\n\t\t// Set view pointer\n\t\tif (viewID == VIEW_ID_COMMAND)\n\t\t{\n\t\t\tview = mTabHost.getTabContentView().findViewById(R.id.commandView);\n\t\t\tmCommandView = (TextView)view.findViewById(R.id.dataview);\n\t\t\tmCommandScrollView = (ScrollView)view.findViewById(R.id.scrollview);\n\t\t\tmCommandInputView = (AutoCompleteTextView) view.findViewById(R.id.commandInput);\n\t\t\tautoText = mCommandInputView;\n\t\t\tadapter = new ArrayAdapter(getApplicationContext(), \n\t\t\t\t\tandroid.R.layout.simple_dropdown_item_1line, COMMAND_LIST);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tview = mTabHost.getTabContentView().findViewById(R.id.keyView);\n\t\t\tmKeyView = (TextView)view.findViewById(R.id.dataview);\n\t\t\tmKeyScrollView = (ScrollView)view.findViewById(R.id.scrollview);\n\t\t\tmKeyInputView = (AutoCompleteTextView) view.findViewById(R.id.keyInput);\n\t\t\tautoText = mKeyInputView;\n\t\t\tadapter = new ArrayAdapter(getApplicationContext(), \n\t\t\t\t\tandroid.R.layout.simple_dropdown_item_1line, KEY_LIST);\t\t\t\n\t\t}\t\t\n\t\t\n\t\t// Set options for autocomplete\n\t\tautoText.setTag(viewID);\n\t\tautoText.setAdapter(adapter);\n\t\tautoText.setThreshold(1);\n\t\t\n\t\t// Process enter key\n\t\tautoText.setOnKeyListener(new OnKeyListener()\n\t\t{\n\t\t\t@Override\n\t\t\tpublic boolean onKey(View arg0, int arg1, KeyEvent arg2) \n\t\t\t{\t\t\t\t\n\t\t\t\tif ((arg0 != null) && (arg2 != null) && \n\t\t\t\t\t(arg2.getAction() == KeyEvent.ACTION_DOWN) &&\n\t\t\t\t\t(arg2.getKeyCode() == KeyEvent.KEYCODE_ENTER))\n\t\t\t\t{\n\t\t\t\t\tAutoCompleteTextView view = (AutoCompleteTextView) arg0;\n\t\t\t\t\tString data;\n\t\t\t\t\tint viewID;\n\t\t\t\t\t\n\t\t\t\t\tdata = view.getText().toString();\n view.setText(\"\");\n viewID = (Integer) view.getTag();\n if (data.equals(\"\") == true)\n {\n if (viewID == VIEW_ID_KEY)\n {\n data = \"[KEY_ENTER]\";\n }\n else\n {\n return true;\n }\n }\n\n SendCommandOrKeys(viewID, data);\n\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\t\t});\t\t\n\t}", "private void setupTextField() {\n getNodes();\n List<String> nodeLongNames = new LinkedList<String>(nodeIDs.keySet());\n TextFields.bindAutoCompletion(nodeSelectTextField, nodeLongNames.toArray());\n\n nodeSelectTextField.setOnAction(param -> {\n if(!new LinkedList<String>(nodeIDs.keySet()).contains(nodeSelectTextField.getText())) {\n nodeSelectTextField.setText(\"\");\n return;\n }\n longName = nodeSelectTextField.getText();\n nodeID = nodeIDs.get(longName);\n if(eventHandler != null) {\n eventHandler.handle(param);\n }\n });\n }", "private void searchSuggestionListMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_searchSuggestionListMouseClicked\n String selectedWord = this.getSearchSuggestionList().getSelectedValue();\n \n // find the definiiton of the word\n for(int i = 0 ; i < queryResult.size() ; i++)\n {\n if(queryResult.get(i).getWord().equals(selectedWord))\n {\n String definition = queryResult.get(i).getDefinition();\n definitionTextArea.setText(definition);\n i = queryResult.size();\n }\n }\n \n // select the same word in the all word list \n ListModel<String> modelList = getAllWordsList().getModel();\n \n for(int i = 0 ; i < modelList.getSize() ; i++)\n {\n if(modelList.getElementAt(i).equals(selectedWord))\n {\n getAllWordsList().setSelectedIndex(i);\n i = modelList.getSize();\n }\n }\n }", "@Override\n protected void onPostExecute(Void aVoid) {\n super.onPostExecute(aVoid);\n autoCompleteAdapter = new ArrayAdapter<String>(mContext, android.R.layout.simple_dropdown_item_1line, deviceNames);\n\n autoComplete.setAdapter(autoCompleteAdapter);\n autoComplete.showDropDown();\n loadingResult.setVisibility(View.INVISIBLE);\n }", "public void setAutoselectForRemovalString(String autoselectForRemoval1) {\r\n this.autoselectForRemovalString = autoselectForRemoval1;\r\n }", "private void setSuggestedCategory() {\n if (selectedCategoryKey != null) {\n return;\n }\n if (suggestedCategories != null && suggestedCategories.length != 0) {\n selectedCategoryKey = suggestedCategories[0].getKey();\n selectCategory.setText(suggestedCategories[0].getName());\n }\n }", "@Override\n\tpublic void suggestExchange() {\n\t\t\n\t}", "private void refreshSuggestions() {\n \t\tString text = textBox.getText();\n \t\tif (text.equals(currentText)) {\n \t\t\treturn;\n \t\t} else {\n \t\t\tcurrentText = text;\n \t\t}\n \t\tfindSuggestions(text);\n \t}", "private void initializeAutoChooser()\n {\n /* Add options (which autonomous commands can be selected) to chooser. */\n m_autoChooser.setDefaultOption(\"DEFAULT COMMAND NAME HERE\", \"default\");\n m_autoChooser.addOption(\"TEST\", \"test\");\n m_autoChooser.addOption(\"THREE BALL FORWARD\", \"three_ball_forward\");\n m_autoChooser.addOption(\"THREE BALL BACKWARD\", \"three_ball_backward\");\n m_autoChooser.addOption(\"SIX BALL\", \"six_ball\");\n\n /*\n * Display chooser on SmartDashboard for operators to select which autonomous\n * command to run during the auto period.\n */\n SmartDashboard.putData(\"Autonomous Command\", m_autoChooser);\n }", "public interface ISimpleSuggestionPluginProvider extends ISuggestionPluginProvider {\n\n Collection<String> getSuggestions(String input, SuggestionRequestContext context);\n\n}", "public static void main(String[] args) {\n\t\t\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"./drivers/chromedriver.exe\");\r\n\t\tChromeDriver driver = new ChromeDriver();\r\n\r\n\t\tdriver.get(\"http://leafground.com/pages/autoComplete.html\");\r\n\t\t \r\n\t\tdriver.manage().window().maximize();\r\n\t\t\r\n\t\tWebElement input=driver.findElementById(\"tags\");\r\n\t\tinput.sendKeys(\"s\");\r\n\t\t\r\n\t\tList<WebElement> listoptions=driver.findElementsByXPath(\"//*[@id=\\'ui-id-1\\']/li\");\r\n\t\t\r\n\t\tfor (WebElement webElement : listoptions) {\r\n\t\t\twebElement.getText().equals(\"Web Services\");\r\n\t\t\twebElement.click();\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tdriver.close();\r\n\t\t\r\n\t\t\r\n\r\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tString[] input = {\"i love you\", \"island\",\"ironman\", \"i love leetcode\"};\n\t\tint[] times = {5,3,2,2};\n\t\tAutocompleteSystem sol = new AutocompleteSystem(input, times);\n\t}", "private void createSuggestionsList() {\r\n\t\tmListView = new LabeledListViewElement(this);\r\n\t\tmInputBar.addView(mListView);\r\n\r\n\t\tmListView.setOnItemClickListener(new OnItemClickListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void onItemClick(AdapterView<?> adapter, View view, int pos, long id) {\r\n\t\t\t\tString query = adapter.getItemAtPosition(pos).toString();\r\n\t\t\t\tif(query.contains(\" \"))\r\n\t\t\t\t\tsearch(query);\r\n\t\t\t\telse{\r\n\t\t\t\t\tmInputBar.setInputText(query + \" \");\r\n\t\t\t\t\tmInputBar.setCursorAtEnd();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t}", "public void hideAutoCompletePanel() {\n mACPanel.hide();\n }", "public void showSuggestionsFromServer() {\n \t\tsuggestionReadyCallback.onSuggestionsReady();\n \t}", "@Ignore @Test\n public void doCompletion() {\n controller.getCompletionList(INPUT,ONTOLOGY,FIELD,bean);\n List<CompletionTerm> compList = bean.getCompletionTermList();\n Assert.assertNotNull(compList);\n Assert.assertTrue(\"Should have >0 comp terms\",compList.size()>0);\n boolean containsInput = false;\n for (CompletionTerm t : compList)\n containsInput |= t.toString().contains(INPUT);\n Assert.assertTrue(\"Should contain \"+INPUT,containsInput);\n }", "private AutoCompletionTextInputBinding(final TextInputControl textInputControl,\n Callback<ISuggestionRequest, Collection<T>> suggestionProvider) {\n\n this(textInputControl,\n suggestionProvider,\n AutoCompletionTextInputBinding.defaultStringConverter(),\n new ReplaceStrategy());\n }", "public SeerAutoCompleteComboBox(List<String> list) {\n this(list, SeerAutoCompleteComboBoxSearchType.STARTS_WITH);\n }", "public static void mainMenu() {\n\t\tSystem.out.println(\"1. Train the autocomplete algorithm with input text\");\r\n\t\tSystem.out.println(\"2. Test the algorithm by entering a word fragment\");\r\n\t\tSystem.out.println(\"3. Exit (The algorithm will be reset on subsequent runs of the program)\");\r\n\t\tint choice = getValidInt(1, 3); // get the user's selection\r\n\t\tSystem.out.println(\"\"); // for appearances\r\n\t\tScanner scan = new Scanner(System.in);\r\n\t\t\r\n\t\t//evaluate the user's choice\r\n\t\tswitch (choice) {\r\n\t\tcase CONSTANTS.TRAIN:\r\n\t\t\t\r\n\t\t\tSystem.out.print(\"Enter a passage to train the algorithm (press enter to end the passage): \");\r\n\t\t\tString passage = scan.nextLine();\r\n\t\t\tprovider.train(passage);\r\n\t\t\tbreak;\r\n\t\t\r\n\t\tcase CONSTANTS.TEST:\r\n\t\t\t\r\n\t\t\tString prefix;\r\n\t\t\tdo { // keep asking for input until a valid alphabetical string is given\r\n\t\t\t\tSystem.out.print(\"Enter a prefix to test autocomplete (alphabetic characters only): \");\r\n\t\t\t\tprefix = scan.nextLine();\r\n\t\t\t} while (!prefix.matches(\"[a-zA-z]+\"));\r\n\t\t\tSystem.out.println(\"\"); // for appearances\r\n\t\t\tshowResults(provider.getWords(prefix.toLowerCase()));\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tcase CONSTANTS.EXIT:\r\n\t\t\t\r\n\t\t\tSystem.exit(0);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tmainMenu();\r\n\t}", "private void setNameAutomatic(){\n\t}", "@Override\r\n public void initialize(URL url, ResourceBundle rb) {\r\n \r\n AutoCompletionBinding<Project> txt_name = TextFields.bindAutoCompletion(name, new Callback<AutoCompletionBinding.ISuggestionRequest, Collection<Project>>() {\r\n\r\n @Override\r\n public Collection<Project> call(AutoCompletionBinding.ISuggestionRequest param) {\r\n List<Project> list = null;\r\n HttpHelper helper = new HttpHelper();\r\n try {\r\n LovHandler lovHandler = new LovHandler(\"projects\", \"PROJECT\");\r\n String response = lovHandler.getSuggestions(param.getUserText());\r\n list = (List<Project>) new JsonHelper().convertJsonStringToObject(response, new TypeReference<List<Project>>() {\r\n });\r\n } catch (IOException ex) {\r\n Logger.getLogger(ProjectController.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n\r\n return list;\r\n }\r\n\r\n \r\n }, new StringConverter<Project>() {\r\n\r\n @Override\r\n public String toString(Project object) {\r\n return object.getName() + \" (ID:\" + object.getId() + \")\";\r\n }\r\n\r\n @Override\r\n public Project fromString(String string) {\r\n throw new UnsupportedOperationException(\"Not supported yet.\");\r\n }\r\n });\r\n\r\n //event handler for setting other Client fields with values from selected Client object\r\n //fires after autocompletion\r\n txt_name.setOnAutoCompleted(new EventHandler<AutoCompletionBinding.AutoCompletionEvent<Project>>() {\r\n\r\n @Override\r\n public void handle(AutoCompletionBinding.AutoCompletionEvent<Project> event) {\r\n Project project = event.getCompletion();\r\n //fill other item related fields\r\n \r\n PROJECT.setText(splitName(name.getText()));\r\n \r\n \r\n //populateAuditValues(client);\r\n }\r\n });\r\n // TODO\r\n }", "@Override public void onStartInput(EditorInfo attribute, boolean restarting) {\n super.onStartInput(attribute, restarting);\n \n // Reset our state. We want to do this even if restarting, because\n // the underlying state of the text editor could have changed in any way.\n mComposing.clear();\n mCandidatesAdapter.clear();\n updateCandidatesView(EMPTYLIST);\n\n mJapaneseInputMode = false;\n \n // どのキーボードを初期表示にするか、エディタのattributeから判断する\n // @todo すべてのattributeを網羅していない\n switch (attribute.inputType & InputType.TYPE_MASK_CLASS) {\n case InputType.TYPE_CLASS_NUMBER:\n case InputType.TYPE_CLASS_DATETIME:\n mCurKeyboard = mSymbolsKeyboard;\n break;\n \n case InputType.TYPE_CLASS_PHONE:\n mCurKeyboard = mSymbolsKeyboard;\n break;\n \n case InputType.TYPE_CLASS_TEXT:\n mCurKeyboard = mQwertyKeyboard;\n mJapaneseInputMode = true;\n\n int variation = attribute.inputType & InputType.TYPE_MASK_VARIATION;\n if (variation == InputType.TYPE_TEXT_VARIATION_PASSWORD ||\n variation == InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD) {\n mJapaneseInputMode = false;\n }\n \n if (variation == InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS\n || variation == InputType.TYPE_TEXT_VARIATION_URI\n || variation == InputType.TYPE_TEXT_VARIATION_FILTER) {\n mJapaneseInputMode = false;\n }\n \n if ((attribute.inputType & InputType.TYPE_TEXT_FLAG_AUTO_COMPLETE) != 0) {\n mJapaneseInputMode = true;\n }\n\n break;\n \n default:\n // For all unknown input_view types, default to the alphabetic\n // keyboard with no special features.\n mCurKeyboard = mQwertyKeyboard;\n }\n\n setCandidatesViewShown(mJapaneseInputMode);\n\n if(mJapaneseInputMode){\n prediction(new CandidateWord(\"\",0)); // @note 0=文頭\n }\n }", "public PlacesAutocompleteTextView(final Context context, final AttributeSet attrs, final int defAttr) {\n super(context, attrs, defAttr);\n\n init(context, attrs, defAttr, R.style.PACV_Widget_PlacesAutoCompleteTextView, null, context.getString(R.string.pacv_default_history_file_name));\n }", "ILinkDeleterActionBuilder<SOURCE_BEAN_TYPE, LINKED_BEAN_TYPE> setAutoSelection(boolean autoSelection);", "public TrainerListSearchBar(TrainerList list){\n ((PlainDocument) getDocument()).setDocumentFilter(new AlphanumericUnderscoreFilter());\n getDocument().addDocumentListener(new SimplifiedDocumentListener(){\n @Override\n public void change(DocumentEvent event){\n SwingUtilities.invokeLater(() -> list.setModel(new DefaultComboBoxModel(getFilteredTrainers(getText()))));\n }\n });\n }", "private void addAllCompletions(ArrayList completions)\n {\n String oldText = m_textField.getText();\n int oldCaretPosition = m_textField.getCaretPosition();\n if (completions.size() > m_comboBox.getItemCount())\n m_comboBox.hidePopup();\n m_comboBox.removeAllItems();\n for (int i = completions.size() - 1; i >= 0; --i)\n {\n Object object = new WrapperObject((String)completions.get(i));\n m_comboBox.addItem(object);\n }\n m_comboBox.setSelectedIndex(-1);\n m_textField.setText(oldText);\n m_textField.setCaretPosition(oldCaretPosition);\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n lblTopic = new javax.swing.JLabel();\n lblSpecialityID = new javax.swing.JLabel();\n lblSpecialityType = new javax.swing.JLabel();\n cmbSpeciality = new com.jidesoft.swing.AutoCompletionComboBox();\n txtSpeciality = new javax.swing.JTextField();\n btnUpdate = new org.jdesktop.swingx.JXButton();\n\n setBackground(new java.awt.Color(255, 255, 255));\n\n lblTopic.setFont(new java.awt.Font(\"Arial\", 1, 18)); // NOI18N\n lblTopic.setText(\"Change Speciality Details\");\n\n lblSpecialityID.setFont(new java.awt.Font(\"Arial\", 0, 16)); // NOI18N\n lblSpecialityID.setText(\"Speciality ID :\");\n\n lblSpecialityType.setFont(new java.awt.Font(\"Arial\", 0, 16)); // NOI18N\n lblSpecialityType.setText(\"Speciality :\");\n\n cmbSpeciality.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n cmbSpecialityItemStateChanged(evt);\n }\n });\n cmbSpeciality.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n cmbSpecialityActionPerformed(evt);\n }\n });\n\n txtSpeciality.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txtSpecialityActionPerformed(evt);\n }\n });\n\n btnUpdate.setText(\"Update\");\n btnUpdate.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnUpdateActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(btnUpdate, javax.swing.GroupLayout.PREFERRED_SIZE, 78, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(lblTopic, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 280, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()\n .addComponent(lblSpecialityID)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(cmbSpeciality, javax.swing.GroupLayout.PREFERRED_SIZE, 227, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()\n .addComponent(lblSpecialityType)\n .addGap(18, 18, 18)\n .addComponent(txtSpeciality)))\n .addContainerGap(744, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(lblTopic)\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(lblSpecialityID)\n .addComponent(cmbSpeciality, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(lblSpecialityType)\n .addComponent(txtSpeciality, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(43, 43, 43)\n .addComponent(btnUpdate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(437, Short.MAX_VALUE))\n );\n }", "@SuppressWarnings(\"unchecked\")\n public SeerAutoCompleteComboBox(List<String> list, SeerAutoCompleteComboBoxSearchType type, int refreshRateMs) {\n\n _searchType = type;\n\n // using a special model\n _model = new SeerAutoCompleteComboBoxModel(list);\n setModel(_model);\n\n // auto-completion makes sense only with an editable combo-box!\n setEditable(true);\n\n // we start with no pattern\n setPattern(null);\n _modelFilling = false;\n _updatePopup = false;\n\n // also using a special document\n _textComponent = (JTextComponent)getEditor().getEditorComponent();\n _textComponent.setDocument(new AutoCompleteDocument());\n\n // by default, nothing is selected\n setSelectedItem(null);\n\n // refresh the popup every 20 ms\n new Timer(refreshRateMs, e -> {\n //noinspection ConstantConditions\n if (_updatePopup && isDisplayable()) {\n setPopupVisible(false);\n if (_model.getSize() > 0)\n setPopupVisible(true);\n _updatePopup = false;\n }\n }).start();\n }", "public Autocomplete(Term[] terms)\n {\n this.terms = terms;\n Arrays.sort(terms); //uses Term.compareTo(that) -- Comparable\n // for all other classes, the terms is already sorted lexicographically\n\n }", "public void updateNewSuggestFuncOracle() {\n\t\tif (searchSuggestFuncTextBox != null) {\n\t\t\tCQLSuggestOracle cqlSuggestOracle = new CQLSuggestOracle(funcNameMap.values());\n\t\t}\n\t}", "private void loadAutoCompleteData() {\n List<String> labelsItemName = db.getAllItemsNames();\n // Creating adapter for spinner\n ArrayAdapter<String> dataAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1,\n labelsItemName);\n\n // Drop down layout style - list view with radio button\n dataAdapter.setDropDownViewResource(android.R.layout.simple_list_item_1);\n\n // attaching data adapter to spinner\n autoCompleteTextViewSearchItem.setAdapter(dataAdapter);\n\n // List - Get Menu Code\n List<String> labelsMenuCode = db.getAllMenuCodes();\n // Creating adapter for spinner\n ArrayAdapter<String> dataAdapter1 = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1,\n labelsMenuCode);\n\n // Drop down layout style - list view with radio button\n dataAdapter1.setDropDownViewResource(android.R.layout.simple_list_item_1);\n\n // attaching data adapter to spinner\n autoCompleteTextViewSearchMenuCode.setAdapter(dataAdapter1);\n\n POS_LIST = ArrayAdapter.createFromResource(this, R.array.poscode, android.R.layout.simple_spinner_item);\n spnr_pos.setAdapter(POS_LIST);\n\n // barcode\n List<String> labelsBarCode = db.getAllBarCodes();\n ArrayAdapter<String> dataAdapter11 = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1,\n labelsBarCode);\n dataAdapter11.setDropDownViewResource(android.R.layout.simple_list_item_1);\n autoCompleteTextViewSearchItemBarcode.setAdapter(dataAdapter11);\n\n }", "public void updateNewSuggestDefineOracle() {\n\t\tif (searchSuggestDefineTextBox != null) {\n\t\t\tCQLSuggestOracle cqlSuggestOracle = new CQLSuggestOracle(defineNameMap.values());\n\t\t}\n\t}", "public void updateNewSuggestParamOracle() {\n\t\tif (searchSuggestDefineTextBox != null) {\n\t\t\tCQLSuggestOracle cqlSuggestOracle = new CQLSuggestOracle(parameterNameMap.values());\n\t\t}\n\t}", "@Override\n public void setAutofocus(boolean autofocus) {\n super.setAutofocus(autofocus);\n }", "public AutoCompletionProposalsComparator(String nameStart, Language language) {\r\n\t\tthis.nameStart = nameStart;\r\n//\t\tthis.typePredicate = typePredicate;\r\n\t\tlabelProvider = new ChameleonLabelProvider(language, true, true, false);\r\n\t}", "@Override\n\tpublic IKeyword option() { return option; }", "@Override\n\tpublic void autonomousInit() {\n\t\tRobot.driveSubsystem.shiftDown();\n\n\t\tRobot.driveSubsystem.setBrakeMode();\n\n\t\tm_autoCmd = m_chooser.getSelected();\n\t\tif (m_autoCmd != null) {\n\t\t\tm_autoCmd.start();\n\t\t}\n\t}", "@ZAttr(id=599)\n public void setGalTokenizeAutoCompleteKeyAsString(String zimbraGalTokenizeAutoCompleteKey) throws com.zimbra.common.service.ServiceException {\n HashMap<String,Object> attrs = new HashMap<String,Object>();\n attrs.put(Provisioning.A_zimbraGalTokenizeAutoCompleteKey, zimbraGalTokenizeAutoCompleteKey);\n getProvisioning().modifyAttrs(this, attrs);\n }", "public List<String> autocomplete(String prefix) {\r\n\r\n ArrayList<String> result = new ArrayList<String>();\r\n result.add(\"England\");\r\n result.add(\"France\");\r\n result.add(\"Germany\");\r\n result.add(\"Italy\");\r\n result.add(\"Spain\");\r\n\r\n return result;\r\n }", "@Override\n protected void setHint(String hint) {\n }", "public static boolean isAutocompleteable(String command) {\r\n\t\tassert command != null;\r\n\t\tcommandType = Logic.determineCommandType(command);\r\n\t\tswitch (commandType) {\r\n\t\tcase EDIT:\r\n\t\tcase DELETE:\r\n\t\tcase DONE:\r\n\t\tcase UNDONE:\r\n\t\t\treturn true;\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public void requestSuggestions(SuggestOracle.Request req, SuggestOracle.Callback callback) {\n fetchTags(req, callback);\n }", "public String getSearchHint();", "private void allWordsListMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_allWordsListMouseClicked\n \n String selectedWord = this.getAllWordsList().getSelectedValue();\n char firstLetterOfWord = selectedWord.charAt(0);\n \n // find the index of the corresponding tree tot he first letter of the word\n int index = -1;\n for(int i = 0 ; i < lexiNodeTrees.size() ; i++)\n {\n if(lexiNodeTrees.get(i).getCurrentCharacter() == firstLetterOfWord)\n {\n index = i;\n i = lexiNodeTrees.size();\n }\n }\n \n // find the word in the tree\n WordDefinition wordQuery = lexiNodeTrees.get(index).searchWord(selectedWord, true).get(0);\n \n // update definition field\n this.getDefinitionTextArea().setText(wordQuery.getDefinition());\n \n // display the word in the search field as well\n this.getSearchField().setText(selectedWord);\n \n // get search suggestion too\n searchWord();\n \n // select the same word in the search suggestion list \n ListModel<String> modelList = getSearchSuggestionList().getModel();\n \n for(int i = 0 ; i < modelList.getSize() ; i++)\n {\n if(modelList.getElementAt(i).equals(selectedWord))\n {\n getSearchSuggestionList().setSelectedIndex(i);\n i = modelList.getSize();\n }\n }\n \n }", "public SeerAutoCompleteComboBox(List<String> list, SeerAutoCompleteComboBoxSearchType type) {\n this(list, type, 20);\n }", "public void setCompletionItems(List<CompletionItem> items) {\r\n this.textItemsProperty.setValue(FXCollections.observableArrayList(items));\r\n }", "public void addLongListSelectionListener(LongListSelectionListener x) {\n return;\r\n }", "private void loadSuggestions(final ArrayList<MutualFund_CustomClass> mSuggestionArrayList) {\n new VolleyClass(MainActivity.this, \"MainActivity\").volleyPostData(\"<YOUR_WEBSERVICE_URL>\", /*\"<YOUR_JSON_OBJECT>\"*/, new VolleyResponseListener() {\n @Override\n public void onResponse(JSONObject response) throws JSONException {\n for (int i = 0; i < response.getJSONArray(\"data\").length(); i++) {\n mutualFundHouseObj = new MutualFund_CustomClass();\n mutualFundHouseObj.setFundId(response.getJSONArray(\"data\").optJSONObject(i).optString(\"fundid\"));\n mutualFundHouseObj.setFundName(response.getJSONArray(\"data\").optJSONObject(i).optString(\"fundname\"));\n mSuggestionArrayList.add(mutualFundHouseObj);\n }\n //INSTANTIATING CUSTOM ADAPTER\n mMutualFundAdapter = new MutualFund_CustomAdapter(MainActivity.this, mSuggestionArrayList);\n mAutoCompleteTextView.setThreshold(1);//will start working from first character\n mAutoCompleteTextView.setAdapter(mMutualFundAdapter);//setting the adapter data into the AutoCompleteTextView\n\n }\n\n @Override\n public void onError(String message, String title) {\n\n }\n });\n }", "private void autoCompleteField(int autoCompleteViewId, int editViewId, String dbField, String[] defaultValues) {\r\n\t\tmDbHelper.open();\r\n\t\tAutoCompleteTextView textView = (AutoCompleteTextView) findViewById(autoCompleteViewId);\r\n\t Cursor cursor = mDbHelper.fetch(dbField);\r\n\t if (cursor != null && cursor.getCount() > 0) {\r\n\t \tstartManagingCursor(cursor);\r\n\t\t\tint index = cursor.getColumnIndexOrThrow(dbField);\r\n\t \tList<String> field = new ArrayList<String>();\r\n\t \tif (defaultValues != null)\r\n\t \t\tfor (String value: defaultValues)\r\n\t \t\t\tfield.add(value);\r\n\t \tboolean last = false;\r\n\t \twhile (!last) {\r\n\t \t\tfield.add(cursor.getString(index));\r\n\t \t\tlast = cursor.isLast();\r\n\t \t\tcursor.moveToNext();\r\n\t \t}\r\n \t\tArrayAdapter<String> adapter = new ArrayAdapter<String>(this, editViewId, field);\r\n \t\ttextView.setAdapter(adapter);\r\n\t }\r\n\t mDbHelper.close();\r\n\t}", "void suggest(T value);", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.main);\n selection = (TextView)findViewById(R.id.con_str);\n editor = (AutoCompleteTextView) findViewById(R.id.editor);\n editor.addTextChangedListener(this);\n editor.setAdapter(new ArrayAdapter<String>(this,android.R.layout.simple_dropdown_item_1line,items)); \n }", "public List getSearchList () {\nif (searchList == null) {//GEN-END:|45-getter|0|45-preInit\n // write pre-init user code here\nsearchList = new List (\"Tidigare S\\u00F6kningar\", Choice.IMPLICIT);//GEN-BEGIN:|45-getter|1|45-postInit\nsearchList.addCommand (getOkCommand1 ());\nsearchList.addCommand (getBackCommand2 ());\nsearchList.setCommandListener (this);//GEN-END:|45-getter|1|45-postInit\n // write post-init user code here\nint size = searches.size();\n for(int i = 0; i < size; i++){\n String content = (String) searches.elementAt(i);\n String title = content.substring(0,content.indexOf(\";\"));\n \n searchList.append(title, null);\n }\n}//GEN-BEGIN:|45-getter|2|\nreturn searchList;\n}", "public void generateList(SearchAutoCompleteListener searchAutoCompleteListener) {\n RequestQueue queue= RequestQueueSingleton.getInstance(this.context).getRequestQueue();\n queue.cancelAll(\"search\");\n if (this.nameOrCode.length() > 0) {\n StringRequest request = new StringRequest(Request.Method.GET,\n Api.autoCompleteString +\"?q=\"+this.nameOrCode,\n (String response) -> {\n try {\n JSONObject data = new JSONObject(response);\n JSONArray placearray = data.getJSONArray(\"places\");\n\n if (placearray.length() == 0) {\n Log.d(TAG,\"Place Not Found\");\n searchAutoCompleteListener.onFailure(JsonUtils.logError(TAG,response));\n } else {\n ArrayList<Place> searchPlaces = JsonUtils.getPlaces(placearray);\n searchAutoCompleteListener.onPlaceListReceived(searchPlaces);\n }\n } catch (JSONException e) {\n searchAutoCompleteListener.onFailure(JsonUtils.logError(TAG,response));\n }\n },\n error ->{\n Log.d(TAG,JsonUtils.handleResponse(error));\n searchAutoCompleteListener.onFailure(JsonUtils.handleResponse(error));\n }){\n };\n request.setTag(\"search\");\n queue.add(request);\n }\n }", "public void refreshSuggestionList() {\n \t\tif (isAttached()) {\n \t\t\trefreshSuggestions();\n \t\t}\n \t}", "@Override\n \tpublic void setInputLock(boolean lock) {\n \t\tselector.getSuggestBox().getTextBox().setReadOnly(lock);\n \t}", "private SearchAutoCompleteAPI(Context context,String nameOrCode){\n this.context=context;\n this.nameOrCode=nameOrCode;\n }", "private void autoCompleteField(int autoCompleteViewId, int editViewId, String dbField) {\r\n \tautoCompleteField(autoCompleteViewId, editViewId, dbField, null);\r\n }", "private void addAllCompletions(Vector completions)\n {\n String oldText = m_textField.getText();\n int oldCaretPosition = m_textField.getCaretPosition();\n if (completions.size() > m_comboBox.getItemCount())\n m_comboBox.hidePopup();\n m_comboBox.removeAllItems();\n for (int i = completions.size() - 1; i >= 0 ; --i)\n {\n Object object = wrapperObject((String)completions.get(i));\n m_comboBox.addItem(object);\n }\n m_comboBox.setSelectedIndex(-1);\n m_textField.setText(oldText);\n m_textField.setCaretPosition(oldCaretPosition);\n }", "@ZAttr(id=360)\n public void setGalAutoCompleteLdapFilter(String zimbraGalAutoCompleteLdapFilter) throws com.zimbra.common.service.ServiceException {\n HashMap<String,Object> attrs = new HashMap<String,Object>();\n attrs.put(Provisioning.A_zimbraGalAutoCompleteLdapFilter, zimbraGalAutoCompleteLdapFilter);\n getProvisioning().modifyAttrs(this, attrs);\n }" ]
[ "0.70306593", "0.6847924", "0.6774721", "0.6753833", "0.6615795", "0.6353897", "0.6310012", "0.6279028", "0.6272024", "0.61863303", "0.61665255", "0.61041147", "0.60921484", "0.59899235", "0.59872305", "0.5929467", "0.592313", "0.5893128", "0.5892637", "0.58925307", "0.58681494", "0.5840538", "0.58336395", "0.5830398", "0.5814757", "0.57860005", "0.5755653", "0.57268614", "0.5701155", "0.56863594", "0.56733996", "0.56555915", "0.5653135", "0.56468356", "0.5643871", "0.5624915", "0.5603582", "0.5592802", "0.5585978", "0.5568975", "0.55377483", "0.5536416", "0.553517", "0.5516095", "0.55104893", "0.55040926", "0.5503212", "0.54916817", "0.54904467", "0.54659474", "0.54555094", "0.5454963", "0.54545885", "0.54540557", "0.54503196", "0.54470086", "0.5419847", "0.54127264", "0.53645366", "0.5359714", "0.5348646", "0.53448844", "0.532087", "0.5317747", "0.53174144", "0.5315437", "0.53048474", "0.5303383", "0.5299428", "0.52964216", "0.5295322", "0.52948475", "0.52885884", "0.5281253", "0.5281017", "0.52710146", "0.5266441", "0.52641684", "0.52629846", "0.5261017", "0.5240191", "0.5225156", "0.52226245", "0.5221156", "0.52124536", "0.5209958", "0.5202409", "0.5199574", "0.51943666", "0.5194011", "0.5183359", "0.5181734", "0.5161448", "0.5160123", "0.5150059", "0.5144022", "0.5141472", "0.51349545", "0.51306397", "0.5124944" ]
0.54045516
58
Sets the location that will be used for biasing the Place results. The API will favor Places close to the set location when producing results
public void setCurrentLocation(@Nullable final Location currentLocation) { api.setCurrentLocation(currentLocation); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final void setLocation(Coord location) {\n this.location = location;\n }", "public void setLocation(String location) {\n inputParameters.Location = location;\n\n }", "public void setLocation(Location location) {\n this.location = location;\n }", "public void setLocation(Location location) {\n this.location = location;\n }", "public void setLocation(Location location) {\n this.location = location;\n }", "public com.babbler.ws.io.avro.model.BabbleValue.Builder setLocation(java.lang.String value) {\n validate(fields()[3], value);\n this.location = value;\n fieldSetFlags()[3] = true;\n return this;\n }", "public void setLocation(LatLng _location) {\n location = _location;\n }", "public void setLocation(Location location) {\r\n\t\tthis.location = location;\r\n\t}", "public void setLocation(Location location) \n\t{\n\t\tthis.location = location;\n\t}", "public void setLocation(Location loc) {\n this.location = loc;\n }", "public void setLocation(LatLng location) {\r\n \t\tthis.mapLocation = location;\r\n \t}", "public void setLocation(String location);", "public void setLocation(Point location) {\n\t\tthis.location = location;\n\t}", "public void setLocation(String location){\n mLocation = location;\n loadData();\n }", "public void setLocation(final String locationValue) {\n this.location = locationValue;\n }", "public void setLocation(final String locationValue) {\n this.location = locationValue;\n }", "public void setResultLocationLongitude(double resultLocationLongitude) {\n this.resultLocationLongitude = resultLocationLongitude;\n }", "public void setLocation(LatLng location) {\n\t\tthis.location = location;\n\t}", "public void setLocation(final String locationValue) {\n this.location = locationValue;\n }", "protected void setLocation(String location){\r\n this.location = location;\r\n }", "public final void setLocation(String value) {\n location = value;\n }", "public void setLocation(String location)\n {\n this.location = location;\n }", "public void setLocation(String location) {\n this.location = location;\n }", "@Override\n\tpublic void setLocation(long location) {\n\t\t_buySellProducts.setLocation(location);\n\t}", "public void setLocation(String location) {\r\n this.location = location;\r\n }", "public void setLocation(String location){\n this.location = location;\n }", "public void setLocation(String location){\n this.location = location;\n }", "public void setLocation(final String location) {\n this.location = location;\n }", "public void setLocation(String location) {\r\n this.location = location;\r\n }", "public void setLocation(String location) {\n this.location = location;\n }", "public void setLocation(String location) {\n this.location = location;\n }", "public void setLocation(String location) {\n this.location = location;\n }", "public void setLocation(String location) {\n this.location = location;\n }", "@Override\n public void setLocation(String location) {\n this.location = location;\n }", "public void setLocation(@NonNull final Location location) {\n this.location = Preconditions.checkNotNull(location, \"location\");\n }", "public void setLocation(String location) {\n this.location = location;\n }", "public void setLocationAddress(final BwString val) {\n locationAddress = val;\n }", "public void setLocation( final double[] location )\n\t{\n\t\tthis.location = location;\n\t}", "public Builder setLocation(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n location_ = value;\n onChanged();\n return this;\n }", "public void setLocation(Point loc){\n\t\tthis.location = loc;\n\t}", "public void setLocation(String location) {\r\n\t\tthis.location = location;\r\n\t}", "@Override\n\t\t\tpublic void onLocationChanged(Location location) {\n\t\t\t\t\n\t\t\t\tmLatitude = location.getLatitude();\n\t\t\t\tmLongitude = location.getLongitude();\n\t\t\t\t\n\t\t\t\t LatLng point = new LatLng(mLatitude, mLongitude);\n\t\t\t\t\n\t\t\t\t try {\n\t\t\t\t \taddresses = geocoder.getFromLocation(location.getLatitude(), location.getLongitude(), 1);\n\t\t\t\t } catch (IOException e) {\n\t\t\t\t \t// TODO Auto-generated catch block\n\t\t\t\t \te.printStackTrace();\n\t\t\t\t }\n\t\t\t\t MarkerOptions maker= new MarkerOptions().position(point);\n\n\t\t\t\t address = addresses.get(0).getAddressLine(0);\n\t\t\t\t if(address==null)\n\t\t\t\t {\n\t\t\t\t\t maker.title(\"My Location\");\n\t\t\t\t\t\tgoogleMap.addMarker(maker);\n\t\t\t\t }\n\t\t\t\t else\n\t\t\t\t {\n\t\t\t\t\tmaker.title(\"\"+address);\n\t\t\t\t\tgoogleMap.addMarker(maker);\n\t\t\t\t }\n\t\t\t\t \n\t\t\t\t String type = mPlaceType;\n\t\t\t StringBuilder sb = new StringBuilder(\"https://maps.googleapis.com/maps/api/place/nearbysearch/json?\");\n\t\t\t sb.append(\"location=\"+mLatitude+\",\"+mLongitude);\n\t\t\t sb.append(\"&radius=1500\");\n\t\t\t sb.append(\"&types=\"+type);\n\t\t\t sb.append(\"&sensor=true\");\n\t\t\t sb.append(\"&key=AIzaSyAwZSGS1kZG7_UuqxqHH3MdO1hbwB2cjag\"); \n\t\t\t PlacesTask placesTask = new PlacesTask(); \n\t\t\t placesTask.execute(sb.toString());\n\t\t\t \n\t\t\t \n\t\t\t if(zoomm)\n\t\t\t {\n\t\t\t \t googleMap.animateCamera(CameraUpdateFactory.newCameraPosition(new CameraPosition(point, 15, 30, 0)));\n\t\t\t \t zoomm=false;\n\t\t\t }\n\t\t\t\t\n\t\t\t}", "private void setLocation(Location newLocation) {\n\t\tif (location != null) {\n\t\t\tfield.clear(location);\n\t\t}\n\t\tlocation = newLocation;\n\t\tfield.place(this, newLocation);\n\t}", "public void setLocation(String location) {\n this.location.setText(location);\n }", "@Override\n\tpublic void setLongitude(double Longitude) {\n\t\t_locMstLocation.setLongitude(Longitude);\n\t}", "public final void setLocation(Tile location) {\n this.location = location;\n }", "public void setLocationAddress(String locationAddress) {\n this.locationAddress = locationAddress;\n }", "public Builder setLocation(phaseI.Hdfs.DataNodeLocation value) {\n if (locationBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n location_ = value;\n onChanged();\n } else {\n locationBuilder_.setMessage(value);\n }\n bitField0_ |= 0x00000002;\n return this;\n }", "protected void setLocation(Location newLocation)\n {\n if(location != null) {\n field.clear(location);\n }\n location = newLocation;\n field.place(this, newLocation);\n }", "public void setLocation(String location) {\n\t\tthis.location = location;\n\t}", "public void setLocation(String location) {\n\t\tthis.location = location;\n\t}", "public void setLocation(String location) {\n\t\tthis.location = location;\n\t}", "public void setResultLocationLatitude(double resultLocationLatitude) {\n this.resultLocationLatitude = resultLocationLatitude;\n }", "public void setLocation(Planet location) {\r\n this.location = location;\r\n }", "public void setLocation(Point newLocation) {\r\n this.p = newLocation;\r\n }", "@Override\r\n public void getLocation(Location location) {\r\n if (REQUEST != PLACE_AUTOCOMPLETE_REQUEST_CODE || REQUEST != OPEN_SETTINGS) {\r\n mCurrentLocation = location;\r\n moveToCurrentLocation();\r\n }\r\n }", "@Override\n\tpublic void setLocation(String l) {\n\t\tlocation = l;\n\t\t\n\t}", "public void setLocation(Coordinate coordinate);", "public CreateStatementBuilder setLocation(Location location) {\n this.location = location.toURI().toString();\n return this;\n }", "@Override\n public void setLocation(String latitude, String longitude) {\n lat = latitude;\n lon = longitude;\n }", "@Override\r\n public void getLocation(Location location) {\r\n if(!(REQUEST==PLACE_AUTOCOMPLETE_REQUEST_CODE || REQUEST==OPEN_SETTINGS)){\r\n mCurrentLocation = location;\r\n moveToCurrentLocation();\r\n }\r\n }", "public void setLocation(double locationX, double locationY) {\r\n\t\tlocation = new Point2D(locationX, locationY);\r\n\t}", "private void getLocation() {\n fields = Arrays.asList(Place.Field.ID, Place.Field.NAME, Place.Field.LAT_LNG);\n\n // Start the autocomplete intent.\n Intent intent = new Autocomplete.IntentBuilder(\n AutocompleteActivityMode.FULLSCREEN, fields)\n .build(this);\n startActivityForResult(intent, AUTOCOMPLETE_REQUEST_CODE);\n }", "public void setLocation(Vec2f loc) {\n\t\tsuper.setLocation(loc);\n\t\tif (_shape != null) _shape.setLocation(loc);\n\t}", "public void setLocation(Point2D location) {\r\n\t\t\r\n\t\tif(this.getLocation() != null)\r\n\t\t\tsuper.setLocation(location);\r\n\t\t\r\n\t}", "public void setLocation(Vector location);", "@Override\n public void setLocation(geo_location p) {\n this.location.setX(p.x());\n this.location.setY(p.y());\n this.location.setZ(p.z());\n }", "private void setLocationRequest() {\n locationRequest = new LocationRequest();\n locationRequest.setInterval(10000); // how often we ask provider for location\n locationRequest.setFastestInterval(5000); // 'steal' location from other app\n locationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY); // can pick balanced power accuracy\n }", "public nl.tudelft.ewi.st.atlantis.tudelft.v1.services.SetServiceLocationResponse setServiceLocation\n (\n nl.tudelft.ewi.st.atlantis.tudelft.v1.services.SetServiceLocationRequest setServiceLocationRequest\n )\n ;", "public void setBedSpawnLocation ( Location location ) {\n\t\texecute ( handle -> handle.setBedSpawnLocation ( location ) );\n\t}", "@Override\n\tpublic void setLatitude(double Latitude) {\n\t\t_locMstLocation.setLatitude(Latitude);\n\t}", "private void setLocation(String name, LatLng latLng) {\n googleMap.addMarker(new MarkerOptions().position(latLng)\n .title(name));\n googleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(latLng, 18));\n }", "public void setRobotLocation(Point p);", "public void testSetGoalLocation() {\n test = new Location(9, 9);\n assertEquals(test, maze1.getGoalLocation());\n \n test = new Location(1, 1);\n maze1.setGoalLocation(test);\n assertEquals(test, maze1.getGoalLocation());\n \n test = new Location(2, 2);\n maze1.setCell(test, MazeCell.WALL);\n maze1.setGoalLocation(test);\n assertEquals(test, maze1.getGoalLocation());\n \n \n }", "public void setWarp(Location loc) {\n if (loc != null) {\n warp = new ImmutableSimpleLocation(loc);\n }\n }", "void setPosition(Unit unit, MapLocation position);", "void setLongitude(Double longitude);", "@Override\n\tpublic void setLocation(Point location) throws CannotPlaceUserException {\n\t\tsuper.setLocation(location);\n\t}", "public void setPhysicsLocation(Vector3f location) {\n warp(location);\n }", "public void setTargetLocation(Location targetLocation) \n {\n this.targetLocation = targetLocation;\n }", "public void setLocation(double lon, double lat) {\n\t\tthis.lon = lon;\n\t\tthis.lat = lat;\n\t}", "public Builder setLocation(\n phaseI.Hdfs.DataNodeLocation.Builder builderForValue) {\n if (locationBuilder_ == null) {\n location_ = builderForValue.build();\n onChanged();\n } else {\n locationBuilder_.setMessage(builderForValue.build());\n }\n bitField0_ |= 0x00000002;\n return this;\n }", "private void setCurrentLocation() {\n foundLocation = false;\n //Ignore the red line - we check for permissions before this function is called\n if (ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED &&\n ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n return;\n }\n googleMap.setMyLocationEnabled(true);\n FusedLocationProviderClient mFusedLocationProviderClient = LocationServices\n .getFusedLocationProviderClient(getActivity());\n //Ignore the red line - we check for permissions before this function is called\n Task<Location> lastLocation = mFusedLocationProviderClient.getLastLocation();\n lastLocation.addOnCompleteListener(task -> {\n if (task.isSuccessful()) {\n // Set the map's camera position to the current location of the device.\n Location location = task.getResult();\n if (location == null) {\n locationControlTask = new LocationControl();\n locationControlTask.execute(getActivity());\n } else {\n LatLng currentLatLng = new LatLng(location.getLatitude(),\n location.getLongitude());\n CameraUpdate update = CameraUpdateFactory.newLatLngZoom(currentLatLng,\n DEFAULT_ZOOM);\n googleMap.moveCamera(update);\n foundLocation = true;\n }\n }\n });\n }", "public void setLocationType(LocationType value) { _locationType = value; }", "public Place(String Location, String Name) {\n mLocation = Location;\n mName = Name;\n }", "public void setLocationInfo(Location locationInfo) {\n\tthis.locationInfo = locationInfo;\n}", "public void setLocation(URI location)\r\n/* 288: */ {\r\n/* 289:432 */ set(\"Location\", location.toASCIIString());\r\n/* 290: */ }", "protected void SetupLocationRequest()\n {\n mLocationRequest = LocationRequest.create()\n .setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY)\n .setInterval(30 * 1000) // 30 seconds, in milliseconds\n .setFastestInterval(1 * 1000); // 1 second, in milliseconds\n }", "public Builder setLocationBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n location_ = value;\n onChanged();\n return this;\n }", "public void setLocation(final String theLocation) {\n\t\tif (theLocation == null || theLocation.length() == 0) {\n\t\t\tthrow new IllegalArgumentException(\"Please supply a valid location.\");\n\t\t}\n\t\tthis.mLocation = theLocation;\n\t}", "public FoursquarePathBuilder setNear(String location) {\n addParameter(\"near\", location);\n return this;\n }", "public void setPlace(String place){\n this.place = place;\n }", "@Test\n public void testSetLocation() {\n try {\n Location location = new Location(45, 50);\n WaterReport wr = new WaterReport(Model.getCurrentAccount(),\n \"Bottled\", \"Waste\", \"12:04\", location);\n wr.setLocation(new Location(40, 35));\n Location check = new Location(40, 35);\n Assert.assertEquals(\"Incorrect location after setting new location\", check,\n wr.getLocation());\n } catch (Exception e) {\n Assert.fail(\"Set Location should not have thrown exception here\");\n e.printStackTrace();\n }\n }", "public void setLocationData(org.afscme.enterprise.organization.LocationData locationData) {\n this.locationData = locationData;\n }", "public void makeUseOfNewLocation(Location location) {\n \t\tString place = null;\n \t\tif(location!=null)\n \t\t{\n \t\t\tGeocoder gc = new Geocoder(organise.getApplicationContext());\n \t\t\ttry {\n \t\t\t\tList<Address> list = gc.getFromLocation(location.getLatitude(), location.getLongitude(), 5);\n \t\t\t\tint i = 0;\n \t\t\t\twhile (i<list.size()) \n \t\t\t\t{\n \t\t\t\t\tString temp = list.get(i).getLocality();\n \t\t\t\t\tif(temp!=null) {place = temp;}\n \t\t\t\t\ti++;\n \t\t\t\t}\n \t\t\t\tif(place!=null) {cur_loc.setText(place);}\n \t\t\t\telse {cur_loc.setText(\"(\" + location.getLatitude() + \",\" + location.getLongitude() + \")\");}\n \t\t\t}\n \t\t\t//This is thrown if the phone has no Internet connection.\n \t\t\tcatch (IOException e) {\n \t\t\t\tcur_loc.setText(\"(\" + location.getLatitude() + \",\" + location.getLongitude() + \")\");\n \t\t\t}\n \t\t}\n \t}", "void setOrigination(Locations origination);", "@Override\n public void setLocation(Point location) {\n pos = location;\n try {\n if (TerraGen.window != null && TerraGen.window.getClient() != null)\n TerraGen.window.getClient().pushGameChange(TerraGen.window.game.getMap().getTokens().indexOf(this), NetworkType.TOKEN, this);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void setCurrentLocation(Location newLocation)\n\t{\n\t\tcurrentLocation = newLocation;\n\t}", "public void setBaiduMapLocation(double longitude, double latitude) {\n MapStatusUpdate u1 = MapStatusUpdateFactory.newLatLng(GEO_TIANJIN);\n baiduMap.setMapStatus(MapStatusUpdateFactory.newMapStatus(\n new MapStatus.Builder().zoom(15f).build())\n );\n baiduMap.setMapStatus(u1);\n BitmapDescriptor bitmap = BitmapDescriptorFactory\n .fromResource(R.drawable.icon_marka);\n OverlayOptions option = new MarkerOptions()\n .position(GEO_TIANJIN)\n .icon(bitmap);\n baiduMap.addOverlay(option);\n }", "public void setTargetLocation(Point location) {\n this.targetLocation = location;\n }", "public void setLocation(Location loc) {\n if (loc.getLatitude() != 0.0 && loc.getLongitude() != 0.0) {\n try {\n Geocoder geocoder = new Geocoder(this, Locale.getDefault());\n List<Address> list = geocoder.getFromLocation(\n loc.getLatitude(), loc.getLongitude(), 1);\n if (!list.isEmpty()) {\n Address DirCalle = list.get(0);\n mensaje2.setText(\n DirCalle.getAddressLine(0));\n }\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }" ]
[ "0.66042936", "0.6364431", "0.6354877", "0.6354877", "0.6354877", "0.63241637", "0.62811273", "0.622308", "0.6216291", "0.6215386", "0.61839134", "0.61341417", "0.6126435", "0.61183214", "0.61132926", "0.61132926", "0.60941386", "0.6079558", "0.6079207", "0.6058788", "0.605545", "0.60277903", "0.60174835", "0.6008226", "0.6007181", "0.5999386", "0.5999386", "0.5987217", "0.59786034", "0.59663045", "0.59663045", "0.59663045", "0.59663045", "0.59008694", "0.5900491", "0.5898071", "0.5891378", "0.58854455", "0.58836645", "0.58767194", "0.5863377", "0.58526254", "0.58386654", "0.58223826", "0.58019364", "0.57708555", "0.5760293", "0.5757118", "0.5749587", "0.573843", "0.573843", "0.573843", "0.56741136", "0.5663002", "0.5661743", "0.56483924", "0.5641106", "0.56256807", "0.5625098", "0.56219596", "0.5612366", "0.55844903", "0.55746543", "0.55631006", "0.55442125", "0.553752", "0.5530986", "0.55251795", "0.55251235", "0.55238384", "0.55010736", "0.5493498", "0.54809445", "0.54804605", "0.5472622", "0.547056", "0.54686034", "0.5448054", "0.5442242", "0.54394716", "0.543614", "0.54324037", "0.54293007", "0.5426069", "0.5424188", "0.54215354", "0.5421431", "0.5420409", "0.5418031", "0.5409161", "0.54045004", "0.5358594", "0.5357332", "0.5357244", "0.5350002", "0.53267795", "0.5319462", "0.53076136", "0.5307239", "0.53069615", "0.53040963" ]
0.0
-1
Allows for enabling and disabling location biasing in the Places api.
public void setLocationBiasEnabled(boolean enabled) { api.setLocationBiasEnabled(enabled); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setBias(Bias bias) {\n this.bias = bias;\n }", "public void setIsLat(Boolean boo) {\n\t this.isLat = boo;\n }", "private void initLocation() {\n BaiduLocationHolder.OPTION.setLocationMode(LocationClientOption.LocationMode.Hight_Accuracy);\n //可选,默认高精度,设置定位模式,高精度,低功耗,仅设备\n\n BaiduLocationHolder.OPTION.setCoorType(\"bd09ll\");\n //可选,默认gcj02,设置返回的定位结果坐标系\n\n int span = 1000;\n BaiduLocationHolder.OPTION.setScanSpan(span);\n //可选,默认0,即仅定位一次,设置发起定位请求的间隔需要大于等于1000ms才是有效的\n\n BaiduLocationHolder.OPTION.setIsNeedAddress(true);\n //可选,设置是否需要地址信息,默认不需要\n\n BaiduLocationHolder.OPTION.setOpenGps(true);\n //可选,默认false,设置是否使用gps\n\n BaiduLocationHolder.OPTION.setLocationNotify(true);\n //可选,默认false,设置是否当GPS有效时按照1S/1次频率输出GPS结果\n\n BaiduLocationHolder.OPTION.setIsNeedLocationDescribe(true);\n //可选,默认false,设置是否需要位置语义化结果,可以在BDLocation.getLocationDescribe里得到,结果类似于“在北京天安门附近”\n\n BaiduLocationHolder.OPTION.setIsNeedLocationPoiList(true);\n //可选,默认false,设置是否需要POI结果,可以在BDLocation.getPoiList里得到\n\n BaiduLocationHolder.OPTION.setIgnoreKillProcess(false);\n //可选,默认true,定位SDK内部是一个SERVICE,并放到了独立进程,设置是否在stop的时候杀死这个进程,默认不杀死\n\n BaiduLocationHolder.OPTION.SetIgnoreCacheException(false);\n //可选,默认false,设置是否收集CRASH信息,默认收集\n\n BaiduLocationHolder.OPTION.setEnableSimulateGps(false);\n //可选,默认false,设置是否需要过滤GPS仿真结果,默认需要\n\n// BaiduLocationHolder.OPTION.setWifiValidTime(5*60*1000);\n //可选,7.2版本新增能力,如果您设置了这个接口,首次启动定位时,会先判断当前WiFi是否超出有效期,超出有效期的话,会先重新扫描WiFi,然后再定位\n\n BaiduLocationHolder.CLIENT.setLocOption(BaiduLocationHolder.OPTION);\n }", "private void updateLocationUi() {\n if (mMap == null) {\n return;\n }\n try {\n if (mPermissionCheck.locationPermissionGranted()) {\n mMap.setMyLocationEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n } else {\n mMap.setMyLocationEnabled(false);\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n }\n } catch (SecurityException e) {\n Log.e(\"Exception: %s\", e.getMessage());\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n mUiSettings = mMap.getUiSettings();\n mMap.setTrafficEnabled(true);\n mMap.setBuildingsEnabled(true);\n mUiSettings.setZoomControlsEnabled(true);\n mUiSettings.setZoomGesturesEnabled(true);\n mUiSettings.setCompassEnabled(true);\n mMap.setBuildingsEnabled(true);\n mMap.setTrafficEnabled(true);\n mMap.setIndoorEnabled(true);\n search(address);\n //checking if appropriate permissions are granted\n if(ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED){\n return;\n }\n mMap.setMyLocationEnabled(true);\n }", "public void setBiasInNs(double r1) {\n /*\n // Can't load method instructions: Load method exception: null in method: android.location.GpsClock.setBiasInNs(double):void, dex: in method: android.location.GpsClock.setBiasInNs(double):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.location.GpsClock.setBiasInNs(double):void\");\n }", "private void configMap() {\n\n googleMap.getUiSettings().setMapToolbarEnabled(false);//an buton dieu huong bat snag map\n\n googleMap.getUiSettings().setMyLocationButtonEnabled(true);//nut vi tri cua minh tru se hien thi\n googleMap.getUiSettings().setZoomControlsEnabled(true);//co the zoom\n\n// b2\n googleMap.setInfoWindowAdapter(new MyInfoWindown());//cutom titlemap\n\n try {//them lenh nay de no cap location thì cai nut tren moi hoat dong\n\n googleMap.setMyLocationEnabled(true);//cung cap vi tri cua minh,can try cacth xin quyen\n } catch (SecurityException e) {\n\n }\n googleMap.setOnMyLocationButtonClickListener(this);//dNG KY\n\n\n }", "public void chooseBiasValue() {\r\n \r\n if (biasMode.charAt(0) == 't')\r\n {\r\n for (int i=0; i < hiddenLayerContainer.getHiddenLayerContainer().size(); i++){\r\n hiddenLayerContainer.getHiddenLayerContainer().get(i).setBiasActive(true);\r\n }\r\n outputLayer.setBiasActive(true);\r\n }\r\n }", "private void enableLocationTracking() {\n map.getTrackingSettings().setDismissAllTrackingOnGesture(false);\n\n // Enable location and bearing tracking\n map.getTrackingSettings().setMyLocationTrackingMode(MyLocationTracking.TRACKING_FOLLOW);\n map.getTrackingSettings().setMyBearingTrackingMode(MyBearingTracking.COMPASS);\n }", "private void setupAddLocation() {\n GoogleApiAvailability apiAvailability = GoogleApiAvailability.getInstance();\n int resultCode = apiAvailability.isGooglePlayServicesAvailable(this);\n if (resultCode != ConnectionResult.SUCCESS) {\n // remove add location linear\n mAddLocationLinear.setVisibility(View.INVISIBLE);\n }\n\n }", "private void enableLocation(){\n if(PermissionsManager.areLocationPermissionsGranted(this))\n {\n initializeLocationEngine();\n initializeLocationLayer();\n\n\n }else{\n permissionsManager = new PermissionsManager(this);\n permissionsManager.requestLocationPermissions(this);\n }\n }", "public void turnGPSOff()\n {\n String provider = Settings.Secure.getString(context.getContentResolver(), Settings.Secure.LOCATION_PROVIDERS_ALLOWED);\n if(provider.contains(\"gps\")){ //if gps is enabled\n final Intent poke = new Intent();\n poke.setClassName(\"com.android.settings\", \"com.android.settings.widget.SettingsAppWidgetProvider\");\n poke.addCategory(Intent.CATEGORY_ALTERNATIVE);\n poke.setData(Uri.parse(\"3\"));\n this.context.sendBroadcast(poke);\n }\n }", "private void enableLoc() {\r\n if (googleApiClient == null) {\r\n googleApiClient = new GoogleApiClient.Builder(this)\r\n .addApi(LocationServices.API)\r\n .addConnectionCallbacks(new GoogleApiClient.ConnectionCallbacks() {\r\n @Override\r\n public void onConnected(Bundle bundle) {\r\n\r\n }\r\n\r\n @Override\r\n public void onConnectionSuspended(int i) {\r\n googleApiClient.connect();\r\n }\r\n })\r\n .addOnConnectionFailedListener(new GoogleApiClient.OnConnectionFailedListener() {\r\n @Override\r\n public void onConnectionFailed(ConnectionResult connectionResult) {\r\n\r\n Log.d(\"Location error\", \"Location error \" + connectionResult.getErrorCode());\r\n }\r\n }).build();\r\n googleApiClient.connect();\r\n\r\n LocationRequest locationRequest = LocationRequest.create();\r\n locationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\r\n locationRequest.setInterval(30 * 1000);\r\n locationRequest.setFastestInterval(5 * 1000);\r\n LocationSettingsRequest.Builder builder = new LocationSettingsRequest.Builder()\r\n .addLocationRequest(locationRequest);\r\n\r\n builder.setAlwaysShow(true);\r\n\r\n PendingResult<LocationSettingsResult> result =\r\n LocationServices.SettingsApi.checkLocationSettings(googleApiClient, builder.build());\r\n result.setResultCallback(new ResultCallback<LocationSettingsResult>() {\r\n @Override\r\n public void onResult(LocationSettingsResult result) {\r\n final Status status = result.getStatus();\r\n switch (status.getStatusCode()) {\r\n case LocationSettingsStatusCodes.RESOLUTION_REQUIRED:\r\n try {\r\n Show the dialog by calling startResolutionForResult(),\r\n and check the result in onActivityResult().\r\n status.startResolutionForResult(Newmaps.this, REQUEST_LOCATION);\r\n } catch (IntentSender.SendIntentException e) {\r\n // Ignore the error.\r\n }\r\n break;\r\n }\r\n }\r\n });\r\n }\r\n\r\n }", "@SuppressLint(\"MissingPermission\")\n @AfterPermissionGranted(PERMISSION_LOCATION_ID)\n private void setMapUISettings() {\n map.getUiSettings().setZoomControlsEnabled(true);\n map.getUiSettings().setCompassEnabled(true);\n map.getUiSettings().setAllGesturesEnabled(true);\n\n map.setOnMyLocationClickListener(new GoogleMap.OnMyLocationClickListener() {\n @Override\n public void onMyLocationClick(@NonNull Location location) {\n\n }\n });\n\n map.setOnMyLocationButtonClickListener(new GoogleMap.OnMyLocationButtonClickListener() {\n @Override\n public boolean onMyLocationButtonClick() {\n return false;\n }\n });\n\n if (EasyPermissions.hasPermissions(requireContext(), Manifest.permission.ACCESS_FINE_LOCATION))\n map.setMyLocationEnabled(true);\n else\n EasyPermissions.requestPermissions(this, \"Access fine location needed to get my location\", PERMISSION_LOCATION_ID, Manifest.permission.ACCESS_FINE_LOCATION);\n }", "@Override\n \t\t\tpublic void onCheckedChanged(CompoundButton arg0, boolean arg1) {\n \t\t\t\tif(arg1==true)\n \t\t\t\t\tmMap.setMyLocationEnabled(true);\n \t\t\t\telse\n \t\t\t\t\tmMap.setMyLocationEnabled(false);\n \t\t\t}", "@Override\n \t\t\tpublic void onCheckedChanged(CompoundButton arg0, boolean arg1) {\n \t\t\t\tif(arg1==true)\n \t\t\t\t\tmMap.setMyLocationEnabled(true);\n \t\t\t\telse\n \t\t\t\t\tmMap.setMyLocationEnabled(false);\n \t\t\t}", "private void updateLocationUI() {\n if (mMap == null) {\n return;\n }\n try {\n if (mLocationPermissionGranted) {\n mMap.setMyLocationEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n } else {\n mMap.setMyLocationEnabled(false);\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n mLastKnownLocation = null;\n getLocationPermission();\n }\n } catch (SecurityException e) {\n Log.e(\"Exception: %s\", e.getMessage());\n }\n }", "private void updateLocationUI() {\n if (mMap == null) {\n return;\n }\n try {\n if (mLocationPermissionGranted) {\n mMap.setMyLocationEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n } else {\n mMap.setMyLocationEnabled(false);\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n mLastKnownLocation = null;\n getLocationPermission();\n }\n } catch (SecurityException e) {\n Log.e(\"Exception: %s\", e.getMessage());\n }\n }", "private void updateLocationUI() {\n if (mMap == null) {\n return;\n }\n try {\n if (mLocationPermissionGranted) {\n mMap.setMyLocationEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n } else {\n mMap.setMyLocationEnabled(false);\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n mLastKnownLocation = null;\n getLocationPermission();\n }\n } catch (SecurityException e) {\n Log.e(\"Exception: %s\", e.getMessage());\n }\n }", "private void updateLocationUI() {\n if (mMap == null) {\n return;\n }\n try {\n if (mLocationPermissionGranted) {\n mMap.setMyLocationEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n } else {\n mMap.setMyLocationEnabled(false);\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n mLastKnownLocation = null;\n getLocationPermission();\n }\n } catch (SecurityException e) {\n Log.e(\"Exception: %s\", e.getMessage());\n }\n }", "@Override\n protected void setUpMap() {\n super.setUpMap();\n // For showing a move to my location button and a blue\n // dot to show user's location\n MainActivity mainActivity = (MainActivity) getActivity();\n mMap.setMyLocationEnabled(mainActivity.checkIfGPSEnabled());\n }", "private void updateLocationUI() {\n if (map == null) {\n return;\n }\n try {\n if (locationPermissionGranted) {\n map.setMyLocationEnabled(true);\n map.getUiSettings().setMyLocationButtonEnabled(true);\n } else {\n map.setMyLocationEnabled(false);\n map.getUiSettings().setMyLocationButtonEnabled(false);\n lastKnownLocation = null;\n getLocationPermission();\n }\n } catch (SecurityException e) {\n Log.e(\"Exception: %s\", e.getMessage());\n }\n }", "public void activate() {\n if (null == mLocationClient) {\n mLocationClient = new AMapLocationClient(mContext.getApplicationContext());\n }\n // 设置定位回调监听\n mLocationClient.setLocationListener(this);\n // 初始化定位参数\n mLocationOption = new AMapLocationClientOption();\n // 设置定位模式为高精度模式,Battery_Saving为低功耗模式,Device_Sensors是仅设备模式\n mLocationOption.setLocationMode(AMapLocationMode.Hight_Accuracy);\n // 设置是否返回地址信息(默认返回地址信息)\n mLocationOption.setNeedAddress(true);\n // 设置是否只定位一次,默认为false\n mLocationOption.setOnceLocation(true);// 只定位一次\n if(mLocationOption.isOnceLocationLatest()){\n mLocationOption.setOnceLocationLatest(true);\n //设置setOnceLocationLatest(boolean b)接口为true,启动定位时SDK会返回最近3s内精度最高的一次定位结果。\n //如果设置其为true,setOnceLocation(boolean b)接口也会被设置为true,反之不会。\n }\n // 设置是否强制刷新WIFI,默认为强制刷新\n mLocationOption.setWifiActiveScan(true);\n // 设置是否允许模拟位置,默认为false,不允许模拟位置\n mLocationOption.setMockEnable(false);\n // 给定位客户端对象设置定位参数\n mLocationClient.setLocationOption(mLocationOption);\n // 启动定位\n mLocationClient.startLocation();\n }", "public void resetBiasInNs() {\n /*\n // Can't load method instructions: Load method exception: null in method: android.location.GpsClock.resetBiasInNs():void, dex: in method: android.location.GpsClock.resetBiasInNs():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.location.GpsClock.resetBiasInNs():void\");\n }", "@Override\n\t\t\tpublic void onLocationChanged(Location location) {\n\t\t\t\t\n\t\t\t\tmLatitude = location.getLatitude();\n\t\t\t\tmLongitude = location.getLongitude();\n\t\t\t\t\n\t\t\t\t LatLng point = new LatLng(mLatitude, mLongitude);\n\t\t\t\t\n\t\t\t\t try {\n\t\t\t\t \taddresses = geocoder.getFromLocation(location.getLatitude(), location.getLongitude(), 1);\n\t\t\t\t } catch (IOException e) {\n\t\t\t\t \t// TODO Auto-generated catch block\n\t\t\t\t \te.printStackTrace();\n\t\t\t\t }\n\t\t\t\t MarkerOptions maker= new MarkerOptions().position(point);\n\n\t\t\t\t address = addresses.get(0).getAddressLine(0);\n\t\t\t\t if(address==null)\n\t\t\t\t {\n\t\t\t\t\t maker.title(\"My Location\");\n\t\t\t\t\t\tgoogleMap.addMarker(maker);\n\t\t\t\t }\n\t\t\t\t else\n\t\t\t\t {\n\t\t\t\t\tmaker.title(\"\"+address);\n\t\t\t\t\tgoogleMap.addMarker(maker);\n\t\t\t\t }\n\t\t\t\t \n\t\t\t\t String type = mPlaceType;\n\t\t\t StringBuilder sb = new StringBuilder(\"https://maps.googleapis.com/maps/api/place/nearbysearch/json?\");\n\t\t\t sb.append(\"location=\"+mLatitude+\",\"+mLongitude);\n\t\t\t sb.append(\"&radius=1500\");\n\t\t\t sb.append(\"&types=\"+type);\n\t\t\t sb.append(\"&sensor=true\");\n\t\t\t sb.append(\"&key=AIzaSyAwZSGS1kZG7_UuqxqHH3MdO1hbwB2cjag\"); \n\t\t\t PlacesTask placesTask = new PlacesTask(); \n\t\t\t placesTask.execute(sb.toString());\n\t\t\t \n\t\t\t \n\t\t\t if(zoomm)\n\t\t\t {\n\t\t\t \t googleMap.animateCamera(CameraUpdateFactory.newCameraPosition(new CameraPosition(point, 15, 30, 0)));\n\t\t\t \t zoomm=false;\n\t\t\t }\n\t\t\t\t\n\t\t\t}", "public void setFullBiasInNs(long r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e7 in method: android.location.GpsClock.setFullBiasInNs(long):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.location.GpsClock.setFullBiasInNs(long):void\");\n }", "private void setUpMap() {\n mMap.setMyLocationEnabled(true);\n }", "@FXML\n void setBtnAddEditLocationOnClick() {\n this.setDisableLocation(false);\n this.setDisableContent(true);\n this.setDisablePrice(true);\n this.setDisableSelectedButtons(false);\n this.setDisableAds(true);\n this.tableViewAds.setDisable(true);\n this.cleanDetailsFields();\n this.selectOptionAddEdit(false, false, true, false);\n\n if (isEdit) {\n this.comboBoxLocation.setDisable(false);\n }\n }", "private void disableRequestLocationUpdate() {\n if (mLocationManager != null) {\n mLocationManager.removeUpdates(mLocationListener);\n mLocationManager = null;\n }\n }", "public void setBias(DriftCheckBias bias) {\n this.bias = bias;\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = mMapFragment.getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n mMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);\n mMap.setMyLocationEnabled(false);\n mMap.getUiSettings().setCompassEnabled(true);\n mMap.getUiSettings().setZoomControlsEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n final LatLng update = getLastKnownLocation();\n if (update != null) {\n mMap.moveCamera(CameraUpdateFactory.newCameraPosition(CameraPosition.fromLatLngZoom(update, 11.0f)));\n }\n\n mMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() {\n\n @Override\n public void onMapClick(LatLng latLng) {\n mIsNeedLocationUpdate = false;\n moveToLocation(latLng, false);\n }\n\n });\n\n }\n }\n }", "private void setDropOffLocation(){\n \t\t// Defines the AutoCompleteTextView with the dropoff address\n \t\tacDropoff = (AutoCompleteTextView)findViewById(R.id.dropoffText);\n \t\t//Controls if the user has entered an address\n \t\tif(!acDropoff.getText().toString().equals(\"\")){\n \t\t\t// Gets the GeoPoint of the given address\n \t\t\tGeoPoint dropoffGeo = GeoHelper.getGeoPoint(acDropoff.getText().toString());\n \t\t\t// Gets the MapLocation from the given GeoPoint\n \t\t\tMapLocation mapLocation = (MapLocation) GeoHelper.getLocation(dropoffGeo);\n \t\t\t// Finds the dropoff location on the route closest to the given address\n \t\t\tLocation temp = findClosestLocationOnRoute(mapLocation);\n \t\t\t\n \t\t\t// Controls if the user has entered a NEW address\n \t\t\tif(dropoffPoint != temp){\n \t\t\t\t// Removes old pickup point (thumb)\n \t\t\t\tif(overlayDropoffThumb != null){\n \t\t\t\t\tmapView.getOverlays().remove(overlayDropoffThumb);\n \t\t\t\t\toverlayDropoffThumb = null;\n \t\t\t\t}\n \t\t\t\tmapView.invalidate();\n \t\t\t\t\n \t\t\t\t// If no pickup point is specified, we add the dropoff point to the map.\n \t\t\t\tif(pickupPoint == null){\n \t\t\t\t\tdropoffPoint = temp;\n \t\t\t\t\toverlayDropoffThumb = drawThumb(dropoffPoint, false);\n \t\t\t\t}else{ // If a pickup point is specified:\n \t\t\t\t\tList<Location> l = getApp().getSelectedJourney().getRoute().getRouteData();\n \t\t\t\t\t// Checks to make sure the dropoff point is after the pickup point.\n \t\t\t\t\tif(l.indexOf(temp) > l.indexOf(pickupPoint)){\n \t\t\t\t\t\t//makeToast(\"The droppoff point has to be after the pickup point\");\n \t\t\t\t\t\tAlertDialog.Builder ad = new AlertDialog.Builder(MapActivityAddPickupAndDropoff.this); \n \t\t\t\t\t\tad.setMessage(\"The droppoff point has to be after the pickup point\");\n \t\t\t\t\t\tad.setTitle(\"Unable to send request\");\n \t\t\t\t\t\tad.setPositiveButton(\"Ok\",new DialogInterface.OnClickListener() {\n \t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,int id) {\n \t\t\t\t\t\t\t\t\n \t\t\t\t\t\t\t}\n \t\t\t\t\t\t });\n \t\t\t\t\t\tad.show();\n \t\t\t\t\t}else{\n \t\t\t\t\t\t// Adds the dropoff point to the map by drawing a cross\n \t\t\t\t\t\tdropoffPoint = temp;\n \t\t\t\t\t\toverlayDropoffThumb = drawThumb(dropoffPoint, false);\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \t\t}else{\n \t\t\t//makeToast(\"Please add a dropoff address\");\n \t\t\tAlertDialog.Builder ad = new AlertDialog.Builder(MapActivityAddPickupAndDropoff.this); \n \t\t\tad.setMessage(\"Please add a dropoff address\");\n \t\t\tad.setTitle(\"Unable to send request\");\n \t\t\tad.setPositiveButton(\"Ok\",new DialogInterface.OnClickListener() {\n \t\t\t\tpublic void onClick(DialogInterface dialog,int id) {\n \t\t\t\t\t\n \t\t\t\t}\n \t\t\t });\n \t\t\tad.show();\n \t\t}\n \t}", "private void activateLocationManager() {\r\n locationManager = (LocationManager) this.getSystemService(Context.LOCATION_SERVICE);\r\n String bestProvider = getBestLocationProvider();\r\n locationAvailable = false;\r\n\r\n // If the bestProvider is not accessible and/or enabled\r\n if (!locationManager.isProviderEnabled(bestProvider)) {\r\n final AlertDialog.Builder builder = new AlertDialog.Builder(this);\r\n builder.setMessage(\"Your LOCATION provider seems to be disabled, do you want to enable it?\")\r\n .setCancelable(false)\r\n .setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\r\n public void onClick(final DialogInterface dialog, final int id) {\r\n startActivity(new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS));\r\n }\r\n })\r\n .setNegativeButton(\"No\", new DialogInterface.OnClickListener() {\r\n public void onClick(final DialogInterface dialog, final int id) {\r\n dialog.cancel();\r\n }\r\n });\r\n final AlertDialog alert = builder.create();\r\n alert.show();\r\n }\r\n\r\n if (locationManager != null && bestProvider != \"\") {\r\n locationManager.requestLocationUpdates(bestProvider, 3000, 1, locationListener);\r\n }\r\n }", "public void setBaiduMapLocation(double longitude, double latitude) {\n MapStatusUpdate u1 = MapStatusUpdateFactory.newLatLng(GEO_TIANJIN);\n baiduMap.setMapStatus(MapStatusUpdateFactory.newMapStatus(\n new MapStatus.Builder().zoom(15f).build())\n );\n baiduMap.setMapStatus(u1);\n BitmapDescriptor bitmap = BitmapDescriptorFactory\n .fromResource(R.drawable.icon_marka);\n OverlayOptions option = new MarkerOptions()\n .position(GEO_TIANJIN)\n .icon(bitmap);\n baiduMap.addOverlay(option);\n }", "public void setGeoLocationEnabled(boolean geoLocationEnabled) {\n this.geoLocationEnabled = geoLocationEnabled;\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n LogUtils.e(TAG, \"onMapReady..\");\n map = googleMap;\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED\n && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n return;\n }\n map.getUiSettings().setMyLocationButtonEnabled(false);\n map.setMyLocationEnabled(true);\n\n }", "public void setLocationInfo(boolean locationInfo) {\n this.locationInfo = locationInfo;\n }", "private void setUpMap() {\n\t\t \n\t\tmMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);\n\t\t//mMap.setMyLocationEnabled(true);\n\t\t\t \n\t\tmMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(\n\t\t\t\tlatitude, longitude), 12.0f));\n\n\t}", "public void mapMode() {\n\t\ttheTrainer.setUp(false);\n\t\ttheTrainer.setDown(false);\n\t\ttheTrainer.setLeft(false);\n\t\ttheTrainer.setRight(false);\n\n\t\tinBattle = false;\n\t\tred = green = blue = 255;\n\t\tthis.requestFocus();\n\t}", "private void turnOnLocationManager(){\n mLocationManager=(LocationManager) this.getSystemService(Context.LOCATION_SERVICE);\n mLocationManager.addTestProvider(LocationManager.GPS_PROVIDER, false, false, false,\n false, true, true, true, 0, 5);\n mLocationManager.setTestProviderEnabled(LocationManager.GPS_PROVIDER, true);\n //mLocationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 0, 0, mLocationSource);\n }", "public double getBias();", "@Test\n public void testIgnorePublisherValues() throws Exception {\n BidRequest ignoredBidRequest = new BidRequest();\n ignoredBidRequest.getDevice().getGeo().lat = 100f;\n ignoredBidRequest.getDevice().getGeo().lon = 200f;\n ignoredBidRequest.getDevice().getGeo().type = GeoLocationParameterBuilder.LOCATION_SOURCE_GPS;\n\n GeoLocationParameterBuilder builder = new GeoLocationParameterBuilder();\n AdRequestInput adRequestInput = new AdRequestInput();\n adRequestInput.setBidRequest(ignoredBidRequest);\n builder.appendBuilderParameters(adRequestInput);\n\n assertEquals(\"{\\\"lat\\\":1,\\\"lon\\\":-1,\\\"type\\\":1}\", adRequestInput.getBidRequest().getDevice().getGeo().getJsonObject().toString());\n }", "public void resetFullBiasInNs() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e7 in method: android.location.GpsClock.resetFullBiasInNs():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.location.GpsClock.resetFullBiasInNs():void\");\n }", "@Override\r\n public void getLocation(Location location) {\r\n if(!(REQUEST==PLACE_AUTOCOMPLETE_REQUEST_CODE || REQUEST==OPEN_SETTINGS)){\r\n mCurrentLocation = location;\r\n moveToCurrentLocation();\r\n }\r\n }", "@Override\n public boolean onMyLocationButtonClick() {\n return false;\n }", "@SuppressWarnings(\"unused\")\n private void setMyLocationEnabled(final JSONArray args, final CallbackContext callbackContext) throws JSONException {\n Boolean isEnabled = false;\n isEnabled = args.getBoolean(1);\n map.setMyLocationEnabled(isEnabled);\n map.getUiSettings().setMyLocationButtonEnabled(isEnabled);\n this.sendNoResult(callbackContext);\n }", "@Override\n public void onMapReady(final GoogleMap map) {\n map.moveCamera(CameraUpdateFactory.zoomTo(14));\n //map.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n map.setMyLocationEnabled(true);\n map.setOnMyLocationButtonClickListener(new GoogleMap.OnMyLocationButtonClickListener() {\n @Override\n public boolean onMyLocationButtonClick() {\n\n return true;\n }\n });\n map.setOnMyLocationChangeListener(new GoogleMap.OnMyLocationChangeListener() {\n @Override\n public void onMyLocationChange(Location location) {\n Log.d(\"map\", \"onMyLocationChange\");\n if (!isinit) {\n isinit = true;\n if (now_Location == null ||\n now_Location.getLatitude() != location.getLatitude() ||\n now_Location.getLongitude() != location.getLongitude()) {\n now_Location = location;\n initStreetView();\n }\n }\n LatLng sydney = new LatLng(location.getLatitude(), location.getLongitude());\n map.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n }\n });\n }", "protected void startLocationUpdates()\n {\n try\n {\n if (googleApiClient.isConnected())\n {\n LocationServices.FusedLocationApi.requestLocationUpdates(googleApiClient, locationRequest, this);\n isRequestingLocationUpdates = true;\n }\n }\n catch (SecurityException e)\n {\n Toast.makeText(getContext(), \"Unable to get your current location!\" +\n \" Please enable the location permission in Settings > Apps \" +\n \"> Bengaluru Buses.\", Toast.LENGTH_LONG).show();\n }\n }", "private void stopLocationUpdates() {\n if (!mRequestingLocationUpdates) {\n Log.e(TAG, \"stopLocationUpdates: updates never requested, no-op.\");\n return;\n }\n\n // It is a good practice to remove location requests when the activity is in a paused or\n // stopped state. Doing so helps battery performance and is especially\n // recommended in applications that request frequent location updates.\n mFusedLocationClient.removeLocationUpdates(mLocationCallback).addOnCompleteListener(this, new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n SunshinePreferences.setRequestUpdates(MainActivity.this, false);\n mRequestingLocationUpdates = false;\n }\n });\n }", "private void enableRequestLocationUpdate() {\n mLocationManager = (LocationManager) getSystemService(LOCATION_SERVICE);\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n return;\n }\n mLocationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER,\n 1000 * 10, 10, mLocationListener);\n mLocationManager.requestLocationUpdates(\n LocationManager.NETWORK_PROVIDER, 1000 * 10, 10,\n mLocationListener);\n }", "private void updateTargetProductGeocoding() {\n }", "private void updateLocationUI() {\n if (mMap == null) {\n return;\n }\n\n /*\n * Request location permission, so that we can get the location of the\n * device. The result of the permission request is handled by a callback,\n * onRequestPermissionsResult.\n */\n if (ContextCompat.checkSelfPermission(this.getApplicationContext(),\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n mLocationPermissionGranted = true;\n } else {\n ActivityCompat.requestPermissions(this,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n\n if (mLocationPermissionGranted) {\n mMap.setMyLocationEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n } else {\n mMap.setMyLocationEnabled(false);\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n mLastKnownLocation = null;\n }\n }", "@Override\n public void onClick(View v) {\n boolean isGPSEnabled = locationManager.isProviderEnabled(locationManager.GPS_PROVIDER);\n //create boolean isNetworkEnabled equal to result returned from isProviderEnabled() method, sending locationManager.NETWORK_PROVIDER as paremeter\n boolean isNetworkEnabled = locationManager.isProviderEnabled(locationManager.NETWORK_PROVIDER);\n\n //if statement to determine if both booleans are false\n if (!isGPSEnabled && !isNetworkEnabled && ActivityCompat.checkSelfPermission(MainActivity.this, Manifest.permission_group.LOCATION) != PackageManager.PERMISSION_GRANTED) {\n //toast message to tell the user that network and location are not available/enabled\n Toast.makeText(MainActivity.this, \"Network and Location not Available\", Toast.LENGTH_LONG).show();\n return;\n } else {\n //create Criteria object critera\n Criteria criteria = new Criteria();\n\n //string provider equal to value returned from method\n String provider = locationManager.getBestProvider(criteria, true);\n\n fabLocation.setClickable(false);\n\n //call locationupdater\n locationManager.requestLocationUpdates(provider, 0, 0, locationListener);\n }\n }", "private void updateLocationUI() {\n if (mMap == null) {\n return;\n }\n try {\n if (mLocationPermissionGranted) {\n mMap.setMyLocationEnabled(true);\n\n // Display the user selected map type\n mMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);\n\n MapStyleOptions style = MapStyleOptions.loadRawResourceStyle(mContext, R.raw.map_style_night);\n mMap.setMapStyle(style);\n\n // Don't want to display the default location button because\n // we are already displaying using a FAB\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n\n mMap.setOnMyLocationClickListener(this);\n } else {\n mMap.setMyLocationEnabled(false);\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n mLastKnownLocation = null;\n getLocationPermission();\n }\n } catch (SecurityException e) {\n Log.e(\"Exception: %s\", e.getMessage());\n }\n }", "private void setLocationRequest() {\n locationRequest = new LocationRequest();\n locationRequest.setInterval(10000); // how often we ask provider for location\n locationRequest.setFastestInterval(5000); // 'steal' location from other app\n locationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY); // can pick balanced power accuracy\n }", "private void updateLocationUI() {\n if (mMap == null) {\n return;\n }\n /*\n * Request location permission, so that we can get the location of the\n * device. The result of the permission request is handled by a callback,\n * onRequestPermissionsResult.\n */\n if (ContextCompat.checkSelfPermission(this.getApplicationContext(),\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n mLocationPermissionGranted = true;\n } else {\n ActivityCompat.requestPermissions(this,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n if (mLocationPermissionGranted) {\n mMap.setMyLocationEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n } else {\n mMap.setMyLocationEnabled(false);\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n mLastKnownLocation = null;\n }\n }", "public void doBind(){\n\t\tboolean isBound = settings.getBoolean(\"isBound\", false);\n\t\tif(!isBound){\n \t\ti = new Intent(context, LocationService.class);\n \t\tcontext.bindService(i, SpeedConnection, Context.BIND_AUTO_CREATE);\n \t\tcontext.startService(i);\n \t\teditor.putBoolean(\"isBound\", true);\n \t\teditor.apply();\n \t}\n\t}", "public int hasBias() {\r\n\t\tif (bias != null) {\r\n\t\t\treturn 1;\r\n\t\t} else {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t}", "private void setLocationUpdateFunction() {\n fabLocation.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n //create boolean isGPSEnabled equal to result returned from isProviderEnabled() method, sending locationManager.GPS_PROVIDER as paremeter\n boolean isGPSEnabled = locationManager.isProviderEnabled(locationManager.GPS_PROVIDER);\n //create boolean isNetworkEnabled equal to result returned from isProviderEnabled() method, sending locationManager.NETWORK_PROVIDER as paremeter\n boolean isNetworkEnabled = locationManager.isProviderEnabled(locationManager.NETWORK_PROVIDER);\n\n //if statement to determine if both booleans are false\n if (!isGPSEnabled && !isNetworkEnabled && ActivityCompat.checkSelfPermission(MainActivity.this, Manifest.permission_group.LOCATION) != PackageManager.PERMISSION_GRANTED) {\n //toast message to tell the user that network and location are not available/enabled\n Toast.makeText(MainActivity.this, \"Network and Location not Available\", Toast.LENGTH_LONG).show();\n return;\n } else {\n //create Criteria object critera\n Criteria criteria = new Criteria();\n\n //string provider equal to value returned from method\n String provider = locationManager.getBestProvider(criteria, true);\n\n fabLocation.setClickable(false);\n\n //call locationupdater\n locationManager.requestLocationUpdates(provider, 0, 0, locationListener);\n }\n }\n });\n }", "public void setBaseAddress(int targetAddress, int baseAddress);", "private boolean setLocationInformation() {\n try {\n this.mPostModel.setLocationPost(mAutoCompleteTextView.getText().toString());\n\n if (StringEmptyUtil.isEmptyString(this.mPostModel.getLocationPost())) {\n Toast.makeText(getApplicationContext(), \"Please Select Location\", Toast.LENGTH_LONG).show();\n return false;\n }\n\n this.drop_location.setVisibility(View.VISIBLE);\n this.location_view.setVisibility(View.VISIBLE);\n this.current_location.setVisibility(View.VISIBLE);\n this.current_location.setText(this.mPostModel.getLocationPost());\n return true;\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n Toast.makeText(getApplicationContext(), \"Please Select Location\", Toast.LENGTH_LONG).show();\n\n return false;\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n mMap.setOnMapLongClickListener(this);\n\n// if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n// return;\n// } //generated automatically by bool setMyLocationEnabled()\n// mMap.setMyLocationEnabled(true);\n\n Intent intent = getIntent();\n int id = intent.getIntExtra(\"placeID\", 0);\n if (id == 0) {\n //zoom in on user location\n locationManager = (LocationManager) this.getSystemService(Context.LOCATION_SERVICE);\n locationListener = new LocationListener() {\n @Override\n public void onLocationChanged(Location location) {\n locateOnMap(location, \"Here you are!\");\n if (ActivityCompat.checkSelfPermission(MapsActivity.this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(MapsActivity.this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n return;\n } //generated automatically by bool setMyLocationEnabled()\n mMap.setMyLocationEnabled(true);\n }\n\n @Override\n public void onStatusChanged(String provider, int status, Bundle extras) {\n\n }\n\n @Override\n public void onProviderEnabled(String provider) {\n\n }\n\n @Override\n public void onProviderDisabled(String provider) {\n\n }\n };\n if (ContextCompat.checkSelfPermission(this,Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, 1);\n } else {\n locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 5, locationListener);\n Location lastKnownLocation = locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);\n locateOnMap(lastKnownLocation, \"Here you are!\");\n }\n }\n\n else {\n Log.i(\"Hello\", \"Searching place!\");\n LatLng xy = MainActivity.coordinates.get(id);\n Location mem_place = new Location(LocationManager.GPS_PROVIDER);\n mem_place.setLatitude(xy.latitude);\n mem_place.setLongitude(xy.longitude);\n\n locateOnMap(mem_place, MainActivity.places.get(id));\n }\n\n }", "private void enableMyLocation() {\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED) {\n // Permission to access the location is missing.\n PermissionUtils.requestPermission(this, LOCATION_PERMISSION_REQUEST_CODE,\n Manifest.permission.ACCESS_FINE_LOCATION, true);\n mMap.setMyLocationEnabled(true);\n } else if (mMap != null) {\n // Access to the location has been granted to the app.\n mMap.setMyLocationEnabled(true);\n }\n Log.i(\"Current Location\", \"Location Enabled:\" + mMap.isMyLocationEnabled());\n LocationManager locationManager = (LocationManager) this.getSystemService(Context.LOCATION_SERVICE);\n LocationListener locationListener = new OrderLocationListener();\n\n // Register the listener with the Location Manager to receive location updates\n locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 9000, 0, locationListener);\n Location location = locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);\n\n makeUseOfNewLocation(location);\n\n location = LocationServices.FusedLocationApi.getLastLocation(client);\n\n makeUseOfNewLocation(location);\n\n }", "@Override\r\n public void onMapReady(GoogleMap googleMap) {\r\n mMap = googleMap;\r\n mMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);\r\n\r\n //Initialize Google Play Services\r\n if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\r\n if (ContextCompat.checkSelfPermission(this,\r\n Manifest.permission.ACCESS_FINE_LOCATION)\r\n == PackageManager.PERMISSION_GRANTED) {\r\n buildGoogleApiClient();\r\n mMap.setMyLocationEnabled(true);\r\n }\r\n }\r\n else {\r\n buildGoogleApiClient();\r\n mMap.setMyLocationEnabled(true);\r\n }\r\n\r\n\r\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n /*GPSTracker gps = new GPSTracker(this);\n if(gps.canGetLocation()) {\n //lat=gps.getLatitude();\n //lon=gps.getLongitude();\n }*/\n mMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);\n //mMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);\n //mMap.setMapType(GoogleMap.MAP_TYPE_SATELLITE);\n //mMap.setMapType(GoogleMap.MAP_TYPE_TERRAIN);\n mMap.getUiSettings().setZoomGesturesEnabled(true);\n mMap.getUiSettings().setZoomControlsEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n mMap.getUiSettings().setMapToolbarEnabled(true);\n // Add a marker in Sydney and move the camera\n /*LatLng current = new LatLng(lat, lon);\n\n mMap.moveCamera(CameraUpdateFactory.newLatLng(current));\n LatLng new1 = new LatLng(lat+0.0008, lon+0.00004);\n mMap.addMarker(new MarkerOptions().position(new1).title(\"New Location\" +\n \"\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(new1));\n LatLng new2 = new LatLng(lat+0.0005, lon+0.0004);\n mMap.addMarker(new MarkerOptions().position(new2).title(\"New Location\" +\n \"\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(new2));\n mMap.addMarker(new MarkerOptions().position(current).title(lat+\" \"+lon+\n \"\"));\n CameraPosition cameraPosition = new CameraPosition.Builder()\n .target(new LatLng(lat, lon)) // Sets the center of the map to location user\n .zoom(18) // Sets the zoom\n .bearing(90) // Sets the orientation of the camera to east\n .tilt(40) // Sets the tilt of the camera to 30 degrees\n .build(); // Creates a CameraPosition from the builder\n mMap.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));*/\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n /*LatLng sydney = new LatLng(-34, 151);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));*/\n\n\n if (mMap != null) {\n\n // Enable MyLocation Button in the Map\n\n /*if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n return;\n }*/\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n mMap.setMyLocationEnabled(true);\n } else {\n Toast.makeText(MapsActivity.this, \"You have to accept to enjoy all app's services!\", Toast.LENGTH_LONG).show();\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n mMap.setMyLocationEnabled(true);\n }\n }\n\n\n mMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() {\n @Override\n public void onMapClick(LatLng point) {\n // Already two locations\n if (markerPoints.size() > 1) {\n markerPoints.clear();\n mMap.clear();\n }\n\n // Adding new item to the ArrayList\n markerPoints.add(point);\n\n // Creating MarkerOptions\n MarkerOptions options = new MarkerOptions();\n\n // Setting the position of the marker\n options.position(point);\n\n /**\n * For the start location, the color of marker is GREEN and\n * for the end location, the color of marker is RED.\n */\n if (markerPoints.size() == 1) {\n options.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_GREEN));\n } else if (markerPoints.size() == 2) {\n options.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_RED));\n }\n\n\n // Add new marker to the Google Map Android API V2\n mMap.addMarker(options);\n\n // Checks, whether start and end locations are captured\n if (markerPoints.size() >= 2) {\n LatLng origin = markerPoints.get(0);\n LatLng dest = markerPoints.get(1);\n\n // Getting URL to the Google Directions API\n String url = getDirectionsUrl(origin, dest);\n\n DownloadTask downloadTask = new DownloadTask();\n\n // Start downloading json data from Google Directions API\n downloadTask.execute(url);\n }\n\n }\n\n\n });\n }\n }", "private void getLocation() {\n fields = Arrays.asList(Place.Field.ID, Place.Field.NAME, Place.Field.LAT_LNG);\n\n // Start the autocomplete intent.\n Intent intent = new Autocomplete.IntentBuilder(\n AutocompleteActivityMode.FULLSCREEN, fields)\n .build(this);\n startActivityForResult(intent, AUTOCOMPLETE_REQUEST_CODE);\n }", "private void m6906b() {\n LocationClientOption locationClientOption = new LocationClientOption();\n locationClientOption.setOpenGps(true);\n locationClientOption.setPriority(1);\n locationClientOption.setCoorType(\"bd09ll\");\n locationClientOption.setScanSpan(5000);\n locationClientOption.setAddrType(\"all\");\n this.f5657z = new LocationClient(this);\n this.f5657z.registerLocationListener(this);\n this.f5657z.setLocOption(locationClientOption);\n this.f5657z.start();\n this.f5657z.requestLocation();\n }", "public void registerDistantProximity() {\n this.setProximity(false);\n }", "boolean hasGeoTargetConstant();", "private void enableMyLocation() {\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // Permission to access the location is missing.\n PermissionUtils.requestPermission(this, LOCATION_PERMISSION_REQUEST_CODE, Manifest.permission.ACCESS_FINE_LOCATION, true);\n } else if (mMap != null) {\n // Access to the location has been granted to the app.\n mMap.setMyLocationEnabled(true);\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n mMap.getUiSettings().setMapToolbarEnabled(false);\n }", "public int getBias() {\n\t\treturn bias;\n\t}", "boolean getRequireLocationPref();", "void changeBTAddress() {\n\t\t\n\t\t// if ( this.beacon.getAppType() == AppType.APPLE_GOOGLE_CONTACT_TRACING ) {\n\t\tif ( this.useRandomAddr()) {\n\t\t\t// try to change the BT address\n\t\t\t\n\t\t\t// the address is LSB..MSB and bits 47:46 are 0 i.e. bits 0 & 1 of right-most byte are 0.\n\t\t\tbyte btRandomAddr[] = getBTRandomNonResolvableAddress();\n\t\t\t\n\t\t\t// generate the hcitool command string\n\t\t\tString hciCmd = getSetRandomBTAddrCmd( btRandomAddr);\n\t\t\t\n\t\t\tlogger.info( \"SetRandomBTAddrCmd: \" + hciCmd);\n\t\t\t\n\t\t\t// do the right thing...\n\t\t\tfinal String envVars[] = { \n\t\t\t\t\"SET_RAND_ADDR_CMD=\" + hciCmd\n\t\t\t};\n\t\t\t\t\t\t\n\t\t\tfinal String cmd = \"./scripts/set_random_addr\";\n\t\t\t\n\t\t\tboolean status = runScript( cmd, envVars, this, null);\n\t\t}\n\t\t\t\n\t}", "protected void stopLocationUpdates()\n {\n if (googleApiClient != null && googleApiClient.isConnected())\n {\n LocationServices.FusedLocationApi.removeLocationUpdates(googleApiClient, this);\n isRequestingLocationUpdates = false;\n }\n }", "@Override\n public void onProviderDisabled(String s) {\n Intent intent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);\n startActivity(intent);\n }", "public void resetBiasUncertaintyInNs() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e7 in method: android.location.GpsClock.resetBiasUncertaintyInNs():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.location.GpsClock.resetBiasUncertaintyInNs():void\");\n }", "public void setBiasUncertaintyInNs(double r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e7 in method: android.location.GpsClock.setBiasUncertaintyInNs(double):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.location.GpsClock.setBiasUncertaintyInNs(double):void\");\n }", "public void setLand(int value);", "@Override\n public void locationUpdate(Location newLocation, boolean isManual) {\n if (isManual) {\n /// (manual) location update by click on map\n if (mCurrentLocationManual.distanceTo(newLocation) <\n Constants.Locations.UPDATE_INTERVAL_DISTANCE) {\n /// show up explanation\n Toast toast = Toast.makeText(this, getString(R.string.tstTapIgnoringExplanation),\n Toast.LENGTH_SHORT);\n toast.setGravity(Gravity.CENTER, 0, 0);\n toast.show();\n return; /// just ignore jitter\n }\n else\n mCurrentLocationManual = newLocation;\n } else {\n /// (automatic) location update by network | GPS\n if (mCurrentLocationAutomatic.distanceTo(newLocation) < Constants.Locations.UPDATE_INTERVAL_DISTANCE)\n return; /// just ignore jitter\n else {\n mCurrentLocationAutomatic = newLocation;\n }\n }\n mCurrentLatLng = new LatLng(newLocation.getLatitude(), newLocation.getLongitude());\n /// change map position\n if (null != mPlacesMarkProcessor)\n mPlacesMarkProcessor.positionMove(mCurrentLatLng);\n\n /// asynchronously call (Foursquare) venues search for new location\n if (null != mPlacesSearchProcessor)\n mPlacesSearchProcessor.placesSearch(new Venue(newLocation.getLatitude(),\n newLocation.getLongitude()));\n /// look at placesUpdate() below to view how to process placesSearch() results...\n }", "void setOrigination(Locations origination);", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n mMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);\n\n ////run with it to check what is happening and remove it to see\n\n\n //Initialize Google Play Services\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\n buildGoogleApiClient();\n mMap.setMyLocationEnabled(true);\n }\n } else {\n buildGoogleApiClient();\n mMap.setMyLocationEnabled(true);\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n //If the book already has a location set place a marker on that location and zoom in\n if (getIntent().hasExtra(\"lat\")) {\n LatLng currentlySetLocation = new LatLng(lat, lon);\n\n MarkerOptions markerOptions = new MarkerOptions();\n markerOptions.position(currentlySetLocation);\n String address = getMarkerAddress(currentlySetLocation);\n markerOptions.title(address);\n mMap.addMarker(markerOptions);\n mMap.moveCamera(CameraUpdateFactory.newLatLng(currentlySetLocation));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(currentlySetLocation, 15));\n }\n else {\n //if owner has location enabled, place marker on last location\n if (ActivityCompat.checkSelfPermission(SetLocationActivity.this, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\n fusedLocationProviderClient.getLastLocation()\n .addOnSuccessListener(new OnSuccessListener<Location>() {\n /**\n * Run when onSuccess button is clicked\n * @param location: location to get latitude and longitude for\n */\n @Override\n public void onSuccess(Location location) {\n if (location != null) {\n LatLng currentLocation = new LatLng(location.getLatitude(), location.getLongitude());\n mMap.moveCamera(CameraUpdateFactory.newLatLng(currentLocation));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(currentLocation, 15));\n }\n }\n });\n }\n }\n mMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() {\n /**\n * Run when onMapClick button is clicked to set latitude and longitude\n * @param latLng: set value for latitude and longitude\n */\n @Override\n public void onMapClick(LatLng latLng) {\n MarkerOptions markerOptions = new MarkerOptions();\n markerOptions.position(latLng);\n\n String address = getMarkerAddress(latLng);\n //if there is a valid address associated with marker\n if (address != null) {\n markerOptions.title(address);\n }\n mMap.clear();\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(latLng, 15));\n mMap.addMarker(markerOptions);\n markerPlaced = true;\n lat = latLng.latitude;\n lon = latLng.longitude;\n }\n });\n\n //Save location button listener\n FloatingActionButton saveButton = findViewById(R.id.saveButton);\n saveButton.setOnClickListener(new View.OnClickListener() {\n /**\n * Run when button to save location is clicked\n * @param view: current view\n */\n @Override\n public void onClick(View view) {\n if (markerPlaced) {\n //Firestore handler method that adds geopoint as a field in database\n setPickupLocation(bookId, lat, lon);\n Toast toast = Toast.makeText(SetLocationActivity.this,\n \"Pickup location has been updated\", Toast.LENGTH_SHORT);\n toast.show();\n } else {\n Toast toast = Toast.makeText(SetLocationActivity.this,\n \"Place a marker first\", Toast.LENGTH_SHORT);\n toast.show();\n }\n }\n });\n }", "@Override\n public boolean onMyLocationButtonClick() {\n LocationManager manager = (LocationManager) getContext().getSystemService(Context.LOCATION_SERVICE);\n if (!manager.isProviderEnabled(LocationManager.GPS_PROVIDER)) {\n // If Location disable create a alert dialog\n AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(getContext());\n alertDialogBuilder.setMessage(\"Location is disabled in your device. Would you like to enable it?\")\n // Have to respond to this message not cancelable\n .setCancelable(false)\n // If yes open setting page to enable location\n .setPositiveButton(\"Yes\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // intent calls the android activity of location settings\n Intent callGPSSettingIntent = new Intent(\n android.provider.Settings.ACTION_LOCATION_SOURCE_SETTINGS);\n startActivity(callGPSSettingIntent);\n }\n });\n //if no close the dialog\n alertDialogBuilder.setNegativeButton(\"Maybe Later\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n }\n });\n AlertDialog alert = alertDialogBuilder.create();\n alert.show();\n }\n\n return false;\n }", "private void enableMyLocation() {\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED) {\n // Permission to access the location is missing.\n PermissionUtils.requestPermission(this, LOCATION_PERMISSION_REQUEST_CODE,\n Manifest.permission.ACCESS_FINE_LOCATION, true);\n } else if (mMap != null) {\n // Access to the location has been granted to the app.\n mMap.setMyLocationEnabled(true);\n }\n }", "boolean isBiasNeuron();", "private void requestLocationSettingGoogleApi() {\n if (mGoogleApiClient == null || !mGoogleApiClient.isConnected()) {\n finishForResult(Locset.ResultCode.GOOGLE_API_FAILURE);\n return;\n }\n\n final LocationSettingsRequest request = new LocationSettingsRequest.Builder()\n .setAlwaysShow(true)\n .addLocationRequest(LocationRequest.create().setPriority(mPriority))\n .build();\n\n final PendingResult<LocationSettingsResult> result = LocationServices.SettingsApi.checkLocationSettings(\n mGoogleApiClient,\n request);\n\n result.setResultCallback(new ResultCallback<LocationSettingsResult>() {\n @Override\n public void onResult(@NonNull LocationSettingsResult locationSettingsResult) {\n final Status status = locationSettingsResult.getStatus();\n switch (status.getStatusCode()) {\n case LocationSettingsStatusCodes.SUCCESS:\n // All location settings are satisfied. The client can initialize location\n // requests here.\n finishForResult(Locset.ResultCode.SUCCESS);\n return;\n case LocationSettingsStatusCodes.RESOLUTION_REQUIRED:\n // Location settings are not satisfied. But could be fixed by showing the user\n // a dialog.\n try {\n // Show the dialog by calling startResolutionForResult(),\n // and check the result in onActivityResult().\n status.startResolutionForResult(\n LocsetActivity.this,\n // An arbitrary constant to disambiguate activity results.\n REQUEST_CODE_LOCATION_SETTING);\n return;\n } catch (IntentSender.SendIntentException e) {\n // failure\n }\n break;\n case LocationSettingsStatusCodes.SETTINGS_CHANGE_UNAVAILABLE:\n // Location settings are not satisfied. However, we have no way to fix the\n // settings so we won't show the dialog.\n break;\n }\n finishForResult(Locset.ResultCode.LOCATION_SETTING_FAILURE);\n }\n });\n }", "private void changePlacePrivacy() {\n this.place.setPublic(!this.place.getPublic());\n this.place.saveInBackground();\n\n if(this.place.getPublic()) {\n this.binding.btnPublic.setText(R.string.make_private);\n } else {\n this.binding.btnPublic.setText(R.string.make_public);\n }\n }", "@SuppressWarnings({\"SameParameterValue\", \"unused\"})\n public static void allowAccessToLocation(final Boolean value) {\n sAccessToLocation = value;\n }", "public void setLocationAddress(final BwString val) {\n locationAddress = val;\n }", "private boolean toggleMyLocation() {\n\t\t\r\n\t\tswitch (getMylocationToggle()) {\r\n\t\tcase MYLOCATION_OFF:\r\n\t\t\ttoggleClick = true;\r\n\t\t\tbuttonGPSstart.setImageResource(R.drawable.mylocationenabled); \r\n\t\t\tstartService();\r\n\t\t\tsetMylocationToggle(MYLOCATION_ON);\r\n\t\t\treturn true;\r\n\t\tcase MYLOCATION_ON:\r\n\t\t\tbuttonGPSstart.setImageResource(R.drawable.mylocationdisabled); \r\n\t\t\tmyMapView.postInvalidate(); // this should clear up any residual overlays\r\n\t\t\tstopService();\r\n\t\t\tsetMylocationToggle(MYLOCATION_OFF);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\treturn false;\r\n\t}", "private void setButtonsEnabledState() {\n if (mRequestingLocationUpdates) {\n mStartUpdatesButton.setEnabled(false);\n mStopUpdatesButton.setEnabled(true);\n } else {\n mStartUpdatesButton.setEnabled(true);\n mStopUpdatesButton.setEnabled(false);\n }\n }", "@Override\n public void onMapReady(GoogleMap map) {\n googleMap = map;\n map.setMapType(GoogleMap.MAP_TYPE_NORMAL);\n // map.setTrafficEnabled(true);\n map.setIndoorEnabled(true);\n map.setBuildingsEnabled(true);\n map.getUiSettings().setZoomControlsEnabled(true);\n\n if (ContextCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n map.setMyLocationEnabled(true);\n }\n\n double lat = Double.parseDouble(getIntent().getStringExtra(\"lat\"));\n double lng = Double.parseDouble(getIntent().getStringExtra(\"lng\"));\n a = new LatLng(lat, lng);\n\n map.moveCamera(CameraUpdateFactory.newLatLngZoom(a, 14));\n new callGooglePlaceApi().execute();\n }", "private void toggleGoToMapBtn() {\n boolean isShow = isValidLocationFound();\n NodeUtil.setNodeVisibility(this.gotoGeoMapBtn, isShow);\n }", "private void enableMyLocationIfPermitted() {\n if (ContextCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED) {\n ActivityCompat.requestPermissions(this,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION,\n android.Manifest.permission.ACCESS_FINE_LOCATION},\n LOCATION_PERMISSION_REQUEST_CODE);\n } else if (mGoogleMap != null) {\n mGoogleMap.setMyLocationEnabled(true);\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\n bulidGoogleApiClient();\n mMap.setMyLocationEnabled(true);\n }\n }", "protected void finishFlags() {\r\n\r\n \tif (!doAutoComplete) {\r\n \t\treturn;\r\n \t}\r\n \t\r\n for (int i=0; i < width; i++) {\r\n for (int j=0; j < height; j++) {\r\n Location l = new Location(i,j);\r\n if (query(l) == GameStateModel.HIDDEN) {\r\n \tplaceFlag(l);\r\n }\r\n }\r\n } \r\n \r\n }", "private void showCurrentPlace() {\n if (mMap == null) {\n return;\n }\n\n if (mLocationPermissionGranted) {\n // Get the likely places - that is, the businesses and other points of interest that\n // are the best match for the device's current location.\n @SuppressWarnings(\"MissingPermission\")\n PendingResult<PlaceLikelihoodBuffer> result = Places.PlaceDetectionApi\n .getCurrentPlace(mGoogleApiClient, null);\n result.setResultCallback(new ResultCallback<PlaceLikelihoodBuffer>() {\n @Override\n public void onResult(@NonNull PlaceLikelihoodBuffer likelyPlaces) {\n int i = 0;\n mLikelyPlaceNames = new String[mMaxEntries];\n mLikelyPlaceAddresses = new String[mMaxEntries];\n mLikelyPlaceAttributions = new String[mMaxEntries];\n mLikelyPlaceLatLngs = new LatLng[mMaxEntries];\n for (PlaceLikelihood placeLikelihood : likelyPlaces) {\n // Build a list of likely places to show the user. Max 5.\n Place place = placeLikelihood.getPlace();\n mLikelyPlaceNames[i] = (String) place.getName();\n mLikelyPlaceAddresses[i] = (String) place.getAddress();\n mLikelyPlaceAttributions[i] = (String) place.getAttributions();\n mLikelyPlaceLatLngs[i] = place.getLatLng();\n\n i++;\n if (i > (mMaxEntries - 1)) {\n break;\n }\n }\n // Release the place likelihood buffer, to avoid memory leaks.\n likelyPlaces.release();\n\n // Show a dialog offering the user the list of likely places, and add a\n // marker at the selected place.\n openPlacesDialog();\n }\n });\n } else {\n // Add a default marker, because the user hasn't selected a place.\n /*mMap.addMarker(new MarkerOptions()\n .title(getString(R.string.default_info_title))\n .position(mDefaultLocation)\n .snippet(getString(R.string.default_info_snippet)));*/\n }\n }", "@Override\n public void onLocationChanged(Location location) {\n mMap.clear();\n latLng = new LatLng(location.getLatitude(), location.getLongitude());\n CameraPosition cameraPosition = new CameraPosition.Builder()\n .target(latLng).zoom(18).build();\n mMap.moveCamera(CameraUpdateFactory\n .newCameraPosition(cameraPosition));\n double lat = location.getLatitude();\n double lng = location.getLongitude();\n\n sendRequestAPI(lat,lng, places);\n //mMap.addMarker(new MarkerOptions().position(sydney));\n //mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n\n LocationServices.FusedLocationApi.removeLocationUpdates(mGoogleApiClient, this);\n\n }" ]
[ "0.5675169", "0.54931176", "0.5462602", "0.544598", "0.53994423", "0.53609926", "0.533004", "0.5318756", "0.531835", "0.52734697", "0.5254004", "0.52373075", "0.52190137", "0.51691014", "0.5168291", "0.5168291", "0.5138707", "0.5138707", "0.5138707", "0.5106856", "0.51062965", "0.5098246", "0.5081047", "0.50603205", "0.5051862", "0.50401056", "0.50343436", "0.5023077", "0.49976906", "0.49844703", "0.4982262", "0.49812725", "0.49589276", "0.4940158", "0.49371624", "0.49178088", "0.49173114", "0.49162272", "0.49146447", "0.48983622", "0.48957098", "0.48796782", "0.48778692", "0.486597", "0.48601478", "0.4858501", "0.48555136", "0.48545778", "0.4834247", "0.4823586", "0.48235393", "0.4823071", "0.48214576", "0.48212513", "0.4815637", "0.48142177", "0.4810882", "0.4808061", "0.47985333", "0.4797651", "0.47952375", "0.47936353", "0.4787997", "0.47876748", "0.47873825", "0.47773424", "0.47767884", "0.47699413", "0.47671565", "0.47633576", "0.4763326", "0.4748387", "0.47479653", "0.47420406", "0.4737373", "0.4732942", "0.4728815", "0.47284847", "0.4726599", "0.47254446", "0.47227275", "0.4721856", "0.471945", "0.47182003", "0.47176942", "0.47166285", "0.47163194", "0.4715818", "0.47099826", "0.47078708", "0.47036812", "0.47030213", "0.4701619", "0.46993288", "0.46968052", "0.46951085", "0.4685415", "0.4675602", "0.4657391", "0.4655644" ]
0.71937555
0
Allows for passing your own implementation of the AutocompleteHistoryManager. This would be if you wanted to provide your own storage mechanism (e.g. sqlite, shared prefs, etc.) for whatever reasoning you'd want.
public void setHistoryManager(@Nullable final AutocompleteHistoryManager historyManager) { this.historyManager = historyManager; adapter.setHistoryManager(historyManager); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface IHistoryDaoCallback {\n /**\n * 添加历史的结果\n *\n * @param isSuccess\n */\n void onHistoryAdd(boolean isSuccess);\n\n\n /**\n * 删除历史的结果\n *\n * @param isSuccess\n */\n void onHistoryDel(boolean isSuccess);\n\n\n /**\n * 历史数据加载的结果\n *\n * @param tracks\n */\n void onHistoriesLoaded(List<Track> tracks);\n\n\n /**\n * 历史内容清楚结果\n */\n void onHistoriesClean(boolean isSuccess);\n}", "public interface HistoryRepository {\n void listOrder(Activity activity, RecyclerView rv, String uid);\n}", "public NotificationHistoryManager() {\n }", "public interface AutoCompleter {\n \n /** Sets the callback that will be notified when items are selected. */\n void setAutoCompleterCallback(AutoCompleterCallback callback);\n\n /** \n * Sets the new input to the autocompleter. This can change what is\n * currently visible as suggestions.\n * \n * The returned Future returns true if the lookup for autocompletions\n * completed succesfully. True does not indicate autocompletions are\n * available. It merely indicates that the lookup completed.\n * \n * Because AutoCompleters are allowed to be asynchronous, one should\n * use Future.get or listen to the future in order to see when\n * the future has completed.\n */\n ListeningFuture<Boolean> setInput(String input);\n\n /**\n * Returns true if any autocomplete suggestions are currently available, based the data\n * that was given to {@link #setInput(String)}.\n */\n boolean isAutoCompleteAvailable();\n\n /** Returns a component that renders the autocomplete items. */\n JComponent getRenderComponent();\n\n /** Returns the currently selected string. */\n String getSelectedAutoCompleteString();\n\n /** Increments the selection. */\n void incrementSelection();\n \n /** Decrements the selection. */\n void decrementSelection();\n \n /** A callback for users of autocompleter, so they know when items have been suggested. */\n public interface AutoCompleterCallback {\n /** Notification that an item is suggested. */\n void itemSuggested(String autoCompleteString, boolean keepPopupVisible, boolean triggerAction);\n }\n\n}", "public interface FriendAutoCompleterFactory {\n\n /**\n * Returns a FriendLibraryAutocompleter that will supply suggestions based\n * on category.\n */\n public abstract AutoCompleteDictionary getDictionary(SearchCategory categoryToSearch);\n\n /**\n * Returns a FriendLibraryPropertyAutocompleter that will supply suggestions\n * based on category and FilePropertyKey combination.\n */\n public abstract AutoCompleteDictionary getDictionary(SearchCategory categoryToSearch,\n FilePropertyKey filePropertyKey);\n\n}", "public interface HistoryCallback {\r\n void getHistory(ArrayList<MyPageResult.History> histories);\r\n}", "public interface ActivityManager extends GenericManager<Activity, Long> {\n// -------------------------- OTHER METHODS --------------------------\n\n Activity getActivity(Long activityID);\n\n List<Activity> getActivities();\n\n List<Activity> getActivitiesByDepartament(Long idDepartament);\n\n void removeActivity(Long activityId);\n\n Activity saveActivity(Activity activity);\n\n List<Activity> search(String searchTerm);\n}", "public interface DbHelper {\n List<HistoryData> loadAllHistoryData();\n List<HistoryData> addHistoryData(String data);\n void clearHistoryData();\n}", "public interface AutocompletionListener<T> {\n\t/**\n\t * The user has activated a suggested item.\n\t * \n\t * This means the user has explicitly activate the item, i.e., pressed enter on or clicked the\n\t * item.\n\t * @param e the event describing the activation\n\t */\n\tpublic void completionActivated(AutocompletionEvent<T> e);\n}", "public HistoryFileManager() {\n super(HistoryFileManager.class.getName());\n }", "public interface IHistoryItemFactory {\n public HistoryItem getHistoryItem(Integer age, String gender, Float height, Float weight, float bmi, float pi, String kind);\n}", "@Override\n public void updateHistory(Command c) {\n }", "public interface IHistoryView extends IBaseView{\n\n void setHistoryList(List<String> historyList);\n\n void showToast(String msg);\n\n void overRefresh();\n\n}", "private History() {}", "@Override\n public void onHistoryItemClicked(String history_item) {\n editText.setText(history_item);\n editText.setCursorVisible(false);\n editTextMode = false;\n\n previousSearchTerm = editText.getText().toString();\n\n InputMethodManager inputManager = (InputMethodManager) getSystemService\n (Context.INPUT_METHOD_SERVICE);\n inputManager.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(),\n InputMethodManager.HIDE_NOT_ALWAYS);\n searchHistoryView.setVisibility(View.INVISIBLE);\n mCursor = utils.queryCombinedArticleLists(editText.getText().toString());\n\n LinearLayoutManager linearLayoutManager = new LinearLayoutManager(SearchActivity.this);\n SearchArticlesAdapter adapter = new SearchArticlesAdapter(SearchActivity.this, SEARCH_ACTIVITY);\n adapter.setCursor(mCursor);\n mRecyclerView.setAdapter(adapter);\n mRecyclerView.setLayoutManager(linearLayoutManager);\n }", "public AppendNumberMgmtHistoryHome(final Home delegate)\r\n {\r\n this(delegate, \"\");\r\n }", "void onHistoryButtonClicked();", "public interface SearchDefaultDataSource {\n interface SearchDefaultCallBack extends BaseCallBack {\n void onLoadSearchHot(List<String> hot);\n\n void onLoadSearchHistory(List<String> history);\n }\n\n interface DeleteSearchHistoryCallBack {\n void onSuccess();\n\n void onFail();\n }\n\n void getSearchHot(SearchDefaultCallBack callBack);\n\n void getSearchHistory(SearchDefaultCallBack callBack);\n\n void clearSearchHistory(DeleteSearchHistoryCallBack callBack);\n\n void deleteSearchHistory(String history, DeleteSearchHistoryCallBack callBack);\n}", "protected abstract void createHistoryEvents();", "public interface FragmentSuggestionsView extends FragmentRecyclerView {\n\n void setItems(List<User> users);\n void onItemSelected(User item);\n}", "public interface HistoryService {\n /**\n * 查询历史住房信息\n * @param map\n * @return\n */\n List<Map> getHistory(Map map);\n\n /**\n * 获取分页总数量\n * @return\n */\n int getCount(Map map);\n}", "public interface AutoCompleterCallback {\n /** Notification that an item is suggested. */\n void itemSuggested(String autoCompleteString, boolean keepPopupVisible, boolean triggerAction);\n }", "public ArrayListFoodAdapter(Context context, FoodDAO foodDAO, AutoCompleteTextView refAutocomplete) {\n super(foodDAO.getAllFood());\n this.foodDAO = foodDAO;\n mResults = foodDAO.getAllFood();\n// refAutocomplete.setAdapter(this);\n }", "public interface HistoryModel {\n\n void getData(String date, LoadListener listener);\n\n}", "public interface BookSearchListener {\r\n void onStart();\r\n void onFind(BookInfo info);\r\n void onEnd(int code);\r\n}", "public UpdateHistory() {\n this(\"update_history\", null);\n }", "public interface LastFmApi {\n\n /**\n * @param callingMethod - API method\n * @param chosenCountry - country selected by the user from dialog (hardcoded)\n * @param artistsPerPage - number of requested artists\n * @param pageNumber - number of page (for pagination)\n */\n @GET(\"2.0/\")\n Call<GeoArtistData> getTopArtists(\n @Query(\"method\") String callingMethod,\n @Query(\"country\") String chosenCountry,\n @Query(\"limit\") String artistsPerPage,\n @Query(\"page\") String pageNumber);\n\n /**\n * @param callingMethod - API method\n * @param artist - artist selected by the user from list\n * @param albumsPerPage - number of requested albums\n * @param pageNumber - number of page (for pagination)\n */\n @GET(\"2.0/\")\n Call<ArtistInfoData> getTopAlbums(\n @Query(\"method\") String callingMethod,\n @Query(\"artist\") String artist,\n @Query(\"limit\") String albumsPerPage,\n @Query(\"page\") String pageNumber);\n}", "public interface OrderHistoryView {\n\n void listHistoryOrder(List<OrderHistoryData> feedItemList);\n\n void errorLoading();\n}", "public interface BookManager {\n public int count();\n public Book getBook(int index);\n public Book createBook();\n public ArrayList<Book> getAllBooks();\n public void removeBook(Book book);\n public void moveBook (int from, int to);\n public int getMinPrice();\n public int getMaxPrice();\n public float getMeanPrice();\n public int getTotalCost();\n public void saveChanges(Context context);\n}", "public interface IWarnHistoryService {\n}", "void onGetMobileHistoryCursor(Cursor cursor);", "public PlacesAutocompleteTextView(@NonNull final Context context, @NonNull final String googleApiKey, @NonNull final String historyFileName) {\n super(context);\n\n init(context, null, R.attr.pacv_placesAutoCompleteTextViewStyle, R.style.PACV_Widget_PlacesAutoCompleteTextView, googleApiKey, historyFileName);\n }", "@Override\n public EditHistory createFromParcel(Parcel in) {\n return new EditHistory(in);\n }", "public interface DatabaseInterface {\n Observable<List<Bookmark>> getAllBookmarks();\n Observable<List<History>> getAllHistories();\n Observable<String> saveBookmark(final Bookmark bookmark);\n Observable<String> saveHistory(final History history);\n Observable<String> deleteBookmark(final Bookmark bookmark);\n Observable<Bookmark> updateBookmark(final Bookmark bookmark);\n Observable<String> deleteAllBookmark();\n Observable<String> deleteAllHistories();\n Observable<List<History>> getHistoryByDate(int year, int month, int day);\n Observable<String> deleteSelectedHistory(List<History> histories);\n Observable<Set<String>> getBlackList();\n Observable<String> addToBlackList(Set<String> domains);\n Observable<String> removeFromGlobalBlackList(Set<String>domains);\n Observable<String> deleteAllFromBlackList();\n}", "public ActivityHistoryManager getActivityHistoryManager() {\r\n return m_activityHistoryManager;\r\n }", "private void initAutoCompleteAdapter(){\n adapterAcGeneric = new GenericAcAdapter(getActivity(),\n android.R.layout.simple_dropdown_item_1line);\n ac_generics.setThreshold(0);\n ac_generics.setAdapter(adapterAcGeneric);\n ac_generics.setOnItemClickListener(\n new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View view,\n int position, long id) {\n //selectedText.setText(autoSuggestAdapter.getObject(position));\n genericName = adapterAcGeneric.getObject(position);\n makeApiCallForSearch();\n CommonMethods.hideKeybaord(getActivity());\n }\n });\n ac_generics.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int\n count, int after) {\n }\n @Override\n public void onTextChanged(CharSequence s, int start, int before,\n int count) {\n genericName = \"\";\n handlerGeneric.removeMessages(TRIGGER_AUTO_COMPLETE);\n handlerGeneric.sendEmptyMessageDelayed(TRIGGER_AUTO_COMPLETE,\n AUTO_COMPLETE_DELAY);\n }\n @Override\n public void afterTextChanged(Editable s) {\n }\n });\n handlerGeneric = new Handler(new Handler.Callback() {\n @Override\n public boolean handleMessage(Message msg) {\n if (msg.what == TRIGGER_AUTO_COMPLETE) {\n if (!TextUtils.isEmpty(ac_generics.getText())) {\n // Log.d(\"DEBUG\", \"in generic\");\n makeApiCall(ac_generics.getText().toString(), 1);\n }\n }\n return false;\n }\n });\n\n\n adapterAcCompany = new CompanyAcAdapter(getActivity(),\n android.R.layout.simple_dropdown_item_1line);\n ac_companies.setThreshold(0);\n ac_companies.setAdapter(adapterAcCompany);\n ac_companies.setOnItemClickListener(\n new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View view,\n int position, long id) {\n //selectedText.setText(autoSuggestAdapter.getObject(position));\n companyName = adapterAcCompany.getObject(position);\n makeApiCallForSearch();\n CommonMethods.hideKeybaord(getActivity());\n }\n });\n ac_companies.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int\n count, int after) {\n }\n @Override\n public void onTextChanged(CharSequence s, int start, int before,\n int count) {\n companyName = \"\";\n handlerCompany.removeMessages(TRIGGER_AUTO_COMPLETE);\n handlerCompany.sendEmptyMessageDelayed(TRIGGER_AUTO_COMPLETE,\n AUTO_COMPLETE_DELAY);\n }\n @Override\n public void afterTextChanged(Editable s) {\n }\n });\n handlerCompany = new Handler(new Handler.Callback() {\n @Override\n public boolean handleMessage(Message msg) {\n if (msg.what == TRIGGER_AUTO_COMPLETE) {\n if (!TextUtils.isEmpty(ac_companies.getText())) {\n //Log.d(\"DEBUG\", \"in company\");\n makeApiCall(ac_companies.getText().toString(), 2);\n }\n }\n return false;\n }\n });\n\n\n ac_companies.setOnFocusChangeListener(new View.OnFocusChangeListener() {\n @Override\n public void onFocusChange(View view, boolean hasFocus) {\n if (hasFocus) {\n Log.d(\"DEBUG\", \"1\");\n makeApiCall(\"\", 2);\n\n // Toast.makeText(getActivity(), \"Got the focus\", Toast.LENGTH_SHORT).show();\n } else {\n // Toast.makeText(getActivity(), \"Lost the focus\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n\n ac_generics.setOnFocusChangeListener(new View.OnFocusChangeListener() {\n @Override\n public void onFocusChange(View view, boolean hasFocus) {\n if (hasFocus) {\n Log.d(\"DEBUG\", \"2\");\n makeApiCall(\"\", 1);\n // Toast.makeText(getActivity(), \"Got the focus\", Toast.LENGTH_SHORT).show();\n } else {\n // Toast.makeText(getActivity(), \"Lost the focus\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n\n\n }", "public interface AutofillAssistantActionHandler {\n /**\n * Returns the names of available AA actions.\n *\n * <p>This method starts AA on the current tab, if necessary, and waits for the first results.\n * Once AA is started, the results are reported immediately.\n *\n * @param userName name of the user to use when sending RPCs. Might be empty.\n * @param experimentIds comma-separated set of experiment ids. Might be empty\n * @param arguments extra arguments to include into the RPC. Might be empty.\n * @param callback callback to report the result to\n */\n void listActions(String userName, String experimentIds, Bundle arguments,\n Callback<Set<String>> callback);\n\n /**\n * Returns the available AA actions to be reported to the direct actions framework.\n *\n * <p>This method simply returns the list of actions known to AA. An empty string array means\n * either that the controller has not yet been started or there are no actions available for the\n * current website.\n *\n * @return Array of strings with the names of known actions.\n */\n String[] getActions();\n\n /** Performs onboarding and returns the result to the callback. */\n void performOnboarding(String experimentIds, Callback<Boolean> callback);\n\n /**\n * Performs an AA action.\n *\n * <p>If this method returns {@code true}, a definition for the action was successfully started.\n * It can still fail later, and the failure will be reported to the UI.\n *\n * @param name action name, might be empty to autostart\n * @param experimentIds comma-separated set of experiment ids. Might be empty.\n * @param arguments extra arguments to pass to the action. Might be empty.\n * @param callback to report the result to\n */\n void performAction(\n String name, String experimentIds, Bundle arguments, Callback<Boolean> callback);\n}", "public interface SearchHistoryService {\n\n public List<SearchHistory> findByUser(User user);\n\n public void saveSearchHistory(SearchHistory searchHistory);\n}", "private static HistoryImpl getImpl()\n {\n HistoryImpl impl = impls.get(Context.getCurrentContext());\n if (impl == null)\n {\n impls.put(Context.getCurrentContext(), impl = new HistoryImpl());\n Context.getCurrentContext().getClient().addListener(new GwtJavaClientListener()\n {\n @Override\n public void onFinish(GwtJavaClient client)\n {\n impls.remove(Context.getCurrentContext());\n }\n\n });\n }\n return impl;\n }", "private void storeUserInputHistory(String input) {\n if (userInputHistoryPointer != userInputHistory.size() - 1\n || (userInputHistoryPointer == userInputHistory.size() - 1\n && !input.equals(userInputHistory.get(userInputHistoryPointer)))) {\n userInputHistory.add(input);\n }\n userInputHistoryPointer = userInputHistory.size();\n currentInput = null;\n }", "public interface OnTabBarSelectedListener {\n void onTabBarSelected(int index);\n}", "public IapHistory() {\n\t\tthis(\"iap_history\", null);\n\t}", "public interface AdapterCallback {\n void onMoreCallback(long id, String date);\n void onSaveCallback(long id, Book book);\n}", "public interface UprazneniaAllListView {\n int getChoosenListPosition();\n\n void setAdapter(Cursor cursor);\n}", "ImplementationManager createManager();", "public interface Save {\n String writeHistory();\n}", "public IapHistory(String alias) {\n\t\tthis(alias, IAP_HISTORY);\n\t}", "public interface OnSeeHistoryFinishListener {\n public void onSuccess(String sMesagge);\n\n public void onErrorNumberPhone();\n\n public void onErrorDate();\n}", "public void loadHistory(SyncedList<MSensor> history) {\n this.history = history;\n }", "public interface CustomAdapterHolder {\n\n View.OnClickListener onPlusClicked();\n RecyclerView.Adapter getAdapter();\n Filter getFilter();\n String getActionBarText();\n}", "public interface HistoryDAO extends GeneralDAO<History> {\n\n public List<History> getHistoriesByUserId(String userId);\n}", "public interface ZachetManager extends ActivityManager<Zachet> {\n}", "public interface LeagueManager {\n\tpublic boolean deleteClub(String name);\n\n\tpublic void addTheClub(FootballClub club, String name, String location, int wins, int draws, int defeats,\n\t\t\tint goalsReceived, int defeatsScored, int points, int mathces);\n\n\tpublic void addTheClub(FootballClub club, String name, String location);\n\n\tpublic void showTheClubs();\n\n\tpublic void showTheClubs(String name);\n\n\tpublic void displayPremierLeague();\n\n\tpublic void updateScore(String name, int score);\n\n}", "public UpdateHistory(String alias) {\n this(alias, UPDATE_HISTORY);\n }", "public interface IOnBackPressed {\n void onBackPressed();\n}", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetListAdapter(mListAdapter = new ECGRecordListAdapter(\n\t\t\t\tgetHistoryRecordIDs(), this));\n\t}", "public interface IOnMySearchFinishedListener {\n\n void onDialog(String title, String msg);\n\n void onSuccessSearch(List<Search> searches);\n\n void onSuccessAdd(Search search);\n}", "public interface LookAheadCache {\r\n\tboolean isEmpty();\r\n\r\n\tboolean isFull();\r\n\r\n\tLong nextOffset();\r\n\r\n\tvoid add(Long lsnOffset, LNInfo info);\r\n\r\n\tLNInfo remove(Long offset);\r\n}", "public JHistoryTextField()\n {\n this(true);\n }", "private FXDealHistory() {}", "public interface OnBackPressedListener {\n public void onBackPressed();\n}", "public interface DataManagerAPI {\n\n /**\n * Retrieves the habits for a user\n *\n * @return a list of habit objects\n * @see User\n */\n ArrayList<Habit> getHabits();\n\n /**\n * Retrieves the habitEvents for a particular habit\n *\n * @param forHabit the habit in which the habitEvents are wanted\n * @return a list of habitEvents for that particular habit\n * @see HabitEvent\n */\n ArrayList<HabitEvent> getHabitEvents(Habit forHabit);\n\n /**\n * Retrieves the habitEvents for a particular user\n *\n * @return a list of all the habitEvents a user has\n * @see User\n */\n ArrayList<HabitEvent> getHabitEvents();\n\n /**\n * Adds a habit object to the data storage\n *\n * @param habit the new habit to be added\n * @return 0 if success, -1 if any issues\n * @see User\n */\n int addHabit(Habit habit);\n\n /**\n * Removes a habit from storage\n *\n * @param habit the habit to be removed\n * @return 0 if success, -1 if any issues\n * @see Habit\n */\n int removeHabit(Habit habit);\n\n /**\n * Updates the contents of a habit in storage with new information\n *\n * @param oldHabit the habit to be updated\n * @param newHabit the new habit data to replace the old data\n * @return 0 if success, -1 if any issues\n * @see Habit\n */\n int editHabit(Habit oldHabit, Habit newHabit);\n\n /**\n * Adds a habitEvent for a habit to storage\n *\n * @param habit the habit for which the event is being logged\n * @param habitEvent the habitEvent to add\n * @return 0 if success, -1 if any issues\n * @see Habit\n * @see HabitEvent\n */\n int addHabitEvent(Habit habit, HabitEvent habitEvent);\n\n /**\n * Removes a habitEvent from storage\n *\n * @param habitEvent the habitEvent to be removed\n * @return 0 if success, -1 if any issues\n * @see HabitEvent\n */\n int removeHabitEvent(HabitEvent habitEvent);\n\n /**\n * Updates an existing habitEvent with new data\n *\n * @param oldHabitEvent the habitEvent being updated\n * @param newHabitEvent the new data to update the old event with\n * @return 0 if success, -1 if any issues\n * @see HabitEvent\n */\n int editHabitEvent(HabitEvent oldHabitEvent, HabitEvent newHabitEvent);\n\n int editUser(User user);\n\n /**\n * Removes a user from the application, all data will be lost for that user\n *\n * @param user the user to be removed\n * @return 0 if success, -1 if any issues\n * @see User\n */\n int removeUser(User user);\n\n /**\n * Retrieves the current user\n *\n * @return a User instance representing the current user\n * @see User\n */\n User getUser();\n\n /**\n * Adds a new user to storage.\n *\n * @param userName a string representing the user's username\n * @return true if success, false if any issues\n * @see User\n */\n boolean addUser(String userName, AsyncResultHandler handler);\n\n /**\n * used to pass users between activities\n * only returns the user once and then returns null til a new user is set by setPassedUser(User passedUser)\n *\n * @return the last user passed using setPassedUser(User passedUser)\n */\n User getPassedUser();\n\n /**\n * used to pass users between activities\n *\n * @param passedUser the user to be passed, is return by getPassedUser()\n */\n void setPassedUser(User passedUser);\n\n /**\n * used to pass habit between activities\n * only returns the habit once and then returns null til a new user is set by setPassedHabit(Habit passedHabit)\n *\n * @return the last habit passed using setPassedHabit(Habit passedHabit)\n */\n Habit getPassedHabit();\n\n /**\n * used to pass users between activities\n *\n * @param passedHabit the user to be passed, is return by getPassedHabit()\n */\n void setPassedHabit(Habit passedHabit);\n\n /**\n * used to pass habitEvents between activities\n * only returns the habitEvent once and then returns null til a new user is set by setPassedHabitEvent(HabitEvent passedHabitEvent)\n *\n * @return the last habit passed using setPassedHabitEvent(HabitEvent passedHabitEvent)\n */\n HabitEvent getPassedHabitEvent();\n\n /**\n * used to pass users between activities\n *\n * @param passedHabitEvent the user to be passed, is return by getPassedHabitEvent()\n */\n void setPassedHabitEvent(HabitEvent passedHabitEvent);\n\n /**\n * Retrieve the current users who want to follow the current user\n *\n * @return an array list of users who want to follow the current user\n */\n int getFollowRequests(AsyncResultHandler handler);\n\n /**\n * Accept a follow request by a user\n *\n * @param user the user that is allowed to follow the current user\n * @return true if the acceptance was successful, false if not\n */\n Boolean acceptRequest(User user);\n\n /**\n * Reject a pending follow request\n *\n * @param user\n * @return true if the rejection was successful, false if not\n */\n Boolean rejectRequest(User user, AsyncResultHandler handler);\n\n /**\n * Unfollows the given user\n * @param user the user to unfollow\n */\n void unFollow(User user);\n\n /**\n * Get the users which the specified user follows\n *\n * @param user the user you want to get the followers of\n * @return a list of the particular user's followers\n */\n int getWhoThisUserFollows(User user, AsyncResultHandler handler);\n\n /**\n * Gets the followers of a particular user\n *\n * @param user a list of users who follow the specified user\n * @return a list of users who follow the specified user\n */\n int getWhoFollows(User user, AsyncResultHandler handler);\n\n /**\n * Search users\n *\n * @param minStreak the min streak to include\n * @param query the search query\n * @param alreadyFollowing if true, do not include the users you are already following\n * @return a list of the users who meet the criteria\n */\n int findUsers(int minStreak, String query, Boolean alreadyFollowing, AsyncResultHandler handler);\n\n /**\n * Send a request to follow the user\n *\n * @param user the user the current user wants to follow\n * @return true if success, false if not\n */\n Boolean sendFollowRequest(User user);\n\n /**\n * Cancel a pending follow request\n *\n * @param user\n * @return true if the rejection was successful, false if not\n */\n public Boolean cancelRequest(User user, AsyncResultHandler handler);\n\n /**\n * Search Habits\n *\n * @param forUser the search query\n * @return a list of habits that contain the search query\n */\n int findHabits(User forUser, AsyncResultHandler<Habit> handler);\n\n /**\n * Search HabitEvents\n *\n * @param forHabit the search query\n * @return a list of habits that contain the search query\n */\n int findHabitEvents(Habit forHabit, AsyncResultHandler<HabitEvent> handler);\n\n /**\n * Search HabitEvents\n *\n * @param forUser the search query\n * @return a list of habits that contain the search query\n */\n int findHabitEvents(User forUser, AsyncResultHandler<HabitEvent> handler);\n\n /**\n * returns an Array of SuperCombinedManagerObjectToManageTheMostRecentHabitForUser that holds the Habit and its most recent event for the User\n *\n * @param forUser the User to get the array of most recent events\n * @param handler what to call when the results come back\n */\n void findMostRecentEvent(User forUser, AsyncResultHandler<SuperCombinedManagerObjectToManageTheMostRecentHabitForUser> handler);\n\n\n}", "public interface IBaseActivityListEvent {\n\n /**\n * Creates a new fragment with the listentries of the given ShoppingList item.\n *\n * @param _ShoppingList of the list that the content should be shown.\n */\n void selectList(ShoppingList _ShoppingList);\n}", "public interface onAddItemListener {\n void onAddItem(String item);\n}", "void setAutoCompleterCallback(AutoCompleterCallback callback);", "public interface OnSearchTextChangedListener {\n\n void onTextChanged(String text);\n\n}", "public interface DataManager extends PreferencesHelper, KamusEngIndHelper, KamusIndEngHelper {\n}", "public interface OAuthTokenStoreAdapter {\n\n void storeAccessToken(AccessToken token);\n AccessToken retrieveAccessToken(String value);\n\n void storeRefreshToken(RefreshToken token);\n RefreshToken retrieveRefreshToken(String value);\n}", "public interface BaseNavigator {\n void finish();\n void onBackPress();\n}", "public Class<? extends IHistory> getHistoryImplClass() {\n\t\tthrow new UnsupportedOperationException(\"History is not supported by this entity type.\");\n\t}", "public AutocompleteProvider(){\r\n root = null;\r\n }", "public interface SearchContract {\n interface View extends BaseView {\n\n void back();\n\n void getSearchList(List<SearchList> searchLists);\n\n void hideHistory();\n\n void updateHistory(String value);\n\n void showSearchView();\n\n void retry();\n }\n\n interface Presenter extends BasePresenter<View> {\n\n void onMenuClick(MenuItem item);\n\n void insertHistory(String s);\n\n boolean onSearch(TextView textView, int i, Activity activity, List<History> mList);\n\n void onViewClick(android.view.View view);\n\n List<History> getHistory();\n\n void deleteHistory(int position, boolean isNone);\n\n void search(@Nullable String word, WebResponseListener listener);\n\n void onStateChanged(RecyclerView recyclerView, int newState, SearchAdapter searchAdapter\n , WebResponseListener listener, Context context);\n\n void onScrolled(boolean isSlidingUpward);\n\n void initPage();\n }\n}", "public interface RecordHistory<T> {\n T history(VanillaMessageHistory history);\n}", "public interface BackHandledInterface {\n public abstract void setSelectedFragment(BackHandledFragment selectedFragment);\n}", "public interface IDatabaseManager {\n\n /** Add an user in the database\n * Update the information of the user if he is already in the database.\n * WARNING ! In the case of update, onUserChanged is called instead of onUserAdded\n */\n void addUser(User user);\n\n /** Add an user only with his id, his firstname, his lastname and his pseudo\n * Update the information of the user if he is already in the database.\n * WARNING ! In the case of update, onUserChanged is called instead of onUserAdded\n */\n void addUser(String uid, String firstname, String lastname, String pseudo);\n\n /** Edit the address of an user\n */\n void editAddressUser(String uid, Address address);\n\n /** Edit the worker profile of the User\n * Add the user if not found in the database\n */\n void EditWorkerProfileUser(String uid, boolean isWorker, List<Skill> skills);\n\n /** Edit the address of an user\n * Add an user if he is not in the database.\n * WARNING ! In the case of add, onUserAdded is called instead of onUserChanged\n */\n void editUser(String uid, User newUser);\n\n /** Remove an user\n * Do nothing if the user is not in the database (in this case, onUserRemoved is not called)\n */\n void removeUser(String uid);\n\n /** Get an user with UserResult\n * This method search the user in the database and showProfile the UserResult when the user is found\n * WARNING ! If the user is not found, the method showProfile UserResult with null ( showProfile(null) )\n */\n void getUser(String uid, final UserResult result);\n\n /** Get an user with UserResult\n * UserResult is not showProfile once, but each time the user is modified\n * This method search the user in the database and showProfile the UserResult when the user is found\n * WARNING ! If the user is not found, the method showProfile UserResult with null ( showProfile(null) )\n */\n void AddUserListener(String uid, final UserResult result);\n\n /** Remove a listener for a specific uid\n */\n void removeUserListener(String uid);\n\n /** Add an advert in the database\n * Create a new unique ID when added, as key in the database.\n */\n void addAdvert(Advert advert);\n\n /** Edit the information of an advert\n * Add an advert if he is not in the database.\n * WARNING ! In the case of add, onAdvertAdded is called instead of onAdvertChanged\n */\n void editAdvert(String aid, Advert advert);\n\n /** Remove an advert\n * Do nothing if the advert is not in the database (in this case, onAdvertRemoved is not called)\n */\n void removeAdvert(String aid);\n\n /** Get an Advert with AdvertResult\n * This method search the advert in the database and showProfile the AdvertResult when the advert is found\n * WARNING ! If the advert is not found, the method showProfile UserResult with null ( showProfile(null) )\n */\n void getAdvert(String aid, final AdvertResult result);\n\n /** Get all the adverts in the database\n * WARNING ! May produce lag and surcharge memory\n */\n void getAllAdverts(final AdvertListResult result);\n\n /** Get adverts available in the database, with filtering parameters.\n * It use the current location of the user, if this information is unavailable, use null as currentLocation\n */\n void getAdvertsAvailableWithFilter(AdvertFilter filter, Coordinates currentLocation, final AdvertListResult result);\n\n /** Get all the adverts available, i.e. not chose or finished by a worker\n * WARNING ! May produce lag and surcharge memory\n */\n void getAllAdvertsAvailable(final AdvertListResult result);\n\n /** Get all the adverts published by an advertiser\n * This method search the adverts in the database and showProfile the AdvertListResult once all the adverts are found\n */\n void getAllAdvertsPublished(String uidAdvertiser, final AdvertListResult result);\n\n /** Get all the adverts available published by an advertiser, i.e. not chose or finished by a worker\n * This method search the adverts in the database and showProfile the AdvertListResult once all the adverts are found\n */\n void getAllAdvertsPublishedAvailable(String uidAdvertiser, final AdvertListResult result);\n /** Get all the adverts accepted by a worker, accepted and not finished yet\n * This method search the adverts in the database and showProfile the AdvertListResult once all the adverts are found\n */\n void getAllAdvertsAccepted(String uidWorker, final AdvertListResult result);\n\n /** Get all the advertsCompleted\n * This method search the adverts in the database and showProfile the AdvertListResult once all the adverts are found\n */\n void getAllAdvertsCompleted(String idAdvertiser, final AdvertListResult result);\n\n\n /** Add an rating2 in the database\n * Create a new unique ID when added, as key in the database.\n *\n */\n void addRating(Rating2 rating2);\n\n /** Edit the information of an rating2\n * Add an rating2 if he is not in the database.\n * WARNING ! In the case of add, onRatingAdded is called instead of onRatingChanged\n */\n void editRating(String rid, Rating2 rating2);\n\n /** Remove an rating\n * Do nothing if the rating is not in the database (in this case, onRatingRemoved is not called)\n */\n void removeRating(String rid);\n\n /** Get an Rating2 with AdvertResult\n * This method search the rating in the database and showProfile the RatingResult when the rating is found\n * WARNING ! If the rating is not found, the method showProfile RatingResult with null ( showProfile(null) )\n */\n void getRating(String rid, final RatingResult result);\n\n /** Get all the ratings of an user, i.e. all the rating given to an user\n * This method search the adverts in the database and showProfile the AdvertListResult once all the adverts are found\n */\n void getUserRatings(String uidRated, final RatingListResult result);\n\n /** Get all the ratings given by a user\n * This method search the adverts in the database and showProfile the AdvertListResult once all the adverts are found\n */\n void getGivenUserRating(String uidRater, final RatingListResult result);\n\n /** Register an UserCallback\n * The callback will be noticed when a user is respectively added, modified or removed\n * */\n void addUserCallback(UserCallback callback);\n\n /** Register an AdvertCallback\n * The callback will be noticed when a advert is respectively added, modified or removed\n */\n void addAdvertCallback(AdvertCallback callback);\n\n /** Register an RatingCallback\n * The callback will be noticed when a rating is respectively added, modified or removed\n */\n void addRatingCallback(RatingCallback callback);\n\n\n // Results to retrieve data\n interface UserResult {\n void call(User user);\n }\n interface AdvertResult {\n void call(Advert advert);\n }\n interface AdvertListResult {\n void call(List<Advert> advertList);\n }\n interface RatingResult {\n void call(Rating2 rating2);\n }\n interface RatingListResult {\n void call(List<Rating2> rating2List);\n }\n\n\n\n\n\n\n\n\n\n\n}", "public interface DBManager {\n public void add(Context c,String... arg0);\n public void add(Context c,Patient p,String... arg0);\n public void change(Context c, Patient p, String... arg0);\n public void change(Context c, Patient p, Appointment a, String... arg0);\n public void delete(Context c, Patient p, Appointment a);\n}", "@Override\n public void onTextChanged(CharSequence userInput, int start, int before, int count) {\n System.out.println(\"User input: \" + userInput);\n\n MainActivity mainActivity = ((MainActivity) context);\n /*String query= \"\";\n if(who == 1)\n query = mainActivity.from;\n else if(who == 2)\n query = mainActivity.to;\n */\n ArrayList<String> ddlSuggestions = Map.getSimilarNamesFromName(userInput.toString());\n\n // update the adapater\n if(who == 1) {\n mainActivity.fromAdapter = new ArrayAdapter<String>(mainActivity, android.R.layout.simple_dropdown_item_1line, ddlSuggestions);\n mainActivity.fromAdapter.notifyDataSetChanged();\n mainActivity.fromAutoComplete.setAdapter(mainActivity.fromAdapter);\n System.out.println(\"Called1\");\n } else if(who == 2) {\n mainActivity.toAdapter = new ArrayAdapter<String>(mainActivity, android.R.layout.simple_dropdown_item_1line, ddlSuggestions);\n mainActivity.toAdapter.notifyDataSetChanged();\n mainActivity.toAutoComplete.setAdapter(mainActivity.toAdapter);\n System.out.println(\"Called2\");\n }\n }", "@Generated(hash = 2001824891)\n public synchronized void resetListSearchHistory() {\n listSearchHistory = null;\n }", "public interface TokenHistoryMapper {\n\n\n void create(TokenHistory tokenHistory);\n\n}", "public interface TickerCallBack {\n void search();\n}", "TrackerHistory loadTrackerHistory(final Integer id);", "public Adapter(ArrayList <HistoryModel> listOfModels) {\n this.listOfModels = listOfModels;\n }", "public interface IBackListener {\n\n void onBack();\n}", "public interface ViewSearchActivity {\n void clearQuery();\n void enableDeleteButton(boolean enable);\n\n void updateAdapter(List<SongMatch> results);\n\n void showEmptyView();\n void hideEmptyView();\n\n void showLimitBanner();\n\n void hideLimitBanner();\n}", "public static IBookManager asInterface(IBinder obj) {\n if ((obj == null)) {\n return null;\n }\n android.os.IInterface iin = obj.queryLocalInterface(DESCRIPTOR);\n if (((iin != null) && (iin instanceof IBookManager))) {\n return ((IBookManager) iin);\n }\n return new Proxy(obj);\n }", "public interface ISearch {\n void onTextQuery(String text);\n\n}", "public interface GallerySimpleToolbar\n{\n\n public abstract void setNavigationOnClickListener(android.view.View.OnClickListener onclicklistener);\n\n public abstract void setNavigationSetting(GalleryNavigationSetting gallerynavigationsetting);\n\n public abstract void setTitle(CharSequence charsequence);\n}", "public interface CommitsListView {\n\n void addCommitsToRecyclerView(List<Commit> commits);\n void showNetworkError();\n void startCommitDetailsActivity(Commit commit);\n void showToastWithText(String text);\n}", "public void openHistory() {\n usingHistoryScreen = true;\n myActivity.setContentView(R.layout.history);\n Button historyButtonToGame = myActivity.findViewById(R.id.button8);\n TextView historyText = myActivity.findViewById(R.id.textView46);\n historyText.setText(state.getHistory());\n historyText.setMovementMethod(new ScrollingMovementMethod());\n gui.invalidate();\n historyButtonToGame.setOnClickListener(\n new View.OnClickListener() {\n public void onClick(View v) {\n ShogiHumanPlayer.this.setAsGui(myActivity);\n usingHistoryScreen = false;\n if (state != null) {\n receiveInfo(state);\n }\n }\n });\n }", "public PlacesAutocompleteTextView(final Context context, final AttributeSet attrs, final int defAttr) {\n super(context, attrs, defAttr);\n\n init(context, attrs, defAttr, R.style.PACV_Widget_PlacesAutoCompleteTextView, null, context.getString(R.string.pacv_default_history_file_name));\n }", "public interface IAbsListView {\n\n void setOnLoadMoreListener(IonLoadMoreListener onLoadMoreListener);\n\n void notifyDataSetChanged(int positionStart, int itemSize) ;\n\n void setPagesize(int curPagesize);\n\n void setMyAdapter(ListAdapter madapter) ;\n\n void setRecyclerAdapter(RecyclerView.Adapter madapter) ;\n\n void hideloading() ;\n\n void checkloadMore(int size);\n\n // public void set onRefreshComplete\n void reset() ;\n\n void selectionFromTop();\n\n void showNetWorkError();\n}", "public interface Manager {\n\n}", "public interface OnInputFragmentInteractionListener {\n void onInputFragmentInteraction(ArrayList<RepositoryInfo> repositoryInfoArrayList);\n }", "@Override\n public void onTabStateInitialized() {\n SharedPreferences.Editor editor = getSharedPreferences().edit();\n editor.clear();\n TabModelFilter filter =\n mTabModelSelector.getTabModelFilterProvider().getTabModelFilter(false);\n for (int i = 0; i < filter.getCount(); i++) {\n Tab tab = filter.getTabAt(i);\n int id = tab.getId();\n editor.putString(getUrlKey(id), tab.getUrl().serialize());\n editor.putString(getTitleKey(id), tab.getTitle());\n CriticalPersistedTabData tabData = CriticalPersistedTabData.from(tab);\n editor.putInt(getRootIdKey(id), tabData.getRootId());\n editor.putLong(getTimestampMillisKey(id), tabData.getTimestampMillis());\n }\n editor.apply();\n Tab currentTab = mTabModelSelector.getCurrentTab();\n if (currentTab != null) cacheLastSearchTerm(currentTab);\n filter.addObserver(mTabModelObserver);\n }", "interface EditorImpl {\r\n void save(SharedPreferences.Editor editor);\r\n }", "public interface WordSearchInterface {\n\n public void OnProcessFinished(String Description, String MobileUrl, String title, ArrayList list, ArrayList<String> links, boolean redirect);\n\n\n}", "public StringBuilder getHistory() {\r\n\t\treturn history;\r\n\t}", "public interface ISimpleSuggestionPluginProvider extends ISuggestionPluginProvider {\n\n Collection<String> getSuggestions(String input, SuggestionRequestContext context);\n\n}", "public interface FileStoreInterface {\r\n boolean isAuthenticated();\r\n @Nullable\r\n List<String> get(String path);\r\n void archive(String path, List<String> lines);\r\n void startLogin(Activity caller, int i);\r\n void deauthenticate();\r\n void browseForNewFile(Activity act, String path, FileSelectedListener listener, boolean txtOnly);\r\n void modify(String mTodoName, List<String> original,\r\n List<String> updated,\r\n List<String> added,\r\n List<String> removed);\r\n int getType();\r\n void setEol(String eol);\r\n boolean isSyncing();\r\n public boolean initialSyncDone();\r\n void invalidateCache();\r\n void sync();\r\n String readFile(String file);\r\n boolean supportsSync();\r\n public interface FileSelectedListener {\r\n void fileSelected(String file);\r\n }\r\n}", "public interface SearchMangas {\n\n public interface Callback {\n void onSearchMangasResult(List<Manga> resultMangas);\n void onSearchFailed(String error);\n }\n\n void executeFromApi(Callback callback, String query);\n\n}" ]
[ "0.5545034", "0.54631287", "0.545429", "0.5356335", "0.5338803", "0.5302517", "0.52600306", "0.5242101", "0.5233324", "0.52068955", "0.5032064", "0.5029497", "0.5005518", "0.500276", "0.49967915", "0.49741313", "0.49580023", "0.49488", "0.4945537", "0.49279264", "0.48997983", "0.48451528", "0.48451248", "0.48105735", "0.47922868", "0.47891948", "0.47849953", "0.4780271", "0.4774916", "0.47662544", "0.47405946", "0.4729568", "0.47282168", "0.46965808", "0.46483737", "0.46466646", "0.46244526", "0.46207875", "0.4618533", "0.45988557", "0.4595764", "0.45931423", "0.45920554", "0.45785642", "0.45783845", "0.45773062", "0.45661694", "0.45608893", "0.45602033", "0.455497", "0.45442948", "0.45408657", "0.45371383", "0.4532211", "0.45304558", "0.45301762", "0.45235336", "0.45232892", "0.4499969", "0.44942236", "0.44926986", "0.44858536", "0.44848832", "0.44814155", "0.44805235", "0.44781741", "0.4477024", "0.44719237", "0.44704726", "0.4469903", "0.4464842", "0.44573042", "0.44562414", "0.44521114", "0.44418973", "0.44387212", "0.44300988", "0.44290066", "0.44261503", "0.44255665", "0.44094723", "0.44054765", "0.4402742", "0.43837953", "0.43822378", "0.43700397", "0.43692896", "0.4368158", "0.4367816", "0.43665305", "0.43657073", "0.43647528", "0.43635374", "0.4362242", "0.43579388", "0.4354577", "0.43538415", "0.4351871", "0.43517804", "0.43448794" ]
0.62591845
0
Sets the languageCode code used for autocomplete and place details calls. List of supportable codes can be seen in <a href="
public void setLanguageCode(@Nullable String languageCode) { this.languageCode = languageCode; api.setLanguageCode(this.languageCode); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setCode(String code);", "public void setLanguageCode(String languageCode) {\r\n this.languageCode = languageCode;\r\n }", "public void setLangCode(String langCode) {\n\t\tthis._langCode = langCode;\n\t}", "public static void setApplicationLanguage(Context context, String code) {\n\t\tResources res = context.getResources();\n\t\tConfiguration androidConfiguration = res.getConfiguration();\n\t\t\n\t\tandroidConfiguration.locale = new Locale(code);\n\t\tres.updateConfiguration(androidConfiguration, res.getDisplayMetrics());\n\t}", "public void setLangCode(String langCode) {\n\t\tthis.langCode = langCode;\n\t}", "public void setCode(Code code) {\n this.Code = code;\n }", "void setLanguage(Language language);", "public final void setCode(java.lang.String code)\n\t{\n\t\tsetCode(getContext(), code);\n\t}", "private void ChangeLanguage(String languageCode) {\n Context context = LocaleHelper.setLocale(getContext(), languageCode);\n Resources resources = context.getResources();\n\n btn_Fipdetailscontinue.setText(resources.getString(R.string.Continue));\n btn_Home.setText(resources.getString(R.string.Home));\n btn_Info.setText(resources.getString(R.string.Info));\n btn_Back.setText(resources.getString(R.string.Back));\n tv_driverdetailslicenseNo.setText(resources.getString(R.string.LicenseNumber));\n tv_driverdetailsexpiryDate.setText(resources.getString(R.string.ExpiryDate));\n tv_driverdetailsPlateSource.setText(resources.getString(R.string.PlateSource));\n tv_driverdetailsticketNo.setText(resources.getString(R.string.TicketNumber));\n tv_driverdetailsbirthYear.setText(resources.getString(R.string.BirthYear));\n tv_driverDetails.setText(resources.getString(R.string.Details));\n tv_txtdriverDetails.setText(resources.getString(R.string.Details));\n tv_Seconds.setText(resources.getString(R.string.seconds));\n //Setting Title\n if (Title.contains(\"Lost\") || Title.contains(\"Damage\"))\n tvrtaServiceTitle.setText(resources.getString(R.string.DrivingLicenseLossDamage));\n else\n tvrtaServiceTitle.setText(resources.getString(R.string.DrivingLicenseRenewal));\n }", "public void setCode(String code)\n {\n this.code = code;\n }", "public void setCode (String code) {\r\n\t\tthis.code = code;\r\n\t}", "@Override\n public void setLanguage(String lang) {\n }", "public void setCode(java.lang.String code) {\r\n this.code = code;\r\n }", "public void setCode(String code){\n\t\tthis.code = code;\n\t}", "public void setCode(String code) {\n this.code = code;\n }", "public void setCode(String code) {\n this.code = code;\n }", "public void setCode(String code) {\n this.code = code;\n }", "public void setCode(String code) {\n this.code = code;\n }", "public void setCode(String code) {\n this.code = code;\n }", "public void setCode(String code) {\n this.code = code;\n }", "public List setLanguageCode(java.lang.String languageCode) {\n this.languageCode = languageCode;\n return this;\n }", "public void setCode(String code) {\r\n\t\tthis.code = code;\r\n\t}", "public void setCode(String code) {\r\n\t\tthis.code = code;\r\n\t}", "public void setCode(String code) {\r\n\t\tthis.code = code;\r\n\t}", "public void setRequestCode(String requestCode);", "public void setCode(String code) {\n\t\tCode = code;\n\t}", "public void setLanguage(String language);", "public void setCode(String code) {\n\t\tthis.code = code;\n\t}", "public void setCode(String code) {\n\t\tthis.code = code;\n\t}", "public void setCode(int code) {\n this.code = code;\n }", "public void setCode(int code) {\n this.code = code;\n }", "public void setCode(String cod){\n\t\tcodeService = cod;\n\t}", "public void setCode(Long code) {\n this.code = code;\n }", "public void setCode(Long code) {\n this.code = code;\n }", "public Builder setCode(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n code_ = value;\n onChanged();\n return this;\n }", "public void setLanguageCode(String languageCode) {\n this.languageCode = languageCode == null ? null : languageCode.trim();\n }", "public void setCode (java.lang.Long code) {\r\n\t\tthis.code = code;\r\n\t}", "public void setCodeList(CodeList codeList) {\r\n\t\tthis.codeList = codeList;\r\n\t}", "IPayerEntry setCode(CD value);", "public void setCode(String value) {\n setAttributeInternal(CODE, value);\n }", "public void setLanguage(String newLanguage) {\r\n language = newLanguage;\r\n }", "public void setLanguageList(Language[] languageList) {\n this.languageList = languageList;\n }", "SupportedLanguages(@NotNull String name, @NotNull String mainFileName, @NotNull String comment,\n @Nullable String[] beforeCode, @Nullable String[] afterCode) {\n this.name = name;\n this.mainFileName = mainFileName;\n this.comment = comment;\n this.beforeCode = beforeCode;\n this.afterCode = afterCode;\n }", "static private void setLanguage(String strL) {\r\n\r\n\t\tstrLanguage = strL;\r\n\r\n\t\t// need to reload it again!\r\n\t\tloadBundle();\r\n\t}", "public void setLanguage(Language l)\n\t{\n\t\tm_language = l;\n\t}", "public void setCode(long value) {\n this.code = value;\n }", "public BatchGet setLanguageCode(java.lang.String languageCode) {\n this.languageCode = languageCode;\n return this;\n }", "protected void setCode(@Code int code) {\n\t\tthis.mCode = code;\n\t}", "public Builder setLanguage(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n\n language_ = value;\n onChanged();\n return this;\n }", "public void setDataCode(String dataCode);", "public void setAppCode(String appCode)\n\t{\n\t\tthis.appCode = Toolbox.trim(appCode, 3);\n\t}", "public void setCode(BizCodeEnum code) {\n this.code = code;\n }", "public Get setLanguageCode(java.lang.String languageCode) {\n this.languageCode = languageCode;\n return this;\n }", "@SuppressLint(\"SetTextI18n\")\n @Override\n public void setLanguage() {\n if (Value.language_flag == 0) {\n title.setText(title_text);\n back.setText(\"back\");\n copyright.setText(Value.copyright_text + Value.ver);\n nowTime.setText(Value.updatestring + Value.updateTime);\n } else if (Value.language_flag == 1) {\n title.setText(title_text);\n back.setText(\"返回\");\n copyright.setText(Value.copyright_text + Value.ver);\n nowTime.setText(Value.updatestring + Value.updateTime);\n } else if (Value.language_flag == 2) {\n title.setText(title_text);\n back.setText(\"返回\");\n copyright.setText(Value.copyright_text + Value.ver);\n nowTime.setText(Value.updatestring + Value.updateTime);\n }\n }", "@Accessor(qualifier = \"code\", type = Accessor.Type.SETTER)\n\tpublic void setCode(final String value)\n\t{\n\t\tgetPersistenceContext().setPropertyValue(CODE, value);\n\t}", "public void setLBR_ProtestCode (String LBR_ProtestCode);", "private void setCountryCode(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n\n countryCode_ = value;\n }", "private void hitChangeLanguageApi(final String selectedLang) {\n progressBar.setVisibility(View.VISIBLE);\n ApiInterface apiInterface = RestApi.createServiceAccessToken(this, ApiInterface.class);//empty field is for the access token\n final HashMap<String, String> params = AppUtils.getInstance().getUserMap(this);\n params.put(Constants.NetworkConstant.PARAM_USER_ID, AppSharedPreference.getInstance().getString(this, AppSharedPreference.PREF_KEY.USER_ID));\n params.put(Constants.NetworkConstant.PARAM_USER_LANGUAGE, String.valueOf(languageCode));\n Call<ResponseBody> call = apiInterface.hitEditProfileDataApi(AppUtils.getInstance().encryptData(params));\n ApiCall.getInstance().hitService(this, call, new NetworkListener() {\n\n @Override\n public void onSuccess(int responseCode, String response, int requestCode) {\n progressBar.setVisibility(View.GONE);\n AppUtils.getInstance().printLogMessage(Constants.NetworkConstant.ALERT, response);\n switch (responseCode) {\n case Constants.NetworkConstant.SUCCESS_CODE:\n setLanguage(selectedLang);\n// Locale locale = new Locale(language);\n Locale.setDefault(locale);\n Configuration config = new Configuration();\n config.locale = locale;\n getBaseContext().getResources().updateConfiguration(config, getBaseContext().getResources().getDisplayMetrics());\n AppUtils.getInstance().openNewActivity(ChangeLanguageActivity.this, new Intent(ChangeLanguageActivity.this, HomeActivity.class));\n break;\n }\n }\n\n\n @Override\n public void onError(String response, int requestCode) {\n AppUtils.getInstance().printLogMessage(Constants.NetworkConstant.ALERT, response);\n progressBar.setVisibility(View.GONE);\n }\n\n\n @Override\n public void onFailure() {\n progressBar.setVisibility(View.GONE);\n }\n }, 1);\n }", "java.lang.String getTargetLanguageCode();", "public void code (String code) throws LuchthavenException\r\n\t{\r\n\t\tluchthaven.setCode(code);\r\n\t}", "public Builder setCode(int value) {\n\n code_ = value;\n onChanged();\n return this;\n }", "@Override\r\n\t\tpublic void setLang(String lang)\r\n\t\t\t{\n\t\t\t\t\r\n\t\t\t}", "public Builder setLanguage(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n language_ = value;\n onChanged();\n return this;\n }", "public final void setCode(com.mendix.systemwideinterfaces.core.IContext context, java.lang.String code)\n\t{\n\t\tgetMendixObject().setValue(context, MemberNames.Code.toString(), code);\n\t}", "public void setCode(java.lang.String value) {\n __getInternalInterface().setFieldValueForCodegen(CODE_PROP.get(), value);\n }", "public void setCode(Integer code) {\n this.code = code;\n }", "public void setLanguageEnglishButtonText(String text) {\n/*Generated! Do not modify!*/ replyDTO.getVariablesToSet().add(\"overviewSmall_languageEnglishButton_propertyText\");\n/*Generated! Do not modify!*/ if (text == null) {\n/*Generated! Do not modify!*/ replyDTO.getVariableValues().remove(\"overviewSmall_languageEnglishButton_propertyText\");\n/*Generated! Do not modify!*/ } else {\n/*Generated! Do not modify!*/ replyDTO.getVariableValues().put(\"overviewSmall_languageEnglishButton_propertyText\", text);\n/*Generated! Do not modify!*/ }\n/*Generated! Do not modify!*/ if (recordMode){\n/*Generated! Do not modify!*/ addRecordedAction(\"setLanguageEnglishButtonText(\" + escapeString(text) + \");\");\n/*Generated! Do not modify!*/ }\n/*Generated! Do not modify!*/ }", "public void setCode(byte[] code);", "public void setCode(java.lang.String value) {\n __getInternalInterface().setFieldValueForCodegen(CODE_PROP.get(), value);\n }", "Builder addInLanguage(Text value);", "public void setCode(String code) {\n\t\tthis.code = code == null ? null : code.trim();\n\t}", "public void setApplicationLanguage() {\n\t\tinitializeMixerLocalization();\n\t\tinitializeRecorderLocalization();\n\t\tinitializeMenuBarLocalization();\n\t\tsetLocalizedLanguageMenuItems();\n\t\tboardController.setLocalization(bundle);\n\t\tboardController.refreshSoundboard();\n\t}", "void setProductCode(java.lang.String productCode);", "public void setCompletionCode(String completionCode) {\n\t\tthis.completionCode = completionCode;\n\t}", "public void setTEXTCODE(int value) {\n this.textcode = value;\n }", "public void setCode(org.hl7.fhir.CodeableConcept code)\n {\n generatedSetterHelperImpl(code, CODE$6, 0, org.apache.xmlbeans.impl.values.XmlObjectBase.KIND_SETTERHELPER_SINGLETON);\n }", "public void setCodeset (String codeset)\r\n\t{\r\n\t\tthis.codeset = codeset;\r\n\t}", "protected static void setLanguage(Language lang) {\r\n\t\tInterface.lang = lang;\r\n\t}", "public void setLBR_InterestCode (String LBR_InterestCode);", "public void setEditorLanguage(EditorLanguage lang) {\n if(lang == null) {\n lang = new EmptyLanguage();\n }\n this.mLanguage = lang;\n if(mSpanner != null) {\n mSpanner.setCallback(null);\n }\n mSpanner = new TextColorProvider(lang.createAnalyzer());\n mSpanner.setCallback(this);\n if(mText != null) {\n mSpanner.analyze(mText);\n }\n if(mACPanel != null) {\n mACPanel.hide();\n mACPanel.setProvider(lang.createAutoComplete());\n }\n if(mCursor != null){\n mCursor.setLanguage(mLanguage);\n }\n invalidate();\n }", "void setCode(Integer aCode);", "void setCodes(Code[] codes);", "public void setLang() {\n new LanguageManager() {\n @Override\n public void engLanguage() {\n mFirstCurrencyTitle = getString(R.string.converter_main_currency_eng);\n mSaleTitle = getString(R.string.converter_sale_eng);\n mPurchaseTitle = getString(R.string.converter_purchase_eng);\n mCountTitle = getString(R.string.converter_count_of_currencies_eng);\n eTTitle.setText(getResources().getString(R.string.drawer_item_converter_eng));\n tVChosenCurrency.setText(mMainListForActions.get(mPositionOfCurInList)\n .getCurrency().getTitleEng().toUpperCase());\n tVChosenOrganizationTitle.setText(mMainListForActions.get(mPositionOfCurInList)\n .getOrganizations().get(mPositionOfOrgInList).getTitleEng());\n tVSecondCurrency.setText(mMainListForActions.get(mPositionOfCurInList)\n .getCurrency().getTitleEng().toUpperCase().concat(\" (\").concat(mCurrencyShortForm).concat(\")\"));\n mCurrencyDialogTitle = getString(R.string.drawer_item_currencies_eng);\n mOrganizationDialogTitle = getString(R.string.drawer_item_organizations_eng);\n mActionDialogTitle = getString(R.string.converter_dialog_action_title_eng);\n mToastFailure = getString(R.string.converter_toast_failure_eng);\n mTitle = getResources().getString(R.string.drawer_item_converter_eng);\n mMessage = getString(R.string.dialog_template_text_eng);\n mTitleButtonOne = getString(R.string.dialog_template_edit_eng);\n mTitleButtonTwo = getString(R.string.dialog_template_create_eng);\n mToastEdited = getString(R.string.converter_toast_template_edit_eng);\n mToastCreated = getString(R.string.converter_toast_template_create_eng);\n mMessageFinal = getString(R.string.converter_final_dialog_text_eng);\n mTitleButtonOneFinal = getString(R.string.converter_final_dialog_yes_eng);\n mTitleButtonTwoFinal = getString(R.string.converter_final_dialog_no_eng);\n }\n\n @Override\n public void ukrLanguage() {\n mFirstCurrencyTitle = getString(R.string.converter_main_currency_ukr);\n mSaleTitle = getString(R.string.converter_sale_ukr);\n mPurchaseTitle = getString(R.string.converter_purchase_ukr);\n mCountTitle = getString(R.string.converter_count_of_currencies_ukr);\n eTTitle.setText(getResources().getString(R.string.drawer_item_converter_ukr));\n tVChosenCurrency.setText(mMainListForActions.get(mPositionOfCurInList)\n .getCurrency().getTitleUkr().toUpperCase());\n tVChosenOrganizationTitle.setText(mMainListForActions.get(mPositionOfCurInList)\n .getOrganizations().get(mPositionOfOrgInList).getTitleUkr());\n tVSecondCurrency.setText(mMainListForActions.get(mPositionOfCurInList)\n .getCurrency().getTitleUkr().toUpperCase().concat(\" (\").concat(mCurrencyShortForm).concat(\")\"));\n mCurrencyDialogTitle = getString(R.string.drawer_item_currencies_ukr);\n mOrganizationDialogTitle = getString(R.string.drawer_item_organizations_ukr);\n mActionDialogTitle = getString(R.string.converter_dialog_action_title_ukr);\n mToastFailure = getString(R.string.converter_toast_failure_ukr);\n mTitle = getResources().getString(R.string.drawer_item_converter_ukr);\n mMessage = getString(R.string.dialog_template_text_ukr);\n mTitleButtonOne = getString(R.string.dialog_template_edit_ukr);\n mTitleButtonTwo = getString(R.string.dialog_template_create_ukr);\n mToastEdited = getString(R.string.converter_toast_template_edit_ukr);\n mToastCreated = getString(R.string.converter_toast_template_create_ukr);\n mMessageFinal = getString(R.string.converter_final_dialog_text_ukr);\n mTitleButtonOneFinal = getString(R.string.converter_final_dialog_yes_ukr);\n mTitleButtonTwoFinal = getString(R.string.converter_final_dialog_no_ukr);\n }\n\n @Override\n public void rusLanguage() {\n mFirstCurrencyTitle = getString(R.string.converter_main_currency_rus);\n mSaleTitle = getString(R.string.converter_sale_rus);\n mPurchaseTitle = getString(R.string.converter_purchase_rus);\n mCountTitle = getString(R.string.converter_count_of_currencies_rus);\n eTTitle.setText(getResources().getString(R.string.drawer_item_converter_rus));\n tVChosenCurrency.setText(mMainListForActions.get(mPositionOfCurInList)\n .getCurrency().getTitleRus().toUpperCase());\n tVChosenOrganizationTitle.setText(mMainListForActions.get(mPositionOfCurInList)\n .getOrganizations().get(mPositionOfOrgInList).getTitleRus());\n tVSecondCurrency.setText(mMainListForActions.get(mPositionOfCurInList)\n .getCurrency().getTitleRus().toUpperCase().concat(\" (\").concat(mCurrencyShortForm).concat(\")\"));\n mCurrencyDialogTitle = getString(R.string.drawer_item_currencies_rus);\n mOrganizationDialogTitle = getString(R.string.drawer_item_organizations_rus);\n mActionDialogTitle = getString(R.string.converter_dialog_action_title_rus);\n mToastFailure = getString(R.string.converter_toast_failure_rus);\n mTitle = getResources().getString(R.string.drawer_item_converter_rus);\n mMessage = getString(R.string.dialog_template_text_rus);\n mTitleButtonOne = getString(R.string.dialog_template_edit_rus);\n mTitleButtonTwo = getString(R.string.dialog_template_create_rus);\n mToastEdited = getString(R.string.converter_toast_template_edit_rus);\n mToastCreated = getString(R.string.converter_toast_template_create_rus);\n mMessageFinal = getString(R.string.converter_final_dialog_text_rus);\n mTitleButtonOneFinal = getString(R.string.converter_final_dialog_yes_rus);\n mTitleButtonTwoFinal = getString(R.string.converter_final_dialog_no_rus);\n }\n };\n getDataForActionDialog();\n setData();\n }", "protected void setFunctionCode(int code) {\n m_FunctionCode = code;\n // setChanged(true);\n }", "Builder addInLanguage(String value);", "public void setLanguage(String pLanguage) throws DynamicCallException, ExecutionException{\n call(\"setLanguage\", pLanguage).get();\n }", "@Override\n public void setGameCodeRef(String gameCodeRef){\n this.gameCodeRef = gameCodeRef;\n }", "public void setCode(String code) {\n this.code = code == null ? null : code.trim();\n }", "public void setCode(String code) {\n this.code = code == null ? null : code.trim();\n }", "public void setCode(String code) {\n this.code = code == null ? null : code.trim();\n }", "public void setCode(String code) {\n this.code = code == null ? null : code.trim();\n }", "public void setCode(String code) {\n this.code = code == null ? null : code.trim();\n }", "public void setCode(String code) {\n this.code = code == null ? null : code.trim();\n }", "public void setCode(String code) {\n this.code = code == null ? null : code.trim();\n }", "public void setCode(String code) {\n this.code = code == null ? null : code.trim();\n }", "public void setCode(String code) {\n this.code = code == null ? null : code.trim();\n }", "public void setInternationalStandardRecordingCode(java.lang.String value) {\r\n\t\tBase.set(this.model, this.getResource(), INTERNATIONALSTANDARDRECORDINGCODE, value);\r\n\t}", "@Internal(since=\"3.15 beta 3\")\n @Deprecated\n HyperlinkType(int code) {\n this.code = code;\n }", "public void setCodeField(java.lang.String codeField) {\n this.codeField = codeField;\n }", "public void setFontsCode(String fontsCode) {\r\n\t\tthis.fontsCode = fontsCode;\r\n\t}" ]
[ "0.65808374", "0.63495725", "0.63433605", "0.632507", "0.6292911", "0.62362343", "0.6219412", "0.6184326", "0.6136146", "0.612766", "0.61117387", "0.6097743", "0.60954434", "0.6071611", "0.6053196", "0.6053196", "0.6053196", "0.6053196", "0.6053196", "0.6053196", "0.5978006", "0.5973524", "0.5973524", "0.5973524", "0.5950468", "0.59455264", "0.5942112", "0.58594763", "0.58594763", "0.5786029", "0.5786029", "0.5765687", "0.5759927", "0.5759927", "0.5750624", "0.5748294", "0.57444775", "0.5728294", "0.5721072", "0.5719301", "0.5713076", "0.5712183", "0.571004", "0.57056415", "0.56930125", "0.56830496", "0.5667772", "0.5665015", "0.5637991", "0.5619011", "0.5615803", "0.559535", "0.55639935", "0.55523163", "0.55147964", "0.5508002", "0.55022013", "0.5498666", "0.5483358", "0.5466804", "0.5458488", "0.5458303", "0.5435655", "0.54336214", "0.5422159", "0.5414975", "0.54132485", "0.5407606", "0.53952557", "0.53909105", "0.53897274", "0.53786296", "0.53722537", "0.5369304", "0.5369232", "0.5365187", "0.5343374", "0.53428525", "0.5335993", "0.5335221", "0.5332228", "0.5323765", "0.53194386", "0.531731", "0.5313239", "0.5312691", "0.5301706", "0.5295604", "0.5295604", "0.5295604", "0.5295604", "0.5295604", "0.5295604", "0.5295604", "0.5295604", "0.5295604", "0.5291824", "0.5290689", "0.5280612", "0.52791387" ]
0.6264893
5
Sets the country code used for spanning autocomplete calls. List of supportable codes can be seen in <a href="
public void setCountryCode(@Nullable String countryCode) { this.countryCode = countryCode; api.setCountryCode(this.countryCode); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setCountry(java.lang.CharSequence value) {\n this.country = value;\n }", "private void setCountryCode(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n\n countryCode_ = value;\n }", "public void setCountryCode(int value) {\r\n\t\tthis.countryCode = value;\r\n\t}", "public void setCountryCode(String value) {\r\n setAttributeInternal(COUNTRYCODE, value);\r\n }", "public void setCountryCode(String value) {\n setAttributeInternal(COUNTRYCODE, value);\n }", "public void setCountryCode(String value) {\n setAttributeInternal(COUNTRYCODE, value);\n }", "public void setCountryCode(String countryCode)\r\n\t{\r\n\t\tthis.countryCode = countryCode;\r\n\t}", "public void setcountryCode(String countryCode) {\n this.countryCode = countryCode;\n }", "public void setCountryName(String value);", "public Builder setCountry(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000080;\n country_ = value;\n onChanged();\n return this;\n }", "public void setCountryCode(String countryCode) {\n this.countryCode = countryCode;\n }", "public void setCountryCode(java.lang.String countryCode) {\n this.countryCode = countryCode;\n }", "public void setAddressCountry(String addressCountry) {\n this.addressCountry = addressCountry;\n }", "public com.luisjrz96.streaming.birthsgenerator.models.BirthInfo.Builder setCountry(java.lang.CharSequence value) {\n validate(fields()[2], value);\n this.country = value;\n fieldSetFlags()[2] = true;\n return this;\n }", "@JsonSetter(\"countryCodeA3\")\r\n public void setCountryCodeA3 (String value) { \r\n this.countryCodeA3 = value;\r\n }", "@OnClick(R.id.txt_country_code)\n void onCountryCodeClicked(){\n if (mCountryPickerDialog == null){\n mCountryPickerDialog = new CountryPickerDialog(this, (country, flagResId) -> {\n mSelectedCountry = country;\n setCountryCode(mSelectedCountry);\n });\n }\n\n mCountryPickerDialog.show();\n }", "public Builder setCountryCode(\n String value) {\n copyOnWrite();\n instance.setCountryCode(value);\n return this;\n }", "public void setCountry(String value) {\n setAttributeInternal(COUNTRY, value);\n }", "public void setCountry(String value) {\n setAttributeInternal(COUNTRY, value);\n }", "public void setCountry(String value) {\n setAttributeInternal(COUNTRY, value);\n }", "public void setCountryCode(String countryCode) {\r\n\t\t\tthis.countryCode = countryCode;\r\n\t\t}", "public void setCountryCallingCode(int countryCallingCode) {\n this.countryCallingCode = countryCallingCode;\n }", "public void setCountryAccessCode(String countryAccessCode) {\n this.countryAccessCode = countryAccessCode;\n }", "private void setCountryCode( Office office ) {\n String country = null;\n switch ( office ) {\n case BRISTOL:\n case EDINBURGH:\n case GLASGOW:\n case LONDON:\n case MANCHESTER:\n case TAUNTON:\n country = Country.UK.getLongName();\n break;\n case PERTH:\n case SYDNEY:\n country = Country.AUSTRALIA.getLongName();\n break;\n case SINGAPORE:\n country = Country.SINGAPORE.getLongName();\n break;\n }\n\n countryCode.setText( new StringBuilder()\n .append( country )\n .append( \" \" )\n .append( \"(\" )\n .append( Country.getCountryFromName( country ).getIntCode() )\n .append( \")\" )\n .toString() );\n }", "public void setCountry(String country) {\n this.country = country;\n }", "public void setCountry(String country) {\n this.country = country;\n }", "public void setCountry(String country) {\n this.country = country;\n }", "public void setCountry(String country) {\n this.country = country;\n }", "public void setCountry(String country) {\n this.country = country;\n }", "public void setCountry(String country) {\n this.country = country;\n }", "public void setCountryCode(final String newCountryCode) {\n if (TextUtils.isEmpty(mPhoneNumberInput.getText())) {\n updateCountryCode(newCountryCode);\n } else {\n // Clear old prefix from phone before assigning new one\n String updatedPhone = mPhoneNumberInput.getText().toString();\n if (mCurrentPhonePrefix != null && updatedPhone.startsWith(mCurrentPhonePrefix)) {\n updatedPhone = updatedPhone.substring(mCurrentPhonePrefix.length());\n }\n updateCountryCode(newCountryCode);\n\n if (!TextUtils.isEmpty(updatedPhone)) {\n formatPhoneNumber(updatedPhone);\n } else if (mCountryCodeInput.getVisibility() == View.VISIBLE) {\n initPhoneWithPrefix();\n }\n }\n }", "public void setCountry(Country country) {\n this.country = country;\n }", "public void setCountryId(int value);", "public void setCountry(String country) {\n this.country = country;\n }", "public void setCountry(java.lang.String country) {\r\n this.country = country;\r\n }", "public void setAuthyCountryCode (String countrycode) {\n\t\tthis.authyCountryCode = countrycode;\n\t}", "private void setCountryCodeBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n\n countryCode_ = value.toStringUtf8();\n }", "public void setCountry(Integer country) {\n this.country = country;\n }", "public void setCountry(Integer country) {\n this.country = country;\n }", "public void setCountry(java.lang.String country) {\n this.country = country;\n }", "static public void set_country_data(){\n\n\t\tEdit_row_window.attrs = new String[]{\"country name:\", \"area (1000 km^2):\", \"GDP per capita (1000 $):\",\n\t\t\t\t\"population (million):\", \"capital:\", \"GDP (billion $):\"};\n\t\tEdit_row_window.attr_vals = new String[]\n\t\t\t\t{Edit_row_window.selected[0].getText(1), Edit_row_window.selected[0].getText(2), \n\t\t\t\tEdit_row_window.selected[0].getText(3), Edit_row_window.selected[0].getText(4), \n\t\t\t\tEdit_row_window.selected[0].getText(5), Edit_row_window.selected[0].getText(6)};\n\t\t\n\t\tEdit_row_window.linked_query =\t\" select distinct l.id, l.name, l.num_links, l.population \" +\n\t\t\t\t\t\t\t\t\t\t\t\" from curr_places_locations l, \" +\n\t\t\t\t\t\t\t\t\t\t\t\" curr_places_location_country lc \" +\n\t\t\t\t\t\t\t\t\t\t\t\" where lc.location_id=l.id and lc.country_id=\"+Edit_row_window.id+\n\t\t\t\t\t\t\t\t\t\t\t\" order by num_links desc \";\n\t\t\t\t\n\t\tEdit_row_window.not_linked_query = \" select distinct l.id, l.name, l.num_links, l.population \" +\n\t\t\t\t\" from curr_places_locations l \";\n\t\t\n\t\tEdit_row_window.linked_attrs = new String[]{\"id\", \"location name\", \"rating\", \"population\"};\n\t\tEdit_row_window.label_min_parameter=\"min. population:\";\n\t\tEdit_row_window.linked_category_name = \"LOCATIONS\";\n\t}", "IPayerEntry setCode(CD value);", "public void setCountry(java.lang.String Country) {\n this.Country = Country;\n }", "void setCode(String code);", "public void setCountry(String country) {\r\n\t\tthis.country = country;\r\n\t}", "public void setCountry(String country) {\r\n\t\tthis.country = country;\r\n\t}", "public void setCountry(String country) {\r\n\t\tthis.country = country;\r\n\t}", "public String getcountryCode() {\n return countryCode;\n }", "private void setCountries(List<Country> countries) {\n this.countries = countries;\n }", "public String getCountryCode() {\n return countryCode;\n }", "public String getCountryCode() {\n return countryCode;\n }", "String getCountryCode();", "public void setCountry(String country) {\r\n this.country = country.trim();\r\n }", "java.lang.String getCountryCode();", "java.lang.String getCountryCode();", "@ApiModelProperty(value = \"Two-letter country code of IP address\")\n public String getCountryCode() {\n return countryCode;\n }", "public Builder setCountryName(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n countryName_ = value;\n onChanged();\n return this;\n }", "public final void setCountry(final String ccountry) {\n\t\tthis.country = ccountry;\n\t}", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n switch (requestCode) {\n case RegisterActivity.CHANGE_COUNTRY_CODE:\n tv_cphone.setText(\"+\" + AppConfig.COUNTRY_CODE);\n break;\n default:\n break;\n }\n }", "public Address country(String country) {\n this.country = country;\n return this;\n }", "private void replaceWithSponsorBaseAdress(String sponsorCode){\r\n /**\r\n * Updated for REF ID :0003 Feb'21 2003.\r\n * Hour Glass implementation while DB Trsactions Wait\r\n * by Subramanya Feb' 21 2003\r\n */\r\n dlgWindow.setCursor( new Cursor( Cursor.WAIT_CURSOR ) );\r\n String rldxId = rldxController.getRolodexIdForSponsor(sponsorCode);\r\n RolodexDetailsBean rolodexBean =\r\n rldxController.displayRolodexInfo(rldxId);\r\n dlgWindow.setCursor( new Cursor( Cursor.DEFAULT_CURSOR ) );\r\n \r\n txtAddress1.setText(\r\n rolodexBean.getAddress1() == null ? \"\" : rolodexBean.getAddress1());\r\n txtAddress2.setText(\r\n rolodexBean.getAddress2() == null ? \"\" : rolodexBean.getAddress2());\r\n txtAddress3.setText(\r\n rolodexBean.getAddress3() == null ? \"\" : rolodexBean.getAddress3());\r\n txtCity.setText(\r\n rolodexBean.getCity() == null ? \"\" : rolodexBean.getCity());\r\n txtCounty.setText(\r\n rolodexBean.getCounty() == null ? \"\" : rolodexBean.getCounty());\r\n //Modified for Case#4252 - Rolodex state dropdown associated with country - Start\r\n cmbCountry.setSelectedItem(rolodexBean.getCountry());\r\n// cmbState.setSelectedItem(rolodexBean.getState());\r\n// if (((ComboBoxBean)cmbCountry.getSelectedItem()).getCode().trim().equals(\"USA\") ){\r\n//// cmbState.setShowCode(true);\r\n// setStateInfo();\r\n// }else{\r\n//// cmbState.setShowCode(false);\r\n// cmbState.removeAllItems();\r\n// ComboBoxBean cmbBean = rolodexBean.getState() != null ?\r\n// new ComboBoxBean(rolodexBean.getState(),rolodexBean.getState())\r\n// : new ComboBoxBean(\" \",\" \");\r\n// cmbState.addItem(cmbBean);\r\n// }\r\n //Case#4252 - End\r\n cmbState.setRequestFocusEnabled(false);\r\n cmbState.setSelectedItem(\r\n rolodexBean.getState() == null ? \" \" :rolodexBean.getState().toString());\r\n txtPostalCode.setText(\r\n rolodexBean.getPostalCode() == null ? \"\" : rolodexBean.getPostalCode());\r\n txtPhone.setText(\r\n rolodexBean.getPhone() == null ? \"\" : rolodexBean.getPhone());\r\n txtEMail.setText(\r\n rolodexBean.getEMail() == null ? \"\" : rolodexBean.getEMail());\r\n txtFax.setText(\r\n rolodexBean.getFax() == null ? \"\" : rolodexBean.getFax());\r\n }", "public void setCountry(String country) {\n\t\tthis.country = country;\n\t}", "private void updateCountryCode(final String newCountryCode) {\n if (!TextUtils.isEmpty(newCountryCode) && !newCountryCode.equals(mCountryCode)) {\n mCountryCode = newCountryCode;\n switch (mDisplayMode) {\n case DISPLAY_COUNTRY_FULL_NAME:\n mCountryCodeInput.setText(PhoneNumberUtils.getHumanCountryCode(mCountryCode));\n break;\n case DISPLAY_COUNTRY_ISO_CODE:\n mCountryCodeInput.setText(mCountryCode);\n break;\n }\n // Update the prefix\n final int prefix = PhoneNumberUtil.getInstance().getCountryCodeForRegion(mCountryCode);\n if (prefix > 0) {\n mCurrentPhonePrefix = \"+\" + prefix;\n }\n }\n }", "public String countryCode() {\n return countryCode;\n }", "public void setCanceledCountryCode(String val) {\n // ProtectBlock setCanceledCountryCode\n // ProtectBlock End\n this.canceledCountryCode = val;\n }", "@Override\n\t\t\tpublic void onSelectCountry(String name, String code) {\n\t\t\t\tIntent intent = new Intent(contry.this, SignUpActivity.class);\n\t\t\t\t intent.putExtra(\"pays_iso\",code); \n\t\t\t\t intent.putExtra(\"pays_name\",name); \n\t\t\t\t intent.putExtra(\"device_key\",registrationId); \n\t\t\t\tstartActivityForResult(intent, 0);\n\t\t\t\toverridePendingTransition(R.anim.slidein, R.anim.slideout);\n\t\t\t\tfinish();\n\t\t\t}", "@Override\n\t\t\t\t\tpublic void onSelectCountry(String name, String code) {\n\t\t\t\t\t\tIntent intent = new Intent(contry.this, SignUpActivity.class);\n\t\t\t\t\t\t intent.putExtra(\"pays_iso\",code); \n\t\t\t\t\t\t intent.putExtra(\"pays_name\",name); \n\t\t\t\t\t\t intent.putExtra(\"device_key\",registrationId); \n\t\t\t\t\t\tstartActivityForResult(intent, 0);\n\t\t\t\t\t\toverridePendingTransition(R.anim.slidein, R.anim.slideout);\n\t\t\t\t\t\tfinish();\n\t\t\t\t\t}", "public int getCountryCode() {\r\n\t\treturn countryCode;\r\n\t}", "public Builder setCountry(CountryCode country) {\n this.country = country;\n return this;\n }", "public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (resultCode == -1) {\n String selectCountry = data.getStringExtra(CountrySelectListActivity.SELECT_COUNTRY_AREO_CODE);\n if (selectCountry != null) {\n this.mTvSelectCountry.setText(selectCountry.substring(0, selectCountry.lastIndexOf(Marker.ANY_MARKER)));\n this.mTvAreaCode.setText(selectCountry.substring(selectCountry.lastIndexOf(Marker.ANY_MARKER) + 1));\n }\n }\n }", "public void setCode(String cod){\n\t\tcodeService = cod;\n\t}", "@javax.annotation.Nullable\n @ApiModelProperty(value = \"Country code where the bank is located. A valid value is an ISO two-character country code (e.g. 'NL').\")\n\n public String getCountryCode() {\n return countryCode;\n }", "public void setCountry (java.lang.String country) {\n\t\tthis.country = country;\n\t}", "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2014-03-25 14:14:32.652 -0400\", hash_original_method = \"323D3A6C48A6D472DDFE2721C7FED43F\", hash_generated_method = \"9B8474327C39F7658DB849B205974B0F\")\n \n public static boolean setCountryCodeCommand(String countryCode){\n \tdouble taintDouble = 0;\n \ttaintDouble += countryCode.getTaintInt();\n \n \treturn ((taintDouble) == 1);\n }", "public String getCountryCode() {\n return countryCode_;\n }", "public void setCOUNTRY_CODE(java.lang.String COUNTRY_CODE) {\r\n\t\tthis._COUNTRY_CODE = COUNTRY_CODE;\r\n\t}", "public ScText newOriginCountryCodeText()\n {\n return newOriginCountryCodeText(\"Origin Country Code\");\n }", "public String getCountryAccessCode() {\n return countryAccessCode;\n }", "public void setCountryFieldName(final String value) {\n setProperty(COUNTRY_FIELD_NAME_KEY, value);\n }", "public void setCountries(List<Country> countries)\n {\n this.countries = countries;\n\n countriesMap = countries.stream().\n filter(c -> !\"-99\".equals(c.getIsoCode())).\n collect(Collectors.toMap(Country::getIsoCode, Function.identity()));\n\n LOGGER.info(\"Stored {} countries with valid code ( != -99) \", countriesMap.size());\n\n regions = new WorldRegions(countries);\n }", "@Override\n public void onSuccess(Location location) {\n if (location != null) {\n\n// GeoCoderUtils.getCountryCode(3.152194, 101.778446, RegisterActivityNewFirst.this, new GeoCoderUtils.GeocoderListner() {\n// GeoCoderUtils.getCountryCode(location.getLatitude(), location.getLongitude(), RegisterActivityNewFirst.this, new GeoCoderUtils.GeocoderListner() {\n\n GeoCoderUtils.getCountryCode(location.getLatitude(), location.getLongitude(), RegisterActivityNewFirst.this, new GeoCoderUtils.GeocoderListner() {\n// GeoCoderUtils.getCountryCode(25.105497, 121.597366, RegisterActivityNewFirst.this, new GeoCoderUtils.GeocoderListner() {\n// malasia GeoCoderUtils.getCountryCode(3.152194, 101.778446, RegisterActivityNewFirst.this, new GeoCoderUtils.GeocoderListner() {\n @Override\n public void onGetCode(String country_name,String country_code, String stateNamefromeo, String cityNamefrogeo) {\n\n countryName = country_name;\n stateNamefromGeo = stateNamefromeo;\n cityNameFromGeo = cityNamefrogeo;\n CommonUtils.showLog(\"location1\", \"Code is :\" + country_code);\n if (country_code != null) {\n String dialcode = \"\";\n if (countryCode != null && countryList != null) {\n for (int i = 0; i < countryList.size(); i++) {\n if (country_code.equalsIgnoreCase(countryList.get(i).getCountrycode())) {\n CommonUtils.showLog(\"location2\", \"Code is :\" + country_code);\n textViewCountry.setText(\"\" + countryList.get(i).getName());\n countryId = countryList.get(i).getId();\n countryCode = country_code;\n getState();\n textViewDialCode.setText(\"+\" + countryList.get(i).getPhonecode());\n dialCode = countryList.get(i).getPhonecode();\n\n for (int j = 0; j < Country.getAllCountries().size(); j++) {\n {\n if (countryList.get(i).getName().equalsIgnoreCase(Country.getAllCountries().get(j).getName())) {\n imageViewFlag.setImageResource(Country.getAllCountries().get(j).getFlag());\n return;\n }\n }\n }\n return;\n }\n }\n }\n }\n }\n });\n }\n }", "@Override\r\n public void assignCountries() {\r\n printInvalidCommandMessage();\r\n }", "public String getCountryCode()\r\n\t{\r\n\t\treturn this.countryCode;\r\n\t}", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tshowCountrycode();\n\t\t\t\t}", "public Builder setCode(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n code_ = value;\n onChanged();\n return this;\n }", "public void setCountry(Country v) throws TorqueException\n {\n if (v == null)\n {\n setCustCountryId( 999);\n }\n else\n {\n setCustCountryId(v.getCountryId());\n }\n aCountry = v;\n }", "public void setCountryName(){\n\t\tcountry_name = JOptionPane.showInputDialog(FrameHandler.main_frame, \"Enter the name of your country\");\n\t}", "public CountryCode getCountry() {\n return country;\n }", "public java.lang.CharSequence getCountry() {\n return country;\n }", "public Builder setCountryBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000080;\n country_ = value;\n onChanged();\n return this;\n }", "public void setCode(Code code) {\n this.Code = code;\n }", "public void country(String num) {\r\n\t\tSelect selectcountry = new Select(country);\r\n\t\tselectcountry.deselectByVisibleText(num);\r\n\t\tsleep(1000);\r\n\r\n\t}", "@RequestMapping(value = \"showCountry\", method = RequestMethod.POST)\r\n public String showCountry(@RequestParam(value = \"countryCode\", required = false, defaultValue = \"pl\") String countryCode, Model model) {\r\n PanaStructureCollector psc = new PanaStructureCollector();\r\n // List<String> categories = psc.getCategoriesUrls(countryCode);\r\n model.addAttribute(\"categories\", psc.getCategoriesUrls(countryCode));\r\n System.out.println(countryCode);\r\n return \"country\";\r\n }", "public void setContactCountry(String contactCountry) {\n this.contactCountry = contactCountry;\n }", "public void setNationality(String nationality);", "public String getCountry() {\r\n return this.country;\r\n }", "public void setCode(String code)\n {\n this.code = code;\n }", "public String getCountryCode() {\n\t\treturn countryCode;\n\t}", "private void clearCountryCode() {\n\n countryCode_ = getDefaultInstance().getCountryCode();\n }", "public int getCountryCallingCode() {\n return countryCallingCode;\n }" ]
[ "0.71563077", "0.6987658", "0.6832541", "0.678715", "0.67166847", "0.67166847", "0.6642616", "0.6640724", "0.66092396", "0.65963846", "0.6575446", "0.6473659", "0.647001", "0.64633465", "0.6452269", "0.6384789", "0.6321689", "0.6316331", "0.6316331", "0.6316331", "0.6304655", "0.6274473", "0.6265224", "0.6249901", "0.6249156", "0.6249156", "0.6249156", "0.6249156", "0.6249156", "0.6249156", "0.62228614", "0.6186756", "0.61839575", "0.6164073", "0.6134457", "0.61114603", "0.6100389", "0.6084453", "0.6084453", "0.60639656", "0.60556746", "0.6041319", "0.60188943", "0.6008824", "0.59953463", "0.59953463", "0.59953463", "0.59637487", "0.5913989", "0.58800256", "0.58800256", "0.587276", "0.5865005", "0.58582807", "0.58582807", "0.584977", "0.5846276", "0.5834935", "0.58329195", "0.58224314", "0.58055925", "0.58019567", "0.58016884", "0.58015305", "0.5787854", "0.57030666", "0.5701135", "0.56921166", "0.5681868", "0.56666756", "0.5662605", "0.56523085", "0.56435645", "0.56403124", "0.5635943", "0.56335413", "0.5619168", "0.5616877", "0.56158286", "0.55885386", "0.5586821", "0.5571392", "0.55634236", "0.55617565", "0.5559142", "0.55471486", "0.55429417", "0.55358255", "0.55271024", "0.5526922", "0.5526313", "0.55062747", "0.5497768", "0.5488799", "0.54884124", "0.5479746", "0.5476072", "0.54722786", "0.54561406", "0.5455164" ]
0.6449105
15
Copied from TextInputEditText to ensure extract mode hint works
@Override public InputConnection onCreateInputConnection(EditorInfo outAttrs) { final InputConnection ic = super.onCreateInputConnection(outAttrs); if (ic != null && outAttrs.hintText == null) { // If we don't have a hint and our parent is a TextInputLayout, use it's hint for the // EditorInfo. This allows us to display a hint in 'extract mode'. ViewParent parent = getParent(); while (parent instanceof View) { if (parent instanceof TextInputLayout) { outAttrs.hintText = ((TextInputLayout) parent).getHint(); break; } parent = parent.getParent(); } } return ic; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void onScreenHint(CharSequence text);", "@Override\n public boolean onTouch (View v, MotionEvent event){\n switch (event.getAction()){\n case MotionEvent.ACTION_DOWN:\n\n //Pressed. Show password\n //mEditPassw.setInputType(InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD);\n //new code\n mEditPassw.setTransformationMethod(null);\n break;\n case MotionEvent.ACTION_UP:\n\n //Released. Hide password\n //mEditPassw.setInputType(InputType.TYPE_TEXT_VARIATION_PASSWORD);\n //New code\n mEditPassw.setTransformationMethod(new PasswordTransformationMethod());\n break;\n }\n return true; //Not handles action_cancel, cause I on\n }", "public void setHint(int str) { this.editText.setHint(str); }", "@Test\n public void researchEditTextInputTest() {\n onView(withId(R.id.network_input_research))\n .perform(typeText(INPUT_TEXT))\n .check(matches(withText(INPUT_TEXT)));\n }", "public void setHint(String str) { this.editText.setHint(str); }", "@Override\n public void onClick(View v) {\n String inputFieldText = ((TextView) findViewById(R.id.inputField)).getText().toString();\n\n // Set text to custom text, or if custom text is empty set to default hint\n if (inputFieldText.isEmpty()) {\n ((TextView) findViewById(R.id.text)).setText(\"Enter your OWN text!\");\n } else {\n ((TextView) findViewById(R.id.text)).setText(inputFieldText);\n }\n }", "public interface IEditTextExt {\n\n /**\n * the extension feature that set the inputText length input filter\n * @param inputText the EditText to set.\n * @param context\n * @param maxLength\n */\n void setLengthInputFilter(EditText inputText, final Context context, final int maxLength);\n}", "@Override\r\n public void afterTextChanged(Editable arg0) {\n if (mVehicleCode.equals(\"苏\") && arg0.length() > 0\r\n && arg0.toString().substring(0, 1).equals(\"E\")) {\r\n mVehicleFrameNumLL.setVisibility(View.VISIBLE);\r\n mVehicleEngineNumLL.setVisibility(View.GONE);\r\n mVehicleFrameNumET.setHint(\"请输入车架号后7位\");\r\n mVehicleFrameNumET\r\n .setFilters(new InputFilter[]{new InputFilter.LengthFilter(\r\n 7)});\r\n } else if (mVehicleCode.equals(\"苏\") && arg0.length() > 0\r\n && !arg0.toString().substring(0, 1).equals(\"E\")) {\r\n mVehicleEngineNumLL.setVisibility(View.VISIBLE);\r\n mVehicleFrameNumLL.setVisibility(View.GONE);\r\n mVehicleEngineNumET.setHint(\"请输入发动机号后6位\");\r\n mVehicleEngineNumET\r\n .setFilters(new InputFilter[]{new InputFilter.LengthFilter(\r\n 6)});\r\n }\r\n }", "@Override\n\tpublic void afterTextChanged(Editable s) {\n\t\tString formattedValue = \"\";\n\t\tint cursorIdexToSet = 0;\n\t\tif (!isFormatting) {\n\t\t\tmLastCursorIndex = mLastStartLocation;\n\t\t\tmLastBeforeText = mBeforeText;\n\t\t\tisFormatting = true;\n\t\t\tformattedValue = formatUsNumber(s);\n\t\t\ttry{\n\t\t\tif (formattedValue != null) {\n\t\t\t\tmWeakEditText.get().setText(formattedValue);\n\t\t\t\tmWeakEditText.get().setTextKeepState(formattedValue.toString());\n\t\t\t}\n\t\t\t\n\t\t\tif(mWeakEditText.get().getText().toString().length() == 5){\n\t\t\t\tcursorIdexToSet = mBeforeText.toString().length();\n\t\t\t}\n\t\t\telse if(mLastBeforeText.toString().length() > mWeakEditText.get().getText().toString().length() &&\n\t\t\t\t\tmLastBeforeText.toString().length() - mWeakEditText.get().getText().toString().length() == 1){\n\t\t\t\tif(mLastBeforeText.toString().indexOf(\",\") == mLastCursorIndex){\n\t\t\t\t\tmLastCursorIndex--;\n\t\t\t\t}\n\t\t\t\tcursorIdexToSet = mLastCursorIndex;\n\t\t\t}\n\t\t\telse if(mLastBeforeText.toString().length() - mWeakEditText.get().getText().toString().length() > 1){\n\t\t\t\tcursorIdexToSet = mWeakEditText.get().getText().length();\n\t\t\t}\n\t\t\telse{\n\t\t\t\tif((mLastCursorIndex + 1) <= mWeakEditText.get().getText().length()){\n\t\t\t\t\tif(mWeakEditText.get().getText().toString().length() - mLastBeforeText.toString().length() > 1){\n\t\t\t\t\t\tmLastCursorIndex += mWeakEditText.get().getText().toString().length() - mLastBeforeText.toString().length();\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tmLastCursorIndex++;\n\t\t\t\t\t}\n\t\t\t\t\tcursorIdexToSet = mLastCursorIndex;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tcursorIdexToSet = mWeakEditText.get().getText().length();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t}catch(IndexOutOfBoundsException e){\n\t\t\t\tisFormatting = false;\n\t\t\t}\n\t\t\tisFormatting = false;\n\t\t}\n\t\tSystem.out.println(\"Lenght : \"+mWeakEditText.get().getText().toString().length());\n\t\tSystem.out.println(\"mLastBeforeText : \"+mLastBeforeText.toString().length());\n\t\tSystem.out.println(\"lastCursorIndex : \"+mLastCursorIndex);\n\t\t\n\t\tSelection.setSelection(mWeakEditText.get().getText(), cursorIdexToSet);\n\t}", "@DISPID(-2147417078)\n @PropGet\n boolean isTextEdit();", "public static EditText getEditTextWithHint(Context context, String hint, int maxLength) {\n final EditText mEditText = new EditText(context);\n mEditText.setHint(hint);\n mEditText.setFilters(new InputFilter[]{new InputFilter.LengthFilter(maxLength)});\n return mEditText;\n }", "public CharSequence getHintText() {\n/* 1485 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Override // android.text.method.NumberKeyListener, android.text.InputFilter\n @org.jetbrains.annotations.Nullable\n /* Code decompiled incorrectly, please refer to instructions dump. */\n public java.lang.CharSequence filter(@org.jetbrains.annotations.NotNull java.lang.CharSequence r9, int r10, int r11, @org.jetbrains.annotations.NotNull android.text.Spanned r12, int r13, int r14) {\n /*\n r8 = this;\n java.lang.String r0 = \"source\"\n kotlin.jvm.internal.Intrinsics.checkNotNullParameter(r9, r0)\n java.lang.String r0 = \"dest\"\n kotlin.jvm.internal.Intrinsics.checkNotNullParameter(r12, r0)\n java.lang.CharSequence r0 = super.filter(r9, r10, r11, r12, r13, r14)\n boolean r1 = r8.b\n if (r1 != 0) goto L_0x0017\n boolean r1 = r8.c\n if (r1 != 0) goto L_0x0017\n return r0\n L_0x0017:\n r1 = 0\n if (r0 == 0) goto L_0x0020\n int r11 = r0.length()\n r9 = r0\n r10 = 0\n L_0x0020:\n int r2 = r12.length()\n r3 = -1\n r4 = -1\n r5 = 0\n L_0x0027:\n if (r5 >= r13) goto L_0x003f\n char r6 = r12.charAt(r5)\n boolean r7 = r8.b(r6)\n if (r7 == 0) goto L_0x0035\n r3 = r5\n goto L_0x003c\n L_0x0035:\n boolean r6 = r8.a(r6)\n if (r6 == 0) goto L_0x003c\n r4 = r5\n L_0x003c:\n int r5 = r5 + 1\n goto L_0x0027\n L_0x003f:\n java.lang.String r5 = \"\"\n if (r14 >= r2) goto L_0x0058\n char r6 = r12.charAt(r14)\n boolean r7 = r8.b(r6)\n if (r7 == 0) goto L_0x004e\n return r5\n L_0x004e:\n boolean r5 = r8.a(r6)\n if (r5 == 0) goto L_0x0055\n r4 = r14\n L_0x0055:\n int r14 = r14 + 1\n goto L_0x003f\n L_0x0058:\n r12 = 0\n int r14 = r11 + -1\n if (r14 < r10) goto L_0x0098\n L_0x005d:\n char r2 = r9.charAt(r14)\n boolean r6 = r8.b(r2)\n r7 = 1\n if (r6 == 0) goto L_0x0072\n if (r14 != r10) goto L_0x007d\n if (r13 == 0) goto L_0x006d\n goto L_0x007d\n L_0x006d:\n if (r3 < 0) goto L_0x0070\n goto L_0x007d\n L_0x0070:\n r3 = r14\n goto L_0x007c\n L_0x0072:\n boolean r2 = r8.a(r2)\n if (r2 == 0) goto L_0x007c\n if (r4 < 0) goto L_0x007b\n goto L_0x007d\n L_0x007b:\n r4 = r14\n L_0x007c:\n r7 = 0\n L_0x007d:\n if (r7 == 0) goto L_0x0093\n int r2 = r10 + 1\n if (r11 != r2) goto L_0x0084\n return r5\n L_0x0084:\n if (r12 != 0) goto L_0x008b\n android.text.SpannableStringBuilder r12 = new android.text.SpannableStringBuilder\n r12.<init>(r9, r10, r11)\n L_0x008b:\n int r2 = r14 - r10\n int r6 = r14 + 1\n int r6 = r6 - r10\n r12.delete(r2, r6)\n L_0x0093:\n if (r14 == r10) goto L_0x0098\n int r14 = r14 + -1\n goto L_0x005d\n L_0x0098:\n if (r12 == 0) goto L_0x009b\n r0 = r12\n L_0x009b:\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.avito.android.lib.design.input.FloatingPointKeyListener.filter(java.lang.CharSequence, int, int, android.text.Spanned, int, int):java.lang.CharSequence\");\n }", "void setLengthInputFilter(EditText inputText, final Context context, final int maxLength);", "public boolean isShowingHintText() {\n/* 1355 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n Utility.hideKeyBoard(editText, mContext);\n if (editText.getText().toString().trim().length() > 0) {\n remarks.setText(editText.getText().toString().trim());\n } else {\n remarks.setText(\"\");\n }\n }", "public void readEditTexts() {\n }", "private TextWatcher OMZET() {\n return new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n\n }\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n\n }\n\n @Override\n public void afterTextChanged(Editable s) {\n inputOmzet.removeTextChangedListener(this);\n\n try {\n String originalString = s.toString();\n\n Long longval;\n if (originalString.contains(\",\")) {\n originalString = originalString.replaceAll(\",\", \"\");\n }\n longval = Long.parseLong(originalString);\n\n DecimalFormat formatter = (DecimalFormat) NumberFormat.getInstance(Locale.US);\n formatter.applyPattern(\"#,###,###,###\");\n String formattedString = formatter.format(longval);\n\n //setting text after format to EditText\n inputOmzet.setText(formattedString);\n inputOmzet.setSelection(inputOmzet.getText().length());\n\n } catch (NumberFormatException nfe) {\n nfe.printStackTrace();\n }\n\n inputOmzet.addTextChangedListener(this);\n }\n };\n }", "@Override\r\n\t\t\tpublic void beforeTextChanged(CharSequence arg0, int arg1,\r\n\t\t\t\t\tint arg2, int arg3) {\n\t\t\t\tString edit = keyword.getText().toString();\r\n\t\t\t\tLog.i(\"cheshi\", \"洛克萨斯edit:\" + edit);\r\n\t\t\t\tif (edit.length() == 0 && edit.equals(\"null\")) {\r\n\t\t\t\t\tdelete.setVisibility(delete.GONE);\r\n\t\t\t\t\tLog.i(\"cheshi\", \"洛克萨斯\");\r\n\t\t\t\t}\r\n\r\n\t\t\t}", "TextView getIconTipsView();", "public abstract String getTipForTextField();", "@Override\n public void afterTextChanged(Editable arg0) {\n\n }", "@Override\n public boolean onSuggestionSelect(int position) {\n return true;\n }", "private void getUserTextInput() {\n if (!TextUtils.isEmpty(mBinding.fragmentSearchZipcodeTxt.getText()))\n mZipcodeInput = Integer.parseInt(mBinding.fragmentSearchZipcodeTxt.getText().toString().trim());\n if (!TextUtils.isEmpty(mBinding.fragmentSearchCityTxt.getText()))\n mCityInput = mBinding.fragmentSearchCityTxt.getText().toString().trim();\n if (!TextUtils.isEmpty(mBinding.fragmentSearchMinSurfaceTxt.getText()))\n mMinSurfaceInput = Utils.convertAreaAccordingToPreferences(mActivity, mBinding.fragmentSearchMinSurfaceTxt.getText().toString().trim());\n if (!TextUtils.isEmpty(mBinding.fragmentSearchMaxSurfaceTxt.getText()))\n mMaxSurfaceInput = Utils.convertAreaAccordingToPreferences(mActivity, mBinding.fragmentSearchMaxSurfaceTxt.getText().toString().trim());\n if (!TextUtils.isEmpty(mBinding.fragmentSearchMinPriceTxt.getText()))\n mMinPriceInput = Utils.convertPriceAccordingToPreferences(mActivity, mBinding.fragmentSearchMinPriceTxt.getText().toString().trim());\n if (!TextUtils.isEmpty(mBinding.fragmentSearchMaxPriceTxt.getText()))\n mMaxPriceInput = Utils.convertPriceAccordingToPreferences(mActivity, mBinding.fragmentSearchMaxPriceTxt.getText().toString().trim());\n if (!TextUtils.isEmpty(mBinding.fragmentSearchMinFloorsTxt.getText()))\n mFloorsInput = Integer.parseInt(mBinding.fragmentSearchMinFloorsTxt.getText().toString().trim());\n if (!TextUtils.isEmpty(mBinding.fragmentSearchForSaleTxt.getText()))\n mForSaleDate = Converters.dateToTimestamp(Utils.convertStringToDate(mBinding.fragmentSearchForSaleTxt.getText().toString().trim()));\n if (!TextUtils.isEmpty(mBinding.fragmentSearchSoldTxt.getText()))\n mSoldDate = Converters.dateToTimestamp(Utils.convertStringToDate(mBinding.fragmentSearchSoldTxt.getText().toString().trim()));\n }", "@Test\n public void testEditTextCleanup() throws Exception {\n\n // perform text input\n onView(withId(R.id.editText))\n .perform(typeText(LOG_TAG));\n\n // click pin button\n onView(withText(R.string.button_name))\n .perform(click());\n\n // verify empty edittext\n onView(withId(R.id.editText))\n .check(matches(withText(\"\")));\n }", "public void speakModeHint()\n {\n // speak hint text\n if (getHintsEnabled()) {\n if (mCurrentMode) {\n AudioService.getInstance().speak(getResources().getString(R.string.read_mode_hint_general));\n }\n else {\n AudioService.getInstance().speak(getResources().getString(R.string.search_mode_hint_general));\n }\n }\n }", "public void onShowInputMethodPickerSelected(Context context);", "@Override\n public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {\n if (actionId == EditorInfo.IME_ACTION_SEARCH) {\n //Hide soft keyboard\n InputMethodManager imm = (InputMethodManager) MyApp.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);\n imm.hideSoftInputFromWindow(edtSearch.getWindowToken(), 0);\n\n if (edtSearch.getText().toString().length() > 0)\n btnCancelSearch.setVisibility(View.VISIBLE);\n else\n btnCancelSearch.setVisibility(View.GONE);\n //searchItems();\n return true;\n }\n return false;\n }", "@Override\n public void onClick(View view) {\n if (!flag) {\n\n check_passwd_text.setTransformationMethod(SingleLineTransformationMethod.getInstance());\n flag = !flag;\n } else {\n check_passwd_text.setTransformationMethod(PasswordTransformationMethod.getInstance());\n flag = !flag;\n }\n }", "@Override\n public void afterTextChanged(Editable arg0) {\n }", "@Override\n public void afterTextChanged(Editable arg0) {\n }", "@Override\n public void afterTextChanged(Editable arg0) {\n }", "@Override\n public void afterTextChanged(Editable arg0) {\n }", "@Override\n public void afterTextChanged(Editable arg0) {\n }", "@Override\n public void afterTextChanged(Editable arg0) {\n }", "@Override\n public void afterTextChanged(Editable arg0) {\n }", "@Override\n public void afterTextChanged(Editable arg0) {\n }", "@Override\n public void afterTextChanged(Editable arg0) {\n }", "@Override\n public void afterTextChanged(Editable arg0) {\n }", "public void setHintText(CharSequence hintText) {\n/* 1500 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Override\n\t\t\tpublic void afterTextChanged(Editable arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void afterTextChanged(Editable arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void afterTextChanged(Editable arg0) {\n\t\t\t\t\n\t\t\t}", "@DSComment(\"ToggleButton, check callbacks modeled\")\n @DSSafe(DSCat.GUI)\n @DSSource({DSSourceKind.SENSITIVE_UNCATEGORIZED})\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:31:45.973 -0500\", hash_original_method = \"3E15133DBF34E1DA0E6FF67809AEAC81\", hash_generated_method = \"68589246CEB40B35E20815867173DA1D\")\n \npublic TextView getText2() {\n return mText2;\n }", "@Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n\n if (userReason != null) {\n if (s.length() > 1 && s.charAt(s.length() - 1) == '\\n') {\n userReason.setText(s.subSequence(0, s.length() - 1));\n InputMethodManager imm = (InputMethodManager) getActivity().getSystemService(Context.INPUT_METHOD_SERVICE);\n imm.hideSoftInputFromWindow(userReason.getWindowToken(), 0);\n } else if (s.length() > 0 && s.charAt(0) == '\\n') {\n userReason.setText(\"\");\n InputMethodManager imm = (InputMethodManager) getActivity().getSystemService(Context.INPUT_METHOD_SERVICE);\n imm.hideSoftInputFromWindow(userReason.getWindowToken(), 0);\n } else\n ; // normal behavior\n }\n }", "@Override\r\n\t\t\tpublic void afterTextChanged(Editable arg0) {\n\t\t\t\tString edit = keyword.getText().toString();\r\n\t\t\t\tLog.i(\"cheshi\", \"德玛edit:\" + edit);\r\n\t\t\t\tif (edit.length() == 0) {\r\n\t\t\t\t\tdelete.setVisibility(delete.GONE);\r\n\t\t\t\t\tLog.i(\"cheshi\", \"德玛\");\r\n\t\t\t\t}\r\n\t\t\t}", "public void setEditHintText(CharSequence text) {\n\t\tif (View.VISIBLE == editText.getVisibility()) {\n\t\t\teditText.setHint(text);\n\t\t}\n\t}", "@Override\n public void afterTextChanged(Editable s) {\n\n }", "@Override\n public void afterTextChanged(Editable s) {\n\n }", "@Override\n public void afterTextChanged(Editable s) {}", "@Override\n\t\t\tpublic boolean onEditorAction(TextView v, int actionId, KeyEvent event) {\n\t\t\t\ttip_perc.setText(\"Tip: \"+String.valueOf(tip_percentage)+\" %\");\n\t\t\t\tint tip_dollar = calculateTip(tip_percentage, Integer.parseInt(ed.getText().toString()));\n\t\t\t\ttotal_val=Integer.parseInt(ed.getText().toString())+tip_dollar;\n\t\t\t\ttip.setText(\"Tip: \"+String.valueOf(tip_dollar));\n\t\t\t\ttotal.setText(\"Total: \" + String.valueOf(total_val));\n\t\t\t\treturn false;\n\t\t\t}", "@Override\r\n public void onTextChanged(CharSequence a, int b,\r\n int c, int d) {\n\r\n }", "@Override\n public void afterTextChanged(Editable charSequence) {\n }", "public void setInputHint(String hint) {\n if (mTxtContent != null) {\n mTxtContent.setHint(hint);\n }\n }", "@Override\n public void afterTextChanged(Editable s) {\n\n }", "@Override\r\n\t\t\tpublic void afterTextChanged(Editable arg0) {\n\r\n\t\t\t}", "private static void OnToggleInsert(Object target, ExecutedRoutedEventArgs args)\r\n { \r\n TextEditor This = TextEditor._GetTextEditor(target); \r\n\r\n if (This == null || !This._IsEnabled || This.IsReadOnly) \r\n {\r\n return;\r\n }\r\n\r\n This._OvertypeMode = !This._OvertypeMode;\r\n\r\n // Use Cicero's transitory extension for OverTyping. \r\n if (TextServicesLoader.ServicesInstalled && (This.TextStore != null))\r\n { \r\n TextServicesHost tsfHost = TextServicesHost.Current;\r\n if (tsfHost != null)\r\n {\r\n if (This._OvertypeMode) \r\n {\r\n IInputElement element = target as IInputElement; \r\n if (element != null) \r\n {\r\n PresentationSource.AddSourceChangedHandler(element, OnSourceChanged); \r\n }\r\n\r\n TextServicesHost.StartTransitoryExtension(This.TextStore);\r\n } \r\n else\r\n { \r\n IInputElement element = target as IInputElement; \r\n if (element != null)\r\n { \r\n PresentationSource.RemoveSourceChangedHandler(element, OnSourceChanged);\r\n }\r\n\r\n TextServicesHost.StopTransitoryExtension(This.TextStore); \r\n }\r\n } \r\n } \r\n }", "@Override\r\n public void beforeTextChanged(CharSequence a,\r\n int b, int c, int d) {\n\r\n }", "public String getEditText() {\n\t\tif (View.VISIBLE == editText.getVisibility()) {\n\t\t\treturn editText.getText().toString().trim();\n\t\t}else {\n\t\t\treturn \"\";\n\t\t}\n\t}", "@Override\n public void afterTextChanged(Editable s)\n {\n \n }", "public String getSearchHint();", "@Override\r\n\tpublic void afterTextChanged(Editable arg0) {\n\r\n\t}", "@Override\n\t\t\t public void afterTextChanged(Editable arg0) \n\t\t\t {\n\t\t\t }", "@Override\n\t\t\tpublic void afterTextChanged(Editable arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void afterTextChanged(Editable arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void afterTextChanged(Editable arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void afterTextChanged(Editable arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void afterTextChanged(Editable arg0) {\n\t\t\t}", "@Override\n\t\t\tpublic void afterTextChanged(Editable arg0) {\n\t\t\t}", "@Override\n\t\t\tpublic void afterTextChanged(Editable arg0) {\n\t\t\t}", "@Override\n\t\t\tpublic void afterTextChanged(Editable arg0) {\n\t\t\t}", "@Override\n\tprotected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {\n\t\tif(!isInEditMode() || mPlaceholder==null) {\n\t\t\tsuper.onMeasure(widthMeasureSpec, heightMeasureSpec);\n\t\t} else {\n\t\t\tgetPaint().getTextBounds(mPlaceholder,0,mPlaceholder.length(),mTempBounds);\n\t\t\tint height = mTempBounds.height();\n\t\t\tint width = mTempBounds.width();\n\t\t\tsetMeasuredDimension((int)width, (int)height);\t\t\t\n\t\t}\t\t\n\t}", "@Override\n public boolean onTextContextMenuItem(int id) {\n if(id != android.R.id.paste || formattingAllowed){\n return super.onTextContextMenuItem(id);\n }\n\n // if its paste and formatting not allowed\n boolean proceeded;\n if(VERSION.SDK_INT >= 23) {\n proceeded = super.onTextContextMenuItem(android.R.id.pasteAsPlainText);\n }else {\n proceeded = super.onTextContextMenuItem(id);\n if (proceeded && getText() != null) {\n // rewrite with plain text so formatting is lost\n setText(getText().toString());\n setSelection(getText().length());\n }\n }\n return proceeded;\n }", "@Override\r\n\t\t\tpublic void afterTextChanged(Editable arg0) {\n\t\t\t\t\r\n\t\t\t}", "@Override\n public void afterTextChanged(Editable arg0) {\n\n }", "public String inputSpecialized() {\n String specialized = editTextSpecial.getText().toString();\n return specialized;\n }", "@Override\n public void afterTextChanged(Editable editable) {\n }", "@Test\n public void strongestPassword(){\n onView(withId(R.id.editText)).perform(clearText(), typeText(\"Good!123\"),closeSoftKeyboard());\n onView(withId(R.id.button)).perform(click());\n // Assert equals textView text\n onView(withId(R.id.textView)).check(matches(withText(\"Strongest\")));\n }", "@Override\r\n public void onTextChanged(CharSequence arg0, int arg1, int arg2,\r\n int arg3) {\n\r\n }", "@Override\n public void afterTextChanged(Editable s) {\n }", "@Override\n public void beforeTextChanged(CharSequence arg0, int arg1, int arg2,\n int arg3) {\n\n\n }", "public String getText(){\n return input.getText().toString();\n }", "@Override\n protected void setHint(String hint) {\n }", "@Override\n\tpublic void onTextChanged(CharSequence s, int start, int before, int count) {\n\t\tif(etPassword.getText().length()>1){\n\t\t\tivPeek.setVisibility(ImageView.VISIBLE);\n\t\t}else{ ivPeek.setVisibility(ImageView.GONE); }\n\t}", "protected abstract void showHint();", "@Override\n public void afterTextChanged(Editable s) {\n }", "@Override\n public void afterTextChanged(Editable s) {\n }", "@Override\r\n public void beforeTextChanged(CharSequence arg0, int arg1,\r\n int arg2, int arg3) {\n\r\n }", "@Override\n public void onTextChanged(CharSequence arg0, int arg1, int arg2, int arg3) {\n\n }", "@Override\n public boolean onEditorAction(TextView arg0, int arg1, KeyEvent arg2) {\n if (arg1 == EditorInfo.IME_ACTION_SEARCH) {\n sw_refresh.setRefreshing(true);\n query();\n }\n return false;\n }", "@Override\n public boolean dispatchTouchEvent(MotionEvent event)\n {\n View v = getCurrentFocus();\n boolean ret = super.dispatchTouchEvent(event);\n\n if (v instanceof EditText) {\n View w = getCurrentFocus();\n int[] scrCoords = new int[2];\n w.getLocationOnScreen(scrCoords);\n float x = event.getRawX() + w.getLeft() - scrCoords[0];\n float y = event.getRawY() + w.getTop() - scrCoords[1];\n\n if (event.getAction() == MotionEvent.ACTION_UP && (x < w.getLeft() || x >= w.getRight() || y < w.getTop() || y > w.getBottom()) ) {\n\n InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);\n imm.hideSoftInputFromWindow(getWindow().getCurrentFocus().getWindowToken(), 0);\n }\n }\n return ret;\n }", "@Override\n public void afterTextChanged(Editable s) {\n\n\n }", "public String getHint() {\n\t\treturn hint;\n\t}", "@Override\n public void onClick(DialogInterface dialog, int which) {\n Utility.hideKeyBoard(editText, mContext);\n if (editText.getText().toString().trim().length() > 0) {\n location.setText(editText.getText().toString().trim());\n } else {\n location.setText(\"\");\n }\n }", "@Override\n\t\tpublic void afterTextChanged(Editable arg0) {\n\n\t\t}", "public void Incorrect(View view) {\n TextView textview = (TextView) findViewById(R.id.textViewer);\n CharSequence s = textview.getText();\n String temp = s.toString();\n String[] text = temp.split(\" \");\n String n = text[0];\n int prime = Integer.parseInt(n);\n\n Context context = getApplicationContext();\n\n int i, flag = 0;\n if (prime == 1) {\n flag = 1;\n }\n for (i = 2; i <= prime / 2; ++i) {\n // condition for nonprime number\n if (prime % i == 0) {\n flag = 1;\n break;\n }\n }\n\n if (flag != 0 && clicked>=1 && pressed>=1) {\n\n Toast.makeText(context, \"Correct but you have cheated and taken hint\", Toast.LENGTH_SHORT).show();\n }\n else if(flag!=0 && clicked>=1)\n {\n Toast.makeText(context, \"Correct but you have cheated\", Toast.LENGTH_SHORT).show();\n }\n\n else if(flag!=0 && pressed>=1)\n {\n Toast.makeText(context, \"Correct but you have taken hint\", Toast.LENGTH_SHORT).show();\n }\n else if(flag!=0)\n {\n Toast.makeText(context, \"Correct\", Toast.LENGTH_SHORT).show();\n }\n else if(flag==0 && clicked>=1 && pressed>=1)\n {\n Toast.makeText(context, \"Not Correct but you have taken hint and cheated\", Toast.LENGTH_SHORT).show();\n }\n\n else if(flag==0 && pressed>=1) {\n Toast.makeText(context, \"Not Correct but you have taken hint\", Toast.LENGTH_SHORT).show();\n }\n else if(flag==0 && clicked>=1)\n {\n Toast.makeText(context, \"Not Correct but you have cheated\", Toast.LENGTH_SHORT).show();\n }\n\n else if(flag==0)\n {\n Toast.makeText(context, \"Not Correct\", Toast.LENGTH_SHORT).show();\n }\n }", "@Override\n\t\t\tpublic boolean onEditorAction(TextView arg0, int arg1, KeyEvent arg2) {\n\t\t\t\tToast.makeText(MainActivity.this, String.valueOf(arg1), Toast.LENGTH_SHORT).show(); \n\t\t\t\treturn false;\n\t\t\t\t\n\t\t\t}", "@Override\n public void onTextChanged(CharSequence cs, int arg1, int arg2, int arg3) {\n\n\n }", "@SuppressLint({\"NewApi\"})\n /* renamed from: a */\n public void mo7202a(AttributeSet attrs, int defStyleAttr) {\n AttributeSet attributeSet = attrs;\n int i = defStyleAttr;\n Context context = this.f2970a.getContext();\n C1096p drawableManager = C1096p.m5420a();\n C1112sb a = C1112sb.m5456a(context, attributeSet, C0793R.styleable.AppCompatTextHelper, i, 0);\n int ap = a.mo8659g(C0793R.styleable.AppCompatTextHelper_android_textAppearance, -1);\n if (a.mo8660g(C0793R.styleable.AppCompatTextHelper_android_drawableLeft)) {\n this.f2971b = m4445a(context, drawableManager, a.mo8659g(C0793R.styleable.AppCompatTextHelper_android_drawableLeft, 0));\n }\n if (a.mo8660g(C0793R.styleable.AppCompatTextHelper_android_drawableTop)) {\n this.f2972c = m4445a(context, drawableManager, a.mo8659g(C0793R.styleable.AppCompatTextHelper_android_drawableTop, 0));\n }\n if (a.mo8660g(C0793R.styleable.AppCompatTextHelper_android_drawableRight)) {\n this.f2973d = m4445a(context, drawableManager, a.mo8659g(C0793R.styleable.AppCompatTextHelper_android_drawableRight, 0));\n }\n if (a.mo8660g(C0793R.styleable.AppCompatTextHelper_android_drawableBottom)) {\n this.f2974e = m4445a(context, drawableManager, a.mo8659g(C0793R.styleable.AppCompatTextHelper_android_drawableBottom, 0));\n }\n a.mo8647a();\n boolean hasPwdTm = this.f2970a.getTransformationMethod() instanceof PasswordTransformationMethod;\n boolean allCaps = false;\n boolean allCapsSet = false;\n ColorStateList textColor = null;\n ColorStateList textColorHint = null;\n ColorStateList textColorLink = null;\n if (ap != -1) {\n C1112sb a2 = C1112sb.m5454a(context, ap, C0793R.styleable.TextAppearance);\n if (!hasPwdTm && a2.mo8660g(C0793R.styleable.TextAppearance_textAllCaps)) {\n allCaps = a2.mo8648a(C0793R.styleable.TextAppearance_textAllCaps, false);\n allCapsSet = true;\n }\n m4446a(context, a2);\n if (VERSION.SDK_INT < 23) {\n if (a2.mo8660g(C0793R.styleable.TextAppearance_android_textColor)) {\n textColor = a2.mo8645a(C0793R.styleable.TextAppearance_android_textColor);\n }\n if (a2.mo8660g(C0793R.styleable.TextAppearance_android_textColorHint)) {\n textColorHint = a2.mo8645a(C0793R.styleable.TextAppearance_android_textColorHint);\n }\n if (a2.mo8660g(C0793R.styleable.TextAppearance_android_textColorLink)) {\n textColorLink = a2.mo8645a(C0793R.styleable.TextAppearance_android_textColorLink);\n }\n }\n a2.mo8647a();\n }\n C1112sb a3 = C1112sb.m5456a(context, attributeSet, C0793R.styleable.TextAppearance, i, 0);\n if (!hasPwdTm && a3.mo8660g(C0793R.styleable.TextAppearance_textAllCaps)) {\n allCapsSet = true;\n allCaps = a3.mo8648a(C0793R.styleable.TextAppearance_textAllCaps, false);\n }\n if (VERSION.SDK_INT < 23) {\n if (a3.mo8660g(C0793R.styleable.TextAppearance_android_textColor)) {\n textColor = a3.mo8645a(C0793R.styleable.TextAppearance_android_textColor);\n }\n if (a3.mo8660g(C0793R.styleable.TextAppearance_android_textColorHint)) {\n textColorHint = a3.mo8645a(C0793R.styleable.TextAppearance_android_textColorHint);\n }\n if (a3.mo8660g(C0793R.styleable.TextAppearance_android_textColorLink)) {\n textColorLink = a3.mo8645a(C0793R.styleable.TextAppearance_android_textColorLink);\n }\n }\n m4446a(context, a3);\n a3.mo8647a();\n if (textColor != null) {\n this.f2970a.setTextColor(textColor);\n }\n if (textColorHint != null) {\n this.f2970a.setHintTextColor(textColorHint);\n }\n if (textColorLink != null) {\n this.f2970a.setLinkTextColor(textColorLink);\n }\n if (!hasPwdTm && allCapsSet) {\n mo7203a(allCaps);\n }\n Typeface typeface = this.f2977h;\n if (typeface != null) {\n this.f2970a.setTypeface(typeface, this.f2976g);\n }\n this.f2975f.mo7329a(attributeSet, i);\n if (!C0687b.f2011a) {\n } else if (this.f2975f.mo7335f() != 0) {\n int[] autoSizeTextSizesInPx = this.f2975f.mo7334e();\n if (autoSizeTextSizesInPx.length <= 0) {\n } else if (((float) this.f2970a.getAutoSizeStepGranularity()) != -1.0f) {\n Context context2 = context;\n this.f2970a.setAutoSizeTextTypeUniformWithConfiguration(this.f2975f.mo7332c(), this.f2975f.mo7331b(), this.f2975f.mo7333d(), 0);\n } else {\n this.f2970a.setAutoSizeTextTypeUniformWithPresetSizes(autoSizeTextSizesInPx, 0);\n }\n }\n }", "@Override\r\n\t\t\tpublic void onTextChanged(CharSequence arg0, int arg1, int arg2,\r\n\t\t\t\t\tint arg3) {\n\t\t\t\tString edit = keyword.getText().toString();\r\n\t\t\t\tLog.i(\"cheshi\", \"赵信edit:\" + edit);\r\n\t\t\t\tif (edit.length() != 0 && !edit.equals(\"null\")) {\r\n\t\t\t\t\tLog.i(\"cheshi\", \"赵信\");\r\n\t\t\t\t\tdelete.setVisibility(delete.VISIBLE);\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}" ]
[ "0.59350765", "0.5537549", "0.5486613", "0.54632246", "0.544785", "0.5443313", "0.5416759", "0.5349866", "0.53046083", "0.5267884", "0.52445966", "0.52415156", "0.5240768", "0.5222288", "0.5221854", "0.51986", "0.51927054", "0.51752687", "0.5153726", "0.51525027", "0.5149107", "0.5147274", "0.51386136", "0.5118669", "0.51133233", "0.5108812", "0.51086485", "0.5101696", "0.50794476", "0.50785017", "0.50785017", "0.50785017", "0.50785017", "0.50785017", "0.50785017", "0.50785017", "0.50785017", "0.50785017", "0.50785017", "0.5072186", "0.50547856", "0.50547856", "0.50547856", "0.50515383", "0.50471383", "0.50457454", "0.50408196", "0.5036976", "0.5036976", "0.50289387", "0.5022846", "0.50196666", "0.5015271", "0.5013077", "0.50102836", "0.50036806", "0.49959147", "0.49950528", "0.49892154", "0.4983695", "0.49824375", "0.49766043", "0.49738428", "0.4972038", "0.4972038", "0.4972038", "0.4972038", "0.49691594", "0.49691594", "0.49691594", "0.49691594", "0.49659827", "0.49635422", "0.49633494", "0.4961081", "0.49582648", "0.49548241", "0.49502087", "0.49483007", "0.4945937", "0.49424416", "0.49415246", "0.49379614", "0.4936426", "0.49346668", "0.4930476", "0.4930476", "0.49299595", "0.4921739", "0.49152952", "0.4914836", "0.49143538", "0.49135774", "0.49116907", "0.4911028", "0.49100828", "0.4909606", "0.489907", "0.48939627", "0.4893294" ]
0.6153947
0
Recalculate the height of the figure depending to its content
public void updateBounds(){ Rectangle bounds = new Rectangle(super.getBounds()); int preferredHeight = 0; for(Object child : getChildren()){ IFigure figure = (IFigure)child; preferredHeight += figure.getPreferredSize().height; } if (preferredHeight == 0) preferredHeight = 200; bounds.setHeight(preferredHeight+20); setBounds(bounds); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "double getNewHeight();", "public void updateHeight() {\n Rectangle repaintBounds = getBounds();\n parent.getScene().paintImmediately(repaintBounds);\n\n // set new height compute while repainting.\n setBounds(new Rectangle(bounds));\n\n parent.getScene().repaint(repaintBounds);\n setChanged();\n notifyObservers();\n }", "double getOldHeight();", "public abstract int layoutHeight();", "private void refreshHeight() {\n\t\tint lines = Math.min(maxLineCount, Math.max(minLineCount, text\n\t\t\t\t.getLineCount()));\n\t\tint newHeight = lines * text.getLineHeight();\n\n\t\tGridData data = (GridData) text.getLayoutData();\n\t\tif (data.heightHint != newHeight) {\n\t\t\tdata.heightHint = newHeight;\n\t\t\tlayout();\n\t\t}\n\t}", "public int getHeight() { return height; }", "public int getCurrentHeight();", "public int getHeight() {return height;}", "int getHeight() {return height;}", "private void updateHeight() {\n int leftHeight = height(this.leftChild);\n int rightHeight = height(this.rightChild);\n this.height = (rightHeight > leftHeight ? rightHeight : leftHeight) + 1;\n }", "private void calcContentSize() {\n }", "public int getHeight();", "public int getHeight();", "public int getHeight();", "public int getHeight();", "public int getHeight();", "public int getHeight();", "int getheight();", "double getHeight();", "public double getHeight();", "public double getHeight();", "Integer getCurrentHeight();", "public void recomputeHeight() {\n setVisibility(View.GONE);\n setupAnimators();\n }", "private double getHeight() {\n\t\treturn height;\n\t}", "public float getHeight();", "public int getHeight()\n {return height;}", "@Override\n public int getHeight() {\n return height;\n }", "@Override\n public int getHeight() {\n return height;\n }", "public void computeHeight() {\n\t\tif (getContext().getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT) {\n\t\t\tint screenHeight = ScreenUtils.getScreenHeight(getContext());\n\t\t\tif (DisplayHelper.isTabModel(getContext())) {\n\t\t\t\tsetHeight(screenHeight * 3 / 4);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsetHeight(screenHeight * 4 / 5);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tint screenHeight = ScreenUtils.getScreenHeight(getContext());\n\t\t\tif (DisplayHelper.isTabModel(getContext())) {\n\t\t\t\tsetHeight(screenHeight * 2 / 3);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsetHeight(screenHeight - 80);\n\t\t\t}\n\t\t}\n\t}", "int getHeight();", "int getHeight();", "int getHeight();", "int getHeight();", "int getHeight();", "int getHeight();", "int getHeight();", "int getHeight();", "int getHeight();", "int getHeight();", "int getHeight();", "int getHeight();", "int getHeight();", "int getHeight();", "int getHeight();", "int getHeight();", "public void setHeight(double value) {\n this.height = value;\n }", "public final int getHeight(){\n return height_;\n }", "public abstract int getHeight();", "public abstract int getHeight();", "public abstract float getHeight();", "public abstract int getDisplayHeight();", "VariableAmount getHeight();", "public int getHeight(){\n return height;\n }", "@Override\n public int getHeight() {\n return this.height;\n }", "public int getHeight(){\n return height;\n }", "public int getHeight(){\n return this.height;\n }", "public void setHeight(int height);", "public void setHeight(int height);", "public void setHeight(int newValue)\n {\n height = newValue;\n }", "void setHeight(int height);", "void setHeight(int height);", "short getFitHeight();", "protected int getContentHeight()\n {\n return this.getSize() * GuiStats.this.fontRenderer.FONT_HEIGHT * 4;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "protected int getContentHeight()\n {\n return this.getSize() * 10;\n }", "@Override\n public int getHeight() {\n return graphicsEnvironmentImpl.getHeight(canvas);\n }", "public int getHeight(){\n \treturn height;\n }", "public int height();", "public int height();", "public int height();", "public int height();", "public int grHeight() { return height; }", "public int getH() { return height; }", "public int realHeight() {\n return super.getRealHeight();\n }", "private void calculateHeightRatio() {\n\tif (texHeight != 0) {\n\t heightRatio = ((float) height) / texHeight;\n\t}\n }", "public float getHeight() {\n\treturn heightRatio;\n }", "public int getHeight() {\n return height_;\n }", "public int getHeight() {\n\treturn height;\n}", "public int getHeight() {\n return height;\n }", "@Override\n\tpublic int getHeight() {\n\t\treturn this.height;\n\t}", "public int getHeight()\n {\n return height;\n }", "void setHeight(VariableAmount height);", "public double getBaseHeight();", "public int getHeight()\n {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public final int getHeight() {\r\n return (int) size.y();\r\n }", "public final int getHeight() {\r\n return height;\r\n }", "int height();" ]
[ "0.6876335", "0.6814658", "0.6810664", "0.6776672", "0.6680424", "0.66138303", "0.66064173", "0.6600275", "0.6541871", "0.6469317", "0.6469225", "0.6368424", "0.6368424", "0.6368424", "0.6368424", "0.6368424", "0.6368424", "0.63603765", "0.63569504", "0.6354108", "0.6354108", "0.6324824", "0.63190424", "0.62994844", "0.62978345", "0.6296995", "0.6292239", "0.6292239", "0.6267924", "0.62510514", "0.62510514", "0.62510514", "0.62510514", "0.62510514", "0.62510514", "0.62510514", "0.62510514", "0.62510514", "0.62510514", "0.62510514", "0.62510514", "0.62510514", "0.62510514", "0.62510514", "0.62510514", "0.6241654", "0.62363285", "0.6234329", "0.6234329", "0.62228036", "0.62200814", "0.62153625", "0.6208273", "0.6194711", "0.6193973", "0.61934745", "0.6188969", "0.6188969", "0.61833906", "0.61822295", "0.61822295", "0.61820036", "0.61741173", "0.6154611", "0.6154611", "0.6154611", "0.61509156", "0.61451256", "0.61417586", "0.61408234", "0.61408234", "0.61408234", "0.61408234", "0.61386305", "0.61285245", "0.6125772", "0.6124458", "0.612068", "0.61161166", "0.61157703", "0.6110514", "0.61092067", "0.61044616", "0.6103352", "0.61016345", "0.60977256", "0.60915905", "0.60915905", "0.60915905", "0.60915905", "0.60915905", "0.60915905", "0.60915905", "0.60915905", "0.60915905", "0.60915905", "0.60915905", "0.608592", "0.60832155", "0.6079106" ]
0.62509125
45
protected RemoteXBeeDevice scale = null; protected RemoteXBeeDevice redSwitch = null;
public void invoke(String propsFileName) throws Exception { Properties props = getProperties(propsFileName); // new XBeeDevice(port, BAUD_RATE); // String port = props.getProperty("port"); // System.out.println("port = " + port); // System.out.println("Creating localXBee..."); // System.out.println("created local = " + this.local); List<RemoteXBeeDevice> remotes = null; try { this.local = getDevice(props); remotes = getRemotes(props); System.out.println("opened local = " + toString(this.local)); // System.out.println("Local XBee operating mode: " + localXBee.getOperatingMode()); OperatingMode requiredMode = OperatingMode.API; OperatingMode mode = this.local.getOperatingMode(); if (mode != requiredMode) { throw new RuntimeException("this.local is in " + mode + ", not in " + requiredMode); } // Obtain the remote XBee device from the XBee network. System.out.println("Getting network..."); XBeeNetwork network = this.local.getNetwork(); System.out.println("network = " + toString(network)); } catch (XBeeException e) { e.printStackTrace(); this.local.close(); System.err.println("Exception, ending: " + e.getMessage()); System.exit(1); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Device() {\n isFaceUp = null;\n isFaceDown = null;\n isCloseProximity = null;\n isDark = null;\n }", "public void setSensorOff() {\n\n }", "private void initDevice() {\n device = new Device();\n device.setManufacture(new Manufacture());\n device.setInput(new Input());\n device.setPrice(new Price());\n device.getPrice().setCurrency(\"usd\");\n device.setCritical(DeviceCritical.FALSE);\n }", "public void turnLightsOff()\n {\n set(Relay.Value.kOff);\n }", "public BizFallDevice() {\n super();\n }", "new LED();", "private SWDrive() {\n super();\n leftMaster = new TalonSRX(Constants.LEFT_MASTER_PORT);\n leftMaster.setNeutralMode(NeutralMode.Brake);\n leftMaster.configSelectedFeedbackSensor(FeedbackDevice.CTRE_MagEncoder_Relative, 0, 0);\n leftMaster.setSelectedSensorPosition(0, 0, 0);\n leftMaster.config_kP(0, Constants.LINEAR_GAINS[0], 0);\n leftMaster.config_kI(0, Constants.LINEAR_GAINS[1], 0);\n leftMaster.config_kD(0, Constants.LINEAR_GAINS[2], 0);\n leftMaster.configMotionAcceleration(1000, 0);\n\t\tleftMaster.configMotionCruiseVelocity(5000, 0);\n\t\tleftMaster.config_IntegralZone(0, 200, 0);\n\t\tleftMaster.configClosedloopRamp(0, 256);\n\t\tleftMaster.configOpenloopRamp(0, 256);\n\t\tleftMaster.configAllowableClosedloopError(0, Constants.LINEAR_EPSILON, 0);\n\n rightMaster = new TalonSRX(Constants.RIGHT_MASTER_PORT);\n rightMaster.setNeutralMode(NeutralMode.Brake);\n rightMaster.configSelectedFeedbackSensor(FeedbackDevice.CTRE_MagEncoder_Relative, 0, 0);\n rightMaster.setSelectedSensorPosition(0, 0, 0);\n rightMaster.setInverted(true);\n rightMaster.config_kP(0, Constants.LINEAR_GAINS[0], 0);\n rightMaster.config_kI(0, Constants.LINEAR_GAINS[1], 0);\n rightMaster.config_kD(0, Constants.LINEAR_GAINS[2], 0);\n rightMaster.configMotionAcceleration(1000, 0);\n\t\trightMaster.configMotionCruiseVelocity(5000, 0);\n\t\trightMaster.config_IntegralZone(0, 200, 0);\n\t\trightMaster.configClosedloopRamp(0, 256);\n\t\trightMaster.configOpenloopRamp(0, 256);\n rightMaster.configAllowableClosedloopError(0, Constants.LINEAR_EPSILON, 0); \n\n leftSlave = new VictorSPX(Constants.LEFT_SLAVE_PORT);\n leftSlave.setNeutralMode(NeutralMode.Brake);\n leftSlave.follow(leftMaster);\n\n rightSlave = new VictorSPX(Constants.RIGHT_SLAVE_PORT);\n rightSlave.setNeutralMode(NeutralMode.Brake);\n //rightSlave.setInverted(true);\n rightSlave.follow(rightMaster);\n\n gearSolenoid = new DoubleSolenoid(Constants.DRIVE_SOLENOID_FORWARD, Constants.DRIVE_SOLENOID_REVERSE);\n\n navx = new AHRS(Port.kMXP);\n controller = new XboxController(Constants.PRIMARY_DRIVER_PORT);\n pid = new PIDController();\n\n try {\n //piComm = new DatagramSocket();\n //host = InetAddress.getByName(\"10.2.63.25\");\n } catch(Exception e) {\n System.out.println(\"Exception caught when initializing socket: \" + e.getMessage());\n }\n \n //tXBuffer = new CircularBuffer(10);\n\n tankEnabled = false;\n setpointReached = true;\n rotateSet = false;\n antiTiltEnabled = true;\n cargoSearch = false;\n piCamera = false;\n leftTarget = 0;\n rightTarget = 0;\n lacc = 0;\n racc = 0;\n }", "void setScale(ScaleSelector sensor, int scaleNo);", "public void initDevice() {\r\n\t\t\r\n\t}", "@Override\n\tpublic void setRam() {\n\t\tcom.setRam(\"16g\");\n\t}", "public device() {\n\t\tsuper();\n\t}", "public void switchSmart(){\n\r\n for (int i = 0; i < item.getDevices().size(); i++) {\r\n write(parseBrightnessCmd(seekBarBrightness.getProgress()), 3, seekBarBrightness.getProgress(), item.getDevices().get(i).getSocket(), item.getDevices().get(i).getBos());\r\n }\r\n\r\n //String CMD_HSV = \"{\\\"id\\\":1,\\\"method\\\":\\\"set_hsv\\\",\\\"params\\\":[0, 0, \\\"smooth\\\", 30]}\\r\\n\";\r\n //write(CMD_HSV, 0, 0);\r\n\r\n for (int i = 0; i < item.getDevices().size(); i++) {\r\n write(parseRGBCmd(msAccessColor(Color.WHITE)), 0, 0, item.getDevices().get(i).getSocket(), item.getDevices().get(i).getBos());\r\n }\r\n\r\n }", "public RightPrioritizeSwitch() {\n\t\t// Use requires() here to declare subsystem dependencies\n\t\t// eg. requires(chassis);\t\t\n\t\ttimer = new Timer();\n\t\tdelay = new Timer();\n\t\tcrossLine = new CrossAutoLine();\n\t\tturnTowardsSwitchOrScale = new RotateDrivetrainWithGyroPID(90, false);\n\t\tdriveToScale = new DriveStraightToPositionPID(323.6);\n\t\tdriveToSwitch = new DriveStraightToPositionPID(168);\n\t\tapproachScale = new DriveStraightToPositionPID(44);\n\t\tapproachSwitch = new DriveStraightToPositionPID(-42);\n\t\tlaunchCubeSwitch = new AutomaticShoot(false);\n\t\tlaunchCubeScale = new AutomaticShoot(true);\n\t}", "public void setSensorOn() {\n\n }", "private DisplayDevice(){\t\t\r\n\t\t\r\n\t}", "@Override\n public Switch lowPressureSwitch() {\n return pcm::getPressureSwitchValue;\n }", "Reference getDevice();", "public int getPort(){\r\n return localPort;\r\n }", "public int getPort(){\r\n return localPort;\r\n }", "int getHealSnPort();", "private void setMeteredInterface(java.lang.String r10, boolean r11) {\n /*\n r9 = this;\n if (r10 != 0) goto L_0x0003;\n L_0x0002:\n return;\n L_0x0003:\n r0 = \"network_management\";\n r0 = android.os.ServiceManager.getService(r0);\n if (r0 != 0) goto L_0x0014;\n L_0x000b:\n r1 = \"network-policy\";\n r2 = \"setIfWhitelist networkManager is null\";\n android.util.Log.e(r1, r2);\n return;\n L_0x0014:\n r1 = android.os.Parcel.obtain();\n r2 = android.os.Parcel.obtain();\n r3 = \"bandwidth\";\n r4 = 2;\n r4 = new java.lang.String[r4];\n if (r11 != 0) goto L_0x0026;\n L_0x0023:\n r5 = \"enable_ifwhitelist\";\n goto L_0x0028;\n L_0x0026:\n r5 = \"disable_ifwhitelist\";\n L_0x0028:\n r6 = 0;\n r4[r6] = r5;\n r5 = 1;\n r4[r5] = r10;\n r1.writeString(r3);\t Catch:{ Exception -> 0x005e }\n r1.writeArray(r4);\t Catch:{ Exception -> 0x005e }\n r7 = 201; // 0xc9 float:2.82E-43 double:9.93E-322;\t Catch:{ Exception -> 0x005e }\n r0.transact(r7, r1, r2, r6);\t Catch:{ Exception -> 0x005e }\n r6 = r9.sIncreaseCmdCount;\t Catch:{ Exception -> 0x005e }\n r6 = r6 + r5;\t Catch:{ Exception -> 0x005e }\n r9.sIncreaseCmdCount = r6;\t Catch:{ Exception -> 0x005e }\n r5 = \"network-policy\";\t Catch:{ Exception -> 0x005e }\n r6 = new java.lang.StringBuilder;\t Catch:{ Exception -> 0x005e }\n r6.<init>();\t Catch:{ Exception -> 0x005e }\n r7 = \"\";\t Catch:{ Exception -> 0x005e }\n r6.append(r7);\t Catch:{ Exception -> 0x005e }\n r6.append(r2);\t Catch:{ Exception -> 0x005e }\n r6 = r6.toString();\t Catch:{ Exception -> 0x005e }\n android.util.Log.e(r5, r6);\t Catch:{ Exception -> 0x005e }\n if (r1 == 0) goto L_0x0059;\n L_0x0056:\n r1.recycle();\n L_0x0059:\n if (r2 == 0) goto L_0x0080;\n L_0x005b:\n goto L_0x007d;\n L_0x005c:\n r5 = move-exception;\n goto L_0x0081;\n L_0x005e:\n r5 = move-exception;\n r6 = \"HwNetworkPolicy\";\t Catch:{ all -> 0x005c }\n r7 = new java.lang.StringBuilder;\t Catch:{ all -> 0x005c }\n r7.<init>();\t Catch:{ all -> 0x005c }\n r8 = \"setIfWhitelist-->\";\t Catch:{ all -> 0x005c }\n r7.append(r8);\t Catch:{ all -> 0x005c }\n r7.append(r5);\t Catch:{ all -> 0x005c }\n r7 = r7.toString();\t Catch:{ all -> 0x005c }\n android.util.Slog.e(r6, r7);\t Catch:{ all -> 0x005c }\n if (r1 == 0) goto L_0x007b;\n L_0x0078:\n r1.recycle();\n L_0x007b:\n if (r2 == 0) goto L_0x0080;\n L_0x007d:\n r2.recycle();\n L_0x0080:\n return;\n L_0x0081:\n if (r1 == 0) goto L_0x0086;\n L_0x0083:\n r1.recycle();\n L_0x0086:\n if (r2 == 0) goto L_0x008b;\n L_0x0088:\n r2.recycle();\n L_0x008b:\n throw r5;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.server.net.HwNetworkPolicyManagerService.setMeteredInterface(java.lang.String, boolean):void\");\n }", "public int getScale(){\n return scale;\n }", "public BareMetalMachinePowerOffParameters() {\n }", "public Port getPrint_port() {\nreturn Print_port;\n}", "public PuppetIdracServerDevice() { }", "public HardwareSwitch() {\r\n\t\tif (modelPackage == null) {\r\n\t\t\tmodelPackage = HardwarePackage.eINSTANCE;\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\t\tfinal Device lamp = new Device(\"Lamp\", \"Lamp\",\"Lamp\" ,\"img/lamp.png\");\r\n\t\t\r\n\t\t//2. Register the 2 functions\r\n\t\tlamp.registerFunction(\"SwitchOn\", \"Function exposed to server\");\r\n\t\tlamp.registerFunction(\"SwitchOff\", \"Function exposed to server for switching off the device\");\r\n\t\t\r\n\t\t//3. Set the type of communication layer. In this case it is a java implementation of websocket.\r\n\t\t//Depending the environment the driver is running, other implementation of the websocket layer can be injected\r\n\t\tlamp.setWebsocketLayer(new JavaWebsocketLayer(lamp));\r\n\t\t\r\n\t\t//a simple text label to display if lamp is on or off.\r\n\t\t//in a real lamp, instead displaying a label, the microcontroller will send an electric signal to a switch\r\n\t\tfinal JLabel state = new JLabel();\r\n\t\t\r\n\t\t//4. Add function handlers to execute the captured events\r\n\t\t//this implementation of the handler simply diplays Switched on or Switched off\r\n\t\tlamp.addFunctionHandler(new FunctionHandler() {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void execute(String name, Map<String, String> input) {\r\n\t\t\t\ttry{\r\n\t\t\t\t\r\n\t\t\t\t\tif(name.equals(\"SwitchOn\")){\r\n\t\t\t\t\t\tstate.setIcon(new ImageIcon(new URL(\"http://72.13.93.222:8080/hatzouf/img/light-on.png\")));\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tstate.setIcon(new ImageIcon(new URL(\"http://72.13.93.222:8080/hatzouf/img/light-off.png\")));\r\n\t\t\t\t\t}\r\n\t\t\t\t}catch(Exception e){\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\t//5. This handler is executed when the device is connected and ready for use.\r\n\t\tlamp.onReady(new OnReady() {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void ready() {\r\n\t\t\t\tJFrame frame = new JFrame(\"Lamp\");\r\n\t\t\t\tframe.getContentPane().add(state, BorderLayout.NORTH);\r\n\t\t\t\tframe.setSize(300, 275);\r\n\t\t\t\tframe.setVisible(true);\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\t//6. connect the device to the hatzouf server\r\n\t\tlamp.connect(\"ws://72.13.93.222:8080/hatzouf/websockets/iot\");\r\n\t\t\r\n\t}", "private void initHardware(){\n }", "public interface Switchable {\n\n /**\n * This method connects device to energy network, and change flag (to true) responsible for the condition of the network device.\n */\n public void switchOn();\n\n /**\n * This method disconnects device from energy network, and change flag (to false) responsible for the condition of the network device.\n */\n public void switchOff();\n\n /**\n * Method return the state of device in energy network.\n * True - the power switched on, false - switched off.\n */\n public boolean isSwitched();\n\n}", "public void turnLightsOn()\n {\n set(Relay.Value.kForward);\n }", "public void setDevices(Integer devices) {\r\n this.devices = devices;\r\n }", "@Override\n public void resetDeviceConfigurationForOpMode() {\n\n }", "@Override\r\n public void onChange(SwitchButton sb, boolean state) {\n Log.d(\"switchButton\", state ? \"锟斤拷\":\"锟斤拷\");\r\n mImgView.setImageBitmap(null);\r\n //defreckle\r\n if(qubanSBtn.isSwitchOn())\r\n mImgView.setImageBitmap(mFaceEditor.BFDefreckleAuto());//));\r\n else\r\n mImgView.setImageBitmap(mFaceEditor.getBaseImage());\r\n }", "private void initSensors() {\n\t\t\n\t\tmSsorManager = (SensorManager) mContext.getSystemService(Context.SENSOR_SERVICE);\n\t\t\n\t\t\n\t\tif(!(hasLSsor = SensorTool.hasSensor(mSsorManager, Sensor.TYPE_LIGHT))) {\n\t\t\tmtvLssor.setText(mContext.getString(R.string.tv_lssor_not_available));\n\t\t} else {\n\t\t\tlssor = mSsorManager.getDefaultSensor(Sensor.TYPE_LIGHT);\n\t\t\t// set Pass button unClickable\n\t\t}\n\t\t\n\t}", "@Override\n\tpublic void setPersonal_4_HalfGaugeMeter() \n\t{\n\t}", "@Override\n public int targetDevice() {\n return 0;\n }", "public void setRes(){\r\n \r\n }", "@Override\n public void init() {\n telemetry.addData(\"Status\", \"Initializing\"); //display on the drivers phone that its working\n\n FLM = hardwareMap.get(DcMotor.class, \"FLM\"); //Go into the config and get the device named \"FLM\" and assign it to FLM\n FRM = hardwareMap.get(DcMotor.class, \"FRM\"); //device name doesn't have to be the same as the variable name\n BLM = hardwareMap.get(DcMotor.class, \"BLM\"); //DcMotor.class because that is what the object is\n BRM = hardwareMap.get(DcMotor.class, \"BRM\");\n\n BigSuck = hardwareMap.get(DcMotor.class, \"BigSUCK\");\n SmallSuck = hardwareMap.get(DcMotor.class, \"SmallSUCK\");\n SmallSuck.setDirection(DcMotor.Direction.REVERSE);\n \n UpLift = hardwareMap.get(DcMotor.class, \"LIFT\");\n UpLift.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n UpLift.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n //Make it so we don't have to add flip the sign of the power we are setting to half the motors\n //FRM.setDirection(DcMotor.Direction.REVERSE); //Run the right side of the robot backwards\n FLM.setDirection(DcMotor.Direction.REVERSE);\n BRM.setDirection(DcMotor.Direction.REVERSE); //the right motors are facing differently than the left handed ones\n\n FLM.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n FRM.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n BLM.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n BRM.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n DragArm = hardwareMap.servo.get(\"drag_arm\");\n DragArm.setDirection(Servo.Direction.REVERSE);\n DragArm.setPosition(DragArmRestPosition);\n\n LiftGrab = hardwareMap.servo.get(\"GRAB\");\n LiftGrab.setPosition(LiftGrabRestPosition);\n\n LiftSwivel = hardwareMap.servo.get(\"SWIVEL\");\n LiftSwivel.setPosition(LiftSwivelRestPosition);\n\n Push = hardwareMap.get(Servo.class, \"PUSH\");\n Push.setDirection(Servo.Direction.FORWARD);\n Push.setPosition(PushRestPosition);\n\n telemetry.addData(\"Status\", \"Initialized\");\n telemetry.update();\n }", "public void switchLight(){\r\n _switchedOn = !_switchedOn;\r\n }", "default public int getControlToDevicePort()\t\t\t\t{ return 2226; }", "protected int getDefaultPort() {\n/* 320 */ return -1;\n/* */ }", "@Override\r\n public void onDeviceConnecting(GenericDevice mDeviceHolder,\r\n PDeviceHolder innerDevice) {\n\r\n }", "@Override\r\n protected void initialize() {\r\n //colorMotor = new CANSparkMax(leftDeviceID, MotorType.kBrushless);\r\n //colorEncoder = colorMotor.getEncoder();\r\n \r\n RobotMap.colorEncoder.setPosition(0); // set the encoder to its \"home\" position or zero \r\n }", "laptop(){\r\n length= 0 ;\r\n weight = 0;\r\n height = 0;\r\n width = 0;\r\n }", "@Override\n\tpublic void setCpu() {\n\t\tcom.setCpu(\"i7\");\n\t}", "public static void changeScreens() {\r\n\t\tnone = true;\r\n\t\toption1 = false;\r\n\t\toption2 = false;\r\n\t\toption3 = false;\r\n\t\toption4 = false;\r\n\t\toption5 = false;\r\n\t\tbackToRegFromItem = false;\r\n\t\toverItem = false;\r\n\t\toverYes = false;\r\n\t\toverNo = false;\r\n\t\toverNext = false;\r\n\t\toverHealth = false;\r\n\t\toverAlly = false;\r\n\t\toverPummel = false;\r\n\t\toverLaser = false;\r\n\t\titemSelect = false;\r\n\t\tgoBackFromProg = false;\r\n\t\tgoBackFromAlly = false;\r\n\t\toverAnAlly = false;\r\n\t\tgoBackFromAttire = false;\r\n\t\toverAnOutfit = false;\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "public void setSwitchOn() throws UnavailableDeviceException, ClosedDeviceException, IOException{\n\t\tswitch1.setValue(false);\n\t\tthis.switchState = true; \n\t}", "@Override\r\n public void start() {\r\n runtime.reset();\r\n FL.setPower(1);\r\n FR.setPower(1);\r\n BR.setPower(1);\r\n BL.setPower(1);\r\n try{\r\n Thread.sleep(850);\r\n }\r\n catch (Exception e) {\r\n \r\n }\r\n FL.setPower(0);\r\n FR.setPower(0);\r\n BL.setPower(0);\r\n BR.setPower(0); \r\n }", "DeviceSensor createDeviceSensor();", "public void stopDevice(){\n //Stop the device.\n super.stopDevice();\n }", "@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t\tPosUtil.setIdCardPower(PosUtil.IDCARD_POWER_OFF);// 身份证上电\n\t}", "@Override\n protected void initialize() {\n //Robot.limelight.setLiveStream(0);\n Robot.limelight.setLEDMode(3);\n }", "protected SimpleSwitchDevice(RemoteHomeManager m, int deviceId, String deviceName) {\n super (m, deviceId, deviceName);\n setSubDeviceNumber(\"1\");\n lightSchedule = new OnOffSchedule();\n }", "Light getNSlight();", "@Override\n\tpublic void setPersonal_4_HalfGaugeMeter() \n\t{\n\t\tbgColor = METER_SCALE_COLOR;\n\t}", "public int getScale() {\n return scale_;\n }", "@Override\r\n public void init() {\r\n BackRight = hardwareMap.dcMotor.get(\"BackRight\");\r\n BackLeft = hardwareMap.dcMotor.get(\"BackLeft\");\r\n FrontRight = hardwareMap.dcMotor.get(\"FrontRight\");\r\n FrontLeft = hardwareMap.dcMotor.get(\"FrontLeft\");\r\n FrontRight.setDirection(DcMotor.Direction.REVERSE);\r\n BackRight.setDirection(DcMotor.Direction.REVERSE);\r\n\r\n TreadLeft = hardwareMap.dcMotor.get(\"TreadLeft\");\r\n TreadRight = hardwareMap.dcMotor.get(\"TreadRight\");\r\n\r\n ArmMotor = hardwareMap.dcMotor.get(\"ArmMotor\");\r\n }", "public final void set(float scale) {\n\tm00 = scale; m01 = 0.0f; m02 = 0.0f;\n\tm10 = 0.0f; m11 = scale; m12 = 0.0f;\n\tm20 = 0.0f; m21 = 0.0f; m22 = scale;\n }", "public void setLight1(){\n }", "@Override\n\tpublic void setupSensors() {\n\t\t\n\t}", "@Override \n public void init() {\n intakeLeft = hardwareMap.crservo.get(\"intakeLeft\");\n intakeRight = hardwareMap.crservo.get(\"intakeRight\");\n topLeft = hardwareMap.servo.get(\"topLeft\");\n bottomLeft = hardwareMap.servo.get(\"bottomRight\");\n topRight = hardwareMap.servo.get(\"topRight\");\n bottomRight = hardwareMap.servo.get(\"bottomRight\");\n lift = hardwareMap.dcMotor.get(\"lift\");\n }", "@Override\r\n public void onDeviceStatusChange(GenericDevice dev, PDeviceHolder devh,\r\n PHolderSetter status) {\n\r\n }", "protected synchronized void initialize()\n {\n super.initialize();\n\n\n m_conversionToInches = kmV_Per_V / kmV_per_MM / kmmPerIn;\n\n // LiveWindow.addSensor(\"Ultrasonic\",\n // ((DigitalInput) m_echoChannel).getChannel(), this);\n }", "public MVSR() {\n clg = \"MVSR\";\n cmax = 10000;\n mmax = 12000;\n eemax = 13033;\n emax = 18520;\n imax = 20204;\n }", "public void setDeviceModel(DeviceModel deviceModel)\r\n\t{\r\n\t\tthis.deviceModel = deviceModel;\r\n\t}", "int getSnPort();", "int getSnPort();", "protected void initialize()\n\t{\n\t\tenable = SmartDashboard.getBoolean(RobotMap.EnableRespoolWinch);\n\t}", "public void setgearExtendLights(){\n \tgearExtendLights.set(true);\n }", "protected byte[] getBathWaterVolumeSetting2() {return null;}", "public ControlBoard(ModReciever md) {\n\t\tthis.md = md;\n\t\t// PIN Diagram\n\t\t// 0 - MIDI Reset\n\t\t// 1 DoHarm\n\t\t// 2 DoInvert\n\t\t// 3 DoHarmDiatonically\n\t\t// 4 Set Tonic\n\t\t// 5 Set Harm Interval\n\t\t// 6 Set ScaleType\n\t\t// 7 C/Octave Major\n\t\t// 8 C#/m2 Minor\n\t\t// 9 D/M2 Harmonic Minor\n\t\t// 10 D#/m3 Melodic Minor A\n\t\t// 11 E/M3 Melodic Minor B\n\t\t// 12 F/P4 Dorian\n\t\t// 13 F#/TT Phrygian\n\t\t// 14 G/P5 Lydian\n\t\t// 15 G#/m6 Mixolydian\n\t\t// 16 A/M6 Locrian\n\t\t// 17 A#/m7\n\t\t// 18 B/M7\n\t\t// 19 DOHARM LED\n\t\t// 20 DOHARMDIATONIC LED\n\t\t// 21 DOINVERT LED\n\t\t// 22 SETHARMINT LED\n\t\t// 23 SETTONIC LED\n\t\t// 24 RUNNING LED\n\t\t// 25 SETSCALE LED\n\t\t// POWER LED OFF 5v\n\n\t\t// Set Up Input Pins\n\t\tmidiReset = gp.provisionDigitalInputPin(RaspiPin.GPIO_00, PinPullResistance.PULL_DOWN);\n\t\tmidiReset.addListener(this);\n\t\tmidiReset.setName(\"RESET\");\n\t\tdoHarmonize = gp.provisionDigitalInputPin(RaspiPin.GPIO_01, PinPullResistance.PULL_DOWN);\n\t\tdoHarmonize.addListener(this);\n\t\tdoHarmonize.setName(\"doHarmonize\");\n\t\tdoInvert = gp.provisionDigitalInputPin(RaspiPin.GPIO_02, PinPullResistance.PULL_DOWN);\n\t\tdoInvert.addListener(this);\n\t\tdoInvert.setName(\"doInvert\");\n\t\tdoHarmonizeDiatonically = gp.provisionDigitalInputPin(RaspiPin.GPIO_03, PinPullResistance.PULL_DOWN);\n\t\tdoHarmonizeDiatonically.addListener(this);\n\t\tdoHarmonizeDiatonically.setName(\"doHarmonizeDiatonically\");\n\t\tsetTonic = gp.provisionDigitalInputPin(RaspiPin.GPIO_04, PinPullResistance.PULL_DOWN);\n\t\tsetTonic.addListener(this);\n\t\tsetTonic.setName(\"setTonic\");\n\t\tsetHarmonicInterval = gp.provisionDigitalInputPin(RaspiPin.GPIO_05, PinPullResistance.PULL_DOWN);\n\t\tsetHarmonicInterval.addListener(this);\n\t\tsetHarmonicInterval.setName(\"setHarmonicInterval\");\n\t\tsetScaleType = gp.provisionDigitalInputPin(RaspiPin.GPIO_06, PinPullResistance.PULL_DOWN);\n\t\tsetScaleType.addListener(this);\n\t\tsetScaleType.setName(\"setScaleType\");\n\t\ttonicC = gp.provisionDigitalInputPin(RaspiPin.GPIO_07, PinPullResistance.PULL_DOWN);\n\t\ttonicC.addListener(this);\n\t\ttonicC.setName(\"tonicC\");\n\t\ttonicCS = gp.provisionDigitalInputPin(RaspiPin.GPIO_08, PinPullResistance.PULL_DOWN);\n\t\ttonicCS.addListener(this);\n\t\ttonicCS.setName(\"tonicCS\");\n\t\ttonicD = gp.provisionDigitalInputPin(RaspiPin.GPIO_09, PinPullResistance.PULL_DOWN);\n\t\ttonicD.addListener(this);\n\t\ttonicD.setName(\"tonicD\");\n\t\ttonicDS = gp.provisionDigitalInputPin(RaspiPin.GPIO_10, PinPullResistance.PULL_DOWN);\n\t\ttonicDS.addListener(this);\n\t\ttonicDS.setName(\"tonicDS\");\n\t\ttonicE = gp.provisionDigitalInputPin(RaspiPin.GPIO_11, PinPullResistance.PULL_DOWN);\n\t\ttonicE.addListener(this);\n\t\ttonicE.setName(\"tonicE\");\n\t\ttonicF = gp.provisionDigitalInputPin(RaspiPin.GPIO_12, PinPullResistance.PULL_DOWN);\n\t\ttonicF.addListener(this);\n\t\ttonicF.setName(\"tonicF\");\n\t\ttonicFS = gp.provisionDigitalInputPin(RaspiPin.GPIO_13, PinPullResistance.PULL_DOWN);\n\t\ttonicFS.addListener(this);\n\t\ttonicFS.setName(\"tonicFS\");\n\t\ttonicG = gp.provisionDigitalInputPin(RaspiPin.GPIO_14, PinPullResistance.PULL_DOWN);\n\t\ttonicG.addListener(this);\n\t\ttonicG.setName(\"tonicG\");\n\t\ttonicGS = gp.provisionDigitalInputPin(RaspiPin.GPIO_15, PinPullResistance.PULL_DOWN);\n\t\ttonicGS.addListener(this);\n\t\ttonicGS.setName(\"tonicGS\");\n\t\ttonicA = gp.provisionDigitalInputPin(RaspiPin.GPIO_16, PinPullResistance.PULL_DOWN);\n\t\ttonicA.addListener(this);\n\t\ttonicA.setName(\"tonicA\");\n\t\ttonicAS = gp.provisionDigitalInputPin(RaspiPin.GPIO_17, PinPullResistance.PULL_DOWN);\n\t\ttonicAS.addListener(this);\n\t\ttonicAS.setName(\"tonicAS\");\n\t\ttonicB = gp.provisionDigitalInputPin(RaspiPin.GPIO_18, PinPullResistance.PULL_DOWN);\n\t\ttonicB.addListener(this);\n\t\ttonicB.setName(\"tonicB\");\n\n\t\t// Set LED Pins\n\t\tdoHarmLed = gp.provisionDigitalOutputPin(RaspiPin.GPIO_19);\n\t\tdoHarmDiatonicLed = gp.provisionDigitalOutputPin(RaspiPin.GPIO_20);\n\t\tdoInvertLed = gp.provisionDigitalOutputPin(RaspiPin.GPIO_21);\n\t\tsetHarmIntLed = gp.provisionDigitalOutputPin(RaspiPin.GPIO_22);\n\t\tsetTonicLed = gp.provisionDigitalOutputPin(RaspiPin.GPIO_23);\n\t\tisRunningLed = gp.provisionDigitalOutputPin(RaspiPin.GPIO_24);\n\t\tsetScaleLed = gp.provisionDigitalOutputPin(RaspiPin.GPIO_25);\n\n\t\t// Test LEDS\n\t\tdoHarmLed.high();\n\t\t_wait();\n\t\tdoHarmLed.low();\n\t\tdoHarmDiatonicLed.high();\n\t\t_wait();\n\t\tdoHarmDiatonicLed.low();\n\t\tdoInvertLed.high();\n\t\t_wait();\n\t\tdoInvertLed.low();\n\t\tsetHarmIntLed.high();\n\t\t_wait();\n\t\tsetHarmIntLed.low();\n\t\tsetTonicLed.high();\n\t\t_wait();\n\t\tsetTonicLed.low();\n\t\tisRunningLed.high();\n\t\t_wait();\n\t\tisRunningLed.low();\n\t\tsetScaleLed.high();\n\t\t_wait();\n\t\tsetScaleLed.low();\n\n\t\t// Set Pin defaults\n\t\tdoHarmLed.high();\n\t\tdoHarmDiatonicLed.low();\n\t\tdoInvertLed.low();\n\t\tsetHarmIntLed.low();\n\t\tsetTonicLed.low();\n\t\tisRunningLed.high();\n\t\tsetScaleLed.low();\n\n\t\t// Add shutdown hook to ensure all LEDs are powered OFF on shutdown\n\t\tRuntime.getRuntime().addShutdownHook(new Thread() {\n\t\t\tpublic void run() {\n\t\t\t\tdoHarmLed.low();\n\t\t\t\tdoHarmDiatonicLed.low();\n\t\t\t\tdoInvertLed.low();\n\t\t\t\tsetHarmIntLed.low();\n\t\t\t\tsetTonicLed.low();\n\t\t\t\tisRunningLed.low();\n\t\t\t\tsetScaleLed.low();\n\t\t\t}\n\t\t});\n\t}", "protected double getEnginePower(){\n return enginePower;\n }", "private void setXscale() {\n\t}", "public Smartphone() {\n this.typ = \"Smartphone\";\n }", "public void init() {\n //De leden mogen niet extreem obesitas hebben. Onder of gelijk aan 180kg.\n Valerie= 40;\n Jeroen=100;\n Hans=80;\n\n // Teller begint bij 0. Stel: staaf is 80 hoog.\n // 180 is waar de grafiek begint.\n nulpunt=180; //Dit is het nulpunt van de staaf\n som_v = nulpunt - Valerie;\n som_j = nulpunt - Jeroen;\n som_h = nulpunt - Hans;\n }", "public void flashlightSwitch()\n {\n usingFlashlight = !usingFlashlight;\n }", "default public int getStatusFromDevicePort()\t\t\t{ return 2223; }", "public int getScale() {\r\n return scale;\r\n }", "public void hardwareResources() {\n\t\tSystem.out.println(\"I am the Hardware implemented through Multiple inheritence in Desktop class\");\r\n\r\n\t}", "@Override public void init() {\n /// Important Step 2: Get access to a list of Expansion Hub Modules to enable changing caching methods.\n all_hubs_ = hardwareMap.getAll(LynxModule.class);\n /// Important Step 3: Option B. Set all Expansion hubs to use the MANUAL Bulk Caching mode\n for (LynxModule module : all_hubs_ ) {\n switch (motor_read_mode_) {\n case BULK_READ_AUTO:\n module.setBulkCachingMode(LynxModule.BulkCachingMode.AUTO);\n break;\n case BULK_READ_MANUAL:\n module.setBulkCachingMode(LynxModule.BulkCachingMode.MANUAL);\n break;\n case BULK_READ_OFF:\n default:\n module.setBulkCachingMode(LynxModule.BulkCachingMode.OFF);\n break;\n }\n }\n\n /// Use the hardwareMap to get the dc motors and servos by name.\n\n motorLF_ = hardwareMap.get(DcMotorEx.class, lfName);\n motorLB_ = hardwareMap.get(DcMotorEx.class, lbName);\n motorRF_ = hardwareMap.get(DcMotorEx.class, rfName);\n motorRB_ = hardwareMap.get(DcMotorEx.class, rbName);\n motorLF_.setDirection(DcMotor.Direction.REVERSE);\n motorLB_.setDirection(DcMotor.Direction.REVERSE);\n\n // map odometry encoders\n verticalLeftEncoder = hardwareMap.get(DcMotorEx.class, verticalLeftEncoderName);\n verticalRightEncoder = hardwareMap.get(DcMotorEx.class, verticalRightEncoderName);\n horizontalEncoder = hardwareMap.get(DcMotorEx.class, horizontalEncoderName);\n\n if( USE_ENCODER_FOR_TELEOP ) {\n motorLF_.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n motorLF_.setMode ( DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n motorLB_.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n motorLB_.setMode ( DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n motorRF_.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n motorRF_.setMode ( DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n motorRB_.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n motorRB_.setMode ( DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n\n verticalLeftEncoder.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n verticalRightEncoder.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n horizontalEncoder.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n\n motorLF_.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n motorLB_.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n motorRF_.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n motorRB_.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n }\n\n if( USE_INTAKE ) {\n motor_left_intake_ = hardwareMap.get(DcMotorEx.class, \"motorLeftIntake\");\n motor_right_intake_ = hardwareMap.get(DcMotorEx.class, \"motorRightIntake\");\n motor_right_intake_.setDirection(DcMotor.Direction.REVERSE) ;\n\n motor_left_intake_.setMode( DcMotor.RunMode.STOP_AND_RESET_ENCODER );\n motor_left_intake_.setMode( DcMotor.RunMode.RUN_USING_ENCODER );\n motor_right_intake_.setMode( DcMotor.RunMode.STOP_AND_RESET_ENCODER );\n motor_right_intake_.setMode( DcMotor.RunMode.RUN_USING_ENCODER );\n\n servo_left_intake_ = hardwareMap.servo.get(\"servoLeftIntake\");\n servo_left_intake_pos_ = CR_SERVO_STOP ;\n servo_left_intake_.setPosition(CR_SERVO_STOP);\n servo_right_intake_ = hardwareMap.servo.get(\"servoRightIntake\");\n servo_right_intake_pos_ = CR_SERVO_STOP ;\n servo_right_intake_.setPosition(CR_SERVO_STOP);\n }\n if( USE_LIFT ) {\n motor_lift_ = hardwareMap.get(DcMotorEx.class, \"motorLift\");\n motor_lift_.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n motor_lift_.setMode( DcMotor.RunMode.STOP_AND_RESET_ENCODER );\n power_lift_ = 0.0;\n if( USE_RUN_TO_POS_FOR_LIFT ) {\n motor_lift_.setTargetPosition(0);\n motor_lift_.setMode( DcMotor.RunMode.RUN_TO_POSITION ); // must call setTargetPosition() before switching to RUN_TO_POSISTION\n } else {\n motor_lift_.setMode( DcMotor.RunMode.RUN_USING_ENCODER);\n }\n last_stone_lift_enc_ = -1;\n }\n\n if( USE_STONE_PUSHER ) {\n servo_pusher_ = hardwareMap.servo.get(\"servoPusher\");\n servo_pusher_.setPosition(PUSHER_INIT);\n servo_pusher_pos_ = PUSHER_INIT;\n }\n if( USE_STONE_GATER ) {\n servo_gater_ = hardwareMap.servo.get(\"servoGater\");\n servo_gater_.setPosition(GATER_INIT);\n servo_gater_pos_ = GATER_INIT;\n }\n\n if( USE_ARM ) {\n servo_arm_ = hardwareMap.servo.get(\"servoArm\");\n servo_arm_.setPosition(ARM_INIT);\n servo_arm_pos_ = ARM_INIT;\n servo_claw_ = hardwareMap.servo.get(\"servoClaw\");\n servo_claw_.setPosition(CLAW_OPEN);\n servo_claw_pos_ = CLAW_OPEN;\n }\n\n if( USE_HOOKS ) {\n servo_left_hook_ = hardwareMap.servo.get(\"servoLeftHook\");\n servo_left_hook_.setPosition(LEFT_HOOK_UP);\n servo_left_hook_pos_ = LEFT_HOOK_UP;\n servo_right_hook_ = hardwareMap.servo.get(\"servoRightHook\");\n servo_right_hook_.setPosition(RIGHT_HOOK_UP);\n servo_right_hook_pos_ = RIGHT_HOOK_UP;\n }\n\n if( USE_PARKING_STICKS ) {\n servo_left_park_ = hardwareMap.servo.get(\"servoLeftPark\");\n servo_left_park_.setPosition(LEFT_PARK_IN);\n servo_left_park_pos_ = LEFT_PARK_IN;\n servo_right_park_ = hardwareMap.servo.get(\"servoRightPark\");\n servo_right_park_.setPosition(RIGHT_PARK_IN);\n servo_right_park_pos_ = RIGHT_PARK_IN;\n }\n\n if( USE_RGB_FOR_STONE ) {\n rev_rgb_range_ = hardwareMap.get(LynxI2cColorRangeSensor.class, \"stoneColor\");\n //rev_rgb_range_ = hardwareMap.get(LynxI2cColorRangeSensor.class, \"stoneColorV3\"); // different interface for V3, can't define it as LynxI2cColorRangeSensor anymore, 2020/02/29\n if( rev_rgb_range_!=null ) {\n if( AUTO_CALIBRATE_RGB ) {\n int alpha = rev_rgb_range_.alpha();\n //double dist = rev_rgb_range_.getDistance(DistanceUnit.CM);\n double dist = rev_rgb_range_.getDistance(DistanceUnit.METER);\n if( alpha>=MIN_RGB_ALPHA && alpha<100000 ) {\n rev_rgb_alpha_init_ = alpha;\n }\n if( AUTO_CALIBRATE_RGB_RANGE && !Double.isNaN(dist) ) {\n if( dist>MIN_RGB_RANGE_DIST && dist<MAX_RGB_RANGE_DIST ) {\n rev_rgb_dist_init_ = dist;\n }\n }\n }\n }\n }\n if( USE_RGBV3_FOR_STONE ) {\n //rgb_color_stone_ = hardwareMap.get(ColorSensor.class, \"stoneColorV3\");\n rgb_range_stone_ = hardwareMap.get(DistanceSensor.class, \"stoneColorV3\");\n if( AUTO_CALIBRATE_RANGE && rgb_range_stone_!=null ) {\n while(true) { // wait till range sensor gets a valid reading\n double dis = getRangeDist(RangeName.RGB_RANGE_STONE);\n if( dis>0.0 && dis<0.2 ) {\n rgb_range_stone_dist_init_ = dis;\n break;\n }\n }\n }\n }\n\n if( USE_RIGHT_RANGE ) {\n range_right_ = (Rev2mDistanceSensor) (hardwareMap.get(DistanceSensor.class, \"rightRange\"));\n if( AUTO_CALIBRATE_RANGE && range_right_!=null ) {\n while(true) { // wait till range sensor gets a valid reading\n double dis = getRangeDist(RangeName.RANGE_RIGHT);\n if( dis>0.01 && dis<2.0 ) {\n range_right_dist_init_ = dis;\n break;\n }\n }\n }\n }\n if( USE_LEFT_RANGE ) {\n range_left_ = (Rev2mDistanceSensor) (hardwareMap.get(DistanceSensor.class, \"leftRange\"));\n if( AUTO_CALIBRATE_RANGE && range_left_!=null ) {\n while(true) { // wait till range sensor gets a valid reading\n double dis = getRangeDist(RangeName.RANGE_LEFT);\n if( dis>0.01 && dis<2.0 ) {\n range_left_dist_init_ = dis;\n break;\n }\n }\n }\n }\n\n if( USE_RANGE_FOR_STONE) {\n range_stone_ = (Rev2mDistanceSensor) (hardwareMap.get(DistanceSensor.class, \"stoneRange\"));\n if( AUTO_CALIBRATE_RANGE && range_stone_!=null ) {\n while(true) { // wait till range sensor gets a valid reading\n double dis = getRangeDist(RangeName.RANGE_STONE);\n if( dis>0.01 && dis<0.5 ) {\n range_stone_dist_init_ = dis;\n break;\n }\n }\n }\n }\n\n if( USE_INTAKE_MAG_SWITCH ) {\n intake_mag_switch_ = hardwareMap.get(DigitalChannel.class, \"intake_mag_switch\");\n intake_mag_switch_.setMode(DigitalChannelController.Mode.INPUT);\n intake_mag_prev_state_ = intake_mag_switch_.getState();\n intake_mag_change_time_ = 0.0;\n }\n if( USE_STONE_LIMIT_SWITCH ) {\n stone_limit_switch_ = hardwareMap.get(DigitalChannel.class, \"stone_limit_switch\");\n stone_limit_switch_.setMode(DigitalChannelController.Mode.INPUT);\n stone_limit_switch_prev_state_ = stone_limit_switch_.getState();\n }\n\n\n /////***************************** JOY STICKS *************************************/////\n\n /// Set joystick deadzone, any value below this threshold value will be considered as 0; moved from init() to init_loop() to aovid crash\n if(gamepad1!=null) gamepad1.setJoystickDeadzone( JOYSTICK_DEAD_ZONE );\n if(gamepad2!=null) gamepad2.setJoystickDeadzone( JOYSTICK_DEAD_ZONE );\n\n resetControlVariables();\n }", "protected byte[] getBathWaterVolumeSetting1() {return null;}", "private DeviceManager() {\n\t\tsuper();\n\t\t// TODO Auto-generated constructor stub\n\t}", "public void setSwitchOff() throws UnavailableDeviceException, ClosedDeviceException, IOException {\n\t\tswitch1.setValue(true);\n\t\tthis.switchState = false; \n\t}", "public void setScale(Scale scale) {\n this.scale = scale;\n }", "public void setRingerDevice(String devid);", "public double getScale() {\n return scale;\n }", "Device createDevice();", "@Override\n public void initialize() {\n limelight.disableDriverMode();\n limelight.enableLEDs();\n }", "public void hardwareResources() {\n\t\t\r\n\t}", "public void mo2185a() {\n C0320g.f1380r = new C0316a();\n }", "SoftSwitches(SoftSwitch softswitch) {\n this.softswitch = softswitch;\n }", "public IRSensorSubsystem() {\n\n }", "private void initDefaults() {\n _nodeFadeSourceColor = _defNodeFadeSourceColor;\n _nodeFadeDestinationColor = _defNodeFadeDestinationColor;\n\n _nodeStrokeSourceColor = _defNodeStrokeSourceColor;\n _nodeStrokeDestinationColor = _defNodeStrokeDestinationColor;\n\n _nodeStrokeSourceWidth = _defNodeStrokeSourceWidth;\n _nodeStrokeDestinationWidth = _defNodeStrokeDestinationWidth;\n\n _supportEdgeFadeSourceColor = _defSupportEdgeFadeSourceColor;\n _supportEdgeFadeDestinationColor = _defSupportEdgeFadeDestinationColor;\n\n _refuteEdgeFadeSourceColor = _defRefuteEdgeFadeSourceColor;\n _refuteEdgeFadeDestinationColor = _defRefuteEdgeFadeDestinationColor;\n\n _edgeStrokeSourceWidth = _defEdgeStrokeSourceWidth;\n _edgeStrokeDestinationWidth = _defEdgeStrokeDestinationWidth;\n\n _curvedLines = _defCurvedLines;\n\n _manualBackgroundColor = _defManualBackgroundColor;\n\n _realTimeSliderResponse = _defRealTimeSliderResponse;\n }", "public abstract GraphicsDevice getDefaultScreenDevice();", "public RdbmsSwitch() {\r\n\t\tif (modelPackage == null) {\r\n\t\t\tmodelPackage = RdbmsPackage.eINSTANCE;\r\n\t\t}\r\n\t}", "public Integer getHoldscale() {\r\n return holdscale;\r\n }", "@Override\n public void init() {\n \n \n rightFront = hardwareMap.dcMotor.get(\"frontR\");\n rightBack = hardwareMap.dcMotor.get(\"backR\");\n \n \n \n rightFront.setDirection(DcMotor.Direction.FORWARD); \n rightBack.setDirection(DcMotor.Direction.FORWARD);\n \n \n \n\n // Send telemetry message to signify robot waiting;\n telemetry.addData(\"Say\", \"Hello Driver\"); //\n }", "public Joystick getTabletJoystick(){\n return tab;\n}", "@Override\n public void init() {\n leftDrive = hardwareMap.get(DcMotor.class, \"left_drive\");\n rightDrive = hardwareMap.get(DcMotor.class, \"right_drive\");\n }", "@Override\n\tpublic void switchPortChanged(Long switchId) \n\t{\n\n\t}", "@SuppressWarnings(\"unused\")\n public default void onReplayDeviceChanged(Device.Instance dev) { /* empty */ }" ]
[ "0.5674501", "0.5637098", "0.55564946", "0.5544008", "0.5465524", "0.54451", "0.54205465", "0.54027116", "0.5377526", "0.5360563", "0.534327", "0.5336925", "0.53306013", "0.53215057", "0.53169453", "0.5303584", "0.5295498", "0.52740514", "0.52740514", "0.5242148", "0.5222819", "0.51981705", "0.518858", "0.5183804", "0.5183511", "0.51628935", "0.51601815", "0.5127516", "0.5115213", "0.51065856", "0.5098196", "0.5096124", "0.509247", "0.50894165", "0.5076526", "0.507555", "0.5073404", "0.50727874", "0.507155", "0.50657177", "0.5065189", "0.50640947", "0.50571966", "0.5056434", "0.50552374", "0.5052199", "0.50459236", "0.5038896", "0.50309056", "0.5029175", "0.5025284", "0.5025196", "0.5022007", "0.50049365", "0.50024486", "0.50021464", "0.5001808", "0.4996431", "0.4989518", "0.49883455", "0.49830717", "0.49753103", "0.49630496", "0.49472734", "0.49448866", "0.49445498", "0.49445498", "0.49414068", "0.493705", "0.49355078", "0.4926427", "0.4923797", "0.49230778", "0.49146917", "0.49131396", "0.49106747", "0.49068454", "0.48992223", "0.48932102", "0.4886745", "0.4881556", "0.4879364", "0.48729432", "0.4871531", "0.4867761", "0.48671767", "0.4867154", "0.4866271", "0.48656884", "0.486531", "0.48594743", "0.48570904", "0.48566103", "0.4856526", "0.48553774", "0.485264", "0.48522478", "0.48516232", "0.484948", "0.4840783", "0.48325548" ]
0.0
-1
System.out.printf "Sample from %20s = %s is %s\n" System.out.printf("Sample from %20s is %s\n" , remote.getNodeID(), remote.get64BitAddress(), toString(sample));
@Override public void ioSampleReceived(RemoteXBeeDevice remote, IOSample sample) { IOValue value = sample.getDigitalValue(line); invoke(remote, value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public String toString() {\n final StringBuilder buffer = new StringBuilder(90);\n InetAddressUtils.formatAddress(buffer, localAddress);\n buffer.append(\"<->\");\n InetAddressUtils.formatAddress(buffer, remoteAddress);\n return buffer.toString();\n }", "public static void main(String[] args) {\n StringBuilder sb = new StringBuilder();\n sb.append(1);\n sb.append(\"00\");\n sb.append(\"%\");\n sb.append(' ');\n sb.append('P');\n \n String createdString = sb.toString();\n System.out.println(\"createdString = \" + createdString);\n\n }", "private String format(String message) {\n InetSocketAddress local = (InetSocketAddress) context.channel().localAddress();\n InetSocketAddress remote = (InetSocketAddress) context.channel().remoteAddress();\n\n String localhost;\n if(local != null) {\n localhost = local.getAddress().getHostAddress() + \":\" + local.getPort();\n } else{\n localhost = \"undefined\";\n }\n\n String remotehost;\n if(remote != null) {\n remotehost = remote.getAddress().getHostAddress() + \":\" + remote.getPort();\n } else{\n remotehost = \"undefined\";\n }\n\n return \"[local: \" + localhost + \", remote: \" + remotehost + \"] \" + message;\n }", "private static void print(final String format, final Object...params) {\n // we prefix all our messages with \">>> \" so as to distinguish them from the driver, node and client messages\n final String msg = String.format(\">>> \" + format, params);\n log.info(msg);\n System.out.println(msg);\n }", "public static void tcp_peeraddr_print( Socket com )\n{\n InetSocketAddress isa = \n (InetSocketAddress)com.getRemoteSocketAddress();\n InetAddress ia = isa.getAddress();\n String peerhostaddr = ia.getHostAddress();\n int peerportno = isa.getPort();\n stdout.printf(\"connection (hash== %s) from %s:%d\\n\", \n com.hashCode(), peerhostaddr, peerportno );\n}", "public String toString() {\n/* 235 */ return \"Status = \" + this.status + \" HandshakeStatus = \" + this.handshakeStatus + \"\\nbytesConsumed = \" + this.bytesConsumed + \" bytesProduced = \" + this.bytesProduced;\n/* */ }", "public void print(){\r\n System.out.println(toString());\r\n }", "public String toString() {\n/* 168 */ StringBuffer stringBuffer = new StringBuffer(\"Address Type: \" + this.addrType + \"\\n\");\n/* */ \n/* 170 */ stringBuffer.append(\"AddressContents: \");\n/* 171 */ for (byte b = 0; b < this.buf.length && b < 32; b++) {\n/* 172 */ stringBuffer.append(Integer.toHexString(this.buf[b]) + \" \");\n/* */ }\n/* 174 */ if (this.buf.length >= 32)\n/* 175 */ stringBuffer.append(\" ...\\n\"); \n/* 176 */ return stringBuffer.toString();\n/* */ }", "private static String dump(byte[]... packets)\n {\n StringBuilder builder = new StringBuilder();\n for (int i = 0; i < packets.length; i++)\n {\n byte[] packet = packets[i];\n builder.append('\"');\n builder.append(bytesToHex(packet));\n builder.append('\"');\n\n if ((i + 1) < packets.length)\n {\n builder.append('\\n');\n }\n }\n return builder.toString();\n }", "public void printMsg() {\n System.out.println(\"This is an example RMI program\");\n }", "public String print(){\r\n\t\treturn String.format(\"%9d\\t%-5s\\t\\t%-3d\\t\\t%-15s\",\r\n\t\t\t\tthis.trackNumber, \r\n\t\t\t\tthis.engineNumber, \r\n\t\t\t\tthis.numRailCars, \r\n\t\t\t\tthis.destCity);\r\n\t\t}", "public String toString(){\r\n\t\treturn(ssid+\",\"+mac+\",\"+frequency+\",\"+signal+\",\");\r\n\t}", "static void print_the_address(int print_address){\n\t\tSystem.out.print(decimel_to_hexa(print_address)+\" : \");\n\t}", "static void print(BigInteger[] P) \r\n{\r\n\tString a = P[0].toString(16);\r\n\tString b = P[1].toString(16);\r\n\tSystem.out.printf(\" |%S|\",a); \r\n\tSystem.out.printf(\" |%S| \\n\",b);\r\n}", "public void dump() {\n System.out.println(\"ID : \"+hostID);\n for (int i=0; i<hostAddresses.size(); i++) System.out.println(\" - addresse : \"+hostAddresses.elementAt(i).getNormalizedAddress());\n System.out.println(\"CPU : \"+cpuLoad);\n System.out.println(\"Memoire : \"+memoryLoad);\n System.out.println(\"Batterie : \"+batteryLevel);\n System.out.println(\"Threads : \"+numberOfThreads);\n System.out.println(\"CMs : \"+numberOfBCs);\n System.out.println(\"connecteurs : \"+numberOfConnectors);\n System.out.println(\"connecteurs entree reseau : \"+numberOfConnectorsNetworkInputs);\n System.out.println(\"connecteurs sortie reseau : \"+numberOfConnectorsNetworkOutputs);\n System.out.println(\"Traffic PF entree : \"+networkPFInputTraffic);\n System.out.println(\"Traffic PF sortie : \"+networkPFOutputTraffic);\n System.out.println(\"Traffic application entree : \"+networkApplicationInputTraffic);\n System.out.println(\"Traffic application sortie : \"+networkApplicationOutputTraffic);\n }", "public String toString()\n {\n String str = \"\";\n str += \"topic: \" + label + \", at activation level \" + activation + \"\\n\";\n \n str += \"\\t\" + response1 +\"\\n\";\n str += \"\\t\" + response2 +\"\\n\";\n str += \"\\t\" + response3 +\"\\n\";\n \n return str;\n }", "public void print() {\r\n\t\t System.out.println(toString());\r\n\t }", "@Test\n public void testAddress()\n {\n System.out.println(\"address\");\n int addr = 16893;\n System.out.println(N2TCode.address(addr));\n System.out.println(Integer.toBinaryString(addr));\n }", "public void println() { System.out.println( toString() ); }", "private static void printUsage()\n {\n HelpFormatter hf = new HelpFormatter();\n String header = String.format(\n \"%nAvailable commands: ring, cluster, info, cleanup, compact, cfstats, snapshot [name], clearsnapshot, bootstrap\");\n String usage = String.format(\"java %s -host <arg> <command>%n\", NodeProbe.class.getName());\n hf.printHelp(usage, \"\", options, header);\n }", "private void print_addr() {\n try(final DatagramSocket socket = new DatagramSocket()){\n socket.connect(InetAddress.getByName(\"8.8.8.8\"), 10002);\n System.out.println(socket.getLocalAddress().getHostAddress()+\":\"+port);\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n }", "public String printOutput(driver driver){\n \t\tString street = new String();\n \t\tif(name == driver.start.option1.name){\n \t\t\t\tstreet = driver.start.outStreet1;\n \t\t\t}\n \t\t\telse{\n \t\t\t\tstreet = driver.start.outStreet2;\n \t\t\t}\n \tString printStr = \"Driver \" + driver.id + \" heading from \" + driver.start.name + \" to \" + name + \" via \" + street;\n \treturn printStr;\n \t\n \t}", "void dump() {\n\t\tSystem.out.print(\"I am: \" + (territoryID));\n\t\tSystem.out.print(\"\\tNeighbour of:\");\n\n\t}", "public void printNode(){\n\t\tSystem.out.println(\"\\nCurrent neigbor: \" + serventList.size());\n\t\tfor(int i = 0;i<serventList.size();i++){\n\t\t\tServentInfo b = serventList.get(i);\n\t\t\tSystem.out.println(\"(\" + b.IP + \":\" + b.port + \"); \");\n\t\t}\n\t\tSystem.out.println(\"\");\n\t}", "public String toString(){\n\tString sourceName;\n\tString destinationName;\n\t// its possible the wire has no source gate so this avoids null\n\t// pointer errors\n\tif( source == null){\n\t sourceName = \"No wire source\";\n\t} else {\n\t sourceName = this.source.name;\n\t}\n\t// provides the same check for destination gates\n\tif( destination == null ){\n\t destinationName = \"No wire destination\";\n\t} else {\n\t destinationName = this.destination.name;\n\t}\n\treturn \"Wire \" + sourceName + \" \"+ srcPin + \" \" +\n\t\tdestinationName + \" \" + \" \" + dstPin\n\t\t+ \" \" + delay;\n }", "private void grnadr(String a) {\n\t\t\n\t\tSystem.out.println(\"Greens Technology address is:\"+\"\\n\"+a);\n\n\n}", "public String toString() {\n String s = \"\";\n try {\n s += get_nodeid()+\"\\t\";\n //s += \" [nodeid=0x\"+Long.toHexString(get_nodeid())+\"]\\n\";\n } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }\n try {\n s += get_counter()+\"\\t\";\n //s += \" [counter=0x\"+Long.toHexString(get_counter())+\"]\\n\";\n } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }\n try {\n s += \"\"+get_p_sendts()+\"\\t\";\n //s += \" [p_sendts=0x\"+Long.toHexString(get_p_sendts())+\"]\\n\";\n } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }\n try {\n s += \"\"+get_receivets()+\"\\t\";\n //s += \" [receivets=0x\"+Long.toHexString(get_receivets())+\"]\\n\";\n } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }\n try {\n s += \"\"+Float.toString(get_virtual_clk())+\"\\t\";\n //s += \" [virtual_clk=\"+Float.toString(get_virtual_clk())+\"]\\n\";\n } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }\n try {\n s += \"\"+Float.toString(get_skew_cmp())+\"\\t\";\n //s += \" [skew_cmp=\"+Float.toString(get_skew_cmp())+\"]\\n\";\n } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }\n try {\n s += \"\"+Float.toString(get_offset_cmp())+\"\";\n //s += \" [offset_cmp=\"+Float.toString(get_offset_cmp())+\"]\\n\";\n } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }\n return s;\n }", "@Override\n\tpublic String toString() {\n\t\treturn ip + \" \"+ times;\n\t}", "private String showAddr(byte[] addr) {\n\t\tif (addr == null)\n\t\t\treturn (\"unknown\");\n\t\treturn ((int) addr[0] & 0xff) + \".\" + ((int) addr[1] & 0xff) + \".\"\n\t\t\t\t+ ((int) addr[2] & 0xff) + \".\" + ((int) addr[3] & 0xff);\n\t}", "private void printActualSensorData() throws IOException , InterruptedException{\n\n System.out.println(\"*----------------------------\");\n for (SensorData sensorData : actualSensorDatas) {\n System.out.println(\"Received a packet: IP:Port: \" + sensorData.printSensorData());\n }\n //Thread.sleep(10000);\n //System.out.print(\"\\033[H\\033[2J\");\n System.out.println(\"----------------------------*\");\n\n }", "void put(){\n System.out.print(name + \" from \" + address + \". \");\n }", "public static void main(String[] args) {\n\r\n\t\tEnumeration<NetworkInterface> interfaces;\r\n\t\ttry {\r\n\t\t\tinterfaces = NetworkInterface.getNetworkInterfaces();\r\n\t\t\twhile (interfaces.hasMoreElements()) {\r\n\t\t\t\tNetworkInterface sys = interfaces.nextElement();\r\n\t\t\t\t\r\n//\t\t\t\tSystem.out.println(Inet4Address.getLocalHost());\r\n\t\t\t\t\r\n//\t\t\t\tSystem.out.println(sys.getInetAddresses());\r\n\t\t\t\tbyte[] mac = sys.getHardwareAddress();\r\n\t\t\t\t\r\n\t\t\t\tStringBuilder sb = new StringBuilder();\r\n\t\t\t\tif (mac!=null) {\r\n\t\t\t\t\tSystem.out.println(sys.getInetAddresses());\r\n\t\t\t\t\tfor (int i = 0; i < mac.length; i++) {\r\n\t\t\t\t\t\tsb.append(String.format(\"%02X%s\", mac[i], (i < mac.length - 1) ? \"-\" : \"\"));\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tSystem.out.println(sb.toString());\r\n\t\t\t\t}\r\n\t\r\n\t\t\t\t\r\n\r\n\t\t\t}\r\n\t\t} catch (SocketException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} \r\n//\t\tcatch (UnknownHostException e) {\r\n//\t\t\t// TODO Auto-generated catch block\r\n//\t\t\te.printStackTrace();\r\n//\t\t}\r\n\t\t\r\n\r\n\r\n\t}", "public void printResult(){\n StringBuilder sb = new StringBuilder(20);\n sb.append(left_value)\n .append(space)\n .append(symbol)\n .append(space)\n .append(right_value)\n .append(space)\n .append('=')\n .append(space)\n .append(result);\n System.out.println(sb);\n }", "public String toString(){\n return \"MAVLINK_MSG_ID_GIMBAL_DEVICE_INFORMATION - sysid:\"+sysid+\" compid:\"+compid+\" time_boot_ms:\"+time_boot_ms+\" firmware_version:\"+firmware_version+\" tilt_max:\"+tilt_max+\" tilt_min:\"+tilt_min+\" tilt_rate_max:\"+tilt_rate_max+\" pan_max:\"+pan_max+\" pan_min:\"+pan_min+\" pan_rate_max:\"+pan_rate_max+\" cap_flags:\"+cap_flags+\" vendor_name:\"+vendor_name+\" model_name:\"+model_name+\"\";\n }", "@Override\n protected void dump(Formatter formatter)\n {\n PeerConnectionStatistics s = rawStatistics;\n\n double drate = s.download.average(4);\n drate /= 1024*1024;\n double urate = s.upload.average(4);\n urate /= 1024*1024;\n\n formatter.format(\"%24s %2S%2S %1c%1c %1c%1c %5.1f %3d %6d | %5.1f %2d %6d %5d %s\\n\",\n peer.address,\n connected ? \"+\" : \"-\",\n handshaked ? \"+\" : \"-\",\n\n choke ? 'c' : '-',\n interested ? 'i' : '-',\n peerChoke ? 'c' : '-',\n peerInterested ? 'i' : '-',\n\n drate, blockRequests.size(), statistics.blocksReceived,\n urate, 0, statistics.blocksSent,\n getPeerCompletionPercent(),\n StdPeerProtocol.extractClientNameFromId(peer.peerId));\n }", "@Override\n public String toString() {\n return address[1] + \".\" + address[2] + \".\" + address[3] + \".\" + address[4];\n }", "private static void print(Object msg){\n if (WAMClient.Debug){\n System.out.println(msg);\n }\n\n }", "public static void main(String[] args) {\n\n System.out.println(obj);\n System.out.println(str);\n System.out.println(nc);\n }", "public String toString(){\r\n String s=\"\";\r\n\r\n System.out.printf(\"Name: %s \\t Nickname: %s \\t\",getName(),getNickname());\r\n\r\n return s;\r\n }", "public String toString()\r\n\t{\r\n\t\treturn this.mac+\",\"+this.ssid+\",\"+this.channel+\",\"+this.signal+\",\";\r\n\t\t\r\n\t}", "public static void printNames(String name){\n System.out.printf(\"Hello, %s\", name);\n}", "@Test\n public void testToString2() {\n System.out.println(\"Animal.toString2\");\n ByteArrayOutputStream outContent = new ByteArrayOutputStream();\n System.setOut(new PrintStream(outContent));\n System.out.print(animal1);\n assertEquals(\"Abstract Axe (17 yo Aardvark) resides in cage #202\", outContent.toString());\n System.out.print(animal2);\n assertEquals(\"Brave Beard (3 yo Beaver) resides in cage #112\", animal2.toString());\n System.setOut(System.out);\n }", "@Test\n\tpublic void testPrintDroids() {\n\t\tassertEquals(\n\t\t\t\t\"05V: UNASSIGNED\\n03V: UNASSIGNED\\n02E: UNASSIGNED\\n01C: UNASSIGNED\\n04C: UNASSIGNED\\n\",\n\t\t\t\ts1.printDroids());\n\t}", "public void printOut() {\n System.out.println(\"\\t\" + result + \" = icmp \" + cond.toLowerCase() + \" \" + type + \" \" + op1 + \", \" + op2 );\n\n // System.out.println(\"\\t\" + result + \" = bitcast i1 \" + temp + \" to i32\");\n }", "public String printf(String cformat, Object... args) {\n String ess = String.format(cformat, args);\n if (view != null) {\n view.append(ess);\n }\n return ess;\n }", "public String toString() {\nString output = new String();\n\noutput = \"shortName\" + \" : \" + \"\" + shortName +\"\\n\"; \noutput += \"type\" + \" : \" + \"\" + type + \"\\n\";\noutput += \"description\" + \" : \" + \"\" + description + \"\\n\"; \n\nreturn output; \n}", "public String toDebugString();", "@Override\n\tpublic String toString() {\n\t\treturn String.format(\"[%s,%s,%d,%s] \", sensorType.toString(),status.toString(),pin,lastValue.isPresent()?lastValue.get():\"NOT UPDATED YET\");\n\t}", "public static void main(String[] args) {\n\n double i = 47456.23456;\n String r1 = String.format(\"i have %,6.2f\", i);\n System.out.println(r1);\n String r2 = String.format(\"i have %,6.1f\", 4.12);\n System.out.println(r2);\n String r3 = String.format(\"i have %c\", 42);\n System.out.println(r3);\n String r4 = String.format(\"i have %x\", 42);\n System.out.println(r4);\n\n\n }", "public void printAddress()\r\n {\r\n address.printAddress();\r\n }", "public void printAddress()\r\n {\r\n address.printAddress();\r\n }", "public void printString() {\n\t\tSystem.out.println(name);\n\t\t\n\t\t\n\t}", "public void showSamples(){\n\t\tfor(int i=0; i<arrIns.size(); i++){\n\t\t\tfor(int j=0; j<arrIns.get(i).numAttributes(); j++){\n\t\t\t\tSystem.out.print(\" | \" + arrIns.get(i).value(j) + \" | \");\n\t\t\t}\n\t\t\tSystem.out.println(\"\");\n\t\t}\n\t}", "@Test\n public void testGet() throws Exception {\n SimpleSNMP simpleSNMP = new SimpleSNMP();\n\n\n String ip = \"127.0.0.1\";\n String oid = \".1.3.6.1.4.1.2011.10.2.6.1.1.1.1.6.97\";\n String responseSring = simpleSNMP.get(ip, \"public\", oid);\n\n printGetResult(oid, responseSring);\n }", "@Override\n public String toString() {\n ByteArrayOutputStream bs = new ByteArrayOutputStream();\n PrintStream out = new PrintStream(bs);\n output(out, \"\");\n return bs.toString();\n }", "@Override\n\tpublic void printf(Level level, Marker marker, String format, Object... params) {\n\n\t}", "public String print(){\r\n\t\t\r\n\t\treturn String.format(\"%9d\\t%-5s\\t\\t%-3d\\t\\t%-15s\",\r\n\t\t\t\tthis.engineNumber, \r\n\t\t\t\tthis.companyName, \r\n\t\t\t\tthis.numberOfRailCars, \r\n\t\t\t\tthis.destinationCity);\r\n\t}", "public void print(String string){\n // make sure that the global weka log picks it up\n System.out.print(string);\n logStatusMessage(string); \n }", "public void testAsString() {\n\t\tSystem.out.println(\"==============================\");\n\t\tSystem.out.println(\"VALUES CURRENTLY IN PIXEL NODE\");\n\t\tSystem.out.println(\"==============================\");\n\t\tSystem.out.println(\"Red Color is : \" + this.redColor);\n\t\tSystem.out.println(\"Green Color is : \" + this.greenColor);\n\t\tSystem.out.println(\"Blue Color is : \" + this.blueColor);\n\t\t// System.out.println(\"\\nTEST OF VALUES NORMALIZED TO 0-255\\n\");\n\t\t// System.out.println(\"Red : \" + (int)((this.redColor % 1) * 255));\n\t\t// System.out.println(\"Green : \" + (int)((this.greenColor % 1) * 255));\n\t\t// System.out.println(\"Blue : \" + (int)((this.blueColor % 1) * 255));\n\t\tSystem.out.println();\n\t}", "public String toString()\r\n/* 367: */ {\r\n/* 368:620 */ return \r\n/* 369: */ \r\n/* 370: */ \r\n/* 371: */ \r\n/* 372: */ \r\n/* 373: */ \r\n/* 374:626 */ 165 + \"Monitor \" + this.name + \" Current Speed Read: \" + (this.lastReadThroughput >> 10) + \" KB/s, \" + \"Asked Write: \" + (this.lastWriteThroughput >> 10) + \" KB/s, \" + \"Real Write: \" + (this.realWriteThroughput >> 10) + \" KB/s, \" + \"Current Read: \" + (this.currentReadBytes.get() >> 10) + \" KB, \" + \"Current asked Write: \" + (this.currentWrittenBytes.get() >> 10) + \" KB, \" + \"Current real Write: \" + (this.realWrittenBytes.get() >> 10) + \" KB\";\r\n/* 375: */ }", "private void visualizeData(String s) {\n System.out.println(\"Data received: \" + s);\n }", "public void print(String value){\r\n System.out.println(value);\r\n }", "private synchronized void printSync(Object... s) {\n out.accept(codeName + \": \" + concatenate(s));\n }", "@Override\n public String toProtocolExplanationString() {\n return \"LL3P Address:\" + ll3pAddress.toHexString() +\" \\n\" ;\n }", "public static void print_my_host_port( int portno )\nthrows UnknownHostException\n{\n InetAddress ia = java.net.InetAddress.getLocalHost();\n String hostname = ia.getHostName();\n stdout.printf(\"run telnet %s %d\\n\", hostname, portno );\n}", "@Override\n\tpublic void printtest(String s)\n\t{\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Now executing the command \" + s + \"...\");\n\t\tSystem.out.println(\"The Results of this command are:\");\n\t\tif(!s.contentEquals(\"toString\")) System.out.println(toStringCursor());\n\t\telse System.out.println(toString());\n\t}", "public void printTheInstance() {\n System.out.println(\"The instance is: \");\n this.printSources();\n System.out.print(\"\\n\");\n this.printDestinations();\n System.out.print(\"\\n\");\n this.printCosts();\n }", "private static void prtln(String s) {\n\t\tif (debug) {\n\t\t\t// System.out.println(\"XmlStringTester: \" + s);\n\t\t\tSystem.out.println(s);\n\t\t}\n\t}", "public void print() {\n System.out.println(toString());\n }", "private void printNetworks() {\n// for (GeneticNeuralNetwork network : networks)\n// System.out.println(network);\n// System.out.println(\"----------***----------\");\n// ////\n }", "public static void main(String[] args) throws UnknownHostException, IOException {\nString serverIP=\"localhost\";\r\nint serverPort=9001;\r\nSocket socket=new Socket(serverIP,serverPort);\r\nInputStream is=socket.getInputStream();\r\nint singleByte=is.read();\r\nwhile(singleByte!=-1){\r\n\tSystem.out.println((char)singleByte);\r\n}\r\n\t\r\n\tsocket.close();\r\n\t}", "@Override\n public String toString() {\n\treturn ByteUtils.toHexString(toByteArray(), true);\n }", "public void print(Node node) \n{\n PrintWriter w = new PrintWriter(new OutputStreamWriter(System.out), true);\n print(node, w);\n}", "@Override\n\tpublic String echo(String s) throws RemoteException {\n\t\tSystem.out.println(\"Replied to some client saying ’\" + s + \"’\");\n\t\treturn s;\n\t}", "public void println(String string) {\n // make sure that the global weka log picks it up\n System.out.println(string); \n logStatusMessage(string);\n }", "public String print() {\n\t\tString offID = getID();\n\t\tString offName = getName();\n\t\tint offAge = getAge();\n\t\tString offState = getState();\n\t\tString data = String.format(\"ID: %-15s \\t Name: %-35s \\t Age: %-15s \\t State: %s\", offID, offName, offAge, offState);\n\t\treturn data;\n\t}", "private void display(String msg) {\n\t\tString msgF = \"\\tClient- \" + msg + \"\\n\\n >> \";\n System.out.print(msgF);\n }", "public static void main(String args[]) {\n// \t/**\n// \t *test getLongId\n// \t */\n// \tfor (int i=0;i<100;i++){\n// \t\tSystem.out.println(i+\" getLongId=\" + getLongId()); \n// \t}\n// \t/**\n// \t * test uuid generate\n// \t */\n// for (int i=0; i< 100; i++) {\n// \tUUIDGenerator UUIDgenerator = UUIDGenerator.getInstance();\n// \tUUID uuid = UUIDgenerator.generateRandomBasedUUID();\n// \tString result = uuid.toString().replaceAll(\"-\", \"\");\n// \tSystem.out.println(i+\" UUID=\" + uuid.toString()); \t\n// \t System.out.println(i+\" resu=\" + result);\n// \t System.out.println(i+\" size=\" + result.length());\n// }\n \tSystem.out.println(UuidGenerator.getRandomPwd(8));\n }", "@Test\n\n public void update()\n {\n String str = \"abcdefg;\";\n System.out.printf(str);\n String s = str.substring(0,str.length()-1);\n System.out.printf(\" \"+s);\n }", "public static void print(String uniqueMark ,String id,String name ,double value ,byte[] statusAddition, int statusAdditionIndex ){\n\t}", "public String print();", "public String print(int format);", "public String toString() {\n\t\treturn(_device + \":\" + _mount + \":\" + _type);\n\t}", "public String print(){\n String printBuffer = trainingAmount + \"\\n\";\n for(int i = 0; i < trainingAmount; i++) {\n \tprintBuffer += \"('\" + myDOD_EDI_PI + \"',\";\n printBuffer += \"'\" + CIN[i] + \"',\";\n printBuffer += \"'\" + CDP[i] + \"',\";\n printBuffer += \"'\" + CLS_NUM[i] + \"',\";\n printBuffer += \"'\" + LOC_NM[i] + \"',\";\n printBuffer += \"'\" + CSE_LONG_TITLE[i] + \"',\";\n printBuffer += \"'\" + TRNG_DELIV_METH_CD[i] + \"',\";\n printBuffer += \"'\" + RCRD_SRC[i] + \"',\";\n printBuffer += \"'\" + COMPL_DT[i] + \"',\";\n printBuffer += \"'\" + SCORE[i] + \"',\";\n printBuffer += \"'\" + RCRD_IND[i] + \"',\";\n printBuffer += \"'\" + RETIRE_POINT[i] + \"',\";\n printBuffer += \"'\" + CSE_LEN[i] + \"',\";\n printBuffer += \"'\" + APPROX_TRNG_EQUIV_IND[i] + \"',\";\n printBuffer += \"'\" + NA_IND[i] + \"',\";\n printBuffer += \"'\" + SYS_LOAD_DT[i] + \"')\";\n printBuffer += \"\\n\";\n }\n return printBuffer;\n }", "public String toString() {\n \t\tStringBuffer retval = new StringBuffer();\r\n \t\tretval.append(address.toString());\r\n \t\tif ( parameters.size() != 0 ) retval.append(\";\").append(parameters.toString());\r\n \t\treturn retval.toString();\r\n \t}", "public String print() {\n\n String returnString = \"\";\n\n if (kv1 != null) {\n returnString += kv1.toString();\n }\n\n if (kv2 != null) {\n returnString += \" \" + kv2.toString();\n }\n\n return returnString;\n }", "public String toString() {\n/* 47 */ String retVal = \"id= \" + this.id + \", name= \" + this.name + \", buff= \" + this.buff;\n/* 48 */ return retVal;\n/* */ }", "public static void printVMinfo(VirtualMachine vm) throws IOException, InterruptedException{\n\t\t\t\n\t\t\t\tvm.getResourcePool();\n\t\t\t\tSystem.out.println(\"Hello \" + vm.getName());\n\t\t\t\tSystem.out.println(\"Status \" + vm.getGuestHeartbeatStatus());\n\t\t\t\tSystem.out.println(\"get ip \"+ vm.getSummary().getGuest().getIpAddress());\n\t\t\t\tSystem.out.println(\"get id \"+ vm.getSummary().getGuest().getGuestId());\n\t\t\t\tSystem.out.println(\"get toolstatus \"+ vm.getSummary().getGuest().toolsRunningStatus);\n\t\t\t\tSystem.out.println(\"get hostname \"+ vm.getSummary().getGuest().getHostName());\n\t\t\t\tSystem.out.println(\"GuestOS: \" + vm.getConfig().getGuestFullName());\n\t\t\t\tSystem.out.println(\"vm version: \" + vm.getConfig().version);\n\t\t\t\tSystem.out.println(\"meomery: \" + vm.getConfig().getHardware().memoryMB + \"MB\");\n\t\t\t\t//System.out.println(\"meomery overhead: \" + vm.getConfig().memoryAllocation.reservation.toString() + \"MB\");\n\t\t\t\tSystem.out.println(\"cpu: \" + vm.getConfig().getHardware().numCPU);\n\t\t\t\tSystem.out.println(\"Multiple snapshot supported: \" + vm.getCapability().isMultipleSnapshotsSupported());\n\t\t\t\tSystem.out.println(\"====================================================================\");\n\t\t\t}", "private static void prtln(String s) {\n\t\tif (debug) {\n\t\t\t// System.out.println(\"JloTester: \" + s);\n\t\t\tSystem.out.println(s);\n\t\t}\n\t}", "public void print(){\n String res = \"\" + this.number;\n for(Edge edge: edges){\n res += \" \" + edge.toString() + \" \";\n }\n System.out.println(res.trim());\n }", "public static void main(String[] args) {\n\t\tString uuid = UUID.randomUUID().toString();\r\n\t\tSystem.out.println(\"uuid = \" + uuid);\r\n\t}", "public static void printAddress(long addr){\n\t\tlong bitmask = (1L << 8) - 1;\n\t\tStringBuilder sb = new StringBuilder();\n\t\t//checks in blocks of 8 bits\n\t\tfor(int i = 0; i < 4; i++){\n\t\t\tlong part = addr & bitmask;\n\t\t\tsb.insert(0,part);\n\t\t\tsb.insert(0, \".\");\n\t\t\taddr >>= 8;\n\t\t}\n\t\t//can be optimized by storing everything in a buffer\n\t\t//and then printing at the end\n\t\tSystem.out.println(sb.substring(1));\n\t}", "void print(){\n\t\tSystem.out.println(\"[\"+x+\",\"+y+\"]\");\n\t}", "public String ServerToString(){\n return leftPad(itemId, 15) + leftPad(itemDescription, 30)\n + leftPad(unitPrice, 15) + leftPad(\"\" + inventory, 15);\n }", "public void dump()\n {\n System.out.println(toString());\n }", "@Test\n public void printResponse(){\n when().get(\"http:://34.223.219.142:1212/ords/hr/countries\")\n .body().prettyPrint();\n\n }", "public String toStringConsole() {\n\t\treturn \" SoilMoisture Sensor Read [ \" \n\t\t\t\t+ \"Temperature= \" + getTemperature() \n\t\t\t\t+ \"°C,\\t Lux= \" + getLux() \n\t\t\t\t+ \"%,\\t Moisture=\" + getMoisture() \n\t\t\t\t+ \"%,\\t Read Time= \" + readTime + \" ]\";\n\t}", "static void PrintVarValues(String s){\n System.out.println(s);\n }", "private static void print(String p) {\n\t\tSystem.out.println(PREFIX + p);\n\t}", "private void serverDisplay(String message)\n {\n String timeStamp = dateFormat.format(new Date()) + \" \" + message;\n System.out.println(timeStamp);\n }", "static void print (Object output){\r\n \t\tSystem.out.println(output);\r\n \t}" ]
[ "0.6018965", "0.5902846", "0.5893768", "0.57994586", "0.5782679", "0.56222814", "0.55560654", "0.5540888", "0.55245894", "0.5512845", "0.54982513", "0.54869175", "0.54852456", "0.5446627", "0.5442683", "0.54363215", "0.5430385", "0.5413143", "0.5411553", "0.5392056", "0.53908676", "0.5347946", "0.5347752", "0.5338364", "0.5335335", "0.5332559", "0.53014755", "0.5300974", "0.5291168", "0.52781576", "0.52760494", "0.5263605", "0.5248252", "0.5244584", "0.52441967", "0.5226223", "0.5218883", "0.5208627", "0.5206937", "0.5202283", "0.5196493", "0.5190155", "0.5184409", "0.51800096", "0.5176431", "0.51748544", "0.51690114", "0.5168728", "0.5164624", "0.5155993", "0.5155993", "0.5150336", "0.5149443", "0.51481044", "0.51461595", "0.51373035", "0.5135117", "0.51292664", "0.51283365", "0.51265234", "0.51239115", "0.51170903", "0.5115631", "0.51145846", "0.5112677", "0.5110121", "0.51074713", "0.5102778", "0.5099926", "0.50881505", "0.50794965", "0.50739956", "0.5073768", "0.50712246", "0.5066544", "0.50652355", "0.50595945", "0.5055704", "0.50448155", "0.50405836", "0.50405425", "0.5038744", "0.50386477", "0.50383884", "0.50331914", "0.5033072", "0.5030578", "0.5030234", "0.5030225", "0.50273883", "0.50249124", "0.5021816", "0.5020341", "0.50184387", "0.5017334", "0.50145787", "0.5013933", "0.5012565", "0.5009275", "0.5008165", "0.50075006" ]
0.0
-1
Abstract class for absolutely positioned panel
public UIAPanel(int width, int height, int left, int top) { this.width = width; this.height = height; this.left = left; this.top = top; this.setLayout(null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void buildPanelEast() {\n\r\n }", "public void showOPanel(Point p) {\r\n \r\n \t}", "public AWolgonPanel() {\n\n\t\tthis.setMinimumSize(Main.MIN_SIZE);\n\t\tthis.setFocusable(true);\n\t\tthis.setBackground(Color.DARK_GRAY);\n\n\t\t// this zone represents the entire panel\n\t\tnew Zone(this);\n\n\t\tthis.addMouseListener( new MouseAdapter() {\t\n\t\t\tpublic void mouseClicked(MouseEvent e) {\t\n\t\t\t\tif (hoveredOver != null) {\n\t\t\t\t\thoveredOver.runFunction();\n\t\t\t\t}\n\t\t\t}\t\t\n\t\t});\n\n\t\tthis.addMouseMotionListener( new MouseMotionListener() {\n\t\t\tpublic void mouseMoved(MouseEvent e) {\n\t\t\t\t// Optimize this more maybe\n\t\t\t\tfor (Label l : labels.values()) {\t\t\t\n\t\t\t\t\tif (l.contains(e.getPoint())) {\n\t\t\t\t\t\tif (l != hoveredOver) {\n\t\t\t\t\t\t\tif (hoveredOver != null) hoveredOver.unhover();\n\t\t\t\t\t\t\thoveredOver = l;\n\t\t\t\t\t\t\thoveredOver.hover();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if (l == hoveredOver) {\n\t\t\t\t\t\thoveredOver = null;\n\t\t\t\t\t\tl.unhover();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tpublic void mouseDragged(MouseEvent e) {\n\t\t\t\t//nothing\n\t\t\t}\n\t\t});\n\n\t\tthis.addComponentListener( new ComponentAdapter() { \t\n\t\t\tpublic void componentResized(ComponentEvent e) {\n\t\t\t\tsetResized(true);\n\t\t\t}\t\n\t\t});\t\n\t}", "public OverlayLayout() {}", "AreaResource panelArea();", "public abstract void createContents(Panel mainPanel);", "public VirtualPanel() {}", "JPanel getPanel();", "public TetrisEastPanel(final Timer theTimer) {\r\n super();\r\n setOpaque(true);\r\n setBackground(Color.BLUE);\r\n setVisible(true);\r\n setLayout(new BorderLayout());\r\n myNextPiece = new MyPreviewPiece();\r\n myScorePanel = new ScorePanel(theTimer);\r\n myControl = new Controls();\r\n setUp();\r\n\r\n\r\n\r\n }", "public interface ViewLayout {\r\n\r\n\t/** \r\n\t * Creates a reference to the view which layout should be calculated.\r\n\t * \r\n\t * @param view\r\n\t * \t\tthe view which layout should be calculated.\r\n\t */\r\n\tpublic void setView(View view);\r\n\t\r\n\t/**\r\n\t * Layouts the view components on the parent panel by assigning\r\n\t * them positions.\r\n\t * \r\n\t * @param parent\r\n\t * \t\tthe displaying parent container of the view\r\n\t */\r\n\tpublic void layoutContainer(Container parent);\r\n\r\n}", "protected abstract Widget instantiateFooterPanel () ;", "public BoardPanel() {\n\t\t\tfinal Dimension size = new Dimension(600, 600);\n\t\t\tsetSize(size);\n\t\t\tsetPreferredSize(size);\n\t\t\t\n\t\t\taddMouseListener(new ClickHandler());\n\t\t}", "private JPanel getBasePanel() {\r\n\t\tif (basePanel == null) {\r\n\t\t\tbasePanel = new JPanel();\r\n\t\t\tbasePanel.setLayout(new BorderLayout());\r\n\t\t\tbasePanel.setBounds(new Rectangle(1, 1, 352, 129));\r\n\t\t\tbasePanel.add(getToolsToolBar(), BorderLayout.NORTH);\r\n\t\t\tbasePanel.add(getTotalSplitPane(), BorderLayout.CENTER);\r\n\t\t}\r\n\t\treturn basePanel;\r\n\t}", "public JPanel getJPanel();", "public JPanel getJPanel();", "public interface IPanel {\n\n /**\n * update panel\n */\n void update();\n\n /**\n * draw panel\n */\n void draw();\n\n /**\n * remove panel\n */\n void remove();\n}", "@Override\n\tpublic JPanel obtenerPanel() {\n\t\treturn null;\n\t}", "@Override\n\tpublic JPanel obtenerPanel() {\n\t\treturn null;\n\t}", "public Panel() {\n }", "public void setupEast() {\r\n final JPanel eastPanel = new JPanel();\r\n eastPanel.setBackground(Color.BLACK);\r\n final Box eastBox = new Box(BoxLayout.PAGE_AXIS);\r\n myNextPiecePanel.setBackground(PANEL_COLOR);\r\n myNextPiecePanel.setBorder(BorderFactory.createLineBorder(Color.black));\r\n myNextPiecePanel.setPreferredSize(\r\n new Dimension(SUBPANEL_WIDTH * 2,\r\n SUBPANEL_WIDTH));\r\n eastBox.add(myNextPiecePanel);\r\n eastBox.add(Box.createVerticalStrut(PADDING * PADDING));\r\n myScorePanel.setBackground(Color.WHITE);\r\n myScorePanel.setBorder(BorderFactory.createLineBorder(Color.black));\r\n myScorePanel.setPreferredSize(new Dimension(SUBPANEL_WIDTH, SCORE_PANEL_HEIGHT));\r\n eastBox.add(myScorePanel);\r\n eastBox.add(Box.createVerticalStrut(PADDING));\r\n myInfoPanel.setBackground(Color.WHITE);\r\n myInfoPanel.setBorder(BorderFactory.createLineBorder(Color.black));\r\n myInfoPanel.setPreferredSize(new Dimension(SUBPANEL_WIDTH, INFO_PANEL_HEIGHT));\r\n eastBox.add(myInfoPanel);\r\n eastPanel.add(eastBox);\r\n myFrame.add(eastPanel, BorderLayout.EAST);\r\n }", "private JPanel createExitPanel() {\n JPanel panel = new JPanel();\n panel.setLayout(new MigLayout());\n panel.setPreferredSize(new Dimension(400, 50));\n panel.setOpaque(true);\n panel.setBorder(BorderFactory.createTitledBorder(\n localization.get(\"ExitsTitle\")));\n return panel;\n }", "public void testOnePanel() {\n\t\t// Instantiate nested panels\n\t\tRasterFileTestPlotPanel parent =\n\t\t\tnew RasterFileTestPlotPanel(TEST_DIR);\n\t\t\n\t\t// Add background widgets to panel such that\n\t\t// they are top aligned and non-overlapping\n\t\tparent.add(new Background(WIDTH, HEIGHT, COLOR_1), true);\n\t\tparent.add(new Background(WIDTH, HEIGHT, COLOR_2),\n\t\t\t\tHorizontalAlignment.RIGHT_OF,\n\t\t\t\tVerticalAlignment.TOP_JUSTIFIED);\n\t\t\n\t\t// Output graphics to file\n\t\tparent.toPngFile(\"one-panel.png\");\n\t}", "public void dibujar(JPanel panel);", "private void createPanelContent() {\n FragmentActivity activity = getActivity();\n if (this.mLayoutView == null) {\n activity.finish();\n }\n ViewGroup.LayoutParams layoutParams = this.mLayoutView.getLayoutParams();\n layoutParams.height = -2;\n this.mLayoutView.setLayoutParams(layoutParams);\n this.mPanelSlices = (RecyclerView) this.mLayoutView.findViewById(C0010R$id.panel_parent_layout);\n this.mSeeMoreButton = (TextView) this.mLayoutView.findViewById(C0010R$id.see_more);\n this.mDoneButton = (TextView) this.mLayoutView.findViewById(C0010R$id.done);\n this.mTitleView = (TextView) this.mLayoutView.findViewById(C0010R$id.panel_title);\n this.mPanelHeader = (LinearLayout) this.mLayoutView.findViewById(C0010R$id.panel_header);\n this.mTitleIcon = (ImageView) this.mLayoutView.findViewById(C0010R$id.title_icon);\n this.mHeaderTitle = (TextView) this.mLayoutView.findViewById(C0010R$id.header_title);\n this.mHeaderSubtitle = (TextView) this.mLayoutView.findViewById(C0010R$id.header_subtitle);\n this.mFooterDivider = this.mLayoutView.findViewById(C0010R$id.footer_divider);\n this.mPanelSlices.setVisibility(8);\n Bundle arguments = getArguments();\n String string = arguments.getString(\"PANEL_CALLING_PACKAGE_NAME\");\n PanelContent panel = FeatureFactory.getFactory(activity).getPanelFeatureProvider().getPanel(activity, arguments);\n this.mPanel = panel;\n if (panel == null) {\n activity.finish();\n }\n this.mPanel.registerCallback(new LocalPanelCallback());\n if (this.mPanel instanceof LifecycleObserver) {\n getLifecycle().addObserver((LifecycleObserver) this.mPanel);\n }\n this.mMetricsProvider = FeatureFactory.getFactory(activity).getMetricsFeatureProvider();\n this.mPanelSlices.setLayoutManager(new LinearLayoutManager(activity));\n this.mLayoutView.getViewTreeObserver().addOnPreDrawListener(this.mOnPreDrawListener);\n loadAllSlices();\n IconCompat icon = this.mPanel.getIcon();\n CharSequence title = this.mPanel.getTitle();\n if (icon == null) {\n this.mTitleView.setVisibility(0);\n this.mPanelHeader.setVisibility(8);\n this.mTitleView.setText(title);\n } else {\n this.mTitleView.setVisibility(8);\n this.mPanelHeader.setVisibility(0);\n this.mPanelHeader.setAccessibilityPaneTitle(title);\n this.mTitleIcon.setImageIcon(icon.toIcon(getContext()));\n this.mHeaderTitle.setText(title);\n this.mHeaderSubtitle.setText(this.mPanel.getSubTitle());\n if (this.mPanel.getHeaderIconIntent() != null) {\n this.mTitleIcon.setOnClickListener(getHeaderIconListener());\n this.mTitleIcon.setLayoutParams(new LinearLayout.LayoutParams(-2, -2));\n } else {\n int dimensionPixelSize = getResources().getDimensionPixelSize(C0007R$dimen.output_switcher_panel_icon_size);\n this.mTitleIcon.setLayoutParams(new LinearLayout.LayoutParams(dimensionPixelSize, dimensionPixelSize));\n }\n }\n if (this.mPanel.getViewType() == 2) {\n this.mFooterDivider.setVisibility(0);\n } else {\n this.mFooterDivider.setVisibility(8);\n }\n this.mSeeMoreButton.setOnClickListener(getSeeMoreListener());\n this.mDoneButton.setOnClickListener(getCloseListener());\n if (this.mPanel.isCustomizedButtonUsed()) {\n CharSequence customizedButtonTitle = this.mPanel.getCustomizedButtonTitle();\n if (TextUtils.isEmpty(customizedButtonTitle)) {\n this.mSeeMoreButton.setVisibility(8);\n } else {\n this.mSeeMoreButton.setVisibility(0);\n this.mSeeMoreButton.setText(customizedButtonTitle);\n }\n } else if (this.mPanel.getSeeMoreIntent() == null) {\n this.mSeeMoreButton.setVisibility(8);\n }\n this.mMetricsProvider.action(0, 1, this.mPanel.getMetricsCategory(), string, 0);\n }", "@Override\n\tpublic JPanel getPanel()\n\t{\n\t\treturn panel;\n\t}", "public MainPanel()\n\t{\n\t\tsuper();\n\t\t\n\t\tthis.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); \n\t\t_brickbackground = new ImageIcon(\"brickbackground.jpg\").getImage();\n\t\t\n \n\t\t_paddle2 = new PaddleShape();\n\t\t_paddle1 = new PaddleShape();\n \n\t\n\t\t \n\t\t\n\t\t\n\t\tHolder _holder = new Holder(BrickPanel);\n\t\t\n\t\tBrickPanel = new BrickPanel(_holder, _paddle1, _paddle2, controlPanel, this);\n\t\t\n\t\tMainMenu = new MainMenu(this);\n\t\tMainMenu.setLayout(new BoxLayout(MainMenu, BoxLayout.Y_AXIS));\n\t\tMainMenu.setPreferredSize(new Dimension(800, 450));\n\t\tMainMenu.setMaximumSize(new Dimension(800, 450));\n\t\t\n\t\tcontrolPanel = new ControlPanel(BrickPanel, this, _holder, _paddle1, _paddle2, MainMenu);\n\t\tcontrolPanel.setLayout(new GridLayout(1,5));\n\t\tcontrolPanel.setPreferredSize(new Dimension(800, 65));\n\t\tcontrolPanel.setMaximumSize(new Dimension(800, 65));\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tthis.add(BrickPanel); \n\t\tthis.add(controlPanel); \n\t\tthis.add(MainMenu);\n\t\t\n\t\tcontrolPanel.setVisible(false);\n\t\tBrickPanel.setVisible(false);\n\t\tMainMenu.setVisible(true);\n\t\tMyClickListener listener = new MyClickListener(this, BrickPanel, _holder);\n\t\tthis.addMouseListener(listener);\n this.addMouseMotionListener(listener);\n this.addKeyListener(listener);\n\t\tthis.setFocusable(true);\n\t\t\n\t\t//create a button instead of the play rectangle !!!!!!!!!!!!!!!!\n\t\t\n\t\t\n\t\t\n\t}", "IOverlayStyle location(int leftX, int rightX, int topY, int bottomY);", "public JComponent getComponent() { return _panel; }", "public BubblePanel()\n\t{\n\t\t// Set the layout to be border-style\n\t\tsuper( new BorderLayout());\n\t\t// Create panel defaults\n\t\tinitPanel();\n\t}", "public JavaPanel() {\n\t\tsuper();\n\t}", "@Override\npublic JPanel getSpecificPanel() {\n\treturn null;\n}", "public AbstractREPLPanel() {\r\n\t\tsuper(new BorderLayout());\r\n\r\n\t\tloadArea();\r\n\t\tstyles = StyleSettings.getInstance(area);\r\n\t}", "public interface IPanels {\n\n /**\n * Instantiate each component in the class\n */\n void instantiateComponents();\n\n /**\n * Add the components to the Panel in the correct order\n */\n void addComponents();\n}", "@Override\r\n public void setup(Panel panel) {\n }", "private JPanel getAnalyzaPanel() {\n\t\tif (analyzaPanel == null) {\n\t\t\tucivoText = new JLabel();\n\t\t\tucivoText.setBounds(new Rectangle(128, 61, 299, 15));\n\t\t\tucivoText.setText(\"\");\n\t\t\tucivoText.setHorizontalAlignment(SwingConstants.CENTER);\n\t\t\tanalyzaPanel = new JPanel();\n\t\t\tanalyzaPanel.setLayout(null);\n\t\t\tanalyzaPanel.setVisible(false);\n\t\t\tanalyzaPanel.setBounds(new Rectangle(12, 7, 523, 420));\n\t\t\tanalyzaPanel.add(getZahrajTlacitko(), null);\n\t\t\tanalyzaPanel.add(getAnalyzujTlacitko(), null);\n\t\t\tanalyzaPanel.add(getVstupText(), null);\n\t\t\tanalyzaPanel.add(getLogList(), null);\n\t\t\tanalyzaPanel.add(getPotvrdTlacitko(), null);\n\t\t\tanalyzaPanel.add(getAnalyzaScroll(), null);\n\t\t\tanalyzaPanel.add(suzvukText, null);\n\t\t\tanalyzaPanel.add(getDalejTlacitko(), null);\n\t\t\tanalyzaPanel.add(cvicenieText, null);\n\t\t\tanalyzaPanel.add(ucivoText, null);\n\t\t}\n\t\treturn analyzaPanel;\n\t}", "public Panel()\n/* */ {\n/* 56 */ this(new FlowLayout());\n/* */ }", "public MyPanel(int x,int y,int width,int height){\r\n\t\tsetBounds(x,y,width,height);}", "@Override protected JComponent setupPanel()\t{ return null; }", "public ElementPanel(final Elements allElements) {\r\n\t\tsuper();\r\n\t\telements = allElements;\r\n\t\tmodificationListeners = new ArrayList<ElementModificationListener>(2);\r\n\t\tvectorListeners = new ArrayList<VectorDisplayListener>(2);\t\t\r\n\t\tsetLayout(new BoxLayout(this, BoxLayout.Y_AXIS));\r\n\t\tsetAlignmentX(CENTER_ALIGNMENT);\r\n\t\tsetAlignmentY(TOP_ALIGNMENT);\r\n\t\tJPanel views = new JPanel();\r\n\t\tviews.setLayout(new BoxLayout(views, BoxLayout.X_AXIS));\r\n\t\tzoomView = new ZoomView();\r\n\t\tviews.add(zoomView);\r\n\t\telementView = new ElementView(this);\r\n\t\tviews.add(elementView);\r\n\t\tvectorListeners.add(elementView);\r\n\t\tadd(views);\r\n\r\n\t\tviews = new JPanel();\r\n\t\tviews.setLayout(new BoxLayout(views, BoxLayout.X_AXIS));\r\n\t\tviews.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));\r\n\r\n\t\tactionsView = new ActionsView(this);\r\n\t\tviews.add(actionsView);\r\n\t\toptionsView = new OptionsView(this);\r\n\t\tviews.add(optionsView);\r\n\t\tviews.add(Box.createHorizontalStrut(32));\r\n\t\t\r\n\t\tadd(views);\r\n\t}", "public interface ScrollPanel<T> {\n /**\n * Moves the viewport so that {@code location} is at the viewport top.\n *\n * @param location content-space location to appear at the top of the\n * viewport.\n */\n void moveTo(double location);\n\n /** @return the viewport extent of this scroller. */\n Extent getViewport();\n\n /** @return the content extent of this scroller. */\n Extent getContent();\n\n /** @return the extent of a view within this panel. */\n Extent extentOf(T view);\n\n}", "@Override\n public void setupPanel()\n {\n\n }", "public abstract void init(JPanel panel);", "private void createOCPanel() {\n\n // this.createPanel(); <--- will be called via our constructor -> super ->\n // createPanel()\n\n GridBagLayout gridbag = (GridBagLayout) this.getLayout();\n GridBagConstraints constraints = new GridBagConstraints();\n constraints.anchor = GridBagConstraints.WEST;\n // this.setLayout(gridbag); <-- already set by super class\n\n ConstraintsBuilder.buildConstraints(constraints, 0, 7, 1, 1, 5, 10);\n OMLabel LunusualShape = new OMLabel(this.bundle.getString(\"panel.findingOC.label.unusualShape\"), false);\n LunusualShape.setToolTipText(this.bundle.getString(\"panel.findingOC.tooltip.unusualShape\"));\n gridbag.setConstraints(LunusualShape, constraints);\n this.add(LunusualShape);\n ConstraintsBuilder.buildConstraints(constraints, 1, 7, 2, 1, 45, 10);\n this.unusualShape = new TristateCheckbox();\n this.unusualShape.setToolTipText(this.bundle.getString(\"panel.findingOC.tooltip.unusualShape\"));\n constraints.fill = GridBagConstraints.BOTH;\n gridbag.setConstraints(this.unusualShape, constraints);\n this.add(this.unusualShape);\n\n ConstraintsBuilder.buildConstraints(constraints, 0, 8, 1, 1, 5, 10);\n OMLabel LpartlyUnresolved = new OMLabel(this.bundle.getString(\"panel.findingOC.label.partlyUnresolved\"), false);\n LpartlyUnresolved.setToolTipText(this.bundle.getString(\"panel.findingOC.tooltip.partlyUnresolved\"));\n gridbag.setConstraints(LpartlyUnresolved, constraints);\n this.add(LpartlyUnresolved);\n ConstraintsBuilder.buildConstraints(constraints, 1, 8, 2, 1, 45, 10);\n this.partlyUnresolved = new TristateCheckbox();\n this.partlyUnresolved.setToolTipText(this.bundle.getString(\"panel.findingOC.tooltip.partlyUnresolved\"));\n constraints.fill = GridBagConstraints.BOTH;\n gridbag.setConstraints(this.partlyUnresolved, constraints);\n this.add(this.partlyUnresolved);\n\n ConstraintsBuilder.buildConstraints(constraints, 0, 9, 1, 1, 5, 10);\n OMLabel LcolorContrasts = new OMLabel(this.bundle.getString(\"panel.findingOC.label.colorContrasts\"), false);\n LcolorContrasts.setToolTipText(this.bundle.getString(\"panel.findingOC.tooltip.colorContrasts\"));\n gridbag.setConstraints(LcolorContrasts, constraints);\n this.add(LcolorContrasts);\n ConstraintsBuilder.buildConstraints(constraints, 1, 9, 2, 1, 45, 10);\n this.colorContrasts = new TristateCheckbox();\n this.colorContrasts.setToolTipText(this.bundle.getString(\"panel.findingOC.tooltip.colorContrasts\"));\n constraints.fill = GridBagConstraints.BOTH;\n gridbag.setConstraints(this.colorContrasts, constraints);\n this.add(this.colorContrasts);\n\n ConstraintsBuilder.buildConstraints(constraints, 3, 7, 1, 1, 5, 10);\n OMLabel Lcharacter = new OMLabel(this.bundle.getString(\"panel.findingOC.label.character\"), false);\n Lcharacter.setToolTipText(this.bundle.getString(\"panel.findingOC.tooltip.character\"));\n constraints.anchor = GridBagConstraints.SOUTHWEST;\n constraints.fill = GridBagConstraints.HORIZONTAL;\n gridbag.setConstraints(Lcharacter, constraints);\n this.add(Lcharacter);\n ConstraintsBuilder.buildConstraints(constraints, 3, 8, 1, 2, 45, 10);\n this.characterButton = new JButton();\n this.characterButton.addActionListener(this);\n if ((this.finding != null) && (((DeepSkyFindingOC) this.finding).getCharacter() != null)) {\n Character c = ((DeepSkyFindingOC) this.finding).getCharacter();\n Image image = Toolkit.getDefaultToolkit().getImage(this.imagePath + Character.toLowerCase(c) + \".png\");\n image = image.getScaledInstance(90, 90, Image.SCALE_FAST);\n ImageIcon icon = new ImageIcon(image);\n this.characterButton.setIcon(icon);\n this.characterButton.setDisabledIcon(icon);\n this.characterButton.setText(\" \" + ((DeepSkyFindingOC) this.finding).getCharacter() + \" \");\n this.characterButton.setToolTipText(this.bundle.getString(\"dialog.oc.trait.explanation.\"\n + ((DeepSkyFindingOC) this.finding).getCharacter().toString().toLowerCase()));\n } else {\n this.characterButton.setText(this.bundle.getString(\"panel.findingOC.button.character\"));\n this.characterButton.setToolTipText(this.bundle.getString(\"panel.findingOC.tooltip.character\"));\n }\n constraints.fill = GridBagConstraints.BOTH;\n gridbag.setConstraints(this.characterButton, constraints);\n this.add(this.characterButton);\n\n ConstraintsBuilder.buildConstraints(constraints, 0, 10, 4, 1, 50, 60);\n constraints.fill = GridBagConstraints.BOTH;\n JLabel Lfill = new JLabel(\"\");\n gridbag.setConstraints(Lfill, constraints);\n this.add(Lfill);\n\n }", "public Panel(LayoutManager paramLayoutManager)\n/* */ {\n/* 65 */ setLayout(paramLayoutManager);\n/* */ }", "public AntelopePanel() {\n this( null, null, true );\n }", "public static JPanel newPanel() {\n\t\treturn null;\n\t}", "private JPanel createCanvas() {\n return new JPanel() {\n\n @Override\n protected void paintComponent(Graphics g) {\n super.paintComponent(g);\n element.drawMe((Graphics2D) g);\n }\n\n };\n }", "public Parent creatPanel() {\r\n\t\t\r\n\t\thlavniPanel = new BorderPane();\r\n\t\thlavniPanel.setCenter(creatGameDesk());\r\n\t\thlavniPanel.setTop(createMenuBar());\r\n\t\t\r\n\t\thlavniPanel.setBackground(new Background(new BackgroundFill(Color.BURLYWOOD, CornerRadii.EMPTY, Insets.EMPTY)));\r\n\t\thlavniPanel.setPadding(new Insets(8));\r\n\t\treturn hlavniPanel;\r\n\t}", "public interface IDrawingPanel {\n /**\n * This function could draw shapes on panel.\n *\n * @param shape the shape object to be drawn on the panel.\n */\n void draw(IViewShapes shape);\n\n}", "public JPanel menuPanel() {\n\t\tJPanel mpanel = new JPanel(null);\n\t\tmpanel.setBounds(0, 100, 700, 300);\n\t\tmpanel.setBackground(Color.PINK);\n\t\tFont lblfont = new Font(\"SansSerif\", Font.BOLD, 30);\n\t\t\n\t\tworkerBtn = new JButton(workerpic);\n\t\tvisitorBtn = new JButton(visitorpic);\n\t\tworkerBtn.addActionListener(this);\n\t\tvisitorBtn.addActionListener(this);\n\t\tvisitorBtn.setBounds(100, 50, 150, 200);\n\t\tworkerBtn.setBounds(450, 50, 150, 200);\n\t\t\n\t\tlblworker.setBounds(450, 0, 150, 50);\n\t\tlblvisitor.setBounds(100, 0, 150, 50);\n\t\tlblworker.setHorizontalAlignment(JLabel.CENTER);\n\t\tlblvisitor.setHorizontalAlignment(JLabel.CENTER);\n\t\tlblworker.setFont(lblfont);\n\t\tlblvisitor.setFont(lblfont);\n\t\tmpanel.add(lblworker);\n\t\tmpanel.add(lblvisitor);\n\t\tmpanel.add(visitorBtn);\n\t\tmpanel.add(workerBtn);\n\t\treturn mpanel;\n\t}", "public AfterMarketPanel(Gui gui)throws ImageNotFound {\n super();\n this.setLayout(new BoxLayout(this,BoxLayout.X_AXIS));\n this.setOpaque(false);\n this.add(Box.createRigidArea(new Dimension(150,0)));\n this.gui=gui;\n\n received=new JPanel();\n received.setOpaque(true);\n received.setBackground(new Color(240, 198, 125));\n received.setBorder(new LineBorder(new Color(241, 153, 0), 1));\n received.setLayout(new BoxLayout(received,BoxLayout.Y_AXIS));\n\n this.add(received);\n this.add(Box.createRigidArea(new Dimension(500,0)));\n\n this.add(Box.createRigidArea(new Dimension(50,0)));\n }", "public MyPanel(Color farba) {\r\n this.setBackground(farba);\r\n this.setPreferredSize(new Dimension(40, 200));\r\n }", "@Override\n\tpublic void Update(JPanel panel) {\n\t\t\n\t}", "public CanvasPanel() {\n\t \t\taddMouseListener(this);\n\t \t\taddMouseMotionListener(this);\n\t }", "public PaneElementImpl() {\n }", "public JPanel createPanel() {\n\t\t\r\n\t\tJPanel mainPanel = new JPanel();\r\n\t\tmainPanel.setLayout(new BoxLayout(mainPanel, BoxLayout.Y_AXIS));\r\n\t\tmainPanel.setBackground(Color.WHITE);\r\n\t\tmainPanel.setBorder(new CompoundBorder(\r\n\t\t\t\tBorderFactory.createLineBorder(new Color(0x3B70A3), 4),\r\n\t\t\t\tnew EmptyBorder(10, 20, 10, 20)));\r\n\r\n\t\t/*\r\n\t\t * Instruction\r\n\t\t */\t\r\n\t\tmainPanel.add(instructionPanel());\r\n\t\t\r\n\t\t\r\n\t\t// TODO: set task order for each group - make first 3 tasks = groups tasks\r\n\t\tmainPanel.add(messagesPanel());\r\n\t\tmainPanel.add(Box.createRigidArea(new Dimension(this.getWidth(), 5)));\r\n\r\n\t\tmainPanel.add(phonePanel());\r\n\t\tmainPanel.add(Box.createRigidArea(new Dimension(this.getWidth(), 5)));\r\n\r\n\t\tmainPanel.add(clockPanel());\r\n\t\tmainPanel.add(Box.createRigidArea(new Dimension(this.getWidth(), 5)));\r\n\r\n\t\tmainPanel.add(cameraPanel());\r\n\t\tmainPanel.add(Box.createRigidArea(new Dimension(this.getWidth(), 5)));\t\r\n\r\n\t\tmainPanel.add(contactPanel());\r\n\t\tmainPanel.add(Box.createRigidArea(new Dimension(this.getWidth(), 5)));\r\n\r\n\t\tmainPanel.add(galleryPanel());\r\n\t\t\r\n\t\treturn mainPanel;\r\n\t}", "public SnowmanPanel()\n {\n setPreferredSize(new Dimension(300,225));\n setBackground(Color.cyan);\n }", "public RepalyPanel() {\n\t\t\ttry {\n//\t\t\t\tthis.addMouseListener(new MouseAdapter() {\n//\t\t\t\t\t@Override\n//\t\t\t\t\tpublic void mouseClicked(MouseEvent e) {\n//\t\t\t\t\t\tSystem.out.println(e.getX() + \" \" + e.getY());\n//\t\t\t\t\t}\n//\t\t\t\t});\n\n\t\t\t\tsetLayout(null);\n\n\t\t\t\t// 退出按键\n\t\t\t\tjbRestart = MyButton.makeButton(restart, restart_down,\n\t\t\t\t\t\trestart_hover);\n\t\t\t\tadd(jbRestart);\n\t\t\t\tjbRestart.setBounds(540, 355, 140, 56);\n\t\t\t\tjbRestart.addActionListener(this);\n\n\t\t\t\t// 确认退出按键\n\t\t\t\tjbContinue = MyButton.makeButton(continue_pic, continue_down,\n\t\t\t\t\t\tcontinue_hover);\n\t\t\t\tadd(jbContinue);\n\t\t\t\tjbContinue.setBounds(345, 355, 140, 56);\n\t\t\t\tjbContinue.addActionListener(this);\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}", "public abstract JComponent getComponent();", "public TestSlideFrame() {\r\n initComponents();\r\n slide = new JFrame();\r\n slide.setUndecorated(true);\r\n //slide.setAlwaysOnTop(true);\r\n panel = new JPanel();\r\n panel.setLayout(null);\r\n slide.setLayout(null);\r\n panel.setBorder(BorderFactory.createLineBorder(Color.GRAY));\r\n panel.setLocation(0, 0);\r\n panel.setSize(100, 200);\r\n slide.add(panel);\r\n\r\n slide.setSize(1, 1);\r\n slide.setVisible(true);\r\n extended = false;\r\n }", "public SelectionPanel(){\n\t\tthis.setHbarPolicy(ScrollBarPolicy.ALWAYS);\n\t\tthis.setVbarPolicy(ScrollBarPolicy.NEVER);\n\t\tsetButton();\n\t\tthis.setContent(container);\n\t\tthis.setPrefHeight(65);\n\t\tthis.setPrefWidth(700);\n\t\tcontainer.setVisible(false);\n\t}", "@Override\n public void onPanelSlide(View panel, float slideOffset) {\n }", "public ExamplePanel (){\n initWidget(uiBinder.createAndBindUi(this));\n setWidgetToMaxWidthAndHeight();\n Window.addResizeHandler(resizeHandler);\n introPanel = new IntroPanel();\n setWidgetAsExample(introPanel);\n }", "private org.gwtbootstrap3.client.ui.Panel get_f_Panel16() {\n return build_f_Panel16();\n }", "private ApplyPanel(EditablePanel mainPanel) {\r\n this.mainPanel = mainPanel;\r\n masterLayout();\r\n }", "private void configurePanel(ContentPanel panel){\r\n\t\t\t\tpanel.setSize(325, 185);\t\t\t\t\r\n\t\t\t\tpanel.setHeaderVisible(false);\r\n\t\t\t\tpanel.setBodyStyle(\"padding:7px\");\r\n\t\t\t\tpanel.setScrollMode(Scroll.AUTOY);\r\n\t\t\t\tpanel.setStyleAttribute(\"marginTop\", \"15px\");\r\n\t\t\t}", "public AbstractPanel(final int id) {\n this.id = id;\n }", "public ChannelPanel(boolean hasAlpha) {\n\t\tthis.hasAlpha = hasAlpha;\n\t\t\n\t\tint boxCount = hasAlpha ? 4:3;\t\t\n\t\t\n\t\tboxList = new ChannelPanelBox[boxCount];\n\t\n\t\tfor (int i = 0; i < boxCount; i++) {\n\t\t\tboxList[i] = new ChannelPanelBox(i, hasAlpha);\n\t\t}\n\t\t\n\t\tmoveBox = new ChannelPanelBox(4, hasAlpha);\n\t\t\n\t\tsetPreferredSize(new Dimension(50 * boxCount, 50));\n\t\t\n\t\tChannelPanelListener listener = new ChannelPanelListener();\n\t\taddMouseListener(listener);\n\t\taddMouseMotionListener(listener);\n\t\t\n\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));\n\t}", "public RoundPanelOJ() {\n initComponents();\n setOpaque(false);\n }", "private Panel buildPanelImg() {\n\t\tpanelImg = new Panel();\r\n\t\tpanelImg.setImmediate(false);\r\n\t\tpanelImg.setWidth(\"-1px\");\r\n\t\tpanelImg.setHeight(\"-1px\");\r\n\t\t\r\n\t\t// gridImg\r\n\t\tgridImg = new HorizontalLayout();\r\n\t\tgridImg.setImmediate(false);\r\n\t\tgridImg.setWidth(\"128px\");\r\n\t\tgridImg.setHeight(\"128px\");\r\n\t\tgridImg.setMargin(false);\r\n\t\tpanelImg.setContent(gridImg);\r\n\t\t\r\n\t\treturn panelImg;\r\n\t}", "public AerithPanelPainter() {\n super();\n setUseCache(false);\n setAntialiasing(RenderingHints.VALUE_ANTIALIAS_ON);\n }", "private void constructAnimationPanel() {\n animationPanel = new EAPanel(model);\n animationPanel.setLayout(new FlowLayout());\n animationPanel.setPreferredSize(new Dimension(model.getWidth(), model.getHeight()));\n mainPanel.add(animationPanel);\n }", "public ExamplePanel() {\n\t\tinitWidget(uiBinder.createAndBindUi(this));\n\t\tsetWidgetToMaxWidthAndHeight();\n\t\tWindow.addResizeHandler(resizeHandler);\n\t\tintroPanel = new IntroPanel();\n\t\tsetWidgetAsExample(introPanel);\n\t}", "public JPanel getPanel(){\n return panel;\n }", "public PanelMethodSEDN(){}", "private void initPanel() {\n\t\tthis.panel = new JPanel();\n\t\tthis.panel.setBounds(5, 5, 130, 20);\n\t\tthis.panel.setLayout(null); \n\n\t}", "private void createDisplayEditOverlay() {\n\t}", "public Component makeUpperPanel() {\n JPanel upperPanel = new JPanel();\n upperPanel.setLayout(new BorderLayout());\n upperPanel.setBackground(myColor);\n upperPanel.setPreferredSize(new Dimension(800, 150));\n\n makeTitle(upperPanel);\n\n return upperPanel;\n }", "public MyPanel(int sizeA, int sizeB, Color farba) {\r\n this.setBackground(farba); //toto je farba panelu:\r\n this.setPreferredSize(new Dimension(sizeA, sizeB));\r\n }", "private Component getPanelOpcionesSuperior() {\n\t\tJPanel panel = new JPanel(new BorderLayout());\n\t\tArrayList<String> ops = new ArrayList<String>();\n\t\tops.add(\" Numero de empresas\");\n\t\tops.add(\"Tiempo de fluctuacion\");\n\t\tops.add(\"Fichero de empresas\");\n\t\tops.add(\"Fichero de usuarios\");\n\t\tops.add(\"Tick\");\n\t\t//ops.add(\"Sesión continua\");\n\n\t\tArrayList<String> chooser = new ArrayList<String>();\n\t\tchooser.add(\"Fichero de empresas\");\n\t\tchooser.add(\"Fichero de usuarios\");\n\n\t\topciones = new PanelOpciones(ops, null, chooser);\n\t\t//opciones.setCheckBox(\"Sesión continua\");\n\n\t\tpanel.add(opciones, BorderLayout.NORTH);\n\t\tJPanel panelBlanco = new JPanel();\n\t\tpanelBlanco.setPreferredSize(new Dimension(350, 300));\n\t\tpanel.add(panelBlanco);\n\n\t\treturn panel;\n\t}", "public void setPanel(JPanel ballPanel);", "public CreateNewEventJPanel() {\n }", "@Override\n public UIPanel getParentPanel() {\n return parentPanel;\n }", "private void setPanel()\r\n\t{\r\n\t\tpanel = new JPanel();\r\n\t\tpanel.setLayout(new GridLayout(5, 2));\r\n\t\t\r\n\t\tpanel.add(bubbleL);\r\n\t\tpanel.add(bubblePB);\r\n\t\t\r\n\t\tpanel.add(insertionL);\r\n\t\tpanel.add(insertionPB);\r\n\t\t\r\n\t\tpanel.add(mergeL);\r\n\t\tpanel.add(mergePB);\r\n\t\t\r\n\t\tpanel.add(quickL);\r\n\t\tpanel.add(quickPB);\r\n\t\t\r\n\t\tpanel.add(radixL);\r\n\t\tpanel.add(radixPB);\r\n\t}", "SortAnimationPanel()\n {\n super(); // calling super class constructor\n super.setPreferredSize(new Dimension(400,400));\n super.setVisible(true);\n }", "public LocalPanel() {\r\n\t\tinitComponents();\r\n\t}", "public Zone(AWolgonPanel panel) {\n\t\tthis.parent = null;\n\t\tthis.panel = panel;\n\t\tthis.panel.addZone(\"WHOLE\", this);\n\t}", "PositionEffect getPositionEffect();", "public void setupPanel() {\n\t\tpanel = new JPanel();\n\t\tpanel.setLayout(new ModifiedFlowLayout(FlowLayout.LEFT));\n\t\tpanel.setBackground(Color.BLACK);\n\t\tpanel.setOpaque(true);\n\t}", "public DemoPanel() {\n }", "public ViewPanel(final ViewFrame viewFrame) {\n\t\tthis.setViewFrame(viewFrame);\n\t\tviewFrame.getModel().getObservable().addObserver(this);\n\t\t//this.setSize(640,384);\n\t\t/*JLabel image = new JLabel( new ImageIcon( \"C:/Users/Drazyl Dul/Desktop/sprite/pd.png\"));\n\t\tJLabel image2 = new JLabel( new ImageIcon( \"C:/Users/Drazyl Dul/Desktop/sprite/purse.png\"));\n\t\tJLabel image3 = new JLabel( new ImageIcon( \"C:/Users/Drazyl Dul/Desktop/sprite/gate_open.png\"));\n\t\tBorder blackline = BorderFactory.createLineBorder(Color.black,1); \n\t\t\n\t\tthis.setLayout(new GridLayout(12,20));\n\t\tfor(int i = 0; i<240;i++){*/\n\t\t //JPanel ptest = new JPanel();\n\t\t //ptest.setBorder(blackline);\n\t\t //this.add(image,0,0);\n\t\t \n\t\t// this.add(image3,0,2);\n\t\t\n\t\t}", "public final Panel getPanel()\r\n\t{\r\n\t\treturn panel;\r\n\t}", "protected ImagePanel() {\n pictureBox = new AWTPictureBox(getWidth(), getHeight());\n //add(pictureBox);\n }", "private void buildPanel()\n {\n setLayout(new BorderLayout());\n JLabel instr = new JLabel(TOP_HELP);\n instr.setToolTipText(POPUP_HELP);\n add(instr, BorderLayout.NORTH);\n\n final JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);\n splitPane.setContinuousLayout(true);\n splitPane.setResizeWeight(.9);\n splitPane.setOneTouchExpandable(true);\n\n mMazeView.setMinimumSize(new Dimension(400, 200));\n splitPane.setLeftComponent(mMazeView);\n mMazeView.setModel(null);\n\n this.mOpenMazes = new MazeList(this.mMazeView);\n this.mOpenMazes.setMinimumSize(new Dimension(160, 0));\n JPanel rightPanel = new JPanel();\n rightPanel.setLayout(new BorderLayout());\n rightPanel.add(this.mOpenMazes, BorderLayout.CENTER);\n\n final JPanel rightPanelButtons = new JPanel(new BorderLayout());\n rightPanelButtons.add(makeNewMazeButton(), BorderLayout.NORTH);\n rightPanelButtons.add(makeRandomMazeButton(), BorderLayout.SOUTH);\n\n rightPanel.add(rightPanelButtons, BorderLayout.SOUTH);\n splitPane.setRightComponent(rightPanel);\n\n add(splitPane, BorderLayout.CENTER);\n splitPane.setDividerLocation(.8);\n\n addComponentListener(new ComponentAdapter()\n {\n boolean notShown = true;\n\n @Override\n public void componentShown(ComponentEvent e)\n {\n if (notShown)\n {\n splitPane.setDividerLocation(.8);\n notShown = false;\n }\n }\n });\n\n JToolBar tBar = new JToolBar();\n tBar.setOrientation(JToolBar.VERTICAL);\n tBar.setFloatable(false);\n ButtonGroup bg = new ButtonGroup();\n\n ImageIcon scaled = new ImageIcon(mPointIcon.getImage().getScaledInstance(40, 40, 0));\n JToggleButton tb = new JToggleButton(scaled);\n tb.setToolTipText(\"No Template\");\n tb.addActionListener(new TemplateActionListener(null));\n bg.add(tb);\n bg.setSelected(tb.getModel(), true);\n tBar.add(tb);\n\n for (MazeTemplate mt : mTemplates)\n {\n Image iconImage = mt.getTemplateIcon().getImage();\n scaled = new ImageIcon(iconImage.getScaledInstance(40, 40, 0));\n tb = new JToggleButton(scaled);\n tb.addActionListener(new TemplateActionListener(mt));\n tb.setToolTipText(mt.getTemplateDescription());\n bg.add(tb);\n tBar.add(tb);\n }\n\n add(tBar, BorderLayout.WEST);\n\n //Add an action for the 'r' key to change the template to the next orientation.\n this.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(KeyStroke.getKeyStroke('r'),\n NEXT_ORIENTATION_ACTION_KEY);\n this.getActionMap().put(NEXT_ORIENTATION_ACTION_KEY, new AbstractAction()\n {\n @Override\n public void actionPerformed(ActionEvent e)\n {\n if (mCurrentTemplate != null)\n {\n mCurrentTemplate.nextOrientation();\n mMazeView.repaint();\n }\n }\n });\n\n mMouseAdapter = new TemplateMouseAdapter();\n\n mMazeView.addMouseListener(mMouseAdapter);\n mMazeView.addMouseMotionListener(mMouseAdapter);\n mMazeView.addMouseWheelListener(mMouseAdapter);\n }", "public void initPanel()\n\t{\n\t\tthis.setVisible(false);\n\t\t//this.setLayout(new BorderLayout());\n \n\t\t//*Layout setup\n\t\t\n\t\tGroupLayout layout = new GroupLayout(this);\n\t\t//this.setLayout(layout);\n\n\t\tlayout.setAutoCreateGaps(true);\n\t\tlayout.setAutoCreateContainerGaps(true);\t\t\n\t\t\t\t\n\t\t//frame = new JFrame();\n offscreenImage = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);\n onscreenImage = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);\n offscreen = offscreenImage.createGraphics();\n onscreen = onscreenImage.createGraphics();\n setXscale();\n setXscale();\n offscreen.setColor(DEFAULT_CLEAR_COLOR);\n offscreen.fillRect(0, 0, width, height);\n setPenColor();\n setPenRadius();\n setFont();\n clear();\n\n // add antialiasing\n RenderingHints hints = new RenderingHints(RenderingHints.KEY_ANTIALIASING,\n RenderingHints.VALUE_ANTIALIAS_ON);\n hints.put(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);\n offscreen.addRenderingHints(hints);\n\n \n // frame stuff\n ImageIcon icon = new ImageIcon(onscreenImage);\n drawLabel = new JLabel(icon);\n\n drawLabel.addMouseListener(this);\n drawLabel.addMouseMotionListener(this);\n \n //Create buttons\n resetButton = new JButton();\n undoButton = new JButton();\n \n undoButton.setVisible(true);\n undoButton.setEnabled(true);\n undoButton.setName(\"Undo\");\n undoButton.setText(\"Undo\");\n undoButton.setSize(75, 30);\n undoButton.setPreferredSize(new Dimension(75,30));\n \n resetButton.setVisible(true);\n resetButton.setEnabled(true);\n resetButton.setName(\"Reset\");\n resetButton.setText(\"Reset\");\n \tresetButton.setSize(75, 30);\n \tresetButton.setPreferredSize(new Dimension(75,30));\n \t\n //this.add(resetButton, BorderLayout.NORTH);\n //this.add(undoButton, BorderLayout.NORTH);\n \n // JPanel mainPanel = new JPanel(new BorderLayout());\n\n // JPanel northPanel = new JPanel();\n // northPanel.add(resetButton);\n // northPanel.add(undoButton);\n // mainPanel.add(northPanel, BorderLayout.NORTH);\n // mainPanel.add(drawLabel, BorderLayout.CENTER);\n \n\n // generalColorValue = getColorParameter(Skin.GENERAL_TEXT_COLOR); \n //controlColorValue = getColorParameter(Skin.CONTROL_BACKGROUND_COLOR); \n \n\t\t//trimColorValue = getColorParameter(Skin.TRIM_COLOR); \n\t \n\t\tinitComboBox();\n\t\t//this.setContentPane(drawLabel); <---------------------------\n this.add(drawLabel, BorderLayout.CENTER);\n \n this.addKeyListener(this); // JLabel cannot get keyboard focus\n this.setResizable(true);\n this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); // closes all windows\n //this.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); // closes only current window\n this.setTitle(name);\n // frame.setJMenuBar(createMenuBar());\n this.pack();\n this.requestFocusInWindow();\n this.setVisible(true);\n \n\t}", "public JPanel buildPanel() {\n\t\tsetLayout(new BorderLayout());\n\t\tsetBackground(ClientConstants.LIGHT_YELLOW);\n\t\tJLabel graphPlotLabel = new JLabel(ClientConstants.GRAPH_PLOT, JLabel.CENTER);\n\t\tgraphPlotLabel.setFont(ClientConstants.TEXT_FONT);\n\t\tadd(graphPlotLabel, BorderLayout.NORTH);\n\t\tsetLayout(new BorderLayout());\n\t\taffectiveGraphPlot = new AffectivePlot();\n\t\tClientDataSingleton.getInstance().setAffectivePlot(affectiveGraphPlot);\n\t\taffectiveGraphPlot.setBackground(Color.WHITE);\n\t\tadd(affectiveGraphPlot);\n\t\treturn this;\n\t}", "public abstract void overlayGUI(ImageRepresentation[][] mainImRepMatrix);", "public PlacementOverlay getOverlay();", "public interface Frame\r\n{\r\n\t/**\r\n\t * all frames should set their desired size...\r\n\t * \r\n\t * use getframeWidth() and getframeHeight() \r\n\t * which should be inherited from UI_setup abstract class\r\n\t */\r\n\tpublic void setFrameSize();\r\n\t\r\n\t/**\r\n\t * Classes must initiate the construction of a display\r\n\t */\r\n\tpublic void buildFrame();\r\n\t\r\n\t/**\r\n\t * allows us to get the jpanel within the panel object\r\n\t * @return jpanel the actual panel to be added to the window\r\n\t */\r\n\tpublic JFrame getFrame();\r\n}", "protected ConstraintPanel getFunctionPanel() {\n\t\tif (functionPanel == null) {\n\t\t\tfunctionPanel = new ConstraintPanel(this);\n\t\t\tfunctionPanel.setLayout(new BoxLayout(getFunctionPanel(), BoxLayout.Y_AXIS));\n\t\t\tfunctionPanel.add(getJPanel3(), null);\n\t\t\tfunctionPanel.add(getPackIncludePanel(), null);\n\t\t}\n\t\treturn functionPanel;\n\t}" ]
[ "0.62223387", "0.61146086", "0.6003886", "0.5991982", "0.596742", "0.5961914", "0.5900088", "0.582444", "0.5745623", "0.57194453", "0.5711384", "0.56557184", "0.5631332", "0.56216687", "0.56216687", "0.56167", "0.5610967", "0.5610967", "0.56054085", "0.5588266", "0.554879", "0.554571", "0.55441356", "0.5541964", "0.554187", "0.55229586", "0.55097675", "0.5503813", "0.5499623", "0.5481163", "0.5472856", "0.5471854", "0.54709643", "0.5468495", "0.54676956", "0.54475284", "0.5425375", "0.54149604", "0.54134846", "0.54120994", "0.54013866", "0.5396972", "0.53954446", "0.5392166", "0.53901565", "0.5384388", "0.5373671", "0.5373459", "0.5366267", "0.5364585", "0.5358311", "0.53533214", "0.53442127", "0.53373826", "0.5322747", "0.53181386", "0.5317523", "0.5307622", "0.5293951", "0.528717", "0.5286821", "0.52848613", "0.528046", "0.5274013", "0.5272959", "0.5272738", "0.5260346", "0.5259609", "0.5258969", "0.52521163", "0.5250157", "0.524893", "0.5237064", "0.5223713", "0.52209026", "0.52162904", "0.5215181", "0.52148324", "0.5212678", "0.5205386", "0.5205095", "0.52011436", "0.5198594", "0.5193147", "0.51917285", "0.5190167", "0.5182694", "0.5182672", "0.51787204", "0.5173932", "0.51729345", "0.51664686", "0.5165731", "0.51587695", "0.51470035", "0.5144838", "0.51430583", "0.51424366", "0.5142062", "0.51334393" ]
0.5484735
29
Updates the panel's size and location.
public void updateBounds() { this.setBounds(left, top, width, height); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void updateSize() {\n\t\tint mpVis = (csub.isMorePanelVisible()) ? 1 : 0;\n\t\tint csubAwake = (csub.isAwake()) ? 1 : 0;\n\t\t\n\t\tint height = csubAwake * (CSub.INTERFACE_PANEL_HEIGHT + mpVis * CSub.MORE_PANEL_HEIGHT);\n\t\t\n\t\tsetPreferredSize(new Dimension(csub.getWidth() - 2 * CSub.RESIZE_BORDER_WIDTH, height));\n\t\tsetSize(new Dimension(csub.getWidth() - 2 * CSub.RESIZE_BORDER_WIDTH, height));\n\t}", "private void updateSize() {\n double width = pane.getWidth();\n double height = pane.getHeight();\n\n if(oldWidth == 0) {\n oldWidth = width;\n }\n if(oldHeight == 0) {\n oldHeight = height;\n }\n\n double oldHvalue = pane.getHvalue();\n double oldVvalue = pane.getVvalue();\n if(Double.isNaN(oldVvalue)) {\n oldVvalue = 0;\n }\n if(Double.isNaN(oldHvalue)) {\n oldHvalue = 0;\n }\n\n pane.setVmax(height);\n pane.setHmax(width);\n\n if(grow) {\n renderMapGrow(width, height, curZoom);\n } else {\n renderMap(width, height, curZoom);\n }\n\n pane.setVvalue((height/oldHeight)*oldVvalue);\n pane.setHvalue((width/oldWidth)*oldHvalue);\n\n oldWidth = width;\n oldHeight = height;\n }", "public void updateInfo()\n\t{\n\t\twidth = Game.frame.getWidth();\n\t\theight = Game.frame.getHeight();\n\t\tGame.frame.revalidate();\n\t\tGame.frame.repaint();\n\t}", "@Override\n\tpublic Dimension getSize() \n\t{\n\t\treturn panel.getSize();\n\t}", "public void update()\n\t{\n\t\tJPanel panel = getPanel();\n\n\t\tif (panel instanceof StylePanel)\n\t\t\t((StylePanel) panel).updatePanel();\n\t}", "@Override\n\tpublic void Update(JPanel panel) {\n\t\t\n\t}", "private void actionModifySize() {\n CSizePanel csizePanel = new CSizePanel(layoutPanel.getLayoutSize(),\n false);\n int result = JOptionPane.showConfirmDialog(this, csizePanel,\n \"Modify layout size\", JOptionPane.OK_CANCEL_OPTION);\n if (result == JOptionPane.OK_OPTION) { // Afirmative\n try {\n int sizeX = Integer\n .parseInt(csizePanel.tfields[CSizePanel.idxX].getText());\n int sizeY = Integer\n .parseInt(csizePanel.tfields[CSizePanel.idxY].getText());\n if (sizeX >= LayoutPanel.minXCells\n && sizeX <= LayoutPanel.maxXCells\n && sizeY >= LayoutPanel.minYCells\n && sizeY <= LayoutPanel.maxYCells) {\n RepType rtype = RepType.CLEAR;\n if (csizePanel.newButton.isSelected()) {\n rtype = RepType.CLEAR;\n } else if (csizePanel.rptButton.isSelected()) {\n rtype = RepType.REPEAT;\n } else if (csizePanel.altButton.isSelected()) {\n rtype = RepType.ALT;\n }\n\n changeLayoutSize(new Dimension(sizeX, sizeY), rtype);\n } else {\n JOptionPane.showMessageDialog(null,\n \"Size x must be between \" + LayoutPanel.minXCells\n + \" and \" + LayoutPanel.maxXCells\n + \", or size y must be between \"\n + LayoutPanel.minYCells + \" and \"\n + LayoutPanel.maxYCells + \".\");\n }\n } catch (NumberFormatException ne) {\n JOptionPane.showMessageDialog(null, \"Invalid number.\");\n }\n }\n }", "@Override\n public void settings() {\n setSize(WIDTH, HEIGHT);\n }", "private void drawPanelComponentResized(java.awt.event.ComponentEvent evt) {\n \n ((DrawPanel)drawPanel).updateEllipse();\n }", "private void updatePanel() {\n\t\tProbeUtilities.updateModelProbePanel();\n\t}", "public void setPanel (JPanel panel)\n {\n // remove the old panel\n removeAll();\n\t// add the new one\n\tadd(panel, BorderLayout.CENTER);\n // swing doesn't properly repaint after adding/removing children\n revalidate();\n repaint();\n }", "private void setGuiSizeToWorldSize() {\n worldPanel.setPreferredSize(new Dimension(worldPanel.getWorld()\n .getWidth(), worldPanel.getWorld().getHeight()));\n worldPanel.setSize(new Dimension(worldPanel.getWorld().getWidth(),\n worldPanel.getWorld().getHeight()));\n this.getParentFrame().pack();\n }", "public void resize() {\n\t\tsp.doLayout();\n\t}", "@Override\n public void onSizeChanged(int w, int h, int oldW, int oldH) {\n // Set the movement bounds for the ballParent\n box.set(0, 0, w, h);\n }", "@Override\n public void componentResized(ComponentEvent e) {\n window.setShape(new Ellipse2D.Double(0, 0, window.getWidth(), window.getHeight()));\n window.add(panel);\n window.setLocation((screenSize.width - window.getSize().width) / 2, (screenSize.height - window.getSize().height) / 2);\n window.setVisible(true);\n }", "@Override\n\tprotected void onSizeChanged(int w, int h, int oldw, int oldh) {\n\t\twidth = w;\n\t\theigth = h;\n\t\tajestPosition();\n\t\tthis.invalidate();\n\t\tsuper.onSizeChanged(w, h, oldw, oldh);\n\t}", "protected void adjustSize() {\r\n fieldDim = mineField.getSquareLength() * mineField.getFieldLength();\r\n setSize( fieldDim + X_BORDER * 2, fieldDim + Y_BORDER * 3 );\r\n validate();\r\n }", "private void customize() {\r\n panel.setSize(new Dimension(width, height));\r\n panel.setLayout(new BorderLayout());\r\n }", "@Override\n\tprotected void changeSize(int x, int y, int previousX, int previousY) {\n this.setWidth(this.getWidth()+(x-previousX));\n this.setHeight(this.getHeight()+(y-previousY));\n this.setX(this.getX()+(x-previousX));\n\t}", "void setSize(Dimension size);", "public void update() {\n\tfireContentsChanged(this, 0, getSize());\n }", "public void setSize();", "public MazePanel(int size) \r\n\t{\r\n\t\tthis.size = size;\r\n\t\tthis.setPreferredSize( getSize() );\r\n\t\tReset ( );\r\n\t}", "private void basicSize(){\n setSize(375,400);\n }", "public void updatePlayerPanel()\n {\n playerInfoPanel.updateLabel();\n }", "public void refresh() {\n\t\tpack();\n\t\tint titleWidth = (int)(getFontMetrics(getFont()).stringWidth(getTitle()) * 1.5);\n\t\tsetMinimumSize(new Dimension(titleWidth, 50));\n\t\tsetLocationRelativeTo(this.getOwner());\n\t}", "public void componentResized(ComponentEvent e) {\n\t\t\t\t\n\t\t\t\tDimension size = e.getComponent().getSize();\n\t\t\t\tint infoWidth = 200;\n\t\t\t\tint tabPaneWidth = 200;\n\t\t\t\tint padY = 80;\n\t\t\t\tint padX = 40;\n\t\t\t\tint canvasWidth = (int) (size.width - padX - infoWidth - tabPaneWidth);\n\t\t\t\tint canvasHeight = (int) (size.height - padY);\n\t\t\t\tcanvas.setSize(canvasWidth, canvasHeight);\n\t\t\t\twindow.setSize(canvasWidth, canvasHeight);\n\t\t\t\tinfoPanel.setSize(infoWidth, canvasHeight); \n\t\t\t\t\n\t\t\t\tint tabPadX = 10;\n\t\t\t\tint tabPadY = 30;\n\t\t\t\ttabbedPane.setSize(tabPaneWidth, canvasHeight);\n\t\t\t\texplorerPanel.setSize(tabPaneWidth-tabPadX, canvasHeight-tabPadY);\n\t\t\t\tplanPanel.setSize(tabPaneWidth-tabPadX, canvasHeight-tabPadY);\n\t\t\t\tcanvas.revalidate();\n\t\t\t}", "public void doLayout() {\n\t if(editingComponent != null) {\n\t\tDimension cSize = getSize();\n\n\t\teditingComponent.getPreferredSize();\n\t\teditingComponent.setLocation(offset, 0);\n\t\teditingComponent.setBounds(offset, 0,\n\t\t\t\t\t cSize.width - offset,\n\t\t\t\t\t cSize.height);\n\t }\n\t}", "protected void doResize() {\r\n\t\tif (renderer.surface == null) {\r\n\t\t\tdoNew();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tNewResizeDialog dlg = new NewResizeDialog(labels, false);\r\n\t\tdlg.widthText.setText(\"\" + renderer.surface.width);\r\n\t\tdlg.heightText.setText(\"\" + renderer.surface.height);\r\n\t\tdlg.setLocationRelativeTo(this);\r\n\t\tdlg.setVisible(true);\r\n\t\tif (dlg.success) {\r\n\t\t\trenderer.surface.width = dlg.width;\r\n\t\t\trenderer.surface.height = dlg.height;\r\n\t\t\trenderer.surface.computeRenderingLocations();\r\n\t\t}\r\n\t}", "private void configurePanel(ContentPanel panel){\r\n\t\t\t\tpanel.setSize(325, 185);\t\t\t\t\r\n\t\t\t\tpanel.setHeaderVisible(false);\r\n\t\t\t\tpanel.setBodyStyle(\"padding:7px\");\r\n\t\t\t\tpanel.setScrollMode(Scroll.AUTOY);\r\n\t\t\t\tpanel.setStyleAttribute(\"marginTop\", \"15px\");\r\n\t\t\t}", "protected void resizePanel() {\n\t\tif (drawingAreaIsBlank) { // may have become blank after deleting the last node manually, so panel must still be shrunk\n\t\t\tsetPreferredSize(new Dimension(0,0)); // put back to small size so scrollbars disappear\n\t\t\trevalidate();\n\t\t\treturn;\n\t\t}\n\t\tgetMaxMin(); // get the extent of the tree to the left, right, bottom\n\t\tsetPreferredSize(new Dimension(maxX, maxY));\n\t\trevalidate();\n\t}", "@Override\r\n\tpublic void onSizeChanged(int w, int h, int oldW, int oldH) {\r\n\t\t// Set the movement bounds for the ball\r\n\t\txMax = w - 1;\r\n\t\tyMax = h - 1;\r\n\t}", "private void updateDimensions() {\r\n width = gui.getWidth();\r\n height = gui.getHeight();\r\n yLabelsMargin = (int) gui.getLabelWidth(Integer.toString(((int) maximumDB / 10) * 10), true) + 2;\r\n if (track != null)\r\n scaleXpx = ((float) width - yLabelsMargin) / track.getBufferCapacity();\r\n else\r\n scaleXpx = 1;\r\n scaleYpx = (float) ((height - 1) / (maximumDB - minimumDB));\r\n if (scaleYpx == 0)\r\n scaleYpx = 1;\r\n }", "public void componentResized(ComponentEvent e) {\n notifyViewportListeners(getXOrigin(), getYOrigin(), panelWidth, panelHeight);\n }", "private void extendedSize(){\n setSize(600,400);\n }", "@Override\n protected void sizeChanged () {\n }", "public void componentResized(ComponentEvent e)\n/* 410: */ {\n/* 411:478 */ TileGIS.this.mapPanel.setSize(TileGIS.this.placeholder.getJComponent().getSize());\n/* 412: */ }", "@Override\n public Dimension getPreferredSize() {\n return new Dimension(PANEL_SIZE, PANEL_SIZE);\n }", "@Override\r\n\tpublic void update() {\n\t\tthis.repaint();\r\n\t}", "void update(){\r\n\t\twindowHeight = this.getHeight();\r\n\t}", "public void setSize( Point size ) {\n checkWidget();\n if ( size == null )\n error( SWT.ERROR_NULL_ARGUMENT );\n setSize( size.x, size.y );\n }", "public void setPreferredSize( Point size ) {\n checkWidget();\n if ( size == null )\n error( SWT.ERROR_NULL_ARGUMENT );\n setPreferredSize( size.x, size.y );\n }", "public void redraw() {\n\t\t// LdvInt leftButtonWidth = new LdvInt(DOM.getElementPropertyInt(_leftScrollButton.getElement(), \"offsetWidth\"));\n\t\t// LdvInt rightButtonWidth = new LdvInt(DOM.getElementPropertyInt(_rightScrollButton.getElement(), \"offsetWidth\"));\n\t\t//_scrollArea.getElement().setPropertyInt(\"left\", leftButtonWidth);\n\t\t//_scrollArea.getElement().setPropertyInt(\"right\", rightButtonWidth);\n\t\t// _mainpanel.setCellWidth(_leftScrollButton, leftButtonWidth.intToString(-1)+\"px\");\n\t\t// _mainpanel.setCellWidth(_rightScrollButton, rightButtonWidth.intToString(-1)+\"px\");\n\t}", "protected abstract void setSize();", "@Override\n\tpublic void updatePanel() {\n\t\tstatTable.setStatTable(getModel().getRowCount(),\n\t\t\t\tgetModel().getRowNames(), getModel().getColumnCount(),\n\t\t\t\tgetModel().getColumnNames());\n\t\tgetModel().updatePanel();\n\t}", "private void updateDimensions()\n\t{\n\t\tthis.drawer.setSprite(this.drawer.getSprite().withDimensions(\n\t\t\t\tgetMaster().getDimensions()));\n\t\tthis.lastDimensions = getMaster().getDimensions();\n\t}", "void updateVisualizationSize(\n\t\tint visualizationWidth,\n\t\tint visualizationHeight)\n\t{\n\t\tthis.visualizationWidth = visualizationWidth;\n\t\tthis.visualizationHeight = visualizationHeight;\n\t}", "private void adapt(ComponentEvent e) {\n Dimension dimension = e.getComponent().getSize();\n _widthFrame = dimension.width;\n _heightFrame = dimension.height;\n _widthInternalPanel = _widthFrame - 20;\n _heightInternalPanel = _heightFrame - 30;\n setInternalBounds(_widthInternalPanel, _heightInternalPanel);\n internalScrollPane.setBounds(0, 0, _widthFrame, _heightFrame);\n // internalPanel.setBounds(0, 0, _widthFrame, _heightFrame);\n for (int i = 0; i < componentHacks.size(); i++) {\n componentHacks.get(i).update(_proportion);\n }\n }", "void updatePosition() {\n if (gameScreen.cursorIsOnLeft()) \n {\n // set the panel's rightmost edge to be 1/12th from the edge\n // set the panel's bottommost edge to be 1/6th from the edge\n setLocation(\n gameScreen.getScreenWidth() * 11/12 - getWidth(), \n gameScreen.getScreenHeight() * 5/6 - getHeight());\n }\n else // Otherwise the cursor must be on the right half of the screen\n {\n // set the panel's leftmost edge to be 1/12th from the edge\n // set the panel's bottommost edge to be 1/6th from the edge\n setLocation(\n gameScreen.getScreenWidth() * 1/12, \n gameScreen.getScreenHeight() * 5/6 - getHeight());\n }\n }", "@Override\n protected void onSizeChanged(int w, int h, int oldw, int oldh) {\n super.onSizeChanged(w, h, oldw, oldh);\n this.w = w;\n this.h = h;\n }", "private void updatePosition(){\n updateXPosition(true);\n updateYPosition(true);\n }", "public void refreshPanelComponents() {\r\n }", "public void updateDrawing() {\n\n\t\tdrawingContainer.setDrawing(controller.getDrawing());\n\t\tscrollpane.setPreferredSize(new Dimension(drawingContainer\n\t\t\t\t.getPreferredSize().width + 100, drawingContainer\n\t\t\t\t.getPreferredSize().height + 100));\n\t\tpack();\n\t\trepaint();\n\t}", "public void setLocationAndSize()\n {\n\t welcome.setBounds(150,50,200,30);\n\t amountLabel.setBounds(50,100,150,30);\n\t amountText.setBounds(200,100,150,30);\n\t depositButton.setBounds(150,150,100,30);\n \n \n }", "private void changeSize(float omegaDeg) {\n\n setSize(resolutionIntoWorldUnits(currentRegion.getRegionWidth(), WORLD_SIZE, 1080),\n resolutionIntoWorldUnits(currentRegion.getRegionHeight(), WORLD_SIZE, 1080)); // Change 1080 based on the targetResolution of the shields' own targetResolution.\n //Gdx.app.log(TAG, \"After = (\" + getWidth() + \", \" + getHeight() + \")\");\n\n float theTipOfTheShield = SHIELDS_RADIUS + (SHIELDS_RADIUS - SHIELDS_INNER_RADIUS);\n /*setY(theTipOfTheShield - getHeight());\n setX(getWidth()/2f);*/\n setX(theTipOfTheShield - getWidth());\n setY(-getHeight()/2f);\n\n setOrigin(-getX(), -getY());\n setRotation(90);\n }", "public InfoPanel() {\n setPreferredSize(new Dimension(500, 860));\n }", "public void setSizeModifier(Dimension size) {\n\t\tthis.size = size;\n\t}", "private void settings() {\n\t\tthis.setVisible(true);\n\t\tthis.setSize(800,200);\n\t}", "public void updateDimensions() {\n }", "public void ResizeActionPerformed(ActionEvent evt){\r\n int w = Integer.parseInt(imageWidth.getText());\r\n int h = Integer.parseInt(imageHeight.getText());\r\n drawingPanel.setImageSize(w, h);\r\n }", "private void setCorrectSize() {\n double newHeight = this.getContentPane().getPreferredSize().getHeight() +\n this.getContentPane().getPreferredSize().getHeight()/10 * 7;\n int newHeightInt = (int)Math.round(newHeight);\n \n this.setSize(this.getWidth(),newHeightInt);\n }", "private void updateSizeInfo() {\n RelativeLayout drawRegion = (RelativeLayout)findViewById(R.id.drawWindow);\r\n drawW = drawRegion.getWidth();\r\n drawH = drawRegion.getHeight();\r\n getImageFromStorage();\r\n LinearLayout parentWindow = (LinearLayout)findViewById(R.id.parentWindow);\r\n parentWindow.setPadding((drawW - bgImage.getWidth())/2, (drawH - bgImage.getHeight())/2, (drawW - bgImage.getWidth())/2, (drawH - bgImage.getHeight())/2);\r\n parentWindow.invalidate();\r\n }", "public void updatePanelWithAnimation() {\n AnimatorSet buildAnimatorSet = buildAnimatorSet(this.mLayoutView, 0.0f, (float) this.mLayoutView.findViewById(C0010R$id.panel_container).getHeight(), 1.0f, 0.0f, 200);\n ValueAnimator valueAnimator = new ValueAnimator();\n valueAnimator.setFloatValues(0.0f, 1.0f);\n buildAnimatorSet.play(valueAnimator);\n buildAnimatorSet.addListener(new AnimatorListenerAdapter() {\n /* class com.android.settings.panel.PanelFragment.AnonymousClass3 */\n\n public void onAnimationEnd(Animator animator) {\n PanelFragment.this.createPanelContent();\n }\n });\n buildAnimatorSet.start();\n }", "public void update(){\n\t\tthis.setVisible(true);\n\t}", "public void componentResized(ComponentEvent e) {\n myReshape(getSize().width, getSize().height);\n display();\n repaint();\n }", "public void componentResized(ComponentEvent e) {\n myReshape(getSize().width, getSize().height);\n display();\n repaint();\n }", "@Override\n protected final void onSizeChanged(int w, int h, int oldw, int oldh) {\n super.onSizeChanged(w, h, oldw, oldh);\n this.invalidate();\n }", "@Override\r\npublic void componentResized(ComponentEvent arg0) {\n\tsetSizeBackgr(getSize());\r\n\tsetSizeHat (getSize());\r\n\tsetSizeGift(getSize());\r\n}", "@Override\n\tpublic Dimension getPreferredSize()\n\t{\n\t\treturn new Dimension(PANEL_WIDTH, PANEL_HEIGHT);\n\t}", "@Override\n public void componentResized(ComponentEvent arg0) {\n width = jframe.getSize().getWidth();\n height = jframe.getSize().getHeight();\n baseBallCard.setLocation(0, (int) height - 175);\n gearbutton.setLocation((int) width - 79, (int) height - 99);\n settingspanel.setSize(new Dimension((int) (.6 * width), (int) (.6 * height)));\n settingspanel.setLocation((int) (.2 * width), (int) (.15 * height));\n int sx = (int) (.6 * width);\n int sy = (int) (.6 * height);\n storyPanel.setSize(new Dimension((int) (.6 * width), (int) (.6 * height)));\n storyPanel.setLocation((int) (.2 * width), (int) (.15 * height));\n storyPanel.setBackground(new Color(.8f, .8f, 1f, .75f));\n story.setSize(new Dimension(storyPanel.getWidth()-50, storyPanel.getHeight()-50));\n story.setBackground(new Color(.8f, .8f, 1f, .75f));\n story.setLocation(25,25);\n sphereSize.setSize((int) (.3 * sx), 20);\n bgColor.setSize((int) (.3 * sx), 20);\n sphereSize.setLocation((int) (.1 * sx), (int) (.25 * sy));\n bgColor.setLocation((int) (.1 * sx), (int) (.35 * sy));\n bgtext.setLocation((int) (.5 * sx), (int) (.35 * sy));\n sphsi.setLocation((int) (.5 * sx), (int) (.25 * sy));\n showall.setLocation((int) (.5 * sx), (int) (.8 * sy));\n points.setLocation((int) (.175 * sx), (int) (.7 * sy));\n debug.setLocation((int) (.175 * sx), (int) (.8 * sy));\n wireframe.setLocation((int) (.175 * sx), (int) (.9 * sy));\n close.setLocation(sx - 30, sy - (sy - 10));\n aboutpanel.setSize(new Dimension(461, 347));\n aboutpanel.setLocation((int) (.3 * width), (int) (.3 * height));\n aboutpanel.add(aboutclose);\n aboutclose.setLocation(440, 10);\n resetrestrictions.setLocation((int) (.025 * sx), 25);\n glcanvas.requestFocusInWindow();\n }", "public void initPanel()\n\t{\n\t\tthis.setVisible(false);\n\t\t//this.setLayout(new BorderLayout());\n \n\t\t//*Layout setup\n\t\t\n\t\tGroupLayout layout = new GroupLayout(this);\n\t\t//this.setLayout(layout);\n\n\t\tlayout.setAutoCreateGaps(true);\n\t\tlayout.setAutoCreateContainerGaps(true);\t\t\n\t\t\t\t\n\t\t//frame = new JFrame();\n offscreenImage = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);\n onscreenImage = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);\n offscreen = offscreenImage.createGraphics();\n onscreen = onscreenImage.createGraphics();\n setXscale();\n setXscale();\n offscreen.setColor(DEFAULT_CLEAR_COLOR);\n offscreen.fillRect(0, 0, width, height);\n setPenColor();\n setPenRadius();\n setFont();\n clear();\n\n // add antialiasing\n RenderingHints hints = new RenderingHints(RenderingHints.KEY_ANTIALIASING,\n RenderingHints.VALUE_ANTIALIAS_ON);\n hints.put(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);\n offscreen.addRenderingHints(hints);\n\n \n // frame stuff\n ImageIcon icon = new ImageIcon(onscreenImage);\n drawLabel = new JLabel(icon);\n\n drawLabel.addMouseListener(this);\n drawLabel.addMouseMotionListener(this);\n \n //Create buttons\n resetButton = new JButton();\n undoButton = new JButton();\n \n undoButton.setVisible(true);\n undoButton.setEnabled(true);\n undoButton.setName(\"Undo\");\n undoButton.setText(\"Undo\");\n undoButton.setSize(75, 30);\n undoButton.setPreferredSize(new Dimension(75,30));\n \n resetButton.setVisible(true);\n resetButton.setEnabled(true);\n resetButton.setName(\"Reset\");\n resetButton.setText(\"Reset\");\n \tresetButton.setSize(75, 30);\n \tresetButton.setPreferredSize(new Dimension(75,30));\n \t\n //this.add(resetButton, BorderLayout.NORTH);\n //this.add(undoButton, BorderLayout.NORTH);\n \n // JPanel mainPanel = new JPanel(new BorderLayout());\n\n // JPanel northPanel = new JPanel();\n // northPanel.add(resetButton);\n // northPanel.add(undoButton);\n // mainPanel.add(northPanel, BorderLayout.NORTH);\n // mainPanel.add(drawLabel, BorderLayout.CENTER);\n \n\n // generalColorValue = getColorParameter(Skin.GENERAL_TEXT_COLOR); \n //controlColorValue = getColorParameter(Skin.CONTROL_BACKGROUND_COLOR); \n \n\t\t//trimColorValue = getColorParameter(Skin.TRIM_COLOR); \n\t \n\t\tinitComboBox();\n\t\t//this.setContentPane(drawLabel); <---------------------------\n this.add(drawLabel, BorderLayout.CENTER);\n \n this.addKeyListener(this); // JLabel cannot get keyboard focus\n this.setResizable(true);\n this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); // closes all windows\n //this.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); // closes only current window\n this.setTitle(name);\n // frame.setJMenuBar(createMenuBar());\n this.pack();\n this.requestFocusInWindow();\n this.setVisible(true);\n \n\t}", "private void updateViewBounds() \r\n {\r\n assert !sim.getMap().isEmpty() : \"Visualiser needs simulator whose a map has at least one node\"; \r\n \r\n \r\n viewMinX = minX * zoomFactor;\r\n viewMinY = minY * zoomFactor;\r\n \r\n viewMaxX = maxX * zoomFactor;\r\n viewMaxY = maxY * zoomFactor;\r\n \r\n \r\n double marginLength = zoomFactor * maxCommRange;\r\n \r\n \r\n // Set the size of the component\r\n int prefWidth = (int)Math.ceil( (viewMaxX - viewMinX) + (marginLength * 2) );\r\n int prefHeight = (int)Math.ceil( (viewMaxY - viewMinY) + (marginLength * 2) );\r\n setPreferredSize( new Dimension( prefWidth, prefHeight ) );\r\n \r\n \r\n // Adjust for margin lengths \r\n viewMinX -= marginLength;\r\n viewMinY -= marginLength;\r\n \r\n viewMaxX += marginLength;\r\n viewMaxY += marginLength;\r\n }", "public void settings() {\r\n size(WIDTH, HEIGHT); // Set size of screen\r\n }", "public void setSize(Dimension size) {\r\n this.size = size;\r\n }", "public Dimension getPreferredSize() {\n return new Dimension(panelWidth, panelHeight);\n }", "public void setSize(float width, float height);", "public void updateGamePanel() {\n\t\tthis.removeAll();\n\t\t\n\t\tButton2 buttonTip = new Button2(\"DICA\", 75, 100, 100, 100);\n\t\tbuttonTip.addActionListener(e -> Controller.game.showTip());\n\t\tthis.add(buttonTip);\n\t\t\n\t\tButton2 menu = new Button2(\"Menu\", 200, 100, 100, 100);\n\t\tmenu.addActionListener(e -> this.frame.setVisible(\"menu\"));\n\t\tthis.add(menu);\n\t\t\n\t\tthis.drawButtons();\n\t\t\n\t\t//Adding labels\n\t\tthis.add(frame.getWordShow());\n\t\tthis.add(frame.getLifeShow());\n\t\t\n\t\tthis.frame.add(this);//Adding the gameJPanel to the frame\n\t}", "public void adjustSize() {\r\n /*\r\n * Calculate target width: max of header, adjusted window, content\r\n * \r\n * TODO: restrict to available desktop space\r\n */\r\n int targetWidth = TOTAL_BORDER_THICKNESS\r\n + MathUtils.maxInt(headerBar.getOffsetWidth(),\r\n contentWidget.getOffsetWidth(), getWidth()\r\n - TOTAL_BORDER_THICKNESS);\r\n /*\r\n * Calculate target height: max of adjusted window, content\r\n * \r\n * TODO: restrict to available desktop space\r\n */\r\n int targetHeight = TOTAL_BORDER_THICKNESS\r\n + MathUtils.maxInt(contentWidget.getOffsetHeight(), getHeight()\r\n - TOTAL_BORDER_THICKNESS - headerBar.getOffsetHeight());\r\n\r\n setPixelSize(targetWidth, targetHeight);\r\n }", "public void settings() {\r\n size(750, 550);\r\n }", "@Override\n public void componentResized(ComponentEvent e) {\n //throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n int width = this.getWidth();\n this.jButton1.setLocation(width / 4 - this.jButton1.getWidth() / 2, this.jButton1.getY());\n this.jButton2.setLocation(width * 3 / 4 - this.jButton2.getWidth() / 2, this.jButton2.getY());\n this.jButton3.setLocation(width / 2 - this.jButton3.getWidth() / 2, this.jButton3.getY());\n }", "public void showRectangleSizeSetup() {\n sizeArea.removeAllViewsInLayout();\n sizeArea.addView(heightEdit);\n sizeArea.addView(widthEdit);\n }", "@Override\n\tpublic void componentResized(ComponentEvent e) {\n\t\twidthAttitude=e.getComponent().getSize().getWidth()/Width;\n\t\theightAttitude=e.getComponent().getSize().getHeight()/Height;\n\t}", "private JPanel getJPanelOldSize() {\r\n\t\tif (jPanelOldSize == null) {\r\n\t\t\tjPanelOldSize = new JPanel();\r\n\t\t\t//jPanelOldSize.setLayout(new BoxLayout(jPanelOldSize, BoxLayout.X_AXIS));\r\n\t\t\tjPanelOldSize.setLayout(new FlowLayout(FlowLayout.CENTER, 30, 0));\r\n\t\t\tjPanelOldSize.setBorder(new TitledBorder(null, \"Original size\", TitledBorder.LEADING, TitledBorder.TOP, null, null));\t\t\r\n\t\t\tjPanelOldSize.add(this.getJPanelOldWidth());\r\n\t\t\tjPanelOldSize.add(this.getJPanelOldHeight());\t\r\n\t\t}\r\n\t\treturn jPanelOldSize;\r\n\t}", "private void setupLayout() {\r\n\t\tgetContentPane().add(panel);\r\n\t}", "public void addToJPanel() {\r\n\t\tedit_terrain.add(header);\r\n\t\tJLabel blank1 = new JLabel(\"\");\r\n\t\tedit_terrain.add(blank1);\r\n\t\t\r\n\t\tedit_terrain.add(add_terrain);\r\n\t\tJLabel blank2 = new JLabel(\"\");\r\n\t\tedit_terrain.add(blank2);\r\n\t\t\r\n\t\tedit_terrain.add(scale_lb);\r\n\t\tedit_terrain.add(scale);\r\n\t\t\r\n\t\tedit_terrain.add(shape_lb);\r\n\t\tedit_terrain.add(shape_cb);\r\n\t\t\r\n\t\tedit_terrain.add(material_lb);\r\n\t\tedit_terrain.add(material_cb);\r\n\t\t\r\n\t\tedit_terrain.add(colour_lb);\r\n\t\tedit_terrain.add(colour_cb);\r\n\t\t\r\n\t\tedit_terrain.add(position_x_lb);\r\n\t\tedit_terrain.add(position_x);\r\n\t\t\r\n\t\tedit_terrain.add(position_y_lb);\r\n\t\tedit_terrain.add(position_y);\r\n\t\t\r\n\t\tedit_terrain.add(apply_terrain);\r\n\t\tedit_terrain.add(reset_terrain);\r\n\t\t\r\n\t\tsetAllFont();\r\n\t}", "@Override\n public void update(int mouseX, int mouseY, boolean click) {\n super.update(mouseX, mouseY, click);\n _innerSize._x = _size._x * _progress;\n }", "private void changeLayoutSize(Dimension newSize, RepType rtype) {\n layoutPanel.inhNList = repPattern(newSize, layoutPanel.inhNList, rtype);\n layoutPanel.activeNList = repPattern(newSize, layoutPanel.activeNList,\n rtype);\n layoutPanel.probedNList = repPattern(newSize, layoutPanel.activeNList,\n rtype);\n\n layoutPanel.changeLayoutSize(newSize);\n }", "@Override\n public void resize(int width, int height) {game.screenPort.update(width, height, true);}", "public void updateHeight() {\n Rectangle repaintBounds = getBounds();\n parent.getScene().paintImmediately(repaintBounds);\n\n // set new height compute while repainting.\n setBounds(new Rectangle(bounds));\n\n parent.getScene().repaint(repaintBounds);\n setChanged();\n notifyObservers();\n }", "private void createUpdatePanel()\n\t{\n\t\tsettingPane=new JPanel();\n\t\tsettingPane.setLayout(new BoxLayout(settingPane, BoxLayout.Y_AXIS));\n\t\t\n\t\t//************************update pane*****************************//\n\t\tJPanel updatePane=new JPanel();\n\t\tupdatePane.setLayout(new FlowLayout(FlowLayout.CENTER,30,5));\n\t\tBorder setBorder=BorderFactory.createTitledBorder(\"Settings\");\n\t\tupdatePane.setBorder(setBorder);\n\t\t\n\t\tlblStatus=new JLabel();\n\t\t\n\t\t//chkOff=new JCheckBox(\"OFF\");\n\t\t//chkOn=new JCheckBox(\"ON\");\n\t\tbtnOn=new JButton(\"ON\");\n\t\tbtnOff=new JButton(\"OFF\");\n\t\t\n\t\t//On button click\n\t\tbtnOn.addActionListener(new ActionListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tString message;\n\t\t\t\tif(isSprinklerSelected)//Sprinkler\n\t\t\t\t{\n\t\t\t\t\tmessage=\"Are you sure you want to turn on this sprinkler now?\";\n\t\t\t\t\t//turn on the sprinkler for 1 hour\n\t\t\t\t\tint response = JOptionPane.showConfirmDialog(null, message, \"Confirm\",\n\t\t\t\t\t JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);\n\t\t\t\t\t\n\t\t\t\t\tif(response==JOptionPane.YES_OPTION)\n\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t\t//update status=on to db\n\t\t\t\t\t\tsprinklerService.updateSprinklerStatus(selectedId, SprinklerStatus.ON.toString());\n\t\t\t\t\t\t\n\t\t\t\t\t\tint sprinklerId=sprinklerService.getSprinklerByName(selectedId).getSprinklerId();\n\t\t\t\t\t\t\n\t\t\t\t\t\t//add sprinklerRunTime - start time.\n\t\t\t\t\t\tint runTimeId=sprinklerService.addSprinklerRunTime(sprinklerId);\n\t\t\t\t\t\t//set timer to turn off this sprinkler after a fixed time\n\t\t\t\t\t\tturnOffDelayTimer(runTimeId);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//refresh update pane for sprinkler\n\t\t\t\t\t\tpopulateSprinklerStatus();\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse//group\n\t\t\t\t{\n\t\t\t\t\tmessage=\"Are you sure you want to turn on this sprinkler group now?\";\n\t\t\t\t\t//turn on the sprinkler for 1 hour\n\t\t\t\t\tint response = JOptionPane.showConfirmDialog(null, message, \"Confirm\",\n\t\t\t\t\t JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);\n\t\t\t\t\t\n\t\t\t\t\tif(response==JOptionPane.YES_OPTION)\n\t\t\t\t\t{\n\t\t\t\t\t\t//update status=on to db\n\t\t\t\t\t\tsprinklerGroup.updateSprinklerGroupStatus(selectedId, SprinklerStatus.ON.toString());\n\t\t\t\t\t\t//set timer to turn off this group after a fixed time\n\t\t\t\t\t\t\n\t\t\t\t\t\tSprinklerGroup gService=new SprinklerGroup();\n\t\t\t\t\t\tint groupId=gService.getSprinklerGroupByName(selectedId).getGroupId();\n\t\t\t\t\t\t//add groupRunTime - start time\n\t\t\t\t\t\tint gRunTimeId=sprinklerService.addGroupRunTime(groupId);\n\t\t\t\t\t\tturnOffDelayTimer(gRunTimeId);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t//refresh update pane for group\n\t\t\t\t\t\tpopulateGroupStatus();\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\t//Off button click\n\t\tbtnOff.addActionListener(new ActionListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// turn off the sprinkler/group\n\t\t\t\t\n\t\t\t\tString message;\n\t\t\t\tif(isSprinklerSelected)//Sprinkler\n\t\t\t\t{\n\t\t\t\t\tmessage=\"Are you sure you want to turn off this sprinkler now?\";\n\t\t\t\t\t//turn on the sprinkler for 1 hour\n\t\t\t\t\tint response = JOptionPane.showConfirmDialog(null, message, \"Confirm\",\n\t\t\t\t\t JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);\n\t\t\t\t\t\n\t\t\t\t\tif(response==JOptionPane.YES_OPTION)\n\t\t\t\t\t{\n\t\t\t\t\t\t//update status=off to db\n\t\t\t\t\t\tsprinklerService.updateSprinklerStatus(selectedId, SprinklerStatus.OFF.toString());\n\t\t\t\t\t\t//update sprinkler run time - end_time\n\t\t\t\t\t\tint sprinklerId=sprinklerService.getSprinklerByName(selectedId).getSprinklerId();\n\t\t\t\t\t\tint runTimeId=sprinklerService.getSprinklerRunTimeToUpdate(sprinklerId).getId();\n\t\t\t\t\t\tsprinklerService.updateSprinklerRunTime(runTimeId);\n\t\t\t\t\t\t//refresh update pane for sprinkler\n\t\t\t\t\t\tpopulateSprinklerStatus();\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse//group\n\t\t\t\t{\n\t\t\t\t\tmessage=\"Are you sure you want to turn off this sprinkler group now?\";\n\t\t\t\t\t//turn on the sprinkler for 1 hour\n\t\t\t\t\tint response = JOptionPane.showConfirmDialog(null, message, \"Confirm\",\n\t\t\t\t\t JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);\n\t\t\t\t\t\n\t\t\t\t\tif(response==JOptionPane.YES_OPTION)\n\t\t\t\t\t{\n\t\t\t\t\t\t//update status=off to db\n\t\t\t\t\t\tsprinklerGroup.updateSprinklerGroupStatus(selectedId, SprinklerStatus.OFF.toString());\n\t\t\t\t\t\t\n\t\t\t\t\t\t//update group run time - end_time\n\t\t\t\t\t\tint groupId=sprinklerGroup.getSprinklerGroupByName(selectedId).getGroupId();\n\t\t\t\t\t\tint gRunTimeId=sprinklerService.getGroupRunTimeToUpdate(groupId).getGroupId();\n\t\t\t\t\t\tsprinklerService.updateGroupRunTime(gRunTimeId);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//refresh update pane for group\n\t\t\t\t\t\tpopulateGroupStatus();\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tchkFunctional=new JCheckBox(\"Functional\");\n\t\tbtnSave=new JButton(\"Save\");\n\t\t//save button click - only for sprinklers\n\t\tbtnSave.addActionListener(new ActionListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\tif(isSprinklerSelected)//sprinkler functional data save\n\t\t\t\t{\n\t\t\t\t\tint response;\n\t\t\t\t\tint fn=(chkFunctional.isSelected())?1:0;//functional=1, not-functional=0\n\t\t\t\t\t//handle condition for chkFunctional \n\t\t\t\t\tif(chkFunctional.isSelected())//made it functional\n\t\t\t\t\t{\n\t\t\t\t\t\tresponse = JOptionPane.showConfirmDialog(null, \"Are you sure you want to set this sprinkler as Functional?\", \"Confirm\",\n\t\t\t\t\t\t JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(response==JOptionPane.YES_OPTION)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//save functional to db\n\t\t\t\t\t\t\tsprinklerService.updateSprinklerFunctional(selectedId, fn);\n\t\t\t\t\t\t\t//show addSetting and schedule panes\n\t\t\t\t\t\t\taddSetting.setVisible(true);\n\t\t\t\t\t\t\t//newWeek.setVisible(true);\n\t\t\t\t\t\t\tschedule.setVisible(true);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\telse//made it not-functional\n\t\t\t\t\t{\n\t\t\t\t\t\tresponse = JOptionPane.showConfirmDialog(null, \"Are you sure you want to set this sprinkler as Not Functional?\", \"Confirm\",\n\t\t\t\t\t\t JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(response==JOptionPane.YES_OPTION)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//save not functional and status=off to db\n\t\t\t\t\t\t\tsprinklerService.updateSprinklerFunctional(selectedId, fn);\n\t\t\t\t\t\t\t//disable addSetting and schedule panes\n\t\t\t\t\t\t\taddSetting.setVisible(false);\n\t\t\t\t\t\t\t//newWeek.setVisible(false);\n\t\t\t\t\t\t\tschedule.setVisible(false);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t});\n\t\t\n\t\t/*btnCancel=new JButton(\"Cancel\");\n\t\t//cancel button click\n\t\tbtnCancel.addActionListener(new ActionListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// Do not update any details. Close the window.\n\t\t\t\tframe.dispose();\t\t\t\n\t\t\t}\n\t\t});*/\n\t\t\n\t\t\n\t\t//group controls in panels\n\t\tJPanel textPane=new JPanel();\n\t\ttextPane.add(lblStatus);\n\t\tJPanel statusPane=new JPanel();\n\t\tstatusPane.add(btnOff);//statusPane.add(chkOff);\n\t\tstatusPane.add(btnOn);//statusPane.add(chkOn);\n\t\tJPanel functionalPane=new JPanel();\n\t\tfunctionalPane.add(chkFunctional);\n\t\t\n\t\t\n\t\t/*updatePane.add(lblStatus);\n\t\tupdatePane.add(chkOff);\n\t\tupdatePane.add(chkOn);\n\t\tupdatePane.add(chkFunctional);*/\n\t\t\n\t\t//add controls to updatepanel\n\t\tupdatePane.add(textPane);\n\t\tupdatePane.add(statusPane);\n\t\tupdatePane.add(functionalPane);\n\t\t//updatePane.add(btnCancel);\n\t\tupdatePane.add(btnSave);\n\t\t//**************************************************************//\n\t\t\n\t\t//*********************addSetting pane**************************//\n\t\taddSetting=new AddSetting(selectedId,isSprinklerSelected);\n\t\t\n\t\taddSetting.setScheduleListener(new ScheduleListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void scheduleAdded() {\n\t\t\t\t// refresh Schedule panel\n\t\t\t\tSystem.out.println(\"3.\"+selectedId);\n\t\t\t\tschedulePane.removeAll();\n\t\t\t\tschedulePane.add(new Schedule(selectedId, isSprinklerSelected));\n\t\t\t\tschedulePane.validate();\n\t\t\t\tschedulePane.repaint();\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\t//**************************************************************//\n\t\t\n\t\t//add components to setting pane\n\t\tsettingPane.add(updatePane);\n\t\t\n\t\t\n\t\tsettingPane.add(addSetting);\n\t\t\n\t\t\n\t\t\n\t\t//add setting pane to content pane\n\t\tcontentPane.add(settingPane,BorderLayout.SOUTH);\n\t\t\n\t\t\n\t}", "@Override\n\tpublic void doLayout() {\n\t\tthis.transitionsPanel.setBounds(0, 0, this.getWidth(), this.getHeight());\n\t\t//this.timersButton.setBounds(this.getWidth()-2*50, 0, 50, 50);\n\t\t//this.countersButton.setBounds(this.getWidth()-50, 0, 50, 50);\n\t\t//this.salirButton.setBounds(this.getWidth()-40,0,40, 40);\n\t\tsuper.doLayout();\n\t}", "public abstract void setSize(Dimension d);", "public void setSize(int newSize);", "public void setSize(int newSize);", "@Override\n\tpublic void resize(int width, int height) {\n\t stage.getViewport().update(width, height, true);\n\t}", "public void componentResized(ComponentEvent e) {\n System.out.println(\"componentResized\");\n container.setPreferredSize(new Dimension(getWidth(), getHeight()));\n \t\tcontainer.imageContainer.setBounds(0, 30, container.getPreferredSize().width, container.getPreferredSize().height);\n \t\tcontainer.toolbar.setSize(container.getPreferredSize().width-16, 25);\n \t\tSystem.out.println(container.imageContainer.getPreferredSize());\n \t\trepaint();\n }", "void reconfigure() {\n computePosition(_primaryPlot.getScreenCoords(findCurrentCenterPoint()), false);\n }", "public void changeSize(Integer newLength, Integer newHeight) {\n control.erase();\n width = newLength;\n height = newHeight;\n control.draw();\n }", "public SnowmanPanel()\n {\n setPreferredSize(new Dimension(300,225));\n setBackground(Color.cyan);\n }", "@Override\n\tprotected void onSizeChanged(int w, int h, int oldw, int oldh) {\n\t\tint[] viewLocation = new int[2];\n\t\tthis.getLocationOnScreen(viewLocation);\n\n\t\tif (h > w) {\n\t\t\tsquareRealSize = w / 5;\n\t\t} else {\n\t\t\tsquareRealSize = h / 5;\n\t\t}\n\n\t\t// 小方块的大小\n\t\tsquareDisplaySize = squareRealSize * 9 / 10;\n\n\t\tsquareOffsetX = 0;\n\t\tsquareOffsetY = 0;\n\t\t\n\t\tthis.w = getWidth();\n\t\tthis.h = getHeight();\n\t}" ]
[ "0.7301164", "0.69848543", "0.67608273", "0.67516404", "0.671935", "0.6571398", "0.65672064", "0.64789546", "0.6429007", "0.6427305", "0.6413853", "0.6324643", "0.6317703", "0.6310044", "0.6297332", "0.62910736", "0.6280076", "0.62676376", "0.6262696", "0.62593687", "0.62347054", "0.6229352", "0.6193482", "0.6188705", "0.6165922", "0.6158176", "0.61513704", "0.61474603", "0.61451775", "0.6135567", "0.61268944", "0.6122623", "0.6119862", "0.60964775", "0.60887307", "0.6085282", "0.6080227", "0.6076446", "0.6076059", "0.6074685", "0.60743713", "0.60643613", "0.60447514", "0.6027939", "0.60268486", "0.60225534", "0.60189015", "0.6011948", "0.59863955", "0.59857637", "0.59708744", "0.59688216", "0.59540224", "0.5950184", "0.5945243", "0.59451544", "0.5944778", "0.5932164", "0.5928618", "0.59282035", "0.59208345", "0.5920224", "0.59132", "0.5900732", "0.5899065", "0.5899065", "0.58970755", "0.58963317", "0.58942443", "0.58869827", "0.58832103", "0.5867447", "0.58655447", "0.5863799", "0.5850889", "0.58438545", "0.5832", "0.5828625", "0.582632", "0.5822995", "0.58228064", "0.58221006", "0.58183014", "0.58175886", "0.5816685", "0.58144", "0.5812693", "0.58109623", "0.580909", "0.580064", "0.5799391", "0.57959455", "0.57937497", "0.57937497", "0.57911325", "0.57720476", "0.57700324", "0.5769993", "0.5768833", "0.5766358" ]
0.6752384
3
Changes the panel's size
public void changeSize(int width, int height) { this.width = width; this.height = height; updateBounds(); updateChildren(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setSize();", "void setSize(Dimension size);", "public void setSize(int newSize);", "public void setSize(int newSize);", "public void updateSize() {\n\t\tint mpVis = (csub.isMorePanelVisible()) ? 1 : 0;\n\t\tint csubAwake = (csub.isAwake()) ? 1 : 0;\n\t\t\n\t\tint height = csubAwake * (CSub.INTERFACE_PANEL_HEIGHT + mpVis * CSub.MORE_PANEL_HEIGHT);\n\t\t\n\t\tsetPreferredSize(new Dimension(csub.getWidth() - 2 * CSub.RESIZE_BORDER_WIDTH, height));\n\t\tsetSize(new Dimension(csub.getWidth() - 2 * CSub.RESIZE_BORDER_WIDTH, height));\n\t}", "@Override\n public void settings() {\n setSize(WIDTH, HEIGHT);\n }", "private void customize() {\r\n panel.setSize(new Dimension(width, height));\r\n panel.setLayout(new BorderLayout());\r\n }", "private void basicSize(){\n setSize(375,400);\n }", "protected abstract void setSize();", "public void setSize(int size);", "private void extendedSize(){\n setSize(600,400);\n }", "public void setSize(float width, float height);", "@Override\n\tpublic Dimension getSize() \n\t{\n\t\treturn panel.getSize();\n\t}", "private void actionModifySize() {\n CSizePanel csizePanel = new CSizePanel(layoutPanel.getLayoutSize(),\n false);\n int result = JOptionPane.showConfirmDialog(this, csizePanel,\n \"Modify layout size\", JOptionPane.OK_CANCEL_OPTION);\n if (result == JOptionPane.OK_OPTION) { // Afirmative\n try {\n int sizeX = Integer\n .parseInt(csizePanel.tfields[CSizePanel.idxX].getText());\n int sizeY = Integer\n .parseInt(csizePanel.tfields[CSizePanel.idxY].getText());\n if (sizeX >= LayoutPanel.minXCells\n && sizeX <= LayoutPanel.maxXCells\n && sizeY >= LayoutPanel.minYCells\n && sizeY <= LayoutPanel.maxYCells) {\n RepType rtype = RepType.CLEAR;\n if (csizePanel.newButton.isSelected()) {\n rtype = RepType.CLEAR;\n } else if (csizePanel.rptButton.isSelected()) {\n rtype = RepType.REPEAT;\n } else if (csizePanel.altButton.isSelected()) {\n rtype = RepType.ALT;\n }\n\n changeLayoutSize(new Dimension(sizeX, sizeY), rtype);\n } else {\n JOptionPane.showMessageDialog(null,\n \"Size x must be between \" + LayoutPanel.minXCells\n + \" and \" + LayoutPanel.maxXCells\n + \", or size y must be between \"\n + LayoutPanel.minYCells + \" and \"\n + LayoutPanel.maxYCells + \".\");\n }\n } catch (NumberFormatException ne) {\n JOptionPane.showMessageDialog(null, \"Invalid number.\");\n }\n }\n }", "@Override\n\tprotected void changeSize(int x, int y, int previousX, int previousY) {\n this.setWidth(this.getWidth()+(x-previousX));\n this.setHeight(this.getHeight()+(y-previousY));\n this.setX(this.getX()+(x-previousX));\n\t}", "public void setSize(Dimension size) {\r\n this.size = size;\r\n }", "private void changeLayoutSize(Dimension newSize, RepType rtype) {\n layoutPanel.inhNList = repPattern(newSize, layoutPanel.inhNList, rtype);\n layoutPanel.activeNList = repPattern(newSize, layoutPanel.activeNList,\n rtype);\n layoutPanel.probedNList = repPattern(newSize, layoutPanel.activeNList,\n rtype);\n\n layoutPanel.changeLayoutSize(newSize);\n }", "public void resize() {\n\t\tsp.doLayout();\n\t}", "public void setSizeModifier(Dimension size) {\n\t\tthis.size = size;\n\t}", "public void setSize(Dimension newSize) {\n\t\tif(newSize.height<80)\n\t\t\tnewSize.height=80;\n\t\tif (newSize != null) {\n\t\t\tsize.setSize(newSize);\n\t\t\tfirePropertyChange(Props.SIZE_PROP.getValue(), null, size);\n\t\t}\n\t}", "protected void setSize(Dimension dim) {}", "public void setSize(double aWidth, double aHeight) { setWidth(aWidth); setHeight(aHeight); }", "public void ResizeActionPerformed(ActionEvent evt){\r\n int w = Integer.parseInt(imageWidth.getText());\r\n int h = Integer.parseInt(imageHeight.getText());\r\n drawingPanel.setImageSize(w, h);\r\n }", "public void setSize( Point size ) {\n checkWidget();\n if ( size == null )\n error( SWT.ERROR_NULL_ARGUMENT );\n setSize( size.x, size.y );\n }", "public void setSizePlayingFields()\r\n {\n setPreferredSize(new Dimension(109*8,72*8));//powieżchnia o 2 m z każdej strony większa niz boisko 106 i 69 pomnożone o 8\r\n //większe boisko żeby było widać\r\n setMaximumSize(getMaximumSize());\r\n setBackground(Color.green);\r\n }", "public void setfixedSize(){\n this.setPreferredSize( new Dimension( PANELWIDTH,0) );\n this.setMaximumSize( new Dimension( PANELWIDTH,0) );\n this.setMinimumSize( new Dimension( PANELWIDTH,0) );\n }", "public void setPreferredSize( Point size ) {\n checkWidget();\n if ( size == null )\n error( SWT.ERROR_NULL_ARGUMENT );\n setPreferredSize( size.x, size.y );\n }", "protected void adjustSize() {\r\n fieldDim = mineField.getSquareLength() * mineField.getFieldLength();\r\n setSize( fieldDim + X_BORDER * 2, fieldDim + Y_BORDER * 3 );\r\n validate();\r\n }", "public void setSize(double size) \n {\n this.size = size;\n }", "public abstract void setSize(Dimension d);", "public void setSize( int width, int height ) {\n checkWidget();\n int newHeight = height;\n int newWidth = width;\n Point point = parent.fixPoint( newWidth, newHeight );\n newWidth = Math.max( point.x, minimumWidth + MINIMUM_WIDTH );\n newHeight = Math.max( point.y, 0 );\n if ( !ideal ) {\n preferredWidth = newWidth;\n preferredHeight = newHeight;\n }\n itemBounds.width = requestedWidth = newWidth;\n itemBounds.height = newHeight;\n if ( control != null ) {\n int controlWidth = newWidth - MINIMUM_WIDTH;\n if ( (style & SWT.DROP_DOWN) != 0 && newWidth < preferredWidth ) {\n controlWidth -= CHEVRON_IMAGE_WIDTH + CHEVRON_HORIZONTAL_TRIM\n + CHEVRON_LEFT_MARGIN;\n }\n control.setSize( parent.fixPoint( controlWidth, newHeight ) );\n }\n parent.relayout();\n updateChevron();\n }", "public MazePanel(int size) \r\n\t{\r\n\t\tthis.size = size;\r\n\t\tthis.setPreferredSize( getSize() );\r\n\t\tReset ( );\r\n\t}", "protected void resizePanel() {\n\t\tif (drawingAreaIsBlank) { // may have become blank after deleting the last node manually, so panel must still be shrunk\n\t\t\tsetPreferredSize(new Dimension(0,0)); // put back to small size so scrollbars disappear\n\t\t\trevalidate();\n\t\t\treturn;\n\t\t}\n\t\tgetMaxMin(); // get the extent of the tree to the left, right, bottom\n\t\tsetPreferredSize(new Dimension(maxX, maxY));\n\t\trevalidate();\n\t}", "public void changeSize(Integer newLength, Integer newHeight) {\n control.erase();\n width = newLength;\n height = newHeight;\n control.draw();\n }", "public void resizeCanvas(int w, int h) {\n this.setPreferredSize(new Dimension(w,h));\n revalidate();\n}", "public void setFrameSize();", "public void settings() {\r\n size(750, 550);\r\n }", "@Override\n public void settings(){\n size(500, 500);\n }", "void setDimension(double width, double height);", "public void setSize(int w, int h) {\n\n\t}", "private void setGuiSizeToWorldSize() {\n worldPanel.setPreferredSize(new Dimension(worldPanel.getWorld()\n .getWidth(), worldPanel.getWorld().getHeight()));\n worldPanel.setSize(new Dimension(worldPanel.getWorld().getWidth(),\n worldPanel.getWorld().getHeight()));\n this.getParentFrame().pack();\n }", "private void setGridSize() {\n int width = Math.max(boardView.windowWidth(), buttonPanel.getWidth());\n\n int height = points.getHeight() + boardView.windowHeight() + buttonPanel.getHeight();\n\n setSize(width, height);\n }", "private void cbxSizeActionPerformed(java.awt.event.ActionEvent evt) {\n\n String size = (String) cbxSize.getSelectedItem();\n if (size.contains(\"4\")) {\n panelSize = 4;\n } else if (size.contains(\"5\")) {\n panelSize = 5;\n } else {\n panelSize = 3;\n }\n initPanel();\n }", "private void setCorrectSize() {\n double newHeight = this.getContentPane().getPreferredSize().getHeight() +\n this.getContentPane().getPreferredSize().getHeight()/10 * 7;\n int newHeightInt = (int)Math.round(newHeight);\n \n this.setSize(this.getWidth(),newHeightInt);\n }", "public void changeSize()\n {\n //if mouse is on the play button, make it bigger\n if(Greenfoot.mouseMoved(this))\n setImage(\"play button bigger.png\");\n //if mouse is on the background, return play button to regular size\n else if(Greenfoot.mouseMoved(getWorld()))\n setImage(\"play button.png\");\n }", "@Override\n protected void sizeChanged () {\n }", "public void setSize(int size) {\r\n this.size = size;\r\n }", "public void setSize(RMSize aSize) { setSize(aSize.width, aSize.height); }", "public void settings() { size(1200, 800); }", "public void setSize(int size) {\r\n _size = size;\r\n }", "public void setSize(Dimension comp_dim){\n\t\tswingComponent.setSize(comp_dim);\n\t}", "public void setSize(int size){\n this.size = size;\n }", "public void setSize(int size) {\n this.size = size;\n }", "public void setSize(int size) {\n this.size = size;\n }", "@Override\n public Dimension getPreferredSize() {\n return new Dimension(PANEL_SIZE, PANEL_SIZE);\n }", "public void setPreferredSize( int width, int height ) {\n checkWidget();\n ideal = true;\n Point point = parent.fixPoint( width, height );\n preferredWidth = Math.max( point.x, MINIMUM_WIDTH );\n preferredHeight = point.y;\n }", "public void componentResized(ComponentEvent e) {\n\t\t\t\t\n\t\t\t\tDimension size = e.getComponent().getSize();\n\t\t\t\tint infoWidth = 200;\n\t\t\t\tint tabPaneWidth = 200;\n\t\t\t\tint padY = 80;\n\t\t\t\tint padX = 40;\n\t\t\t\tint canvasWidth = (int) (size.width - padX - infoWidth - tabPaneWidth);\n\t\t\t\tint canvasHeight = (int) (size.height - padY);\n\t\t\t\tcanvas.setSize(canvasWidth, canvasHeight);\n\t\t\t\twindow.setSize(canvasWidth, canvasHeight);\n\t\t\t\tinfoPanel.setSize(infoWidth, canvasHeight); \n\t\t\t\t\n\t\t\t\tint tabPadX = 10;\n\t\t\t\tint tabPadY = 30;\n\t\t\t\ttabbedPane.setSize(tabPaneWidth, canvasHeight);\n\t\t\t\texplorerPanel.setSize(tabPaneWidth-tabPadX, canvasHeight-tabPadY);\n\t\t\t\tplanPanel.setSize(tabPaneWidth-tabPadX, canvasHeight-tabPadY);\n\t\t\t\tcanvas.revalidate();\n\t\t\t}", "public void setSize(int size) {\n\t\t _size = size;\n\t}", "protected void doResize() {\r\n\t\tif (renderer.surface == null) {\r\n\t\t\tdoNew();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tNewResizeDialog dlg = new NewResizeDialog(labels, false);\r\n\t\tdlg.widthText.setText(\"\" + renderer.surface.width);\r\n\t\tdlg.heightText.setText(\"\" + renderer.surface.height);\r\n\t\tdlg.setLocationRelativeTo(this);\r\n\t\tdlg.setVisible(true);\r\n\t\tif (dlg.success) {\r\n\t\t\trenderer.surface.width = dlg.width;\r\n\t\t\trenderer.surface.height = dlg.height;\r\n\t\t\trenderer.surface.computeRenderingLocations();\r\n\t\t}\r\n\t}", "public void setSize(int size) {\n this.size = size;\n }", "public void setSize(int _size)\r\n {\r\n size = _size;\r\n }", "void setSize(float w, float h) {\n _w = w;\n _h = h;\n }", "@Override\n public void componentResized(final ComponentEvent e) {\n buttonWidth = position.isHorizontal() ? 150 : (parent.getWidth() / cells);\n relayout();\n }", "public void setSize(Vector2ic size){\n glfwSetWindowSize(handle, size.x(), size.y());\n this.size.set(size);\n sizeMultiplexer.handle(new WindowSizeEvent(handle, size.x(), size.y()));\n }", "public void setSize(int size) {\n\t\tthis.size = size;\n\t}", "public void setSize(int size) {\n\t\tthis.size = size;\n\t}", "public void setSize(int size) {\n\t\tthis.size = size;\n\t}", "public void setSize(int size) {\n\t\tthis.size = size;\n\t}", "@Override\r\npublic void componentResized(ComponentEvent arg0) {\n\tsetSizeBackgr(getSize());\r\n\tsetSizeHat (getSize());\r\n\tsetSizeGift(getSize());\r\n}", "@Before\n public void setDimension() {\n this.view.setDimension(new Dimension(WITDH, HEIGHT));\n }", "public void setSize(String size) {\r\n //System.out.print(\"Setting Size...\");\r\n this.Size = size;\r\n }", "public void setPreferredSize(Dimension d)\n {\n fileName.setPreferredSize(d);\n }", "protected void newSize() {\r\n adjustSize();\r\n halt();\r\n newGame();\r\n }", "public void adjustSize() {\r\n /*\r\n * Calculate target width: max of header, adjusted window, content\r\n * \r\n * TODO: restrict to available desktop space\r\n */\r\n int targetWidth = TOTAL_BORDER_THICKNESS\r\n + MathUtils.maxInt(headerBar.getOffsetWidth(),\r\n contentWidget.getOffsetWidth(), getWidth()\r\n - TOTAL_BORDER_THICKNESS);\r\n /*\r\n * Calculate target height: max of adjusted window, content\r\n * \r\n * TODO: restrict to available desktop space\r\n */\r\n int targetHeight = TOTAL_BORDER_THICKNESS\r\n + MathUtils.maxInt(contentWidget.getOffsetHeight(), getHeight()\r\n - TOTAL_BORDER_THICKNESS - headerBar.getOffsetHeight());\r\n\r\n setPixelSize(targetWidth, targetHeight);\r\n }", "private void settings() {\n\t\tthis.setVisible(true);\n\t\tthis.setSize(800,200);\n\t}", "public void size(final int theWidth, final int theHeight);", "private void configurePanel(ContentPanel panel){\r\n\t\t\t\tpanel.setSize(325, 185);\t\t\t\t\r\n\t\t\t\tpanel.setHeaderVisible(false);\r\n\t\t\t\tpanel.setBodyStyle(\"padding:7px\");\r\n\t\t\t\tpanel.setScrollMode(Scroll.AUTOY);\r\n\t\t\t\tpanel.setStyleAttribute(\"marginTop\", \"15px\");\r\n\t\t\t}", "public Dimension getPreferredSize(){\n return new Dimension(400,350);\n }", "private void updateSize() {\n double width = pane.getWidth();\n double height = pane.getHeight();\n\n if(oldWidth == 0) {\n oldWidth = width;\n }\n if(oldHeight == 0) {\n oldHeight = height;\n }\n\n double oldHvalue = pane.getHvalue();\n double oldVvalue = pane.getVvalue();\n if(Double.isNaN(oldVvalue)) {\n oldVvalue = 0;\n }\n if(Double.isNaN(oldHvalue)) {\n oldHvalue = 0;\n }\n\n pane.setVmax(height);\n pane.setHmax(width);\n\n if(grow) {\n renderMapGrow(width, height, curZoom);\n } else {\n renderMap(width, height, curZoom);\n }\n\n pane.setVvalue((height/oldHeight)*oldVvalue);\n pane.setHvalue((width/oldWidth)*oldHvalue);\n\n oldWidth = width;\n oldHeight = height;\n }", "public void setSize(PlayerSize size) {\n if (size == this.size) {\n return; // Return, already sized like that\n }\n\n PlayerSize oldSize = this.size;\n this.size = size;\n\n updateSizeSafely(getView());\n\n if (mListener != null) {\n mListener.onPlayerSizeChanged(size, oldSize);\n }\n }", "private void drawPanelComponentResized(java.awt.event.ComponentEvent evt) {\n \n ((DrawPanel)drawPanel).updateEllipse();\n }", "@Override\n\tpublic Dimension getPreferredSize()\n\t{\n\t\treturn new Dimension(PANEL_WIDTH, PANEL_HEIGHT);\n\t}", "public void setSize(Dimension d) {\n\n\t}", "@Override\n public void componentResized(java.awt.event.ComponentEvent evt) {\n resizeGrid();\n }", "public void setSize(int w, int h)\r\n {\r\n\t //ignore width (or ignore height)\r\n setWidth(h);\r\n setHeight(h);\r\n }", "public void componentResized(ComponentEvent e) {\n myReshape(getSize().width, getSize().height);\n display();\n repaint();\n }", "public void componentResized(ComponentEvent e) {\n myReshape(getSize().width, getSize().height);\n display();\n repaint();\n }", "@Override\n public void componentResized(ComponentEvent componentEvent) {\n ControlFrame.this.pack();\n }", "private JPanel getJPanelNewSize() {\r\n\t\tif (jPanelNewSize == null) {\r\n\t\t\tjPanelNewSize = new JPanel();\r\n\t\t\tjPanelNewSize.setLayout(new BoxLayout(jPanelNewSize, BoxLayout.Y_AXIS));\r\n\t\t\t//jPanelNewSize.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));\r\n\t\t\tjPanelNewSize.setBorder(new TitledBorder(null, \"New size\", TitledBorder.LEADING, TitledBorder.TOP, null, null));\t\t\r\n\t\t\r\n\t\t\tJPanel pl = new JPanel();\r\n\t\t\tpl.setLayout(new FlowLayout(FlowLayout.CENTER, 10, 5));\r\n\t\t\tpl.add(this.getJPanelNewWidth());\r\n\t\t\tpl.add(this.getJPanelNewHeight());\t\r\n\t\t\t\r\n\t\t\tjPanelNewSize.add(pl);\t\r\n\t\t\tjPanelNewSize.add(getJButtonMaxImgSize());\r\n\t\t\t\r\n\t\t}\r\n\t\treturn jPanelNewSize;\r\n\t}", "public void setStructureSize(int size) {\n\t\tmStructureSize = size;\n\t\tvalidateSize();\n\t\trepaint();\n\t\t}", "private void actionBiggerCells() {\n layoutPanel.changeCellSize(true);\n }", "public Dimension getPreferredSize() {\n return new Dimension(panelWidth, panelHeight);\n }", "@Override\r\n\tprotected void onSizeChanged(int w, int h, int oldw, int oldh) {\n\t\tsuper.onSizeChanged(w, h, oldw, oldh);\r\n\t\t// 图所占范围大小\r\n\t\tchart.setChartRange(w, h);\r\n\t}", "void setPaperSize(short size);", "public abstract void resizeFrame(JFrame frame, int fontSize);", "private void resize() {\n }", "private void changeSize(float omegaDeg) {\n\n setSize(resolutionIntoWorldUnits(currentRegion.getRegionWidth(), WORLD_SIZE, 1080),\n resolutionIntoWorldUnits(currentRegion.getRegionHeight(), WORLD_SIZE, 1080)); // Change 1080 based on the targetResolution of the shields' own targetResolution.\n //Gdx.app.log(TAG, \"After = (\" + getWidth() + \", \" + getHeight() + \")\");\n\n float theTipOfTheShield = SHIELDS_RADIUS + (SHIELDS_RADIUS - SHIELDS_INNER_RADIUS);\n /*setY(theTipOfTheShield - getHeight());\n setX(getWidth()/2f);*/\n setX(theTipOfTheShield - getWidth());\n setY(-getHeight()/2f);\n\n setOrigin(-getX(), -getY());\n setRotation(90);\n }", "void setSize(int width, int height)\r\n\t{\r\n\t\tthis.controls.clear();\r\n\r\n\t\tthis.width = width;\r\n\t\tthis.height = height;\r\n\t\t\r\n\t\tthis.innerHeight = this.height - TOP - BOTTOM;\r\n\t\tthis.innerWidth = this.width - (MARGIN * 2) - 6;\r\n\t}", "public void componentResized(ComponentEvent e)\n/* 410: */ {\n/* 411:478 */ TileGIS.this.mapPanel.setSize(TileGIS.this.placeholder.getJComponent().getSize());\n/* 412: */ }", "@Override\n\tpublic void componentResized(ComponentEvent e) {\n\t\tcardPanel.setPreferredSize(new Dimension(appFrame.getWidth(), appFrame.getCentrePanel().getHeight() * 2 / 3));\n\t\tsummaryPanel.setPreferredSize(new Dimension(appFrame.getWidth(), appFrame.getCentrePanel().getHeight() / 3));\n\t\t\n\t\tcardPanel.repaint();\n\t\tcardPanel.revalidate();\n\t\tsummaryPanel.repaint();\n\t\tsummaryPanel.revalidate();\n\t}" ]
[ "0.7713248", "0.7524674", "0.7390342", "0.7390342", "0.73049504", "0.7297247", "0.7287877", "0.72575605", "0.72056866", "0.7194667", "0.71936774", "0.7149212", "0.7099524", "0.7032055", "0.70257044", "0.7003029", "0.69927365", "0.69807076", "0.69569856", "0.69372016", "0.69220525", "0.69079524", "0.6901617", "0.68907666", "0.6890206", "0.6850877", "0.6850032", "0.6829953", "0.681279", "0.6795665", "0.6785915", "0.67801046", "0.6755278", "0.67399853", "0.67300034", "0.67164433", "0.6675373", "0.66740364", "0.6663599", "0.66499907", "0.664743", "0.6643624", "0.66394436", "0.66351295", "0.66294694", "0.66170764", "0.6608554", "0.6602091", "0.6593765", "0.65889406", "0.6585023", "0.65555066", "0.65389234", "0.65389234", "0.65358704", "0.6531226", "0.65310854", "0.65304935", "0.65119773", "0.6506152", "0.64831877", "0.6482397", "0.6431582", "0.6430802", "0.64239246", "0.64239246", "0.64239246", "0.64239246", "0.64099884", "0.6392128", "0.63840616", "0.6373649", "0.6373035", "0.6367643", "0.6361755", "0.63608575", "0.63429195", "0.63428825", "0.6335919", "0.6326842", "0.63254994", "0.6325015", "0.6320752", "0.63188523", "0.63114977", "0.63071924", "0.63071924", "0.6306474", "0.6299117", "0.6257205", "0.6250739", "0.6245451", "0.62441", "0.62334836", "0.6233186", "0.62268925", "0.62132347", "0.6211778", "0.6192554", "0.61924195" ]
0.6499295
60
Changes the panel's position
public void changePosition(int width, int height) { this.left = width; this.top = height; updateBounds(); updateChildren(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void setPosition(int left)\n\t{\n\t\t_mainPanel.getElement().getStyle().setLeft(left, Style.Unit.PX) ;\n\t}", "public void setNPPosition(IPanel panel, NPPos position){\n positions.put(panel, position);\n\n }", "public void resetHorizontalPanelPosition() {\n setHorizontalPanelTranslation(0.0f);\n }", "public void setMovePanel(Widget movePanel) {\n this.movePanel = movePanel;\n }", "void updatePosition() {\n if (gameScreen.cursorIsOnLeft()) \n {\n // set the panel's rightmost edge to be 1/12th from the edge\n // set the panel's bottommost edge to be 1/6th from the edge\n setLocation(\n gameScreen.getScreenWidth() * 11/12 - getWidth(), \n gameScreen.getScreenHeight() * 5/6 - getHeight());\n }\n else // Otherwise the cursor must be on the right half of the screen\n {\n // set the panel's leftmost edge to be 1/12th from the edge\n // set the panel's bottommost edge to be 1/6th from the edge\n setLocation(\n gameScreen.getScreenWidth() * 1/12, \n gameScreen.getScreenHeight() * 5/6 - getHeight());\n }\n }", "private void updatePosition(){\n updateXPosition(true);\n updateYPosition(true);\n }", "public void setPanel (JPanel panel)\n {\n // remove the old panel\n removeAll();\n\t// add the new one\n\tadd(panel, BorderLayout.CENTER);\n // swing doesn't properly repaint after adding/removing children\n revalidate();\n repaint();\n }", "void setPosition(double xPos, double yPos);", "private void PanelPertamaMouseDragged(java.awt.event.MouseEvent evt) {\n int x = evt.getXOnScreen();\n int y = evt.getYOnScreen();\n this.setLocation(x - xx, y - xy);\n }", "public void setPosicao() {\n Dimension d = this.getDesktopPane().getSize();\n this.setLocation((d.width - this.getSize().width) / 2, (d.height - this.getSize().height) / 2);\n }", "public void showOPanel(Point p) {\r\n \r\n \t}", "private void jPanel2MouseDragged(java.awt.event.MouseEvent evt) {\n int x = evt.getXOnScreen();\n int y = evt.getYOnScreen();\n this.setLocation(x - xx, y - xy);\n }", "void reconfigure() {\n computePosition(_primaryPlot.getScreenCoords(findCurrentCenterPoint()), false);\n }", "public void move(){\n\t\t\tbx += (int)movex;\n\t\t\tby += (int)movey;\n\t\t\tthis.setBounds((int)bx,(int)by,10,10);\n\n\t\t\t\n\t\t}", "public static void initialPosition(DrawingPanel panel) {\n int i = 0;\n int h = panel.getHeight();\n int w = panel.getWidth();\n\n while (i<numShapes){\n if (w < h) {\n xTopLeft[i] = panel.getWidth() / 2;\n yTopLeft[i] = panel.getWidth() / 2;\n }\n else if (h < w){\n xTopLeft[i] = panel.getHeight() / 2;\n yTopLeft[i] = panel.getHeight() / 2;\n }\n else{\n xTopLeft[i] = panel.getWidth() / 2;\n yTopLeft[i] = panel.getHeight() / 2;\n }\n ++i;\n }\n showShapes(panel, true);\n panel.sleep(100);//lets panel delay for 1/10th of a second\n }", "@Override\n public void setPosition(float x, float y) {\n }", "@Override\n\tpublic void relocate()\n\t{\n\n\t\tint w = 380, h = 65;\n\t\tint x = (this.getWidth() - w) / 2, y = (this.getHeight() - h) / 2;\n\n\t\tfullRevisionLabel.setLocation(x, y);\n\t\tfullRevisionField.setLocation(x + 280, y);\n\n\t\tminimumCommonSequenceLabel.setLocation(x, y + 40);\n\t\tminimumCommonSequenceField.setLocation(x + 280, y + 40);\n\t}", "public void setOrigin(int x, int y) {\n ic.setOrigin(x, y);\n notifyViewportListeners(x, y, panelWidth, panelHeight);\n }", "public void setPosition(float x, float y);", "public void setRight(JPanel panel);", "public void setPosition(Point newPosition);", "public void setPosicao() {\n Dimension d = this.getDesktopPane().getSize();\n this.setLocation((d.width - this.getSize().width) / 2, (d.height - this.getSize().height) / 2); \n}", "@Override\n public void setCoord(PuertoPosition pp, Point2D newCoord) {\n layout.setLocation(pp, newCoord);\n }", "public void setPosition(Position pos);", "private void btnEditarMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnEditarMouseClicked\r\n \r\n anim.jPanelXRight(-200, 0, 2, 1, PanelEditPartida); \r\n anim.jPanelXLeft(0, -200, 2, 1, PanelEditPartida);\r\n \r\n \r\n // TODO add your handling code here:\r\n }", "private void configurePanel(ContentPanel panel){\r\n\t\t\t\tpanel.setSize(325, 185);\t\t\t\t\r\n\t\t\t\tpanel.setHeaderVisible(false);\r\n\t\t\t\tpanel.setBodyStyle(\"padding:7px\");\r\n\t\t\t\tpanel.setScrollMode(Scroll.AUTOY);\r\n\t\t\t\tpanel.setStyleAttribute(\"marginTop\", \"15px\");\r\n\t\t\t}", "void setPos(float x, float y);", "private void setPanel()\r\n\t{\r\n\t\tpanel = new JPanel();\r\n\t\tpanel.setLayout(new GridLayout(5, 2));\r\n\t\t\r\n\t\tpanel.add(bubbleL);\r\n\t\tpanel.add(bubblePB);\r\n\t\t\r\n\t\tpanel.add(insertionL);\r\n\t\tpanel.add(insertionPB);\r\n\t\t\r\n\t\tpanel.add(mergeL);\r\n\t\tpanel.add(mergePB);\r\n\t\t\r\n\t\tpanel.add(quickL);\r\n\t\tpanel.add(quickPB);\r\n\t\t\r\n\t\tpanel.add(radixL);\r\n\t\tpanel.add(radixPB);\r\n\t}", "public void setPosition(float x, float y)\n {\n bounds.offsetTo(\n x - positionAnchor.x,\n y - positionAnchor.y);\n notifyParentOfPositionChange();\n conditionallyRelayout();\n }", "public void setPostion(int newXPosition, int newYPosition) {\n xPosition = newXPosition;\n yPosition = newYPosition;\n }", "protected final void windowLocationControl(){\n\t\tthis.setLocation(0, 0);\n\t}", "void setPosition(Position position);", "void setPosition(Position position);", "private void componentPositionAdjustment() {\n // set the y position of each element\n AnchorPane.setTopAnchor(nameLabel, 30.0);\n AnchorPane.setTopAnchor(name, 30.0);\n AnchorPane.setTopAnchor(fiberLabel, 70.0);\n AnchorPane.setTopAnchor(proteinLabel, 110.0);\n AnchorPane.setTopAnchor(fatLabel, 150.0);\n AnchorPane.setTopAnchor(caloriesLabel, 190.0);\n AnchorPane.setTopAnchor(carbohydrateLabel, 230.0);\n AnchorPane.setTopAnchor(fiber, 70.0);\n AnchorPane.setTopAnchor(calories, 190.0);\n AnchorPane.setTopAnchor(fat, 150.0);\n AnchorPane.setTopAnchor(carbohydrate, 230.0);\n AnchorPane.setTopAnchor(protein, 110.0);\n AnchorPane.setTopAnchor(id, 270.0);\n AnchorPane.setTopAnchor(idLabel, 270.0);\n AnchorPane.setTopAnchor(confirm, 310.0);\n AnchorPane.setTopAnchor(cancel, 310.0);\n // set the x position of each element\n AnchorPane.setLeftAnchor(fiberLabel, 20.0);\n AnchorPane.setLeftAnchor(proteinLabel, 20.0);\n AnchorPane.setLeftAnchor(fatLabel, 20.0);\n AnchorPane.setLeftAnchor(caloriesLabel, 20.0);\n AnchorPane.setLeftAnchor(carbohydrateLabel, 20.0);\n AnchorPane.setLeftAnchor(nameLabel, 20.0);\n AnchorPane.setLeftAnchor(idLabel, 20.0);\n AnchorPane.setLeftAnchor(name, 120.0);\n AnchorPane.setLeftAnchor(fiber, 120.0);\n AnchorPane.setLeftAnchor(calories, 120.0);\n AnchorPane.setLeftAnchor(fat, 120.0);\n AnchorPane.setLeftAnchor(id, 120.0);\n AnchorPane.setLeftAnchor(carbohydrate, 120.0);\n AnchorPane.setLeftAnchor(protein, 120.0);\n AnchorPane.setLeftAnchor(confirm, 50.0);\n AnchorPane.setLeftAnchor(cancel, 200.0);\n }", "@Override\r\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\t_translateX += _deltaX;\r\n\t\t\t\t\tlayoutContainer(_container);\r\n\t\t\t\t}", "public void setPosition(int posX, int posY) {\n\t}", "public void setLocation(Point p) {\n // Not supported for MenuComponents\n }", "private void affCarte (JPanel panel, int position) {\r\n\t\tconstraints.gridwidth = 2;\r\n\t\tconstraints.gridheight = 2;\r\n\t\t// On regarde quelle carte doit etre ajoutee\r\n\t\tswitch (position) {\r\n\t\t\tcase 0 : \r\n\t\t\t\tconstraints.gridx = 9;\r\n\t\t\t\tconstraints.gridy = 4;\r\n\t\t\t\tlayout.addLayoutComponent(panel, constraints);\r\n\t\t\t\tthis.add(panel);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 1 : \r\n\t\t\t\tconstraints.gridx = 8;\r\n\t\t\t\tconstraints.gridy = 4;\r\n\t\t\t\tlayout.addLayoutComponent(panel, constraints);\r\n\t\t\t\tthis.add(panel);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 2 : \r\n\t\t\t\tconstraints.gridx = 7;\r\n\t\t\t\tconstraints.gridy = 4;\r\n\t\t\t\tlayout.addLayoutComponent(panel, constraints);\r\n\t\t\t\tthis.add(panel);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 3 : \r\n\t\t\t\tconstraints.gridx = 6;\r\n\t\t\t\tconstraints.gridy = 4;\r\n\t\t\t\tlayout.addLayoutComponent(panel, constraints);\r\n\t\t\t\tthis.add(panel);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 4 : \r\n\t\t\t\tconstraints.gridx = 5;\r\n\t\t\t\tconstraints.gridy = 4;\r\n\t\t\t\tlayout.addLayoutComponent(panel, constraints);\r\n\t\t\t\tthis.add(panel);\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}", "@Override\n protected void positionChanged () {\n\n\n valueLabel.setPosition( this.getX() + ((this.getScaleX() * this.getWidth() - valueLabel.getScaleX() * valueLabel.getWidth()) / 2),\n this.getY() + ((this.getScaleY() * this.getHeight() - valueLabel.getScaleY() * valueLabel.getHeight()) / 2) );\n }", "public void setPosition(Point position);", "@Override\n\tpublic void updatePosition() {\n\t\t\n\t}", "public void setPosition(ScreenPoint p) {\n setX(p.x);\n setY(p.y);\n }", "@Override\n public void mouseDragged(MouseEvent evt) {\n setLocation(evt.getXOnScreen() - posX, evt.getYOnScreen() - posY);\n }", "public planillaInsert() {\n initComponents();\n int lebar = this.getWidth()/2;\n int tinggi = this.getHeight()/2;\n int x = (Toolkit.getDefaultToolkit().getScreenSize().width/2)-lebar;\n int y = (Toolkit.getDefaultToolkit().getScreenSize().height/2)-tinggi;\n this.setLocation(x, y);\n }", "@Override\n public void setDisplayedLocation(Location loc) {\n pane.setVvalue(loc.getyCoord());\n pane.setHvalue(loc.getxCoord());\n setCurrentFloor(loc.getLevel());\n displayedLocation = getDisplayedLocation();\n }", "void setPosition(Position p);", "@Override\npublic void setControlXControlY(int newControlXValue, int newControlYValue) {\n\tsetControlX(newControlXValue);\n\tsetControlY(newControlYValue);\n\t\n}", "void setPosition(Point point);", "public void setPos(int pos);", "public void setPos(int pos);", "public void setStylePanel(StylePanel stylePanel);", "public void setupPanel() {\n\t\tpanel = new JPanel();\n\t\tpanel.setLayout(new ModifiedFlowLayout(FlowLayout.LEFT));\n\t\tpanel.setBackground(Color.BLACK);\n\t\tpanel.setOpaque(true);\n\t}", "public void initPanel()\n\t{\n\t\tthis.setVisible(false);\n\t\t//this.setLayout(new BorderLayout());\n \n\t\t//*Layout setup\n\t\t\n\t\tGroupLayout layout = new GroupLayout(this);\n\t\t//this.setLayout(layout);\n\n\t\tlayout.setAutoCreateGaps(true);\n\t\tlayout.setAutoCreateContainerGaps(true);\t\t\n\t\t\t\t\n\t\t//frame = new JFrame();\n offscreenImage = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);\n onscreenImage = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);\n offscreen = offscreenImage.createGraphics();\n onscreen = onscreenImage.createGraphics();\n setXscale();\n setXscale();\n offscreen.setColor(DEFAULT_CLEAR_COLOR);\n offscreen.fillRect(0, 0, width, height);\n setPenColor();\n setPenRadius();\n setFont();\n clear();\n\n // add antialiasing\n RenderingHints hints = new RenderingHints(RenderingHints.KEY_ANTIALIASING,\n RenderingHints.VALUE_ANTIALIAS_ON);\n hints.put(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);\n offscreen.addRenderingHints(hints);\n\n \n // frame stuff\n ImageIcon icon = new ImageIcon(onscreenImage);\n drawLabel = new JLabel(icon);\n\n drawLabel.addMouseListener(this);\n drawLabel.addMouseMotionListener(this);\n \n //Create buttons\n resetButton = new JButton();\n undoButton = new JButton();\n \n undoButton.setVisible(true);\n undoButton.setEnabled(true);\n undoButton.setName(\"Undo\");\n undoButton.setText(\"Undo\");\n undoButton.setSize(75, 30);\n undoButton.setPreferredSize(new Dimension(75,30));\n \n resetButton.setVisible(true);\n resetButton.setEnabled(true);\n resetButton.setName(\"Reset\");\n resetButton.setText(\"Reset\");\n \tresetButton.setSize(75, 30);\n \tresetButton.setPreferredSize(new Dimension(75,30));\n \t\n //this.add(resetButton, BorderLayout.NORTH);\n //this.add(undoButton, BorderLayout.NORTH);\n \n // JPanel mainPanel = new JPanel(new BorderLayout());\n\n // JPanel northPanel = new JPanel();\n // northPanel.add(resetButton);\n // northPanel.add(undoButton);\n // mainPanel.add(northPanel, BorderLayout.NORTH);\n // mainPanel.add(drawLabel, BorderLayout.CENTER);\n \n\n // generalColorValue = getColorParameter(Skin.GENERAL_TEXT_COLOR); \n //controlColorValue = getColorParameter(Skin.CONTROL_BACKGROUND_COLOR); \n \n\t\t//trimColorValue = getColorParameter(Skin.TRIM_COLOR); \n\t \n\t\tinitComboBox();\n\t\t//this.setContentPane(drawLabel); <---------------------------\n this.add(drawLabel, BorderLayout.CENTER);\n \n this.addKeyListener(this); // JLabel cannot get keyboard focus\n this.setResizable(true);\n this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); // closes all windows\n //this.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); // closes only current window\n this.setTitle(name);\n // frame.setJMenuBar(createMenuBar());\n this.pack();\n this.requestFocusInWindow();\n this.setVisible(true);\n \n\t}", "public void setPosition(Position p);", "public void setPosition(int position);", "public void setPosition(Point position){\r\n this.position.set(position.x, position.y);\r\n\r\n this.shadow.setPosition(position);\r\n this.surface.setPosition(position);\r\n this.shading.setPosition(position);\r\n\r\n\r\n this.setBounds(new Rect(\r\n this.position.x - this.radius,\r\n this.position.y - this.radius,\r\n this.position.x + this.radius,\r\n this.position.y + this.radius\r\n ));\r\n \r\n }", "private void setPanel(final Panel PANEL)\r\n\t{\r\n\t\tthis.panel = PANEL;\r\n\t}", "public void setPanel(JPanel ballPanel);", "@Override\n\tpublic void Update(JPanel panel) {\n\t\t\n\t}", "public void setPositionPauseMenu(){\r\n\t\tpauseMenu.setPosition(camera.position.x- canvas.getWidth()/PAUSE_MENU_POSITION_SCALE , camera.position.y-canvas.getHeight()/PAUSE_MENU_POSITION_SCALE );\r\n\t}", "@Override\n public void setupPanel()\n {\n\n }", "public void resetRobotPositionOnUI() {\r\n\t\tthis.x = checkValidX(1);\r\n\t\tthis.y = checkValidY(1);\r\n\t\ttoggleValid();\r\n\t\trobotImage.setLocation(Constant.MARGINLEFT + (Constant.GRIDWIDTH * 3 - Constant.ROBOTWIDTH)/2 + (x-1) * Constant.GRIDWIDTH, Constant.MARGINTOP + (Constant.GRIDHEIGHT * 3 - Constant.ROBOTHEIGHT)/2 + (y-1) * Constant.GRIDHEIGHT);\r\n\t\t\r\n\t}", "@Override\n\tpublic void setPos(int x, int y) {\n\t\txPos = x;\n\t\tyPos = y;\n\t}", "private void setMainPanel(Component comp) {\r\n\t\tcomp.setLocation(LEFT_BUTTON_PADDING*2+BUTTON_WIDTH, TOP_BUTTON_PADDING/2);\r\n\t\tcomp.setSize(GRID_SIZE,GRID_SIZE);\r\n\t}", "public abstract void setPosition(Position position);", "public void setLabelPosition(int x, int y);", "public void setPosition(int x, int y)\n\t{\n\t\tint w = getSize().width;\n\t\tint h = getSize().height;\n\n\t\tpos.x = x;\n\n\t\tpos.y = y;\n\n\t\trect.setLocation(x - w / 2, y - h / 2);\n\t}", "public void setLoc(int x, int y)\n {\n powerUp.setBounds(x,y,65,29);\n text.setBounds(x,y,65,29);\n }", "public void place(){\n\t\tplace((float) Math.floor(Main.mouseSelector.x)+0.5f,(float) Math.floor(Main.mouseSelector.y)+0.5f);\r\n\t}", "@Override public void setPosition(double nx, double ny) {\n super.setPosition(nx, ny);\n ppx = px = nx;\n ppy = py = ny;\n }", "public void setPosition(){\r\n currentPosition = 0; \r\n }", "private void setUpPanel() { \n this.setPreferredSize(new Dimension(myWidth, myHeight)); \n // Set this panel as a grid panel with 1 column, 6 rows. \n this.setLayout(new GridLayout(NUM_ROWS, 1)); \n // Create the next piece panel.\n this.myNextPiece = new TetrisNextPiecePanel();\n this.add(myNextPiece); \n // Add another panel which will show game instruction.\n final HowToPlayPanel instructionsPanel = new HowToPlayPanel();\n this.add(instructionsPanel);\n // add the last panel which will show the scores, level, game state etc.\n this.setUpLastPanel();\n }", "public void updatePosition() {\n \t\r\n \tx += dx;\r\n \ty += dy;\r\n \t\r\n\t}", "public void setCurrentPanel(WindowPanel panel) {\n\t\t\n\t\tLOG.log(\"Setting the current panel.\");\n\t\t\n\t\tCURRENT_PANEL = panel;\n\t\t\n\t\tcreateContentPane();\n\t\tthis.setContentPane(CONTENT_PANE);\n\t\t\n\t\tCURRENT_PANEL.build();\n\t\tCONTENT_PANE.add(CURRENT_PANEL, BorderLayout.CENTER);\n\t\t\n\t}", "private void formMouseDragged(java.awt.event.MouseEvent evt) {\n this.setLocation(this.getX()+evt.getX()-mouseX, this.getY()+evt.getY()-mouseY);\n }", "@Override\n\t\tpublic void setPane(JPanel pane) {\n\t\t\t\n\t\t}", "public void setLocation(int y)\r\n {\r\n pencil.setBounds(110, y, 26, 26);\r\n minus.setBounds(136, y, 26, 26);\r\n draggable.setBounds(20, y, 90, 16);\r\n visible.setLocation(164, y+5);\r\n checkbox.setLocation(136, y);\r\n text.setLocation(20,y);\r\n }", "private void swapPanels(JPanel panel){\n setVisible(false);\n getParent().add(panel);\n panel.setVisible(true); \n }", "private void setupPanel()\n\t{\n\t\tthis.setLayout(baseLayout);\n\t\tthis.add(firstButton);\n\t\tthis.add(firstField);\n\t}", "public final void setPosition(float x, float y) {\n\t\ttranslate(x - this.x(), y - this.y());\n\t}", "private void setCurrentPos() {\n\t\tcurrentPos=layout_Circle[l.y][l.x];\n\t\tcurrentPos.setFill(Paint.valueOf(\"Red\"));\n\n\t\tsetValidMoves();\n\t}", "public void setViewPosition(Point p) {\r\n Component parent = getParent();\r\n if ( parent instanceof JScrollPane &&\r\n ((JScrollPane)parent).getVerticalScrollBar().getValueIsAdjusting() ) {\r\n // value is adjusting, skip repaint\r\n return;\r\n }\r\n super.setViewPosition(p);\r\n }", "public void setPanel(SensorPanelPresenter panel) {\n this.panel = panel;\n }", "public void setPosition(Position pos) {\n \tthis.position = pos;\n \t//setGrade();\n }", "private void setPosition(float x, float y) {\n this.x = x;\r\n this.y = y;\r\n group();\r\n }", "@Override\r\n\t\t\tpublic void mouseMove(MouseEvent e) {\n\t\t\t\tif(x>0)\r\n\t\t\t\t{\r\n\t\t\t\t\tshell.setLocation(e.x-x + shell.getLocation().x,\r\n\t\t\t\t\t\te.y-y + shell.getLocation().y);\r\n\t\t\t\t}\r\n\t\t\t}", "public void putExtenderDown(){\n extender.setPosition(1);\n }", "public void resetPaddleToStartingPosition(){\n myRectangle.setX(initialXLocation);\n }", "public void move(int x, int y, int width, int height) {\n\tframe.setBounds(x, y, width, height);\n }", "public void setPosicion(){\n ejeX = 0;\n ejeY = 0;\n }", "public void mouseDragged(MouseEvent evt) {\n\t\t\t\tframe.setLocation(evt.getXOnScreen() - posX, evt.getYOnScreen() - posY);\r\n\r\n\t\t\t}", "public static void setWidgetPosition(Widget widget, int x, int y) {\n\t\t_setElementPosition(widget.getElement(), x, y);\n\t}", "public void show() {\n\t\tsetLocation(\n\t\t\tgetOwner().getX() + (getOwner().getWidth() - getWidth()) / 2, \n\t\t\tgetOwner().getY() + (getOwner().getHeight() - getHeight()) / 2 );\n\n\t\tsuper.show();\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\twin.change(\"jpanel01\");\n\t\t\t}", "public void PositionSet(int position);", "public void display() {\r\n \tsetLocation((int)parent.getLocationOnScreen().getX() + (parent.getWidth()/2) - (getWidth()/2), (int)parent.getLocationOnScreen().getY() + (parent.getHeight()/2) - (getHeight()/2));\r\n \tsetVisible(true);\r\n }", "public void setViewPosition(Point p) {\n synchronized (scrollPane.getTreeLock()) {\n // Scroll the view now...\n super.setViewPosition(p);\n }\n }", "public void changePos(double xP, double yP){ \n this.xCoor += xP;\n this.yCoor += yP;\n \n }", "public void doLayout() {\n\t if(editingComponent != null) {\n\t\tDimension cSize = getSize();\n\n\t\teditingComponent.getPreferredSize();\n\t\teditingComponent.setLocation(offset, 0);\n\t\teditingComponent.setBounds(offset, 0,\n\t\t\t\t\t cSize.width - offset,\n\t\t\t\t\t cSize.height);\n\t }\n\t}", "private void initPanel() {\n\t\tthis.panel = new JPanel();\n\t\tthis.panel.setBounds(5, 5, 130, 20);\n\t\tthis.panel.setLayout(null); \n\n\t}" ]
[ "0.7395562", "0.69749296", "0.6810663", "0.678596", "0.6751656", "0.67082906", "0.6695404", "0.6626769", "0.65750843", "0.65096045", "0.6402145", "0.6344753", "0.6344322", "0.6319681", "0.6317821", "0.63031757", "0.6281402", "0.6278042", "0.62746966", "0.62731916", "0.62550426", "0.6248837", "0.6247525", "0.62206405", "0.62158066", "0.6214607", "0.6188125", "0.61764276", "0.6167732", "0.6149154", "0.6139397", "0.6127034", "0.6127034", "0.612487", "0.6114732", "0.6083059", "0.6056378", "0.6026614", "0.60189253", "0.5991547", "0.59705305", "0.596628", "0.5962627", "0.5959669", "0.59530354", "0.59517384", "0.59445286", "0.59423983", "0.593452", "0.593452", "0.59133977", "0.5913324", "0.59068996", "0.59031785", "0.5903124", "0.59027237", "0.5900618", "0.59004736", "0.58942324", "0.589356", "0.5891248", "0.5886948", "0.5882459", "0.5880659", "0.58769226", "0.5876195", "0.58636", "0.5863508", "0.58601177", "0.5859975", "0.58562815", "0.5847557", "0.58379984", "0.5836395", "0.5833031", "0.5832913", "0.58302826", "0.5820559", "0.581565", "0.5802447", "0.5797963", "0.5797282", "0.5793827", "0.57807857", "0.57723", "0.57715917", "0.57682174", "0.5762683", "0.5758902", "0.57581115", "0.57575244", "0.57564735", "0.574994", "0.574969", "0.5743904", "0.5737575", "0.5737307", "0.5734814", "0.5730728", "0.57283336" ]
0.6206439
26
Returns the panel's width
public int getPanelWidth() { return width; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getPanelWidth() {\n\t\treturn this.m_panelWidth;\n\t}", "public int getWidth();", "public int getWidth();", "public int getWidth();", "public double getWidth();", "public double getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "public int getWidth()\r\n\t{\r\n\t\treturn WIDTH;\r\n\t}", "public float getWidth();", "public int getWidth() {\n return mPresentationEngine.getWidth();\n }", "@Override\n\tpublic int getWidth() {\n\t\treturn windowWidth;\n\t}", "double getWidth();", "double getWidth();", "public static int getWidth()\r\n\t{\r\n\t\treturn width;\r\n\t}", "@Override\n\tpublic Dimension getSize() \n\t{\n\t\treturn panel.getSize();\n\t}", "public int getWidth() {\n return mySize.getWidth();\n }", "@Override\n\tpublic int getWidth() {\n\n\t\treturn ((WorldWindowSWTGLCanvas) slave).getCanvas().getSize().x;\n\t}", "public int getWidth(){\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\r\n\t}", "public int getWidth()\r\n\t{\r\n\t\treturn width;\r\n\t}", "long getWidth();", "public int getWidth () {\r\n\tcheckWidget();\r\n\tint [] args = {OS.Pt_ARG_WIDTH, 0, 0};\r\n\tOS.PtGetResources (handle, args.length / 3, args);\r\n\treturn args [1];\r\n}", "public int getWidth() {\r\n return width;\r\n }", "public int getWidth() {\r\n return Display.getWidth();\r\n }", "public int getWidth() {\r\n\t\treturn width;\r\n\t}", "public int getWidth() {\r\n\t\treturn width;\r\n\t}", "public int getWidth() {\r\n return width;\r\n }", "public double getWidth() {\n return getElement().getWidth();\n }", "public int getWidth() \n\t{\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn canvasWidth;\n\t}", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth()\n {\n return width;\n }", "public int getWidth()\n {\n return width;\n }", "public int getWidth()\n {\n return width;\n }", "public int getWidth()\n\t{\n\t\treturn width;\n\t}", "public int getWidth()\n\t{\n\t\treturn width;\n\t}", "public int getWidth() {\r\n\t\t\r\n\t\treturn width;\r\n\t}", "public int getWidth()\r\n\t{\r\n\t\treturn mWidth;\r\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public final int getWidth() {\r\n return width;\r\n }", "public int getWidth() { return width; }", "public int getWidth() { return width; }", "public double getWidth() {\r\n\r\n\t\treturn w;\r\n\r\n\t}", "public int getWidth() {\r\n return Width;\r\n }", "public int getWidth()\n {\n return this.width;\n }", "public int getWidth()\n {\n\treturn width;\n }", "public int getWidth() {\n return mWidth;\n }", "public final int getWidth() {\r\n return (int) size.x();\r\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public double getWidth () {\n return width;\n }", "public int getWidth()\n\t{\n\t\treturn mWidth;\n\t}", "public int getWidth(){\n \treturn width;\n }", "public int getWidth(){\n return width;\n }", "public int getWidth() {\n\t\t\treturn width;\n\t\t}", "int getWidth() {return width;}", "public int getWidth() {\n return this.width;\n }", "public int getWidth() {\n return this.width;\n }", "public int getWidth() {\r\n\t\treturn this.width;\r\n\t}", "public double getWidth() {\r\n return width;\r\n }" ]
[ "0.86050713", "0.7488666", "0.7488666", "0.7488666", "0.7446134", "0.7446134", "0.7412377", "0.7412377", "0.7412377", "0.7412377", "0.7412377", "0.7412377", "0.7412377", "0.7412377", "0.7412377", "0.7412377", "0.7412377", "0.7412377", "0.7412377", "0.7412377", "0.7412377", "0.7412377", "0.7412377", "0.731112", "0.73025066", "0.7290494", "0.7275266", "0.7273564", "0.7273564", "0.7273232", "0.725244", "0.7229685", "0.7229282", "0.72054756", "0.7199496", "0.7196639", "0.7185474", "0.71847296", "0.71816725", "0.7180548", "0.7176025", "0.7176025", "0.71744007", "0.71612436", "0.716003", "0.7159583", "0.7152196", "0.7152196", "0.7152196", "0.7152196", "0.7152196", "0.7152196", "0.7152196", "0.7152196", "0.7152196", "0.7152196", "0.7152196", "0.7152196", "0.7152196", "0.7147349", "0.7147349", "0.7147349", "0.7141492", "0.7141492", "0.7139674", "0.7129965", "0.71252877", "0.71252877", "0.71252877", "0.71252877", "0.71252877", "0.71252877", "0.71252877", "0.71252877", "0.71252877", "0.71252877", "0.71252877", "0.71252877", "0.71252877", "0.7117005", "0.71028614", "0.71028614", "0.7100825", "0.7093728", "0.7090318", "0.70895207", "0.70891887", "0.70872986", "0.7082471", "0.7082471", "0.7080671", "0.7075784", "0.7075184", "0.7070474", "0.7068848", "0.70602375", "0.7045514", "0.7045514", "0.7042961", "0.7040535" ]
0.89854383
0
Returns the panel's height
public int getPanelHeight() { return height; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getPanelHeight() {\n\t\treturn this.m_panelHeight;\n\t}", "public final int getHeight() {\r\n return (int) size.y();\r\n }", "public double getHeight() {\n return getElement().getHeight();\n }", "public int getMaxPanelHeight() {\n if (!this.mKeyguardBypassController.getBypassEnabled() || this.mBarState != 1) {\n return getMaxPanelHeightNonBypass();\n }\n return getMaxPanelHeightBypass();\n }", "public double getHeight();", "public double getHeight();", "public int getHeight() {\n\t\treturn canvasHeight;\n\t}", "int getheight();", "public int getHeight();", "public int getHeight();", "public int getHeight();", "public int getHeight();", "public int getHeight();", "public int getHeight();", "public int getHeight()\r\n\t{\r\n\t\treturn HEIGHT;\r\n\t}", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public final int getHeight() {\r\n return height;\r\n }", "public int getHeight() {\n return mPresentationEngine.getHeight();\n }", "double getHeight();", "public int getCurrentHeight();", "public static int getHeight()\r\n\t{\r\n\t\treturn height;\r\n\t}", "public float getHeight();", "@Override\n public int getHeight() {\n return graphicsEnvironmentImpl.getHeight(canvas);\n }", "public int getHeight() {\r\n\t\treturn height;\r\n\t}", "public int getHeight() {\r\n\t\treturn height;\r\n\t}", "public int getHeight() {\n return (int) (this.height * ViewHandlerImpl.getScaleModifier());\n }", "public int getHeight()\r\n\t{\r\n\t\treturn height;\r\n\t}", "public int getHeight() {\r\n\t\t\r\n\t\treturn height;\r\n\t}", "public int getHeight() {\n return height;\n }", "public double getHeight () {\n return height;\n }", "public int getHeight()\n {\n return height;\n }", "public int getHeight() {\n return this.height;\n }", "public int getHeight() {\n return this.height;\n }", "public int getHeight() {\n return this.height;\n }", "public int getHeight() \n\t{\n\t\treturn height;\n\t}", "public int getHeight()\n {\n return this.height;\n }", "public int getHeight() {\n\t\treturn height;\n\t}", "public int getHeight() {\n\t\treturn height;\n\t}", "public int getHeight() {\n\t\treturn height;\n\t}", "public int getHeight() {\n\t\treturn height;\n\t}", "public int getHeight() {\n\t\treturn height;\n\t}", "public int getHeight() {\n\t\treturn height;\n\t}", "public int getHeight() {\n\t\treturn height;\n\t}", "public int getHeight() {\n\t\treturn height;\n\t}", "public int getHeight() {\n\t\treturn height;\n\t}", "public int getHeight() {\n\t\treturn height;\n\t}", "public int getHeight() {\n\t\treturn height;\n\t}", "public abstract int layoutHeight();", "public int getHeight() {\r\n return Height;\r\n }", "public int getHeight() {\r\n\t\treturn this.height;\r\n\t}", "public int getHeight()\n\t{\n\t\treturn height;\n\t}", "public int getHeight()\n\t{\n\t\treturn height;\n\t}", "public int getHeight() {\n return mHeight;\n }", "public int getHeight() {\n return mHeight;\n }", "public int getHeight() { return height; }", "public int getHeight() {\n\t\treturn this.height;\n\t}", "private double getHeight() {\n\t\treturn height;\n\t}", "public double getHeight() {\r\n return height;\r\n }", "public int getHeight() {\n\t\t\treturn height;\n\t\t}", "int getHeight();", "int getHeight();", "int getHeight();", "int getHeight();", "int getHeight();", "int getHeight();", "int getHeight();", "int getHeight();", "int getHeight();", "int getHeight();", "int getHeight();", "int getHeight();", "int getHeight();", "int getHeight();", "int getHeight();", "int getHeight();", "public double getHeight() {\n return height;\n }", "public double getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight()\n {\n \treturn height;\n }", "public int getHeight() {\n return this.height;\n }", "public int getHeight() {return height;}", "@Override\n\tpublic int getHeight() {\n\t\treturn this.height;\n\t}", "public double getHeight() {\r\n\t\treturn height;\r\n\t}", "public double getHeight() {\n\t\t\treturn height.get();\n\t\t}", "public double getHeight() {\n\t\treturn height;\n\t}", "public double getHeight() {\n\t\treturn height;\n\t}", "public double getHeight() {\n\t\treturn height;\n\t}", "public double getHeight() {\n\t\treturn height;\n\t}" ]
[ "0.87397784", "0.75520915", "0.7502565", "0.7497543", "0.7464816", "0.7464816", "0.74500793", "0.7437903", "0.7394972", "0.7394972", "0.7394972", "0.7394972", "0.7394972", "0.7394972", "0.73831093", "0.73716575", "0.73716575", "0.73716575", "0.73716575", "0.73716575", "0.73716575", "0.73716575", "0.73716575", "0.73716575", "0.73716575", "0.73716575", "0.7369411", "0.7365498", "0.7362151", "0.73606265", "0.73577774", "0.7357048", "0.73517454", "0.7334986", "0.7334986", "0.733201", "0.73232657", "0.7322756", "0.7321536", "0.7321258", "0.73170197", "0.73108315", "0.73108315", "0.73108315", "0.7305531", "0.7303696", "0.7302688", "0.7302688", "0.7302688", "0.7302688", "0.7302688", "0.7302688", "0.7302688", "0.7302688", "0.7302688", "0.7302688", "0.7302688", "0.7301354", "0.7292521", "0.729104", "0.7290375", "0.7290375", "0.728418", "0.728418", "0.72821856", "0.7273031", "0.7270117", "0.7269109", "0.7266545", "0.72636324", "0.72636324", "0.72636324", "0.72636324", "0.72636324", "0.72636324", "0.72636324", "0.72636324", "0.72636324", "0.72636324", "0.72636324", "0.72636324", "0.72636324", "0.72636324", "0.72636324", "0.72636324", "0.725878", "0.725878", "0.72577316", "0.72577316", "0.72577316", "0.7254883", "0.7253905", "0.7252116", "0.7242651", "0.7242579", "0.72389627", "0.7233702", "0.7233702", "0.7233702", "0.7233702" ]
0.9016781
0
Returns the parent panel. Parent panel needs to be set before. Can also use JPanel's own getPanel method
@Override public UIPanel getParentPanel() { return parentPanel; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Component getParentComponent() {\r\n\t\tif (parentComponent == null) {\r\n\t\t\tif (view != null)\r\n\t\t\t\tparentComponent = view.getComponent(parentComponentName);\r\n\t\t}\r\n\t\treturn parentComponent;\r\n\t}", "public JPanel getParent() {\n\t\treturn cardLayoutPanel;\n\t}", "public WidgetParent getParent() {\n return this.m_parent;\n }", "public PApplet getParent() {\n\t\treturn this.parent;\n\t}", "public PApplet getParent() {\n\t\treturn parent;\n\t}", "private Frame getFrameParent() {\r\n Frame parent;// = new Frame();\r\n Container container = this;\r\n\r\n while (!(container.getParent() instanceof Frame)) {\r\n container = container.getParent();\r\n }\r\n parent = (Frame) container.getParent();\r\n\r\n return parent;\r\n }", "public IPSComponent peekParent();", "public static java.awt.Frame getParent() {\n return parent;\n}", "@Override\n\tpublic JPanel getPanel()\n\t{\n\t\treturn panel;\n\t}", "UIComponent getParent();", "public final Panel getPanel()\r\n\t{\r\n\t\treturn panel;\r\n\t}", "public JPanel getPanel() {\n return panel;\n }", "protected JPanel getPanel() {\n\t\treturn (JPanel) window.getContentPane();\n\t}", "public JPanel getPanel()\n {\n return panel;\n }", "public JPanel getMainPanel() {\n\t\treturn this.mainPanel;\n\t}", "public DrawingComposite getParent() {\n\t\treturn parent;\n\t}", "public ClientDashboardFrame getClientDashboardFrame() {\n return (ClientDashboardFrame) getParent() //JPanel\n .getParent() //JLayeredPanel\n .getParent() //JRootPanel\n .getParent(); //JFrame\n }", "@Override\n\tpublic Panel getPanel() {\n\t\treturn m_currentPanel;\n\t}", "public Object getParent() {\n return this.parent;\n }", "public Object getParent() {\n return this.parent;\n }", "public Object getParent() {\n return this.parent;\n }", "private JDialog getParentDialog() {\n return (JDialog) SwingUtilities.getAncestorOfClass(JDialog.class, this);\n }", "public Object getParent() {\r\n return this.parent;\r\n }", "public JPanel getMainPanelFromGameGUI() {\n\t\treturn gameView.getMainPanel();\n\t}", "public JPanel getJPanel() {\r\n\t\treturn jPanel;\r\n\t}", "public JPanel GetPanel() {\n\t\treturn JPprincipal;\n\t}", "public CoolBar getParent() {\n checkWidget();\n return parent;\n }", "public PafDimMember getParent() {\r\n\t\treturn parent;\r\n\t}", "public Window getParentWindow()\n {\n return LibSwingUtil.getWindowAncestor(parentDialog);\n }", "public JPanel getMainPanel() {\n return mainPanel;\n }", "JPanel getPanel();", "public MainPanel getMainPanel() {\n return panel;\n }", "Window getParent();", "public ILexComponent getParent();", "public ControlPanel controlPanel() {\n return this.controlPanel;\n }", "public JComponent getComponent() { return _panel; }", "public JPanel getPanel() {\n RepositoryPanel repositoryPanel = (RepositoryPanel) repositoryStep.getComponent();\n return repositoryPanel;\n }", "public JFXPanel getPanel()\n {\n return panel;\n }", "public JPanel getJPanel();", "public JPanel getJPanel();", "@Override\n\tpublic JPanel obtenerPanel() {\n\t\treturn null;\n\t}", "@Override\n\tpublic JPanel obtenerPanel() {\n\t\treturn null;\n\t}", "public Node getParent() {\r\n\t\t\treturn parent;\r\n\t\t}", "public Node getParent() {\r\n\t\t\treturn parent;\r\n\t\t}", "public JPanel getPanel(){\n return panel;\n }", "public String getParentContainerXPath()\n\t{\n\t\treturn this.parentContainerXPath;\n\t}", "public String getParent() {\n return _theParent;\n }", "final MenuContainer getParent_NoClientCode() {\n return parent;\n }", "public String getParent() {\r\n return parent;\r\n }", "abstract public Container<?> getParent();", "public String getParent() {\n return parent;\n }", "private javax.swing.JPanel getJPanel() {\n\t\tif(jPanel == null) {\n\t\t\tjPanel = new javax.swing.JPanel();\n\t\t\tjava.awt.FlowLayout layFlowLayout3 = new java.awt.FlowLayout();\n\t\t\tlayFlowLayout3.setHgap(0);\n\t\t\tlayFlowLayout3.setVgap(0);\n\t\t\tlayFlowLayout3.setAlignment(java.awt.FlowLayout.LEFT);\n\t\t\tjPanel.setLayout(layFlowLayout3);\n\t\t\tjPanel.add(PanelIconosCR.getPanelLogo(), null);\n\t\t\tjPanel.add(PanelIconosCR.getPanelIconos(), null);\n\t\t\tjPanel.add(getJPanel2(), null);\n\t\t\tjPanel.add(getJPanel4(), null);\n\t\t\tjPanel.add(getJPanel3(), null);\n\t\t\tjPanel.add(PanelMensajesCR.getAreaMensajes(), null);\n\t\t\tjPanel.add(PanelMensajesCR.getPanelEstadoCaja(), null);\n\t\t\tjPanel.add(PanelMensajesCR.getPanelStatus(), null);\n\t\t\tjPanel.setBackground(new java.awt.Color(242,242,238));\n\t\t\tjPanel.setPreferredSize(new java.awt.Dimension(660,560));\n\t\t\tjPanel.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(69,107,127),1));\n\t\t}\n\t\treturn jPanel;\n\t}", "public void setParentPanel(UIPanel parent) {\n this.parentPanel = parent;\n updateBounds();\n }", "public OwObject getParent()\r\n {\r\n return m_Parent;\r\n }", "public String getParent() {\n return _parent;\n }", "public PageTreeNode getParent() {\n return parent;\n }", "private JPanel getCenterPOCPanel() {\r\n if (this.centerPOCPanel == null) {\r\n GridBagConstraints gridBagConstraints3 = new GridBagConstraints();\r\n gridBagConstraints3.gridx = 0;\r\n gridBagConstraints3.ipadx = 0;\r\n gridBagConstraints3.ipady = -28;\r\n gridBagConstraints3.weightx = 1.0;\r\n gridBagConstraints3.weighty = 1.0;\r\n gridBagConstraints3.fill = java.awt.GridBagConstraints.BOTH;\r\n gridBagConstraints3.gridy = 0;\r\n this.centerPOCPanel = new JPanel();\r\n this.centerPOCPanel.setLayout(new GridBagLayout());\r\n this.centerPOCPanel.add(getCenterPointsOfContactEditorPanel(), gridBagConstraints3);\r\n }\r\n return this.centerPOCPanel;\r\n }", "public String getParent() {\r\n return this.parent;\r\n }", "public ToolBar getParent () {\r\n\tcheckWidget();\r\n\treturn parent;\r\n}", "Spring getParent() {\n return parent;\n }", "public PropertySelector getParent() {\n return parent;\n }", "public XMLPath getParent() {\r\n return this.parent == null ? null : this.parent.get();\r\n }", "private JPanel getJPanel() {\r\n\t\tif (jPanel == null) {\r\n\t\t\tjPanel = new JPanel();\r\n\t\t\tjPanel.setLayout(null);\r\n\t\t\tjPanel.add(getJTextArea(), null);\r\n\t\t\tjPanel.add(getJButton(), null);\r\n\t\t\tjPanel.add(getJEditorPane(), null);\r\n\t\t}\r\n\t\treturn jPanel;\r\n\t}", "public Folder getParentFolder() {\n\t\treturn parentFolder;\n\t}", "public Node getParent() {\n return parent;\n }", "public Node getParent() {\n return parent;\n }", "@Override\n public MElementContainer<MUIElement> getParent()\n {\n return null;\n }", "public CompositeObject getParent(\n )\n {return (parentLevel == null ? null : (CompositeObject)parentLevel.getCurrent());}", "public AppPanel getPanel()\n\t\t{\n\t\t\treturn panel;\n\t\t}", "public EventNode getParent() {\n\t\treturn parent;\n\t}", "protected Composite getFieldEditorParent() {\n\t\tif (style == FLAT) {\n\t\t\t// Create a new parent for each field editor\n\t\t\tComposite parent = new Composite(fieldEditorParent, SWT.NULL);\n\t\t\tparent.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\n\t\t\treturn parent;\n\t\t}\n\t\t// Just return the parent\n\t\treturn fieldEditorParent;\n\t}", "public Instance getParent() {\r\n \t\treturn parent;\r\n \t}", "private JPanel getJPanel()\n\t{\n\t\tif (jPanel == null)\n\t\t{\n\t\t\tjPanel = new JPanel();\n\t\t\tjPanel.setLayout(new BorderLayout());\n\t\t\tBorder bdr = BorderFactory.createTitledBorder(\"\");\n\t \tjPanel.setBorder(bdr);\n\t\t\tjPanel.add(getRPFilesPanel(), BorderLayout.CENTER);\n\t\t\tjPanel.add(getJPathPanel(), BorderLayout.NORTH);\n\t\t}\n\t\treturn jPanel;\n\t}", "private JPanel getCenterPanel() {\r\n if (this.centerPanel == null) {\r\n this.centerPanel = new JPanel();\r\n this.centerPanel.setLayout(new BorderLayout());\r\n this.centerPanel.add(getCenterInfoPanel(), java.awt.BorderLayout.NORTH);\r\n this.centerPanel.add(getCenterTabbedPane(), java.awt.BorderLayout.CENTER);\r\n }\r\n return this.centerPanel;\r\n }", "public Workspace getParentWorkspace() {\n\t\treturn this.parentWorkspace;\n\t}", "public GraphicalLattice getParentLattice() {\n\t\treturn parentLattice;\n\t}", "public GridPanel getCurrentGraphPanel()\n\t{\n\t\tfor (Component comp : this.getComponents()) {\n\t\t\tif (comp.isVisible()) {\n\t\t\t\treturn (GridPanel) comp;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "private JPanel getBasePanel() {\r\n\t\tif (basePanel == null) {\r\n\t\t\tbasePanel = new JPanel();\r\n\t\t\tbasePanel.setLayout(new BorderLayout());\r\n\t\t\tbasePanel.setBounds(new Rectangle(1, 1, 352, 129));\r\n\t\t\tbasePanel.add(getToolsToolBar(), BorderLayout.NORTH);\r\n\t\t\tbasePanel.add(getTotalSplitPane(), BorderLayout.CENTER);\r\n\t\t}\r\n\t\treturn basePanel;\r\n\t}", "public String getCurrentPanel() {\n return this.currentPanel;\n }", "private Window getParentWindow(Component paramComponent) {\n/* 192 */ Window window = null;\n/* */ \n/* 194 */ if (paramComponent instanceof Window) {\n/* 195 */ window = (Window)paramComponent;\n/* */ }\n/* 197 */ else if (paramComponent != null) {\n/* 198 */ window = SwingUtilities.getWindowAncestor(paramComponent);\n/* */ } \n/* 200 */ if (window == null) {\n/* 201 */ window = new DefaultFrame();\n/* */ }\n/* 203 */ return window;\n/* */ }", "TMNodeModelComposite getParent() {\n return parent;\n }", "Component getParent(Component c) {\n return hierarchy.getParent(c);\n }", "public JPanel getPanel() {\n //throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n return jPanel1;\n }", "private JPanel getMainPanel() {\n if (mainPanel == null) {\n GridBagConstraints gridBagConstraints1 = new GridBagConstraints();\n gridBagConstraints1.gridx = 0;\n gridBagConstraints1.insets = new Insets(2, 2, 2, 2);\n gridBagConstraints1.anchor = GridBagConstraints.EAST;\n gridBagConstraints1.gridy = 1;\n GridBagConstraints gridBagConstraints = new GridBagConstraints();\n gridBagConstraints.fill = GridBagConstraints.BOTH;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.weighty = 1.0D;\n gridBagConstraints.insets = new Insets(2, 2, 2, 2);\n gridBagConstraints.gridx = 0;\n mainPanel = new JPanel();\n mainPanel.setLayout(new GridBagLayout());\n mainPanel.add(getConfigurationScrollPane(), gridBagConstraints);\n mainPanel.add(getButtonPanel(), gridBagConstraints1);\n }\n return mainPanel;\n }", "protected Directory getParent() {\n return parent;\n }", "public JComponent getMainComponent() {\n\t return mainPanel;\n\t}", "public Entity getParent() {\n return parent;\n }", "public int getParentID() {\n\t\treturn parentID;\n\t}", "public int getParentNode(){\n\t\treturn parentNode;\n\t}", "public int Parent() { return this.Parent; }", "public SeleniumQueryObject parent() {\n\t\treturn ParentFunction.parent(this);\n\t}", "public int getParentID() {\n\t\treturn _parentID;\n\t}", "public Foo getParent() {\n return parent;\n }", "public Window getParentWindow() {\r\n\t\t// // I traverse the windows hierarchy to find this component's parent\r\n\t\t// window\r\n\t\t// // if it's in an application, then it'll be that frame\r\n\t\t// // if it's in an applet, then it'll be the browser window\r\n\r\n\t\t// // unfortunately if it's an applet, the popup window will have \"Java\r\n\t\t// Applet Window\" label\r\n\t\t// // at the bottom...nothing i can do (for now)\r\n\r\n\t\tWindow window = null;\r\n\r\n\t\tComponent component = this;\r\n\t\twhile (component.getParent() != null) {\r\n\r\n\t\t\tif (component instanceof Window)\r\n\t\t\t\tbreak;\r\n\t\t\tcomponent = component.getParent();\r\n\t\t}\r\n\r\n\t\tif (component instanceof Window)\r\n\t\t\twindow = (Window) component;\r\n\r\n\t\treturn (window);\r\n\t}", "public @Nullable\n JFrame getOuterFrame() {\n if (null == outerFrame) {\n outerFrame = searchForOuterFrame();\n }\n return outerFrame;\n }", "public org.apache.ant.Project getParent() {\n return parentProject;\n }", "public JPanel getCurrentPanel(){\n JPanel card = null;\n for (Component comp : contentPane.getComponents()) {\n if (comp.isVisible() == true) {\n return card;\n }\n }\n return null;\n }", "public MainPanel getMainPanel() {\n return mainPanel;\n }", "private JPanel getControlPanel() {\n if (controlPanel == null) {\n GridBagConstraints gridBagConstraints8 = new GridBagConstraints();\n gridBagConstraints8.gridx = 0;\n gridBagConstraints8.gridy = 1;\n GridBagConstraints gridBagConstraints7 = new GridBagConstraints();\n gridBagConstraints7.insets = new java.awt.Insets(5, 5, 5, 5);\n gridBagConstraints7.gridy = 0;\n gridBagConstraints7.weightx = 1.0D;\n gridBagConstraints7.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints7.gridx = 0;\n controlPanel = new JPanel();\n controlPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(null, \"Add/Remove User(s)\",\n javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,\n javax.swing.border.TitledBorder.DEFAULT_POSITION, null, PortalLookAndFeel.getPanelLabelColor()));\n controlPanel.setLayout(new GridBagLayout());\n controlPanel.add(getUserAddEditPanel(), gridBagConstraints7);\n controlPanel.add(getUserManagerButtonPanel(), gridBagConstraints8);\n }\n return controlPanel;\n }", "public PanelFX getPanel() {\n return panel;\n }" ]
[ "0.76246506", "0.74883366", "0.7359235", "0.72566354", "0.71687627", "0.70301974", "0.6954482", "0.6915513", "0.6895365", "0.68926984", "0.68665606", "0.6844011", "0.6795978", "0.6789155", "0.673833", "0.6737217", "0.6653102", "0.66306835", "0.6615263", "0.6615263", "0.6615263", "0.660701", "0.65977865", "0.65815765", "0.65797555", "0.65730745", "0.65669817", "0.6546049", "0.6531489", "0.6519261", "0.65150625", "0.6509254", "0.6508204", "0.65069413", "0.6496254", "0.6479953", "0.6450389", "0.6449729", "0.6417683", "0.6417683", "0.6417379", "0.6417379", "0.6405271", "0.6405271", "0.6403863", "0.6399468", "0.6392466", "0.6378754", "0.6367522", "0.6349316", "0.63436633", "0.63409144", "0.6337848", "0.63364947", "0.6331832", "0.63235223", "0.63215965", "0.63204503", "0.6317522", "0.6308195", "0.62959856", "0.62675756", "0.62621355", "0.6251945", "0.62455726", "0.62455726", "0.6244268", "0.62429", "0.62402743", "0.62311256", "0.62296844", "0.6226705", "0.6222941", "0.6221654", "0.6214725", "0.6212333", "0.62078995", "0.620753", "0.6185407", "0.61847895", "0.6183527", "0.6181376", "0.61740553", "0.61731356", "0.6173084", "0.61677146", "0.6157047", "0.61557615", "0.61475694", "0.61319", "0.61310375", "0.6129285", "0.61198455", "0.6118337", "0.61175925", "0.61163986", "0.61095774", "0.6107606", "0.6104924", "0.61039877" ]
0.83163583
0
Sets the Parent and updtes the bounds
public void setParentPanel(UIPanel parent) { this.parentPanel = parent; updateBounds(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setBoundsInParent(Rect bounds) {\n/* 707 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public void updateBounds() {\n this.setBounds(left, top, width, height);\n }", "private void setParentBounds() {\n GraphRepresentation baseGraph = graphRepresentationFactory.getBaseGraph();\n\n Iterator<Task> iterator = tasks.iterator();\n while (iterator.hasNext()) {\n Task nextTask = iterator.next();\n List<Integer> nextTaskParents = baseGraph.getParents(nextTask.getIdentifier());\n nextTask.setParentBound(nextTaskParents.size());\n }\n }", "public void setMovingBounds() {\r\n maxY = this.getParent().getYmax();\r\n minY = this.getParent().getYmin();\r\n maxX = this.getParent().getXmax();\r\n minX = this.getParent().getXmin();\r\n }", "@Override\n public void setBounds(Rectangle bounds) {\n final Rectangle repaintBounds = new Rectangle(getBounds());\n\n final Rectangle newBounds = new Rectangle(ajustOnGrid(bounds.x),\n ajustOnGrid(bounds.y), ajustOnGrid(bounds.width), bounds.height);\n\n newBounds.width = newBounds.width < MINIMUM_SIZE.x ? MINIMUM_SIZE.x\n : newBounds.width;\n\n this.bounds = newBounds;\n\n parent.getScene().repaint(repaintBounds);\n parent.getScene().repaint(newBounds);\n\n // Move graphics elements associated with this component\n leftMovableSquare.setBounds(computeLocationResizer(0));\n rightMovableSquare.setBounds(computeLocationResizer(bounds.width));\n\n setChanged();\n notifyObservers();\n }", "public void updateBounds(){\r\n\t\tRectangle bounds = new Rectangle(super.getBounds());\r\n\t\tint preferredHeight = 0;\r\n\t\tfor(Object child : getChildren()){\r\n\t\t\tIFigure figure = (IFigure)child;\r\n\t\t\tpreferredHeight += figure.getPreferredSize().height;\r\n\t\t}\r\n\t\tif (preferredHeight == 0) preferredHeight = 200;\r\n\t\tbounds.setHeight(preferredHeight+20);\r\n\t\tsetBounds(bounds);\r\n\t}", "public void setParent(PsUpdateIf parent) {\n\t\tsuper.setParent(parent);\n\t\tm_pjRoot = (PjRootFinder)parent;\n\t\tm_pFunction.add(m_pjRoot.m_fx.getInfoPanel());\n\t\tm_pBounds.add(m_pjRoot.m_xMin.getInfoPanel());\n\t\tm_pBounds.add(m_pjRoot.m_xMax.getInfoPanel());\n\t\tm_pBounds.add(m_pjRoot.m_discr.getInfoPanel());\n\t}", "@Override\n\tprotected void onLoad() {\n\t // Reset the position attribute of the parent element\n\t //DOM.setStyleAttribute(getElement(), \"position\", \"relative\");\n\t //ResizableWidgetCollection.get().add(this);\n\t redraw();\n\t }", "@Override\n\tpublic void setBounds(int x, int y, int width, int height) {\n\t\t\n\t\t\n\t\tsuper.setBounds(x, y, width, height);\n\t}", "public void setBounds(RectF newBounds)\n {\n this.bounds = GeometryUtils.copy(newBounds);\n \n if (getShapeParent() != null)\n {\n GeometryUtils.resolveGeometry(this.bounds, this);\n }\n \n notifyParentOfPositionChange();\n conditionallyRepaint();\n }", "@Override\r\n\tpublic void setBounds(int x, int y, int width, int height) {\r\n\t\tsuper.setBounds(x, y, width, height);\r\n\t\tpv.update();\r\n\t}", "@Override\n public void onSizeChanged(int w, int h, int oldW, int oldH) {\n // Set the movement bounds for the ballParent\n box.set(0, 0, w, h);\n }", "@Override\n\tpublic void onParentSet() {\n\t\t\n\t}", "public void transform() {\n final var bounds = getParentBounds();\n transform( bounds.width, bounds.height );\n }", "final void setParent(ShapeParent newParent)\n {\n this.parent = newParent;\n }", "protected void configureWest(LayoutOptions parent){\n LayoutOptions childOptions = new LayoutOptions(); \n parent.setChildOptions(childOptions); \n \n LayoutOptions north = createOptions(childOptions, CardinalPoint.NORTH); \n setAttribute(north, \"size\", \"150\");\n fixed(north);\n LayoutOptions center = createOptions(childOptions, CardinalPoint.CENTER); \n setAttribute(center, \"overflow\", \"scroll\");\n\t}", "public void setBounds(double anX, double aY, double aW, double aH) { setX(anX); setY(aY); setWidth(aW); setHeight(aH); }", "public void colapse(){\n\t\tsetBounds(getX(), getY(), getDefaultWidth(), getHeight());\n\t\tcollisionBounds.setWidth(getDefaultWidth());\n\t}", "public void setBounds(Rectangle b);", "@Override\n public void setParent(MElementContainer<MUIElement> arg0)\n {\n \n }", "void setBounds(Rectangle rectangle);", "public void setBounds(Rect bounds) {\r\n\t\tthis.widthAndHeight = bounds;\r\n\t\tc.setBounds(bounds);\r\n\t}", "void setParent(WidgetParent ip) {\n this.m_parent = ip;\n }", "public void update() {\n\t\tactSX=parent.actSX*scaleX;\n\t\tactSY=parent.actSY*scaleY;\n\t\tw=posW*actSX;\n\t\th=posH*actSY;\n\t\tswitch (align) {\n\t\tcase DEFAULT:\n\t\t\tx=parent.x+posX*actSX;\n\t\t\ty=parent.y+posY*actSY;\n\t\t\tbreak;\n\t\tcase TOPRIGHT:\n\t\t\tx=parent.x+parent.w-(posX+posW)*actSX;\n\t\t\ty=parent.y+posY*actSY;\n\t\t\tbreak;\n\t\tcase BOTTOMLEFT:\n\t\t\tx=parent.x+posX*actSX;\n\t\t\ty=parent.y+parent.h-(posY+posH)*actSY;\n\t\t\tbreak;\n\t\tcase BOTTOMRIGHT:\n\t\t\tx=parent.x+parent.w-(posX+posW)*actSX;\n\t\t\ty=parent.y+parent.h-(posY+posH)*actSY;\n\t\t\tbreak;\n\t\tcase CENTEREDX:\n\t\t\tx=parent.x+parent.w/2-w/2+posX*actSX;\n\t\t\ty=parent.y+posY*actSY;\n\t\t\tbreak;\n\t\tcase CENTEREDY:\n\t\t\tx=parent.x+posX*actSX;\n\t\t\ty=parent.y+parent.h/2-h/2+posY*actSY;\n\t\t\tbreak;\n\t\tcase CENTEREDXY:\n\t\t\tx=parent.x+parent.w/2-w/2+posX*actSX;\n\t\t\ty=parent.y+parent.h/2-h/2+posY*actSY;\n\t\t\tbreak;\n\t\t}\n\t}", "public void layoutContainer(Container parent) {\n if ((constraints != null) && (! constraints.isEmpty())) {\n Rectangle alloc = getVisibleEditorRect();\n if (alloc != null) {\n Document doc = editor.getDocument();\n if (doc instanceof AbstractDocument) {\n ((AbstractDocument)doc).readLock();\n }\n try {\n rootView.setSize(alloc.width, alloc.height);\n Enumeration<Component> components = constraints.keys();\n while (components.hasMoreElements()) {\n Component comp = components.nextElement();\n View v = (View) constraints.get(comp);\n Shape ca = calculateViewPosition(alloc, v);\n if (ca != null) {\n Rectangle compAlloc = (ca instanceof Rectangle) ?\n (Rectangle) ca : ca.getBounds();\n comp.setBounds(compAlloc);\n }\n }\n } finally {\n if (doc instanceof AbstractDocument) {\n ((AbstractDocument)doc).readUnlock();\n }\n }\n }\n }\n }", "public void setParent(RMParentShape aShape) { _parent = aShape; }", "@Override\n public void layoutContainer(Container parent) {\n for(int i = 0; i< getComponentCount(); i++) {\n getComponent(i).setBounds(0, 0, getWidth(), getHeight());\n }\n }", "public void setBounds(Rectangle bounds) {\r\n this.bounds = bounds;\r\n }", "final void updateParent(){\n clearSpanCache();\n editedChild = true;\n if (this instanceof Document){\n ((Document)this).updateDoc();\n } else {\n getParent().updateParent();\n }\n }", "public void updateBounds() {\n\t\tswitch (this.species){\n\t\tcase HOGCHOKER:\n\t\tcase SILVERSIDE:\n\t\tcase FLOUNDER:\n\t\t\tthis.topYBound = frameHeight / 3 * 2;\n\t\t\tthis.bottomYBound = frameHeight - imageHeight - frameBarSize;\n\t\t\tbreak;\n\t\tcase PERCH: \n\t\tcase MINNOW: \n\t\tcase WEAKFISH:\n\t\t\tthis.topYBound = frameHeight / 3;\n\t\t\tthis.bottomYBound = frameHeight / 3 * 2 - imageHeight;\n\t\t\tbreak;\n\n\t\tcase MENHADEN:\n\t\tcase MUMMICHOG:\n\t\t\tthis.topYBound = 0;\n\t\t\tthis.bottomYBound = frameHeight / 3 - imageHeight;\n\t\t\tbreak;\n\t\tcase GOLD:\n\t\tdefault:\n\t\t\ttopYBound = 0;\n\t\t\tbottomYBound = frameHeight;\n\t\t}\n\t}", "void setParent(UIComponent parent);", "private void setComponentBounds() {\n float width = this.getWidth();\n float height = this.getHeight();\n\n int fontSize = height / 30 > 16 ? 16 : (int) (height / 30);\n int buttonWidth = width / 4.5 > 200 ? 200 : (int) (width / 4.5);\n int buttonHeight = height / 14.15 > 35 ? 35 : (int) (height / 14.15);\n int horMargin = (int) (width / 38.15);\n int verMargin = (int) (height / 21.2);\n\n registerButton.setBounds(horMargin, verMargin, buttonWidth, buttonHeight);\n registerButton.setFont(new Font(\"Arial\", Font.BOLD, fontSize));\n\n editButton.setBounds(horMargin + buttonWidth + 30, verMargin, buttonWidth, buttonHeight);\n editButton.setFont(new Font(\"Arial\", Font.BOLD, fontSize));\n\n deleteButton.setBounds((int) (width - (horMargin + buttonWidth)), verMargin, buttonWidth, buttonHeight);\n deleteButton.setFont(new Font(\"Arial\", Font.BOLD, fontSize));\n\n partidaScrollPane.setBounds(horMargin, (int) (height / 7), (int) (width - (horMargin * 2)), (int) (height - ((height / 21.2 * 3) + (height / 14.15))));\n partidaTable.setFont(new Font(\"Arial\", Font.PLAIN, fontSize));\n partidaTable.packAll();\n }", "public void setParent(PafDimMember parent) {\r\n\t\tthis.parent = parent;\r\n\t}", "public void updateCoords() {\n line.setLine(parent.getFullBounds().getCenter2D(), child.getFullBounds().getCenter2D());\n Rectangle2D r = line.getBounds2D();\n // adding 1 to the width and height prevents the bounds from\n // being marked as empty and is much faster than createStrokedShape()\n setBounds(r.getX(), r.getY(), r.getWidth() + 1, r.getHeight() + 1);\n invalidatePaint();\n }", "@Override public void layoutContainer(Container parent) {\n int nc = parent.getComponentCount();\n if (nc == 0) {\n return;\n }\n int width = parent.getWidth(); // - insets.left - insets.right;\n int height = parent.getHeight(); // - insets.left - insets.right;\n int x = 0; // insets.left; int y = insets.top;\n // for (int i = 0; i < nc; i++) {\n Component c = parent.getComponent(0); // = toolBox;\n c.setBounds(x, height - yy, width, c.getPreferredSize().height);\n // }\n }", "protected void notifyParentOfPositionChange()\n {\n rotatedCorners = null;\n ShapeView view = getParentView();\n \n if (view != null)\n {\n view.onPositionChanged(this);\n }\n }", "public void setParent(Glyph parent) {\n this.parent = parent;\n }", "public abstract void setParent(UIComponent parent);", "public void setParent(State aParent);", "void setParent(IGLProperty parent);", "public void expand(){\n\t\tsetBounds(getX()-getWidth()/4, getY(), getWidth() * 1.5f, getHeight());\n\t\tcollisionBounds.setWidth(getWidth());\n\t}", "private void updateViewBounds() \r\n {\r\n assert !sim.getMap().isEmpty() : \"Visualiser needs simulator whose a map has at least one node\"; \r\n \r\n \r\n viewMinX = minX * zoomFactor;\r\n viewMinY = minY * zoomFactor;\r\n \r\n viewMaxX = maxX * zoomFactor;\r\n viewMaxY = maxY * zoomFactor;\r\n \r\n \r\n double marginLength = zoomFactor * maxCommRange;\r\n \r\n \r\n // Set the size of the component\r\n int prefWidth = (int)Math.ceil( (viewMaxX - viewMinX) + (marginLength * 2) );\r\n int prefHeight = (int)Math.ceil( (viewMaxY - viewMinY) + (marginLength * 2) );\r\n setPreferredSize( new Dimension( prefWidth, prefHeight ) );\r\n \r\n \r\n // Adjust for margin lengths \r\n viewMinX -= marginLength;\r\n viewMinY -= marginLength;\r\n \r\n viewMaxX += marginLength;\r\n viewMaxY += marginLength;\r\n }", "@Override\r\n\tvoid setProperty(BoundedShape anObject, Point aNewValue) {\n\t\tRectangle newBounds = new Rectangle (aNewValue.x, aNewValue.y, anObject.getWidth(), anObject.getHeight());\r\n\t\tanObject.setBounds(newBounds);\r\n\t}", "public void repaint() { if(_parent!=null) _parent.repaint(this); }", "public void layoutContainer(Container parent) {\n/* 110 */ synchronized (parent.getTreeLock()) {\n/* 111 */ Insets ins = parent.getInsets();\n/* */ \n/* 113 */ Rectangle bounds = parent.getBounds();\n/* 114 */ int width = bounds.width - ins.left - ins.right;\n/* 115 */ int height = bounds.height - ins.top - ins.bottom;\n/* */ \n/* 117 */ Component[] comps = parent.getComponents();\n/* */ \n/* 119 */ for (int i = 0; i < comps.length; i++) {\n/* 120 */ Component c = comps[i];\n/* 121 */ if (comps[i].isVisible() || !this.ignoreInvisible)\n/* */ {\n/* */ \n/* 124 */ c.setBounds(ins.left, ins.top, width, height);\n/* */ }\n/* */ } \n/* */ } \n/* */ }", "public void setSpawnPoint() {\n if (this.dirVec.y == 0) {\n super.centerRectAt(new Point(-1*OUTER_OFFSET, super.getCenter().y));\n }\n else {\n super.centerRectAt(new Point(super.getCenter().x, OUTER_OFFSET));\n }\n }", "public void setParent(DrawingComposite parent) {\n\t\tthis.parent = parent;\n\t}", "@Override // com.android.server.wm.WindowContainer\n public boolean fillsParent() {\n return true;\n }", "<E extends CtElement> E setParent(E parent);", "public PBounds getBoundsReference() {\n\t\tPBounds bds = super.getBoundsReference();\n\t\tgetUnionOfChildrenBounds(bds);\n\n\t\tcachedChildBounds.setRect(bds);\n\t\tdouble scaledIndent = INDENT/renderCamera.getViewScale();\t\t\n\t\tbds.setRect(bds.getX()-scaledIndent,bds.getY()-scaledIndent,bds.getWidth()+2*scaledIndent,bds.getHeight()+2*scaledIndent);\n\t\t\n\t\treturn bds;\n\t}", "public @Override void setParent(View parent) {\n super.setParent(parent);\n \n /* Make sure that the children get loaded.\n * It is necessary to do because children preferences will\n * define the preferences of the parent.\n */\n if (parent != null) {\n if (parent instanceof ViewLayoutState.Parent) {\n setStatusBits(ACTIVE_LAYOUT_STATE);\n } else {\n clearStatusBits(ACTIVE_LAYOUT_STATE);\n }\n \n // Resolving whether active layout state must be resolved prior getChildren()\n getChildren();\n \n } else { // parent is being set to null\n releaseChildren();\n clearStatusBits(ACTIVE_LAYOUT_STATE);\n }\n }", "public static void setBounds() {\n\t\tDimension dim = Toolkit.getDefaultToolkit().getScreenSize();\r\n\t\t\r\n\t\t// Determine the new location of the window\r\n\t\tint w = gameFrame.getSize().width;\r\n\t\tint h = gameFrame.getSize().height;\r\n\t\tint x = (dim.width/2)-(w/2);\r\n\t\tint y = (dim.height/2)-(h/2);\r\n\t\t// Move the window\r\n\t\tgameFrame.setLocation(x, y);\r\n\t\tgameFrame.setVisible(true);\r\n\t}", "private void setSizeBox() {\n\t\t\tthis.leftX = pointsSubStroke.get(0).getX();\n\t\t\tthis.righX = pointsSubStroke.get(0).getX();\n\t\t\tthis.topY = pointsSubStroke.get(0).getY();\n\t\t\tthis.bottomY = pointsSubStroke.get(0).getY();\n\t\t\t\n\t\t\tfor(int i = 0; i < pointsSubStroke.size();i++) {\n\t\t\t\tdouble x = pointsSubStroke.get(i).getX();\n\t\t\t\tdouble y = pointsSubStroke.get(i).getX();\n\t\t\t\t\n\t\t\t\tthis.leftX = Math.min(x, leftX);\n\t\t\t\tthis.righX = Math.max(x, righX);\n\t\t\t\tthis.topY = Math.min(y, topY);\n\t\t\t\tthis.bottomY = Math.max(y, bottomY);\n\t\t\t}\n\t\t}", "@Override // com.android.server.wm.WindowContainer\n public boolean fillsParent() {\n return true;\n }", "public void center() {\n\t\tif(parent != null) {\n\t\t\tfloat parMidWidth = parent.getWidth() / 2f;\n\t\t\tfloat parMidHeight = parent.getHeight() / 2f;\n\t\t\tfloat midWidth = width / 2f;\n\t\t\tfloat midHeight = height / 2f;\n\t\t\t\n\t\t\tfloat newX = parent.getX() + (parMidWidth - midWidth);\n\t\t\tfloat newY = parent.getY() + (parMidHeight - midHeight);\n\t\t\t\n\t\t\tposition = new Vec2f(newX, newY);\n\t\t\tfindPosRatios();\n\t\t}\n\t}", "@Override\n public void setRectangle() {\n switch (direction){\n case 0:\n rectangle.setLocation((int)x+5,(int)y+8);\n break;\n case 2:\n rectangle.setLocation((int)x+5,(int)y+8);\n break;\n case 1:\n rectangle.setLocation((int)x+13,(int)y+8);\n break;\n case 3:\n rectangle.setLocation((int)x+2,(int)y+8);\n break;\n }\n\n }", "public void setParent(Instance parent) {\r\n \t\tthis.parent = parent;\r\n \t}", "public void setParent (com.redsaga.hibnatesample.step2.Board _parent) {\n\t\tthis._parent = _parent;\n\t}", "@Override\n\tprotected void init() {\n\t\tsuper.init();\n\t\tisAnchorPointForPosition = true;\n\t\tsetContentSize(Screen.GAME_W, Screen.GAME_H);\n\t\tsetAnchor(Graphics.HCENTER | Graphics.VCENTER);\n\t}", "@Override\n\tpublic synchronized void layoutContainer(Container parent) {\n\t\tObjects.requireNonNull(parent);\n\n\t\tlayingOut = true;\n\t\tint noOfComponents = parent.getComponentCount();\n\n\t\tInsets insets = parent.getInsets();\n\t\tint maxWidth = parent.getWidth() - (insets.left + insets.right);\n\t\tint maxHeight = parent.getHeight() - (insets.top + insets.bottom);\n\t\tint compWidth = (int) ((maxWidth - (noColums + 1) * gap)\n\t\t\t\t/ (double) noColums);\n\t\tint compHeigh = (int) ((maxHeight - (noRows + 1) * gap)\n\t\t\t\t/ (double) noRows);\n\n\t\tint topLeftX = insets.left;\n\t\tint topLeftY = insets.top;\n\n\t\tint row = 0;\n\t\tint col = 0;\n\n\t\tfor (int i = 0; i < noOfComponents; ++i) {\n\t\t\tComponent c = parent.getComponent(i);\n\t\t\trow = constrains.get(i).getRow() - 1;\n\t\t\tcol = constrains.get(i).getColumn() - 1;\n\n\t\t\tif (c != null && c.isVisible()) {\n\n\t\t\t\tif (row == 0 && col == 0) {\n\t\t\t\t\tresize(gap + topLeftX, gap + topLeftY, c,\n\t\t\t\t\t\t\tcompWidth * 5 + 4 * gap, compHeigh);\n\t\t\t\t} else {\n\n\t\t\t\t\tresize(gap + topLeftX + col * (compWidth + gap),\n\t\t\t\t\t\t\tgap + topLeftY + row * (compHeigh + gap), c,\n\t\t\t\t\t\t\tcompWidth, compHeigh);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tlayingOut = false;\n\t}", "@Override\n\tpublic void Update() {\n\t\tsuper.Update();\n\t\tsuper.decisionRect.x=coordinate.x+(Global.GetGlobal().GetTreeImgRect().width-decisionRect.width)/2;\n\t\tsuper.decisionRect.y=coordinate.y+(Global.GetGlobal().GetTreeImgRect().height-decisionRect.height)/2;\n\t}", "@Override public void begin() {\n horizontalCorner = new Location( 0, 200 );\n verticalCorner = new Location( 200, 0 );\n }", "public void setBounds(float x, float y, float width, float height) {\n internalGroup.setBounds(x, y, width, height);\n dataTrait.x = x;\n dataTrait.y = y;\n dataTrait.width = width;\n dataTrait.height = height;\n resetSprite();\n\n }", "public void setComponentBounds(){\n spelerIDLabel.setBounds(40,10,100,40);\n typeLabel.setBounds(40,60,100,40);\n codeLabel.setBounds(40,110,200,40);\n heeftBetaaldLabel.setBounds(40, 160, 200, 40);\n\n spelerIDField.setBounds(250, 10, 100, 40);\n typeField.setBounds(250, 60, 100, 40);\n codeField.setBounds(250, 110, 100, 40);\n heeftBetaaldField.setBounds(250, 160, 100, 40);\n\n terugButton.setBounds(300,260,75,40);\n klaarButton.setBounds(200,260,100,40);\n\n\n\n\n }", "protected GameElement() {\n\t\tsetX(0f);\n\t\tsetY(0f);\n\t\tsetBounds(getX(), getY(), Constants.GAMEELEMENT_WIDTH,\n\t\t\t\tConstants.GAMEELEMENT_WIDTH);\n\t}", "public void setParent(Concept _parent) { parent = _parent; }", "public PaneOrganizer() {\n\t\t\n\t\t_root = new BorderPane();\n\t\t_game = new Game(_root);\n\t\tthis.setupButton();\n\t\t\n\t}", "protected void calculateBounds()\r\n {\r\n Toolkit DefaultToolkit = Toolkit.getDefaultToolkit();\r\n Dimension ScreenSize = DefaultToolkit.getScreenSize();\r\n int FrameWidth = ScreenSize.width - 100;\r\n int FrameHeight = ScreenSize.height - 100;\r\n setBounds(50, 50, FrameWidth, FrameHeight);\r\n }", "private void positionAddNewMemberButton(Dimension parentSize,\n Component component) {\n int padding = 10;\n var bottomRightOfPanel = new Point(\n parentSize.width - padding,\n parentSize.height - padding\n );\n\n var componentSize = (Dimension) component.getSize();\n\n int w = componentSize.width;\n int h = componentSize.height;\n int x = bottomRightOfPanel.x - w;\n int y = bottomRightOfPanel.y - h * 2;\n\n var positionAndSize = new Rectangle(\n x, y, w, h\n );\n\n component.setBounds(positionAndSize);\n }", "private void setPositions(float dx, float dy) {\n\n // prevent the point to be drag outside of the parent layout on the X axis\n if (getX() + dx + 2 * POINT_RADIUS >= ((View) getParent()).getWidth())\n setX(((View) getParent()).getWidth() - 2 * POINT_RADIUS);\n else if (getX() + dx < 0)\n setX(0);\n else\n setX(getX() + dx);\n\n\n // prevent the point to be drag outside of the parent layout on the Y axis\n if (getY() + dy + 2 * POINT_RADIUS > ((View) getParent()).getHeight())\n setY(((View) getParent()).getHeight() - 2 * POINT_RADIUS);\n else if (getY() + dy < 0)\n setY(0);\n else\n setY(getY() + dy);\n\n }", "public GUISignUp() {\n initComponents();\n setLocationRelativeTo(null);\n this.getContentPane().setBackground(new java.awt.Color(72, 72, 72));\n resizeImage();\n }", "public Entry() \n { \n \tleft = right = parent = -1;\n }", "void updateAllParentsBelow();", "@Override\n protected void addBounds ()\n {\n ParticleSystemConfig.Layer psconfig = (ParticleSystemConfig.Layer)_config;\n GroupPriority priorityMode = psconfig.priorityMode;\n if (priorityMode == null) {\n _bounds.getCenter(_center);\n }\n super.addBounds();\n\n // add layer bounds to group bounds, if applicable\n if (priorityMode != null) {\n ((ParticleSystem)_parentScope).getGroupBounds(\n priorityMode.group).addLocal(_bounds);\n }\n }", "public void setBounds(Rectangle2D aRect)\n{\n setBounds(aRect.getX(), aRect.getY(), aRect.getWidth(), aRect.getHeight());\n}", "protected void setParent(CodeItem codeItem) {\n this.parent = codeItem;\n }", "public void layoutContainer(Container parent);", "public void update()\n {\n if (sashButton != null) {\n Rectangle r = sashButton.getBounds();\n\n if (topGridSash.isVisible()) {\n topGridSash.resetBounds(r);\n }\n\n if (leftGridSash.isVisible()) {\n leftGridSash.resetBounds(r);\n }\n }\n }", "public void remove(){\n\t\tsetBounds(800, 600, WIDTH, HEIGHT);\n\t}", "private Rectangle getParentBounds() {\n final var bounds = mParentBounds;\n\n return bounds == null\n ? mParentBounds = calculateBounds( getParent() )\n : bounds;\n }", "private void adjustTableBounds() {\n\t\tPoint location = control.getDisplay().map(control.getParent(), null,\n\t\t\t\tcontrol.getLocation());\n\t\tint initialX = location.x + POPUP_OFFSET;\n\t\tint initialY = location.y + control.getSize().y + POPUP_OFFSET;\n\n\t\tGridData data = new GridData(GridData.FILL_BOTH);\n\t\tdata.heightHint = proposalTable.getItemHeight() * getTableLength() + 30;\n\t\tdata.widthHint = Math.max(maxItemWidth,\n\t\t\t\tMath.max(control.getSize().x, POPUP_MINIMUM_WIDTH));\n\t\tproposalTable.setLayoutData(data);\n\t\t\n\t\tgetShell().pack();\n\t\tpopupSize = getShell().getSize();\n\t\tint scrollBarWitdh = proposalTable.getVerticalBar().getSize().x;\n\t\tRectangle shellBounds = new Rectangle(initialX, initialY, popupSize.x + scrollBarWitdh + 30, popupSize.y);\n\n\t\t// Constrain to the display\n\t\tRectangle constrainedBounds = getConstrainedShellBounds(shellBounds);\n\t\tshellBounds.x = constrainedBounds.x;\n\t\t// If there has been an adjustment causing the popup to overlap\n\t\t// with the control, then reduce the popup size.\n\t\tif (constrainedBounds.y < initialY) {\n\t\t\tshellBounds.height -= initialY - constrainedBounds.y;\n\t\t}\n\n\t\tgetShell().setBounds(shellBounds);\n\t}", "public void setParentLayer(EObject newValue);", "@Override\r\n public void set(View object, Rect value) {\n object.setTranslationX(value.left);\r\n object.setTranslationY(value.top);\r\n object.getLayoutParams().width = value.width();\r\n object.getLayoutParams().height = value.height();\r\n object.requestLayout();\r\n }", "protected void layoutImpl()\n {\n // Set chart area height first, since height can effect yaxis label width\n double pw = getWidth(), ph = getHeight();\n double ah = _xaxis.isVisible()? _xaxis.getPrefHeight() : 0;\n _chartArea.setHeight(ph - ah);\n \n // Now set bounds of areay, xaxis and yaxis\n double aw = _yaxis.isVisible()? _yaxis.getPrefWidth(ph - ah) : 0;\n double cw = pw - aw, ch = ph - ah;\n _chartArea.setBounds(aw,0,cw,ch);\n _xaxis.setBounds(aw,ch,cw,ah);\n _yaxis.setBounds(0,0,aw,ch);\n }", "@objid (\"617c2b9e-55b6-11e2-877f-002564c97630\")\n @Override\n protected void setParent(GmCompositeNode parent) {\n if (parent != null && getParent() != parent) {\n getPersistedStyle().setCascadedStyle(parent.getPersistedStyle());\n }\n \n super.setParent(parent);\n }", "public void setParent(AsNode parent) {\n\t\tthis.state.setG(parent.getState().getG() + parent.childCost.get(this));\n\t\tthis.parent = parent;\n\t}", "public void init(){\n\t\tsetSize (800,600);\n\t\t//el primer parametro del rectangulo en el ancho\n\t\t//y el alto\n\t\trectangulo = new GRect(120,80);\n\t\t\n\t}", "public void setParent(PaletteContainer newParent) {\n if (parent != newParent) {\n PaletteContainer oldParent = parent;\n parent = newParent;\n listeners.firePropertyChange(PROPERTY_PARENT, oldParent, parent);\n }\n }", "@Override\n public void setLoc(Point p) {\n this.rect.setLocation(p);\n }", "abstract public void setParent(Command cmd);", "public void updateBoundaries() {\n\t\t\n\t\tLOG.log(\"Updating boundaries.\");\n\t\t\n\t\tif (Program.WINDOW_MANAGER != null) {\n\t\t\t\n\t\t\tthis.setBounds(\n\t\t\t\tProgram.WINDOW_MANAGER.getScreenWidth() / 2 - this.getSize().width / 2,\n\t\t\t\tProgram.WINDOW_MANAGER.getScreenHeight() / 2 - this.getSize().height / 2,\n\t\t\t\tBOUNDS_LENGTH,\n\t\t\t\tBOUNDS_WIDTH\n\t\t\t);\n\t\t\tthis.setLocationRelativeTo(null);\n\t\t\t\n\t\t} else {\n\t\t\tthis.setBounds(10, 10, BOUNDS_LENGTH, BOUNDS_WIDTH);\n\t\t}\n\t}", "void setParent(TestResultTable.TreeNode p) {\n parent = p;\n }", "private void setBounds(RectProto value) {\n if (value != null) {\n this.bounds_ = value;\n this.bitField0_ |= 8;\n return;\n }\n throw new NullPointerException();\n }", "public void getBoundsInParent(Rect outBounds) {\n/* 692 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "protected void adjustBounds() {\n\t\t\tRectangle parentBounds = getParentShell().getBounds();\n\t\t\tPoint textSize = text.getSize();\n\t\t\tRectangle itemBounds = proposalTable.getItem(\n\t\t\t\t\tproposalTable.getSelectionIndex()).getBounds();\n\t\t\tint controlY = parentBounds.y + proposalTable.getBounds().y\n\t\t\t\t\t+ itemBounds.y + POPUP_VERTICALSPACING + 1;\n\t\t\tint controlWidht = textSize.x + 20;\n\t\t\tint controlHeight = itemBounds.height;\n\t\t\tRectangle proposedBounds = null;\n\n\t\t\t// Try placing the info popup to the right\n\t\t\tRectangle rightProposedBounds = new Rectangle(parentBounds.x\n\t\t\t\t\t+ parentBounds.width + PopupDialog.POPUP_HORIZONTALSPACING,\n\t\t\t\t\tcontrolY, controlWidht, controlHeight);\n\t\t\trightProposedBounds = getConstrainedShellBounds(rightProposedBounds);\n\n\t\t\t// If it won't fit on the right, try the left\n\t\t\tif (rightProposedBounds.intersects(parentBounds)) {\n\t\t\t\tRectangle leftProposedBounds = new Rectangle(parentBounds.x\n\t\t\t\t\t\t- controlWidht - POPUP_HORIZONTALSPACING - 1, controlY,\n\t\t\t\t\t\tcontrolWidht, controlHeight);\n\t\t\t\tleftProposedBounds = getConstrainedShellBounds(leftProposedBounds);\n\n\t\t\t\t// If it won't fit on the left, display on top of the item\n\t\t\t\tif (leftProposedBounds.intersects(parentBounds)) {\n\t\t\t\t\trightProposedBounds.x = parentBounds.x + itemBounds.x;\n\t\t\t\t\trightProposedBounds.y = controlY - itemBounds.height + 1;\n\t\t\t\t\tproposedBounds = rightProposedBounds;\n\t\t\t\t} else {\n\t\t\t\t\t// Use the proposed bounds on the left\n\t\t\t\t\tproposedBounds = leftProposedBounds;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Use the proposed bounds on the right\n\t\t\t\tproposedBounds = rightProposedBounds;\n\t\t\t}\n\t\t\tgetShell().setBounds(proposedBounds);\n\t\t}", "@Override\n public void resize()\n {\n if (this.resizer != null)\n {\n this.resizer.apply(this.area);\n }\n\n if (this.children != null)\n {\n this.children.resize();\n }\n\n if (this.resizer != null)\n {\n this.resizer.postApply(this.area);\n }\n }", "void childResized(int w, int h);", "public void onBoundsResolved()\n {\n updateTransform();\n }", "private void createConent() {\n\t\tdockPanel = new DockLayoutPanel(Unit.PX);\n\t\tribbonBarPanel = new RibbonBarContainer();\n\t\tbattleMatCanvasPanel = new SimpleLayoutPanel();\n\t\tmainPanel = new LayoutPanel();\n\t\tmainPanel.setSize(\"100%\", \"100%\");\n\t\tbattleMatCanvas = new BattleMatCanvas();\n\t\tbattleMatCanvasPanel.clear();\n\t\tbattleMatCanvasPanel.add(battleMatCanvas);\n\t\teast.setSize(\"100%\", \"100%\");\n\t\teast.add(assetManagementPanel);\n\t\tsplitPanel = new SplitLayoutPanel() {\n\t\t\t@Override\n\t\t\tpublic void onResize() {\n\t\t\t\tsuper.onResize();\n\t\t\t\tbattleMatCanvas.onResize();\n\t\t\t};\n\t\t};\n\t\tmainPanel.add(splitPanel);\n\t\tdockPanel.clear();\n\t\tdockPanel.addNorth(ribbonBarPanel, Constants.RIBBON_BAR_SIZE);\n\t\tdockPanel.add(mainPanel);\n\t\t// MUST CALL THIS METHOD to set the constraints; if you don't not much\n\t\t// will be displayed!\n\t\tdockPanel.forceLayout();\n\n\t\tWindow.addResizeHandler(new ResizeHandler() {\n\t\t\tpublic void onResize(final ResizeEvent event) {\n\t\t\t\tdoWindowResize(event);\n\t\t\t}\n\t\t});\n\t}", "@Override\r\n\tpublic void setParent(Tag arg0) {\n\t}" ]
[ "0.6982732", "0.673993", "0.6637088", "0.6611095", "0.6475084", "0.6445817", "0.6359617", "0.6268874", "0.62309295", "0.62163514", "0.61854756", "0.6178619", "0.6165415", "0.61451447", "0.6135101", "0.6086492", "0.6056791", "0.60019386", "0.59855026", "0.5963434", "0.59374523", "0.59039915", "0.58901423", "0.58742315", "0.58548445", "0.5849696", "0.58493763", "0.58401126", "0.5819001", "0.5803852", "0.5795967", "0.57890505", "0.57717943", "0.5770976", "0.57475626", "0.5739426", "0.5732299", "0.572164", "0.5719862", "0.5717878", "0.5713717", "0.56851393", "0.5645055", "0.5643573", "0.563411", "0.56148547", "0.5605906", "0.560075", "0.55988187", "0.5595947", "0.5588885", "0.55847687", "0.5583973", "0.5571073", "0.55644697", "0.5550489", "0.552758", "0.5495116", "0.5485898", "0.5471165", "0.5469946", "0.54630876", "0.54596025", "0.5454818", "0.5452218", "0.54511344", "0.5445004", "0.54377514", "0.54358524", "0.5430359", "0.542997", "0.54168576", "0.541443", "0.541342", "0.5410914", "0.54003745", "0.5395378", "0.5395028", "0.5391903", "0.5378881", "0.53760904", "0.53613526", "0.53569174", "0.53528214", "0.533672", "0.53361374", "0.5333244", "0.5332677", "0.5331416", "0.5323159", "0.53192985", "0.53188026", "0.531846", "0.53130156", "0.53112215", "0.5303749", "0.5301274", "0.52973795", "0.5296498", "0.5293525" ]
0.61016035
15
Test case number: 0 /Coverage entropy=1.741249801110481
@Test(timeout = 4000) public void test00() throws Throwable { FBProcedureCall fBProcedureCall0 = new FBProcedureCall(); fBProcedureCall0.clone(); fBProcedureCall0.addParam(0, "|_"); FBProcedureParam fBProcedureParam0 = fBProcedureCall0.getInputParam(3884); fBProcedureCall0.mapOutParamIndexToPosition(966, true); fBProcedureCall0.clone(); fBProcedureCall0.mapOutParamIndexToPosition((-1149), true); int int0 = 191; fBProcedureCall0.getSQL(true); fBProcedureCall0.getSQL(true); fBProcedureCall0.addParam(191, "ybKk4{(bg["); boolean boolean0 = false; fBProcedureParam0.setType((-1149)); fBProcedureCall0.getInputParam(887); // Undeclared exception! fBProcedureCall0.getSQL(false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test126() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.totalCost();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.getHeader();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test29() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.pctCorrect();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderPRC((-1));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.avgCost();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanPriorEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test17() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFPriorEntropy();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setNumericPriorsFromBuffer();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n \n evaluation0.useNoPriors();\n assertEquals(Double.NaN, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.priorEntropy();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives((-1436));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctIncorrect();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test40() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, evaluation0.unclassified(), 0.01D);\n }", "@Test\n public void test35() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(Double.NaN, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test119() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString((String) null, true);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(\"null\\nTotal Number of Instances 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(false);\n assertEquals(\"=== Summary ===\\n\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n }", "@Test\n public void test36() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.incorrect();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.unclassified();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test33() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertEquals(2, doubleArray0.length);\n assertNotNull(doubleArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(0.0, Double.NaN);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test01() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-1459.149165489484), ',');\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setDiscardPredictions(false);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertFalse(evaluation0.getDiscardPredictions());\n }", "@Test\n public void test13() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.recall((-9));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(360, (-336.251));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertFalse(boolean0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(Double.NaN);\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test15() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n public void test16() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.SFSchemeEntropy();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n public void test21() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.errorRate();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test30() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertFalse(boolean0);\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\"\", false);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test040() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.falseNegativeRate((-2));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"Y#:')*#rI\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numInstances();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "@Test\n public void test14() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test\n public void test18() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString();\n assertEquals(\"=== Detailed Accuracy By Class ===\\n\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toCumulativeMarginDistributionString();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(\" -1 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.toMatrixString(\"getPreBuiltClassifiers\");\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC(17);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test006() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedAreaUnderPRC();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test19() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBInformation();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test\n public void test00() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass('u', 4.9E-324);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1D() {\n CuteNetlibCase.doTest(\"FIT1D.SIF\", \"-9146.378092421019\", \"80453.99999999999\", NumberContext.of(7, 4));\n }", "public void testSummaryStatsPartialLog() {\n\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset98.txt\");\n GcManager gcManager = new GcManager();\n File preprocessedFile = gcManager.preprocess(testFile, null);\n gcManager.store(preprocessedFile, false);\n JvmRun jvmRun = gcManager.getJvmRun(new Jvm(null, null), Constants.DEFAULT_BOTTLENECK_THROUGHPUT_THRESHOLD);\n Assert.assertEquals(\"GC event type count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertEquals(\"GC blocking event count not correct.\", 2, jvmRun.getBlockingEventCount());\n Assert.assertEquals(\"GC pause total not correct.\", 61, jvmRun.getTotalGcPause());\n Assert.assertEquals(\"GC first timestamp not correct.\", 1002192, jvmRun.getFirstGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last timestamp not correct.\", 1002847, jvmRun.getLastGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last duration not correct.\", 41, jvmRun.getLastGcEvent().getDuration());\n Assert.assertEquals(\"Stopped Time event count not correct.\", 6, jvmRun.getStoppedTimeEventCount());\n Assert.assertEquals(\"Stopped time total not correct.\", 1064, jvmRun.getTotalStoppedTime());\n Assert.assertEquals(\"Stopped first timestamp not correct.\", 1000964,\n jvmRun.getFirstStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last timestamp not correct.\", 1003884,\n jvmRun.getLastStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last duration not correct.\", 1000688, jvmRun.getLastStoppedEvent().getDuration());\n Assert.assertEquals(\"JVM first event timestamp not correct.\", 1000964, jvmRun.getFirstEvent().getTimestamp());\n Assert.assertEquals(\"JVM last event timestamp not correct.\", 1003884, jvmRun.getLastEvent().getTimestamp());\n Assert.assertEquals(\"JVM run duration not correct.\", 3920, jvmRun.getJvmRunDuration());\n Assert.assertEquals(\"GC throughput not correct.\", 98, jvmRun.getGcThroughput());\n Assert.assertEquals(\"Stopped time throughput not correct.\", 73, jvmRun.getStoppedTimeThroughput());\n Assert.assertTrue(Analysis.WARN_GC_STOPPED_RATIO + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_GC_STOPPED_RATIO));\n }", "@Test(timeout = 4000)\n public void test008() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.meanAbsoluteError();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test030() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives(2458);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test001() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedTruePositiveRate();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test041() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.fMeasure((-2765));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC50A() {\n CuteNetlibCase.doTest(\"SC50A.SIF\", \"-64.57507705856449\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(0.95);\n assertNotNull(doubleArray0);\n assertArrayEquals(new double[] {1.0, 0.0}, doubleArray0, 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test049() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC((-1));\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.getRevision();\n assertEquals(\"8964\", string0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test088() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBRelativeInformation();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test020() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\".arff\", true);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\".arff\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n discretize0.m_UseEqualFrequency = true;\n discretize0.getOptions();\n assertTrue(discretize0.getMakeBinary());\n \n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test(timeout = 4000)\n public void test18() throws Throwable {\n Discretize discretize0 = new Discretize(\"%\");\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n discretize0.findNumBinsTipText();\n double[][] doubleArray0 = new double[0][7];\n discretize0.m_CutPoints = doubleArray0;\n FileSystemHandling.setPermissions((EvoSuiteFile) null, true, false, true);\n discretize0.setInvertSelection(false);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test111() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.relativeAbsoluteError();\n assertEquals(Double.NaN, evaluation0.meanPriorAbsoluteError(), 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(Double.NaN, evaluation0.meanAbsoluteError(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n Discretize discretize0 = new Discretize(\"*W5D<hSCW|8@I\");\n int[] intArray0 = new int[9];\n intArray0[0] = (-1405);\n intArray0[1] = (-2938);\n intArray0[2] = (-1954);\n intArray0[3] = 9;\n intArray0[4] = 66;\n intArray0[5] = 573;\n intArray0[6] = 0;\n intArray0[7] = (-71);\n intArray0[8] = 99;\n discretize0.setAttributeIndicesArray(intArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }", "@Test(timeout = 4000)\n public void test028() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numTrueNegatives(2308);\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_07() {\n CuteNetlibCase.doTest(\"OSA-07.SIF\", \"535722.517299352\", \"4332086.205299969\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test005() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedAreaUnderROC();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test\n public void test23() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n SerializedClassifier serializedClassifier0 = new SerializedClassifier();\n Object[] objectArray0 = new Object[25];\n double[] doubleArray0 = evaluation0.evaluateModel((Classifier) serializedClassifier0, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n @Tag(\"slow\")\n public void testKEN_07() {\n CuteNetlibCase.doTest(\"KEN-07.SIF\", \"-6.795204433816869E8\", \"-1.61949281194431E8\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n public void test09() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedFalseNegativeRate();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test(timeout = 4000)\n public void test07() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.setInvertSelection(true);\n discretize0.useEqualFrequencyTipText();\n int int0 = (-501);\n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualWidthBinning((-501));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test002() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedMatthewsCorrelation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test04() throws Throwable {\n Discretize discretize0 = new Discretize(\"9/&=Kq&\");\n discretize0.getBinRangesString((-1679));\n int int0 = (-98);\n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualWidthBinning((-98));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1P() {\n CuteNetlibCase.doTest(\"FIT1P.SIF\", \"9146.378092420955\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test027() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.precision((-1484));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_14() {\n CuteNetlibCase.doTest(\"OSA-14.SIF\", \"1106462.8447362552\", \"9377699.405100001\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test23() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.setIgnoreClass(true);\n discretize0.getOptions();\n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC205() {\n CuteNetlibCase.doTest(\"SC205.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testCZPROB() {\n CuteNetlibCase.doTest(\"CZPROB.SIF\", \"2185196.6988565763\", \"3089066.71321333\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test067() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-398.0145), 360.0);\n assertEquals(Double.NaN, evaluation0.rootMeanPriorSquaredError(), 0.01);\n }", "@Test(timeout = 4000)\n public void test081() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedTrueNegativeRate();\n assertEquals(Double.NaN, double0, 0.01);\n }" ]
[ "0.756469", "0.7488483", "0.7331934", "0.7200102", "0.717041", "0.71671057", "0.7160117", "0.7159563", "0.7129964", "0.7129082", "0.711411", "0.7112587", "0.7106111", "0.70978427", "0.7078783", "0.70185804", "0.70069146", "0.70048887", "0.69888216", "0.69862753", "0.6982817", "0.69156086", "0.68894595", "0.6888123", "0.6877496", "0.6871271", "0.6857217", "0.68157655", "0.6810526", "0.6786372", "0.67819303", "0.67789114", "0.6771243", "0.67673683", "0.6761253", "0.6758913", "0.6750702", "0.67486936", "0.6736817", "0.6734819", "0.6710253", "0.6680032", "0.6674526", "0.6665254", "0.6648254", "0.66319", "0.6630113", "0.6615427", "0.66090703", "0.6604731", "0.65828794", "0.65672046", "0.65648156", "0.65540737", "0.6546936", "0.6531003", "0.6527033", "0.65144", "0.6510229", "0.6479832", "0.64650935", "0.6461564", "0.641849", "0.64080215", "0.64053035", "0.63955265", "0.638715", "0.6378032", "0.63637364", "0.6358819", "0.63543713", "0.63344526", "0.63269824", "0.6306685", "0.6285608", "0.6284836", "0.6281609", "0.6276813", "0.6267007", "0.62580544", "0.6245367", "0.62356704", "0.62342757", "0.62223303", "0.62199813", "0.6200501", "0.61994505", "0.6197451", "0.6190392", "0.6189251", "0.61822116", "0.6179533", "0.6178297", "0.6176753", "0.61705214", "0.6158139", "0.6146788", "0.6139255", "0.6135128", "0.61339974", "0.6132064" ]
0.0
-1
Test case number: 1 /Coverage entropy=1.8095479945599666
@Test(timeout = 4000) public void test01() throws Throwable { FBProcedureCall fBProcedureCall0 = new FBProcedureCall(); FBProcedureParam fBProcedureParam0 = fBProcedureCall0.addParam(3659, "5"); fBProcedureParam0.setType(883); fBProcedureParam0.setType(883); fBProcedureCall0.getInputParam(883); FBProcedureParam fBProcedureParam1 = new FBProcedureParam(17, "5"); fBProcedureParam1.clone(); FBProcedureParam fBProcedureParam2 = new FBProcedureParam(17, "5"); fBProcedureParam1.setIndex(3659); fBProcedureCall0.addInputParam(fBProcedureParam2); fBProcedureParam0.setType(45); fBProcedureParam1.setType((-587)); fBProcedureParam1.setIndex(3659); fBProcedureCall0.addOutputParam(fBProcedureParam1); fBProcedureCall0.addInputParam(fBProcedureParam0); fBProcedureCall0.getOutputParam(17); fBProcedureCall0.registerOutParam(3659, (-1574)); fBProcedureCall0.addParam(17, "5"); // Undeclared exception! fBProcedureCall0.getInputParam(3659); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test126() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.totalCost();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.getHeader();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test29() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.pctCorrect();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.priorEntropy();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanPriorEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderPRC((-1));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n \n evaluation0.useNoPriors();\n assertEquals(Double.NaN, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test17() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFPriorEntropy();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.avgCost();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setNumericPriorsFromBuffer();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctIncorrect();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test40() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, evaluation0.unclassified(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertEquals(2, doubleArray0.length);\n assertNotNull(doubleArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives((-1436));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1D() {\n CuteNetlibCase.doTest(\"FIT1D.SIF\", \"-9146.378092421019\", \"80453.99999999999\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test119() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString((String) null, true);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(\"null\\nTotal Number of Instances 0 \\n\", string0);\n }", "@Test\n public void test35() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(Double.NaN, double0, 0.01D);\n }", "@Test\n public void test33() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(false);\n assertEquals(\"=== Summary ===\\n\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n }", "@Test\n public void test36() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.incorrect();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString();\n assertEquals(\"=== Detailed Accuracy By Class ===\\n\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.unclassified();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.recall((-9));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test16() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.SFSchemeEntropy();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test13() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"Y#:')*#rI\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numInstances();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(360, (-336.251));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setDiscardPredictions(false);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertFalse(evaluation0.getDiscardPredictions());\n }", "@Test\n public void test15() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(0.0, Double.NaN);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test21() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.errorRate();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "public void testSummaryStatsPartialLog() {\n\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset98.txt\");\n GcManager gcManager = new GcManager();\n File preprocessedFile = gcManager.preprocess(testFile, null);\n gcManager.store(preprocessedFile, false);\n JvmRun jvmRun = gcManager.getJvmRun(new Jvm(null, null), Constants.DEFAULT_BOTTLENECK_THROUGHPUT_THRESHOLD);\n Assert.assertEquals(\"GC event type count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertEquals(\"GC blocking event count not correct.\", 2, jvmRun.getBlockingEventCount());\n Assert.assertEquals(\"GC pause total not correct.\", 61, jvmRun.getTotalGcPause());\n Assert.assertEquals(\"GC first timestamp not correct.\", 1002192, jvmRun.getFirstGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last timestamp not correct.\", 1002847, jvmRun.getLastGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last duration not correct.\", 41, jvmRun.getLastGcEvent().getDuration());\n Assert.assertEquals(\"Stopped Time event count not correct.\", 6, jvmRun.getStoppedTimeEventCount());\n Assert.assertEquals(\"Stopped time total not correct.\", 1064, jvmRun.getTotalStoppedTime());\n Assert.assertEquals(\"Stopped first timestamp not correct.\", 1000964,\n jvmRun.getFirstStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last timestamp not correct.\", 1003884,\n jvmRun.getLastStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last duration not correct.\", 1000688, jvmRun.getLastStoppedEvent().getDuration());\n Assert.assertEquals(\"JVM first event timestamp not correct.\", 1000964, jvmRun.getFirstEvent().getTimestamp());\n Assert.assertEquals(\"JVM last event timestamp not correct.\", 1003884, jvmRun.getLastEvent().getTimestamp());\n Assert.assertEquals(\"JVM run duration not correct.\", 3920, jvmRun.getJvmRunDuration());\n Assert.assertEquals(\"GC throughput not correct.\", 98, jvmRun.getGcThroughput());\n Assert.assertEquals(\"Stopped time throughput not correct.\", 73, jvmRun.getStoppedTimeThroughput());\n Assert.assertTrue(Analysis.WARN_GC_STOPPED_RATIO + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_GC_STOPPED_RATIO));\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertFalse(boolean0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test01() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-1459.149165489484), ',');\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(Double.NaN);\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.toMatrixString(\"getPreBuiltClassifiers\");\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC(17);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "@Test\n public void test18() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\"\", false);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test\n public void test19() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBInformation();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test14() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1P() {\n CuteNetlibCase.doTest(\"FIT1P.SIF\", \"9146.378092420955\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "public void testLiangFigure6() {\n int[] a = {0, 0, 0, 0, 1, 1, 1, 1};\n int[] b = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] c = {0, 1, 0, 1, 0, 1, 0, 1};\n int[] ap = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] bp = {0, 1, 0, 1, 1, 1, 1, 1};\n int[] cp = {0, 0, 0, 1, 0, 1, 1, 1};\n\n for (int i = 0; i < ntimes - 1; i++) {\n cases[i][0] = a[i];\n cases[i][1] = b[i];\n cases[i][2] = c[i];\n cases[i + 1][3] = ap[i];\n cases[i + 1][4] = bp[i];\n cases[i + 1][5] = cp[i];\n }\n cases[8][0] = 0;\n cases[8][1] = 0;\n cases[8][2] = 0;\n cases[0][3] = 0;\n cases[0][4] = 0;\n cases[0][5] = 0;\n\n RevealEvaluator re = new RevealEvaluator(cases);\n\n double rea = re.entropy(a);\n assertEquals(1.0, rea, TOLERANCE);\n System.out.println(\"H(a) = \" + rea); //Should be 1.0\n\n double reb = re.entropy(b);\n assertEquals(1.0, reb, TOLERANCE);\n System.out.println(\"H(b) = \" + reb); //Should be 1.0\n\n double rec = re.entropy(c);\n assertEquals(1.0, rec, TOLERANCE);\n System.out.println(\"H(c) = \" + rec); //Should be 1.0\n\n double reab = re.jointEntropy(a, b);\n assertEquals(2.0, reab, TOLERANCE);\n System.out.println(\"H(a,b) = \" + reab); //Should be 2.0\n\n double reap = re.entropy(ap);\n assertEquals(1.0, reap, TOLERANCE);\n System.out.println(\"H(ap) = \" + reap); //Should be 1.0\n\n double rebp = re.entropy(bp);\n assertEquals(0.8112781244591328, rebp, TOLERANCE);\n System.out.println(\"H(bp) = \" + rebp); //Should be 0.8112781244591328\n\n double recp = re.entropy(cp);\n assertEquals(1.0, recp, TOLERANCE);\n System.out.println(\"H(cp) = \" + recp); //Should be 1.0\n\n double reapa = re.jointEntropy(ap, a);\n assertEquals(2.0, reapa, TOLERANCE);\n System.out.println(\"H(ap, a) = \" + reapa); //Should be 2.0\n\n double rebpb = re.jointEntropy(bp, b);\n assertEquals(1.8112781244591327, rebpb, TOLERANCE);\n System.out.println(\n \"H(bp, b) = \" + rebpb); //Should be 1.8112781244591327\n\n double recpb = re.jointEntropy(cp, b);\n assertEquals(1.8112781244591327, recpb, TOLERANCE);\n System.out.println(\n \"H(cp, b) = \" + recpb); //Should be 1.8112781244591327\n\n int[][] ab = new int[2][8];\n for (int i = 0; i < 8; i++) {\n ab[0][i] = a[i];\n ab[1][i] = b[i];\n }\n\n double rebpab = re.jointEntropy(bp, ab);\n assertEquals(2.5, rebpab, TOLERANCE);\n System.out.println(\"H(bp, a, b) = \" + rebpab); //Should be 2.5\n\n double recpab = re.jointEntropy(cp, ab);\n assertEquals(2.5, recpab, TOLERANCE);\n System.out.println(\"H(cp, a, b) = \" + recpab); //Should be 2.5\n\n int[][] abc = new int[3][8];\n for (int i = 0; i < 8; i++) {\n abc[0][i] = a[i];\n abc[1][i] = b[i];\n abc[2][i] = c[i];\n }\n\n double recpabc = re.jointEntropy(cp, abc);\n assertEquals(3.0, recpabc, TOLERANCE);\n System.out.println(\"H(cp, a, b, c) = \" + recpabc); //Should be 3.0\n\n //Setup array cases and test mutualInformation\n int[] p = new int[1];\n p[0] = 0;\n\n double rembpa = re.mutualInformation(4, p, 1);\n assertEquals(0.31127812445913294, rembpa, TOLERANCE);\n System.out.println(\n \"M(Bp, A) = \" + rembpa); //Should be 0.31127812445913294\n\n int[] pp = new int[2];\n pp[0] = 0;\n pp[1] = 1;\n\n double rmcpab = re.mutualInformation(5, pp, 1);\n assertEquals(0.5, rmcpab, TOLERANCE);\n System.out.println(\"M(Cp, [A,B]) = \" + rmcpab); //Should be 0.5\n\n int[] ppp = new int[3];\n ppp[0] = 0;\n ppp[1] = 1;\n ppp[2] = 2;\n\n double rmcpabc = re.mutualInformation(5, ppp, 1);\n assertEquals(1.0, rmcpabc, TOLERANCE);\n System.out.println(\"M(Cp, [A,B,C]) = \" + rmcpabc); //Should be 1.0\n\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.getRevision();\n assertEquals(\"8964\", string0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n public void test30() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertFalse(boolean0);\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toCumulativeMarginDistributionString();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(\" -1 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(0.95);\n assertNotNull(doubleArray0);\n assertArrayEquals(new double[] {1.0, 0.0}, doubleArray0, 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_14() {\n CuteNetlibCase.doTest(\"OSA-14.SIF\", \"1106462.8447362552\", \"9377699.405100001\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC50A() {\n CuteNetlibCase.doTest(\"SC50A.SIF\", \"-64.57507705856449\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_07() {\n CuteNetlibCase.doTest(\"OSA-07.SIF\", \"535722.517299352\", \"4332086.205299969\", NumberContext.of(7, 4));\n }", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test006() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedAreaUnderPRC();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testKEN_07() {\n CuteNetlibCase.doTest(\"KEN-07.SIF\", \"-6.795204433816869E8\", \"-1.61949281194431E8\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "public double entropyPotential() {\n \n return (-1.0);\n}", "@Test(timeout = 4000)\n public void test041() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.fMeasure((-2765));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCRE_A() {\n CuteNetlibCase.doTest(\"CRE-A.SIF\", \"2.9889732905677114E7\", \"2.9889732905677114E7\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test001() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedTruePositiveRate();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n discretize0.m_UseEqualFrequency = true;\n discretize0.getOptions();\n assertTrue(discretize0.getMakeBinary());\n \n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testCZPROB() {\n CuteNetlibCase.doTest(\"CZPROB.SIF\", \"2185196.6988565763\", \"3089066.71321333\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCORPION() {\n CuteNetlibCase.doTest(\"SCORPION.SIF\", \"1878.1248227381068\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getBinRangesString(2607);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test088() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBRelativeInformation();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test049() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC((-1));\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n Discretize discretize0 = new Discretize(\"*W5D<hSCW|8@I\");\n int[] intArray0 = new int[9];\n intArray0[0] = (-1405);\n intArray0[1] = (-2938);\n intArray0[2] = (-1954);\n intArray0[3] = 9;\n intArray0[4] = 66;\n intArray0[5] = 573;\n intArray0[6] = 0;\n intArray0[7] = (-71);\n intArray0[8] = 99;\n discretize0.setAttributeIndicesArray(intArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n byte[] byteArray0 = new byte[3];\n byteArray0[0] = (byte)108;\n byteArray0[1] = (byte)27;\n byteArray0[2] = (byte)14;\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n discretize0.setBins((-830));\n discretize0.getOptions();\n assertEquals((-830), discretize0.getBins());\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize(\"\\tInvert matching sense of column indexes.\");\n discretize0.setOutputFormat();\n discretize0.listOptions();\n Discretize discretize1 = new Discretize();\n discretize1.setIgnoreClass(false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\\tInvert matching sense of column indexes.\";\n stringArray0[1] = \"\";\n Discretize.main(stringArray0);\n String string0 = discretize1.findNumBinsTipText();\n assertEquals(\"Optimize number of equal-width bins using leave-one-out. Doesn't work for equal-frequency binning\", string0);\n \n discretize1.setInvertSelection(false);\n discretize0.getBinRangesString(511);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n \n discretize1.getFindNumBins();\n assertEquals(10, discretize1.getBins());\n }", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n Attribute attribute0 = new Attribute(\"invalid CVS revision - not dots!\");\n attribute0.setWeight(0.0);\n Attribute.typeToString(attribute0);\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"UR<dj;O\", arrayList0, 3);\n Instances instances1 = new Instances(instances0);\n boolean boolean0 = discretize0.setInputFormat(instances1);\n assertFalse(boolean0);\n \n String[] stringArray0 = new String[3];\n stringArray0[0] = \".bsi\";\n stringArray0[1] = \"invalid CVS revision - not dots!\";\n stringArray0[2] = \"@end\";\n discretize0.setOptions(stringArray0);\n discretize0.setOptions(stringArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n }", "@Test(timeout = 4000)\n public void test027() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.precision((-1484));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test040() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.falseNegativeRate((-2));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize(\"'B1of2'\");\n int[] intArray0 = new int[8];\n intArray0[0] = 18;\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"'B1of2'\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(6, stringArray0.length);\n }", "@Test(timeout = 4000)\n public void test008() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.meanAbsoluteError();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test111() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.relativeAbsoluteError();\n assertEquals(Double.NaN, evaluation0.meanPriorAbsoluteError(), 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(Double.NaN, evaluation0.meanAbsoluteError(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCSD1() {\n CuteNetlibCase.doTest(\"SCSD1.SIF\", \"8.666666674333367\", null, NumberContext.of(7, 4));\n }", "public void test_0020() {\n int nFactors = 2;\n FactorAnalysis instance = new FactorAnalysis(data, nFactors);\n\n assertEquals(instance.nObs(), 18., 1e-15);\n assertEquals(instance.nVariables(), 6., 1e-15);\n assertEquals(instance.nFactors(), 2., 1e-15);\n\n FAEstimator estimators = instance.getEstimators(400);\n\n Vector uniqueness = estimators.psi();\n assertArrayEquals(\n new double[]{0.005, 0.114, 0.642, 0.742, 0.005, 0.097},\n uniqueness.toArray(),\n 2e-2);\n\n int dof = estimators.dof();\n assertEquals(dof, 4);\n\n double fitted = estimators.logLikelihood();\n assertEquals(fitted, 1.803, 1e-3);\n\n Matrix loadings = estimators.loadings();\n assertTrue(AreMatrices.equal(\n new DenseMatrix(new double[][]{\n {0.971, 0.228},\n {0.917, 0.213},\n {0.429, 0.418},\n {0.363, 0.355},\n {0.254, 0.965},\n {0.205, 0.928}\n }),\n loadings,\n 1e-3));\n\n double testStats = estimators.statistics();\n assertEquals(testStats, 23.14, 1e-2);\n\n double pValue = estimators.pValue();\n assertEquals(pValue, 0.000119, 1e-6);//R: 1-pchisq(23.14, df=4) = 0.0001187266\n\n// System.out.println(uniqueness.toString());\n// System.out.println(fitted);\n// System.out.println(loadings.toString());\n }", "@Test\n public void test23() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n SerializedClassifier serializedClassifier0 = new SerializedClassifier();\n Object[] objectArray0 = new Object[25];\n double[] doubleArray0 = evaluation0.evaluateModel((Classifier) serializedClassifier0, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n public void testCalculateProbability() throws IOException, ParseException, MathException {\n System.out.println(\"calculateProbability\");\n OrganizationsRegister ro = info(\"e\", \"f\");\n String id = \"12\";\n String expResult = \"25,25 %\";\n String result = ro.calculateProbability();\n assertEquals(expResult, result);\n }", "@Test\n @Tag(\"slow\")\n public void testWOOD1P() {\n CuteNetlibCase.doTest(\"WOOD1P.SIF\", \"1.44290241157344\", \"9.99999999999964\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test18() throws Throwable {\n Discretize discretize0 = new Discretize(\"%\");\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n discretize0.findNumBinsTipText();\n double[][] doubleArray0 = new double[0][7];\n discretize0.m_CutPoints = doubleArray0;\n FileSystemHandling.setPermissions((EvoSuiteFile) null, true, false, true);\n discretize0.setInvertSelection(false);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }" ]
[ "0.7256584", "0.7133989", "0.692861", "0.6846617", "0.6824709", "0.68186903", "0.68096304", "0.67997074", "0.67970884", "0.67933476", "0.67854816", "0.6773875", "0.67435217", "0.67306185", "0.6697228", "0.66750026", "0.667012", "0.6665625", "0.6618007", "0.66155696", "0.6594009", "0.6580201", "0.6558673", "0.6552644", "0.65347826", "0.6505716", "0.6502514", "0.6500528", "0.6496545", "0.64807606", "0.64590317", "0.6451504", "0.64494103", "0.64122856", "0.64120954", "0.6401607", "0.6401275", "0.6395934", "0.63900596", "0.6381564", "0.63795143", "0.6375842", "0.6346588", "0.63428575", "0.6336305", "0.63309944", "0.6330419", "0.6303509", "0.6288954", "0.62649167", "0.6264539", "0.62560177", "0.62537587", "0.625323", "0.62468356", "0.62415016", "0.6227673", "0.62188923", "0.61962724", "0.61869895", "0.6181276", "0.615744", "0.61489415", "0.6145124", "0.6138284", "0.6136242", "0.61361647", "0.6127286", "0.612649", "0.6121208", "0.6087738", "0.6086267", "0.60811865", "0.6080873", "0.6071454", "0.6069763", "0.6043333", "0.60406137", "0.6040301", "0.603719", "0.6017835", "0.6017511", "0.60034704", "0.5996167", "0.5995727", "0.5992016", "0.59919596", "0.59902084", "0.5979707", "0.59707713", "0.5965295", "0.5964065", "0.59510434", "0.59427905", "0.5923496", "0.5912669", "0.59110993", "0.5902777", "0.5872963", "0.58614635", "0.58530784" ]
0.0
-1
Test case number: 2 /Coverage entropy=1.6186859282647967
@Test(timeout = 4000) public void test02() throws Throwable { FBProcedureCall fBProcedureCall0 = new FBProcedureCall(); fBProcedureCall0.addParam(0, "gZbnc2Y!%jU?C2`8"); fBProcedureCall0.getSQL(true); fBProcedureCall0.getInputParam(137); FBProcedureParam fBProcedureParam0 = fBProcedureCall0.addParam(0, "Ouv(!}2Ulje!"); FBProcedureParam fBProcedureParam1 = fBProcedureCall0.addParam(0, " not set and "); fBProcedureParam1.setIndex((-1079)); fBProcedureParam0.setIndex(60); fBProcedureParam1.setIndex(1); fBProcedureParam1.setIndex(9); fBProcedureParam1.setIndex(1861); fBProcedureParam1.setIndex(137); FBProcedureCall fBProcedureCall1 = (FBProcedureCall)fBProcedureCall0.clone(); String string0 = fBProcedureCall0.getSQL(true); // // Unstable assertion: assertEquals("SELECT * FROM null(not set and, null)", string0); FBProcedureParam fBProcedureParam2 = fBProcedureCall1.getInputParam(137); // // Unstable assertion: assertNotSame(fBProcedureParam2, fBProcedureParam1); FBProcedureParam fBProcedureParam3 = fBProcedureCall0.getInputParam(1); // // Unstable assertion: assertEquals(1428, fBProcedureParam3.getType()); // // Unstable assertion: assertTrue(fBProcedureCall0.equals((Object)fBProcedureCall1)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test126() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.totalCost();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.getHeader();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test29() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.pctCorrect();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderPRC((-1));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test40() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, evaluation0.unclassified(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.priorEntropy();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test17() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFPriorEntropy();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.avgCost();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n \n evaluation0.useNoPriors();\n assertEquals(Double.NaN, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctIncorrect();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertEquals(2, doubleArray0.length);\n assertNotNull(doubleArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanPriorEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setNumericPriorsFromBuffer();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test35() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(Double.NaN, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n public void test16() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.SFSchemeEntropy();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n public void test33() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test119() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString((String) null, true);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(\"null\\nTotal Number of Instances 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(false);\n assertEquals(\"=== Summary ===\\n\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString();\n assertEquals(\"=== Detailed Accuracy By Class ===\\n\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test36() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.incorrect();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives((-1436));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "public void testLiangFigure6() {\n int[] a = {0, 0, 0, 0, 1, 1, 1, 1};\n int[] b = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] c = {0, 1, 0, 1, 0, 1, 0, 1};\n int[] ap = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] bp = {0, 1, 0, 1, 1, 1, 1, 1};\n int[] cp = {0, 0, 0, 1, 0, 1, 1, 1};\n\n for (int i = 0; i < ntimes - 1; i++) {\n cases[i][0] = a[i];\n cases[i][1] = b[i];\n cases[i][2] = c[i];\n cases[i + 1][3] = ap[i];\n cases[i + 1][4] = bp[i];\n cases[i + 1][5] = cp[i];\n }\n cases[8][0] = 0;\n cases[8][1] = 0;\n cases[8][2] = 0;\n cases[0][3] = 0;\n cases[0][4] = 0;\n cases[0][5] = 0;\n\n RevealEvaluator re = new RevealEvaluator(cases);\n\n double rea = re.entropy(a);\n assertEquals(1.0, rea, TOLERANCE);\n System.out.println(\"H(a) = \" + rea); //Should be 1.0\n\n double reb = re.entropy(b);\n assertEquals(1.0, reb, TOLERANCE);\n System.out.println(\"H(b) = \" + reb); //Should be 1.0\n\n double rec = re.entropy(c);\n assertEquals(1.0, rec, TOLERANCE);\n System.out.println(\"H(c) = \" + rec); //Should be 1.0\n\n double reab = re.jointEntropy(a, b);\n assertEquals(2.0, reab, TOLERANCE);\n System.out.println(\"H(a,b) = \" + reab); //Should be 2.0\n\n double reap = re.entropy(ap);\n assertEquals(1.0, reap, TOLERANCE);\n System.out.println(\"H(ap) = \" + reap); //Should be 1.0\n\n double rebp = re.entropy(bp);\n assertEquals(0.8112781244591328, rebp, TOLERANCE);\n System.out.println(\"H(bp) = \" + rebp); //Should be 0.8112781244591328\n\n double recp = re.entropy(cp);\n assertEquals(1.0, recp, TOLERANCE);\n System.out.println(\"H(cp) = \" + recp); //Should be 1.0\n\n double reapa = re.jointEntropy(ap, a);\n assertEquals(2.0, reapa, TOLERANCE);\n System.out.println(\"H(ap, a) = \" + reapa); //Should be 2.0\n\n double rebpb = re.jointEntropy(bp, b);\n assertEquals(1.8112781244591327, rebpb, TOLERANCE);\n System.out.println(\n \"H(bp, b) = \" + rebpb); //Should be 1.8112781244591327\n\n double recpb = re.jointEntropy(cp, b);\n assertEquals(1.8112781244591327, recpb, TOLERANCE);\n System.out.println(\n \"H(cp, b) = \" + recpb); //Should be 1.8112781244591327\n\n int[][] ab = new int[2][8];\n for (int i = 0; i < 8; i++) {\n ab[0][i] = a[i];\n ab[1][i] = b[i];\n }\n\n double rebpab = re.jointEntropy(bp, ab);\n assertEquals(2.5, rebpab, TOLERANCE);\n System.out.println(\"H(bp, a, b) = \" + rebpab); //Should be 2.5\n\n double recpab = re.jointEntropy(cp, ab);\n assertEquals(2.5, recpab, TOLERANCE);\n System.out.println(\"H(cp, a, b) = \" + recpab); //Should be 2.5\n\n int[][] abc = new int[3][8];\n for (int i = 0; i < 8; i++) {\n abc[0][i] = a[i];\n abc[1][i] = b[i];\n abc[2][i] = c[i];\n }\n\n double recpabc = re.jointEntropy(cp, abc);\n assertEquals(3.0, recpabc, TOLERANCE);\n System.out.println(\"H(cp, a, b, c) = \" + recpabc); //Should be 3.0\n\n //Setup array cases and test mutualInformation\n int[] p = new int[1];\n p[0] = 0;\n\n double rembpa = re.mutualInformation(4, p, 1);\n assertEquals(0.31127812445913294, rembpa, TOLERANCE);\n System.out.println(\n \"M(Bp, A) = \" + rembpa); //Should be 0.31127812445913294\n\n int[] pp = new int[2];\n pp[0] = 0;\n pp[1] = 1;\n\n double rmcpab = re.mutualInformation(5, pp, 1);\n assertEquals(0.5, rmcpab, TOLERANCE);\n System.out.println(\"M(Cp, [A,B]) = \" + rmcpab); //Should be 0.5\n\n int[] ppp = new int[3];\n ppp[0] = 0;\n ppp[1] = 1;\n ppp[2] = 2;\n\n double rmcpabc = re.mutualInformation(5, ppp, 1);\n assertEquals(1.0, rmcpabc, TOLERANCE);\n System.out.println(\"M(Cp, [A,B,C]) = \" + rmcpabc); //Should be 1.0\n\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.recall((-9));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"Y#:')*#rI\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numInstances();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.unclassified();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "@Test\n public void test15() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setDiscardPredictions(false);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertFalse(evaluation0.getDiscardPredictions());\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01);\n }", "public void testSummaryStatsPartialLog() {\n\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset98.txt\");\n GcManager gcManager = new GcManager();\n File preprocessedFile = gcManager.preprocess(testFile, null);\n gcManager.store(preprocessedFile, false);\n JvmRun jvmRun = gcManager.getJvmRun(new Jvm(null, null), Constants.DEFAULT_BOTTLENECK_THROUGHPUT_THRESHOLD);\n Assert.assertEquals(\"GC event type count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertEquals(\"GC blocking event count not correct.\", 2, jvmRun.getBlockingEventCount());\n Assert.assertEquals(\"GC pause total not correct.\", 61, jvmRun.getTotalGcPause());\n Assert.assertEquals(\"GC first timestamp not correct.\", 1002192, jvmRun.getFirstGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last timestamp not correct.\", 1002847, jvmRun.getLastGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last duration not correct.\", 41, jvmRun.getLastGcEvent().getDuration());\n Assert.assertEquals(\"Stopped Time event count not correct.\", 6, jvmRun.getStoppedTimeEventCount());\n Assert.assertEquals(\"Stopped time total not correct.\", 1064, jvmRun.getTotalStoppedTime());\n Assert.assertEquals(\"Stopped first timestamp not correct.\", 1000964,\n jvmRun.getFirstStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last timestamp not correct.\", 1003884,\n jvmRun.getLastStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last duration not correct.\", 1000688, jvmRun.getLastStoppedEvent().getDuration());\n Assert.assertEquals(\"JVM first event timestamp not correct.\", 1000964, jvmRun.getFirstEvent().getTimestamp());\n Assert.assertEquals(\"JVM last event timestamp not correct.\", 1003884, jvmRun.getLastEvent().getTimestamp());\n Assert.assertEquals(\"JVM run duration not correct.\", 3920, jvmRun.getJvmRunDuration());\n Assert.assertEquals(\"GC throughput not correct.\", 98, jvmRun.getGcThroughput());\n Assert.assertEquals(\"Stopped time throughput not correct.\", 73, jvmRun.getStoppedTimeThroughput());\n Assert.assertTrue(Analysis.WARN_GC_STOPPED_RATIO + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_GC_STOPPED_RATIO));\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC(17);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test21() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.errorRate();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.toMatrixString(\"getPreBuiltClassifiers\");\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test13() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n public void test14() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(360, (-336.251));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test18() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }", "@Test\n public void test01() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-1459.149165489484), ',');\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertFalse(boolean0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test19() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBInformation();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1D() {\n CuteNetlibCase.doTest(\"FIT1D.SIF\", \"-9146.378092421019\", \"80453.99999999999\", NumberContext.of(7, 4));\n }", "public double entropyPotential() {\n \n return (-1.0);\n}", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.getRevision();\n assertEquals(\"8964\", string0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\"\", false);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "public int getCoverage (){\r\n return coverage;\r\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toCumulativeMarginDistributionString();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(\" -1 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC50A() {\n CuteNetlibCase.doTest(\"SC50A.SIF\", \"-64.57507705856449\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(Double.NaN);\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test30() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertFalse(boolean0);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCORPION() {\n CuteNetlibCase.doTest(\"SCORPION.SIF\", \"1878.1248227381068\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test006() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedAreaUnderPRC();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_07() {\n CuteNetlibCase.doTest(\"OSA-07.SIF\", \"535722.517299352\", \"4332086.205299969\", NumberContext.of(7, 4));\n }", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_14() {\n CuteNetlibCase.doTest(\"OSA-14.SIF\", \"1106462.8447362552\", \"9377699.405100001\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize(\"'B1of2'\");\n int[] intArray0 = new int[8];\n intArray0[0] = 18;\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"'B1of2'\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(6, stringArray0.length);\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(0.0, Double.NaN);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize(\"\\tInvert matching sense of column indexes.\");\n discretize0.setOutputFormat();\n discretize0.listOptions();\n Discretize discretize1 = new Discretize();\n discretize1.setIgnoreClass(false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\\tInvert matching sense of column indexes.\";\n stringArray0[1] = \"\";\n Discretize.main(stringArray0);\n String string0 = discretize1.findNumBinsTipText();\n assertEquals(\"Optimize number of equal-width bins using leave-one-out. Doesn't work for equal-frequency binning\", string0);\n \n discretize1.setInvertSelection(false);\n discretize0.getBinRangesString(511);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n \n discretize1.getFindNumBins();\n assertEquals(10, discretize1.getBins());\n }", "@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getBinRangesString(2607);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n Discretize discretize0 = new Discretize(\"*W5D<hSCW|8@I\");\n int[] intArray0 = new int[9];\n intArray0[0] = (-1405);\n intArray0[1] = (-2938);\n intArray0[2] = (-1954);\n intArray0[3] = 9;\n intArray0[4] = 66;\n intArray0[5] = 573;\n intArray0[6] = 0;\n intArray0[7] = (-71);\n intArray0[8] = 99;\n discretize0.setAttributeIndicesArray(intArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n Attribute attribute0 = new Attribute(\"invalid CVS revision - not dots!\");\n attribute0.setWeight(0.0);\n Attribute.typeToString(attribute0);\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"UR<dj;O\", arrayList0, 3);\n Instances instances1 = new Instances(instances0);\n boolean boolean0 = discretize0.setInputFormat(instances1);\n assertFalse(boolean0);\n \n String[] stringArray0 = new String[3];\n stringArray0[0] = \".bsi\";\n stringArray0[1] = \"invalid CVS revision - not dots!\";\n stringArray0[2] = \"@end\";\n discretize0.setOptions(stringArray0);\n discretize0.setOptions(stringArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n }", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n discretize0.m_UseEqualFrequency = true;\n discretize0.getOptions();\n assertTrue(discretize0.getMakeBinary());\n \n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(0.95);\n assertNotNull(doubleArray0);\n assertArrayEquals(new double[] {1.0, 0.0}, doubleArray0, 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test\n\tpublic void testGetCounts() {\n\t\tString cellBC = \"ATCAGGGACAGA\";\n\n\t\tint snpPos = 76227022;\n\t\tInterval snpInterval = new Interval(\"HUMAN_1\", snpPos, snpPos, true, \"test\");\n\t\tSampleGenotypeProbabilities result = new SampleGenotypeProbabilities(snpInterval, cellBC);\n\t\tSNPUMIBasePileup p = getPileUpFromFile(cellBC, \"CGGGGCTC\");\n\t\tp.addLocusFunction(LocusFunction.CODING);\n\t\tresult.add(p);\n\t\tresult.add(getPileUpFromFile(cellBC, \"CGCGGGAC\")); // this read doesn't overlap the SNP so it isn't added!\n\t\tresult.add(getPileUpFromFile(cellBC, \"CTGGGCTC\"));\n\t\tresult.add(getPileUpFromFile(cellBC, \"GGAATGTG\"));\n\t\tresult.add(getPileUpFromFile(cellBC, \"GTGCCGTG\"));\n\t\tresult.add(getPileUpFromFile(cellBC, \"TCGCAGAC\"));\n\n\t\t// the code coverage gods are pleased.\n\t\tAssert.assertEquals(result.getCell(), cellBC);\n\t\tAssert.assertEquals(result.getSNPInterval(), snpInterval);\n\n\t\tAssert.assertNotNull(result.toString());\n\n\t\t// get the unfiltered results.\n\t\tObjectCounter<Character> umiCounts = result.getUMIBaseCounts();\n\t\tObjectCounter<Character> umiCountsExpected = new ObjectCounter<>();\n\t\tumiCountsExpected.incrementByCount('A', 2);\n\t\tumiCountsExpected.incrementByCount('G', 3);\n\t\tAssert.assertEquals(umiCounts, umiCountsExpected);\n\n\t\tObjectCounter<Character> readCounts = result.getReadBaseCounts();\n\t\tObjectCounter<Character> readCountsExpected = new ObjectCounter<>();\n\t\treadCountsExpected.incrementByCount('A', 2);\n\t\treadCountsExpected.incrementByCount('G', 5);\n\t\tAssert.assertEquals(readCounts, readCountsExpected);\n\n\t\tSet<LocusFunction> expected = new HashSet<>(Arrays.asList(LocusFunction.CODING));\n\t\tAssert.assertEquals(result.getLocusFunctions(), expected);\n\n\t}", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCRE_A() {\n CuteNetlibCase.doTest(\"CRE-A.SIF\", \"2.9889732905677114E7\", \"2.9889732905677114E7\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testCZPROB() {\n CuteNetlibCase.doTest(\"CZPROB.SIF\", \"2185196.6988565763\", \"3089066.71321333\", NumberContext.of(7, 4));\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n byte[] byteArray0 = new byte[3];\n byteArray0[0] = (byte)108;\n byteArray0[1] = (byte)27;\n byteArray0[2] = (byte)14;\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n discretize0.setBins((-830));\n discretize0.getOptions();\n assertEquals((-830), discretize0.getBins());\n }", "@Test(timeout = 4000)\n public void test18() throws Throwable {\n Discretize discretize0 = new Discretize(\"%\");\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n discretize0.findNumBinsTipText();\n double[][] doubleArray0 = new double[0][7];\n discretize0.m_CutPoints = doubleArray0;\n FileSystemHandling.setPermissions((EvoSuiteFile) null, true, false, true);\n discretize0.setInvertSelection(false);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test049() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC((-1));\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test16() throws Throwable {\n Discretize discretize0 = new Discretize();\n String[] stringArray0 = discretize0.getOptions();\n discretize0.setOptions(stringArray0);\n assertEquals(6, stringArray0.length);\n \n String string0 = discretize0.globalInfo();\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"An instance filter that discretizes a range of numeric attributes in the dataset into nominal attributes. Discretization is by simple binning. Skips the class attribute if set.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Override\n public int getGridCoverageCount() {\n return 1;\n }", "@Test\n public void testCalculateProbability() throws IOException, ParseException, MathException {\n System.out.println(\"calculateProbability\");\n OrganizationsRegister ro = info(\"e\", \"f\");\n String id = \"12\";\n String expResult = \"25,25 %\";\n String result = ro.calculateProbability();\n assertEquals(expResult, result);\n }", "@Test\n @Tag(\"bm1000\")\n public void testAGG2() {\n CuteNetlibCase.doTest(\"AGG2.SIF\", \"-2.0239252355977114E7\", \"5.71551859632249E9\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1P() {\n CuteNetlibCase.doTest(\"FIT1P.SIF\", \"9146.378092420955\", null, NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testKEN_07() {\n CuteNetlibCase.doTest(\"KEN-07.SIF\", \"-6.795204433816869E8\", \"-1.61949281194431E8\", NumberContext.of(7, 4));\n }", "@Test\n public void testFitnessProportionateSelection()\n {\n }", "public static void main(String[] args) {\n int N = Integer.parseInt(args[0]);\n int x = Integer.parseInt(args[1]);\n Integer[] a = new Integer[N];\n for (int i = 0; i < N; i++) {\n a[i] = i % x;\n }\n StdOut.printf(\"H = %4.2f\\n\", entropy(a));\n }", "@Test(timeout = 4000)\n public void test020() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\".arff\", true);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\".arff\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void costTest() {\n // TODO: test cost\n }", "@Test\n public void testCalculateNominationCuantity2() throws FileNotFoundException {\n System.out.println(\"testCalculateNominationCuantity 2\");\n double expResult = 125.0;\n double result = calc.getChange(124d, calc.calculateDenominationCuantity(124d));\n assertEquals(expResult, result);\n }", "@ParameterizedTest\n @ArgumentsSource(TestForestProvider.class)\n public void testMultipleAttributions(RandomCutForest forest) {\n int hardPass=0;\n int causal=0;\n double [] point ={6.0,0.0,0.0};\n DiVector result = forest.getAnomalyAttribution(point);\n assertTrue(result.low[0] < 0.2);\n if (result.getHighLowSum(1) < 0.5) ++hardPass;\n if (result.getHighLowSum(2) < 0.5) ++hardPass;\n assertTrue(result.getHighLowSum(1) + result.getHighLowSum(2) < 1.0);\n assertTrue(result.high[0] > forest.getAnomalyScore(point)/3);\n if (result.high[0] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n // the last line states that first coordinate was high and was a majority contributor to the score\n // the previous test states that the contribution is twice the average of the 12 possible contributors.\n // these tests all subparts of the score at once\n\n point=new double [] {-6.0,0.0,0.0};\n result = forest.getAnomalyAttribution(point);\n assertTrue(result.getHighLowSum()>1.0);\n assertTrue(result.high[0] < 0.5);\n if (result.getHighLowSum(1) < 0.5) ++hardPass;\n if (result.getHighLowSum(2) < 0.5) ++hardPass;\n assertTrue(result.low[0] > forest.getAnomalyScore(point)/3);\n if (result.low[0] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n\n point=new double [] {0.0,6.0,0.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n if (result.getHighLowSum(0) < 0.5) ++hardPass;\n if (result.getHighLowSum(2) < 0.5) ++hardPass;\n assertTrue(result.low[1] < 0.5);\n assertTrue(result.high[1] > forest.getAnomalyScore(point)/3);\n if (result.high[1] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n\n point=new double [] {0.0,-6.0,0.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n if (result.getHighLowSum(0) < 0.5) ++hardPass;\n if (result.getHighLowSum(2) < 0.5) ++hardPass;\n assertTrue(result.high[1] < 0.5);\n assertTrue(result.low[1] > forest.getAnomalyScore(point)/3);\n if (result.low[1] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n\n point=new double [] {0.0,0.0,6.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n if (result.getHighLowSum(0) < 0.5) ++hardPass;\n if (result.getHighLowSum(1) < 0.5) ++hardPass;\n assertTrue(result.low[2] < 0.5);\n assertTrue(result.high[2] > forest.getAnomalyScore(point)/3);\n if (result.high[2] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n point=new double [] {0.0,0.0,-6.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n if (result.getHighLowSum(0) < 0.5) ++hardPass;\n if (result.getHighLowSum(1) < 0.5) ++hardPass;\n assertTrue(result.high[2] < 0.5);\n assertTrue(result.low[2] > forest.getAnomalyScore(point)/3);\n if (result.low[2] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n\n assertTrue(causal>=5); // maximum is 6; there can be skew in one direction\n\n point=new double [] {-3.0,0.0,0.0};\n result = forest.getAnomalyAttribution(point);\n assertTrue(result.high[0] < 0.5);\n if (result.getHighLowSum(1) < 0.5) ++hardPass;\n if (result.getHighLowSum(2) < 0.5) ++hardPass;\n assertTrue(result.low[0] >\n forest.getAnomalyScore(point)/3);\n\n /* For multiple causes, the relationship of scores only hold for larger\n * distances.\n */\n\n point=new double [] {-3.0,6.0,0.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n if (result.low[0] > 0.5) ++hardPass;\n assertTrue(result.high[0] < 0.5);\n assertTrue(result.low[1] < 0.5);\n assertTrue(result.high[1] > 0.5);\n if (result.high[1]>0.9) ++hardPass;\n assertTrue(result.getHighLowSum(2)< 0.5);\n assertTrue(result.high[1]+result.low[0]>\n 0.8*forest.getAnomalyScore(point));\n\n point=new double [] {6.0,-3.0,0.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n assertTrue(result.low[0] < 0.5);\n assertTrue(result.high[0] > 0.5);\n if (result.high[0]>0.9) ++hardPass;\n if (result.low[1] > 0.5) ++hardPass;\n assertTrue(result.high[1] < 0.5);\n assertTrue(result.getHighLowSum(2) < 0.5);\n assertTrue(result.high[0]+result.low[1]>\n 0.8*forest.getAnomalyScore(point));\n\n point=new double [] {20.0,-10.0,0.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n assertTrue(result.high[0]+result.low[1]>\n 0.8*forest.getAnomalyScore(point));\n if (result.high[0]>1.8*result.low[1]) ++hardPass;\n if (result.low[1]>result.high[0]/2.2) ++hardPass;\n\n assertTrue(hardPass>=15); //maximum is 20\n }" ]
[ "0.70828366", "0.6921757", "0.67913806", "0.67738783", "0.6644644", "0.66394556", "0.66295284", "0.6587091", "0.65672946", "0.6561772", "0.65484", "0.6544126", "0.6542065", "0.6540406", "0.65383184", "0.6509957", "0.64894354", "0.6439801", "0.64364386", "0.64138705", "0.6384952", "0.63801163", "0.6377247", "0.63376176", "0.63342315", "0.63317245", "0.63295126", "0.63251007", "0.63080776", "0.62779665", "0.6260245", "0.6250086", "0.62417245", "0.62365335", "0.6230559", "0.6217721", "0.62175655", "0.6211776", "0.62079775", "0.6206759", "0.62037575", "0.61989266", "0.6188456", "0.6182268", "0.6177413", "0.6154979", "0.614804", "0.61202", "0.6115096", "0.6110723", "0.6099039", "0.6097953", "0.60821307", "0.6079193", "0.6073233", "0.6067531", "0.6055583", "0.6055305", "0.6047694", "0.60436857", "0.60358083", "0.6035358", "0.6026043", "0.60160446", "0.60137254", "0.60115457", "0.6008008", "0.60041934", "0.5999234", "0.59930634", "0.59908557", "0.5985652", "0.5971453", "0.5960356", "0.59576595", "0.5934299", "0.59308714", "0.5927616", "0.59261245", "0.59186864", "0.59090877", "0.58996105", "0.5897072", "0.5895955", "0.589474", "0.58907706", "0.5887571", "0.5887355", "0.58781606", "0.5847647", "0.58459294", "0.58315694", "0.58249974", "0.5821124", "0.58177567", "0.5812475", "0.580294", "0.5798902", "0.5796136", "0.57957035", "0.57836866" ]
0.0
-1
Test case number: 3 /Coverage entropy=1.0609581504393426
@Test(timeout = 4000) public void test03() throws Throwable { FBProcedureCall fBProcedureCall0 = new FBProcedureCall(); String string0 = "FgZRnc2Yp%jU?C2`8"; FBProcedureParam fBProcedureParam0 = new FBProcedureParam(40, "FgZRnc2Yp%jU?C2`8"); fBProcedureCall0.addOutputParam(fBProcedureParam0); FBProcedureParam fBProcedureParam1 = fBProcedureCall0.addParam(3, "FgZRnc2Yp%jU?C2`8"); fBProcedureParam1.setIndex(3); try { fBProcedureCall0.getSQL(false); fail("Expecting exception: FBSQLException"); } catch(FBSQLException e) { // // Value of parameter 3 not set and it was not registered as output parameter. // verifyException("org.firebirdsql.jdbc.FBProcedureCall", e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test126() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.totalCost();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.getHeader();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test29() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.pctCorrect();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderPRC((-1));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.priorEntropy();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.avgCost();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctIncorrect();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n \n evaluation0.useNoPriors();\n assertEquals(Double.NaN, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test40() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, evaluation0.unclassified(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanPriorEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test17() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFPriorEntropy();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertEquals(2, doubleArray0.length);\n assertNotNull(doubleArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setNumericPriorsFromBuffer();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test33() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test35() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(Double.NaN, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives((-1436));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(false);\n assertEquals(\"=== Summary ===\\n\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n }", "@Test\n public void test36() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.incorrect();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test119() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString((String) null, true);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(\"null\\nTotal Number of Instances 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test16() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.SFSchemeEntropy();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString();\n assertEquals(\"=== Detailed Accuracy By Class ===\\n\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.unclassified();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "public void testSummaryStatsPartialLog() {\n\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset98.txt\");\n GcManager gcManager = new GcManager();\n File preprocessedFile = gcManager.preprocess(testFile, null);\n gcManager.store(preprocessedFile, false);\n JvmRun jvmRun = gcManager.getJvmRun(new Jvm(null, null), Constants.DEFAULT_BOTTLENECK_THROUGHPUT_THRESHOLD);\n Assert.assertEquals(\"GC event type count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertEquals(\"GC blocking event count not correct.\", 2, jvmRun.getBlockingEventCount());\n Assert.assertEquals(\"GC pause total not correct.\", 61, jvmRun.getTotalGcPause());\n Assert.assertEquals(\"GC first timestamp not correct.\", 1002192, jvmRun.getFirstGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last timestamp not correct.\", 1002847, jvmRun.getLastGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last duration not correct.\", 41, jvmRun.getLastGcEvent().getDuration());\n Assert.assertEquals(\"Stopped Time event count not correct.\", 6, jvmRun.getStoppedTimeEventCount());\n Assert.assertEquals(\"Stopped time total not correct.\", 1064, jvmRun.getTotalStoppedTime());\n Assert.assertEquals(\"Stopped first timestamp not correct.\", 1000964,\n jvmRun.getFirstStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last timestamp not correct.\", 1003884,\n jvmRun.getLastStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last duration not correct.\", 1000688, jvmRun.getLastStoppedEvent().getDuration());\n Assert.assertEquals(\"JVM first event timestamp not correct.\", 1000964, jvmRun.getFirstEvent().getTimestamp());\n Assert.assertEquals(\"JVM last event timestamp not correct.\", 1003884, jvmRun.getLastEvent().getTimestamp());\n Assert.assertEquals(\"JVM run duration not correct.\", 3920, jvmRun.getJvmRunDuration());\n Assert.assertEquals(\"GC throughput not correct.\", 98, jvmRun.getGcThroughput());\n Assert.assertEquals(\"Stopped time throughput not correct.\", 73, jvmRun.getStoppedTimeThroughput());\n Assert.assertTrue(Analysis.WARN_GC_STOPPED_RATIO + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_GC_STOPPED_RATIO));\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "public void testLiangFigure6() {\n int[] a = {0, 0, 0, 0, 1, 1, 1, 1};\n int[] b = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] c = {0, 1, 0, 1, 0, 1, 0, 1};\n int[] ap = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] bp = {0, 1, 0, 1, 1, 1, 1, 1};\n int[] cp = {0, 0, 0, 1, 0, 1, 1, 1};\n\n for (int i = 0; i < ntimes - 1; i++) {\n cases[i][0] = a[i];\n cases[i][1] = b[i];\n cases[i][2] = c[i];\n cases[i + 1][3] = ap[i];\n cases[i + 1][4] = bp[i];\n cases[i + 1][5] = cp[i];\n }\n cases[8][0] = 0;\n cases[8][1] = 0;\n cases[8][2] = 0;\n cases[0][3] = 0;\n cases[0][4] = 0;\n cases[0][5] = 0;\n\n RevealEvaluator re = new RevealEvaluator(cases);\n\n double rea = re.entropy(a);\n assertEquals(1.0, rea, TOLERANCE);\n System.out.println(\"H(a) = \" + rea); //Should be 1.0\n\n double reb = re.entropy(b);\n assertEquals(1.0, reb, TOLERANCE);\n System.out.println(\"H(b) = \" + reb); //Should be 1.0\n\n double rec = re.entropy(c);\n assertEquals(1.0, rec, TOLERANCE);\n System.out.println(\"H(c) = \" + rec); //Should be 1.0\n\n double reab = re.jointEntropy(a, b);\n assertEquals(2.0, reab, TOLERANCE);\n System.out.println(\"H(a,b) = \" + reab); //Should be 2.0\n\n double reap = re.entropy(ap);\n assertEquals(1.0, reap, TOLERANCE);\n System.out.println(\"H(ap) = \" + reap); //Should be 1.0\n\n double rebp = re.entropy(bp);\n assertEquals(0.8112781244591328, rebp, TOLERANCE);\n System.out.println(\"H(bp) = \" + rebp); //Should be 0.8112781244591328\n\n double recp = re.entropy(cp);\n assertEquals(1.0, recp, TOLERANCE);\n System.out.println(\"H(cp) = \" + recp); //Should be 1.0\n\n double reapa = re.jointEntropy(ap, a);\n assertEquals(2.0, reapa, TOLERANCE);\n System.out.println(\"H(ap, a) = \" + reapa); //Should be 2.0\n\n double rebpb = re.jointEntropy(bp, b);\n assertEquals(1.8112781244591327, rebpb, TOLERANCE);\n System.out.println(\n \"H(bp, b) = \" + rebpb); //Should be 1.8112781244591327\n\n double recpb = re.jointEntropy(cp, b);\n assertEquals(1.8112781244591327, recpb, TOLERANCE);\n System.out.println(\n \"H(cp, b) = \" + recpb); //Should be 1.8112781244591327\n\n int[][] ab = new int[2][8];\n for (int i = 0; i < 8; i++) {\n ab[0][i] = a[i];\n ab[1][i] = b[i];\n }\n\n double rebpab = re.jointEntropy(bp, ab);\n assertEquals(2.5, rebpab, TOLERANCE);\n System.out.println(\"H(bp, a, b) = \" + rebpab); //Should be 2.5\n\n double recpab = re.jointEntropy(cp, ab);\n assertEquals(2.5, recpab, TOLERANCE);\n System.out.println(\"H(cp, a, b) = \" + recpab); //Should be 2.5\n\n int[][] abc = new int[3][8];\n for (int i = 0; i < 8; i++) {\n abc[0][i] = a[i];\n abc[1][i] = b[i];\n abc[2][i] = c[i];\n }\n\n double recpabc = re.jointEntropy(cp, abc);\n assertEquals(3.0, recpabc, TOLERANCE);\n System.out.println(\"H(cp, a, b, c) = \" + recpabc); //Should be 3.0\n\n //Setup array cases and test mutualInformation\n int[] p = new int[1];\n p[0] = 0;\n\n double rembpa = re.mutualInformation(4, p, 1);\n assertEquals(0.31127812445913294, rembpa, TOLERANCE);\n System.out.println(\n \"M(Bp, A) = \" + rembpa); //Should be 0.31127812445913294\n\n int[] pp = new int[2];\n pp[0] = 0;\n pp[1] = 1;\n\n double rmcpab = re.mutualInformation(5, pp, 1);\n assertEquals(0.5, rmcpab, TOLERANCE);\n System.out.println(\"M(Cp, [A,B]) = \" + rmcpab); //Should be 0.5\n\n int[] ppp = new int[3];\n ppp[0] = 0;\n ppp[1] = 1;\n ppp[2] = 2;\n\n double rmcpabc = re.mutualInformation(5, ppp, 1);\n assertEquals(1.0, rmcpabc, TOLERANCE);\n System.out.println(\"M(Cp, [A,B,C]) = \" + rmcpabc); //Should be 1.0\n\n }", "@Test\n public void test15() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setDiscardPredictions(false);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertFalse(evaluation0.getDiscardPredictions());\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.recall((-9));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(360, (-336.251));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "@Test\n public void test21() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.errorRate();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test13() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"Y#:')*#rI\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numInstances();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.toMatrixString(\"getPreBuiltClassifiers\");\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n public void test30() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertFalse(boolean0);\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertFalse(boolean0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test18() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test19() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBInformation();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(Double.NaN);\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC(17);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.getRevision();\n assertEquals(\"8964\", string0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1D() {\n CuteNetlibCase.doTest(\"FIT1D.SIF\", \"-9146.378092421019\", \"80453.99999999999\", NumberContext.of(7, 4));\n }", "@Test\n public void test14() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test\n public void test01() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-1459.149165489484), ',');\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\"\", false);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test006() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedAreaUnderPRC();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(0.0, Double.NaN);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_07() {\n CuteNetlibCase.doTest(\"OSA-07.SIF\", \"535722.517299352\", \"4332086.205299969\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC50A() {\n CuteNetlibCase.doTest(\"SC50A.SIF\", \"-64.57507705856449\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCRE_A() {\n CuteNetlibCase.doTest(\"CRE-A.SIF\", \"2.9889732905677114E7\", \"2.9889732905677114E7\", NumberContext.of(7, 4));\n }", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n @Tag(\"slow\")\n public void testCZPROB() {\n CuteNetlibCase.doTest(\"CZPROB.SIF\", \"2185196.6988565763\", \"3089066.71321333\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toCumulativeMarginDistributionString();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(\" -1 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(0.95);\n assertNotNull(doubleArray0);\n assertArrayEquals(new double[] {1.0, 0.0}, doubleArray0, 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n discretize0.m_UseEqualFrequency = true;\n discretize0.getOptions();\n assertTrue(discretize0.getMakeBinary());\n \n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_14() {\n CuteNetlibCase.doTest(\"OSA-14.SIF\", \"1106462.8447362552\", \"9377699.405100001\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize(\"\\tInvert matching sense of column indexes.\");\n discretize0.setOutputFormat();\n discretize0.listOptions();\n Discretize discretize1 = new Discretize();\n discretize1.setIgnoreClass(false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\\tInvert matching sense of column indexes.\";\n stringArray0[1] = \"\";\n Discretize.main(stringArray0);\n String string0 = discretize1.findNumBinsTipText();\n assertEquals(\"Optimize number of equal-width bins using leave-one-out. Doesn't work for equal-frequency binning\", string0);\n \n discretize1.setInvertSelection(false);\n discretize0.getBinRangesString(511);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n \n discretize1.getFindNumBins();\n assertEquals(10, discretize1.getBins());\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n Discretize discretize0 = new Discretize(\"*W5D<hSCW|8@I\");\n int[] intArray0 = new int[9];\n intArray0[0] = (-1405);\n intArray0[1] = (-2938);\n intArray0[2] = (-1954);\n intArray0[3] = 9;\n intArray0[4] = 66;\n intArray0[5] = 573;\n intArray0[6] = 0;\n intArray0[7] = (-71);\n intArray0[8] = 99;\n discretize0.setAttributeIndicesArray(intArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n Attribute attribute0 = new Attribute(\"invalid CVS revision - not dots!\");\n attribute0.setWeight(0.0);\n Attribute.typeToString(attribute0);\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"UR<dj;O\", arrayList0, 3);\n Instances instances1 = new Instances(instances0);\n boolean boolean0 = discretize0.setInputFormat(instances1);\n assertFalse(boolean0);\n \n String[] stringArray0 = new String[3];\n stringArray0[0] = \".bsi\";\n stringArray0[1] = \"invalid CVS revision - not dots!\";\n stringArray0[2] = \"@end\";\n discretize0.setOptions(stringArray0);\n discretize0.setOptions(stringArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize(\"'B1of2'\");\n int[] intArray0 = new int[8];\n intArray0[0] = 18;\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"'B1of2'\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(6, stringArray0.length);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCORPION() {\n CuteNetlibCase.doTest(\"SCORPION.SIF\", \"1878.1248227381068\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getBinRangesString(2607);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n @Tag(\"slow\")\n public void testKEN_07() {\n CuteNetlibCase.doTest(\"KEN-07.SIF\", \"-6.795204433816869E8\", \"-1.61949281194431E8\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n byte[] byteArray0 = new byte[3];\n byteArray0[0] = (byte)108;\n byteArray0[1] = (byte)27;\n byteArray0[2] = (byte)14;\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n discretize0.setBins((-830));\n discretize0.getOptions();\n assertEquals((-830), discretize0.getBins());\n }", "@Test(timeout = 4000)\n public void test18() throws Throwable {\n Discretize discretize0 = new Discretize(\"%\");\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n discretize0.findNumBinsTipText();\n double[][] doubleArray0 = new double[0][7];\n discretize0.m_CutPoints = doubleArray0;\n FileSystemHandling.setPermissions((EvoSuiteFile) null, true, false, true);\n discretize0.setInvertSelection(false);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n\tpublic void testGetCounts() {\n\t\tString cellBC = \"ATCAGGGACAGA\";\n\n\t\tint snpPos = 76227022;\n\t\tInterval snpInterval = new Interval(\"HUMAN_1\", snpPos, snpPos, true, \"test\");\n\t\tSampleGenotypeProbabilities result = new SampleGenotypeProbabilities(snpInterval, cellBC);\n\t\tSNPUMIBasePileup p = getPileUpFromFile(cellBC, \"CGGGGCTC\");\n\t\tp.addLocusFunction(LocusFunction.CODING);\n\t\tresult.add(p);\n\t\tresult.add(getPileUpFromFile(cellBC, \"CGCGGGAC\")); // this read doesn't overlap the SNP so it isn't added!\n\t\tresult.add(getPileUpFromFile(cellBC, \"CTGGGCTC\"));\n\t\tresult.add(getPileUpFromFile(cellBC, \"GGAATGTG\"));\n\t\tresult.add(getPileUpFromFile(cellBC, \"GTGCCGTG\"));\n\t\tresult.add(getPileUpFromFile(cellBC, \"TCGCAGAC\"));\n\n\t\t// the code coverage gods are pleased.\n\t\tAssert.assertEquals(result.getCell(), cellBC);\n\t\tAssert.assertEquals(result.getSNPInterval(), snpInterval);\n\n\t\tAssert.assertNotNull(result.toString());\n\n\t\t// get the unfiltered results.\n\t\tObjectCounter<Character> umiCounts = result.getUMIBaseCounts();\n\t\tObjectCounter<Character> umiCountsExpected = new ObjectCounter<>();\n\t\tumiCountsExpected.incrementByCount('A', 2);\n\t\tumiCountsExpected.incrementByCount('G', 3);\n\t\tAssert.assertEquals(umiCounts, umiCountsExpected);\n\n\t\tObjectCounter<Character> readCounts = result.getReadBaseCounts();\n\t\tObjectCounter<Character> readCountsExpected = new ObjectCounter<>();\n\t\treadCountsExpected.incrementByCount('A', 2);\n\t\treadCountsExpected.incrementByCount('G', 5);\n\t\tAssert.assertEquals(readCounts, readCountsExpected);\n\n\t\tSet<LocusFunction> expected = new HashSet<>(Arrays.asList(LocusFunction.CODING));\n\t\tAssert.assertEquals(result.getLocusFunctions(), expected);\n\n\t}", "@Test\n public void run () {\n\t \n\t System.out.println(\"---------->\");\n\t //System.out.println(md5list.getResult());\n\t //System.out.println(hashsearch.getResult());\n\t \n\t \n\t \n\t // System.out.println(samples.Testing());\n\t //System.out.println(\"getserult: \"+samples.getResult());\n\t \n }", "@Test\n @Tag(\"bm1000\")\n public void testAGG3() {\n CuteNetlibCase.doTest(\"AGG3.SIF\", \"1.031211593508922E7\", \"5.746768863949547E9\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1P() {\n CuteNetlibCase.doTest(\"FIT1P.SIF\", \"9146.378092420955\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test041() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.fMeasure((-2765));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void testFitnessProportionateSelection()\n {\n }", "@Test(timeout = 4000)\n public void test23() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.setIgnoreClass(true);\n discretize0.getOptions();\n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "public int getCoverage (){\r\n return coverage;\r\n }", "public void test_0020() {\n int nFactors = 2;\n FactorAnalysis instance = new FactorAnalysis(data, nFactors);\n\n assertEquals(instance.nObs(), 18., 1e-15);\n assertEquals(instance.nVariables(), 6., 1e-15);\n assertEquals(instance.nFactors(), 2., 1e-15);\n\n FAEstimator estimators = instance.getEstimators(400);\n\n Vector uniqueness = estimators.psi();\n assertArrayEquals(\n new double[]{0.005, 0.114, 0.642, 0.742, 0.005, 0.097},\n uniqueness.toArray(),\n 2e-2);\n\n int dof = estimators.dof();\n assertEquals(dof, 4);\n\n double fitted = estimators.logLikelihood();\n assertEquals(fitted, 1.803, 1e-3);\n\n Matrix loadings = estimators.loadings();\n assertTrue(AreMatrices.equal(\n new DenseMatrix(new double[][]{\n {0.971, 0.228},\n {0.917, 0.213},\n {0.429, 0.418},\n {0.363, 0.355},\n {0.254, 0.965},\n {0.205, 0.928}\n }),\n loadings,\n 1e-3));\n\n double testStats = estimators.statistics();\n assertEquals(testStats, 23.14, 1e-2);\n\n double pValue = estimators.pValue();\n assertEquals(pValue, 0.000119, 1e-6);//R: 1-pchisq(23.14, df=4) = 0.0001187266\n\n// System.out.println(uniqueness.toString());\n// System.out.println(fitted);\n// System.out.println(loadings.toString());\n }", "@Test(timeout = 4000)\n public void test088() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBRelativeInformation();\n assertEquals(0.0, double0, 0.01);\n }", "@ParameterizedTest\n @ArgumentsSource(TestForestProvider.class)\n public void testMultipleAttributions(RandomCutForest forest) {\n int hardPass=0;\n int causal=0;\n double [] point ={6.0,0.0,0.0};\n DiVector result = forest.getAnomalyAttribution(point);\n assertTrue(result.low[0] < 0.2);\n if (result.getHighLowSum(1) < 0.5) ++hardPass;\n if (result.getHighLowSum(2) < 0.5) ++hardPass;\n assertTrue(result.getHighLowSum(1) + result.getHighLowSum(2) < 1.0);\n assertTrue(result.high[0] > forest.getAnomalyScore(point)/3);\n if (result.high[0] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n // the last line states that first coordinate was high and was a majority contributor to the score\n // the previous test states that the contribution is twice the average of the 12 possible contributors.\n // these tests all subparts of the score at once\n\n point=new double [] {-6.0,0.0,0.0};\n result = forest.getAnomalyAttribution(point);\n assertTrue(result.getHighLowSum()>1.0);\n assertTrue(result.high[0] < 0.5);\n if (result.getHighLowSum(1) < 0.5) ++hardPass;\n if (result.getHighLowSum(2) < 0.5) ++hardPass;\n assertTrue(result.low[0] > forest.getAnomalyScore(point)/3);\n if (result.low[0] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n\n point=new double [] {0.0,6.0,0.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n if (result.getHighLowSum(0) < 0.5) ++hardPass;\n if (result.getHighLowSum(2) < 0.5) ++hardPass;\n assertTrue(result.low[1] < 0.5);\n assertTrue(result.high[1] > forest.getAnomalyScore(point)/3);\n if (result.high[1] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n\n point=new double [] {0.0,-6.0,0.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n if (result.getHighLowSum(0) < 0.5) ++hardPass;\n if (result.getHighLowSum(2) < 0.5) ++hardPass;\n assertTrue(result.high[1] < 0.5);\n assertTrue(result.low[1] > forest.getAnomalyScore(point)/3);\n if (result.low[1] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n\n point=new double [] {0.0,0.0,6.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n if (result.getHighLowSum(0) < 0.5) ++hardPass;\n if (result.getHighLowSum(1) < 0.5) ++hardPass;\n assertTrue(result.low[2] < 0.5);\n assertTrue(result.high[2] > forest.getAnomalyScore(point)/3);\n if (result.high[2] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n point=new double [] {0.0,0.0,-6.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n if (result.getHighLowSum(0) < 0.5) ++hardPass;\n if (result.getHighLowSum(1) < 0.5) ++hardPass;\n assertTrue(result.high[2] < 0.5);\n assertTrue(result.low[2] > forest.getAnomalyScore(point)/3);\n if (result.low[2] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n\n assertTrue(causal>=5); // maximum is 6; there can be skew in one direction\n\n point=new double [] {-3.0,0.0,0.0};\n result = forest.getAnomalyAttribution(point);\n assertTrue(result.high[0] < 0.5);\n if (result.getHighLowSum(1) < 0.5) ++hardPass;\n if (result.getHighLowSum(2) < 0.5) ++hardPass;\n assertTrue(result.low[0] >\n forest.getAnomalyScore(point)/3);\n\n /* For multiple causes, the relationship of scores only hold for larger\n * distances.\n */\n\n point=new double [] {-3.0,6.0,0.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n if (result.low[0] > 0.5) ++hardPass;\n assertTrue(result.high[0] < 0.5);\n assertTrue(result.low[1] < 0.5);\n assertTrue(result.high[1] > 0.5);\n if (result.high[1]>0.9) ++hardPass;\n assertTrue(result.getHighLowSum(2)< 0.5);\n assertTrue(result.high[1]+result.low[0]>\n 0.8*forest.getAnomalyScore(point));\n\n point=new double [] {6.0,-3.0,0.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n assertTrue(result.low[0] < 0.5);\n assertTrue(result.high[0] > 0.5);\n if (result.high[0]>0.9) ++hardPass;\n if (result.low[1] > 0.5) ++hardPass;\n assertTrue(result.high[1] < 0.5);\n assertTrue(result.getHighLowSum(2) < 0.5);\n assertTrue(result.high[0]+result.low[1]>\n 0.8*forest.getAnomalyScore(point));\n\n point=new double [] {20.0,-10.0,0.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n assertTrue(result.high[0]+result.low[1]>\n 0.8*forest.getAnomalyScore(point));\n if (result.high[0]>1.8*result.low[1]) ++hardPass;\n if (result.low[1]>result.high[0]/2.2) ++hardPass;\n\n assertTrue(hardPass>=15); //maximum is 20\n }", "@Test\n public void test23() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n SerializedClassifier serializedClassifier0 = new SerializedClassifier();\n Object[] objectArray0 = new Object[25];\n double[] doubleArray0 = evaluation0.evaluateModel((Classifier) serializedClassifier0, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test049() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC((-1));\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "public double entropyPotential() {\n \n return (-1.0);\n}", "@Test(timeout = 4000)\n public void test030() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives(2458);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }" ]
[ "0.72268236", "0.71071565", "0.6976917", "0.6847197", "0.6780914", "0.67734814", "0.6768876", "0.6767336", "0.6743019", "0.67328846", "0.6723764", "0.67123586", "0.6705845", "0.66905797", "0.66799974", "0.66714567", "0.6668955", "0.66338176", "0.6621616", "0.66175514", "0.66106766", "0.65475094", "0.6541863", "0.6541226", "0.65067804", "0.6487579", "0.64871365", "0.64289176", "0.64231044", "0.6414195", "0.6389149", "0.63883364", "0.63850254", "0.63835424", "0.63822335", "0.6378792", "0.6360946", "0.63535434", "0.63347256", "0.631944", "0.6311244", "0.6307076", "0.6305525", "0.63029844", "0.63003385", "0.6281059", "0.628069", "0.6280477", "0.6267127", "0.6253762", "0.6251476", "0.6240398", "0.6227326", "0.6201808", "0.6191805", "0.6182643", "0.61815804", "0.6172014", "0.61688036", "0.61556524", "0.6148494", "0.6147924", "0.6129187", "0.61270976", "0.61128527", "0.6099859", "0.60987985", "0.6095178", "0.60928285", "0.6088374", "0.6086854", "0.60851926", "0.60831696", "0.606807", "0.60680634", "0.60584915", "0.6058018", "0.6044779", "0.6042913", "0.60301894", "0.6027899", "0.6020443", "0.6004962", "0.5979245", "0.59728503", "0.59696186", "0.5968569", "0.5961461", "0.5951064", "0.59481627", "0.59333587", "0.59128714", "0.5910587", "0.5907648", "0.5905909", "0.589661", "0.58953744", "0.5893396", "0.5893084", "0.58713806", "0.58570015" ]
0.0
-1
Test case number: 4 /Coverage entropy=1.8762735844302758
@Test(timeout = 4000) public void test04() throws Throwable { FBProcedureCall fBProcedureCall0 = new FBProcedureCall(); FBProcedureCall fBProcedureCall1 = new FBProcedureCall(); boolean boolean0 = FBProcedureCall.OLD_CALLABLE_STATEMENT_COMPATIBILITY; FBProcedureParam fBProcedureParam0 = new FBProcedureParam(); fBProcedureCall1.setName("x_l("); FBProcedureCall fBProcedureCall2 = new FBProcedureCall(); FBProcedureCall fBProcedureCall3 = new FBProcedureCall(); FBProcedureCall fBProcedureCall4 = new FBProcedureCall(); FBProcedureCall fBProcedureCall5 = (FBProcedureCall)fBProcedureCall4.clone(); FBProcedureCall fBProcedureCall6 = new FBProcedureCall(); fBProcedureCall5.clone(); fBProcedureCall4.equals(fBProcedureCall1); FBProcedureCall fBProcedureCall7 = new FBProcedureCall(); FBProcedureCall fBProcedureCall8 = (FBProcedureCall)fBProcedureCall7.clone(); fBProcedureCall8.setName("`/t"); fBProcedureParam0.setIndex((-2268)); fBProcedureParam0.setType(33); fBProcedureParam0.setType(33); fBProcedureParam0.setIndex((-1411)); fBProcedureParam0.setIndex((-1411)); fBProcedureParam0.setIndex(11); fBProcedureParam0.setIndex((-465)); fBProcedureCall4.addInputParam(fBProcedureParam0); fBProcedureParam0.setIndex((-884)); fBProcedureParam0.setIndex((-884)); fBProcedureParam0.setIndex(2); fBProcedureCall5.getOutputParam(2); // Undeclared exception! try { fBProcedureCall7.getInputParam((-381)); fail("Expecting exception: ArrayIndexOutOfBoundsException"); } catch(ArrayIndexOutOfBoundsException e) { // // -382 // verifyException("java.util.Vector", e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test126() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.totalCost();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.getHeader();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test29() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.pctCorrect();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderPRC((-1));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.avgCost();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n \n evaluation0.useNoPriors();\n assertEquals(Double.NaN, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setNumericPriorsFromBuffer();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertEquals(2, doubleArray0.length);\n assertNotNull(doubleArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test40() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, evaluation0.unclassified(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctIncorrect();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanPriorEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test17() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFPriorEntropy();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.priorEntropy();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives((-1436));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n public void test35() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(Double.NaN, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(false);\n assertEquals(\"=== Summary ===\\n\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n }", "@Test\n public void test16() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.SFSchemeEntropy();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n public void test33() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n public void test36() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.incorrect();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test119() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString((String) null, true);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(\"null\\nTotal Number of Instances 0 \\n\", string0);\n }", "public void testLiangFigure6() {\n int[] a = {0, 0, 0, 0, 1, 1, 1, 1};\n int[] b = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] c = {0, 1, 0, 1, 0, 1, 0, 1};\n int[] ap = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] bp = {0, 1, 0, 1, 1, 1, 1, 1};\n int[] cp = {0, 0, 0, 1, 0, 1, 1, 1};\n\n for (int i = 0; i < ntimes - 1; i++) {\n cases[i][0] = a[i];\n cases[i][1] = b[i];\n cases[i][2] = c[i];\n cases[i + 1][3] = ap[i];\n cases[i + 1][4] = bp[i];\n cases[i + 1][5] = cp[i];\n }\n cases[8][0] = 0;\n cases[8][1] = 0;\n cases[8][2] = 0;\n cases[0][3] = 0;\n cases[0][4] = 0;\n cases[0][5] = 0;\n\n RevealEvaluator re = new RevealEvaluator(cases);\n\n double rea = re.entropy(a);\n assertEquals(1.0, rea, TOLERANCE);\n System.out.println(\"H(a) = \" + rea); //Should be 1.0\n\n double reb = re.entropy(b);\n assertEquals(1.0, reb, TOLERANCE);\n System.out.println(\"H(b) = \" + reb); //Should be 1.0\n\n double rec = re.entropy(c);\n assertEquals(1.0, rec, TOLERANCE);\n System.out.println(\"H(c) = \" + rec); //Should be 1.0\n\n double reab = re.jointEntropy(a, b);\n assertEquals(2.0, reab, TOLERANCE);\n System.out.println(\"H(a,b) = \" + reab); //Should be 2.0\n\n double reap = re.entropy(ap);\n assertEquals(1.0, reap, TOLERANCE);\n System.out.println(\"H(ap) = \" + reap); //Should be 1.0\n\n double rebp = re.entropy(bp);\n assertEquals(0.8112781244591328, rebp, TOLERANCE);\n System.out.println(\"H(bp) = \" + rebp); //Should be 0.8112781244591328\n\n double recp = re.entropy(cp);\n assertEquals(1.0, recp, TOLERANCE);\n System.out.println(\"H(cp) = \" + recp); //Should be 1.0\n\n double reapa = re.jointEntropy(ap, a);\n assertEquals(2.0, reapa, TOLERANCE);\n System.out.println(\"H(ap, a) = \" + reapa); //Should be 2.0\n\n double rebpb = re.jointEntropy(bp, b);\n assertEquals(1.8112781244591327, rebpb, TOLERANCE);\n System.out.println(\n \"H(bp, b) = \" + rebpb); //Should be 1.8112781244591327\n\n double recpb = re.jointEntropy(cp, b);\n assertEquals(1.8112781244591327, recpb, TOLERANCE);\n System.out.println(\n \"H(cp, b) = \" + recpb); //Should be 1.8112781244591327\n\n int[][] ab = new int[2][8];\n for (int i = 0; i < 8; i++) {\n ab[0][i] = a[i];\n ab[1][i] = b[i];\n }\n\n double rebpab = re.jointEntropy(bp, ab);\n assertEquals(2.5, rebpab, TOLERANCE);\n System.out.println(\"H(bp, a, b) = \" + rebpab); //Should be 2.5\n\n double recpab = re.jointEntropy(cp, ab);\n assertEquals(2.5, recpab, TOLERANCE);\n System.out.println(\"H(cp, a, b) = \" + recpab); //Should be 2.5\n\n int[][] abc = new int[3][8];\n for (int i = 0; i < 8; i++) {\n abc[0][i] = a[i];\n abc[1][i] = b[i];\n abc[2][i] = c[i];\n }\n\n double recpabc = re.jointEntropy(cp, abc);\n assertEquals(3.0, recpabc, TOLERANCE);\n System.out.println(\"H(cp, a, b, c) = \" + recpabc); //Should be 3.0\n\n //Setup array cases and test mutualInformation\n int[] p = new int[1];\n p[0] = 0;\n\n double rembpa = re.mutualInformation(4, p, 1);\n assertEquals(0.31127812445913294, rembpa, TOLERANCE);\n System.out.println(\n \"M(Bp, A) = \" + rembpa); //Should be 0.31127812445913294\n\n int[] pp = new int[2];\n pp[0] = 0;\n pp[1] = 1;\n\n double rmcpab = re.mutualInformation(5, pp, 1);\n assertEquals(0.5, rmcpab, TOLERANCE);\n System.out.println(\"M(Cp, [A,B]) = \" + rmcpab); //Should be 0.5\n\n int[] ppp = new int[3];\n ppp[0] = 0;\n ppp[1] = 1;\n ppp[2] = 2;\n\n double rmcpabc = re.mutualInformation(5, ppp, 1);\n assertEquals(1.0, rmcpabc, TOLERANCE);\n System.out.println(\"M(Cp, [A,B,C]) = \" + rmcpabc); //Should be 1.0\n\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1D() {\n CuteNetlibCase.doTest(\"FIT1D.SIF\", \"-9146.378092421019\", \"80453.99999999999\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test\n public void test15() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString();\n assertEquals(\"=== Detailed Accuracy By Class ===\\n\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setDiscardPredictions(false);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertFalse(evaluation0.getDiscardPredictions());\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"Y#:')*#rI\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numInstances();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(360, (-336.251));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.getRevision();\n assertEquals(\"8964\", string0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.recall((-9));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.unclassified();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_07() {\n CuteNetlibCase.doTest(\"OSA-07.SIF\", \"535722.517299352\", \"4332086.205299969\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertFalse(boolean0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC(17);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getBinRangesString(2607);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n public void test21() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.errorRate();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_14() {\n CuteNetlibCase.doTest(\"OSA-14.SIF\", \"1106462.8447362552\", \"9377699.405100001\", NumberContext.of(7, 4));\n }", "@Test\n public void test13() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n @Tag(\"slow\")\n public void testKEN_07() {\n CuteNetlibCase.doTest(\"KEN-07.SIF\", \"-6.795204433816869E8\", \"-1.61949281194431E8\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(Double.NaN);\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }", "public void testSummaryStatsPartialLog() {\n\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset98.txt\");\n GcManager gcManager = new GcManager();\n File preprocessedFile = gcManager.preprocess(testFile, null);\n gcManager.store(preprocessedFile, false);\n JvmRun jvmRun = gcManager.getJvmRun(new Jvm(null, null), Constants.DEFAULT_BOTTLENECK_THROUGHPUT_THRESHOLD);\n Assert.assertEquals(\"GC event type count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertEquals(\"GC blocking event count not correct.\", 2, jvmRun.getBlockingEventCount());\n Assert.assertEquals(\"GC pause total not correct.\", 61, jvmRun.getTotalGcPause());\n Assert.assertEquals(\"GC first timestamp not correct.\", 1002192, jvmRun.getFirstGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last timestamp not correct.\", 1002847, jvmRun.getLastGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last duration not correct.\", 41, jvmRun.getLastGcEvent().getDuration());\n Assert.assertEquals(\"Stopped Time event count not correct.\", 6, jvmRun.getStoppedTimeEventCount());\n Assert.assertEquals(\"Stopped time total not correct.\", 1064, jvmRun.getTotalStoppedTime());\n Assert.assertEquals(\"Stopped first timestamp not correct.\", 1000964,\n jvmRun.getFirstStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last timestamp not correct.\", 1003884,\n jvmRun.getLastStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last duration not correct.\", 1000688, jvmRun.getLastStoppedEvent().getDuration());\n Assert.assertEquals(\"JVM first event timestamp not correct.\", 1000964, jvmRun.getFirstEvent().getTimestamp());\n Assert.assertEquals(\"JVM last event timestamp not correct.\", 1003884, jvmRun.getLastEvent().getTimestamp());\n Assert.assertEquals(\"JVM run duration not correct.\", 3920, jvmRun.getJvmRunDuration());\n Assert.assertEquals(\"GC throughput not correct.\", 98, jvmRun.getGcThroughput());\n Assert.assertEquals(\"Stopped time throughput not correct.\", 73, jvmRun.getStoppedTimeThroughput());\n Assert.assertTrue(Analysis.WARN_GC_STOPPED_RATIO + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_GC_STOPPED_RATIO));\n }", "@Test\n public void test30() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertFalse(boolean0);\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.toMatrixString(\"getPreBuiltClassifiers\");\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n public void test18() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test19() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBInformation();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize(\"'B1of2'\");\n int[] intArray0 = new int[8];\n intArray0[0] = 18;\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"'B1of2'\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(6, stringArray0.length);\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n Discretize discretize0 = new Discretize(\"*W5D<hSCW|8@I\");\n int[] intArray0 = new int[9];\n intArray0[0] = (-1405);\n intArray0[1] = (-2938);\n intArray0[2] = (-1954);\n intArray0[3] = 9;\n intArray0[4] = 66;\n intArray0[5] = 573;\n intArray0[6] = 0;\n intArray0[7] = (-71);\n intArray0[8] = 99;\n discretize0.setAttributeIndicesArray(intArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(0.0, Double.NaN);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test14() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCRE_A() {\n CuteNetlibCase.doTest(\"CRE-A.SIF\", \"2.9889732905677114E7\", \"2.9889732905677114E7\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC50A() {\n CuteNetlibCase.doTest(\"SC50A.SIF\", \"-64.57507705856449\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testCZPROB() {\n CuteNetlibCase.doTest(\"CZPROB.SIF\", \"2185196.6988565763\", \"3089066.71321333\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize(\"\\tInvert matching sense of column indexes.\");\n discretize0.setOutputFormat();\n discretize0.listOptions();\n Discretize discretize1 = new Discretize();\n discretize1.setIgnoreClass(false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\\tInvert matching sense of column indexes.\";\n stringArray0[1] = \"\";\n Discretize.main(stringArray0);\n String string0 = discretize1.findNumBinsTipText();\n assertEquals(\"Optimize number of equal-width bins using leave-one-out. Doesn't work for equal-frequency binning\", string0);\n \n discretize1.setInvertSelection(false);\n discretize0.getBinRangesString(511);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n \n discretize1.getFindNumBins();\n assertEquals(10, discretize1.getBins());\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n byte[] byteArray0 = new byte[3];\n byteArray0[0] = (byte)108;\n byteArray0[1] = (byte)27;\n byteArray0[2] = (byte)14;\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n discretize0.setBins((-830));\n discretize0.getOptions();\n assertEquals((-830), discretize0.getBins());\n }", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test01() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-1459.149165489484), ',');\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\"\", false);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n Attribute attribute0 = new Attribute(\"invalid CVS revision - not dots!\");\n attribute0.setWeight(0.0);\n Attribute.typeToString(attribute0);\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"UR<dj;O\", arrayList0, 3);\n Instances instances1 = new Instances(instances0);\n boolean boolean0 = discretize0.setInputFormat(instances1);\n assertFalse(boolean0);\n \n String[] stringArray0 = new String[3];\n stringArray0[0] = \".bsi\";\n stringArray0[1] = \"invalid CVS revision - not dots!\";\n stringArray0[2] = \"@end\";\n discretize0.setOptions(stringArray0);\n discretize0.setOptions(stringArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n discretize0.m_UseEqualFrequency = true;\n discretize0.getOptions();\n assertTrue(discretize0.getMakeBinary());\n \n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1P() {\n CuteNetlibCase.doTest(\"FIT1P.SIF\", \"9146.378092420955\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(0.95);\n assertNotNull(doubleArray0);\n assertArrayEquals(new double[] {1.0, 0.0}, doubleArray0, 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toCumulativeMarginDistributionString();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(\" -1 0 \\n\", string0);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCORPION() {\n CuteNetlibCase.doTest(\"SCORPION.SIF\", \"1878.1248227381068\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test006() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedAreaUnderPRC();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testSCRS8() {\n CuteNetlibCase.doTest(\"SCRS8.SIF\", \"960.0206152764557\", null, NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR25() {\n CuteNetlibCase.doTest(\"SCAGR25.SIF\", \"-1.475343306076852E7\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test16() throws Throwable {\n Discretize discretize0 = new Discretize();\n String[] stringArray0 = discretize0.getOptions();\n discretize0.setOptions(stringArray0);\n assertEquals(6, stringArray0.length);\n \n String string0 = discretize0.globalInfo();\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"An instance filter that discretizes a range of numeric attributes in the dataset into nominal attributes. Discretization is by simple binning. Skips the class attribute if set.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test(timeout = 4000)\n public void test040() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.falseNegativeRate((-2));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test096() throws Throwable {\n CostMatrix costMatrix0 = Evaluation.handleCostOption(\"\", 1281);\n assertNull(costMatrix0);\n }", "public void test_0020() {\n int nFactors = 2;\n FactorAnalysis instance = new FactorAnalysis(data, nFactors);\n\n assertEquals(instance.nObs(), 18., 1e-15);\n assertEquals(instance.nVariables(), 6., 1e-15);\n assertEquals(instance.nFactors(), 2., 1e-15);\n\n FAEstimator estimators = instance.getEstimators(400);\n\n Vector uniqueness = estimators.psi();\n assertArrayEquals(\n new double[]{0.005, 0.114, 0.642, 0.742, 0.005, 0.097},\n uniqueness.toArray(),\n 2e-2);\n\n int dof = estimators.dof();\n assertEquals(dof, 4);\n\n double fitted = estimators.logLikelihood();\n assertEquals(fitted, 1.803, 1e-3);\n\n Matrix loadings = estimators.loadings();\n assertTrue(AreMatrices.equal(\n new DenseMatrix(new double[][]{\n {0.971, 0.228},\n {0.917, 0.213},\n {0.429, 0.418},\n {0.363, 0.355},\n {0.254, 0.965},\n {0.205, 0.928}\n }),\n loadings,\n 1e-3));\n\n double testStats = estimators.statistics();\n assertEquals(testStats, 23.14, 1e-2);\n\n double pValue = estimators.pValue();\n assertEquals(pValue, 0.000119, 1e-6);//R: 1-pchisq(23.14, df=4) = 0.0001187266\n\n// System.out.println(uniqueness.toString());\n// System.out.println(fitted);\n// System.out.println(loadings.toString());\n }", "@Test(timeout = 4000)\n public void test041() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.fMeasure((-2765));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test04() throws Throwable {\n Discretize discretize0 = new Discretize(\"9/&=Kq&\");\n discretize0.getBinRangesString((-1679));\n int int0 = (-98);\n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualWidthBinning((-98));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n @Tag(\"slow\")\n public void test25FV47() {\n CuteNetlibCase.doTest(\"25FV47.SIF\", \"5501.845888286646\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test15() throws Throwable {\n Discretize discretize0 = new Discretize(\"\");\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(4, stringArray0.length);\n }", "@Test(timeout = 4000)\n public void test049() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC((-1));\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR7() {\n CuteNetlibCase.doTest(\"SCAGR7.SIF\", \"-2331389.8243309837\", null, NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testOSA_60() {\n CuteNetlibCase.doTest(\"OSA-60.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test088() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBRelativeInformation();\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testKEN_13() {\n CuteNetlibCase.doTest(\"KEN-13.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }" ]
[ "0.73320025", "0.71774447", "0.6930283", "0.6915905", "0.6883117", "0.6835855", "0.6803631", "0.67864937", "0.6782319", "0.6762349", "0.6760566", "0.67489934", "0.67252386", "0.67251784", "0.671746", "0.6699885", "0.66956896", "0.6685708", "0.6670492", "0.66139233", "0.6599164", "0.6577746", "0.65419364", "0.653861", "0.65377986", "0.6507824", "0.6507645", "0.64827585", "0.6471812", "0.64483964", "0.64183307", "0.64106077", "0.6406065", "0.64008766", "0.638729", "0.6385404", "0.63723284", "0.63682073", "0.63581246", "0.6345506", "0.63238984", "0.6315702", "0.6305122", "0.6297133", "0.62897366", "0.6280862", "0.6280091", "0.62772787", "0.6269591", "0.6269266", "0.6267186", "0.6267147", "0.62559295", "0.6255057", "0.6234884", "0.62087375", "0.6207501", "0.6204962", "0.6203602", "0.62024176", "0.62002444", "0.6199871", "0.6197616", "0.6189379", "0.61884046", "0.61813545", "0.61779547", "0.6166362", "0.61630255", "0.616108", "0.61599636", "0.61439645", "0.61391306", "0.613691", "0.61348706", "0.6130563", "0.61236554", "0.6109598", "0.61042", "0.60904115", "0.6079234", "0.60743266", "0.6069772", "0.60627025", "0.60541904", "0.6047813", "0.60430247", "0.5991129", "0.5983373", "0.59629846", "0.5956474", "0.5956193", "0.5950139", "0.5944802", "0.59394556", "0.5926377", "0.5916707", "0.59094405", "0.59046865", "0.5900617", "0.58985317" ]
0.0
-1
Test case number: 5 /Coverage entropy=2.0524620908115194
@Test(timeout = 4000) public void test05() throws Throwable { FBProcedureCall fBProcedureCall0 = new FBProcedureCall(); FBProcedureParam fBProcedureParam0 = fBProcedureCall0.addParam(3, "gZbnc2Y!%jU?C2`8"); fBProcedureCall0.addOutputParam(fBProcedureParam0); FBProcedureCall fBProcedureCall1 = new FBProcedureCall(); fBProcedureCall0.getSQL(true); fBProcedureCall0.getSQL(true); FBProcedureParam fBProcedureParam1 = fBProcedureCall1.getOutputParam(3); fBProcedureCall0.getOutputParam(1702); fBProcedureCall0.mapOutParamIndexToPosition(1, true); fBProcedureCall0.getSQL(true); fBProcedureParam0.setType(0); FBProcedureCall fBProcedureCall2 = new FBProcedureCall(); FBProcedureCall fBProcedureCall3 = new FBProcedureCall(); fBProcedureParam1.setIndex((-1083)); fBProcedureParam0.setType((-939)); fBProcedureParam1.setIndex(1); fBProcedureParam0.setIndex(41); fBProcedureParam0.setIndex(3); FBProcedureCall fBProcedureCall4 = new FBProcedureCall(); FBProcedureCall fBProcedureCall5 = (FBProcedureCall)fBProcedureCall1.clone(); FBProcedureCall fBProcedureCall6 = (FBProcedureCall)fBProcedureCall0.clone(); fBProcedureCall3.equals(fBProcedureCall6); fBProcedureCall0.clone(); fBProcedureCall0.mapOutParamIndexToPosition(3, false); fBProcedureCall1.getSQL(true); fBProcedureCall5.getSQL(true); // Undeclared exception! try { fBProcedureCall6.getInputParam((-939)); fail("Expecting exception: ArrayIndexOutOfBoundsException"); } catch(ArrayIndexOutOfBoundsException e) { // // -940 // verifyException("java.util.Vector", e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test126() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.totalCost();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderPRC((-1));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.getHeader();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test40() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, evaluation0.unclassified(), 0.01D);\n }", "@Test\n public void test29() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.pctCorrect();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test35() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(Double.NaN, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test17() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFPriorEntropy();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.avgCost();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctIncorrect();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertEquals(2, doubleArray0.length);\n assertNotNull(doubleArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.priorEntropy();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setNumericPriorsFromBuffer();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanPriorEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n \n evaluation0.useNoPriors();\n assertEquals(Double.NaN, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(false);\n assertEquals(\"=== Summary ===\\n\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n }", "@Test(timeout = 4000)\n public void test119() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString((String) null, true);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(\"null\\nTotal Number of Instances 0 \\n\", string0);\n }", "@Test\n public void test33() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test36() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.incorrect();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString();\n assertEquals(\"=== Detailed Accuracy By Class ===\\n\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "public void testLiangFigure6() {\n int[] a = {0, 0, 0, 0, 1, 1, 1, 1};\n int[] b = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] c = {0, 1, 0, 1, 0, 1, 0, 1};\n int[] ap = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] bp = {0, 1, 0, 1, 1, 1, 1, 1};\n int[] cp = {0, 0, 0, 1, 0, 1, 1, 1};\n\n for (int i = 0; i < ntimes - 1; i++) {\n cases[i][0] = a[i];\n cases[i][1] = b[i];\n cases[i][2] = c[i];\n cases[i + 1][3] = ap[i];\n cases[i + 1][4] = bp[i];\n cases[i + 1][5] = cp[i];\n }\n cases[8][0] = 0;\n cases[8][1] = 0;\n cases[8][2] = 0;\n cases[0][3] = 0;\n cases[0][4] = 0;\n cases[0][5] = 0;\n\n RevealEvaluator re = new RevealEvaluator(cases);\n\n double rea = re.entropy(a);\n assertEquals(1.0, rea, TOLERANCE);\n System.out.println(\"H(a) = \" + rea); //Should be 1.0\n\n double reb = re.entropy(b);\n assertEquals(1.0, reb, TOLERANCE);\n System.out.println(\"H(b) = \" + reb); //Should be 1.0\n\n double rec = re.entropy(c);\n assertEquals(1.0, rec, TOLERANCE);\n System.out.println(\"H(c) = \" + rec); //Should be 1.0\n\n double reab = re.jointEntropy(a, b);\n assertEquals(2.0, reab, TOLERANCE);\n System.out.println(\"H(a,b) = \" + reab); //Should be 2.0\n\n double reap = re.entropy(ap);\n assertEquals(1.0, reap, TOLERANCE);\n System.out.println(\"H(ap) = \" + reap); //Should be 1.0\n\n double rebp = re.entropy(bp);\n assertEquals(0.8112781244591328, rebp, TOLERANCE);\n System.out.println(\"H(bp) = \" + rebp); //Should be 0.8112781244591328\n\n double recp = re.entropy(cp);\n assertEquals(1.0, recp, TOLERANCE);\n System.out.println(\"H(cp) = \" + recp); //Should be 1.0\n\n double reapa = re.jointEntropy(ap, a);\n assertEquals(2.0, reapa, TOLERANCE);\n System.out.println(\"H(ap, a) = \" + reapa); //Should be 2.0\n\n double rebpb = re.jointEntropy(bp, b);\n assertEquals(1.8112781244591327, rebpb, TOLERANCE);\n System.out.println(\n \"H(bp, b) = \" + rebpb); //Should be 1.8112781244591327\n\n double recpb = re.jointEntropy(cp, b);\n assertEquals(1.8112781244591327, recpb, TOLERANCE);\n System.out.println(\n \"H(cp, b) = \" + recpb); //Should be 1.8112781244591327\n\n int[][] ab = new int[2][8];\n for (int i = 0; i < 8; i++) {\n ab[0][i] = a[i];\n ab[1][i] = b[i];\n }\n\n double rebpab = re.jointEntropy(bp, ab);\n assertEquals(2.5, rebpab, TOLERANCE);\n System.out.println(\"H(bp, a, b) = \" + rebpab); //Should be 2.5\n\n double recpab = re.jointEntropy(cp, ab);\n assertEquals(2.5, recpab, TOLERANCE);\n System.out.println(\"H(cp, a, b) = \" + recpab); //Should be 2.5\n\n int[][] abc = new int[3][8];\n for (int i = 0; i < 8; i++) {\n abc[0][i] = a[i];\n abc[1][i] = b[i];\n abc[2][i] = c[i];\n }\n\n double recpabc = re.jointEntropy(cp, abc);\n assertEquals(3.0, recpabc, TOLERANCE);\n System.out.println(\"H(cp, a, b, c) = \" + recpabc); //Should be 3.0\n\n //Setup array cases and test mutualInformation\n int[] p = new int[1];\n p[0] = 0;\n\n double rembpa = re.mutualInformation(4, p, 1);\n assertEquals(0.31127812445913294, rembpa, TOLERANCE);\n System.out.println(\n \"M(Bp, A) = \" + rembpa); //Should be 0.31127812445913294\n\n int[] pp = new int[2];\n pp[0] = 0;\n pp[1] = 1;\n\n double rmcpab = re.mutualInformation(5, pp, 1);\n assertEquals(0.5, rmcpab, TOLERANCE);\n System.out.println(\"M(Cp, [A,B]) = \" + rmcpab); //Should be 0.5\n\n int[] ppp = new int[3];\n ppp[0] = 0;\n ppp[1] = 1;\n ppp[2] = 2;\n\n double rmcpabc = re.mutualInformation(5, ppp, 1);\n assertEquals(1.0, rmcpabc, TOLERANCE);\n System.out.println(\"M(Cp, [A,B,C]) = \" + rmcpabc); //Should be 1.0\n\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives((-1436));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n public void test16() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.SFSchemeEntropy();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n public void test15() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC(17);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(360, (-336.251));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.recall((-9));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC50A() {\n CuteNetlibCase.doTest(\"SC50A.SIF\", \"-64.57507705856449\", \"0.0\", NumberContext.of(7, 4));\n }", "public void testSummaryStatsPartialLog() {\n\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset98.txt\");\n GcManager gcManager = new GcManager();\n File preprocessedFile = gcManager.preprocess(testFile, null);\n gcManager.store(preprocessedFile, false);\n JvmRun jvmRun = gcManager.getJvmRun(new Jvm(null, null), Constants.DEFAULT_BOTTLENECK_THROUGHPUT_THRESHOLD);\n Assert.assertEquals(\"GC event type count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertEquals(\"GC blocking event count not correct.\", 2, jvmRun.getBlockingEventCount());\n Assert.assertEquals(\"GC pause total not correct.\", 61, jvmRun.getTotalGcPause());\n Assert.assertEquals(\"GC first timestamp not correct.\", 1002192, jvmRun.getFirstGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last timestamp not correct.\", 1002847, jvmRun.getLastGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last duration not correct.\", 41, jvmRun.getLastGcEvent().getDuration());\n Assert.assertEquals(\"Stopped Time event count not correct.\", 6, jvmRun.getStoppedTimeEventCount());\n Assert.assertEquals(\"Stopped time total not correct.\", 1064, jvmRun.getTotalStoppedTime());\n Assert.assertEquals(\"Stopped first timestamp not correct.\", 1000964,\n jvmRun.getFirstStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last timestamp not correct.\", 1003884,\n jvmRun.getLastStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last duration not correct.\", 1000688, jvmRun.getLastStoppedEvent().getDuration());\n Assert.assertEquals(\"JVM first event timestamp not correct.\", 1000964, jvmRun.getFirstEvent().getTimestamp());\n Assert.assertEquals(\"JVM last event timestamp not correct.\", 1003884, jvmRun.getLastEvent().getTimestamp());\n Assert.assertEquals(\"JVM run duration not correct.\", 3920, jvmRun.getJvmRunDuration());\n Assert.assertEquals(\"GC throughput not correct.\", 98, jvmRun.getGcThroughput());\n Assert.assertEquals(\"Stopped time throughput not correct.\", 73, jvmRun.getStoppedTimeThroughput());\n Assert.assertTrue(Analysis.WARN_GC_STOPPED_RATIO + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_GC_STOPPED_RATIO));\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.unclassified();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n public void test13() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setDiscardPredictions(false);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertFalse(evaluation0.getDiscardPredictions());\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test21() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.errorRate();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"Y#:')*#rI\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numInstances();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "@Test\n public void test18() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test01() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-1459.149165489484), ',');\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1D() {\n CuteNetlibCase.doTest(\"FIT1D.SIF\", \"-9146.378092421019\", \"80453.99999999999\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.toMatrixString(\"getPreBuiltClassifiers\");\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }", "@Test\n public void test30() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertFalse(boolean0);\n }", "@Test\n public void test19() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBInformation();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertFalse(boolean0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\"\", false);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test\n public void test14() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(0.0, Double.NaN);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_07() {\n CuteNetlibCase.doTest(\"OSA-07.SIF\", \"535722.517299352\", \"4332086.205299969\", NumberContext.of(7, 4));\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toCumulativeMarginDistributionString();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(\" -1 0 \\n\", string0);\n }", "@Test\n public void run () {\n\t \n\t System.out.println(\"---------->\");\n\t //System.out.println(md5list.getResult());\n\t //System.out.println(hashsearch.getResult());\n\t \n\t \n\t \n\t // System.out.println(samples.Testing());\n\t //System.out.println(\"getserult: \"+samples.getResult());\n\t \n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.getRevision();\n assertEquals(\"8964\", string0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n Attribute attribute0 = new Attribute(\"invalid CVS revision - not dots!\");\n attribute0.setWeight(0.0);\n Attribute.typeToString(attribute0);\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"UR<dj;O\", arrayList0, 3);\n Instances instances1 = new Instances(instances0);\n boolean boolean0 = discretize0.setInputFormat(instances1);\n assertFalse(boolean0);\n \n String[] stringArray0 = new String[3];\n stringArray0[0] = \".bsi\";\n stringArray0[1] = \"invalid CVS revision - not dots!\";\n stringArray0[2] = \"@end\";\n discretize0.setOptions(stringArray0);\n discretize0.setOptions(stringArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize(\"'B1of2'\");\n int[] intArray0 = new int[8];\n intArray0[0] = 18;\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"'B1of2'\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(6, stringArray0.length);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCORPION() {\n CuteNetlibCase.doTest(\"SCORPION.SIF\", \"1878.1248227381068\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(Double.NaN);\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test05() throws Throwable {\n Discretize discretize0 = new Discretize(\"^yH*RVC#\\\"|tm,k2XpGN\");\n String[] stringArray0 = new String[2];\n discretize0.m_ClassIndex = 906;\n discretize0.m_IgnoreClass = true;\n stringArray0[0] = \"^yH*RVC#\\\"|tm,k2XpGN\";\n stringArray0[1] = \"^yH*RVC#\\\"|tm,k2XpGN\";\n discretize0.setOptions(stringArray0);\n discretize0.setAttributeIndices(\"^yH*RVC#\\\"|tm,k2XpGN\");\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getFindNumBins());\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_14() {\n CuteNetlibCase.doTest(\"OSA-14.SIF\", \"1106462.8447362552\", \"9377699.405100001\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n Discretize discretize0 = new Discretize(\"*W5D<hSCW|8@I\");\n int[] intArray0 = new int[9];\n intArray0[0] = (-1405);\n intArray0[1] = (-2938);\n intArray0[2] = (-1954);\n intArray0[3] = 9;\n intArray0[4] = 66;\n intArray0[5] = 573;\n intArray0[6] = 0;\n intArray0[7] = (-71);\n intArray0[8] = 99;\n discretize0.setAttributeIndicesArray(intArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR25() {\n CuteNetlibCase.doTest(\"SCAGR25.SIF\", \"-1.475343306076852E7\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getBinRangesString(2607);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC205() {\n CuteNetlibCase.doTest(\"SC205.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize(\"\\tInvert matching sense of column indexes.\");\n discretize0.setOutputFormat();\n discretize0.listOptions();\n Discretize discretize1 = new Discretize();\n discretize1.setIgnoreClass(false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\\tInvert matching sense of column indexes.\";\n stringArray0[1] = \"\";\n Discretize.main(stringArray0);\n String string0 = discretize1.findNumBinsTipText();\n assertEquals(\"Optimize number of equal-width bins using leave-one-out. Doesn't work for equal-frequency binning\", string0);\n \n discretize1.setInvertSelection(false);\n discretize0.getBinRangesString(511);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n \n discretize1.getFindNumBins();\n assertEquals(10, discretize1.getBins());\n }", "@Test\n @Tag(\"slow\")\n public void testCZPROB() {\n CuteNetlibCase.doTest(\"CZPROB.SIF\", \"2185196.6988565763\", \"3089066.71321333\", NumberContext.of(7, 4));\n }", "public int getCoverage (){\r\n return coverage;\r\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test(timeout = 4000)\n public void test006() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedAreaUnderPRC();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n byte[] byteArray0 = new byte[3];\n byteArray0[0] = (byte)108;\n byteArray0[1] = (byte)27;\n byteArray0[2] = (byte)14;\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n discretize0.setBins((-830));\n discretize0.getOptions();\n assertEquals((-830), discretize0.getBins());\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(0.95);\n assertNotNull(doubleArray0);\n assertArrayEquals(new double[] {1.0, 0.0}, doubleArray0, 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test049() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC((-1));\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC105() {\n CuteNetlibCase.doTest(\"SC105.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testKEN_07() {\n CuteNetlibCase.doTest(\"KEN-07.SIF\", \"-6.795204433816869E8\", \"-1.61949281194431E8\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"unstable\")\n @Tag(\"bm1000\")\n public void testTUFF() {\n CuteNetlibCase.doTest(\"TUFF.SIF\", \"0.29214776509361284\", \"0.8949901867574317\", NumberContext.of(7, 4));\n }", "@ParameterizedTest\n @ArgumentsSource(TestForestProvider.class)\n public void testMultipleAttributions(RandomCutForest forest) {\n int hardPass=0;\n int causal=0;\n double [] point ={6.0,0.0,0.0};\n DiVector result = forest.getAnomalyAttribution(point);\n assertTrue(result.low[0] < 0.2);\n if (result.getHighLowSum(1) < 0.5) ++hardPass;\n if (result.getHighLowSum(2) < 0.5) ++hardPass;\n assertTrue(result.getHighLowSum(1) + result.getHighLowSum(2) < 1.0);\n assertTrue(result.high[0] > forest.getAnomalyScore(point)/3);\n if (result.high[0] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n // the last line states that first coordinate was high and was a majority contributor to the score\n // the previous test states that the contribution is twice the average of the 12 possible contributors.\n // these tests all subparts of the score at once\n\n point=new double [] {-6.0,0.0,0.0};\n result = forest.getAnomalyAttribution(point);\n assertTrue(result.getHighLowSum()>1.0);\n assertTrue(result.high[0] < 0.5);\n if (result.getHighLowSum(1) < 0.5) ++hardPass;\n if (result.getHighLowSum(2) < 0.5) ++hardPass;\n assertTrue(result.low[0] > forest.getAnomalyScore(point)/3);\n if (result.low[0] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n\n point=new double [] {0.0,6.0,0.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n if (result.getHighLowSum(0) < 0.5) ++hardPass;\n if (result.getHighLowSum(2) < 0.5) ++hardPass;\n assertTrue(result.low[1] < 0.5);\n assertTrue(result.high[1] > forest.getAnomalyScore(point)/3);\n if (result.high[1] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n\n point=new double [] {0.0,-6.0,0.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n if (result.getHighLowSum(0) < 0.5) ++hardPass;\n if (result.getHighLowSum(2) < 0.5) ++hardPass;\n assertTrue(result.high[1] < 0.5);\n assertTrue(result.low[1] > forest.getAnomalyScore(point)/3);\n if (result.low[1] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n\n point=new double [] {0.0,0.0,6.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n if (result.getHighLowSum(0) < 0.5) ++hardPass;\n if (result.getHighLowSum(1) < 0.5) ++hardPass;\n assertTrue(result.low[2] < 0.5);\n assertTrue(result.high[2] > forest.getAnomalyScore(point)/3);\n if (result.high[2] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n point=new double [] {0.0,0.0,-6.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n if (result.getHighLowSum(0) < 0.5) ++hardPass;\n if (result.getHighLowSum(1) < 0.5) ++hardPass;\n assertTrue(result.high[2] < 0.5);\n assertTrue(result.low[2] > forest.getAnomalyScore(point)/3);\n if (result.low[2] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n\n assertTrue(causal>=5); // maximum is 6; there can be skew in one direction\n\n point=new double [] {-3.0,0.0,0.0};\n result = forest.getAnomalyAttribution(point);\n assertTrue(result.high[0] < 0.5);\n if (result.getHighLowSum(1) < 0.5) ++hardPass;\n if (result.getHighLowSum(2) < 0.5) ++hardPass;\n assertTrue(result.low[0] >\n forest.getAnomalyScore(point)/3);\n\n /* For multiple causes, the relationship of scores only hold for larger\n * distances.\n */\n\n point=new double [] {-3.0,6.0,0.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n if (result.low[0] > 0.5) ++hardPass;\n assertTrue(result.high[0] < 0.5);\n assertTrue(result.low[1] < 0.5);\n assertTrue(result.high[1] > 0.5);\n if (result.high[1]>0.9) ++hardPass;\n assertTrue(result.getHighLowSum(2)< 0.5);\n assertTrue(result.high[1]+result.low[0]>\n 0.8*forest.getAnomalyScore(point));\n\n point=new double [] {6.0,-3.0,0.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n assertTrue(result.low[0] < 0.5);\n assertTrue(result.high[0] > 0.5);\n if (result.high[0]>0.9) ++hardPass;\n if (result.low[1] > 0.5) ++hardPass;\n assertTrue(result.high[1] < 0.5);\n assertTrue(result.getHighLowSum(2) < 0.5);\n assertTrue(result.high[0]+result.low[1]>\n 0.8*forest.getAnomalyScore(point));\n\n point=new double [] {20.0,-10.0,0.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n assertTrue(result.high[0]+result.low[1]>\n 0.8*forest.getAnomalyScore(point));\n if (result.high[0]>1.8*result.low[1]) ++hardPass;\n if (result.low[1]>result.high[0]/2.2) ++hardPass;\n\n assertTrue(hardPass>=15); //maximum is 20\n }", "@Test(timeout = 4000)\n public void test18() throws Throwable {\n Discretize discretize0 = new Discretize(\"%\");\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n discretize0.findNumBinsTipText();\n double[][] doubleArray0 = new double[0][7];\n discretize0.m_CutPoints = doubleArray0;\n FileSystemHandling.setPermissions((EvoSuiteFile) null, true, false, true);\n discretize0.setInvertSelection(false);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test040() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.falseNegativeRate((-2));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCRE_A() {\n CuteNetlibCase.doTest(\"CRE-A.SIF\", \"2.9889732905677114E7\", \"2.9889732905677114E7\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1P() {\n CuteNetlibCase.doTest(\"FIT1P.SIF\", \"9146.378092420955\", null, NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR7() {\n CuteNetlibCase.doTest(\"SCAGR7.SIF\", \"-2331389.8243309837\", null, NumberContext.of(7, 4));\n }", "@Test\n public void testFitnessProportionateSelection()\n {\n }", "@Test(timeout = 4000)\n public void test15() throws Throwable {\n Discretize discretize0 = new Discretize(\"\");\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(4, stringArray0.length);\n }", "@Test(timeout = 4000)\n public void test020() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\".arff\", true);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\".arff\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC50B() {\n CuteNetlibCase.doTest(\"SC50B.SIF\", \"-7.0000000000E+01\", \"0.0\", NumberContext.of(7, 4));\n }" ]
[ "0.71648484", "0.7008692", "0.6993446", "0.6864804", "0.68047744", "0.6799332", "0.66903025", "0.6682153", "0.66390276", "0.66306424", "0.6628969", "0.65970975", "0.65897113", "0.6575154", "0.6546383", "0.654392", "0.65351963", "0.65307546", "0.65293753", "0.64882207", "0.6478002", "0.64622813", "0.64473706", "0.64372617", "0.64229226", "0.64100534", "0.63961303", "0.6356835", "0.6344395", "0.6343549", "0.6341106", "0.6295066", "0.6255433", "0.6249529", "0.624188", "0.62418574", "0.6234066", "0.6229534", "0.6220524", "0.6220112", "0.62170726", "0.6200604", "0.61994755", "0.6192669", "0.61848754", "0.61828846", "0.61674446", "0.6165305", "0.61615753", "0.6159209", "0.6147493", "0.6136621", "0.61353964", "0.61292493", "0.61165154", "0.61078525", "0.6083514", "0.60723585", "0.60630065", "0.6051541", "0.60485065", "0.60462815", "0.6040017", "0.6032053", "0.60259753", "0.60193956", "0.6018257", "0.60119563", "0.6011203", "0.6009181", "0.6008462", "0.6005511", "0.60042197", "0.599498", "0.5988998", "0.5988991", "0.59869075", "0.5974879", "0.5973348", "0.597217", "0.5968996", "0.59602076", "0.5946484", "0.59314555", "0.59294635", "0.59240353", "0.59189266", "0.5909036", "0.59053165", "0.58985627", "0.58811986", "0.58777577", "0.5866807", "0.5864603", "0.58638865", "0.5857607", "0.5852872", "0.58481914", "0.5837026", "0.5833075", "0.5828654" ]
0.0
-1
Test case number: 6 /Coverage entropy=1.7964106794082995
@Test(timeout = 4000) public void test06() throws Throwable { FBProcedureCall fBProcedureCall0 = new FBProcedureCall(); FBProcedureParam fBProcedureParam0 = fBProcedureCall0.addParam(0, "pv$d5I"); fBProcedureCall0.addOutputParam(fBProcedureParam0); FBProcedureCall fBProcedureCall1 = new FBProcedureCall(); fBProcedureCall0.getSQL(false); fBProcedureCall0.getSQL(false); int int0 = (-163); fBProcedureCall1.getOutputParam((-163)); fBProcedureCall0.getOutputParam((-1)); fBProcedureCall1.mapOutParamIndexToPosition((-163), true); fBProcedureCall1.getSQL(false); FBProcedureCall fBProcedureCall2 = new FBProcedureCall(); FBProcedureCall fBProcedureCall3 = new FBProcedureCall(); FBProcedureCall fBProcedureCall4 = new FBProcedureCall(); // Undeclared exception! try { fBProcedureCall4.getInputParam((-291)); fail("Expecting exception: ArrayIndexOutOfBoundsException"); } catch(ArrayIndexOutOfBoundsException e) { // // -292 // verifyException("java.util.Vector", e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test126() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.totalCost();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.getHeader();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test29() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.pctCorrect();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderPRC((-1));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test40() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, evaluation0.unclassified(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.avgCost();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test17() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFPriorEntropy();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setNumericPriorsFromBuffer();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n \n evaluation0.useNoPriors();\n assertEquals(Double.NaN, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test35() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(Double.NaN, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.priorEntropy();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertEquals(2, doubleArray0.length);\n assertNotNull(doubleArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanPriorEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctIncorrect();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test\n public void test36() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.incorrect();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(false);\n assertEquals(\"=== Summary ===\\n\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n }", "@Test\n public void test33() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test16() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.SFSchemeEntropy();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test119() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString((String) null, true);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(\"null\\nTotal Number of Instances 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives((-1436));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n public void test15() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(360, (-336.251));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "public void testLiangFigure6() {\n int[] a = {0, 0, 0, 0, 1, 1, 1, 1};\n int[] b = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] c = {0, 1, 0, 1, 0, 1, 0, 1};\n int[] ap = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] bp = {0, 1, 0, 1, 1, 1, 1, 1};\n int[] cp = {0, 0, 0, 1, 0, 1, 1, 1};\n\n for (int i = 0; i < ntimes - 1; i++) {\n cases[i][0] = a[i];\n cases[i][1] = b[i];\n cases[i][2] = c[i];\n cases[i + 1][3] = ap[i];\n cases[i + 1][4] = bp[i];\n cases[i + 1][5] = cp[i];\n }\n cases[8][0] = 0;\n cases[8][1] = 0;\n cases[8][2] = 0;\n cases[0][3] = 0;\n cases[0][4] = 0;\n cases[0][5] = 0;\n\n RevealEvaluator re = new RevealEvaluator(cases);\n\n double rea = re.entropy(a);\n assertEquals(1.0, rea, TOLERANCE);\n System.out.println(\"H(a) = \" + rea); //Should be 1.0\n\n double reb = re.entropy(b);\n assertEquals(1.0, reb, TOLERANCE);\n System.out.println(\"H(b) = \" + reb); //Should be 1.0\n\n double rec = re.entropy(c);\n assertEquals(1.0, rec, TOLERANCE);\n System.out.println(\"H(c) = \" + rec); //Should be 1.0\n\n double reab = re.jointEntropy(a, b);\n assertEquals(2.0, reab, TOLERANCE);\n System.out.println(\"H(a,b) = \" + reab); //Should be 2.0\n\n double reap = re.entropy(ap);\n assertEquals(1.0, reap, TOLERANCE);\n System.out.println(\"H(ap) = \" + reap); //Should be 1.0\n\n double rebp = re.entropy(bp);\n assertEquals(0.8112781244591328, rebp, TOLERANCE);\n System.out.println(\"H(bp) = \" + rebp); //Should be 0.8112781244591328\n\n double recp = re.entropy(cp);\n assertEquals(1.0, recp, TOLERANCE);\n System.out.println(\"H(cp) = \" + recp); //Should be 1.0\n\n double reapa = re.jointEntropy(ap, a);\n assertEquals(2.0, reapa, TOLERANCE);\n System.out.println(\"H(ap, a) = \" + reapa); //Should be 2.0\n\n double rebpb = re.jointEntropy(bp, b);\n assertEquals(1.8112781244591327, rebpb, TOLERANCE);\n System.out.println(\n \"H(bp, b) = \" + rebpb); //Should be 1.8112781244591327\n\n double recpb = re.jointEntropy(cp, b);\n assertEquals(1.8112781244591327, recpb, TOLERANCE);\n System.out.println(\n \"H(cp, b) = \" + recpb); //Should be 1.8112781244591327\n\n int[][] ab = new int[2][8];\n for (int i = 0; i < 8; i++) {\n ab[0][i] = a[i];\n ab[1][i] = b[i];\n }\n\n double rebpab = re.jointEntropy(bp, ab);\n assertEquals(2.5, rebpab, TOLERANCE);\n System.out.println(\"H(bp, a, b) = \" + rebpab); //Should be 2.5\n\n double recpab = re.jointEntropy(cp, ab);\n assertEquals(2.5, recpab, TOLERANCE);\n System.out.println(\"H(cp, a, b) = \" + recpab); //Should be 2.5\n\n int[][] abc = new int[3][8];\n for (int i = 0; i < 8; i++) {\n abc[0][i] = a[i];\n abc[1][i] = b[i];\n abc[2][i] = c[i];\n }\n\n double recpabc = re.jointEntropy(cp, abc);\n assertEquals(3.0, recpabc, TOLERANCE);\n System.out.println(\"H(cp, a, b, c) = \" + recpabc); //Should be 3.0\n\n //Setup array cases and test mutualInformation\n int[] p = new int[1];\n p[0] = 0;\n\n double rembpa = re.mutualInformation(4, p, 1);\n assertEquals(0.31127812445913294, rembpa, TOLERANCE);\n System.out.println(\n \"M(Bp, A) = \" + rembpa); //Should be 0.31127812445913294\n\n int[] pp = new int[2];\n pp[0] = 0;\n pp[1] = 1;\n\n double rmcpab = re.mutualInformation(5, pp, 1);\n assertEquals(0.5, rmcpab, TOLERANCE);\n System.out.println(\"M(Cp, [A,B]) = \" + rmcpab); //Should be 0.5\n\n int[] ppp = new int[3];\n ppp[0] = 0;\n ppp[1] = 1;\n ppp[2] = 2;\n\n double rmcpabc = re.mutualInformation(5, ppp, 1);\n assertEquals(1.0, rmcpabc, TOLERANCE);\n System.out.println(\"M(Cp, [A,B,C]) = \" + rmcpabc); //Should be 1.0\n\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString();\n assertEquals(\"=== Detailed Accuracy By Class ===\\n\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setDiscardPredictions(false);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertFalse(evaluation0.getDiscardPredictions());\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.recall((-9));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "@Test\n public void test13() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n public void test21() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.errorRate();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test18() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"Y#:')*#rI\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numInstances();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1D() {\n CuteNetlibCase.doTest(\"FIT1D.SIF\", \"-9146.378092421019\", \"80453.99999999999\", NumberContext.of(7, 4));\n }", "@Test\n public void test19() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBInformation();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "public void testSummaryStatsPartialLog() {\n\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset98.txt\");\n GcManager gcManager = new GcManager();\n File preprocessedFile = gcManager.preprocess(testFile, null);\n gcManager.store(preprocessedFile, false);\n JvmRun jvmRun = gcManager.getJvmRun(new Jvm(null, null), Constants.DEFAULT_BOTTLENECK_THROUGHPUT_THRESHOLD);\n Assert.assertEquals(\"GC event type count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertEquals(\"GC blocking event count not correct.\", 2, jvmRun.getBlockingEventCount());\n Assert.assertEquals(\"GC pause total not correct.\", 61, jvmRun.getTotalGcPause());\n Assert.assertEquals(\"GC first timestamp not correct.\", 1002192, jvmRun.getFirstGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last timestamp not correct.\", 1002847, jvmRun.getLastGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last duration not correct.\", 41, jvmRun.getLastGcEvent().getDuration());\n Assert.assertEquals(\"Stopped Time event count not correct.\", 6, jvmRun.getStoppedTimeEventCount());\n Assert.assertEquals(\"Stopped time total not correct.\", 1064, jvmRun.getTotalStoppedTime());\n Assert.assertEquals(\"Stopped first timestamp not correct.\", 1000964,\n jvmRun.getFirstStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last timestamp not correct.\", 1003884,\n jvmRun.getLastStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last duration not correct.\", 1000688, jvmRun.getLastStoppedEvent().getDuration());\n Assert.assertEquals(\"JVM first event timestamp not correct.\", 1000964, jvmRun.getFirstEvent().getTimestamp());\n Assert.assertEquals(\"JVM last event timestamp not correct.\", 1003884, jvmRun.getLastEvent().getTimestamp());\n Assert.assertEquals(\"JVM run duration not correct.\", 3920, jvmRun.getJvmRunDuration());\n Assert.assertEquals(\"GC throughput not correct.\", 98, jvmRun.getGcThroughput());\n Assert.assertEquals(\"Stopped time throughput not correct.\", 73, jvmRun.getStoppedTimeThroughput());\n Assert.assertTrue(Analysis.WARN_GC_STOPPED_RATIO + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_GC_STOPPED_RATIO));\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.unclassified();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC(17);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test30() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertFalse(boolean0);\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertFalse(boolean0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test01() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-1459.149165489484), ',');\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.toMatrixString(\"getPreBuiltClassifiers\");\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\"\", false);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(Double.NaN);\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_07() {\n CuteNetlibCase.doTest(\"OSA-07.SIF\", \"535722.517299352\", \"4332086.205299969\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(0.0, Double.NaN);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.getRevision();\n assertEquals(\"8964\", string0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }", "@Test\n public void test14() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(0.95);\n assertNotNull(doubleArray0);\n assertArrayEquals(new double[] {1.0, 0.0}, doubleArray0, 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC50A() {\n CuteNetlibCase.doTest(\"SC50A.SIF\", \"-64.57507705856449\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_14() {\n CuteNetlibCase.doTest(\"OSA-14.SIF\", \"1106462.8447362552\", \"9377699.405100001\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize(\"\\tInvert matching sense of column indexes.\");\n discretize0.setOutputFormat();\n discretize0.listOptions();\n Discretize discretize1 = new Discretize();\n discretize1.setIgnoreClass(false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\\tInvert matching sense of column indexes.\";\n stringArray0[1] = \"\";\n Discretize.main(stringArray0);\n String string0 = discretize1.findNumBinsTipText();\n assertEquals(\"Optimize number of equal-width bins using leave-one-out. Doesn't work for equal-frequency binning\", string0);\n \n discretize1.setInvertSelection(false);\n discretize0.getBinRangesString(511);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n \n discretize1.getFindNumBins();\n assertEquals(10, discretize1.getBins());\n }", "@Test\n @Tag(\"slow\")\n public void testKEN_07() {\n CuteNetlibCase.doTest(\"KEN-07.SIF\", \"-6.795204433816869E8\", \"-1.61949281194431E8\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n Discretize discretize0 = new Discretize(\"*W5D<hSCW|8@I\");\n int[] intArray0 = new int[9];\n intArray0[0] = (-1405);\n intArray0[1] = (-2938);\n intArray0[2] = (-1954);\n intArray0[3] = 9;\n intArray0[4] = 66;\n intArray0[5] = 573;\n intArray0[6] = 0;\n intArray0[7] = (-71);\n intArray0[8] = 99;\n discretize0.setAttributeIndicesArray(intArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getBinRangesString(2607);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test006() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedAreaUnderPRC();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toCumulativeMarginDistributionString();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(\" -1 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize(\"'B1of2'\");\n int[] intArray0 = new int[8];\n intArray0[0] = 18;\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"'B1of2'\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(6, stringArray0.length);\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n discretize0.m_UseEqualFrequency = true;\n discretize0.getOptions();\n assertTrue(discretize0.getMakeBinary());\n \n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test\n public void run () {\n\t \n\t System.out.println(\"---------->\");\n\t //System.out.println(md5list.getResult());\n\t //System.out.println(hashsearch.getResult());\n\t \n\t \n\t \n\t // System.out.println(samples.Testing());\n\t //System.out.println(\"getserult: \"+samples.getResult());\n\t \n }", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n Attribute attribute0 = new Attribute(\"invalid CVS revision - not dots!\");\n attribute0.setWeight(0.0);\n Attribute.typeToString(attribute0);\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"UR<dj;O\", arrayList0, 3);\n Instances instances1 = new Instances(instances0);\n boolean boolean0 = discretize0.setInputFormat(instances1);\n assertFalse(boolean0);\n \n String[] stringArray0 = new String[3];\n stringArray0[0] = \".bsi\";\n stringArray0[1] = \"invalid CVS revision - not dots!\";\n stringArray0[2] = \"@end\";\n discretize0.setOptions(stringArray0);\n discretize0.setOptions(stringArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1P() {\n CuteNetlibCase.doTest(\"FIT1P.SIF\", \"9146.378092420955\", null, NumberContext.of(7, 4));\n }", "public void test_0020() {\n int nFactors = 2;\n FactorAnalysis instance = new FactorAnalysis(data, nFactors);\n\n assertEquals(instance.nObs(), 18., 1e-15);\n assertEquals(instance.nVariables(), 6., 1e-15);\n assertEquals(instance.nFactors(), 2., 1e-15);\n\n FAEstimator estimators = instance.getEstimators(400);\n\n Vector uniqueness = estimators.psi();\n assertArrayEquals(\n new double[]{0.005, 0.114, 0.642, 0.742, 0.005, 0.097},\n uniqueness.toArray(),\n 2e-2);\n\n int dof = estimators.dof();\n assertEquals(dof, 4);\n\n double fitted = estimators.logLikelihood();\n assertEquals(fitted, 1.803, 1e-3);\n\n Matrix loadings = estimators.loadings();\n assertTrue(AreMatrices.equal(\n new DenseMatrix(new double[][]{\n {0.971, 0.228},\n {0.917, 0.213},\n {0.429, 0.418},\n {0.363, 0.355},\n {0.254, 0.965},\n {0.205, 0.928}\n }),\n loadings,\n 1e-3));\n\n double testStats = estimators.statistics();\n assertEquals(testStats, 23.14, 1e-2);\n\n double pValue = estimators.pValue();\n assertEquals(pValue, 0.000119, 1e-6);//R: 1-pchisq(23.14, df=4) = 0.0001187266\n\n// System.out.println(uniqueness.toString());\n// System.out.println(fitted);\n// System.out.println(loadings.toString());\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCORPION() {\n CuteNetlibCase.doTest(\"SCORPION.SIF\", \"1878.1248227381068\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n @Tag(\"slow\")\n public void testCZPROB() {\n CuteNetlibCase.doTest(\"CZPROB.SIF\", \"2185196.6988565763\", \"3089066.71321333\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n byte[] byteArray0 = new byte[3];\n byteArray0[0] = (byte)108;\n byteArray0[1] = (byte)27;\n byteArray0[2] = (byte)14;\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n discretize0.setBins((-830));\n discretize0.getOptions();\n assertEquals((-830), discretize0.getBins());\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCRE_A() {\n CuteNetlibCase.doTest(\"CRE-A.SIF\", \"2.9889732905677114E7\", \"2.9889732905677114E7\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testSCSD6() {\n CuteNetlibCase.doTest(\"SCSD6.SIF\", \"50.5\", null, NumberContext.of(7, 4));\n }", "@Test\n public void testFitnessProportionateSelection()\n {\n }", "@Test(timeout = 4000)\n public void test088() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBRelativeInformation();\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR25() {\n CuteNetlibCase.doTest(\"SCAGR25.SIF\", \"-1.475343306076852E7\", null, NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"unstable\")\n @Tag(\"bm1000\")\n public void testTUFF() {\n CuteNetlibCase.doTest(\"TUFF.SIF\", \"0.29214776509361284\", \"0.8949901867574317\", NumberContext.of(7, 4));\n }", "@Test\n public void test23() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n SerializedClassifier serializedClassifier0 = new SerializedClassifier();\n Object[] objectArray0 = new Object[25];\n double[] doubleArray0 = evaluation0.evaluateModel((Classifier) serializedClassifier0, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testSCRS8() {\n CuteNetlibCase.doTest(\"SCRS8.SIF\", \"960.0206152764557\", null, NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR7() {\n CuteNetlibCase.doTest(\"SCAGR7.SIF\", \"-2331389.8243309837\", null, NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testD6CUBE() {\n CuteNetlibCase.doTest(\"D6CUBE.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test049() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC((-1));\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test104() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString(\".arff\");\n assertEquals(Double.NaN, evaluation0.unweightedMicroFmeasure(), 0.01);\n assertEquals(\".arff\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\n 0 0 0 0 0 0 ? ? class1\\n 0 0 0 0 0 0 ? ? class2\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testOSA_60() {\n CuteNetlibCase.doTest(\"OSA-60.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test16() throws Throwable {\n Discretize discretize0 = new Discretize();\n String[] stringArray0 = discretize0.getOptions();\n discretize0.setOptions(stringArray0);\n assertEquals(6, stringArray0.length);\n \n String string0 = discretize0.globalInfo();\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"An instance filter that discretizes a range of numeric attributes in the dataset into nominal attributes. Discretization is by simple binning. Skips the class attribute if set.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }" ]
[ "0.74171954", "0.72319865", "0.70222604", "0.69443715", "0.69402987", "0.69255865", "0.68817836", "0.6862787", "0.6846851", "0.6822493", "0.6821813", "0.6809514", "0.6807141", "0.6787549", "0.6780387", "0.6775995", "0.6775344", "0.67467016", "0.67419714", "0.6686276", "0.66630936", "0.66597134", "0.6633384", "0.66277283", "0.662004", "0.6612188", "0.66039735", "0.6561664", "0.6556132", "0.6552812", "0.6520844", "0.65189385", "0.6510911", "0.6480525", "0.64595217", "0.6429888", "0.6428628", "0.64268416", "0.6418375", "0.6414998", "0.6411473", "0.641012", "0.6408429", "0.6402034", "0.63885975", "0.6374687", "0.6371097", "0.63686085", "0.635651", "0.6350058", "0.6344688", "0.63336414", "0.6329775", "0.63144445", "0.63106847", "0.63067836", "0.6300035", "0.6299729", "0.6272465", "0.6267951", "0.62640566", "0.6251589", "0.6250279", "0.62457806", "0.6224237", "0.6216894", "0.6205646", "0.61798304", "0.61757475", "0.61725104", "0.6172432", "0.61689097", "0.6166931", "0.6158604", "0.6152514", "0.6146025", "0.61398745", "0.6135215", "0.6124692", "0.61163145", "0.61146677", "0.61085045", "0.60994", "0.60924405", "0.60905784", "0.608103", "0.6064783", "0.60229665", "0.60146207", "0.6000762", "0.5996584", "0.5988931", "0.59886545", "0.5988061", "0.59851587", "0.59846073", "0.59746194", "0.5971514", "0.59564364", "0.595547", "0.5954099" ]
0.0
-1
Test case number: 7 /Coverage entropy=1.7558847487169413
@Test(timeout = 4000) public void test07() throws Throwable { FBProcedureCall fBProcedureCall0 = new FBProcedureCall(); FBProcedureParam fBProcedureParam0 = fBProcedureCall0.addParam(3674, "sh"); FBProcedureParam fBProcedureParam1 = fBProcedureCall0.addParam(3674, "sh"); fBProcedureParam0.setType(3674); fBProcedureParam0.setIndex(1); fBProcedureParam0.setType((-587)); fBProcedureParam1.setIndex(2); fBProcedureCall0.addOutputParam(fBProcedureParam0); fBProcedureCall0.addInputParam(fBProcedureParam0); fBProcedureCall0.getOutputParam(1); // Undeclared exception! fBProcedureCall0.registerOutParam(3674, (-1587)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test126() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.totalCost();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.getHeader();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test29() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.pctCorrect();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test40() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, evaluation0.unclassified(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderPRC((-1));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.avgCost();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setNumericPriorsFromBuffer();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test17() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFPriorEntropy();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n \n evaluation0.useNoPriors();\n assertEquals(Double.NaN, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctIncorrect();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanPriorEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.priorEntropy();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertEquals(2, doubleArray0.length);\n assertNotNull(doubleArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(false);\n assertEquals(\"=== Summary ===\\n\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n }", "@Test\n public void test35() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(Double.NaN, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test119() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString((String) null, true);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(\"null\\nTotal Number of Instances 0 \\n\", string0);\n }", "@Test\n public void test33() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test36() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.incorrect();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives((-1436));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n public void test16() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.SFSchemeEntropy();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString();\n assertEquals(\"=== Detailed Accuracy By Class ===\\n\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setDiscardPredictions(false);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertFalse(evaluation0.getDiscardPredictions());\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.recall((-9));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(360, (-336.251));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1D() {\n CuteNetlibCase.doTest(\"FIT1D.SIF\", \"-9146.378092421019\", \"80453.99999999999\", NumberContext.of(7, 4));\n }", "@Test\n public void test15() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "public void testLiangFigure6() {\n int[] a = {0, 0, 0, 0, 1, 1, 1, 1};\n int[] b = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] c = {0, 1, 0, 1, 0, 1, 0, 1};\n int[] ap = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] bp = {0, 1, 0, 1, 1, 1, 1, 1};\n int[] cp = {0, 0, 0, 1, 0, 1, 1, 1};\n\n for (int i = 0; i < ntimes - 1; i++) {\n cases[i][0] = a[i];\n cases[i][1] = b[i];\n cases[i][2] = c[i];\n cases[i + 1][3] = ap[i];\n cases[i + 1][4] = bp[i];\n cases[i + 1][5] = cp[i];\n }\n cases[8][0] = 0;\n cases[8][1] = 0;\n cases[8][2] = 0;\n cases[0][3] = 0;\n cases[0][4] = 0;\n cases[0][5] = 0;\n\n RevealEvaluator re = new RevealEvaluator(cases);\n\n double rea = re.entropy(a);\n assertEquals(1.0, rea, TOLERANCE);\n System.out.println(\"H(a) = \" + rea); //Should be 1.0\n\n double reb = re.entropy(b);\n assertEquals(1.0, reb, TOLERANCE);\n System.out.println(\"H(b) = \" + reb); //Should be 1.0\n\n double rec = re.entropy(c);\n assertEquals(1.0, rec, TOLERANCE);\n System.out.println(\"H(c) = \" + rec); //Should be 1.0\n\n double reab = re.jointEntropy(a, b);\n assertEquals(2.0, reab, TOLERANCE);\n System.out.println(\"H(a,b) = \" + reab); //Should be 2.0\n\n double reap = re.entropy(ap);\n assertEquals(1.0, reap, TOLERANCE);\n System.out.println(\"H(ap) = \" + reap); //Should be 1.0\n\n double rebp = re.entropy(bp);\n assertEquals(0.8112781244591328, rebp, TOLERANCE);\n System.out.println(\"H(bp) = \" + rebp); //Should be 0.8112781244591328\n\n double recp = re.entropy(cp);\n assertEquals(1.0, recp, TOLERANCE);\n System.out.println(\"H(cp) = \" + recp); //Should be 1.0\n\n double reapa = re.jointEntropy(ap, a);\n assertEquals(2.0, reapa, TOLERANCE);\n System.out.println(\"H(ap, a) = \" + reapa); //Should be 2.0\n\n double rebpb = re.jointEntropy(bp, b);\n assertEquals(1.8112781244591327, rebpb, TOLERANCE);\n System.out.println(\n \"H(bp, b) = \" + rebpb); //Should be 1.8112781244591327\n\n double recpb = re.jointEntropy(cp, b);\n assertEquals(1.8112781244591327, recpb, TOLERANCE);\n System.out.println(\n \"H(cp, b) = \" + recpb); //Should be 1.8112781244591327\n\n int[][] ab = new int[2][8];\n for (int i = 0; i < 8; i++) {\n ab[0][i] = a[i];\n ab[1][i] = b[i];\n }\n\n double rebpab = re.jointEntropy(bp, ab);\n assertEquals(2.5, rebpab, TOLERANCE);\n System.out.println(\"H(bp, a, b) = \" + rebpab); //Should be 2.5\n\n double recpab = re.jointEntropy(cp, ab);\n assertEquals(2.5, recpab, TOLERANCE);\n System.out.println(\"H(cp, a, b) = \" + recpab); //Should be 2.5\n\n int[][] abc = new int[3][8];\n for (int i = 0; i < 8; i++) {\n abc[0][i] = a[i];\n abc[1][i] = b[i];\n abc[2][i] = c[i];\n }\n\n double recpabc = re.jointEntropy(cp, abc);\n assertEquals(3.0, recpabc, TOLERANCE);\n System.out.println(\"H(cp, a, b, c) = \" + recpabc); //Should be 3.0\n\n //Setup array cases and test mutualInformation\n int[] p = new int[1];\n p[0] = 0;\n\n double rembpa = re.mutualInformation(4, p, 1);\n assertEquals(0.31127812445913294, rembpa, TOLERANCE);\n System.out.println(\n \"M(Bp, A) = \" + rembpa); //Should be 0.31127812445913294\n\n int[] pp = new int[2];\n pp[0] = 0;\n pp[1] = 1;\n\n double rmcpab = re.mutualInformation(5, pp, 1);\n assertEquals(0.5, rmcpab, TOLERANCE);\n System.out.println(\"M(Cp, [A,B]) = \" + rmcpab); //Should be 0.5\n\n int[] ppp = new int[3];\n ppp[0] = 0;\n ppp[1] = 1;\n ppp[2] = 2;\n\n double rmcpabc = re.mutualInformation(5, ppp, 1);\n assertEquals(1.0, rmcpabc, TOLERANCE);\n System.out.println(\"M(Cp, [A,B,C]) = \" + rmcpabc); //Should be 1.0\n\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test19() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBInformation();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test18() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_07() {\n CuteNetlibCase.doTest(\"OSA-07.SIF\", \"535722.517299352\", \"4332086.205299969\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.unclassified();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test21() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.errorRate();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertFalse(boolean0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"Y#:')*#rI\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numInstances();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testKEN_07() {\n CuteNetlibCase.doTest(\"KEN-07.SIF\", \"-6.795204433816869E8\", \"-1.61949281194431E8\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\"\", false);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.toMatrixString(\"getPreBuiltClassifiers\");\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(Double.NaN);\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test30() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertFalse(boolean0);\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "public void testSummaryStatsPartialLog() {\n\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset98.txt\");\n GcManager gcManager = new GcManager();\n File preprocessedFile = gcManager.preprocess(testFile, null);\n gcManager.store(preprocessedFile, false);\n JvmRun jvmRun = gcManager.getJvmRun(new Jvm(null, null), Constants.DEFAULT_BOTTLENECK_THROUGHPUT_THRESHOLD);\n Assert.assertEquals(\"GC event type count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertEquals(\"GC blocking event count not correct.\", 2, jvmRun.getBlockingEventCount());\n Assert.assertEquals(\"GC pause total not correct.\", 61, jvmRun.getTotalGcPause());\n Assert.assertEquals(\"GC first timestamp not correct.\", 1002192, jvmRun.getFirstGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last timestamp not correct.\", 1002847, jvmRun.getLastGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last duration not correct.\", 41, jvmRun.getLastGcEvent().getDuration());\n Assert.assertEquals(\"Stopped Time event count not correct.\", 6, jvmRun.getStoppedTimeEventCount());\n Assert.assertEquals(\"Stopped time total not correct.\", 1064, jvmRun.getTotalStoppedTime());\n Assert.assertEquals(\"Stopped first timestamp not correct.\", 1000964,\n jvmRun.getFirstStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last timestamp not correct.\", 1003884,\n jvmRun.getLastStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last duration not correct.\", 1000688, jvmRun.getLastStoppedEvent().getDuration());\n Assert.assertEquals(\"JVM first event timestamp not correct.\", 1000964, jvmRun.getFirstEvent().getTimestamp());\n Assert.assertEquals(\"JVM last event timestamp not correct.\", 1003884, jvmRun.getLastEvent().getTimestamp());\n Assert.assertEquals(\"JVM run duration not correct.\", 3920, jvmRun.getJvmRunDuration());\n Assert.assertEquals(\"GC throughput not correct.\", 98, jvmRun.getGcThroughput());\n Assert.assertEquals(\"Stopped time throughput not correct.\", 73, jvmRun.getStoppedTimeThroughput());\n Assert.assertTrue(Analysis.WARN_GC_STOPPED_RATIO + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_GC_STOPPED_RATIO));\n }", "@Test\n public void test13() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC(17);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }", "@Test\n public void test14() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_14() {\n CuteNetlibCase.doTest(\"OSA-14.SIF\", \"1106462.8447362552\", \"9377699.405100001\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test01() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-1459.149165489484), ',');\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC50A() {\n CuteNetlibCase.doTest(\"SC50A.SIF\", \"-64.57507705856449\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toCumulativeMarginDistributionString();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(\" -1 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.getRevision();\n assertEquals(\"8964\", string0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(0.0, Double.NaN);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1P() {\n CuteNetlibCase.doTest(\"FIT1P.SIF\", \"9146.378092420955\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getBinRangesString(2607);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n discretize0.m_UseEqualFrequency = true;\n discretize0.getOptions();\n assertTrue(discretize0.getMakeBinary());\n \n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCORPION() {\n CuteNetlibCase.doTest(\"SCORPION.SIF\", \"1878.1248227381068\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n Discretize discretize0 = new Discretize(\"*W5D<hSCW|8@I\");\n int[] intArray0 = new int[9];\n intArray0[0] = (-1405);\n intArray0[1] = (-2938);\n intArray0[2] = (-1954);\n intArray0[3] = 9;\n intArray0[4] = 66;\n intArray0[5] = 573;\n intArray0[6] = 0;\n intArray0[7] = (-71);\n intArray0[8] = 99;\n discretize0.setAttributeIndicesArray(intArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize(\"'B1of2'\");\n int[] intArray0 = new int[8];\n intArray0[0] = 18;\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"'B1of2'\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(6, stringArray0.length);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR7() {\n CuteNetlibCase.doTest(\"SCAGR7.SIF\", \"-2331389.8243309837\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test006() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedAreaUnderPRC();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n byte[] byteArray0 = new byte[3];\n byteArray0[0] = (byte)108;\n byteArray0[1] = (byte)27;\n byteArray0[2] = (byte)14;\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n discretize0.setBins((-830));\n discretize0.getOptions();\n assertEquals((-830), discretize0.getBins());\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize(\"\\tInvert matching sense of column indexes.\");\n discretize0.setOutputFormat();\n discretize0.listOptions();\n Discretize discretize1 = new Discretize();\n discretize1.setIgnoreClass(false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\\tInvert matching sense of column indexes.\";\n stringArray0[1] = \"\";\n Discretize.main(stringArray0);\n String string0 = discretize1.findNumBinsTipText();\n assertEquals(\"Optimize number of equal-width bins using leave-one-out. Doesn't work for equal-frequency binning\", string0);\n \n discretize1.setInvertSelection(false);\n discretize0.getBinRangesString(511);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n \n discretize1.getFindNumBins();\n assertEquals(10, discretize1.getBins());\n }", "@Test\n @Tag(\"slow\")\n public void testCZPROB() {\n CuteNetlibCase.doTest(\"CZPROB.SIF\", \"2185196.6988565763\", \"3089066.71321333\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(0.95);\n assertNotNull(doubleArray0);\n assertArrayEquals(new double[] {1.0, 0.0}, doubleArray0, 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testSCRS8() {\n CuteNetlibCase.doTest(\"SCRS8.SIF\", \"960.0206152764557\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test041() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.fMeasure((-2765));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR25() {\n CuteNetlibCase.doTest(\"SCAGR25.SIF\", \"-1.475343306076852E7\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test088() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBRelativeInformation();\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n public void run () {\n\t \n\t System.out.println(\"---------->\");\n\t //System.out.println(md5list.getResult());\n\t //System.out.println(hashsearch.getResult());\n\t \n\t \n\t \n\t // System.out.println(samples.Testing());\n\t //System.out.println(\"getserult: \"+samples.getResult());\n\t \n }", "public void test_0020() {\n int nFactors = 2;\n FactorAnalysis instance = new FactorAnalysis(data, nFactors);\n\n assertEquals(instance.nObs(), 18., 1e-15);\n assertEquals(instance.nVariables(), 6., 1e-15);\n assertEquals(instance.nFactors(), 2., 1e-15);\n\n FAEstimator estimators = instance.getEstimators(400);\n\n Vector uniqueness = estimators.psi();\n assertArrayEquals(\n new double[]{0.005, 0.114, 0.642, 0.742, 0.005, 0.097},\n uniqueness.toArray(),\n 2e-2);\n\n int dof = estimators.dof();\n assertEquals(dof, 4);\n\n double fitted = estimators.logLikelihood();\n assertEquals(fitted, 1.803, 1e-3);\n\n Matrix loadings = estimators.loadings();\n assertTrue(AreMatrices.equal(\n new DenseMatrix(new double[][]{\n {0.971, 0.228},\n {0.917, 0.213},\n {0.429, 0.418},\n {0.363, 0.355},\n {0.254, 0.965},\n {0.205, 0.928}\n }),\n loadings,\n 1e-3));\n\n double testStats = estimators.statistics();\n assertEquals(testStats, 23.14, 1e-2);\n\n double pValue = estimators.pValue();\n assertEquals(pValue, 0.000119, 1e-6);//R: 1-pchisq(23.14, df=4) = 0.0001187266\n\n// System.out.println(uniqueness.toString());\n// System.out.println(fitted);\n// System.out.println(loadings.toString());\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCRE_A() {\n CuteNetlibCase.doTest(\"CRE-A.SIF\", \"2.9889732905677114E7\", \"2.9889732905677114E7\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n Attribute attribute0 = new Attribute(\"invalid CVS revision - not dots!\");\n attribute0.setWeight(0.0);\n Attribute.typeToString(attribute0);\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"UR<dj;O\", arrayList0, 3);\n Instances instances1 = new Instances(instances0);\n boolean boolean0 = discretize0.setInputFormat(instances1);\n assertFalse(boolean0);\n \n String[] stringArray0 = new String[3];\n stringArray0[0] = \".bsi\";\n stringArray0[1] = \"invalid CVS revision - not dots!\";\n stringArray0[2] = \"@end\";\n discretize0.setOptions(stringArray0);\n discretize0.setOptions(stringArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n }", "@Test(timeout = 4000)\n public void test049() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC((-1));\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test020() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\".arff\", true);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\".arff\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test111() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.relativeAbsoluteError();\n assertEquals(Double.NaN, evaluation0.meanPriorAbsoluteError(), 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(Double.NaN, evaluation0.meanAbsoluteError(), 0.01);\n }", "@Test(timeout = 4000)\n public void test144() throws Throwable {\n ResultMatrixSignificance resultMatrixSignificance0 = new ResultMatrixSignificance();\n Vector<Integer> vector0 = new Vector<Integer>();\n resultMatrixSignificance0.m_HeaderKeys = vector0;\n vector0.add((Integer) 0);\n resultMatrixSignificance0.getDefaultMeanWidth();\n resultMatrixSignificance0.getRevision();\n int int0 = ResultMatrix.SIGNIFICANCE_TIE;\n int[] intArray0 = new int[3];\n intArray0[0] = 1;\n resultMatrixSignificance0.setCountWidth(1);\n intArray0[1] = 0;\n intArray0[2] = 0;\n resultMatrixSignificance0.m_RowOrder = intArray0;\n resultMatrixSignificance0.getSignificance(0, 322);\n int int1 = resultMatrixSignificance0.getSignificanceWidth();\n assertEquals(1, resultMatrixSignificance0.getCountWidth());\n assertEquals(0, resultMatrixSignificance0.getDefaultCountWidth());\n assertEquals(0, int1);\n }", "@Test(timeout = 4000)\n public void test104() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString(\".arff\");\n assertEquals(Double.NaN, evaluation0.unweightedMicroFmeasure(), 0.01);\n assertEquals(\".arff\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\n 0 0 0 0 0 0 ? ? class1\\n 0 0 0 0 0 0 ? ? class2\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n }", "@Test\n public void testFitnessProportionateSelection()\n {\n }", "@Test(timeout = 4000)\n public void test072() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateMargins(doubleArray0, 3, (-1));\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC205() {\n CuteNetlibCase.doTest(\"SC205.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }" ]
[ "0.73587406", "0.71982956", "0.705016", "0.69375086", "0.69193333", "0.69055635", "0.68861204", "0.6831944", "0.68226177", "0.68090373", "0.6808212", "0.6773656", "0.6762201", "0.6759678", "0.6756089", "0.6754245", "0.6737561", "0.6723601", "0.6693418", "0.66920245", "0.66504055", "0.6631408", "0.662621", "0.66029006", "0.66019124", "0.6597026", "0.6537914", "0.65187544", "0.65077883", "0.6489686", "0.64804506", "0.6443464", "0.6442585", "0.64294314", "0.64262855", "0.64255434", "0.64197284", "0.6415489", "0.64099723", "0.6396465", "0.6386605", "0.63772076", "0.63730806", "0.63684833", "0.6361304", "0.63567674", "0.6348752", "0.6340832", "0.6340407", "0.63379973", "0.6336959", "0.6323167", "0.63211244", "0.6315158", "0.63139796", "0.62921804", "0.6286375", "0.6280897", "0.627281", "0.6263644", "0.62624425", "0.62585115", "0.6237482", "0.62218595", "0.6209623", "0.62055224", "0.619965", "0.6192356", "0.618725", "0.6168534", "0.61659634", "0.61651677", "0.6151575", "0.6137324", "0.6122193", "0.61207736", "0.6120291", "0.6119244", "0.6106312", "0.6099371", "0.60751086", "0.607445", "0.6073311", "0.60711175", "0.60630584", "0.60560375", "0.6054757", "0.6051254", "0.60410804", "0.6040658", "0.60381985", "0.6017114", "0.6005194", "0.5988943", "0.59799606", "0.59793264", "0.5976674", "0.5972634", "0.5965863", "0.5951542", "0.59486526" ]
0.0
-1
Test case number: 8 /Coverage entropy=2.141963331773656
@Test(timeout = 4000) public void test08() throws Throwable { FBProcedureCall fBProcedureCall0 = new FBProcedureCall(); fBProcedureCall0.getSQL(true); fBProcedureCall0.getSQL(true); int int0 = 2696; FBProcedureCall fBProcedureCall1 = (FBProcedureCall)fBProcedureCall0.clone(); fBProcedureCall0.setName("SELECT * FROM null"); fBProcedureCall0.getInputParam(2696); fBProcedureCall0.getInputParams(); fBProcedureCall0.getInputParam(887); fBProcedureCall0.getOutputParams(); fBProcedureCall1.getOutputParams(); fBProcedureCall0.mapOutParamIndexToPosition(2696, true); FBProcedureCall fBProcedureCall2 = new FBProcedureCall(); fBProcedureCall2.mapOutParamIndexToPosition(30, true); FBProcedureCall fBProcedureCall3 = (FBProcedureCall)fBProcedureCall2.clone(); fBProcedureCall0.equals(fBProcedureCall3); try { fBProcedureCall2.mapOutParamIndexToPosition(2696, false); fail("Expecting exception: FBSQLException"); } catch(FBSQLException e) { // // Specified parameter does not exist. // verifyException("org.firebirdsql.jdbc.FBProcedureCall", e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test126() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.totalCost();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.getHeader();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test29() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.pctCorrect();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderPRC((-1));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test40() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, evaluation0.unclassified(), 0.01D);\n }", "@Test\n public void test17() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFPriorEntropy();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.avgCost();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n \n evaluation0.useNoPriors();\n assertEquals(Double.NaN, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.priorEntropy();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanPriorEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setNumericPriorsFromBuffer();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctIncorrect();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertEquals(2, doubleArray0.length);\n assertNotNull(doubleArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test35() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(Double.NaN, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test119() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString((String) null, true);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(\"null\\nTotal Number of Instances 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(false);\n assertEquals(\"=== Summary ===\\n\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n }", "@Test\n public void test33() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, double0, 0.01D);\n }", "@Test\n public void test36() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.incorrect();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives((-1436));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n public void test16() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.SFSchemeEntropy();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString();\n assertEquals(\"=== Detailed Accuracy By Class ===\\n\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n public void test15() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.recall((-9));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "public void testLiangFigure6() {\n int[] a = {0, 0, 0, 0, 1, 1, 1, 1};\n int[] b = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] c = {0, 1, 0, 1, 0, 1, 0, 1};\n int[] ap = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] bp = {0, 1, 0, 1, 1, 1, 1, 1};\n int[] cp = {0, 0, 0, 1, 0, 1, 1, 1};\n\n for (int i = 0; i < ntimes - 1; i++) {\n cases[i][0] = a[i];\n cases[i][1] = b[i];\n cases[i][2] = c[i];\n cases[i + 1][3] = ap[i];\n cases[i + 1][4] = bp[i];\n cases[i + 1][5] = cp[i];\n }\n cases[8][0] = 0;\n cases[8][1] = 0;\n cases[8][2] = 0;\n cases[0][3] = 0;\n cases[0][4] = 0;\n cases[0][5] = 0;\n\n RevealEvaluator re = new RevealEvaluator(cases);\n\n double rea = re.entropy(a);\n assertEquals(1.0, rea, TOLERANCE);\n System.out.println(\"H(a) = \" + rea); //Should be 1.0\n\n double reb = re.entropy(b);\n assertEquals(1.0, reb, TOLERANCE);\n System.out.println(\"H(b) = \" + reb); //Should be 1.0\n\n double rec = re.entropy(c);\n assertEquals(1.0, rec, TOLERANCE);\n System.out.println(\"H(c) = \" + rec); //Should be 1.0\n\n double reab = re.jointEntropy(a, b);\n assertEquals(2.0, reab, TOLERANCE);\n System.out.println(\"H(a,b) = \" + reab); //Should be 2.0\n\n double reap = re.entropy(ap);\n assertEquals(1.0, reap, TOLERANCE);\n System.out.println(\"H(ap) = \" + reap); //Should be 1.0\n\n double rebp = re.entropy(bp);\n assertEquals(0.8112781244591328, rebp, TOLERANCE);\n System.out.println(\"H(bp) = \" + rebp); //Should be 0.8112781244591328\n\n double recp = re.entropy(cp);\n assertEquals(1.0, recp, TOLERANCE);\n System.out.println(\"H(cp) = \" + recp); //Should be 1.0\n\n double reapa = re.jointEntropy(ap, a);\n assertEquals(2.0, reapa, TOLERANCE);\n System.out.println(\"H(ap, a) = \" + reapa); //Should be 2.0\n\n double rebpb = re.jointEntropy(bp, b);\n assertEquals(1.8112781244591327, rebpb, TOLERANCE);\n System.out.println(\n \"H(bp, b) = \" + rebpb); //Should be 1.8112781244591327\n\n double recpb = re.jointEntropy(cp, b);\n assertEquals(1.8112781244591327, recpb, TOLERANCE);\n System.out.println(\n \"H(cp, b) = \" + recpb); //Should be 1.8112781244591327\n\n int[][] ab = new int[2][8];\n for (int i = 0; i < 8; i++) {\n ab[0][i] = a[i];\n ab[1][i] = b[i];\n }\n\n double rebpab = re.jointEntropy(bp, ab);\n assertEquals(2.5, rebpab, TOLERANCE);\n System.out.println(\"H(bp, a, b) = \" + rebpab); //Should be 2.5\n\n double recpab = re.jointEntropy(cp, ab);\n assertEquals(2.5, recpab, TOLERANCE);\n System.out.println(\"H(cp, a, b) = \" + recpab); //Should be 2.5\n\n int[][] abc = new int[3][8];\n for (int i = 0; i < 8; i++) {\n abc[0][i] = a[i];\n abc[1][i] = b[i];\n abc[2][i] = c[i];\n }\n\n double recpabc = re.jointEntropy(cp, abc);\n assertEquals(3.0, recpabc, TOLERANCE);\n System.out.println(\"H(cp, a, b, c) = \" + recpabc); //Should be 3.0\n\n //Setup array cases and test mutualInformation\n int[] p = new int[1];\n p[0] = 0;\n\n double rembpa = re.mutualInformation(4, p, 1);\n assertEquals(0.31127812445913294, rembpa, TOLERANCE);\n System.out.println(\n \"M(Bp, A) = \" + rembpa); //Should be 0.31127812445913294\n\n int[] pp = new int[2];\n pp[0] = 0;\n pp[1] = 1;\n\n double rmcpab = re.mutualInformation(5, pp, 1);\n assertEquals(0.5, rmcpab, TOLERANCE);\n System.out.println(\"M(Cp, [A,B]) = \" + rmcpab); //Should be 0.5\n\n int[] ppp = new int[3];\n ppp[0] = 0;\n ppp[1] = 1;\n ppp[2] = 2;\n\n double rmcpabc = re.mutualInformation(5, ppp, 1);\n assertEquals(1.0, rmcpabc, TOLERANCE);\n System.out.println(\"M(Cp, [A,B,C]) = \" + rmcpabc); //Should be 1.0\n\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(360, (-336.251));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setDiscardPredictions(false);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertFalse(evaluation0.getDiscardPredictions());\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test19() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBInformation();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test18() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC(17);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test\n public void test13() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.unclassified();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"Y#:')*#rI\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numInstances();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1D() {\n CuteNetlibCase.doTest(\"FIT1D.SIF\", \"-9146.378092421019\", \"80453.99999999999\", NumberContext.of(7, 4));\n }", "@Test\n public void test21() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.errorRate();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "public void testSummaryStatsPartialLog() {\n\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset98.txt\");\n GcManager gcManager = new GcManager();\n File preprocessedFile = gcManager.preprocess(testFile, null);\n gcManager.store(preprocessedFile, false);\n JvmRun jvmRun = gcManager.getJvmRun(new Jvm(null, null), Constants.DEFAULT_BOTTLENECK_THROUGHPUT_THRESHOLD);\n Assert.assertEquals(\"GC event type count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertEquals(\"GC blocking event count not correct.\", 2, jvmRun.getBlockingEventCount());\n Assert.assertEquals(\"GC pause total not correct.\", 61, jvmRun.getTotalGcPause());\n Assert.assertEquals(\"GC first timestamp not correct.\", 1002192, jvmRun.getFirstGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last timestamp not correct.\", 1002847, jvmRun.getLastGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last duration not correct.\", 41, jvmRun.getLastGcEvent().getDuration());\n Assert.assertEquals(\"Stopped Time event count not correct.\", 6, jvmRun.getStoppedTimeEventCount());\n Assert.assertEquals(\"Stopped time total not correct.\", 1064, jvmRun.getTotalStoppedTime());\n Assert.assertEquals(\"Stopped first timestamp not correct.\", 1000964,\n jvmRun.getFirstStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last timestamp not correct.\", 1003884,\n jvmRun.getLastStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last duration not correct.\", 1000688, jvmRun.getLastStoppedEvent().getDuration());\n Assert.assertEquals(\"JVM first event timestamp not correct.\", 1000964, jvmRun.getFirstEvent().getTimestamp());\n Assert.assertEquals(\"JVM last event timestamp not correct.\", 1003884, jvmRun.getLastEvent().getTimestamp());\n Assert.assertEquals(\"JVM run duration not correct.\", 3920, jvmRun.getJvmRunDuration());\n Assert.assertEquals(\"GC throughput not correct.\", 98, jvmRun.getGcThroughput());\n Assert.assertEquals(\"Stopped time throughput not correct.\", 73, jvmRun.getStoppedTimeThroughput());\n Assert.assertTrue(Analysis.WARN_GC_STOPPED_RATIO + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_GC_STOPPED_RATIO));\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.toMatrixString(\"getPreBuiltClassifiers\");\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(Double.NaN);\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test01() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-1459.149165489484), ',');\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_07() {\n CuteNetlibCase.doTest(\"OSA-07.SIF\", \"535722.517299352\", \"4332086.205299969\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertFalse(boolean0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.getRevision();\n assertEquals(\"8964\", string0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }", "@Test\n public void test30() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertFalse(boolean0);\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toCumulativeMarginDistributionString();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(\" -1 0 \\n\", string0);\n }", "@Test\n @Tag(\"slow\")\n public void testKEN_07() {\n CuteNetlibCase.doTest(\"KEN-07.SIF\", \"-6.795204433816869E8\", \"-1.61949281194431E8\", NumberContext.of(7, 4));\n }", "@Test\n public void test14() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_14() {\n CuteNetlibCase.doTest(\"OSA-14.SIF\", \"1106462.8447362552\", \"9377699.405100001\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\"\", false);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC50A() {\n CuteNetlibCase.doTest(\"SC50A.SIF\", \"-64.57507705856449\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(0.0, Double.NaN);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize(\"\\tInvert matching sense of column indexes.\");\n discretize0.setOutputFormat();\n discretize0.listOptions();\n Discretize discretize1 = new Discretize();\n discretize1.setIgnoreClass(false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\\tInvert matching sense of column indexes.\";\n stringArray0[1] = \"\";\n Discretize.main(stringArray0);\n String string0 = discretize1.findNumBinsTipText();\n assertEquals(\"Optimize number of equal-width bins using leave-one-out. Doesn't work for equal-frequency binning\", string0);\n \n discretize1.setInvertSelection(false);\n discretize0.getBinRangesString(511);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n \n discretize1.getFindNumBins();\n assertEquals(10, discretize1.getBins());\n }", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getBinRangesString(2607);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n discretize0.m_UseEqualFrequency = true;\n discretize0.getOptions();\n assertTrue(discretize0.getMakeBinary());\n \n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n Discretize discretize0 = new Discretize(\"*W5D<hSCW|8@I\");\n int[] intArray0 = new int[9];\n intArray0[0] = (-1405);\n intArray0[1] = (-2938);\n intArray0[2] = (-1954);\n intArray0[3] = 9;\n intArray0[4] = 66;\n intArray0[5] = 573;\n intArray0[6] = 0;\n intArray0[7] = (-71);\n intArray0[8] = 99;\n discretize0.setAttributeIndicesArray(intArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n byte[] byteArray0 = new byte[3];\n byteArray0[0] = (byte)108;\n byteArray0[1] = (byte)27;\n byteArray0[2] = (byte)14;\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n discretize0.setBins((-830));\n discretize0.getOptions();\n assertEquals((-830), discretize0.getBins());\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCORPION() {\n CuteNetlibCase.doTest(\"SCORPION.SIF\", \"1878.1248227381068\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(0.95);\n assertNotNull(doubleArray0);\n assertArrayEquals(new double[] {1.0, 0.0}, doubleArray0, 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testCZPROB() {\n CuteNetlibCase.doTest(\"CZPROB.SIF\", \"2185196.6988565763\", \"3089066.71321333\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testSCRS8() {\n CuteNetlibCase.doTest(\"SCRS8.SIF\", \"960.0206152764557\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test006() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedAreaUnderPRC();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize(\"'B1of2'\");\n int[] intArray0 = new int[8];\n intArray0[0] = 18;\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"'B1of2'\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(6, stringArray0.length);\n }", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n Attribute attribute0 = new Attribute(\"invalid CVS revision - not dots!\");\n attribute0.setWeight(0.0);\n Attribute.typeToString(attribute0);\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"UR<dj;O\", arrayList0, 3);\n Instances instances1 = new Instances(instances0);\n boolean boolean0 = discretize0.setInputFormat(instances1);\n assertFalse(boolean0);\n \n String[] stringArray0 = new String[3];\n stringArray0[0] = \".bsi\";\n stringArray0[1] = \"invalid CVS revision - not dots!\";\n stringArray0[2] = \"@end\";\n discretize0.setOptions(stringArray0);\n discretize0.setOptions(stringArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1P() {\n CuteNetlibCase.doTest(\"FIT1P.SIF\", \"9146.378092420955\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test088() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBRelativeInformation();\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCRE_A() {\n CuteNetlibCase.doTest(\"CRE-A.SIF\", \"2.9889732905677114E7\", \"2.9889732905677114E7\", NumberContext.of(7, 4));\n }", "@Test\n public void run () {\n\t \n\t System.out.println(\"---------->\");\n\t //System.out.println(md5list.getResult());\n\t //System.out.println(hashsearch.getResult());\n\t \n\t \n\t \n\t // System.out.println(samples.Testing());\n\t //System.out.println(\"getserult: \"+samples.getResult());\n\t \n }", "public void test_0020() {\n int nFactors = 2;\n FactorAnalysis instance = new FactorAnalysis(data, nFactors);\n\n assertEquals(instance.nObs(), 18., 1e-15);\n assertEquals(instance.nVariables(), 6., 1e-15);\n assertEquals(instance.nFactors(), 2., 1e-15);\n\n FAEstimator estimators = instance.getEstimators(400);\n\n Vector uniqueness = estimators.psi();\n assertArrayEquals(\n new double[]{0.005, 0.114, 0.642, 0.742, 0.005, 0.097},\n uniqueness.toArray(),\n 2e-2);\n\n int dof = estimators.dof();\n assertEquals(dof, 4);\n\n double fitted = estimators.logLikelihood();\n assertEquals(fitted, 1.803, 1e-3);\n\n Matrix loadings = estimators.loadings();\n assertTrue(AreMatrices.equal(\n new DenseMatrix(new double[][]{\n {0.971, 0.228},\n {0.917, 0.213},\n {0.429, 0.418},\n {0.363, 0.355},\n {0.254, 0.965},\n {0.205, 0.928}\n }),\n loadings,\n 1e-3));\n\n double testStats = estimators.statistics();\n assertEquals(testStats, 23.14, 1e-2);\n\n double pValue = estimators.pValue();\n assertEquals(pValue, 0.000119, 1e-6);//R: 1-pchisq(23.14, df=4) = 0.0001187266\n\n// System.out.println(uniqueness.toString());\n// System.out.println(fitted);\n// System.out.println(loadings.toString());\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR25() {\n CuteNetlibCase.doTest(\"SCAGR25.SIF\", \"-1.475343306076852E7\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test041() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.fMeasure((-2765));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "public double entropyPotential() {\n \n return (-1.0);\n}", "@Test(timeout = 4000)\n public void test049() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC((-1));\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test040() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.falseNegativeRate((-2));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC205() {\n CuteNetlibCase.doTest(\"SC205.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR7() {\n CuteNetlibCase.doTest(\"SCAGR7.SIF\", \"-2331389.8243309837\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test008() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.meanAbsoluteError();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test18() throws Throwable {\n Discretize discretize0 = new Discretize(\"%\");\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n discretize0.findNumBinsTipText();\n double[][] doubleArray0 = new double[0][7];\n discretize0.m_CutPoints = doubleArray0;\n FileSystemHandling.setPermissions((EvoSuiteFile) null, true, false, true);\n discretize0.setInvertSelection(false);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n public void test23() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n SerializedClassifier serializedClassifier0 = new SerializedClassifier();\n Object[] objectArray0 = new Object[25];\n double[] doubleArray0 = evaluation0.evaluateModel((Classifier) serializedClassifier0, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test16() throws Throwable {\n Discretize discretize0 = new Discretize();\n String[] stringArray0 = discretize0.getOptions();\n discretize0.setOptions(stringArray0);\n assertEquals(6, stringArray0.length);\n \n String string0 = discretize0.globalInfo();\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"An instance filter that discretizes a range of numeric attributes in the dataset into nominal attributes. Discretization is by simple binning. Skips the class attribute if set.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }" ]
[ "0.7274894", "0.71479666", "0.6944117", "0.68381035", "0.68241566", "0.68107486", "0.6801239", "0.6799317", "0.67780787", "0.6772734", "0.6728505", "0.6725915", "0.6721389", "0.67147994", "0.67137265", "0.6709324", "0.6708531", "0.66672003", "0.6628954", "0.65778893", "0.6558684", "0.6550468", "0.6537068", "0.6533537", "0.65236783", "0.6517358", "0.6494996", "0.64678913", "0.6426441", "0.6402764", "0.63859934", "0.6385447", "0.6365703", "0.63649905", "0.63487434", "0.63324857", "0.6330316", "0.63272834", "0.6326619", "0.6311634", "0.63091564", "0.6308817", "0.6307996", "0.63066864", "0.6298163", "0.62949187", "0.6273256", "0.62670815", "0.6247083", "0.6243329", "0.6240855", "0.6230853", "0.6228476", "0.622159", "0.6211724", "0.6206026", "0.61996883", "0.61970115", "0.6191832", "0.61902946", "0.6187137", "0.61843306", "0.61773884", "0.6168344", "0.61450154", "0.6142925", "0.61370057", "0.61189663", "0.61174554", "0.6109893", "0.6096527", "0.609323", "0.6085563", "0.6083494", "0.60760593", "0.60677725", "0.6066805", "0.60611033", "0.60606503", "0.60373944", "0.6032255", "0.60285634", "0.60270077", "0.6025708", "0.6010647", "0.6000961", "0.59756887", "0.5974436", "0.59696776", "0.59595644", "0.5956768", "0.5945095", "0.5915114", "0.59132606", "0.5912802", "0.5894344", "0.5892584", "0.5889763", "0.5877088", "0.5864367", "0.5863272" ]
0.0
-1
Test case number: 9 /Coverage entropy=0.9184277849930976
@Test(timeout = 4000) public void test09() throws Throwable { FBProcedureCall fBProcedureCall0 = new FBProcedureCall(); int int0 = 0; String string0 = "sh\\"; int int1 = 3674; fBProcedureCall0.addParam(3674, "sh"); fBProcedureCall0.addParam(3674, "sh"); FBProcedureCall fBProcedureCall1 = (FBProcedureCall)fBProcedureCall0.clone(); fBProcedureCall1.clone(); // Undeclared exception! fBProcedureCall0.clone(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test126() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.totalCost();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.getHeader();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test29() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.pctCorrect();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderPRC((-1));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test40() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, evaluation0.unclassified(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.avgCost();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setNumericPriorsFromBuffer();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n \n evaluation0.useNoPriors();\n assertEquals(Double.NaN, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test17() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFPriorEntropy();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.priorEntropy();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctIncorrect();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanPriorEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test119() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString((String) null, true);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(\"null\\nTotal Number of Instances 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertEquals(2, doubleArray0.length);\n assertNotNull(doubleArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(false);\n assertEquals(\"=== Summary ===\\n\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test\n public void test35() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(Double.NaN, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives((-1436));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test33() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, double0, 0.01D);\n }", "@Test\n public void test36() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.incorrect();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString();\n assertEquals(\"=== Detailed Accuracy By Class ===\\n\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.recall((-9));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(360, (-336.251));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }", "public void testSummaryStatsPartialLog() {\n\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset98.txt\");\n GcManager gcManager = new GcManager();\n File preprocessedFile = gcManager.preprocess(testFile, null);\n gcManager.store(preprocessedFile, false);\n JvmRun jvmRun = gcManager.getJvmRun(new Jvm(null, null), Constants.DEFAULT_BOTTLENECK_THROUGHPUT_THRESHOLD);\n Assert.assertEquals(\"GC event type count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertEquals(\"GC blocking event count not correct.\", 2, jvmRun.getBlockingEventCount());\n Assert.assertEquals(\"GC pause total not correct.\", 61, jvmRun.getTotalGcPause());\n Assert.assertEquals(\"GC first timestamp not correct.\", 1002192, jvmRun.getFirstGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last timestamp not correct.\", 1002847, jvmRun.getLastGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last duration not correct.\", 41, jvmRun.getLastGcEvent().getDuration());\n Assert.assertEquals(\"Stopped Time event count not correct.\", 6, jvmRun.getStoppedTimeEventCount());\n Assert.assertEquals(\"Stopped time total not correct.\", 1064, jvmRun.getTotalStoppedTime());\n Assert.assertEquals(\"Stopped first timestamp not correct.\", 1000964,\n jvmRun.getFirstStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last timestamp not correct.\", 1003884,\n jvmRun.getLastStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last duration not correct.\", 1000688, jvmRun.getLastStoppedEvent().getDuration());\n Assert.assertEquals(\"JVM first event timestamp not correct.\", 1000964, jvmRun.getFirstEvent().getTimestamp());\n Assert.assertEquals(\"JVM last event timestamp not correct.\", 1003884, jvmRun.getLastEvent().getTimestamp());\n Assert.assertEquals(\"JVM run duration not correct.\", 3920, jvmRun.getJvmRunDuration());\n Assert.assertEquals(\"GC throughput not correct.\", 98, jvmRun.getGcThroughput());\n Assert.assertEquals(\"Stopped time throughput not correct.\", 73, jvmRun.getStoppedTimeThroughput());\n Assert.assertTrue(Analysis.WARN_GC_STOPPED_RATIO + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_GC_STOPPED_RATIO));\n }", "@Test\n public void test01() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-1459.149165489484), ',');\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setDiscardPredictions(false);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertFalse(evaluation0.getDiscardPredictions());\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC50A() {\n CuteNetlibCase.doTest(\"SC50A.SIF\", \"-64.57507705856449\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test\n public void test19() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBInformation();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test16() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.SFSchemeEntropy();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n public void test21() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.errorRate();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.toMatrixString(\"getPreBuiltClassifiers\");\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test18() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCORPION() {\n CuteNetlibCase.doTest(\"SCORPION.SIF\", \"1878.1248227381068\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.unclassified();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"Y#:')*#rI\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numInstances();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC(17);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test15() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n public void test30() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertFalse(boolean0);\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.getRevision();\n assertEquals(\"8964\", string0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertFalse(boolean0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\"\", false);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(0.0, Double.NaN);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test13() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_07() {\n CuteNetlibCase.doTest(\"OSA-07.SIF\", \"535722.517299352\", \"4332086.205299969\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1D() {\n CuteNetlibCase.doTest(\"FIT1D.SIF\", \"-9146.378092421019\", \"80453.99999999999\", NumberContext.of(7, 4));\n }", "public void testLiangFigure6() {\n int[] a = {0, 0, 0, 0, 1, 1, 1, 1};\n int[] b = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] c = {0, 1, 0, 1, 0, 1, 0, 1};\n int[] ap = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] bp = {0, 1, 0, 1, 1, 1, 1, 1};\n int[] cp = {0, 0, 0, 1, 0, 1, 1, 1};\n\n for (int i = 0; i < ntimes - 1; i++) {\n cases[i][0] = a[i];\n cases[i][1] = b[i];\n cases[i][2] = c[i];\n cases[i + 1][3] = ap[i];\n cases[i + 1][4] = bp[i];\n cases[i + 1][5] = cp[i];\n }\n cases[8][0] = 0;\n cases[8][1] = 0;\n cases[8][2] = 0;\n cases[0][3] = 0;\n cases[0][4] = 0;\n cases[0][5] = 0;\n\n RevealEvaluator re = new RevealEvaluator(cases);\n\n double rea = re.entropy(a);\n assertEquals(1.0, rea, TOLERANCE);\n System.out.println(\"H(a) = \" + rea); //Should be 1.0\n\n double reb = re.entropy(b);\n assertEquals(1.0, reb, TOLERANCE);\n System.out.println(\"H(b) = \" + reb); //Should be 1.0\n\n double rec = re.entropy(c);\n assertEquals(1.0, rec, TOLERANCE);\n System.out.println(\"H(c) = \" + rec); //Should be 1.0\n\n double reab = re.jointEntropy(a, b);\n assertEquals(2.0, reab, TOLERANCE);\n System.out.println(\"H(a,b) = \" + reab); //Should be 2.0\n\n double reap = re.entropy(ap);\n assertEquals(1.0, reap, TOLERANCE);\n System.out.println(\"H(ap) = \" + reap); //Should be 1.0\n\n double rebp = re.entropy(bp);\n assertEquals(0.8112781244591328, rebp, TOLERANCE);\n System.out.println(\"H(bp) = \" + rebp); //Should be 0.8112781244591328\n\n double recp = re.entropy(cp);\n assertEquals(1.0, recp, TOLERANCE);\n System.out.println(\"H(cp) = \" + recp); //Should be 1.0\n\n double reapa = re.jointEntropy(ap, a);\n assertEquals(2.0, reapa, TOLERANCE);\n System.out.println(\"H(ap, a) = \" + reapa); //Should be 2.0\n\n double rebpb = re.jointEntropy(bp, b);\n assertEquals(1.8112781244591327, rebpb, TOLERANCE);\n System.out.println(\n \"H(bp, b) = \" + rebpb); //Should be 1.8112781244591327\n\n double recpb = re.jointEntropy(cp, b);\n assertEquals(1.8112781244591327, recpb, TOLERANCE);\n System.out.println(\n \"H(cp, b) = \" + recpb); //Should be 1.8112781244591327\n\n int[][] ab = new int[2][8];\n for (int i = 0; i < 8; i++) {\n ab[0][i] = a[i];\n ab[1][i] = b[i];\n }\n\n double rebpab = re.jointEntropy(bp, ab);\n assertEquals(2.5, rebpab, TOLERANCE);\n System.out.println(\"H(bp, a, b) = \" + rebpab); //Should be 2.5\n\n double recpab = re.jointEntropy(cp, ab);\n assertEquals(2.5, recpab, TOLERANCE);\n System.out.println(\"H(cp, a, b) = \" + recpab); //Should be 2.5\n\n int[][] abc = new int[3][8];\n for (int i = 0; i < 8; i++) {\n abc[0][i] = a[i];\n abc[1][i] = b[i];\n abc[2][i] = c[i];\n }\n\n double recpabc = re.jointEntropy(cp, abc);\n assertEquals(3.0, recpabc, TOLERANCE);\n System.out.println(\"H(cp, a, b, c) = \" + recpabc); //Should be 3.0\n\n //Setup array cases and test mutualInformation\n int[] p = new int[1];\n p[0] = 0;\n\n double rembpa = re.mutualInformation(4, p, 1);\n assertEquals(0.31127812445913294, rembpa, TOLERANCE);\n System.out.println(\n \"M(Bp, A) = \" + rembpa); //Should be 0.31127812445913294\n\n int[] pp = new int[2];\n pp[0] = 0;\n pp[1] = 1;\n\n double rmcpab = re.mutualInformation(5, pp, 1);\n assertEquals(0.5, rmcpab, TOLERANCE);\n System.out.println(\"M(Cp, [A,B]) = \" + rmcpab); //Should be 0.5\n\n int[] ppp = new int[3];\n ppp[0] = 0;\n ppp[1] = 1;\n ppp[2] = 2;\n\n double rmcpabc = re.mutualInformation(5, ppp, 1);\n assertEquals(1.0, rmcpabc, TOLERANCE);\n System.out.println(\"M(Cp, [A,B,C]) = \" + rmcpabc); //Should be 1.0\n\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR7() {\n CuteNetlibCase.doTest(\"SCAGR7.SIF\", \"-2331389.8243309837\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toCumulativeMarginDistributionString();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(\" -1 0 \\n\", string0);\n }", "@Test\n @Tag(\"slow\")\n public void testKEN_07() {\n CuteNetlibCase.doTest(\"KEN-07.SIF\", \"-6.795204433816869E8\", \"-1.61949281194431E8\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR25() {\n CuteNetlibCase.doTest(\"SCAGR25.SIF\", \"-1.475343306076852E7\", null, NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testCZPROB() {\n CuteNetlibCase.doTest(\"CZPROB.SIF\", \"2185196.6988565763\", \"3089066.71321333\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n Discretize discretize0 = new Discretize(\"*W5D<hSCW|8@I\");\n int[] intArray0 = new int[9];\n intArray0[0] = (-1405);\n intArray0[1] = (-2938);\n intArray0[2] = (-1954);\n intArray0[3] = 9;\n intArray0[4] = 66;\n intArray0[5] = 573;\n intArray0[6] = 0;\n intArray0[7] = (-71);\n intArray0[8] = 99;\n discretize0.setAttributeIndicesArray(intArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(Double.NaN);\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }", "@Test(timeout = 4000)\n public void test088() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBRelativeInformation();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_14() {\n CuteNetlibCase.doTest(\"OSA-14.SIF\", \"1106462.8447362552\", \"9377699.405100001\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCRE_A() {\n CuteNetlibCase.doTest(\"CRE-A.SIF\", \"2.9889732905677114E7\", \"2.9889732905677114E7\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testSCRS8() {\n CuteNetlibCase.doTest(\"SCRS8.SIF\", \"960.0206152764557\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n discretize0.m_UseEqualFrequency = true;\n discretize0.getOptions();\n assertTrue(discretize0.getMakeBinary());\n \n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getBinRangesString(2607);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize(\"\\tInvert matching sense of column indexes.\");\n discretize0.setOutputFormat();\n discretize0.listOptions();\n Discretize discretize1 = new Discretize();\n discretize1.setIgnoreClass(false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\\tInvert matching sense of column indexes.\";\n stringArray0[1] = \"\";\n Discretize.main(stringArray0);\n String string0 = discretize1.findNumBinsTipText();\n assertEquals(\"Optimize number of equal-width bins using leave-one-out. Doesn't work for equal-frequency binning\", string0);\n \n discretize1.setInvertSelection(false);\n discretize0.getBinRangesString(511);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n \n discretize1.getFindNumBins();\n assertEquals(10, discretize1.getBins());\n }", "@Test\n public void test14() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testKEN_13() {\n CuteNetlibCase.doTest(\"KEN-13.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize(\"'B1of2'\");\n int[] intArray0 = new int[8];\n intArray0[0] = 18;\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"'B1of2'\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(6, stringArray0.length);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC205() {\n CuteNetlibCase.doTest(\"SC205.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC105() {\n CuteNetlibCase.doTest(\"SC105.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n @Tag(\"unstable\")\n @Tag(\"bm1000\")\n public void testTUFF() {\n CuteNetlibCase.doTest(\"TUFF.SIF\", \"0.29214776509361284\", \"0.8949901867574317\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testKEN_11() {\n CuteNetlibCase.doTest(\"KEN-11.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "public int getCoverage (){\r\n return coverage;\r\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n byte[] byteArray0 = new byte[3];\n byteArray0[0] = (byte)108;\n byteArray0[1] = (byte)27;\n byteArray0[2] = (byte)14;\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n discretize0.setBins((-830));\n discretize0.getOptions();\n assertEquals((-830), discretize0.getBins());\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testOSA_60() {\n CuteNetlibCase.doTest(\"OSA-60.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(0.95);\n assertNotNull(doubleArray0);\n assertArrayEquals(new double[] {1.0, 0.0}, doubleArray0, 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test\n\tpublic void testGetCounts() {\n\t\tString cellBC = \"ATCAGGGACAGA\";\n\n\t\tint snpPos = 76227022;\n\t\tInterval snpInterval = new Interval(\"HUMAN_1\", snpPos, snpPos, true, \"test\");\n\t\tSampleGenotypeProbabilities result = new SampleGenotypeProbabilities(snpInterval, cellBC);\n\t\tSNPUMIBasePileup p = getPileUpFromFile(cellBC, \"CGGGGCTC\");\n\t\tp.addLocusFunction(LocusFunction.CODING);\n\t\tresult.add(p);\n\t\tresult.add(getPileUpFromFile(cellBC, \"CGCGGGAC\")); // this read doesn't overlap the SNP so it isn't added!\n\t\tresult.add(getPileUpFromFile(cellBC, \"CTGGGCTC\"));\n\t\tresult.add(getPileUpFromFile(cellBC, \"GGAATGTG\"));\n\t\tresult.add(getPileUpFromFile(cellBC, \"GTGCCGTG\"));\n\t\tresult.add(getPileUpFromFile(cellBC, \"TCGCAGAC\"));\n\n\t\t// the code coverage gods are pleased.\n\t\tAssert.assertEquals(result.getCell(), cellBC);\n\t\tAssert.assertEquals(result.getSNPInterval(), snpInterval);\n\n\t\tAssert.assertNotNull(result.toString());\n\n\t\t// get the unfiltered results.\n\t\tObjectCounter<Character> umiCounts = result.getUMIBaseCounts();\n\t\tObjectCounter<Character> umiCountsExpected = new ObjectCounter<>();\n\t\tumiCountsExpected.incrementByCount('A', 2);\n\t\tumiCountsExpected.incrementByCount('G', 3);\n\t\tAssert.assertEquals(umiCounts, umiCountsExpected);\n\n\t\tObjectCounter<Character> readCounts = result.getReadBaseCounts();\n\t\tObjectCounter<Character> readCountsExpected = new ObjectCounter<>();\n\t\treadCountsExpected.incrementByCount('A', 2);\n\t\treadCountsExpected.incrementByCount('G', 5);\n\t\tAssert.assertEquals(readCounts, readCountsExpected);\n\n\t\tSet<LocusFunction> expected = new HashSet<>(Arrays.asList(LocusFunction.CODING));\n\t\tAssert.assertEquals(result.getLocusFunctions(), expected);\n\n\t}", "@Test\n @Tag(\"slow\")\n public void testFIT1P() {\n CuteNetlibCase.doTest(\"FIT1P.SIF\", \"9146.378092420955\", null, NumberContext.of(7, 4));\n }", "@Test\n public void run () {\n\t \n\t System.out.println(\"---------->\");\n\t //System.out.println(md5list.getResult());\n\t //System.out.println(hashsearch.getResult());\n\t \n\t \n\t \n\t // System.out.println(samples.Testing());\n\t //System.out.println(\"getserult: \"+samples.getResult());\n\t \n }", "@Test(timeout = 4000)\n public void test006() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedAreaUnderPRC();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void testCalculateProbability() throws IOException, ParseException, MathException {\n System.out.println(\"calculateProbability\");\n OrganizationsRegister ro = info(\"e\", \"f\");\n String id = \"12\";\n String expResult = \"25,25 %\";\n String result = ro.calculateProbability();\n assertEquals(expResult, result);\n }", "@Test(timeout = 4000)\n public void test18() throws Throwable {\n Discretize discretize0 = new Discretize(\"%\");\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n discretize0.findNumBinsTipText();\n double[][] doubleArray0 = new double[0][7];\n discretize0.m_CutPoints = doubleArray0;\n FileSystemHandling.setPermissions((EvoSuiteFile) null, true, false, true);\n discretize0.setInvertSelection(false);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test020() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\".arff\", true);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\".arff\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }" ]
[ "0.7271951", "0.7151265", "0.6904689", "0.68190014", "0.6773832", "0.67499965", "0.6733397", "0.6728575", "0.6720711", "0.6714496", "0.66991115", "0.6673672", "0.66591424", "0.6657907", "0.66209334", "0.66093224", "0.6587975", "0.6575196", "0.65674126", "0.65630805", "0.6542803", "0.65270144", "0.65228987", "0.64985013", "0.6476842", "0.64562947", "0.6454296", "0.6453097", "0.6409149", "0.63930255", "0.63814807", "0.63775337", "0.6349769", "0.6318831", "0.6315598", "0.63090575", "0.6304655", "0.62978816", "0.62846196", "0.6279157", "0.627027", "0.62617624", "0.6261321", "0.62609607", "0.62588364", "0.6256725", "0.62493557", "0.62489617", "0.6242319", "0.6238524", "0.6232445", "0.6228331", "0.62274396", "0.62239134", "0.62192", "0.621817", "0.6196144", "0.6194425", "0.6189944", "0.6184237", "0.6160424", "0.615694", "0.6149889", "0.6145118", "0.6143264", "0.6137187", "0.61344457", "0.61335003", "0.6120543", "0.6118762", "0.61184883", "0.61151975", "0.6103458", "0.6102438", "0.61018884", "0.6084428", "0.6081839", "0.6070079", "0.60617495", "0.60588914", "0.6057551", "0.6055282", "0.6054056", "0.605367", "0.6046734", "0.60449463", "0.60411376", "0.6013163", "0.60094887", "0.60021615", "0.600031", "0.59827024", "0.597727", "0.59680223", "0.59664917", "0.59633696", "0.59565717", "0.5955985", "0.594946", "0.5940263", "0.5929298" ]
0.0
-1
Test case number: 10 /Coverage entropy=0.9792376509951506
@Test(timeout = 4000) public void test10() throws Throwable { FBProcedureCall fBProcedureCall0 = new FBProcedureCall(); FBProcedureParam fBProcedureParam0 = fBProcedureCall0.addParam(3, "gZbnc2Y!%jU?C2`8"); fBProcedureCall0.addOutputParam(fBProcedureParam0); fBProcedureCall0.getSQL(true); int int0 = 18; fBProcedureCall0.addParam(18, "gZbnc2Y!%jU?C2`8"); fBProcedureCall0.addParam(3, "5"); // Undeclared exception! try { fBProcedureCall0.getSQL(true); fail("Expecting exception: ArrayIndexOutOfBoundsException"); } catch(ArrayIndexOutOfBoundsException e) { // // Array index out of range: 18 // verifyException("java.util.Vector", e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test126() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.totalCost();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.getHeader();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderPRC((-1));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test29() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.pctCorrect();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test40() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, evaluation0.unclassified(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setNumericPriorsFromBuffer();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.avgCost();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n \n evaluation0.useNoPriors();\n assertEquals(Double.NaN, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctIncorrect();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.priorEntropy();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test17() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFPriorEntropy();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanPriorEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertEquals(2, doubleArray0.length);\n assertNotNull(doubleArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(false);\n assertEquals(\"=== Summary ===\\n\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n }", "@Test\n public void test35() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(Double.NaN, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test119() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString((String) null, true);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(\"null\\nTotal Number of Instances 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives((-1436));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString();\n assertEquals(\"=== Detailed Accuracy By Class ===\\n\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.recall((-9));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test33() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, double0, 0.01D);\n }", "@Test\n public void test36() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.incorrect();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(360, (-336.251));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setDiscardPredictions(false);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertFalse(evaluation0.getDiscardPredictions());\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC(17);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC50A() {\n CuteNetlibCase.doTest(\"SC50A.SIF\", \"-64.57507705856449\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test\n public void test16() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.SFSchemeEntropy();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "public void testSummaryStatsPartialLog() {\n\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset98.txt\");\n GcManager gcManager = new GcManager();\n File preprocessedFile = gcManager.preprocess(testFile, null);\n gcManager.store(preprocessedFile, false);\n JvmRun jvmRun = gcManager.getJvmRun(new Jvm(null, null), Constants.DEFAULT_BOTTLENECK_THROUGHPUT_THRESHOLD);\n Assert.assertEquals(\"GC event type count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertEquals(\"GC blocking event count not correct.\", 2, jvmRun.getBlockingEventCount());\n Assert.assertEquals(\"GC pause total not correct.\", 61, jvmRun.getTotalGcPause());\n Assert.assertEquals(\"GC first timestamp not correct.\", 1002192, jvmRun.getFirstGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last timestamp not correct.\", 1002847, jvmRun.getLastGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last duration not correct.\", 41, jvmRun.getLastGcEvent().getDuration());\n Assert.assertEquals(\"Stopped Time event count not correct.\", 6, jvmRun.getStoppedTimeEventCount());\n Assert.assertEquals(\"Stopped time total not correct.\", 1064, jvmRun.getTotalStoppedTime());\n Assert.assertEquals(\"Stopped first timestamp not correct.\", 1000964,\n jvmRun.getFirstStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last timestamp not correct.\", 1003884,\n jvmRun.getLastStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last duration not correct.\", 1000688, jvmRun.getLastStoppedEvent().getDuration());\n Assert.assertEquals(\"JVM first event timestamp not correct.\", 1000964, jvmRun.getFirstEvent().getTimestamp());\n Assert.assertEquals(\"JVM last event timestamp not correct.\", 1003884, jvmRun.getLastEvent().getTimestamp());\n Assert.assertEquals(\"JVM run duration not correct.\", 3920, jvmRun.getJvmRunDuration());\n Assert.assertEquals(\"GC throughput not correct.\", 98, jvmRun.getGcThroughput());\n Assert.assertEquals(\"Stopped time throughput not correct.\", 73, jvmRun.getStoppedTimeThroughput());\n Assert.assertTrue(Analysis.WARN_GC_STOPPED_RATIO + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_GC_STOPPED_RATIO));\n }", "@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.unclassified();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test19() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBInformation();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test18() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test01() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-1459.149165489484), ',');\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"Y#:')*#rI\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numInstances();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n public void test21() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.errorRate();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test30() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertFalse(boolean0);\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.getRevision();\n assertEquals(\"8964\", string0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n public void test15() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCORPION() {\n CuteNetlibCase.doTest(\"SCORPION.SIF\", \"1878.1248227381068\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.toMatrixString(\"getPreBuiltClassifiers\");\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\"\", false);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertFalse(boolean0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n Discretize discretize0 = new Discretize(\"*W5D<hSCW|8@I\");\n int[] intArray0 = new int[9];\n intArray0[0] = (-1405);\n intArray0[1] = (-2938);\n intArray0[2] = (-1954);\n intArray0[3] = 9;\n intArray0[4] = 66;\n intArray0[5] = 573;\n intArray0[6] = 0;\n intArray0[7] = (-71);\n intArray0[8] = 99;\n discretize0.setAttributeIndicesArray(intArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_07() {\n CuteNetlibCase.doTest(\"OSA-07.SIF\", \"535722.517299352\", \"4332086.205299969\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize(\"'B1of2'\");\n int[] intArray0 = new int[8];\n intArray0[0] = 18;\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"'B1of2'\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(6, stringArray0.length);\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1D() {\n CuteNetlibCase.doTest(\"FIT1D.SIF\", \"-9146.378092421019\", \"80453.99999999999\", NumberContext.of(7, 4));\n }", "public void testLiangFigure6() {\n int[] a = {0, 0, 0, 0, 1, 1, 1, 1};\n int[] b = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] c = {0, 1, 0, 1, 0, 1, 0, 1};\n int[] ap = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] bp = {0, 1, 0, 1, 1, 1, 1, 1};\n int[] cp = {0, 0, 0, 1, 0, 1, 1, 1};\n\n for (int i = 0; i < ntimes - 1; i++) {\n cases[i][0] = a[i];\n cases[i][1] = b[i];\n cases[i][2] = c[i];\n cases[i + 1][3] = ap[i];\n cases[i + 1][4] = bp[i];\n cases[i + 1][5] = cp[i];\n }\n cases[8][0] = 0;\n cases[8][1] = 0;\n cases[8][2] = 0;\n cases[0][3] = 0;\n cases[0][4] = 0;\n cases[0][5] = 0;\n\n RevealEvaluator re = new RevealEvaluator(cases);\n\n double rea = re.entropy(a);\n assertEquals(1.0, rea, TOLERANCE);\n System.out.println(\"H(a) = \" + rea); //Should be 1.0\n\n double reb = re.entropy(b);\n assertEquals(1.0, reb, TOLERANCE);\n System.out.println(\"H(b) = \" + reb); //Should be 1.0\n\n double rec = re.entropy(c);\n assertEquals(1.0, rec, TOLERANCE);\n System.out.println(\"H(c) = \" + rec); //Should be 1.0\n\n double reab = re.jointEntropy(a, b);\n assertEquals(2.0, reab, TOLERANCE);\n System.out.println(\"H(a,b) = \" + reab); //Should be 2.0\n\n double reap = re.entropy(ap);\n assertEquals(1.0, reap, TOLERANCE);\n System.out.println(\"H(ap) = \" + reap); //Should be 1.0\n\n double rebp = re.entropy(bp);\n assertEquals(0.8112781244591328, rebp, TOLERANCE);\n System.out.println(\"H(bp) = \" + rebp); //Should be 0.8112781244591328\n\n double recp = re.entropy(cp);\n assertEquals(1.0, recp, TOLERANCE);\n System.out.println(\"H(cp) = \" + recp); //Should be 1.0\n\n double reapa = re.jointEntropy(ap, a);\n assertEquals(2.0, reapa, TOLERANCE);\n System.out.println(\"H(ap, a) = \" + reapa); //Should be 2.0\n\n double rebpb = re.jointEntropy(bp, b);\n assertEquals(1.8112781244591327, rebpb, TOLERANCE);\n System.out.println(\n \"H(bp, b) = \" + rebpb); //Should be 1.8112781244591327\n\n double recpb = re.jointEntropy(cp, b);\n assertEquals(1.8112781244591327, recpb, TOLERANCE);\n System.out.println(\n \"H(cp, b) = \" + recpb); //Should be 1.8112781244591327\n\n int[][] ab = new int[2][8];\n for (int i = 0; i < 8; i++) {\n ab[0][i] = a[i];\n ab[1][i] = b[i];\n }\n\n double rebpab = re.jointEntropy(bp, ab);\n assertEquals(2.5, rebpab, TOLERANCE);\n System.out.println(\"H(bp, a, b) = \" + rebpab); //Should be 2.5\n\n double recpab = re.jointEntropy(cp, ab);\n assertEquals(2.5, recpab, TOLERANCE);\n System.out.println(\"H(cp, a, b) = \" + recpab); //Should be 2.5\n\n int[][] abc = new int[3][8];\n for (int i = 0; i < 8; i++) {\n abc[0][i] = a[i];\n abc[1][i] = b[i];\n abc[2][i] = c[i];\n }\n\n double recpabc = re.jointEntropy(cp, abc);\n assertEquals(3.0, recpabc, TOLERANCE);\n System.out.println(\"H(cp, a, b, c) = \" + recpabc); //Should be 3.0\n\n //Setup array cases and test mutualInformation\n int[] p = new int[1];\n p[0] = 0;\n\n double rembpa = re.mutualInformation(4, p, 1);\n assertEquals(0.31127812445913294, rembpa, TOLERANCE);\n System.out.println(\n \"M(Bp, A) = \" + rembpa); //Should be 0.31127812445913294\n\n int[] pp = new int[2];\n pp[0] = 0;\n pp[1] = 1;\n\n double rmcpab = re.mutualInformation(5, pp, 1);\n assertEquals(0.5, rmcpab, TOLERANCE);\n System.out.println(\"M(Cp, [A,B]) = \" + rmcpab); //Should be 0.5\n\n int[] ppp = new int[3];\n ppp[0] = 0;\n ppp[1] = 1;\n ppp[2] = 2;\n\n double rmcpabc = re.mutualInformation(5, ppp, 1);\n assertEquals(1.0, rmcpabc, TOLERANCE);\n System.out.println(\"M(Cp, [A,B,C]) = \" + rmcpabc); //Should be 1.0\n\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test13() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getBinRangesString(2607);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(0.0, Double.NaN);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR7() {\n CuteNetlibCase.doTest(\"SCAGR7.SIF\", \"-2331389.8243309837\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toCumulativeMarginDistributionString();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(\" -1 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(Double.NaN);\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR25() {\n CuteNetlibCase.doTest(\"SCAGR25.SIF\", \"-1.475343306076852E7\", null, NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCRE_A() {\n CuteNetlibCase.doTest(\"CRE-A.SIF\", \"2.9889732905677114E7\", \"2.9889732905677114E7\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test088() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBRelativeInformation();\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testCZPROB() {\n CuteNetlibCase.doTest(\"CZPROB.SIF\", \"2185196.6988565763\", \"3089066.71321333\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_14() {\n CuteNetlibCase.doTest(\"OSA-14.SIF\", \"1106462.8447362552\", \"9377699.405100001\", NumberContext.of(7, 4));\n }", "@Test\n public void test14() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test\n @Tag(\"slow\")\n public void testKEN_07() {\n CuteNetlibCase.doTest(\"KEN-07.SIF\", \"-6.795204433816869E8\", \"-1.61949281194431E8\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test10() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getUseBinNumbers());\n \n Discretize discretize1 = new Discretize();\n discretize0.m_UseBinNumbers = true;\n discretize0.makeBinaryTipText();\n discretize0.getCapabilities();\n String string0 = discretize0.getAttributeIndices();\n assertEquals(\"first-last\", string0);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize(\"\\tInvert matching sense of column indexes.\");\n discretize0.setOutputFormat();\n discretize0.listOptions();\n Discretize discretize1 = new Discretize();\n discretize1.setIgnoreClass(false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\\tInvert matching sense of column indexes.\";\n stringArray0[1] = \"\";\n Discretize.main(stringArray0);\n String string0 = discretize1.findNumBinsTipText();\n assertEquals(\"Optimize number of equal-width bins using leave-one-out. Doesn't work for equal-frequency binning\", string0);\n \n discretize1.setInvertSelection(false);\n discretize0.getBinRangesString(511);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n \n discretize1.getFindNumBins();\n assertEquals(10, discretize1.getBins());\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC205() {\n CuteNetlibCase.doTest(\"SC205.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test040() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.falseNegativeRate((-2));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testSCRS8() {\n CuteNetlibCase.doTest(\"SCRS8.SIF\", \"960.0206152764557\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n discretize0.m_UseEqualFrequency = true;\n discretize0.getOptions();\n assertTrue(discretize0.getMakeBinary());\n \n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC105() {\n CuteNetlibCase.doTest(\"SC105.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"unstable\")\n @Tag(\"bm1000\")\n public void testTUFF() {\n CuteNetlibCase.doTest(\"TUFF.SIF\", \"0.29214776509361284\", \"0.8949901867574317\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test020() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\".arff\", true);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\".arff\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n Attribute attribute0 = new Attribute(\"invalid CVS revision - not dots!\");\n attribute0.setWeight(0.0);\n Attribute.typeToString(attribute0);\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"UR<dj;O\", arrayList0, 3);\n Instances instances1 = new Instances(instances0);\n boolean boolean0 = discretize0.setInputFormat(instances1);\n assertFalse(boolean0);\n \n String[] stringArray0 = new String[3];\n stringArray0[0] = \".bsi\";\n stringArray0[1] = \"invalid CVS revision - not dots!\";\n stringArray0[2] = \"@end\";\n discretize0.setOptions(stringArray0);\n discretize0.setOptions(stringArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n byte[] byteArray0 = new byte[3];\n byteArray0[0] = (byte)108;\n byteArray0[1] = (byte)27;\n byteArray0[2] = (byte)14;\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n discretize0.setBins((-830));\n discretize0.getOptions();\n assertEquals((-830), discretize0.getBins());\n }", "@Test\n public void run () {\n\t \n\t System.out.println(\"---------->\");\n\t //System.out.println(md5list.getResult());\n\t //System.out.println(hashsearch.getResult());\n\t \n\t \n\t \n\t // System.out.println(samples.Testing());\n\t //System.out.println(\"getserult: \"+samples.getResult());\n\t \n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(0.95);\n assertNotNull(doubleArray0);\n assertArrayEquals(new double[] {1.0, 0.0}, doubleArray0, 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test15() throws Throwable {\n Discretize discretize0 = new Discretize(\"\");\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(4, stringArray0.length);\n }", "@Test(timeout = 4000)\n public void test049() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC((-1));\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testOSA_60() {\n CuteNetlibCase.doTest(\"OSA-60.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testKEN_13() {\n CuteNetlibCase.doTest(\"KEN-13.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test006() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedAreaUnderPRC();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test16() throws Throwable {\n Discretize discretize0 = new Discretize();\n String[] stringArray0 = discretize0.getOptions();\n discretize0.setOptions(stringArray0);\n assertEquals(6, stringArray0.length);\n \n String string0 = discretize0.globalInfo();\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"An instance filter that discretizes a range of numeric attributes in the dataset into nominal attributes. Discretization is by simple binning. Skips the class attribute if set.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }" ]
[ "0.73620105", "0.72327805", "0.7013115", "0.69190717", "0.691176", "0.69003046", "0.6888397", "0.68306464", "0.68105716", "0.67892057", "0.6785361", "0.67778575", "0.6744679", "0.67107564", "0.66951853", "0.66720545", "0.6649133", "0.662893", "0.66106117", "0.6607842", "0.660128", "0.6587393", "0.65152913", "0.65150154", "0.65106654", "0.65009785", "0.6495631", "0.6489343", "0.6480375", "0.6452032", "0.64250374", "0.6419654", "0.64193636", "0.6416744", "0.64122367", "0.63994485", "0.6367839", "0.636166", "0.63609487", "0.6353458", "0.63513064", "0.63491774", "0.634911", "0.63480955", "0.6346162", "0.63448626", "0.63296163", "0.632815", "0.63275534", "0.6319726", "0.6317653", "0.6315231", "0.6312103", "0.6309538", "0.6307952", "0.6305553", "0.6303775", "0.62845665", "0.62620074", "0.62551135", "0.62481874", "0.6246314", "0.6234749", "0.6230339", "0.62281257", "0.62178516", "0.62171376", "0.6210015", "0.61947095", "0.61904496", "0.6188899", "0.6185775", "0.6171784", "0.61662227", "0.61639464", "0.6163878", "0.6160803", "0.6144959", "0.61293155", "0.612735", "0.6125283", "0.61252743", "0.6112866", "0.6111328", "0.6101209", "0.6098292", "0.60981005", "0.6093875", "0.60785663", "0.60753965", "0.6069708", "0.6069203", "0.6066579", "0.6060704", "0.60512394", "0.6049326", "0.6046186", "0.60461855", "0.6029569", "0.60295343", "0.60197926" ]
0.0
-1
Test case number: 11 /Coverage entropy=1.8222296990758422
@Test(timeout = 4000) public void test11() throws Throwable { FBProcedureCall fBProcedureCall0 = new FBProcedureCall(); FBProcedureParam fBProcedureParam0 = fBProcedureCall0.addParam(3, "gZ'bnc2Y!%jU?C2`8"); fBProcedureCall0.addOutputParam(fBProcedureParam0); fBProcedureCall0.getSQL(true); fBProcedureParam0.setValue("SELECT * FROM null(gZ'bnc2Y!%jU?C2`8)"); FBProcedureParam fBProcedureParam1 = fBProcedureCall0.addParam(3, "SELECT * FROM null(gZ'bnc2Y!%jU?C2`8)"); Object object0 = new Object(); fBProcedureParam1.setValue(object0); fBProcedureParam0.setIndex((-2196)); fBProcedureParam1.setIndex((-2196)); fBProcedureParam0.setIndex((-3845)); fBProcedureParam1.setIndex(3); fBProcedureParam0.setType((-2448)); fBProcedureParam0.setIndex((-2196)); fBProcedureParam0.setIndex(1238); fBProcedureParam1.setIndex((-2196)); fBProcedureCall0.registerOutParam(1238, (-4177984)); Object object1 = new Object(); fBProcedureCall0.addOutputParam(fBProcedureParam0); fBProcedureParam0.setIndex((-2954)); assertEquals((-4177984), fBProcedureParam0.getType()); fBProcedureParam1.setIndex((-4177984)); FBProcedureParam fBProcedureParam2 = new FBProcedureParam(); fBProcedureParam2.setIndex((-1441)); FBProcedureParam fBProcedureParam3 = fBProcedureCall0.getOutputParam((-2954)); assertEquals((-4177984), fBProcedureParam3.getType()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test126() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.totalCost();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.getHeader();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test29() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.pctCorrect();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test40() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, evaluation0.unclassified(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderPRC((-1));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setNumericPriorsFromBuffer();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.avgCost();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n \n evaluation0.useNoPriors();\n assertEquals(Double.NaN, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.priorEntropy();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test17() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFPriorEntropy();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctIncorrect();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertEquals(2, doubleArray0.length);\n assertNotNull(doubleArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(false);\n assertEquals(\"=== Summary ===\\n\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanPriorEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test119() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString((String) null, true);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(\"null\\nTotal Number of Instances 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives((-1436));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test35() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(Double.NaN, double0, 0.01D);\n }", "@Test\n public void test33() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString();\n assertEquals(\"=== Detailed Accuracy By Class ===\\n\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test36() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.incorrect();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test16() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.SFSchemeEntropy();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(360, (-336.251));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.recall((-9));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"Y#:')*#rI\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numInstances();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.unclassified();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "public void testSummaryStatsPartialLog() {\n\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset98.txt\");\n GcManager gcManager = new GcManager();\n File preprocessedFile = gcManager.preprocess(testFile, null);\n gcManager.store(preprocessedFile, false);\n JvmRun jvmRun = gcManager.getJvmRun(new Jvm(null, null), Constants.DEFAULT_BOTTLENECK_THROUGHPUT_THRESHOLD);\n Assert.assertEquals(\"GC event type count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertEquals(\"GC blocking event count not correct.\", 2, jvmRun.getBlockingEventCount());\n Assert.assertEquals(\"GC pause total not correct.\", 61, jvmRun.getTotalGcPause());\n Assert.assertEquals(\"GC first timestamp not correct.\", 1002192, jvmRun.getFirstGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last timestamp not correct.\", 1002847, jvmRun.getLastGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last duration not correct.\", 41, jvmRun.getLastGcEvent().getDuration());\n Assert.assertEquals(\"Stopped Time event count not correct.\", 6, jvmRun.getStoppedTimeEventCount());\n Assert.assertEquals(\"Stopped time total not correct.\", 1064, jvmRun.getTotalStoppedTime());\n Assert.assertEquals(\"Stopped first timestamp not correct.\", 1000964,\n jvmRun.getFirstStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last timestamp not correct.\", 1003884,\n jvmRun.getLastStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last duration not correct.\", 1000688, jvmRun.getLastStoppedEvent().getDuration());\n Assert.assertEquals(\"JVM first event timestamp not correct.\", 1000964, jvmRun.getFirstEvent().getTimestamp());\n Assert.assertEquals(\"JVM last event timestamp not correct.\", 1003884, jvmRun.getLastEvent().getTimestamp());\n Assert.assertEquals(\"JVM run duration not correct.\", 3920, jvmRun.getJvmRunDuration());\n Assert.assertEquals(\"GC throughput not correct.\", 98, jvmRun.getGcThroughput());\n Assert.assertEquals(\"Stopped time throughput not correct.\", 73, jvmRun.getStoppedTimeThroughput());\n Assert.assertTrue(Analysis.WARN_GC_STOPPED_RATIO + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_GC_STOPPED_RATIO));\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test15() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC50A() {\n CuteNetlibCase.doTest(\"SC50A.SIF\", \"-64.57507705856449\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setDiscardPredictions(false);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertFalse(evaluation0.getDiscardPredictions());\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.toMatrixString(\"getPreBuiltClassifiers\");\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test21() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.errorRate();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test19() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBInformation();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test01() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-1459.149165489484), ',');\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test18() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\"\", false);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test13() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC(17);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_07() {\n CuteNetlibCase.doTest(\"OSA-07.SIF\", \"535722.517299352\", \"4332086.205299969\", NumberContext.of(7, 4));\n }", "@Test\n public void test30() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertFalse(boolean0);\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCORPION() {\n CuteNetlibCase.doTest(\"SCORPION.SIF\", \"1878.1248227381068\", null, NumberContext.of(7, 4));\n }", "public void testLiangFigure6() {\n int[] a = {0, 0, 0, 0, 1, 1, 1, 1};\n int[] b = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] c = {0, 1, 0, 1, 0, 1, 0, 1};\n int[] ap = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] bp = {0, 1, 0, 1, 1, 1, 1, 1};\n int[] cp = {0, 0, 0, 1, 0, 1, 1, 1};\n\n for (int i = 0; i < ntimes - 1; i++) {\n cases[i][0] = a[i];\n cases[i][1] = b[i];\n cases[i][2] = c[i];\n cases[i + 1][3] = ap[i];\n cases[i + 1][4] = bp[i];\n cases[i + 1][5] = cp[i];\n }\n cases[8][0] = 0;\n cases[8][1] = 0;\n cases[8][2] = 0;\n cases[0][3] = 0;\n cases[0][4] = 0;\n cases[0][5] = 0;\n\n RevealEvaluator re = new RevealEvaluator(cases);\n\n double rea = re.entropy(a);\n assertEquals(1.0, rea, TOLERANCE);\n System.out.println(\"H(a) = \" + rea); //Should be 1.0\n\n double reb = re.entropy(b);\n assertEquals(1.0, reb, TOLERANCE);\n System.out.println(\"H(b) = \" + reb); //Should be 1.0\n\n double rec = re.entropy(c);\n assertEquals(1.0, rec, TOLERANCE);\n System.out.println(\"H(c) = \" + rec); //Should be 1.0\n\n double reab = re.jointEntropy(a, b);\n assertEquals(2.0, reab, TOLERANCE);\n System.out.println(\"H(a,b) = \" + reab); //Should be 2.0\n\n double reap = re.entropy(ap);\n assertEquals(1.0, reap, TOLERANCE);\n System.out.println(\"H(ap) = \" + reap); //Should be 1.0\n\n double rebp = re.entropy(bp);\n assertEquals(0.8112781244591328, rebp, TOLERANCE);\n System.out.println(\"H(bp) = \" + rebp); //Should be 0.8112781244591328\n\n double recp = re.entropy(cp);\n assertEquals(1.0, recp, TOLERANCE);\n System.out.println(\"H(cp) = \" + recp); //Should be 1.0\n\n double reapa = re.jointEntropy(ap, a);\n assertEquals(2.0, reapa, TOLERANCE);\n System.out.println(\"H(ap, a) = \" + reapa); //Should be 2.0\n\n double rebpb = re.jointEntropy(bp, b);\n assertEquals(1.8112781244591327, rebpb, TOLERANCE);\n System.out.println(\n \"H(bp, b) = \" + rebpb); //Should be 1.8112781244591327\n\n double recpb = re.jointEntropy(cp, b);\n assertEquals(1.8112781244591327, recpb, TOLERANCE);\n System.out.println(\n \"H(cp, b) = \" + recpb); //Should be 1.8112781244591327\n\n int[][] ab = new int[2][8];\n for (int i = 0; i < 8; i++) {\n ab[0][i] = a[i];\n ab[1][i] = b[i];\n }\n\n double rebpab = re.jointEntropy(bp, ab);\n assertEquals(2.5, rebpab, TOLERANCE);\n System.out.println(\"H(bp, a, b) = \" + rebpab); //Should be 2.5\n\n double recpab = re.jointEntropy(cp, ab);\n assertEquals(2.5, recpab, TOLERANCE);\n System.out.println(\"H(cp, a, b) = \" + recpab); //Should be 2.5\n\n int[][] abc = new int[3][8];\n for (int i = 0; i < 8; i++) {\n abc[0][i] = a[i];\n abc[1][i] = b[i];\n abc[2][i] = c[i];\n }\n\n double recpabc = re.jointEntropy(cp, abc);\n assertEquals(3.0, recpabc, TOLERANCE);\n System.out.println(\"H(cp, a, b, c) = \" + recpabc); //Should be 3.0\n\n //Setup array cases and test mutualInformation\n int[] p = new int[1];\n p[0] = 0;\n\n double rembpa = re.mutualInformation(4, p, 1);\n assertEquals(0.31127812445913294, rembpa, TOLERANCE);\n System.out.println(\n \"M(Bp, A) = \" + rembpa); //Should be 0.31127812445913294\n\n int[] pp = new int[2];\n pp[0] = 0;\n pp[1] = 1;\n\n double rmcpab = re.mutualInformation(5, pp, 1);\n assertEquals(0.5, rmcpab, TOLERANCE);\n System.out.println(\"M(Cp, [A,B]) = \" + rmcpab); //Should be 0.5\n\n int[] ppp = new int[3];\n ppp[0] = 0;\n ppp[1] = 1;\n ppp[2] = 2;\n\n double rmcpabc = re.mutualInformation(5, ppp, 1);\n assertEquals(1.0, rmcpabc, TOLERANCE);\n System.out.println(\"M(Cp, [A,B,C]) = \" + rmcpabc); //Should be 1.0\n\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.getRevision();\n assertEquals(\"8964\", string0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(0.0, Double.NaN);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertFalse(boolean0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1D() {\n CuteNetlibCase.doTest(\"FIT1D.SIF\", \"-9146.378092421019\", \"80453.99999999999\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_14() {\n CuteNetlibCase.doTest(\"OSA-14.SIF\", \"1106462.8447362552\", \"9377699.405100001\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testKEN_07() {\n CuteNetlibCase.doTest(\"KEN-07.SIF\", \"-6.795204433816869E8\", \"-1.61949281194431E8\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toCumulativeMarginDistributionString();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(\" -1 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR25() {\n CuteNetlibCase.doTest(\"SCAGR25.SIF\", \"-1.475343306076852E7\", null, NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testCZPROB() {\n CuteNetlibCase.doTest(\"CZPROB.SIF\", \"2185196.6988565763\", \"3089066.71321333\", NumberContext.of(7, 4));\n }", "@Test\n public void test14() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCRE_A() {\n CuteNetlibCase.doTest(\"CRE-A.SIF\", \"2.9889732905677114E7\", \"2.9889732905677114E7\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR7() {\n CuteNetlibCase.doTest(\"SCAGR7.SIF\", \"-2331389.8243309837\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize(\"\\tInvert matching sense of column indexes.\");\n discretize0.setOutputFormat();\n discretize0.listOptions();\n Discretize discretize1 = new Discretize();\n discretize1.setIgnoreClass(false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\\tInvert matching sense of column indexes.\";\n stringArray0[1] = \"\";\n Discretize.main(stringArray0);\n String string0 = discretize1.findNumBinsTipText();\n assertEquals(\"Optimize number of equal-width bins using leave-one-out. Doesn't work for equal-frequency binning\", string0);\n \n discretize1.setInvertSelection(false);\n discretize0.getBinRangesString(511);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n \n discretize1.getFindNumBins();\n assertEquals(10, discretize1.getBins());\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getBinRangesString(2607);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(Double.NaN);\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n Discretize discretize0 = new Discretize(\"*W5D<hSCW|8@I\");\n int[] intArray0 = new int[9];\n intArray0[0] = (-1405);\n intArray0[1] = (-2938);\n intArray0[2] = (-1954);\n intArray0[3] = 9;\n intArray0[4] = 66;\n intArray0[5] = 573;\n intArray0[6] = 0;\n intArray0[7] = (-71);\n intArray0[8] = 99;\n discretize0.setAttributeIndicesArray(intArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize(\"'B1of2'\");\n int[] intArray0 = new int[8];\n intArray0[0] = 18;\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"'B1of2'\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(6, stringArray0.length);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testSCRS8() {\n CuteNetlibCase.doTest(\"SCRS8.SIF\", \"960.0206152764557\", null, NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC205() {\n CuteNetlibCase.doTest(\"SC205.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n discretize0.m_UseEqualFrequency = true;\n discretize0.getOptions();\n assertTrue(discretize0.getMakeBinary());\n \n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC105() {\n CuteNetlibCase.doTest(\"SC105.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testKEN_13() {\n CuteNetlibCase.doTest(\"KEN-13.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testOSA_60() {\n CuteNetlibCase.doTest(\"OSA-60.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test088() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBRelativeInformation();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n byte[] byteArray0 = new byte[3];\n byteArray0[0] = (byte)108;\n byteArray0[1] = (byte)27;\n byteArray0[2] = (byte)14;\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n discretize0.setBins((-830));\n discretize0.getOptions();\n assertEquals((-830), discretize0.getBins());\n }", "@Test(timeout = 4000)\n public void test020() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\".arff\", true);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\".arff\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1P() {\n CuteNetlibCase.doTest(\"FIT1P.SIF\", \"9146.378092420955\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(0.95);\n assertNotNull(doubleArray0);\n assertArrayEquals(new double[] {1.0, 0.0}, doubleArray0, 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testKEN_11() {\n CuteNetlibCase.doTest(\"KEN-11.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test\n public void run () {\n\t \n\t System.out.println(\"---------->\");\n\t //System.out.println(md5list.getResult());\n\t //System.out.println(hashsearch.getResult());\n\t \n\t \n\t \n\t // System.out.println(samples.Testing());\n\t //System.out.println(\"getserult: \"+samples.getResult());\n\t \n }", "@Test(timeout = 4000)\n public void test040() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.falseNegativeRate((-2));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"unstable\")\n @Tag(\"bm1000\")\n public void testTUFF() {\n CuteNetlibCase.doTest(\"TUFF.SIF\", \"0.29214776509361284\", \"0.8949901867574317\", NumberContext.of(7, 4));\n }", "@Test\n public void costTest() {\n // TODO: test cost\n }", "@Test\n public void testCalculateProbability() throws IOException, ParseException, MathException {\n System.out.println(\"calculateProbability\");\n OrganizationsRegister ro = info(\"e\", \"f\");\n String id = \"12\";\n String expResult = \"25,25 %\";\n String result = ro.calculateProbability();\n assertEquals(expResult, result);\n }", "@Test\n\tpublic void testGetCounts() {\n\t\tString cellBC = \"ATCAGGGACAGA\";\n\n\t\tint snpPos = 76227022;\n\t\tInterval snpInterval = new Interval(\"HUMAN_1\", snpPos, snpPos, true, \"test\");\n\t\tSampleGenotypeProbabilities result = new SampleGenotypeProbabilities(snpInterval, cellBC);\n\t\tSNPUMIBasePileup p = getPileUpFromFile(cellBC, \"CGGGGCTC\");\n\t\tp.addLocusFunction(LocusFunction.CODING);\n\t\tresult.add(p);\n\t\tresult.add(getPileUpFromFile(cellBC, \"CGCGGGAC\")); // this read doesn't overlap the SNP so it isn't added!\n\t\tresult.add(getPileUpFromFile(cellBC, \"CTGGGCTC\"));\n\t\tresult.add(getPileUpFromFile(cellBC, \"GGAATGTG\"));\n\t\tresult.add(getPileUpFromFile(cellBC, \"GTGCCGTG\"));\n\t\tresult.add(getPileUpFromFile(cellBC, \"TCGCAGAC\"));\n\n\t\t// the code coverage gods are pleased.\n\t\tAssert.assertEquals(result.getCell(), cellBC);\n\t\tAssert.assertEquals(result.getSNPInterval(), snpInterval);\n\n\t\tAssert.assertNotNull(result.toString());\n\n\t\t// get the unfiltered results.\n\t\tObjectCounter<Character> umiCounts = result.getUMIBaseCounts();\n\t\tObjectCounter<Character> umiCountsExpected = new ObjectCounter<>();\n\t\tumiCountsExpected.incrementByCount('A', 2);\n\t\tumiCountsExpected.incrementByCount('G', 3);\n\t\tAssert.assertEquals(umiCounts, umiCountsExpected);\n\n\t\tObjectCounter<Character> readCounts = result.getReadBaseCounts();\n\t\tObjectCounter<Character> readCountsExpected = new ObjectCounter<>();\n\t\treadCountsExpected.incrementByCount('A', 2);\n\t\treadCountsExpected.incrementByCount('G', 5);\n\t\tAssert.assertEquals(readCounts, readCountsExpected);\n\n\t\tSet<LocusFunction> expected = new HashSet<>(Arrays.asList(LocusFunction.CODING));\n\t\tAssert.assertEquals(result.getLocusFunctions(), expected);\n\n\t}", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n Attribute attribute0 = new Attribute(\"invalid CVS revision - not dots!\");\n attribute0.setWeight(0.0);\n Attribute.typeToString(attribute0);\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"UR<dj;O\", arrayList0, 3);\n Instances instances1 = new Instances(instances0);\n boolean boolean0 = discretize0.setInputFormat(instances1);\n assertFalse(boolean0);\n \n String[] stringArray0 = new String[3];\n stringArray0[0] = \".bsi\";\n stringArray0[1] = \"invalid CVS revision - not dots!\";\n stringArray0[2] = \"@end\";\n discretize0.setOptions(stringArray0);\n discretize0.setOptions(stringArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n }" ]
[ "0.72874135", "0.7195678", "0.68919253", "0.6833441", "0.6829216", "0.6824316", "0.6813987", "0.6739156", "0.6730513", "0.6724696", "0.6714322", "0.67143154", "0.6686991", "0.66310585", "0.66291857", "0.6622091", "0.6619624", "0.66022927", "0.66022646", "0.6571491", "0.6564201", "0.6542017", "0.6509555", "0.65082294", "0.64882904", "0.6464738", "0.64523476", "0.6407711", "0.63917893", "0.6383492", "0.6350656", "0.6342523", "0.6339915", "0.6338227", "0.63303655", "0.630733", "0.6306026", "0.630584", "0.630522", "0.63051915", "0.63028556", "0.6294706", "0.62908", "0.6285818", "0.62735695", "0.6254806", "0.6253654", "0.6251448", "0.62498", "0.6249173", "0.62471336", "0.62467307", "0.6246088", "0.623918", "0.62362266", "0.62319547", "0.62066233", "0.6204", "0.6200734", "0.6186004", "0.61817217", "0.61685157", "0.6151243", "0.6138549", "0.6136355", "0.6122791", "0.61162007", "0.6115697", "0.6114324", "0.6108415", "0.6102066", "0.60973173", "0.6089786", "0.60813135", "0.60731566", "0.6068398", "0.6061239", "0.6060697", "0.6048768", "0.6044144", "0.6042789", "0.6036373", "0.60194886", "0.60097486", "0.60096955", "0.6007481", "0.60000503", "0.59936243", "0.5987598", "0.59803945", "0.597993", "0.59734935", "0.5965024", "0.59612745", "0.59517974", "0.5941749", "0.59361356", "0.5921359", "0.59149253", "0.59109986", "0.59082556" ]
0.0
-1
Test case number: 12 /Coverage entropy=1.7910409801239002
@Test(timeout = 4000) public void test12() throws Throwable { FBProcedureCall fBProcedureCall0 = new FBProcedureCall(); FBProcedureParam fBProcedureParam0 = new FBProcedureParam(); fBProcedureCall0.getInputParam(887); int int0 = (-529); fBProcedureParam0.setType((-342)); fBProcedureParam0.setIndex((-342)); fBProcedureCall0.addOutputParam(fBProcedureParam0); fBProcedureParam0.clone(); fBProcedureParam0.setType((-529)); fBProcedureCall0.addOutputParam(fBProcedureParam0); fBProcedureParam0.setType((-342)); fBProcedureCall0.getOutputParams(); fBProcedureCall0.addOutputParam(fBProcedureParam0); fBProcedureCall0.getOutputParams(); fBProcedureCall0.clone(); int int1 = (-2815); fBProcedureParam0.setIndex((-2322)); fBProcedureCall0.addInputParam(fBProcedureParam0); // Undeclared exception! try { fBProcedureCall0.registerOutParam((-2815), 0); fail("Expecting exception: ArrayIndexOutOfBoundsException"); } catch(ArrayIndexOutOfBoundsException e) { // // -2816 // verifyException("java.util.Vector", e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test126() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.totalCost();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.getHeader();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test29() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.pctCorrect();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctIncorrect();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.priorEntropy();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderPRC((-1));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test40() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, evaluation0.unclassified(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.avgCost();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test119() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString((String) null, true);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(\"null\\nTotal Number of Instances 0 \\n\", string0);\n }", "@Test\n public void test17() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFPriorEntropy();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n \n evaluation0.useNoPriors();\n assertEquals(Double.NaN, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanPriorEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setNumericPriorsFromBuffer();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(false);\n assertEquals(\"=== Summary ===\\n\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertEquals(2, doubleArray0.length);\n assertNotNull(doubleArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test\n public void test35() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(Double.NaN, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString();\n assertEquals(\"=== Detailed Accuracy By Class ===\\n\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives((-1436));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test36() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.incorrect();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test13() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n public void test33() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.recall((-9));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.getRevision();\n assertEquals(\"8964\", string0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC(17);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"Y#:')*#rI\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numInstances();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC50A() {\n CuteNetlibCase.doTest(\"SC50A.SIF\", \"-64.57507705856449\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }", "public void testSummaryStatsPartialLog() {\n\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset98.txt\");\n GcManager gcManager = new GcManager();\n File preprocessedFile = gcManager.preprocess(testFile, null);\n gcManager.store(preprocessedFile, false);\n JvmRun jvmRun = gcManager.getJvmRun(new Jvm(null, null), Constants.DEFAULT_BOTTLENECK_THROUGHPUT_THRESHOLD);\n Assert.assertEquals(\"GC event type count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertEquals(\"GC blocking event count not correct.\", 2, jvmRun.getBlockingEventCount());\n Assert.assertEquals(\"GC pause total not correct.\", 61, jvmRun.getTotalGcPause());\n Assert.assertEquals(\"GC first timestamp not correct.\", 1002192, jvmRun.getFirstGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last timestamp not correct.\", 1002847, jvmRun.getLastGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last duration not correct.\", 41, jvmRun.getLastGcEvent().getDuration());\n Assert.assertEquals(\"Stopped Time event count not correct.\", 6, jvmRun.getStoppedTimeEventCount());\n Assert.assertEquals(\"Stopped time total not correct.\", 1064, jvmRun.getTotalStoppedTime());\n Assert.assertEquals(\"Stopped first timestamp not correct.\", 1000964,\n jvmRun.getFirstStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last timestamp not correct.\", 1003884,\n jvmRun.getLastStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last duration not correct.\", 1000688, jvmRun.getLastStoppedEvent().getDuration());\n Assert.assertEquals(\"JVM first event timestamp not correct.\", 1000964, jvmRun.getFirstEvent().getTimestamp());\n Assert.assertEquals(\"JVM last event timestamp not correct.\", 1003884, jvmRun.getLastEvent().getTimestamp());\n Assert.assertEquals(\"JVM run duration not correct.\", 3920, jvmRun.getJvmRunDuration());\n Assert.assertEquals(\"GC throughput not correct.\", 98, jvmRun.getGcThroughput());\n Assert.assertEquals(\"Stopped time throughput not correct.\", 73, jvmRun.getStoppedTimeThroughput());\n Assert.assertTrue(Analysis.WARN_GC_STOPPED_RATIO + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_GC_STOPPED_RATIO));\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.unclassified();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test16() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.SFSchemeEntropy();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setDiscardPredictions(false);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertFalse(evaluation0.getDiscardPredictions());\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n public void test15() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(360, (-336.251));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n public void test21() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.errorRate();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test18() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test19() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBInformation();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.toMatrixString(\"getPreBuiltClassifiers\");\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n public void test01() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-1459.149165489484), ',');\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\"\", false);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertFalse(boolean0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1D() {\n CuteNetlibCase.doTest(\"FIT1D.SIF\", \"-9146.378092421019\", \"80453.99999999999\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCORPION() {\n CuteNetlibCase.doTest(\"SCORPION.SIF\", \"1878.1248227381068\", null, NumberContext.of(7, 4));\n }", "@Test\n public void test30() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertFalse(boolean0);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_07() {\n CuteNetlibCase.doTest(\"OSA-07.SIF\", \"535722.517299352\", \"4332086.205299969\", NumberContext.of(7, 4));\n }", "@Test\n public void test14() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toCumulativeMarginDistributionString();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(\" -1 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(Double.NaN);\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "public void testLiangFigure6() {\n int[] a = {0, 0, 0, 0, 1, 1, 1, 1};\n int[] b = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] c = {0, 1, 0, 1, 0, 1, 0, 1};\n int[] ap = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] bp = {0, 1, 0, 1, 1, 1, 1, 1};\n int[] cp = {0, 0, 0, 1, 0, 1, 1, 1};\n\n for (int i = 0; i < ntimes - 1; i++) {\n cases[i][0] = a[i];\n cases[i][1] = b[i];\n cases[i][2] = c[i];\n cases[i + 1][3] = ap[i];\n cases[i + 1][4] = bp[i];\n cases[i + 1][5] = cp[i];\n }\n cases[8][0] = 0;\n cases[8][1] = 0;\n cases[8][2] = 0;\n cases[0][3] = 0;\n cases[0][4] = 0;\n cases[0][5] = 0;\n\n RevealEvaluator re = new RevealEvaluator(cases);\n\n double rea = re.entropy(a);\n assertEquals(1.0, rea, TOLERANCE);\n System.out.println(\"H(a) = \" + rea); //Should be 1.0\n\n double reb = re.entropy(b);\n assertEquals(1.0, reb, TOLERANCE);\n System.out.println(\"H(b) = \" + reb); //Should be 1.0\n\n double rec = re.entropy(c);\n assertEquals(1.0, rec, TOLERANCE);\n System.out.println(\"H(c) = \" + rec); //Should be 1.0\n\n double reab = re.jointEntropy(a, b);\n assertEquals(2.0, reab, TOLERANCE);\n System.out.println(\"H(a,b) = \" + reab); //Should be 2.0\n\n double reap = re.entropy(ap);\n assertEquals(1.0, reap, TOLERANCE);\n System.out.println(\"H(ap) = \" + reap); //Should be 1.0\n\n double rebp = re.entropy(bp);\n assertEquals(0.8112781244591328, rebp, TOLERANCE);\n System.out.println(\"H(bp) = \" + rebp); //Should be 0.8112781244591328\n\n double recp = re.entropy(cp);\n assertEquals(1.0, recp, TOLERANCE);\n System.out.println(\"H(cp) = \" + recp); //Should be 1.0\n\n double reapa = re.jointEntropy(ap, a);\n assertEquals(2.0, reapa, TOLERANCE);\n System.out.println(\"H(ap, a) = \" + reapa); //Should be 2.0\n\n double rebpb = re.jointEntropy(bp, b);\n assertEquals(1.8112781244591327, rebpb, TOLERANCE);\n System.out.println(\n \"H(bp, b) = \" + rebpb); //Should be 1.8112781244591327\n\n double recpb = re.jointEntropy(cp, b);\n assertEquals(1.8112781244591327, recpb, TOLERANCE);\n System.out.println(\n \"H(cp, b) = \" + recpb); //Should be 1.8112781244591327\n\n int[][] ab = new int[2][8];\n for (int i = 0; i < 8; i++) {\n ab[0][i] = a[i];\n ab[1][i] = b[i];\n }\n\n double rebpab = re.jointEntropy(bp, ab);\n assertEquals(2.5, rebpab, TOLERANCE);\n System.out.println(\"H(bp, a, b) = \" + rebpab); //Should be 2.5\n\n double recpab = re.jointEntropy(cp, ab);\n assertEquals(2.5, recpab, TOLERANCE);\n System.out.println(\"H(cp, a, b) = \" + recpab); //Should be 2.5\n\n int[][] abc = new int[3][8];\n for (int i = 0; i < 8; i++) {\n abc[0][i] = a[i];\n abc[1][i] = b[i];\n abc[2][i] = c[i];\n }\n\n double recpabc = re.jointEntropy(cp, abc);\n assertEquals(3.0, recpabc, TOLERANCE);\n System.out.println(\"H(cp, a, b, c) = \" + recpabc); //Should be 3.0\n\n //Setup array cases and test mutualInformation\n int[] p = new int[1];\n p[0] = 0;\n\n double rembpa = re.mutualInformation(4, p, 1);\n assertEquals(0.31127812445913294, rembpa, TOLERANCE);\n System.out.println(\n \"M(Bp, A) = \" + rembpa); //Should be 0.31127812445913294\n\n int[] pp = new int[2];\n pp[0] = 0;\n pp[1] = 1;\n\n double rmcpab = re.mutualInformation(5, pp, 1);\n assertEquals(0.5, rmcpab, TOLERANCE);\n System.out.println(\"M(Cp, [A,B]) = \" + rmcpab); //Should be 0.5\n\n int[] ppp = new int[3];\n ppp[0] = 0;\n ppp[1] = 1;\n ppp[2] = 2;\n\n double rmcpabc = re.mutualInformation(5, ppp, 1);\n assertEquals(1.0, rmcpabc, TOLERANCE);\n System.out.println(\"M(Cp, [A,B,C]) = \" + rmcpabc); //Should be 1.0\n\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_14() {\n CuteNetlibCase.doTest(\"OSA-14.SIF\", \"1106462.8447362552\", \"9377699.405100001\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC205() {\n CuteNetlibCase.doTest(\"SC205.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize(\"\\tInvert matching sense of column indexes.\");\n discretize0.setOutputFormat();\n discretize0.listOptions();\n Discretize discretize1 = new Discretize();\n discretize1.setIgnoreClass(false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\\tInvert matching sense of column indexes.\";\n stringArray0[1] = \"\";\n Discretize.main(stringArray0);\n String string0 = discretize1.findNumBinsTipText();\n assertEquals(\"Optimize number of equal-width bins using leave-one-out. Doesn't work for equal-frequency binning\", string0);\n \n discretize1.setInvertSelection(false);\n discretize0.getBinRangesString(511);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n \n discretize1.getFindNumBins();\n assertEquals(10, discretize1.getBins());\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(0.0, Double.NaN);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC105() {\n CuteNetlibCase.doTest(\"SC105.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR25() {\n CuteNetlibCase.doTest(\"SCAGR25.SIF\", \"-1.475343306076852E7\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test088() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBRelativeInformation();\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR7() {\n CuteNetlibCase.doTest(\"SCAGR7.SIF\", \"-2331389.8243309837\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(0.95);\n assertNotNull(doubleArray0);\n assertArrayEquals(new double[] {1.0, 0.0}, doubleArray0, 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n Discretize discretize0 = new Discretize(\"*W5D<hSCW|8@I\");\n int[] intArray0 = new int[9];\n intArray0[0] = (-1405);\n intArray0[1] = (-2938);\n intArray0[2] = (-1954);\n intArray0[3] = 9;\n intArray0[4] = 66;\n intArray0[5] = 573;\n intArray0[6] = 0;\n intArray0[7] = (-71);\n intArray0[8] = 99;\n discretize0.setAttributeIndicesArray(intArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getBinRangesString(2607);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize(\"'B1of2'\");\n int[] intArray0 = new int[8];\n intArray0[0] = 18;\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"'B1of2'\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(6, stringArray0.length);\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n byte[] byteArray0 = new byte[3];\n byteArray0[0] = (byte)108;\n byteArray0[1] = (byte)27;\n byteArray0[2] = (byte)14;\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n discretize0.setBins((-830));\n discretize0.getOptions();\n assertEquals((-830), discretize0.getBins());\n }", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test006() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedAreaUnderPRC();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testKEN_07() {\n CuteNetlibCase.doTest(\"KEN-07.SIF\", \"-6.795204433816869E8\", \"-1.61949281194431E8\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test020() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\".arff\", true);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\".arff\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test041() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.fMeasure((-2765));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n discretize0.m_UseEqualFrequency = true;\n discretize0.getOptions();\n assertTrue(discretize0.getMakeBinary());\n \n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test(timeout = 4000)\n public void test040() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.falseNegativeRate((-2));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1P() {\n CuteNetlibCase.doTest(\"FIT1P.SIF\", \"9146.378092420955\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test104() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString(\".arff\");\n assertEquals(Double.NaN, evaluation0.unweightedMicroFmeasure(), 0.01);\n assertEquals(\".arff\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\n 0 0 0 0 0 0 ? ? class1\\n 0 0 0 0 0 0 ? ? class2\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test049() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC((-1));\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCSD1() {\n CuteNetlibCase.doTest(\"SCSD1.SIF\", \"8.666666674333367\", null, NumberContext.of(7, 4));\n }", "@Test\n public void testCalculateProbability() throws IOException, ParseException, MathException {\n System.out.println(\"calculateProbability\");\n OrganizationsRegister ro = info(\"e\", \"f\");\n String id = \"12\";\n String expResult = \"25,25 %\";\n String result = ro.calculateProbability();\n assertEquals(expResult, result);\n }", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n Attribute attribute0 = new Attribute(\"invalid CVS revision - not dots!\");\n attribute0.setWeight(0.0);\n Attribute.typeToString(attribute0);\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"UR<dj;O\", arrayList0, 3);\n Instances instances1 = new Instances(instances0);\n boolean boolean0 = discretize0.setInputFormat(instances1);\n assertFalse(boolean0);\n \n String[] stringArray0 = new String[3];\n stringArray0[0] = \".bsi\";\n stringArray0[1] = \"invalid CVS revision - not dots!\";\n stringArray0[2] = \"@end\";\n discretize0.setOptions(stringArray0);\n discretize0.setOptions(stringArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCFXM1() {\n CuteNetlibCase.doTest(\"SCFXM1.SIF\", \"18416.75902834894\", null, NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testDEGEN2() {\n CuteNetlibCase.doTest(\"DEGEN2.SIF\", \"-1435.1779999999999\", \"-1226.12\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCRE_A() {\n CuteNetlibCase.doTest(\"CRE-A.SIF\", \"2.9889732905677114E7\", \"2.9889732905677114E7\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC50B() {\n CuteNetlibCase.doTest(\"SC50B.SIF\", \"-7.0000000000E+01\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testAGG3() {\n CuteNetlibCase.doTest(\"AGG3.SIF\", \"1.031211593508922E7\", \"5.746768863949547E9\", NumberContext.of(7, 4));\n }" ]
[ "0.72363645", "0.7148248", "0.6901195", "0.68331647", "0.6828352", "0.6797595", "0.67913336", "0.6774121", "0.6752768", "0.67386144", "0.67326635", "0.6672143", "0.66714543", "0.66672015", "0.6644832", "0.6627734", "0.6618712", "0.660517", "0.66010255", "0.6586688", "0.65632665", "0.65596783", "0.65502715", "0.6549888", "0.65396523", "0.651696", "0.64600575", "0.6438757", "0.6430983", "0.6424442", "0.6406204", "0.64054847", "0.6403168", "0.64030284", "0.6392667", "0.63843745", "0.6381491", "0.6378532", "0.63603425", "0.63519675", "0.634896", "0.6341016", "0.63371116", "0.63231426", "0.6316808", "0.6307219", "0.63031405", "0.63025975", "0.63018376", "0.6295054", "0.6284118", "0.6273503", "0.6273099", "0.626441", "0.62599576", "0.62470984", "0.62460524", "0.62315184", "0.62161785", "0.62105393", "0.6200427", "0.6197373", "0.6182192", "0.61729217", "0.61695206", "0.61610574", "0.61558604", "0.61486894", "0.6132738", "0.6129648", "0.6128293", "0.6123727", "0.6114827", "0.6113602", "0.6103971", "0.6097038", "0.6096764", "0.6080259", "0.6076066", "0.60586727", "0.60559857", "0.60511374", "0.6049457", "0.6047481", "0.6042575", "0.6025005", "0.600975", "0.60073155", "0.6006163", "0.5985349", "0.59809417", "0.5975222", "0.5971265", "0.5965796", "0.5964707", "0.5949338", "0.5948631", "0.5948245", "0.59453887", "0.59223443", "0.59141856" ]
0.0
-1
Test case number: 13 /Coverage entropy=1.9261846051086646
@Test(timeout = 4000) public void test13() throws Throwable { FBProcedureCall fBProcedureCall0 = new FBProcedureCall(); FBProcedureParam fBProcedureParam0 = fBProcedureCall0.addParam(3, "gZbnc2Y!%jU?C2`8"); fBProcedureCall0.addOutputParam(fBProcedureParam0); FBProcedureCall fBProcedureCall1 = new FBProcedureCall(); fBProcedureCall0.getSQL(true); fBProcedureCall0.getSQL(true); fBProcedureCall1.getOutputParam(3); fBProcedureCall0.getOutputParam(1702); fBProcedureCall0.mapOutParamIndexToPosition((-1552), true); fBProcedureCall0.getSQL(true); FBProcedureCall fBProcedureCall2 = new FBProcedureCall(); FBProcedureCall fBProcedureCall3 = new FBProcedureCall(); FBProcedureCall fBProcedureCall4 = new FBProcedureCall(); fBProcedureCall3.getInputParam(1702); FBProcedureCall fBProcedureCall5 = new FBProcedureCall(); fBProcedureCall0.addParam(1388, "sel"); FBProcedureCall fBProcedureCall6 = new FBProcedureCall(); try { fBProcedureCall6.registerOutParam(3, 3); fail("Expecting exception: FBSQLException"); } catch(FBSQLException e) { // // Cannot find parameter with the specified position. // verifyException("org.firebirdsql.jdbc.FBProcedureCall", e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test126() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.totalCost();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.getHeader();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test29() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.pctCorrect();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.avgCost();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test40() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, evaluation0.unclassified(), 0.01D);\n }", "@Test\n public void test17() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFPriorEntropy();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.priorEntropy();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderPRC((-1));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n \n evaluation0.useNoPriors();\n assertEquals(Double.NaN, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctIncorrect();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setNumericPriorsFromBuffer();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(false);\n assertEquals(\"=== Summary ===\\n\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test119() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString((String) null, true);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(\"null\\nTotal Number of Instances 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanPriorEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertEquals(2, doubleArray0.length);\n assertNotNull(doubleArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives((-1436));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test36() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.incorrect();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test35() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(Double.NaN, double0, 0.01D);\n }", "@Test\n public void test33() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString();\n assertEquals(\"=== Detailed Accuracy By Class ===\\n\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test13() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(360, (-336.251));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test16() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.SFSchemeEntropy();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"Y#:')*#rI\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numInstances();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.recall((-9));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setDiscardPredictions(false);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertFalse(evaluation0.getDiscardPredictions());\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test15() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC(17);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test18() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test19() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBInformation();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test21() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.errorRate();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(0.0, Double.NaN);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_14() {\n CuteNetlibCase.doTest(\"OSA-14.SIF\", \"1106462.8447362552\", \"9377699.405100001\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.unclassified();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test30() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertFalse(boolean0);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_07() {\n CuteNetlibCase.doTest(\"OSA-07.SIF\", \"535722.517299352\", \"4332086.205299969\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.getRevision();\n assertEquals(\"8964\", string0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n public void test01() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-1459.149165489484), ',');\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\"\", false);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.toMatrixString(\"getPreBuiltClassifiers\");\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertFalse(boolean0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize(\"\\tInvert matching sense of column indexes.\");\n discretize0.setOutputFormat();\n discretize0.listOptions();\n Discretize discretize1 = new Discretize();\n discretize1.setIgnoreClass(false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\\tInvert matching sense of column indexes.\";\n stringArray0[1] = \"\";\n Discretize.main(stringArray0);\n String string0 = discretize1.findNumBinsTipText();\n assertEquals(\"Optimize number of equal-width bins using leave-one-out. Doesn't work for equal-frequency binning\", string0);\n \n discretize1.setInvertSelection(false);\n discretize0.getBinRangesString(511);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n \n discretize1.getFindNumBins();\n assertEquals(10, discretize1.getBins());\n }", "public void testSummaryStatsPartialLog() {\n\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset98.txt\");\n GcManager gcManager = new GcManager();\n File preprocessedFile = gcManager.preprocess(testFile, null);\n gcManager.store(preprocessedFile, false);\n JvmRun jvmRun = gcManager.getJvmRun(new Jvm(null, null), Constants.DEFAULT_BOTTLENECK_THROUGHPUT_THRESHOLD);\n Assert.assertEquals(\"GC event type count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertEquals(\"GC blocking event count not correct.\", 2, jvmRun.getBlockingEventCount());\n Assert.assertEquals(\"GC pause total not correct.\", 61, jvmRun.getTotalGcPause());\n Assert.assertEquals(\"GC first timestamp not correct.\", 1002192, jvmRun.getFirstGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last timestamp not correct.\", 1002847, jvmRun.getLastGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last duration not correct.\", 41, jvmRun.getLastGcEvent().getDuration());\n Assert.assertEquals(\"Stopped Time event count not correct.\", 6, jvmRun.getStoppedTimeEventCount());\n Assert.assertEquals(\"Stopped time total not correct.\", 1064, jvmRun.getTotalStoppedTime());\n Assert.assertEquals(\"Stopped first timestamp not correct.\", 1000964,\n jvmRun.getFirstStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last timestamp not correct.\", 1003884,\n jvmRun.getLastStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last duration not correct.\", 1000688, jvmRun.getLastStoppedEvent().getDuration());\n Assert.assertEquals(\"JVM first event timestamp not correct.\", 1000964, jvmRun.getFirstEvent().getTimestamp());\n Assert.assertEquals(\"JVM last event timestamp not correct.\", 1003884, jvmRun.getLastEvent().getTimestamp());\n Assert.assertEquals(\"JVM run duration not correct.\", 3920, jvmRun.getJvmRunDuration());\n Assert.assertEquals(\"GC throughput not correct.\", 98, jvmRun.getGcThroughput());\n Assert.assertEquals(\"Stopped time throughput not correct.\", 73, jvmRun.getStoppedTimeThroughput());\n Assert.assertTrue(Analysis.WARN_GC_STOPPED_RATIO + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_GC_STOPPED_RATIO));\n }", "public void testLiangFigure6() {\n int[] a = {0, 0, 0, 0, 1, 1, 1, 1};\n int[] b = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] c = {0, 1, 0, 1, 0, 1, 0, 1};\n int[] ap = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] bp = {0, 1, 0, 1, 1, 1, 1, 1};\n int[] cp = {0, 0, 0, 1, 0, 1, 1, 1};\n\n for (int i = 0; i < ntimes - 1; i++) {\n cases[i][0] = a[i];\n cases[i][1] = b[i];\n cases[i][2] = c[i];\n cases[i + 1][3] = ap[i];\n cases[i + 1][4] = bp[i];\n cases[i + 1][5] = cp[i];\n }\n cases[8][0] = 0;\n cases[8][1] = 0;\n cases[8][2] = 0;\n cases[0][3] = 0;\n cases[0][4] = 0;\n cases[0][5] = 0;\n\n RevealEvaluator re = new RevealEvaluator(cases);\n\n double rea = re.entropy(a);\n assertEquals(1.0, rea, TOLERANCE);\n System.out.println(\"H(a) = \" + rea); //Should be 1.0\n\n double reb = re.entropy(b);\n assertEquals(1.0, reb, TOLERANCE);\n System.out.println(\"H(b) = \" + reb); //Should be 1.0\n\n double rec = re.entropy(c);\n assertEquals(1.0, rec, TOLERANCE);\n System.out.println(\"H(c) = \" + rec); //Should be 1.0\n\n double reab = re.jointEntropy(a, b);\n assertEquals(2.0, reab, TOLERANCE);\n System.out.println(\"H(a,b) = \" + reab); //Should be 2.0\n\n double reap = re.entropy(ap);\n assertEquals(1.0, reap, TOLERANCE);\n System.out.println(\"H(ap) = \" + reap); //Should be 1.0\n\n double rebp = re.entropy(bp);\n assertEquals(0.8112781244591328, rebp, TOLERANCE);\n System.out.println(\"H(bp) = \" + rebp); //Should be 0.8112781244591328\n\n double recp = re.entropy(cp);\n assertEquals(1.0, recp, TOLERANCE);\n System.out.println(\"H(cp) = \" + recp); //Should be 1.0\n\n double reapa = re.jointEntropy(ap, a);\n assertEquals(2.0, reapa, TOLERANCE);\n System.out.println(\"H(ap, a) = \" + reapa); //Should be 2.0\n\n double rebpb = re.jointEntropy(bp, b);\n assertEquals(1.8112781244591327, rebpb, TOLERANCE);\n System.out.println(\n \"H(bp, b) = \" + rebpb); //Should be 1.8112781244591327\n\n double recpb = re.jointEntropy(cp, b);\n assertEquals(1.8112781244591327, recpb, TOLERANCE);\n System.out.println(\n \"H(cp, b) = \" + recpb); //Should be 1.8112781244591327\n\n int[][] ab = new int[2][8];\n for (int i = 0; i < 8; i++) {\n ab[0][i] = a[i];\n ab[1][i] = b[i];\n }\n\n double rebpab = re.jointEntropy(bp, ab);\n assertEquals(2.5, rebpab, TOLERANCE);\n System.out.println(\"H(bp, a, b) = \" + rebpab); //Should be 2.5\n\n double recpab = re.jointEntropy(cp, ab);\n assertEquals(2.5, recpab, TOLERANCE);\n System.out.println(\"H(cp, a, b) = \" + recpab); //Should be 2.5\n\n int[][] abc = new int[3][8];\n for (int i = 0; i < 8; i++) {\n abc[0][i] = a[i];\n abc[1][i] = b[i];\n abc[2][i] = c[i];\n }\n\n double recpabc = re.jointEntropy(cp, abc);\n assertEquals(3.0, recpabc, TOLERANCE);\n System.out.println(\"H(cp, a, b, c) = \" + recpabc); //Should be 3.0\n\n //Setup array cases and test mutualInformation\n int[] p = new int[1];\n p[0] = 0;\n\n double rembpa = re.mutualInformation(4, p, 1);\n assertEquals(0.31127812445913294, rembpa, TOLERANCE);\n System.out.println(\n \"M(Bp, A) = \" + rembpa); //Should be 0.31127812445913294\n\n int[] pp = new int[2];\n pp[0] = 0;\n pp[1] = 1;\n\n double rmcpab = re.mutualInformation(5, pp, 1);\n assertEquals(0.5, rmcpab, TOLERANCE);\n System.out.println(\"M(Cp, [A,B]) = \" + rmcpab); //Should be 0.5\n\n int[] ppp = new int[3];\n ppp[0] = 0;\n ppp[1] = 1;\n ppp[2] = 2;\n\n double rmcpabc = re.mutualInformation(5, ppp, 1);\n assertEquals(1.0, rmcpabc, TOLERANCE);\n System.out.println(\"M(Cp, [A,B,C]) = \" + rmcpabc); //Should be 1.0\n\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(Double.NaN);\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1D() {\n CuteNetlibCase.doTest(\"FIT1D.SIF\", \"-9146.378092421019\", \"80453.99999999999\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }", "@Test\n @Tag(\"slow\")\n public void testKEN_07() {\n CuteNetlibCase.doTest(\"KEN-07.SIF\", \"-6.795204433816869E8\", \"-1.61949281194431E8\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toCumulativeMarginDistributionString();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(\" -1 0 \\n\", string0);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC50A() {\n CuteNetlibCase.doTest(\"SC50A.SIF\", \"-64.57507705856449\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(0.95);\n assertNotNull(doubleArray0);\n assertArrayEquals(new double[] {1.0, 0.0}, doubleArray0, 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test\n public void test14() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testKEN_13() {\n CuteNetlibCase.doTest(\"KEN-13.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCORPION() {\n CuteNetlibCase.doTest(\"SCORPION.SIF\", \"1878.1248227381068\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getBinRangesString(2607);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize(\"'B1of2'\");\n int[] intArray0 = new int[8];\n intArray0[0] = 18;\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"'B1of2'\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(6, stringArray0.length);\n }", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCRE_A() {\n CuteNetlibCase.doTest(\"CRE-A.SIF\", \"2.9889732905677114E7\", \"2.9889732905677114E7\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n discretize0.m_UseEqualFrequency = true;\n discretize0.getOptions();\n assertTrue(discretize0.getMakeBinary());\n \n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test(timeout = 4000)\n public void test041() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.fMeasure((-2765));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n byte[] byteArray0 = new byte[3];\n byteArray0[0] = (byte)108;\n byteArray0[1] = (byte)27;\n byteArray0[2] = (byte)14;\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n discretize0.setBins((-830));\n discretize0.getOptions();\n assertEquals((-830), discretize0.getBins());\n }", "@Test(timeout = 4000)\n public void test088() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBRelativeInformation();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testOSA_60() {\n CuteNetlibCase.doTest(\"OSA-60.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR25() {\n CuteNetlibCase.doTest(\"SCAGR25.SIF\", \"-1.475343306076852E7\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test\n @Tag(\"slow\")\n public void testCZPROB() {\n CuteNetlibCase.doTest(\"CZPROB.SIF\", \"2185196.6988565763\", \"3089066.71321333\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test049() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC((-1));\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC205() {\n CuteNetlibCase.doTest(\"SC205.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1P() {\n CuteNetlibCase.doTest(\"FIT1P.SIF\", \"9146.378092420955\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n Discretize discretize0 = new Discretize(\"*W5D<hSCW|8@I\");\n int[] intArray0 = new int[9];\n intArray0[0] = (-1405);\n intArray0[1] = (-2938);\n intArray0[2] = (-1954);\n intArray0[3] = 9;\n intArray0[4] = 66;\n intArray0[5] = 573;\n intArray0[6] = 0;\n intArray0[7] = (-71);\n intArray0[8] = 99;\n discretize0.setAttributeIndicesArray(intArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR7() {\n CuteNetlibCase.doTest(\"SCAGR7.SIF\", \"-2331389.8243309837\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC105() {\n CuteNetlibCase.doTest(\"SC105.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testKEN_11() {\n CuteNetlibCase.doTest(\"KEN-11.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test040() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.falseNegativeRate((-2));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test020() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\".arff\", true);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\".arff\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test027() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.precision((-1484));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test104() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString(\".arff\");\n assertEquals(Double.NaN, evaluation0.unweightedMicroFmeasure(), 0.01);\n assertEquals(\".arff\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\n 0 0 0 0 0 0 ? ? class1\\n 0 0 0 0 0 0 ? ? class2\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test115() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toMatrixString();\n assertEquals(\"=== Confusion Matrix ===\\n\\n a b <-- classified as\\n 0 0 | a = class1\\n 0 0 | b = class2\\n\", string0);\n }", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n Attribute attribute0 = new Attribute(\"invalid CVS revision - not dots!\");\n attribute0.setWeight(0.0);\n Attribute.typeToString(attribute0);\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"UR<dj;O\", arrayList0, 3);\n Instances instances1 = new Instances(instances0);\n boolean boolean0 = discretize0.setInputFormat(instances1);\n assertFalse(boolean0);\n \n String[] stringArray0 = new String[3];\n stringArray0[0] = \".bsi\";\n stringArray0[1] = \"invalid CVS revision - not dots!\";\n stringArray0[2] = \"@end\";\n discretize0.setOptions(stringArray0);\n discretize0.setOptions(stringArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n }", "@Test(timeout = 4000)\n public void test55() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n StringKernel stringKernel0 = new StringKernel();\n Capabilities capabilities0 = stringKernel0.getCapabilities();\n TestInstances testInstances0 = TestInstances.forCapabilities(capabilities0);\n Instances instances0 = testInstances0.generate();\n naiveBayesMultinomialText0.buildClassifier(instances0);\n String string0 = naiveBayesMultinomialText0.toString();\n assertEquals(\"The independent probability of a class\\n--------------------------------------\\nclass1\\t6.0\\nclass2\\t6.0\\nclass3\\t6.0\\nclass4\\t6.0\\n\\nThe probability of a word given the class\\n-----------------------------------------\\n\\tclass1\\tclass2\\tclass3\\tclass4\\t\\nover\\t7.38905609893065\\t7.38905609893065\\t2.718281828459045\\t2.718281828459045\\t\\nthe\\t2.718281828459045\\t7.38905609893065\\t7.38905609893065\\t2.718281828459045\\t\\nThe\\t7.38905609893065\\t7.38905609893065\\t2.718281828459045\\t2.718281828459045\\t\\nquick\\t7.38905609893065\\t7.38905609893065\\t7.38905609893065\\t2.718281828459045\\t\\nlazy\\t2.718281828459045\\t2.718281828459045\\t7.38905609893065\\t7.38905609893065\\t\\njumps\\t7.38905609893065\\t2.718281828459045\\t2.718281828459045\\t7.38905609893065\\t\\nbrown\\t2.718281828459045\\t7.38905609893065\\t7.38905609893065\\t7.38905609893065\\t\\ndog\\t7.38905609893065\\t2.718281828459045\\t2.718281828459045\\t7.38905609893065\\t\\nfox\\t2.718281828459045\\t2.718281828459045\\t7.38905609893065\\t7.38905609893065\\t\\n\", string0);\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n }" ]
[ "0.7427404", "0.7319299", "0.6964743", "0.6957768", "0.6903018", "0.68581873", "0.68558985", "0.6852044", "0.684961", "0.68440753", "0.6821722", "0.68175733", "0.67897946", "0.6782352", "0.67757684", "0.676515", "0.6760402", "0.67551994", "0.67324543", "0.67062527", "0.67031384", "0.66870624", "0.66807723", "0.6644976", "0.661951", "0.65762794", "0.65671074", "0.6539531", "0.6539331", "0.6500892", "0.6496595", "0.6486484", "0.6481321", "0.6466299", "0.6447457", "0.6442916", "0.6420346", "0.64188737", "0.64118385", "0.640242", "0.6395796", "0.6365808", "0.6351743", "0.6347522", "0.63359684", "0.6323645", "0.63213897", "0.6319577", "0.6317932", "0.63174546", "0.6315399", "0.6312473", "0.631015", "0.63099533", "0.6302997", "0.6289892", "0.62891597", "0.6278762", "0.6264602", "0.6253401", "0.62461036", "0.62436247", "0.6242991", "0.6242513", "0.6235829", "0.6214287", "0.62072", "0.6201159", "0.6186132", "0.6170269", "0.61516", "0.6132143", "0.6117297", "0.6099963", "0.6094876", "0.608434", "0.6078875", "0.60760725", "0.6072434", "0.6066067", "0.60558707", "0.60552526", "0.60522175", "0.6035968", "0.60285074", "0.60284805", "0.6019178", "0.6001281", "0.60002285", "0.6000113", "0.59964", "0.59754777", "0.5972097", "0.59682506", "0.59631854", "0.5946678", "0.5941886", "0.593954", "0.5937606", "0.59363997", "0.5929544" ]
0.0
-1
Test case number: 14 /Coverage entropy=1.7777481312745769
@Test(timeout = 4000) public void test14() throws Throwable { FBProcedureCall fBProcedureCall0 = new FBProcedureCall(); FBProcedureParam fBProcedureParam0 = fBProcedureCall0.addParam(3, "FgZRnc2Yp%jU?C2`8"); fBProcedureParam0.setIndex(3); fBProcedureCall0.getSQL(false); fBProcedureParam0.setIndex(2396); fBProcedureParam0.setIndex((-963)); fBProcedureParam0.setType(3); fBProcedureCall0.addInputParam(fBProcedureParam0); fBProcedureParam0.setValue("FgZRnc2Yp%jU?C2`8"); fBProcedureParam0.setIndex(1861); fBProcedureParam0.setIndex(1861); fBProcedureParam0.setIndex(547); fBProcedureParam0.setIndex((-201774161)); fBProcedureParam0.setType(1861); fBProcedureParam0.setIndex(547); fBProcedureParam0.setIndex(1625); fBProcedureParam0.setIndex(1967); fBProcedureParam0.setIndex((-201774161)); fBProcedureCall0.getSQL(false); try { fBProcedureCall0.registerOutParam(1625, 749); fail("Expecting exception: FBSQLException"); } catch(FBSQLException e) { // // Cannot find parameter with the specified position. // verifyException("org.firebirdsql.jdbc.FBProcedureCall", e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test126() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.totalCost();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.getHeader();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test29() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.pctCorrect();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test40() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, evaluation0.unclassified(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderPRC((-1));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test17() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFPriorEntropy();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.avgCost();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertEquals(2, doubleArray0.length);\n assertNotNull(doubleArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setNumericPriorsFromBuffer();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.priorEntropy();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctIncorrect();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n \n evaluation0.useNoPriors();\n assertEquals(Double.NaN, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanPriorEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(false);\n assertEquals(\"=== Summary ===\\n\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test119() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString((String) null, true);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(\"null\\nTotal Number of Instances 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives((-1436));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test36() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.incorrect();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test35() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(Double.NaN, double0, 0.01D);\n }", "@Test\n public void test16() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.SFSchemeEntropy();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test33() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"Y#:')*#rI\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numInstances();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString();\n assertEquals(\"=== Detailed Accuracy By Class ===\\n\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test13() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setDiscardPredictions(false);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertFalse(evaluation0.getDiscardPredictions());\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(360, (-336.251));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.recall((-9));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test\n public void test15() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_14() {\n CuteNetlibCase.doTest(\"OSA-14.SIF\", \"1106462.8447362552\", \"9377699.405100001\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC(17);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test14() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_07() {\n CuteNetlibCase.doTest(\"OSA-07.SIF\", \"535722.517299352\", \"4332086.205299969\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }", "@Test\n public void test19() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBInformation();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n public void test21() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.errorRate();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.unclassified();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test18() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1D() {\n CuteNetlibCase.doTest(\"FIT1D.SIF\", \"-9146.378092421019\", \"80453.99999999999\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.toMatrixString(\"getPreBuiltClassifiers\");\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertFalse(boolean0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test01() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-1459.149165489484), ',');\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "public void testSummaryStatsPartialLog() {\n\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset98.txt\");\n GcManager gcManager = new GcManager();\n File preprocessedFile = gcManager.preprocess(testFile, null);\n gcManager.store(preprocessedFile, false);\n JvmRun jvmRun = gcManager.getJvmRun(new Jvm(null, null), Constants.DEFAULT_BOTTLENECK_THROUGHPUT_THRESHOLD);\n Assert.assertEquals(\"GC event type count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertEquals(\"GC blocking event count not correct.\", 2, jvmRun.getBlockingEventCount());\n Assert.assertEquals(\"GC pause total not correct.\", 61, jvmRun.getTotalGcPause());\n Assert.assertEquals(\"GC first timestamp not correct.\", 1002192, jvmRun.getFirstGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last timestamp not correct.\", 1002847, jvmRun.getLastGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last duration not correct.\", 41, jvmRun.getLastGcEvent().getDuration());\n Assert.assertEquals(\"Stopped Time event count not correct.\", 6, jvmRun.getStoppedTimeEventCount());\n Assert.assertEquals(\"Stopped time total not correct.\", 1064, jvmRun.getTotalStoppedTime());\n Assert.assertEquals(\"Stopped first timestamp not correct.\", 1000964,\n jvmRun.getFirstStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last timestamp not correct.\", 1003884,\n jvmRun.getLastStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last duration not correct.\", 1000688, jvmRun.getLastStoppedEvent().getDuration());\n Assert.assertEquals(\"JVM first event timestamp not correct.\", 1000964, jvmRun.getFirstEvent().getTimestamp());\n Assert.assertEquals(\"JVM last event timestamp not correct.\", 1003884, jvmRun.getLastEvent().getTimestamp());\n Assert.assertEquals(\"JVM run duration not correct.\", 3920, jvmRun.getJvmRunDuration());\n Assert.assertEquals(\"GC throughput not correct.\", 98, jvmRun.getGcThroughput());\n Assert.assertEquals(\"Stopped time throughput not correct.\", 73, jvmRun.getStoppedTimeThroughput());\n Assert.assertTrue(Analysis.WARN_GC_STOPPED_RATIO + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_GC_STOPPED_RATIO));\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC50A() {\n CuteNetlibCase.doTest(\"SC50A.SIF\", \"-64.57507705856449\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\"\", false);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(Double.NaN);\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testKEN_07() {\n CuteNetlibCase.doTest(\"KEN-07.SIF\", \"-6.795204433816869E8\", \"-1.61949281194431E8\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.getRevision();\n assertEquals(\"8964\", string0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toCumulativeMarginDistributionString();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(\" -1 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(0.0, Double.NaN);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test30() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertFalse(boolean0);\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getBinRangesString(2607);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCORPION() {\n CuteNetlibCase.doTest(\"SCORPION.SIF\", \"1878.1248227381068\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize(\"'B1of2'\");\n int[] intArray0 = new int[8];\n intArray0[0] = 18;\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"'B1of2'\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(6, stringArray0.length);\n }", "public void testLiangFigure6() {\n int[] a = {0, 0, 0, 0, 1, 1, 1, 1};\n int[] b = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] c = {0, 1, 0, 1, 0, 1, 0, 1};\n int[] ap = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] bp = {0, 1, 0, 1, 1, 1, 1, 1};\n int[] cp = {0, 0, 0, 1, 0, 1, 1, 1};\n\n for (int i = 0; i < ntimes - 1; i++) {\n cases[i][0] = a[i];\n cases[i][1] = b[i];\n cases[i][2] = c[i];\n cases[i + 1][3] = ap[i];\n cases[i + 1][4] = bp[i];\n cases[i + 1][5] = cp[i];\n }\n cases[8][0] = 0;\n cases[8][1] = 0;\n cases[8][2] = 0;\n cases[0][3] = 0;\n cases[0][4] = 0;\n cases[0][5] = 0;\n\n RevealEvaluator re = new RevealEvaluator(cases);\n\n double rea = re.entropy(a);\n assertEquals(1.0, rea, TOLERANCE);\n System.out.println(\"H(a) = \" + rea); //Should be 1.0\n\n double reb = re.entropy(b);\n assertEquals(1.0, reb, TOLERANCE);\n System.out.println(\"H(b) = \" + reb); //Should be 1.0\n\n double rec = re.entropy(c);\n assertEquals(1.0, rec, TOLERANCE);\n System.out.println(\"H(c) = \" + rec); //Should be 1.0\n\n double reab = re.jointEntropy(a, b);\n assertEquals(2.0, reab, TOLERANCE);\n System.out.println(\"H(a,b) = \" + reab); //Should be 2.0\n\n double reap = re.entropy(ap);\n assertEquals(1.0, reap, TOLERANCE);\n System.out.println(\"H(ap) = \" + reap); //Should be 1.0\n\n double rebp = re.entropy(bp);\n assertEquals(0.8112781244591328, rebp, TOLERANCE);\n System.out.println(\"H(bp) = \" + rebp); //Should be 0.8112781244591328\n\n double recp = re.entropy(cp);\n assertEquals(1.0, recp, TOLERANCE);\n System.out.println(\"H(cp) = \" + recp); //Should be 1.0\n\n double reapa = re.jointEntropy(ap, a);\n assertEquals(2.0, reapa, TOLERANCE);\n System.out.println(\"H(ap, a) = \" + reapa); //Should be 2.0\n\n double rebpb = re.jointEntropy(bp, b);\n assertEquals(1.8112781244591327, rebpb, TOLERANCE);\n System.out.println(\n \"H(bp, b) = \" + rebpb); //Should be 1.8112781244591327\n\n double recpb = re.jointEntropy(cp, b);\n assertEquals(1.8112781244591327, recpb, TOLERANCE);\n System.out.println(\n \"H(cp, b) = \" + recpb); //Should be 1.8112781244591327\n\n int[][] ab = new int[2][8];\n for (int i = 0; i < 8; i++) {\n ab[0][i] = a[i];\n ab[1][i] = b[i];\n }\n\n double rebpab = re.jointEntropy(bp, ab);\n assertEquals(2.5, rebpab, TOLERANCE);\n System.out.println(\"H(bp, a, b) = \" + rebpab); //Should be 2.5\n\n double recpab = re.jointEntropy(cp, ab);\n assertEquals(2.5, recpab, TOLERANCE);\n System.out.println(\"H(cp, a, b) = \" + recpab); //Should be 2.5\n\n int[][] abc = new int[3][8];\n for (int i = 0; i < 8; i++) {\n abc[0][i] = a[i];\n abc[1][i] = b[i];\n abc[2][i] = c[i];\n }\n\n double recpabc = re.jointEntropy(cp, abc);\n assertEquals(3.0, recpabc, TOLERANCE);\n System.out.println(\"H(cp, a, b, c) = \" + recpabc); //Should be 3.0\n\n //Setup array cases and test mutualInformation\n int[] p = new int[1];\n p[0] = 0;\n\n double rembpa = re.mutualInformation(4, p, 1);\n assertEquals(0.31127812445913294, rembpa, TOLERANCE);\n System.out.println(\n \"M(Bp, A) = \" + rembpa); //Should be 0.31127812445913294\n\n int[] pp = new int[2];\n pp[0] = 0;\n pp[1] = 1;\n\n double rmcpab = re.mutualInformation(5, pp, 1);\n assertEquals(0.5, rmcpab, TOLERANCE);\n System.out.println(\"M(Cp, [A,B]) = \" + rmcpab); //Should be 0.5\n\n int[] ppp = new int[3];\n ppp[0] = 0;\n ppp[1] = 1;\n ppp[2] = 2;\n\n double rmcpabc = re.mutualInformation(5, ppp, 1);\n assertEquals(1.0, rmcpabc, TOLERANCE);\n System.out.println(\"M(Cp, [A,B,C]) = \" + rmcpabc); //Should be 1.0\n\n }", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR25() {\n CuteNetlibCase.doTest(\"SCAGR25.SIF\", \"-1.475343306076852E7\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize(\"\\tInvert matching sense of column indexes.\");\n discretize0.setOutputFormat();\n discretize0.listOptions();\n Discretize discretize1 = new Discretize();\n discretize1.setIgnoreClass(false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\\tInvert matching sense of column indexes.\";\n stringArray0[1] = \"\";\n Discretize.main(stringArray0);\n String string0 = discretize1.findNumBinsTipText();\n assertEquals(\"Optimize number of equal-width bins using leave-one-out. Doesn't work for equal-frequency binning\", string0);\n \n discretize1.setInvertSelection(false);\n discretize0.getBinRangesString(511);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n \n discretize1.getFindNumBins();\n assertEquals(10, discretize1.getBins());\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n byte[] byteArray0 = new byte[3];\n byteArray0[0] = (byte)108;\n byteArray0[1] = (byte)27;\n byteArray0[2] = (byte)14;\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n discretize0.setBins((-830));\n discretize0.getOptions();\n assertEquals((-830), discretize0.getBins());\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR7() {\n CuteNetlibCase.doTest(\"SCAGR7.SIF\", \"-2331389.8243309837\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(0.95);\n assertNotNull(doubleArray0);\n assertArrayEquals(new double[] {1.0, 0.0}, doubleArray0, 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testCZPROB() {\n CuteNetlibCase.doTest(\"CZPROB.SIF\", \"2185196.6988565763\", \"3089066.71321333\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1P() {\n CuteNetlibCase.doTest(\"FIT1P.SIF\", \"9146.378092420955\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC205() {\n CuteNetlibCase.doTest(\"SC205.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test088() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBRelativeInformation();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n discretize0.m_UseEqualFrequency = true;\n discretize0.getOptions();\n assertTrue(discretize0.getMakeBinary());\n \n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCRE_A() {\n CuteNetlibCase.doTest(\"CRE-A.SIF\", \"2.9889732905677114E7\", \"2.9889732905677114E7\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testSCRS8() {\n CuteNetlibCase.doTest(\"SCRS8.SIF\", \"960.0206152764557\", null, NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testKEN_13() {\n CuteNetlibCase.doTest(\"KEN-13.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC105() {\n CuteNetlibCase.doTest(\"SC105.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n Discretize discretize0 = new Discretize(\"*W5D<hSCW|8@I\");\n int[] intArray0 = new int[9];\n intArray0[0] = (-1405);\n intArray0[1] = (-2938);\n intArray0[2] = (-1954);\n intArray0[3] = 9;\n intArray0[4] = 66;\n intArray0[5] = 573;\n intArray0[6] = 0;\n intArray0[7] = (-71);\n intArray0[8] = 99;\n discretize0.setAttributeIndicesArray(intArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test049() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC((-1));\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testOSA_60() {\n CuteNetlibCase.doTest(\"OSA-60.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n Attribute attribute0 = new Attribute(\"invalid CVS revision - not dots!\");\n attribute0.setWeight(0.0);\n Attribute.typeToString(attribute0);\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"UR<dj;O\", arrayList0, 3);\n Instances instances1 = new Instances(instances0);\n boolean boolean0 = discretize0.setInputFormat(instances1);\n assertFalse(boolean0);\n \n String[] stringArray0 = new String[3];\n stringArray0[0] = \".bsi\";\n stringArray0[1] = \"invalid CVS revision - not dots!\";\n stringArray0[2] = \"@end\";\n discretize0.setOptions(stringArray0);\n discretize0.setOptions(stringArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n }", "@Test(timeout = 4000)\n public void test027() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.precision((-1484));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test006() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedAreaUnderPRC();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test020() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\".arff\", true);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\".arff\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test16() throws Throwable {\n Discretize discretize0 = new Discretize();\n String[] stringArray0 = discretize0.getOptions();\n discretize0.setOptions(stringArray0);\n assertEquals(6, stringArray0.length);\n \n String string0 = discretize0.globalInfo();\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"An instance filter that discretizes a range of numeric attributes in the dataset into nominal attributes. Discretization is by simple binning. Skips the class attribute if set.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test\n @Tag(\"bm1000\")\n public void testDEGEN2() {\n CuteNetlibCase.doTest(\"DEGEN2.SIF\", \"-1435.1779999999999\", \"-1226.12\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test041() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.fMeasure((-2765));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test040() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.falseNegativeRate((-2));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }" ]
[ "0.7412492", "0.72829986", "0.69475794", "0.69470316", "0.6879142", "0.6871046", "0.686858", "0.68649495", "0.68578726", "0.6823186", "0.6812062", "0.67891437", "0.6784554", "0.6783146", "0.6760388", "0.67469865", "0.6734431", "0.6722402", "0.6722292", "0.6684473", "0.6681701", "0.664298", "0.66236746", "0.65922797", "0.6576205", "0.65601623", "0.65478784", "0.65449", "0.653535", "0.65250474", "0.6518832", "0.65028775", "0.64815205", "0.64626026", "0.64592266", "0.6455859", "0.6444018", "0.644209", "0.642474", "0.63983464", "0.63976383", "0.6397599", "0.6390285", "0.63829124", "0.6381647", "0.63784814", "0.63760734", "0.6374029", "0.6372845", "0.63517886", "0.63513416", "0.6350641", "0.63451004", "0.63420033", "0.6339019", "0.633481", "0.63285995", "0.63246256", "0.63122165", "0.63040143", "0.6303171", "0.6280912", "0.6277942", "0.6273476", "0.62727594", "0.6254979", "0.6240879", "0.62392855", "0.6216164", "0.6213606", "0.618197", "0.6179697", "0.6171782", "0.6169674", "0.61621696", "0.61620164", "0.6141885", "0.61254567", "0.61235857", "0.6116651", "0.6105493", "0.6104196", "0.6097076", "0.6093243", "0.60893464", "0.6088484", "0.6082508", "0.60645676", "0.6062388", "0.60580575", "0.6057955", "0.6054862", "0.60336816", "0.6031439", "0.6019858", "0.6015416", "0.6011969", "0.60041475", "0.5997901", "0.59838", "0.5973781" ]
0.0
-1
Test case number: 15 /Coverage entropy=1.9292801145349803
@Test(timeout = 4000) public void test15() throws Throwable { FBProcedureCall fBProcedureCall0 = new FBProcedureCall(); FBProcedureParam fBProcedureParam0 = fBProcedureCall0.addParam(3, "gZbnc2Y!%jU?C2`8"); fBProcedureCall0.addOutputParam(fBProcedureParam0); FBProcedureCall fBProcedureCall1 = new FBProcedureCall(); fBProcedureCall0.getSQL(true); fBProcedureCall0.getSQL(true); fBProcedureCall0.getOutputParam(1702); fBProcedureCall0.mapOutParamIndexToPosition(1, true); fBProcedureCall0.getSQL(true); FBProcedureCall fBProcedureCall2 = new FBProcedureCall(); FBProcedureCall fBProcedureCall3 = new FBProcedureCall(); fBProcedureCall0.getSQL(true); FBProcedureCall fBProcedureCall4 = new FBProcedureCall(); fBProcedureCall4.getInputParam(1); fBProcedureCall3.addParam(1702, "Keu{9b0D\"p"); FBProcedureCall fBProcedureCall5 = new FBProcedureCall(); try { fBProcedureCall5.registerOutParam(1702, 1); fail("Expecting exception: FBSQLException"); } catch(FBSQLException e) { // // Cannot find parameter with the specified position. // verifyException("org.firebirdsql.jdbc.FBProcedureCall", e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test126() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.totalCost();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.getHeader();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderPRC((-1));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test29() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.pctCorrect();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test40() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, evaluation0.unclassified(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctIncorrect();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.avgCost();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertEquals(2, doubleArray0.length);\n assertNotNull(doubleArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n \n evaluation0.useNoPriors();\n assertEquals(Double.NaN, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test17() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFPriorEntropy();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setNumericPriorsFromBuffer();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(false);\n assertEquals(\"=== Summary ===\\n\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test119() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString((String) null, true);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(\"null\\nTotal Number of Instances 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.priorEntropy();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives((-1436));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n public void test35() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(Double.NaN, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanPriorEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString();\n assertEquals(\"=== Detailed Accuracy By Class ===\\n\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(360, (-336.251));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test33() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.recall((-9));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test\n public void test36() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.incorrect();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test15() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n public void test16() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.SFSchemeEntropy();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"Y#:')*#rI\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numInstances();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "public void testSummaryStatsPartialLog() {\n\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset98.txt\");\n GcManager gcManager = new GcManager();\n File preprocessedFile = gcManager.preprocess(testFile, null);\n gcManager.store(preprocessedFile, false);\n JvmRun jvmRun = gcManager.getJvmRun(new Jvm(null, null), Constants.DEFAULT_BOTTLENECK_THROUGHPUT_THRESHOLD);\n Assert.assertEquals(\"GC event type count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertEquals(\"GC blocking event count not correct.\", 2, jvmRun.getBlockingEventCount());\n Assert.assertEquals(\"GC pause total not correct.\", 61, jvmRun.getTotalGcPause());\n Assert.assertEquals(\"GC first timestamp not correct.\", 1002192, jvmRun.getFirstGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last timestamp not correct.\", 1002847, jvmRun.getLastGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last duration not correct.\", 41, jvmRun.getLastGcEvent().getDuration());\n Assert.assertEquals(\"Stopped Time event count not correct.\", 6, jvmRun.getStoppedTimeEventCount());\n Assert.assertEquals(\"Stopped time total not correct.\", 1064, jvmRun.getTotalStoppedTime());\n Assert.assertEquals(\"Stopped first timestamp not correct.\", 1000964,\n jvmRun.getFirstStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last timestamp not correct.\", 1003884,\n jvmRun.getLastStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last duration not correct.\", 1000688, jvmRun.getLastStoppedEvent().getDuration());\n Assert.assertEquals(\"JVM first event timestamp not correct.\", 1000964, jvmRun.getFirstEvent().getTimestamp());\n Assert.assertEquals(\"JVM last event timestamp not correct.\", 1003884, jvmRun.getLastEvent().getTimestamp());\n Assert.assertEquals(\"JVM run duration not correct.\", 3920, jvmRun.getJvmRunDuration());\n Assert.assertEquals(\"GC throughput not correct.\", 98, jvmRun.getGcThroughput());\n Assert.assertEquals(\"Stopped time throughput not correct.\", 73, jvmRun.getStoppedTimeThroughput());\n Assert.assertTrue(Analysis.WARN_GC_STOPPED_RATIO + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_GC_STOPPED_RATIO));\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setDiscardPredictions(false);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertFalse(evaluation0.getDiscardPredictions());\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1D() {\n CuteNetlibCase.doTest(\"FIT1D.SIF\", \"-9146.378092421019\", \"80453.99999999999\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.unclassified();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }", "@Test\n public void test01() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-1459.149165489484), ',');\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC50A() {\n CuteNetlibCase.doTest(\"SC50A.SIF\", \"-64.57507705856449\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.toMatrixString(\"getPreBuiltClassifiers\");\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC(17);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.getRevision();\n assertEquals(\"8964\", string0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n public void test13() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_07() {\n CuteNetlibCase.doTest(\"OSA-07.SIF\", \"535722.517299352\", \"4332086.205299969\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "@Test\n public void test30() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertFalse(boolean0);\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }", "public void testLiangFigure6() {\n int[] a = {0, 0, 0, 0, 1, 1, 1, 1};\n int[] b = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] c = {0, 1, 0, 1, 0, 1, 0, 1};\n int[] ap = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] bp = {0, 1, 0, 1, 1, 1, 1, 1};\n int[] cp = {0, 0, 0, 1, 0, 1, 1, 1};\n\n for (int i = 0; i < ntimes - 1; i++) {\n cases[i][0] = a[i];\n cases[i][1] = b[i];\n cases[i][2] = c[i];\n cases[i + 1][3] = ap[i];\n cases[i + 1][4] = bp[i];\n cases[i + 1][5] = cp[i];\n }\n cases[8][0] = 0;\n cases[8][1] = 0;\n cases[8][2] = 0;\n cases[0][3] = 0;\n cases[0][4] = 0;\n cases[0][5] = 0;\n\n RevealEvaluator re = new RevealEvaluator(cases);\n\n double rea = re.entropy(a);\n assertEquals(1.0, rea, TOLERANCE);\n System.out.println(\"H(a) = \" + rea); //Should be 1.0\n\n double reb = re.entropy(b);\n assertEquals(1.0, reb, TOLERANCE);\n System.out.println(\"H(b) = \" + reb); //Should be 1.0\n\n double rec = re.entropy(c);\n assertEquals(1.0, rec, TOLERANCE);\n System.out.println(\"H(c) = \" + rec); //Should be 1.0\n\n double reab = re.jointEntropy(a, b);\n assertEquals(2.0, reab, TOLERANCE);\n System.out.println(\"H(a,b) = \" + reab); //Should be 2.0\n\n double reap = re.entropy(ap);\n assertEquals(1.0, reap, TOLERANCE);\n System.out.println(\"H(ap) = \" + reap); //Should be 1.0\n\n double rebp = re.entropy(bp);\n assertEquals(0.8112781244591328, rebp, TOLERANCE);\n System.out.println(\"H(bp) = \" + rebp); //Should be 0.8112781244591328\n\n double recp = re.entropy(cp);\n assertEquals(1.0, recp, TOLERANCE);\n System.out.println(\"H(cp) = \" + recp); //Should be 1.0\n\n double reapa = re.jointEntropy(ap, a);\n assertEquals(2.0, reapa, TOLERANCE);\n System.out.println(\"H(ap, a) = \" + reapa); //Should be 2.0\n\n double rebpb = re.jointEntropy(bp, b);\n assertEquals(1.8112781244591327, rebpb, TOLERANCE);\n System.out.println(\n \"H(bp, b) = \" + rebpb); //Should be 1.8112781244591327\n\n double recpb = re.jointEntropy(cp, b);\n assertEquals(1.8112781244591327, recpb, TOLERANCE);\n System.out.println(\n \"H(cp, b) = \" + recpb); //Should be 1.8112781244591327\n\n int[][] ab = new int[2][8];\n for (int i = 0; i < 8; i++) {\n ab[0][i] = a[i];\n ab[1][i] = b[i];\n }\n\n double rebpab = re.jointEntropy(bp, ab);\n assertEquals(2.5, rebpab, TOLERANCE);\n System.out.println(\"H(bp, a, b) = \" + rebpab); //Should be 2.5\n\n double recpab = re.jointEntropy(cp, ab);\n assertEquals(2.5, recpab, TOLERANCE);\n System.out.println(\"H(cp, a, b) = \" + recpab); //Should be 2.5\n\n int[][] abc = new int[3][8];\n for (int i = 0; i < 8; i++) {\n abc[0][i] = a[i];\n abc[1][i] = b[i];\n abc[2][i] = c[i];\n }\n\n double recpabc = re.jointEntropy(cp, abc);\n assertEquals(3.0, recpabc, TOLERANCE);\n System.out.println(\"H(cp, a, b, c) = \" + recpabc); //Should be 3.0\n\n //Setup array cases and test mutualInformation\n int[] p = new int[1];\n p[0] = 0;\n\n double rembpa = re.mutualInformation(4, p, 1);\n assertEquals(0.31127812445913294, rembpa, TOLERANCE);\n System.out.println(\n \"M(Bp, A) = \" + rembpa); //Should be 0.31127812445913294\n\n int[] pp = new int[2];\n pp[0] = 0;\n pp[1] = 1;\n\n double rmcpab = re.mutualInformation(5, pp, 1);\n assertEquals(0.5, rmcpab, TOLERANCE);\n System.out.println(\"M(Cp, [A,B]) = \" + rmcpab); //Should be 0.5\n\n int[] ppp = new int[3];\n ppp[0] = 0;\n ppp[1] = 1;\n ppp[2] = 2;\n\n double rmcpabc = re.mutualInformation(5, ppp, 1);\n assertEquals(1.0, rmcpabc, TOLERANCE);\n System.out.println(\"M(Cp, [A,B,C]) = \" + rmcpabc); //Should be 1.0\n\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_14() {\n CuteNetlibCase.doTest(\"OSA-14.SIF\", \"1106462.8447362552\", \"9377699.405100001\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertFalse(boolean0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\"\", false);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(0.0, Double.NaN);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize(\"'B1of2'\");\n int[] intArray0 = new int[8];\n intArray0[0] = 18;\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"'B1of2'\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(6, stringArray0.length);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize(\"\\tInvert matching sense of column indexes.\");\n discretize0.setOutputFormat();\n discretize0.listOptions();\n Discretize discretize1 = new Discretize();\n discretize1.setIgnoreClass(false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\\tInvert matching sense of column indexes.\";\n stringArray0[1] = \"\";\n Discretize.main(stringArray0);\n String string0 = discretize1.findNumBinsTipText();\n assertEquals(\"Optimize number of equal-width bins using leave-one-out. Doesn't work for equal-frequency binning\", string0);\n \n discretize1.setInvertSelection(false);\n discretize0.getBinRangesString(511);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n \n discretize1.getFindNumBins();\n assertEquals(10, discretize1.getBins());\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCORPION() {\n CuteNetlibCase.doTest(\"SCORPION.SIF\", \"1878.1248227381068\", null, NumberContext.of(7, 4));\n }", "@Test\n public void test21() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.errorRate();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getBinRangesString(2607);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n public void test18() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test\n @Tag(\"slow\")\n public void testKEN_07() {\n CuteNetlibCase.doTest(\"KEN-07.SIF\", \"-6.795204433816869E8\", \"-1.61949281194431E8\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test15() throws Throwable {\n Discretize discretize0 = new Discretize(\"\");\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(4, stringArray0.length);\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n byte[] byteArray0 = new byte[3];\n byteArray0[0] = (byte)108;\n byteArray0[1] = (byte)27;\n byteArray0[2] = (byte)14;\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n discretize0.setBins((-830));\n discretize0.getOptions();\n assertEquals((-830), discretize0.getBins());\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n public void test19() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBInformation();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR25() {\n CuteNetlibCase.doTest(\"SCAGR25.SIF\", \"-1.475343306076852E7\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toCumulativeMarginDistributionString();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(\" -1 0 \\n\", string0);\n }", "@Test\n public void test14() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test\n @Tag(\"slow\")\n public void testCZPROB() {\n CuteNetlibCase.doTest(\"CZPROB.SIF\", \"2185196.6988565763\", \"3089066.71321333\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(Double.NaN);\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n Discretize discretize0 = new Discretize(\"*W5D<hSCW|8@I\");\n int[] intArray0 = new int[9];\n intArray0[0] = (-1405);\n intArray0[1] = (-2938);\n intArray0[2] = (-1954);\n intArray0[3] = 9;\n intArray0[4] = 66;\n intArray0[5] = 573;\n intArray0[6] = 0;\n intArray0[7] = (-71);\n intArray0[8] = 99;\n discretize0.setAttributeIndicesArray(intArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "public int getCoverage (){\r\n return coverage;\r\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n discretize0.m_UseEqualFrequency = true;\n discretize0.getOptions();\n assertTrue(discretize0.getMakeBinary());\n \n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n Attribute attribute0 = new Attribute(\"invalid CVS revision - not dots!\");\n attribute0.setWeight(0.0);\n Attribute.typeToString(attribute0);\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"UR<dj;O\", arrayList0, 3);\n Instances instances1 = new Instances(instances0);\n boolean boolean0 = discretize0.setInputFormat(instances1);\n assertFalse(boolean0);\n \n String[] stringArray0 = new String[3];\n stringArray0[0] = \".bsi\";\n stringArray0[1] = \"invalid CVS revision - not dots!\";\n stringArray0[2] = \"@end\";\n discretize0.setOptions(stringArray0);\n discretize0.setOptions(stringArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1P() {\n CuteNetlibCase.doTest(\"FIT1P.SIF\", \"9146.378092420955\", null, NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC205() {\n CuteNetlibCase.doTest(\"SC205.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCRE_A() {\n CuteNetlibCase.doTest(\"CRE-A.SIF\", \"2.9889732905677114E7\", \"2.9889732905677114E7\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test16() throws Throwable {\n Discretize discretize0 = new Discretize();\n String[] stringArray0 = discretize0.getOptions();\n discretize0.setOptions(stringArray0);\n assertEquals(6, stringArray0.length);\n \n String string0 = discretize0.globalInfo();\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"An instance filter that discretizes a range of numeric attributes in the dataset into nominal attributes. Discretization is by simple binning. Skips the class attribute if set.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testSCRS8() {\n CuteNetlibCase.doTest(\"SCRS8.SIF\", \"960.0206152764557\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR7() {\n CuteNetlibCase.doTest(\"SCAGR7.SIF\", \"-2331389.8243309837\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test18() throws Throwable {\n Discretize discretize0 = new Discretize(\"%\");\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n discretize0.findNumBinsTipText();\n double[][] doubleArray0 = new double[0][7];\n discretize0.m_CutPoints = doubleArray0;\n FileSystemHandling.setPermissions((EvoSuiteFile) null, true, false, true);\n discretize0.setInvertSelection(false);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testOSA_60() {\n CuteNetlibCase.doTest(\"OSA-60.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testKEN_13() {\n CuteNetlibCase.doTest(\"KEN-13.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test\n public void testFitnessProportionateSelection()\n {\n }", "@Test(timeout = 4000)\n public void test049() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC((-1));\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test020() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\".arff\", true);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\".arff\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC105() {\n CuteNetlibCase.doTest(\"SC105.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test115() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toMatrixString();\n assertEquals(\"=== Confusion Matrix ===\\n\\n a b <-- classified as\\n 0 0 | a = class1\\n 0 0 | b = class2\\n\", string0);\n }", "@Test\n public void run () {\n\t \n\t System.out.println(\"---------->\");\n\t //System.out.println(md5list.getResult());\n\t //System.out.println(hashsearch.getResult());\n\t \n\t \n\t \n\t // System.out.println(samples.Testing());\n\t //System.out.println(\"getserult: \"+samples.getResult());\n\t \n }", "@Test(timeout = 4000)\n public void test05() throws Throwable {\n Discretize discretize0 = new Discretize(\"^yH*RVC#\\\"|tm,k2XpGN\");\n String[] stringArray0 = new String[2];\n discretize0.m_ClassIndex = 906;\n discretize0.m_IgnoreClass = true;\n stringArray0[0] = \"^yH*RVC#\\\"|tm,k2XpGN\";\n stringArray0[1] = \"^yH*RVC#\\\"|tm,k2XpGN\";\n discretize0.setOptions(stringArray0);\n discretize0.setAttributeIndices(\"^yH*RVC#\\\"|tm,k2XpGN\");\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getFindNumBins());\n }" ]
[ "0.72364426", "0.708148", "0.6853718", "0.6826675", "0.68070877", "0.67961633", "0.6761402", "0.6689458", "0.6661792", "0.66563207", "0.6642307", "0.66213155", "0.6600577", "0.6572593", "0.6562744", "0.656082", "0.65539837", "0.65428114", "0.6541887", "0.6534506", "0.65204036", "0.65174025", "0.64976233", "0.64750886", "0.6419993", "0.6410132", "0.6402732", "0.63866454", "0.63798624", "0.6357748", "0.63476413", "0.632443", "0.631977", "0.6319743", "0.6313865", "0.63073856", "0.6298626", "0.628686", "0.62692237", "0.62629896", "0.6261354", "0.62565124", "0.62515527", "0.6250226", "0.6248736", "0.6246977", "0.62452865", "0.6241352", "0.6223978", "0.62233704", "0.6223218", "0.6210516", "0.6204769", "0.6203606", "0.6199314", "0.6198033", "0.6191577", "0.6185657", "0.6185257", "0.6184591", "0.6180611", "0.61778575", "0.6175136", "0.615462", "0.61417294", "0.6127799", "0.61197084", "0.61127573", "0.6111546", "0.6106871", "0.61063725", "0.6105544", "0.6097797", "0.609714", "0.60924566", "0.6089218", "0.6078244", "0.6066543", "0.605707", "0.60443056", "0.6036318", "0.6035735", "0.6035111", "0.6031733", "0.6015538", "0.6010458", "0.6009523", "0.60032415", "0.60029364", "0.60014224", "0.5994478", "0.5980244", "0.5972536", "0.5956905", "0.5952577", "0.5946186", "0.5942783", "0.594173", "0.59377867", "0.5932128", "0.5921287" ]
0.0
-1
Test case number: 16 /Coverage entropy=1.7105383209021394
@Test(timeout = 4000) public void test16() throws Throwable { FBProcedureCall fBProcedureCall0 = new FBProcedureCall(); FBProcedureParam fBProcedureParam0 = fBProcedureCall0.addParam(3, "gZ'bnc2Y!%jU?C2`8"); fBProcedureCall0.addOutputParam(fBProcedureParam0); fBProcedureCall0.getSQL(true); Object object0 = new Object(); fBProcedureParam0.setIndex(3); fBProcedureParam0.setValue(object0); int int0 = (-2196); fBProcedureParam0.setIndex((-2196)); fBProcedureParam0.setIndex((-2196)); fBProcedureParam0.setIndex(3); fBProcedureParam0.setIndex((-5)); fBProcedureParam0.setType((-2196)); fBProcedureParam0.setIndex((-2196)); fBProcedureParam0.setIndex(3); int int1 = (-5276); fBProcedureCall0.addInputParam(fBProcedureParam0); fBProcedureParam0.setIndex((-5276)); int int2 = (-4177984); // Undeclared exception! try { fBProcedureCall0.registerOutParam((-4177984), 707); fail("Expecting exception: ArrayIndexOutOfBoundsException"); } catch(ArrayIndexOutOfBoundsException e) { // // -4177985 // verifyException("java.util.Vector", e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test126() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.totalCost();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.getHeader();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test29() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.pctCorrect();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test17() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFPriorEntropy();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderPRC((-1));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertEquals(2, doubleArray0.length);\n assertNotNull(doubleArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test40() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, evaluation0.unclassified(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setNumericPriorsFromBuffer();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.priorEntropy();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test16() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.SFSchemeEntropy();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n \n evaluation0.useNoPriors();\n assertEquals(Double.NaN, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.avgCost();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctIncorrect();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanPriorEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(false);\n assertEquals(\"=== Summary ===\\n\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives((-1436));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test119() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString((String) null, true);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(\"null\\nTotal Number of Instances 0 \\n\", string0);\n }", "@Test\n public void test36() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.incorrect();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"Y#:')*#rI\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numInstances();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test33() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, double0, 0.01D);\n }", "@Test\n public void test35() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(Double.NaN, double0, 0.01D);\n }", "@Test\n public void test15() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n public void test13() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString();\n assertEquals(\"=== Detailed Accuracy By Class ===\\n\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "public void testLiangFigure6() {\n int[] a = {0, 0, 0, 0, 1, 1, 1, 1};\n int[] b = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] c = {0, 1, 0, 1, 0, 1, 0, 1};\n int[] ap = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] bp = {0, 1, 0, 1, 1, 1, 1, 1};\n int[] cp = {0, 0, 0, 1, 0, 1, 1, 1};\n\n for (int i = 0; i < ntimes - 1; i++) {\n cases[i][0] = a[i];\n cases[i][1] = b[i];\n cases[i][2] = c[i];\n cases[i + 1][3] = ap[i];\n cases[i + 1][4] = bp[i];\n cases[i + 1][5] = cp[i];\n }\n cases[8][0] = 0;\n cases[8][1] = 0;\n cases[8][2] = 0;\n cases[0][3] = 0;\n cases[0][4] = 0;\n cases[0][5] = 0;\n\n RevealEvaluator re = new RevealEvaluator(cases);\n\n double rea = re.entropy(a);\n assertEquals(1.0, rea, TOLERANCE);\n System.out.println(\"H(a) = \" + rea); //Should be 1.0\n\n double reb = re.entropy(b);\n assertEquals(1.0, reb, TOLERANCE);\n System.out.println(\"H(b) = \" + reb); //Should be 1.0\n\n double rec = re.entropy(c);\n assertEquals(1.0, rec, TOLERANCE);\n System.out.println(\"H(c) = \" + rec); //Should be 1.0\n\n double reab = re.jointEntropy(a, b);\n assertEquals(2.0, reab, TOLERANCE);\n System.out.println(\"H(a,b) = \" + reab); //Should be 2.0\n\n double reap = re.entropy(ap);\n assertEquals(1.0, reap, TOLERANCE);\n System.out.println(\"H(ap) = \" + reap); //Should be 1.0\n\n double rebp = re.entropy(bp);\n assertEquals(0.8112781244591328, rebp, TOLERANCE);\n System.out.println(\"H(bp) = \" + rebp); //Should be 0.8112781244591328\n\n double recp = re.entropy(cp);\n assertEquals(1.0, recp, TOLERANCE);\n System.out.println(\"H(cp) = \" + recp); //Should be 1.0\n\n double reapa = re.jointEntropy(ap, a);\n assertEquals(2.0, reapa, TOLERANCE);\n System.out.println(\"H(ap, a) = \" + reapa); //Should be 2.0\n\n double rebpb = re.jointEntropy(bp, b);\n assertEquals(1.8112781244591327, rebpb, TOLERANCE);\n System.out.println(\n \"H(bp, b) = \" + rebpb); //Should be 1.8112781244591327\n\n double recpb = re.jointEntropy(cp, b);\n assertEquals(1.8112781244591327, recpb, TOLERANCE);\n System.out.println(\n \"H(cp, b) = \" + recpb); //Should be 1.8112781244591327\n\n int[][] ab = new int[2][8];\n for (int i = 0; i < 8; i++) {\n ab[0][i] = a[i];\n ab[1][i] = b[i];\n }\n\n double rebpab = re.jointEntropy(bp, ab);\n assertEquals(2.5, rebpab, TOLERANCE);\n System.out.println(\"H(bp, a, b) = \" + rebpab); //Should be 2.5\n\n double recpab = re.jointEntropy(cp, ab);\n assertEquals(2.5, recpab, TOLERANCE);\n System.out.println(\"H(cp, a, b) = \" + recpab); //Should be 2.5\n\n int[][] abc = new int[3][8];\n for (int i = 0; i < 8; i++) {\n abc[0][i] = a[i];\n abc[1][i] = b[i];\n abc[2][i] = c[i];\n }\n\n double recpabc = re.jointEntropy(cp, abc);\n assertEquals(3.0, recpabc, TOLERANCE);\n System.out.println(\"H(cp, a, b, c) = \" + recpabc); //Should be 3.0\n\n //Setup array cases and test mutualInformation\n int[] p = new int[1];\n p[0] = 0;\n\n double rembpa = re.mutualInformation(4, p, 1);\n assertEquals(0.31127812445913294, rembpa, TOLERANCE);\n System.out.println(\n \"M(Bp, A) = \" + rembpa); //Should be 0.31127812445913294\n\n int[] pp = new int[2];\n pp[0] = 0;\n pp[1] = 1;\n\n double rmcpab = re.mutualInformation(5, pp, 1);\n assertEquals(0.5, rmcpab, TOLERANCE);\n System.out.println(\"M(Cp, [A,B]) = \" + rmcpab); //Should be 0.5\n\n int[] ppp = new int[3];\n ppp[0] = 0;\n ppp[1] = 1;\n ppp[2] = 2;\n\n double rmcpabc = re.mutualInformation(5, ppp, 1);\n assertEquals(1.0, rmcpabc, TOLERANCE);\n System.out.println(\"M(Cp, [A,B,C]) = \" + rmcpabc); //Should be 1.0\n\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_07() {\n CuteNetlibCase.doTest(\"OSA-07.SIF\", \"535722.517299352\", \"4332086.205299969\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_14() {\n CuteNetlibCase.doTest(\"OSA-14.SIF\", \"1106462.8447362552\", \"9377699.405100001\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(360, (-336.251));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1D() {\n CuteNetlibCase.doTest(\"FIT1D.SIF\", \"-9146.378092421019\", \"80453.99999999999\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n @Tag(\"slow\")\n public void testKEN_07() {\n CuteNetlibCase.doTest(\"KEN-07.SIF\", \"-6.795204433816869E8\", \"-1.61949281194431E8\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.getRevision();\n assertEquals(\"8964\", string0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n public void test19() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBInformation();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC50A() {\n CuteNetlibCase.doTest(\"SC50A.SIF\", \"-64.57507705856449\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setDiscardPredictions(false);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertFalse(evaluation0.getDiscardPredictions());\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.unclassified();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.recall((-9));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCORPION() {\n CuteNetlibCase.doTest(\"SCORPION.SIF\", \"1878.1248227381068\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.toMatrixString(\"getPreBuiltClassifiers\");\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test21() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.errorRate();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test18() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getBinRangesString(2607);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize(\"\\tInvert matching sense of column indexes.\");\n discretize0.setOutputFormat();\n discretize0.listOptions();\n Discretize discretize1 = new Discretize();\n discretize1.setIgnoreClass(false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\\tInvert matching sense of column indexes.\";\n stringArray0[1] = \"\";\n Discretize.main(stringArray0);\n String string0 = discretize1.findNumBinsTipText();\n assertEquals(\"Optimize number of equal-width bins using leave-one-out. Doesn't work for equal-frequency binning\", string0);\n \n discretize1.setInvertSelection(false);\n discretize0.getBinRangesString(511);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n \n discretize1.getFindNumBins();\n assertEquals(10, discretize1.getBins());\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC(17);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCRE_A() {\n CuteNetlibCase.doTest(\"CRE-A.SIF\", \"2.9889732905677114E7\", \"2.9889732905677114E7\", NumberContext.of(7, 4));\n }", "@Test\n public void test14() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test16() throws Throwable {\n Discretize discretize0 = new Discretize();\n String[] stringArray0 = discretize0.getOptions();\n discretize0.setOptions(stringArray0);\n assertEquals(6, stringArray0.length);\n \n String string0 = discretize0.globalInfo();\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"An instance filter that discretizes a range of numeric attributes in the dataset into nominal attributes. Discretization is by simple binning. Skips the class attribute if set.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test\n public void test01() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-1459.149165489484), ',');\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\"\", false);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR25() {\n CuteNetlibCase.doTest(\"SCAGR25.SIF\", \"-1.475343306076852E7\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(0.0, Double.NaN);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n discretize0.m_UseEqualFrequency = true;\n discretize0.getOptions();\n assertTrue(discretize0.getMakeBinary());\n \n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize(\"'B1of2'\");\n int[] intArray0 = new int[8];\n intArray0[0] = 18;\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"'B1of2'\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(6, stringArray0.length);\n }", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n public void test30() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertFalse(boolean0);\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n Discretize discretize0 = new Discretize(\"*W5D<hSCW|8@I\");\n int[] intArray0 = new int[9];\n intArray0[0] = (-1405);\n intArray0[1] = (-2938);\n intArray0[2] = (-1954);\n intArray0[3] = 9;\n intArray0[4] = 66;\n intArray0[5] = 573;\n intArray0[6] = 0;\n intArray0[7] = (-71);\n intArray0[8] = 99;\n discretize0.setAttributeIndicesArray(intArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n byte[] byteArray0 = new byte[3];\n byteArray0[0] = (byte)108;\n byteArray0[1] = (byte)27;\n byteArray0[2] = (byte)14;\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n discretize0.setBins((-830));\n discretize0.getOptions();\n assertEquals((-830), discretize0.getBins());\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertFalse(boolean0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(0.95);\n assertNotNull(doubleArray0);\n assertArrayEquals(new double[] {1.0, 0.0}, doubleArray0, 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testKEN_13() {\n CuteNetlibCase.doTest(\"KEN-13.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testCZPROB() {\n CuteNetlibCase.doTest(\"CZPROB.SIF\", \"2185196.6988565763\", \"3089066.71321333\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testSCRS8() {\n CuteNetlibCase.doTest(\"SCRS8.SIF\", \"960.0206152764557\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC205() {\n CuteNetlibCase.doTest(\"SC205.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(Double.NaN);\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR7() {\n CuteNetlibCase.doTest(\"SCAGR7.SIF\", \"-2331389.8243309837\", null, NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1P() {\n CuteNetlibCase.doTest(\"FIT1P.SIF\", \"9146.378092420955\", null, NumberContext.of(7, 4));\n }", "public void testSummaryStatsPartialLog() {\n\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset98.txt\");\n GcManager gcManager = new GcManager();\n File preprocessedFile = gcManager.preprocess(testFile, null);\n gcManager.store(preprocessedFile, false);\n JvmRun jvmRun = gcManager.getJvmRun(new Jvm(null, null), Constants.DEFAULT_BOTTLENECK_THROUGHPUT_THRESHOLD);\n Assert.assertEquals(\"GC event type count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertEquals(\"GC blocking event count not correct.\", 2, jvmRun.getBlockingEventCount());\n Assert.assertEquals(\"GC pause total not correct.\", 61, jvmRun.getTotalGcPause());\n Assert.assertEquals(\"GC first timestamp not correct.\", 1002192, jvmRun.getFirstGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last timestamp not correct.\", 1002847, jvmRun.getLastGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last duration not correct.\", 41, jvmRun.getLastGcEvent().getDuration());\n Assert.assertEquals(\"Stopped Time event count not correct.\", 6, jvmRun.getStoppedTimeEventCount());\n Assert.assertEquals(\"Stopped time total not correct.\", 1064, jvmRun.getTotalStoppedTime());\n Assert.assertEquals(\"Stopped first timestamp not correct.\", 1000964,\n jvmRun.getFirstStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last timestamp not correct.\", 1003884,\n jvmRun.getLastStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last duration not correct.\", 1000688, jvmRun.getLastStoppedEvent().getDuration());\n Assert.assertEquals(\"JVM first event timestamp not correct.\", 1000964, jvmRun.getFirstEvent().getTimestamp());\n Assert.assertEquals(\"JVM last event timestamp not correct.\", 1003884, jvmRun.getLastEvent().getTimestamp());\n Assert.assertEquals(\"JVM run duration not correct.\", 3920, jvmRun.getJvmRunDuration());\n Assert.assertEquals(\"GC throughput not correct.\", 98, jvmRun.getGcThroughput());\n Assert.assertEquals(\"Stopped time throughput not correct.\", 73, jvmRun.getStoppedTimeThroughput());\n Assert.assertTrue(Analysis.WARN_GC_STOPPED_RATIO + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_GC_STOPPED_RATIO));\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testOSA_60() {\n CuteNetlibCase.doTest(\"OSA-60.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toCumulativeMarginDistributionString();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(\" -1 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testD2Q06C() {\n CuteNetlibCase.doTest(\"D2Q06C.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test088() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBRelativeInformation();\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n @Tag(\"unstable\")\n @Tag(\"bm1000\")\n public void testTUFF() {\n CuteNetlibCase.doTest(\"TUFF.SIF\", \"0.29214776509361284\", \"0.8949901867574317\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testKEN_11() {\n CuteNetlibCase.doTest(\"KEN-11.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC105() {\n CuteNetlibCase.doTest(\"SC105.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n Attribute attribute0 = new Attribute(\"invalid CVS revision - not dots!\");\n attribute0.setWeight(0.0);\n Attribute.typeToString(attribute0);\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"UR<dj;O\", arrayList0, 3);\n Instances instances1 = new Instances(instances0);\n boolean boolean0 = discretize0.setInputFormat(instances1);\n assertFalse(boolean0);\n \n String[] stringArray0 = new String[3];\n stringArray0[0] = \".bsi\";\n stringArray0[1] = \"invalid CVS revision - not dots!\";\n stringArray0[2] = \"@end\";\n discretize0.setOptions(stringArray0);\n discretize0.setOptions(stringArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n }", "@Test\n @Tag(\"slow\")\n public void test25FV47() {\n CuteNetlibCase.doTest(\"25FV47.SIF\", \"5501.845888286646\", null, NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testDEGEN2() {\n CuteNetlibCase.doTest(\"DEGEN2.SIF\", \"-1435.1779999999999\", \"-1226.12\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testMODSZK1() {\n CuteNetlibCase.doTest(\"MODSZK1.SIF\", \"320.6197293824883\", null, NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCSD1() {\n CuteNetlibCase.doTest(\"SCSD1.SIF\", \"8.666666674333367\", null, NumberContext.of(7, 4));\n }" ]
[ "0.73288584", "0.71874446", "0.6775927", "0.67707586", "0.6748234", "0.6732154", "0.67104244", "0.6705282", "0.66895735", "0.66803175", "0.66591984", "0.66449934", "0.6644586", "0.6635983", "0.6629681", "0.66216487", "0.6565852", "0.6554476", "0.6530511", "0.6521365", "0.6513179", "0.64529294", "0.6444498", "0.64260966", "0.64260286", "0.64127594", "0.63920385", "0.63725746", "0.63720214", "0.63646907", "0.6363465", "0.6357581", "0.6345747", "0.63204163", "0.631384", "0.6302999", "0.6295029", "0.62923557", "0.62742543", "0.6268385", "0.62661564", "0.62657696", "0.62583965", "0.6245175", "0.6239616", "0.6232503", "0.6230308", "0.62221044", "0.62149924", "0.6211152", "0.6202", "0.6183461", "0.6178109", "0.61730534", "0.61640066", "0.6163745", "0.6152811", "0.6152258", "0.6148229", "0.61406755", "0.6138302", "0.61324567", "0.61229223", "0.6119787", "0.6116076", "0.6108621", "0.61083245", "0.60980546", "0.6091243", "0.60736287", "0.6071828", "0.60703903", "0.6066589", "0.6063211", "0.60617876", "0.60382324", "0.60305387", "0.6025986", "0.6025653", "0.6023238", "0.60207593", "0.601975", "0.60050374", "0.6004196", "0.59966975", "0.599257", "0.5986541", "0.5982187", "0.5970781", "0.5966055", "0.5947399", "0.593621", "0.5927577", "0.5924914", "0.5921795", "0.59134924", "0.59033567", "0.5901122", "0.5899685", "0.5883234", "0.5864908" ]
0.0
-1
Test case number: 17 /Coverage entropy=1.8029624676287908
@Test(timeout = 4000) public void test17() throws Throwable { FBProcedureCall fBProcedureCall0 = new FBProcedureCall(); FBProcedureParam fBProcedureParam0 = fBProcedureCall0.addParam(3674, "250"); FBProcedureParam fBProcedureParam1 = fBProcedureCall0.addParam(3674, "oyA6@hY>6JL<<"); fBProcedureParam1.clone(); fBProcedureCall0.addOutputParam(fBProcedureParam1); fBProcedureCall0.addParam(3674, "250"); FBProcedureParam fBProcedureParam2 = new FBProcedureParam(1, "250"); fBProcedureParam2.clone(); fBProcedureParam0.setType(45); fBProcedureParam2.setType((-587)); fBProcedureParam2.setIndex(3674); fBProcedureCall0.addOutputParam(fBProcedureParam2); fBProcedureCall0.addInputParam(fBProcedureParam0); FBProcedureParam fBProcedureParam3 = fBProcedureCall0.getOutputParam(1); assertEquals(0, fBProcedureParam3.getPosition()); fBProcedureCall0.registerOutParam(3674, (-1587)); FBProcedureParam fBProcedureParam4 = fBProcedureCall0.addParam(1, "250"); assertEquals(1, fBProcedureParam4.getPosition()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test126() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.totalCost();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.getHeader();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test29() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.pctCorrect();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test17() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFPriorEntropy();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test\n public void test40() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, evaluation0.unclassified(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderPRC((-1));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.avgCost();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertEquals(2, doubleArray0.length);\n assertNotNull(doubleArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n \n evaluation0.useNoPriors();\n assertEquals(Double.NaN, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.priorEntropy();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanPriorEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setNumericPriorsFromBuffer();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctIncorrect();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(false);\n assertEquals(\"=== Summary ===\\n\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test119() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString((String) null, true);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(\"null\\nTotal Number of Instances 0 \\n\", string0);\n }", "@Test\n public void test35() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(Double.NaN, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives((-1436));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n public void test36() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.incorrect();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test16() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.SFSchemeEntropy();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test33() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString();\n assertEquals(\"=== Detailed Accuracy By Class ===\\n\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_07() {\n CuteNetlibCase.doTest(\"OSA-07.SIF\", \"535722.517299352\", \"4332086.205299969\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"Y#:')*#rI\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numInstances();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n public void test13() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test19() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBInformation();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test15() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n public void test18() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(360, (-336.251));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setDiscardPredictions(false);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertFalse(evaluation0.getDiscardPredictions());\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1D() {\n CuteNetlibCase.doTest(\"FIT1D.SIF\", \"-9146.378092421019\", \"80453.99999999999\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_14() {\n CuteNetlibCase.doTest(\"OSA-14.SIF\", \"1106462.8447362552\", \"9377699.405100001\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.recall((-9));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.toMatrixString(\"getPreBuiltClassifiers\");\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.unclassified();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "public void testSummaryStatsPartialLog() {\n\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset98.txt\");\n GcManager gcManager = new GcManager();\n File preprocessedFile = gcManager.preprocess(testFile, null);\n gcManager.store(preprocessedFile, false);\n JvmRun jvmRun = gcManager.getJvmRun(new Jvm(null, null), Constants.DEFAULT_BOTTLENECK_THROUGHPUT_THRESHOLD);\n Assert.assertEquals(\"GC event type count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertEquals(\"GC blocking event count not correct.\", 2, jvmRun.getBlockingEventCount());\n Assert.assertEquals(\"GC pause total not correct.\", 61, jvmRun.getTotalGcPause());\n Assert.assertEquals(\"GC first timestamp not correct.\", 1002192, jvmRun.getFirstGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last timestamp not correct.\", 1002847, jvmRun.getLastGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last duration not correct.\", 41, jvmRun.getLastGcEvent().getDuration());\n Assert.assertEquals(\"Stopped Time event count not correct.\", 6, jvmRun.getStoppedTimeEventCount());\n Assert.assertEquals(\"Stopped time total not correct.\", 1064, jvmRun.getTotalStoppedTime());\n Assert.assertEquals(\"Stopped first timestamp not correct.\", 1000964,\n jvmRun.getFirstStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last timestamp not correct.\", 1003884,\n jvmRun.getLastStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last duration not correct.\", 1000688, jvmRun.getLastStoppedEvent().getDuration());\n Assert.assertEquals(\"JVM first event timestamp not correct.\", 1000964, jvmRun.getFirstEvent().getTimestamp());\n Assert.assertEquals(\"JVM last event timestamp not correct.\", 1003884, jvmRun.getLastEvent().getTimestamp());\n Assert.assertEquals(\"JVM run duration not correct.\", 3920, jvmRun.getJvmRunDuration());\n Assert.assertEquals(\"GC throughput not correct.\", 98, jvmRun.getGcThroughput());\n Assert.assertEquals(\"Stopped time throughput not correct.\", 73, jvmRun.getStoppedTimeThroughput());\n Assert.assertTrue(Analysis.WARN_GC_STOPPED_RATIO + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_GC_STOPPED_RATIO));\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertFalse(boolean0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC(17);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testKEN_07() {\n CuteNetlibCase.doTest(\"KEN-07.SIF\", \"-6.795204433816869E8\", \"-1.61949281194431E8\", NumberContext.of(7, 4));\n }", "@Test\n public void test21() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.errorRate();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "public void testLiangFigure6() {\n int[] a = {0, 0, 0, 0, 1, 1, 1, 1};\n int[] b = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] c = {0, 1, 0, 1, 0, 1, 0, 1};\n int[] ap = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] bp = {0, 1, 0, 1, 1, 1, 1, 1};\n int[] cp = {0, 0, 0, 1, 0, 1, 1, 1};\n\n for (int i = 0; i < ntimes - 1; i++) {\n cases[i][0] = a[i];\n cases[i][1] = b[i];\n cases[i][2] = c[i];\n cases[i + 1][3] = ap[i];\n cases[i + 1][4] = bp[i];\n cases[i + 1][5] = cp[i];\n }\n cases[8][0] = 0;\n cases[8][1] = 0;\n cases[8][2] = 0;\n cases[0][3] = 0;\n cases[0][4] = 0;\n cases[0][5] = 0;\n\n RevealEvaluator re = new RevealEvaluator(cases);\n\n double rea = re.entropy(a);\n assertEquals(1.0, rea, TOLERANCE);\n System.out.println(\"H(a) = \" + rea); //Should be 1.0\n\n double reb = re.entropy(b);\n assertEquals(1.0, reb, TOLERANCE);\n System.out.println(\"H(b) = \" + reb); //Should be 1.0\n\n double rec = re.entropy(c);\n assertEquals(1.0, rec, TOLERANCE);\n System.out.println(\"H(c) = \" + rec); //Should be 1.0\n\n double reab = re.jointEntropy(a, b);\n assertEquals(2.0, reab, TOLERANCE);\n System.out.println(\"H(a,b) = \" + reab); //Should be 2.0\n\n double reap = re.entropy(ap);\n assertEquals(1.0, reap, TOLERANCE);\n System.out.println(\"H(ap) = \" + reap); //Should be 1.0\n\n double rebp = re.entropy(bp);\n assertEquals(0.8112781244591328, rebp, TOLERANCE);\n System.out.println(\"H(bp) = \" + rebp); //Should be 0.8112781244591328\n\n double recp = re.entropy(cp);\n assertEquals(1.0, recp, TOLERANCE);\n System.out.println(\"H(cp) = \" + recp); //Should be 1.0\n\n double reapa = re.jointEntropy(ap, a);\n assertEquals(2.0, reapa, TOLERANCE);\n System.out.println(\"H(ap, a) = \" + reapa); //Should be 2.0\n\n double rebpb = re.jointEntropy(bp, b);\n assertEquals(1.8112781244591327, rebpb, TOLERANCE);\n System.out.println(\n \"H(bp, b) = \" + rebpb); //Should be 1.8112781244591327\n\n double recpb = re.jointEntropy(cp, b);\n assertEquals(1.8112781244591327, recpb, TOLERANCE);\n System.out.println(\n \"H(cp, b) = \" + recpb); //Should be 1.8112781244591327\n\n int[][] ab = new int[2][8];\n for (int i = 0; i < 8; i++) {\n ab[0][i] = a[i];\n ab[1][i] = b[i];\n }\n\n double rebpab = re.jointEntropy(bp, ab);\n assertEquals(2.5, rebpab, TOLERANCE);\n System.out.println(\"H(bp, a, b) = \" + rebpab); //Should be 2.5\n\n double recpab = re.jointEntropy(cp, ab);\n assertEquals(2.5, recpab, TOLERANCE);\n System.out.println(\"H(cp, a, b) = \" + recpab); //Should be 2.5\n\n int[][] abc = new int[3][8];\n for (int i = 0; i < 8; i++) {\n abc[0][i] = a[i];\n abc[1][i] = b[i];\n abc[2][i] = c[i];\n }\n\n double recpabc = re.jointEntropy(cp, abc);\n assertEquals(3.0, recpabc, TOLERANCE);\n System.out.println(\"H(cp, a, b, c) = \" + recpabc); //Should be 3.0\n\n //Setup array cases and test mutualInformation\n int[] p = new int[1];\n p[0] = 0;\n\n double rembpa = re.mutualInformation(4, p, 1);\n assertEquals(0.31127812445913294, rembpa, TOLERANCE);\n System.out.println(\n \"M(Bp, A) = \" + rembpa); //Should be 0.31127812445913294\n\n int[] pp = new int[2];\n pp[0] = 0;\n pp[1] = 1;\n\n double rmcpab = re.mutualInformation(5, pp, 1);\n assertEquals(0.5, rmcpab, TOLERANCE);\n System.out.println(\"M(Cp, [A,B]) = \" + rmcpab); //Should be 0.5\n\n int[] ppp = new int[3];\n ppp[0] = 0;\n ppp[1] = 1;\n ppp[2] = 2;\n\n double rmcpabc = re.mutualInformation(5, ppp, 1);\n assertEquals(1.0, rmcpabc, TOLERANCE);\n System.out.println(\"M(Cp, [A,B,C]) = \" + rmcpabc); //Should be 1.0\n\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\"\", false);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test\n public void test30() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertFalse(boolean0);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n public void test14() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC50A() {\n CuteNetlibCase.doTest(\"SC50A.SIF\", \"-64.57507705856449\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(Double.NaN);\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test01() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-1459.149165489484), ',');\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.getRevision();\n assertEquals(\"8964\", string0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toCumulativeMarginDistributionString();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(\" -1 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(0.0, Double.NaN);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCRE_A() {\n CuteNetlibCase.doTest(\"CRE-A.SIF\", \"2.9889732905677114E7\", \"2.9889732905677114E7\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCORPION() {\n CuteNetlibCase.doTest(\"SCORPION.SIF\", \"1878.1248227381068\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n discretize0.m_UseEqualFrequency = true;\n discretize0.getOptions();\n assertTrue(discretize0.getMakeBinary());\n \n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize(\"\\tInvert matching sense of column indexes.\");\n discretize0.setOutputFormat();\n discretize0.listOptions();\n Discretize discretize1 = new Discretize();\n discretize1.setIgnoreClass(false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\\tInvert matching sense of column indexes.\";\n stringArray0[1] = \"\";\n Discretize.main(stringArray0);\n String string0 = discretize1.findNumBinsTipText();\n assertEquals(\"Optimize number of equal-width bins using leave-one-out. Doesn't work for equal-frequency binning\", string0);\n \n discretize1.setInvertSelection(false);\n discretize0.getBinRangesString(511);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n \n discretize1.getFindNumBins();\n assertEquals(10, discretize1.getBins());\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getBinRangesString(2607);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n @Tag(\"slow\")\n public void testCZPROB() {\n CuteNetlibCase.doTest(\"CZPROB.SIF\", \"2185196.6988565763\", \"3089066.71321333\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n byte[] byteArray0 = new byte[3];\n byteArray0[0] = (byte)108;\n byteArray0[1] = (byte)27;\n byteArray0[2] = (byte)14;\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n discretize0.setBins((-830));\n discretize0.getOptions();\n assertEquals((-830), discretize0.getBins());\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1P() {\n CuteNetlibCase.doTest(\"FIT1P.SIF\", \"9146.378092420955\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR25() {\n CuteNetlibCase.doTest(\"SCAGR25.SIF\", \"-1.475343306076852E7\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize(\"'B1of2'\");\n int[] intArray0 = new int[8];\n intArray0[0] = 18;\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"'B1of2'\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(6, stringArray0.length);\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n Discretize discretize0 = new Discretize(\"*W5D<hSCW|8@I\");\n int[] intArray0 = new int[9];\n intArray0[0] = (-1405);\n intArray0[1] = (-2938);\n intArray0[2] = (-1954);\n intArray0[3] = 9;\n intArray0[4] = 66;\n intArray0[5] = 573;\n intArray0[6] = 0;\n intArray0[7] = (-71);\n intArray0[8] = 99;\n discretize0.setAttributeIndicesArray(intArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testKEN_13() {\n CuteNetlibCase.doTest(\"KEN-13.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test088() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBRelativeInformation();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(0.95);\n assertNotNull(doubleArray0);\n assertArrayEquals(new double[] {1.0, 0.0}, doubleArray0, 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testOSA_60() {\n CuteNetlibCase.doTest(\"OSA-60.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testSCRS8() {\n CuteNetlibCase.doTest(\"SCRS8.SIF\", \"960.0206152764557\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n Attribute attribute0 = new Attribute(\"invalid CVS revision - not dots!\");\n attribute0.setWeight(0.0);\n Attribute.typeToString(attribute0);\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"UR<dj;O\", arrayList0, 3);\n Instances instances1 = new Instances(instances0);\n boolean boolean0 = discretize0.setInputFormat(instances1);\n assertFalse(boolean0);\n \n String[] stringArray0 = new String[3];\n stringArray0[0] = \".bsi\";\n stringArray0[1] = \"invalid CVS revision - not dots!\";\n stringArray0[2] = \"@end\";\n discretize0.setOptions(stringArray0);\n discretize0.setOptions(stringArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n }", "@Test\n public void run () {\n\t \n\t System.out.println(\"---------->\");\n\t //System.out.println(md5list.getResult());\n\t //System.out.println(hashsearch.getResult());\n\t \n\t \n\t \n\t // System.out.println(samples.Testing());\n\t //System.out.println(\"getserult: \"+samples.getResult());\n\t \n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR7() {\n CuteNetlibCase.doTest(\"SCAGR7.SIF\", \"-2331389.8243309837\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test041() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.fMeasure((-2765));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC205() {\n CuteNetlibCase.doTest(\"SC205.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test006() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedAreaUnderPRC();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"unstable\")\n @Tag(\"bm1000\")\n public void testTUFF() {\n CuteNetlibCase.doTest(\"TUFF.SIF\", \"0.29214776509361284\", \"0.8949901867574317\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test16() throws Throwable {\n Discretize discretize0 = new Discretize();\n String[] stringArray0 = discretize0.getOptions();\n discretize0.setOptions(stringArray0);\n assertEquals(6, stringArray0.length);\n \n String string0 = discretize0.globalInfo();\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"An instance filter that discretizes a range of numeric attributes in the dataset into nominal attributes. Discretization is by simple binning. Skips the class attribute if set.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test(timeout = 4000)\n public void test049() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC((-1));\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testKEN_11() {\n CuteNetlibCase.doTest(\"KEN-11.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test020() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\".arff\", true);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\".arff\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test18() throws Throwable {\n Discretize discretize0 = new Discretize(\"%\");\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n discretize0.findNumBinsTipText();\n double[][] doubleArray0 = new double[0][7];\n discretize0.m_CutPoints = doubleArray0;\n FileSystemHandling.setPermissions((EvoSuiteFile) null, true, false, true);\n discretize0.setInvertSelection(false);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }" ]
[ "0.73844707", "0.7204018", "0.6938764", "0.688607", "0.68842435", "0.6879664", "0.6850494", "0.682081", "0.6798563", "0.6769417", "0.6769374", "0.6769001", "0.6743627", "0.6741538", "0.67406046", "0.6727369", "0.67162484", "0.67082095", "0.668503", "0.6679153", "0.6671281", "0.6593863", "0.65815544", "0.65698963", "0.6554539", "0.6549152", "0.6548769", "0.64948547", "0.6465152", "0.6452254", "0.64389825", "0.6437429", "0.6433837", "0.64318836", "0.6422422", "0.6421951", "0.6417304", "0.6415657", "0.6406024", "0.6402539", "0.6390385", "0.6377354", "0.63720846", "0.6349778", "0.6335183", "0.63261646", "0.63227427", "0.6322667", "0.632164", "0.63176936", "0.63139707", "0.6312971", "0.63074166", "0.6304088", "0.62907416", "0.628411", "0.62826884", "0.62760776", "0.6269919", "0.6267701", "0.62548447", "0.6252917", "0.6239516", "0.6237668", "0.6231713", "0.61814463", "0.6171459", "0.6165179", "0.6157874", "0.61551625", "0.6152788", "0.614054", "0.6136411", "0.6132482", "0.61320287", "0.61222327", "0.6118796", "0.611484", "0.61081564", "0.6107153", "0.6099524", "0.60905504", "0.60899365", "0.60861653", "0.6080328", "0.6078457", "0.607257", "0.60639894", "0.60447985", "0.60447216", "0.60437214", "0.60314447", "0.6028068", "0.6026586", "0.60136276", "0.60053366", "0.59974176", "0.5982522", "0.5978432", "0.5951847", "0.59493333" ]
0.0
-1
Test case number: 18 /Coverage entropy=1.8496584480669453
@Test(timeout = 4000) public void test18() throws Throwable { FBProcedureCall fBProcedureCall0 = new FBProcedureCall(); FBProcedureParam fBProcedureParam0 = fBProcedureCall0.addParam(3659, "5"); fBProcedureParam0.setType(883); fBProcedureCall0.addParam(3659, "5"); FBProcedureParam fBProcedureParam1 = new FBProcedureParam(17, "5"); FBProcedureParam fBProcedureParam2 = (FBProcedureParam)fBProcedureParam1.clone(); FBProcedureParam fBProcedureParam3 = new FBProcedureParam(); fBProcedureParam1.setIndex(3659); fBProcedureCall0.addInputParam(fBProcedureParam3); fBProcedureParam0.setType(45); fBProcedureParam1.setType((-587)); fBProcedureParam1.setIndex(3659); fBProcedureCall0.addOutputParam(fBProcedureParam1); fBProcedureCall0.addInputParam(fBProcedureParam0); fBProcedureCall0.getOutputParam(17); fBProcedureCall0.registerOutParam(3659, (-1574)); fBProcedureCall0.addParam(17, "5"); FBProcedureParam fBProcedureParam4 = fBProcedureCall0.getInputParam(3659); fBProcedureCall0.addOutputParam(fBProcedureParam4); fBProcedureCall0.addOutputParam(fBProcedureParam2); assertEquals((-1574), fBProcedureParam1.getType()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test126() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.totalCost();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.getHeader();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test29() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.pctCorrect();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.avgCost();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test40() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, evaluation0.unclassified(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n \n evaluation0.useNoPriors();\n assertEquals(Double.NaN, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderPRC((-1));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test17() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFPriorEntropy();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertEquals(2, doubleArray0.length);\n assertNotNull(doubleArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.priorEntropy();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctIncorrect();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setNumericPriorsFromBuffer();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanPriorEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(false);\n assertEquals(\"=== Summary ===\\n\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives((-1436));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n public void test35() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(Double.NaN, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test119() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString((String) null, true);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(\"null\\nTotal Number of Instances 0 \\n\", string0);\n }", "@Test\n public void test36() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.incorrect();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test33() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(360, (-336.251));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString();\n assertEquals(\"=== Detailed Accuracy By Class ===\\n\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"Y#:')*#rI\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numInstances();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.recall((-9));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC(17);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setDiscardPredictions(false);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertFalse(evaluation0.getDiscardPredictions());\n }", "@Test\n public void test19() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBInformation();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test16() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.SFSchemeEntropy();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n public void test18() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.toMatrixString(\"getPreBuiltClassifiers\");\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test21() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.errorRate();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test30() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertFalse(boolean0);\n }", "@Test\n public void test15() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n public void test13() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertFalse(boolean0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.unclassified();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }", "public void testLiangFigure6() {\n int[] a = {0, 0, 0, 0, 1, 1, 1, 1};\n int[] b = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] c = {0, 1, 0, 1, 0, 1, 0, 1};\n int[] ap = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] bp = {0, 1, 0, 1, 1, 1, 1, 1};\n int[] cp = {0, 0, 0, 1, 0, 1, 1, 1};\n\n for (int i = 0; i < ntimes - 1; i++) {\n cases[i][0] = a[i];\n cases[i][1] = b[i];\n cases[i][2] = c[i];\n cases[i + 1][3] = ap[i];\n cases[i + 1][4] = bp[i];\n cases[i + 1][5] = cp[i];\n }\n cases[8][0] = 0;\n cases[8][1] = 0;\n cases[8][2] = 0;\n cases[0][3] = 0;\n cases[0][4] = 0;\n cases[0][5] = 0;\n\n RevealEvaluator re = new RevealEvaluator(cases);\n\n double rea = re.entropy(a);\n assertEquals(1.0, rea, TOLERANCE);\n System.out.println(\"H(a) = \" + rea); //Should be 1.0\n\n double reb = re.entropy(b);\n assertEquals(1.0, reb, TOLERANCE);\n System.out.println(\"H(b) = \" + reb); //Should be 1.0\n\n double rec = re.entropy(c);\n assertEquals(1.0, rec, TOLERANCE);\n System.out.println(\"H(c) = \" + rec); //Should be 1.0\n\n double reab = re.jointEntropy(a, b);\n assertEquals(2.0, reab, TOLERANCE);\n System.out.println(\"H(a,b) = \" + reab); //Should be 2.0\n\n double reap = re.entropy(ap);\n assertEquals(1.0, reap, TOLERANCE);\n System.out.println(\"H(ap) = \" + reap); //Should be 1.0\n\n double rebp = re.entropy(bp);\n assertEquals(0.8112781244591328, rebp, TOLERANCE);\n System.out.println(\"H(bp) = \" + rebp); //Should be 0.8112781244591328\n\n double recp = re.entropy(cp);\n assertEquals(1.0, recp, TOLERANCE);\n System.out.println(\"H(cp) = \" + recp); //Should be 1.0\n\n double reapa = re.jointEntropy(ap, a);\n assertEquals(2.0, reapa, TOLERANCE);\n System.out.println(\"H(ap, a) = \" + reapa); //Should be 2.0\n\n double rebpb = re.jointEntropy(bp, b);\n assertEquals(1.8112781244591327, rebpb, TOLERANCE);\n System.out.println(\n \"H(bp, b) = \" + rebpb); //Should be 1.8112781244591327\n\n double recpb = re.jointEntropy(cp, b);\n assertEquals(1.8112781244591327, recpb, TOLERANCE);\n System.out.println(\n \"H(cp, b) = \" + recpb); //Should be 1.8112781244591327\n\n int[][] ab = new int[2][8];\n for (int i = 0; i < 8; i++) {\n ab[0][i] = a[i];\n ab[1][i] = b[i];\n }\n\n double rebpab = re.jointEntropy(bp, ab);\n assertEquals(2.5, rebpab, TOLERANCE);\n System.out.println(\"H(bp, a, b) = \" + rebpab); //Should be 2.5\n\n double recpab = re.jointEntropy(cp, ab);\n assertEquals(2.5, recpab, TOLERANCE);\n System.out.println(\"H(cp, a, b) = \" + recpab); //Should be 2.5\n\n int[][] abc = new int[3][8];\n for (int i = 0; i < 8; i++) {\n abc[0][i] = a[i];\n abc[1][i] = b[i];\n abc[2][i] = c[i];\n }\n\n double recpabc = re.jointEntropy(cp, abc);\n assertEquals(3.0, recpabc, TOLERANCE);\n System.out.println(\"H(cp, a, b, c) = \" + recpabc); //Should be 3.0\n\n //Setup array cases and test mutualInformation\n int[] p = new int[1];\n p[0] = 0;\n\n double rembpa = re.mutualInformation(4, p, 1);\n assertEquals(0.31127812445913294, rembpa, TOLERANCE);\n System.out.println(\n \"M(Bp, A) = \" + rembpa); //Should be 0.31127812445913294\n\n int[] pp = new int[2];\n pp[0] = 0;\n pp[1] = 1;\n\n double rmcpab = re.mutualInformation(5, pp, 1);\n assertEquals(0.5, rmcpab, TOLERANCE);\n System.out.println(\"M(Cp, [A,B]) = \" + rmcpab); //Should be 0.5\n\n int[] ppp = new int[3];\n ppp[0] = 0;\n ppp[1] = 1;\n ppp[2] = 2;\n\n double rmcpabc = re.mutualInformation(5, ppp, 1);\n assertEquals(1.0, rmcpabc, TOLERANCE);\n System.out.println(\"M(Cp, [A,B,C]) = \" + rmcpabc); //Should be 1.0\n\n }", "@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }", "@Test\n public void test01() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-1459.149165489484), ',');\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1D() {\n CuteNetlibCase.doTest(\"FIT1D.SIF\", \"-9146.378092421019\", \"80453.99999999999\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\"\", false);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_07() {\n CuteNetlibCase.doTest(\"OSA-07.SIF\", \"535722.517299352\", \"4332086.205299969\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(Double.NaN);\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.getRevision();\n assertEquals(\"8964\", string0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "public void testSummaryStatsPartialLog() {\n\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset98.txt\");\n GcManager gcManager = new GcManager();\n File preprocessedFile = gcManager.preprocess(testFile, null);\n gcManager.store(preprocessedFile, false);\n JvmRun jvmRun = gcManager.getJvmRun(new Jvm(null, null), Constants.DEFAULT_BOTTLENECK_THROUGHPUT_THRESHOLD);\n Assert.assertEquals(\"GC event type count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertEquals(\"GC blocking event count not correct.\", 2, jvmRun.getBlockingEventCount());\n Assert.assertEquals(\"GC pause total not correct.\", 61, jvmRun.getTotalGcPause());\n Assert.assertEquals(\"GC first timestamp not correct.\", 1002192, jvmRun.getFirstGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last timestamp not correct.\", 1002847, jvmRun.getLastGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last duration not correct.\", 41, jvmRun.getLastGcEvent().getDuration());\n Assert.assertEquals(\"Stopped Time event count not correct.\", 6, jvmRun.getStoppedTimeEventCount());\n Assert.assertEquals(\"Stopped time total not correct.\", 1064, jvmRun.getTotalStoppedTime());\n Assert.assertEquals(\"Stopped first timestamp not correct.\", 1000964,\n jvmRun.getFirstStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last timestamp not correct.\", 1003884,\n jvmRun.getLastStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last duration not correct.\", 1000688, jvmRun.getLastStoppedEvent().getDuration());\n Assert.assertEquals(\"JVM first event timestamp not correct.\", 1000964, jvmRun.getFirstEvent().getTimestamp());\n Assert.assertEquals(\"JVM last event timestamp not correct.\", 1003884, jvmRun.getLastEvent().getTimestamp());\n Assert.assertEquals(\"JVM run duration not correct.\", 3920, jvmRun.getJvmRunDuration());\n Assert.assertEquals(\"GC throughput not correct.\", 98, jvmRun.getGcThroughput());\n Assert.assertEquals(\"Stopped time throughput not correct.\", 73, jvmRun.getStoppedTimeThroughput());\n Assert.assertTrue(Analysis.WARN_GC_STOPPED_RATIO + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_GC_STOPPED_RATIO));\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(0.0, Double.NaN);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC50A() {\n CuteNetlibCase.doTest(\"SC50A.SIF\", \"-64.57507705856449\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_14() {\n CuteNetlibCase.doTest(\"OSA-14.SIF\", \"1106462.8447362552\", \"9377699.405100001\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test\n public void test14() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test\n @Tag(\"slow\")\n public void testKEN_07() {\n CuteNetlibCase.doTest(\"KEN-07.SIF\", \"-6.795204433816869E8\", \"-1.61949281194431E8\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test088() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBRelativeInformation();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toCumulativeMarginDistributionString();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(\" -1 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getBinRangesString(2607);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize(\"'B1of2'\");\n int[] intArray0 = new int[8];\n intArray0[0] = 18;\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"'B1of2'\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(6, stringArray0.length);\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(0.95);\n assertNotNull(doubleArray0);\n assertArrayEquals(new double[] {1.0, 0.0}, doubleArray0, 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize(\"\\tInvert matching sense of column indexes.\");\n discretize0.setOutputFormat();\n discretize0.listOptions();\n Discretize discretize1 = new Discretize();\n discretize1.setIgnoreClass(false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\\tInvert matching sense of column indexes.\";\n stringArray0[1] = \"\";\n Discretize.main(stringArray0);\n String string0 = discretize1.findNumBinsTipText();\n assertEquals(\"Optimize number of equal-width bins using leave-one-out. Doesn't work for equal-frequency binning\", string0);\n \n discretize1.setInvertSelection(false);\n discretize0.getBinRangesString(511);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n \n discretize1.getFindNumBins();\n assertEquals(10, discretize1.getBins());\n }", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCRE_A() {\n CuteNetlibCase.doTest(\"CRE-A.SIF\", \"2.9889732905677114E7\", \"2.9889732905677114E7\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n Discretize discretize0 = new Discretize(\"*W5D<hSCW|8@I\");\n int[] intArray0 = new int[9];\n intArray0[0] = (-1405);\n intArray0[1] = (-2938);\n intArray0[2] = (-1954);\n intArray0[3] = 9;\n intArray0[4] = 66;\n intArray0[5] = 573;\n intArray0[6] = 0;\n intArray0[7] = (-71);\n intArray0[8] = 99;\n discretize0.setAttributeIndicesArray(intArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCORPION() {\n CuteNetlibCase.doTest(\"SCORPION.SIF\", \"1878.1248227381068\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n discretize0.m_UseEqualFrequency = true;\n discretize0.getOptions();\n assertTrue(discretize0.getMakeBinary());\n \n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n byte[] byteArray0 = new byte[3];\n byteArray0[0] = (byte)108;\n byteArray0[1] = (byte)27;\n byteArray0[2] = (byte)14;\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n discretize0.setBins((-830));\n discretize0.getOptions();\n assertEquals((-830), discretize0.getBins());\n }", "@Test(timeout = 4000)\n public void test049() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC((-1));\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR25() {\n CuteNetlibCase.doTest(\"SCAGR25.SIF\", \"-1.475343306076852E7\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n Attribute attribute0 = new Attribute(\"invalid CVS revision - not dots!\");\n attribute0.setWeight(0.0);\n Attribute.typeToString(attribute0);\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"UR<dj;O\", arrayList0, 3);\n Instances instances1 = new Instances(instances0);\n boolean boolean0 = discretize0.setInputFormat(instances1);\n assertFalse(boolean0);\n \n String[] stringArray0 = new String[3];\n stringArray0[0] = \".bsi\";\n stringArray0[1] = \"invalid CVS revision - not dots!\";\n stringArray0[2] = \"@end\";\n discretize0.setOptions(stringArray0);\n discretize0.setOptions(stringArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1P() {\n CuteNetlibCase.doTest(\"FIT1P.SIF\", \"9146.378092420955\", null, NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testCZPROB() {\n CuteNetlibCase.doTest(\"CZPROB.SIF\", \"2185196.6988565763\", \"3089066.71321333\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test041() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.fMeasure((-2765));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test006() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedAreaUnderPRC();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test020() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\".arff\", true);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\".arff\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testKEN_13() {\n CuteNetlibCase.doTest(\"KEN-13.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "public void test_0020() {\n int nFactors = 2;\n FactorAnalysis instance = new FactorAnalysis(data, nFactors);\n\n assertEquals(instance.nObs(), 18., 1e-15);\n assertEquals(instance.nVariables(), 6., 1e-15);\n assertEquals(instance.nFactors(), 2., 1e-15);\n\n FAEstimator estimators = instance.getEstimators(400);\n\n Vector uniqueness = estimators.psi();\n assertArrayEquals(\n new double[]{0.005, 0.114, 0.642, 0.742, 0.005, 0.097},\n uniqueness.toArray(),\n 2e-2);\n\n int dof = estimators.dof();\n assertEquals(dof, 4);\n\n double fitted = estimators.logLikelihood();\n assertEquals(fitted, 1.803, 1e-3);\n\n Matrix loadings = estimators.loadings();\n assertTrue(AreMatrices.equal(\n new DenseMatrix(new double[][]{\n {0.971, 0.228},\n {0.917, 0.213},\n {0.429, 0.418},\n {0.363, 0.355},\n {0.254, 0.965},\n {0.205, 0.928}\n }),\n loadings,\n 1e-3));\n\n double testStats = estimators.statistics();\n assertEquals(testStats, 23.14, 1e-2);\n\n double pValue = estimators.pValue();\n assertEquals(pValue, 0.000119, 1e-6);//R: 1-pchisq(23.14, df=4) = 0.0001187266\n\n// System.out.println(uniqueness.toString());\n// System.out.println(fitted);\n// System.out.println(loadings.toString());\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR7() {\n CuteNetlibCase.doTest(\"SCAGR7.SIF\", \"-2331389.8243309837\", null, NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testOSA_60() {\n CuteNetlibCase.doTest(\"OSA-60.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test\n public void test23() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n SerializedClassifier serializedClassifier0 = new SerializedClassifier();\n Object[] objectArray0 = new Object[25];\n double[] doubleArray0 = evaluation0.evaluateModel((Classifier) serializedClassifier0, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC205() {\n CuteNetlibCase.doTest(\"SC205.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"unstable\")\n @Tag(\"bm1000\")\n public void testTUFF() {\n CuteNetlibCase.doTest(\"TUFF.SIF\", \"0.29214776509361284\", \"0.8949901867574317\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test040() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.falseNegativeRate((-2));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test55() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n StringKernel stringKernel0 = new StringKernel();\n Capabilities capabilities0 = stringKernel0.getCapabilities();\n TestInstances testInstances0 = TestInstances.forCapabilities(capabilities0);\n Instances instances0 = testInstances0.generate();\n naiveBayesMultinomialText0.buildClassifier(instances0);\n String string0 = naiveBayesMultinomialText0.toString();\n assertEquals(\"The independent probability of a class\\n--------------------------------------\\nclass1\\t6.0\\nclass2\\t6.0\\nclass3\\t6.0\\nclass4\\t6.0\\n\\nThe probability of a word given the class\\n-----------------------------------------\\n\\tclass1\\tclass2\\tclass3\\tclass4\\t\\nover\\t7.38905609893065\\t7.38905609893065\\t2.718281828459045\\t2.718281828459045\\t\\nthe\\t2.718281828459045\\t7.38905609893065\\t7.38905609893065\\t2.718281828459045\\t\\nThe\\t7.38905609893065\\t7.38905609893065\\t2.718281828459045\\t2.718281828459045\\t\\nquick\\t7.38905609893065\\t7.38905609893065\\t7.38905609893065\\t2.718281828459045\\t\\nlazy\\t2.718281828459045\\t2.718281828459045\\t7.38905609893065\\t7.38905609893065\\t\\njumps\\t7.38905609893065\\t2.718281828459045\\t2.718281828459045\\t7.38905609893065\\t\\nbrown\\t2.718281828459045\\t7.38905609893065\\t7.38905609893065\\t7.38905609893065\\t\\ndog\\t7.38905609893065\\t2.718281828459045\\t2.718281828459045\\t7.38905609893065\\t\\nfox\\t2.718281828459045\\t2.718281828459045\\t7.38905609893065\\t7.38905609893065\\t\\n\", string0);\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n }", "@Test(timeout = 4000)\n public void test16() throws Throwable {\n Discretize discretize0 = new Discretize();\n String[] stringArray0 = discretize0.getOptions();\n discretize0.setOptions(stringArray0);\n assertEquals(6, stringArray0.length);\n \n String string0 = discretize0.globalInfo();\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"An instance filter that discretizes a range of numeric attributes in the dataset into nominal attributes. Discretization is by simple binning. Skips the class attribute if set.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }" ]
[ "0.7465744", "0.73045844", "0.70540315", "0.7013425", "0.6972984", "0.69581765", "0.6939377", "0.69319785", "0.69305557", "0.69286275", "0.6905014", "0.6903396", "0.68921524", "0.6890426", "0.68597084", "0.685103", "0.6829257", "0.68191755", "0.6810653", "0.6792639", "0.6774185", "0.67468965", "0.6729651", "0.67271656", "0.6699121", "0.66975814", "0.66752744", "0.6656328", "0.66545886", "0.6616859", "0.65979934", "0.6582351", "0.65763915", "0.65757746", "0.6574102", "0.6570349", "0.6563922", "0.6558125", "0.65414196", "0.6526169", "0.6525566", "0.652472", "0.6516691", "0.6504874", "0.6500366", "0.64987165", "0.6495965", "0.6490954", "0.6488705", "0.6466525", "0.6441964", "0.64393467", "0.6435223", "0.6428857", "0.64212537", "0.6416822", "0.639888", "0.6392089", "0.63787496", "0.6375678", "0.6374882", "0.6374651", "0.63736326", "0.6356344", "0.6352503", "0.63457894", "0.6338873", "0.6330482", "0.63166046", "0.6304563", "0.63042545", "0.6288224", "0.6275182", "0.62697566", "0.6263406", "0.62484974", "0.62365824", "0.6235994", "0.6222082", "0.62212545", "0.6218734", "0.62096846", "0.6202141", "0.619705", "0.61902195", "0.6183348", "0.6167125", "0.6159535", "0.61496407", "0.61344516", "0.61256677", "0.6122148", "0.6116032", "0.6111012", "0.6103892", "0.61027884", "0.60975397", "0.6079055", "0.6078795", "0.60604584", "0.6049524" ]
0.0
-1
Test case number: 19 /Coverage entropy=1.6954040984113863
@Test(timeout = 4000) public void test19() throws Throwable { FBProcedureCall fBProcedureCall0 = new FBProcedureCall(); int int0 = 3; FBProcedureParam fBProcedureParam0 = fBProcedureCall0.addParam(3, "gZ'bnc2Y!%jU?C2`8"); fBProcedureCall0.addOutputParam(fBProcedureParam0); fBProcedureCall0.getSQL(true); Object object0 = new Object(); fBProcedureParam0.setValue(object0); int int1 = (-2196); fBProcedureParam0.setIndex((-2196)); fBProcedureParam0.setIndex((-2196)); fBProcedureParam0.setIndex(3); fBProcedureParam0.setIndex((-5)); fBProcedureCall0.getInputParam((-5)); fBProcedureParam0.setType((-2196)); fBProcedureParam0.setIndex((-201774121)); fBProcedureParam0.setIndex(3); fBProcedureCall0.addInputParam(fBProcedureParam0); fBProcedureParam0.setIndex((-5287)); int int2 = 696; // Undeclared exception! try { fBProcedureCall0.registerOutParam((-201774121), 696); fail("Expecting exception: ArrayIndexOutOfBoundsException"); } catch(ArrayIndexOutOfBoundsException e) { // // -201774122 // verifyException("java.util.Vector", e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test126() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.totalCost();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.getHeader();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test29() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.pctCorrect();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test40() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, evaluation0.unclassified(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n \n evaluation0.useNoPriors();\n assertEquals(Double.NaN, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.avgCost();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderPRC((-1));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test17() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFPriorEntropy();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.priorEntropy();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctIncorrect();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanPriorEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertEquals(2, doubleArray0.length);\n assertNotNull(doubleArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test119() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString((String) null, true);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(\"null\\nTotal Number of Instances 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setNumericPriorsFromBuffer();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test35() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(Double.NaN, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(false);\n assertEquals(\"=== Summary ===\\n\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives((-1436));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test36() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.incorrect();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test33() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, double0, 0.01D);\n }", "@Test\n public void test19() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBInformation();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString();\n assertEquals(\"=== Detailed Accuracy By Class ===\\n\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(360, (-336.251));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test16() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.SFSchemeEntropy();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n public void test18() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.recall((-9));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test21() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.errorRate();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test15() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setDiscardPredictions(false);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertFalse(evaluation0.getDiscardPredictions());\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"Y#:')*#rI\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numInstances();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC(17);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.toMatrixString(\"getPreBuiltClassifiers\");\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test13() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.unclassified();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n public void test30() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertFalse(boolean0);\n }", "public void testSummaryStatsPartialLog() {\n\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset98.txt\");\n GcManager gcManager = new GcManager();\n File preprocessedFile = gcManager.preprocess(testFile, null);\n gcManager.store(preprocessedFile, false);\n JvmRun jvmRun = gcManager.getJvmRun(new Jvm(null, null), Constants.DEFAULT_BOTTLENECK_THROUGHPUT_THRESHOLD);\n Assert.assertEquals(\"GC event type count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertEquals(\"GC blocking event count not correct.\", 2, jvmRun.getBlockingEventCount());\n Assert.assertEquals(\"GC pause total not correct.\", 61, jvmRun.getTotalGcPause());\n Assert.assertEquals(\"GC first timestamp not correct.\", 1002192, jvmRun.getFirstGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last timestamp not correct.\", 1002847, jvmRun.getLastGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last duration not correct.\", 41, jvmRun.getLastGcEvent().getDuration());\n Assert.assertEquals(\"Stopped Time event count not correct.\", 6, jvmRun.getStoppedTimeEventCount());\n Assert.assertEquals(\"Stopped time total not correct.\", 1064, jvmRun.getTotalStoppedTime());\n Assert.assertEquals(\"Stopped first timestamp not correct.\", 1000964,\n jvmRun.getFirstStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last timestamp not correct.\", 1003884,\n jvmRun.getLastStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last duration not correct.\", 1000688, jvmRun.getLastStoppedEvent().getDuration());\n Assert.assertEquals(\"JVM first event timestamp not correct.\", 1000964, jvmRun.getFirstEvent().getTimestamp());\n Assert.assertEquals(\"JVM last event timestamp not correct.\", 1003884, jvmRun.getLastEvent().getTimestamp());\n Assert.assertEquals(\"JVM run duration not correct.\", 3920, jvmRun.getJvmRunDuration());\n Assert.assertEquals(\"GC throughput not correct.\", 98, jvmRun.getGcThroughput());\n Assert.assertEquals(\"Stopped time throughput not correct.\", 73, jvmRun.getStoppedTimeThroughput());\n Assert.assertTrue(Analysis.WARN_GC_STOPPED_RATIO + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_GC_STOPPED_RATIO));\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\"\", false);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertFalse(boolean0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1D() {\n CuteNetlibCase.doTest(\"FIT1D.SIF\", \"-9146.378092421019\", \"80453.99999999999\", NumberContext.of(7, 4));\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test\n public void test01() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-1459.149165489484), ',');\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "public void testLiangFigure6() {\n int[] a = {0, 0, 0, 0, 1, 1, 1, 1};\n int[] b = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] c = {0, 1, 0, 1, 0, 1, 0, 1};\n int[] ap = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] bp = {0, 1, 0, 1, 1, 1, 1, 1};\n int[] cp = {0, 0, 0, 1, 0, 1, 1, 1};\n\n for (int i = 0; i < ntimes - 1; i++) {\n cases[i][0] = a[i];\n cases[i][1] = b[i];\n cases[i][2] = c[i];\n cases[i + 1][3] = ap[i];\n cases[i + 1][4] = bp[i];\n cases[i + 1][5] = cp[i];\n }\n cases[8][0] = 0;\n cases[8][1] = 0;\n cases[8][2] = 0;\n cases[0][3] = 0;\n cases[0][4] = 0;\n cases[0][5] = 0;\n\n RevealEvaluator re = new RevealEvaluator(cases);\n\n double rea = re.entropy(a);\n assertEquals(1.0, rea, TOLERANCE);\n System.out.println(\"H(a) = \" + rea); //Should be 1.0\n\n double reb = re.entropy(b);\n assertEquals(1.0, reb, TOLERANCE);\n System.out.println(\"H(b) = \" + reb); //Should be 1.0\n\n double rec = re.entropy(c);\n assertEquals(1.0, rec, TOLERANCE);\n System.out.println(\"H(c) = \" + rec); //Should be 1.0\n\n double reab = re.jointEntropy(a, b);\n assertEquals(2.0, reab, TOLERANCE);\n System.out.println(\"H(a,b) = \" + reab); //Should be 2.0\n\n double reap = re.entropy(ap);\n assertEquals(1.0, reap, TOLERANCE);\n System.out.println(\"H(ap) = \" + reap); //Should be 1.0\n\n double rebp = re.entropy(bp);\n assertEquals(0.8112781244591328, rebp, TOLERANCE);\n System.out.println(\"H(bp) = \" + rebp); //Should be 0.8112781244591328\n\n double recp = re.entropy(cp);\n assertEquals(1.0, recp, TOLERANCE);\n System.out.println(\"H(cp) = \" + recp); //Should be 1.0\n\n double reapa = re.jointEntropy(ap, a);\n assertEquals(2.0, reapa, TOLERANCE);\n System.out.println(\"H(ap, a) = \" + reapa); //Should be 2.0\n\n double rebpb = re.jointEntropy(bp, b);\n assertEquals(1.8112781244591327, rebpb, TOLERANCE);\n System.out.println(\n \"H(bp, b) = \" + rebpb); //Should be 1.8112781244591327\n\n double recpb = re.jointEntropy(cp, b);\n assertEquals(1.8112781244591327, recpb, TOLERANCE);\n System.out.println(\n \"H(cp, b) = \" + recpb); //Should be 1.8112781244591327\n\n int[][] ab = new int[2][8];\n for (int i = 0; i < 8; i++) {\n ab[0][i] = a[i];\n ab[1][i] = b[i];\n }\n\n double rebpab = re.jointEntropy(bp, ab);\n assertEquals(2.5, rebpab, TOLERANCE);\n System.out.println(\"H(bp, a, b) = \" + rebpab); //Should be 2.5\n\n double recpab = re.jointEntropy(cp, ab);\n assertEquals(2.5, recpab, TOLERANCE);\n System.out.println(\"H(cp, a, b) = \" + recpab); //Should be 2.5\n\n int[][] abc = new int[3][8];\n for (int i = 0; i < 8; i++) {\n abc[0][i] = a[i];\n abc[1][i] = b[i];\n abc[2][i] = c[i];\n }\n\n double recpabc = re.jointEntropy(cp, abc);\n assertEquals(3.0, recpabc, TOLERANCE);\n System.out.println(\"H(cp, a, b, c) = \" + recpabc); //Should be 3.0\n\n //Setup array cases and test mutualInformation\n int[] p = new int[1];\n p[0] = 0;\n\n double rembpa = re.mutualInformation(4, p, 1);\n assertEquals(0.31127812445913294, rembpa, TOLERANCE);\n System.out.println(\n \"M(Bp, A) = \" + rembpa); //Should be 0.31127812445913294\n\n int[] pp = new int[2];\n pp[0] = 0;\n pp[1] = 1;\n\n double rmcpab = re.mutualInformation(5, pp, 1);\n assertEquals(0.5, rmcpab, TOLERANCE);\n System.out.println(\"M(Cp, [A,B]) = \" + rmcpab); //Should be 0.5\n\n int[] ppp = new int[3];\n ppp[0] = 0;\n ppp[1] = 1;\n ppp[2] = 2;\n\n double rmcpabc = re.mutualInformation(5, ppp, 1);\n assertEquals(1.0, rmcpabc, TOLERANCE);\n System.out.println(\"M(Cp, [A,B,C]) = \" + rmcpabc); //Should be 1.0\n\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(Double.NaN);\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(0.0, Double.NaN);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC50A() {\n CuteNetlibCase.doTest(\"SC50A.SIF\", \"-64.57507705856449\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_07() {\n CuteNetlibCase.doTest(\"OSA-07.SIF\", \"535722.517299352\", \"4332086.205299969\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }", "@Test\n public void test14() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_14() {\n CuteNetlibCase.doTest(\"OSA-14.SIF\", \"1106462.8447362552\", \"9377699.405100001\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.getRevision();\n assertEquals(\"8964\", string0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testKEN_07() {\n CuteNetlibCase.doTest(\"KEN-07.SIF\", \"-6.795204433816869E8\", \"-1.61949281194431E8\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize(\"\\tInvert matching sense of column indexes.\");\n discretize0.setOutputFormat();\n discretize0.listOptions();\n Discretize discretize1 = new Discretize();\n discretize1.setIgnoreClass(false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\\tInvert matching sense of column indexes.\";\n stringArray0[1] = \"\";\n Discretize.main(stringArray0);\n String string0 = discretize1.findNumBinsTipText();\n assertEquals(\"Optimize number of equal-width bins using leave-one-out. Doesn't work for equal-frequency binning\", string0);\n \n discretize1.setInvertSelection(false);\n discretize0.getBinRangesString(511);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n \n discretize1.getFindNumBins();\n assertEquals(10, discretize1.getBins());\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toCumulativeMarginDistributionString();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(\" -1 0 \\n\", string0);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCORPION() {\n CuteNetlibCase.doTest(\"SCORPION.SIF\", \"1878.1248227381068\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getBinRangesString(2607);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n Discretize discretize0 = new Discretize(\"*W5D<hSCW|8@I\");\n int[] intArray0 = new int[9];\n intArray0[0] = (-1405);\n intArray0[1] = (-2938);\n intArray0[2] = (-1954);\n intArray0[3] = 9;\n intArray0[4] = 66;\n intArray0[5] = 573;\n intArray0[6] = 0;\n intArray0[7] = (-71);\n intArray0[8] = 99;\n discretize0.setAttributeIndicesArray(intArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test088() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBRelativeInformation();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n discretize0.m_UseEqualFrequency = true;\n discretize0.getOptions();\n assertTrue(discretize0.getMakeBinary());\n \n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCRE_A() {\n CuteNetlibCase.doTest(\"CRE-A.SIF\", \"2.9889732905677114E7\", \"2.9889732905677114E7\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n byte[] byteArray0 = new byte[3];\n byteArray0[0] = (byte)108;\n byteArray0[1] = (byte)27;\n byteArray0[2] = (byte)14;\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n discretize0.setBins((-830));\n discretize0.getOptions();\n assertEquals((-830), discretize0.getBins());\n }", "@Test\n @Tag(\"slow\")\n public void testCZPROB() {\n CuteNetlibCase.doTest(\"CZPROB.SIF\", \"2185196.6988565763\", \"3089066.71321333\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize(\"'B1of2'\");\n int[] intArray0 = new int[8];\n intArray0[0] = 18;\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"'B1of2'\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(6, stringArray0.length);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR25() {\n CuteNetlibCase.doTest(\"SCAGR25.SIF\", \"-1.475343306076852E7\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(0.95);\n assertNotNull(doubleArray0);\n assertArrayEquals(new double[] {1.0, 0.0}, doubleArray0, 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test020() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\".arff\", true);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\".arff\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test006() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedAreaUnderPRC();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC205() {\n CuteNetlibCase.doTest(\"SC205.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n Attribute attribute0 = new Attribute(\"invalid CVS revision - not dots!\");\n attribute0.setWeight(0.0);\n Attribute.typeToString(attribute0);\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"UR<dj;O\", arrayList0, 3);\n Instances instances1 = new Instances(instances0);\n boolean boolean0 = discretize0.setInputFormat(instances1);\n assertFalse(boolean0);\n \n String[] stringArray0 = new String[3];\n stringArray0[0] = \".bsi\";\n stringArray0[1] = \"invalid CVS revision - not dots!\";\n stringArray0[2] = \"@end\";\n discretize0.setOptions(stringArray0);\n discretize0.setOptions(stringArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1P() {\n CuteNetlibCase.doTest(\"FIT1P.SIF\", \"9146.378092420955\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test041() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.fMeasure((-2765));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test049() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC((-1));\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR7() {\n CuteNetlibCase.doTest(\"SCAGR7.SIF\", \"-2331389.8243309837\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test18() throws Throwable {\n Discretize discretize0 = new Discretize(\"%\");\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n discretize0.findNumBinsTipText();\n double[][] doubleArray0 = new double[0][7];\n discretize0.m_CutPoints = doubleArray0;\n FileSystemHandling.setPermissions((EvoSuiteFile) null, true, false, true);\n discretize0.setInvertSelection(false);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n\tpublic void testGetCounts() {\n\t\tString cellBC = \"ATCAGGGACAGA\";\n\n\t\tint snpPos = 76227022;\n\t\tInterval snpInterval = new Interval(\"HUMAN_1\", snpPos, snpPos, true, \"test\");\n\t\tSampleGenotypeProbabilities result = new SampleGenotypeProbabilities(snpInterval, cellBC);\n\t\tSNPUMIBasePileup p = getPileUpFromFile(cellBC, \"CGGGGCTC\");\n\t\tp.addLocusFunction(LocusFunction.CODING);\n\t\tresult.add(p);\n\t\tresult.add(getPileUpFromFile(cellBC, \"CGCGGGAC\")); // this read doesn't overlap the SNP so it isn't added!\n\t\tresult.add(getPileUpFromFile(cellBC, \"CTGGGCTC\"));\n\t\tresult.add(getPileUpFromFile(cellBC, \"GGAATGTG\"));\n\t\tresult.add(getPileUpFromFile(cellBC, \"GTGCCGTG\"));\n\t\tresult.add(getPileUpFromFile(cellBC, \"TCGCAGAC\"));\n\n\t\t// the code coverage gods are pleased.\n\t\tAssert.assertEquals(result.getCell(), cellBC);\n\t\tAssert.assertEquals(result.getSNPInterval(), snpInterval);\n\n\t\tAssert.assertNotNull(result.toString());\n\n\t\t// get the unfiltered results.\n\t\tObjectCounter<Character> umiCounts = result.getUMIBaseCounts();\n\t\tObjectCounter<Character> umiCountsExpected = new ObjectCounter<>();\n\t\tumiCountsExpected.incrementByCount('A', 2);\n\t\tumiCountsExpected.incrementByCount('G', 3);\n\t\tAssert.assertEquals(umiCounts, umiCountsExpected);\n\n\t\tObjectCounter<Character> readCounts = result.getReadBaseCounts();\n\t\tObjectCounter<Character> readCountsExpected = new ObjectCounter<>();\n\t\treadCountsExpected.incrementByCount('A', 2);\n\t\treadCountsExpected.incrementByCount('G', 5);\n\t\tAssert.assertEquals(readCounts, readCountsExpected);\n\n\t\tSet<LocusFunction> expected = new HashSet<>(Arrays.asList(LocusFunction.CODING));\n\t\tAssert.assertEquals(result.getLocusFunctions(), expected);\n\n\t}", "@Test\n @Tag(\"unstable\")\n @Tag(\"bm1000\")\n public void testTUFF() {\n CuteNetlibCase.doTest(\"TUFF.SIF\", \"0.29214776509361284\", \"0.8949901867574317\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testKEN_13() {\n CuteNetlibCase.doTest(\"KEN-13.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testOSA_60() {\n CuteNetlibCase.doTest(\"OSA-60.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "public int getCoverage (){\r\n return coverage;\r\n }", "public void test_0020() {\n int nFactors = 2;\n FactorAnalysis instance = new FactorAnalysis(data, nFactors);\n\n assertEquals(instance.nObs(), 18., 1e-15);\n assertEquals(instance.nVariables(), 6., 1e-15);\n assertEquals(instance.nFactors(), 2., 1e-15);\n\n FAEstimator estimators = instance.getEstimators(400);\n\n Vector uniqueness = estimators.psi();\n assertArrayEquals(\n new double[]{0.005, 0.114, 0.642, 0.742, 0.005, 0.097},\n uniqueness.toArray(),\n 2e-2);\n\n int dof = estimators.dof();\n assertEquals(dof, 4);\n\n double fitted = estimators.logLikelihood();\n assertEquals(fitted, 1.803, 1e-3);\n\n Matrix loadings = estimators.loadings();\n assertTrue(AreMatrices.equal(\n new DenseMatrix(new double[][]{\n {0.971, 0.228},\n {0.917, 0.213},\n {0.429, 0.418},\n {0.363, 0.355},\n {0.254, 0.965},\n {0.205, 0.928}\n }),\n loadings,\n 1e-3));\n\n double testStats = estimators.statistics();\n assertEquals(testStats, 23.14, 1e-2);\n\n double pValue = estimators.pValue();\n assertEquals(pValue, 0.000119, 1e-6);//R: 1-pchisq(23.14, df=4) = 0.0001187266\n\n// System.out.println(uniqueness.toString());\n// System.out.println(fitted);\n// System.out.println(loadings.toString());\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC105() {\n CuteNetlibCase.doTest(\"SC105.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }" ]
[ "0.7296199", "0.7140129", "0.70115954", "0.69443476", "0.6884317", "0.68584746", "0.6836574", "0.6827602", "0.6825562", "0.6819716", "0.6804102", "0.6796639", "0.6783674", "0.67487663", "0.6735238", "0.6731134", "0.6724967", "0.6723444", "0.6694346", "0.6684209", "0.6682616", "0.6620576", "0.66125417", "0.6589962", "0.65778327", "0.65687925", "0.65287614", "0.65251666", "0.65233064", "0.6482618", "0.647094", "0.64567703", "0.6444234", "0.6420219", "0.6418063", "0.6411744", "0.64086974", "0.63982517", "0.6396629", "0.6389624", "0.63863176", "0.63678867", "0.6349747", "0.6345367", "0.63444763", "0.6341019", "0.63404167", "0.6336221", "0.6331803", "0.6326474", "0.6316202", "0.6314665", "0.63115114", "0.6286979", "0.6282879", "0.6281203", "0.6272127", "0.6271333", "0.62644523", "0.6260693", "0.62482446", "0.62376446", "0.6222016", "0.6220018", "0.6212075", "0.61981016", "0.6186298", "0.6183321", "0.61758476", "0.6169677", "0.61634165", "0.6156582", "0.6152133", "0.6140639", "0.6134477", "0.6134094", "0.61311203", "0.6116816", "0.61139685", "0.61051506", "0.60943115", "0.60889906", "0.60766953", "0.6069113", "0.60657626", "0.60621095", "0.6057675", "0.6047146", "0.6046223", "0.6045583", "0.60203075", "0.6018359", "0.5992717", "0.5986436", "0.59817004", "0.5981691", "0.59789926", "0.59625655", "0.59540534", "0.59518665", "0.59509736" ]
0.0
-1
Test case number: 20 /Coverage entropy=1.7923017099761813
@Test(timeout = 4000) public void test20() throws Throwable { FBProcedureCall fBProcedureCall0 = new FBProcedureCall(); int int0 = 11; FBProcedureParam fBProcedureParam0 = fBProcedureCall0.addParam(11, "^gZRnc2Y!%jU?C2`8"); fBProcedureCall0.getSQL(false); FBProcedureParam fBProcedureParam1 = fBProcedureCall0.addParam(11, "EXECUTE PROCEDURE null(^gZRnc2Y!%jU?C2`8)"); fBProcedureParam0.setValue("^gZRnc2Y!%jU?C2`8"); fBProcedureParam1.setIndex(11); int int1 = (-1348); fBProcedureParam1.setType((-1348)); fBProcedureParam0.setIndex(11); fBProcedureParam1.setType(11); fBProcedureParam1.setIndex(547); fBProcedureParam1.setIndex((-201774121)); FBProcedureParam fBProcedureParam2 = fBProcedureCall0.getInputParam((-201774121)); fBProcedureParam0.setType(11); fBProcedureParam1.setIndex(547); fBProcedureCall0.addInputParam(fBProcedureParam2); fBProcedureParam1.setIndex(1967); fBProcedureParam1.setIndex((-201774121)); fBProcedureParam0.setValue("EXECUTE PROCEDURE null(^gZRnc2Y!%jU?C2`8)"); try { fBProcedureCall0.registerOutParam(1625, 749); fail("Expecting exception: FBSQLException"); } catch(FBSQLException e) { // // Cannot find parameter with the specified position. // verifyException("org.firebirdsql.jdbc.FBProcedureCall", e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test126() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.totalCost();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.getHeader();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderPRC((-1));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctIncorrect();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test29() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.pctCorrect();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test40() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, evaluation0.unclassified(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.avgCost();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertEquals(2, doubleArray0.length);\n assertNotNull(doubleArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n \n evaluation0.useNoPriors();\n assertEquals(Double.NaN, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test17() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFPriorEntropy();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(false);\n assertEquals(\"=== Summary ===\\n\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.priorEntropy();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setNumericPriorsFromBuffer();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test119() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString((String) null, true);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(\"null\\nTotal Number of Instances 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanPriorEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives((-1436));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n public void test35() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(Double.NaN, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString();\n assertEquals(\"=== Detailed Accuracy By Class ===\\n\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"Y#:')*#rI\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numInstances();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(360, (-336.251));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test36() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.incorrect();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "public void testSummaryStatsPartialLog() {\n\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset98.txt\");\n GcManager gcManager = new GcManager();\n File preprocessedFile = gcManager.preprocess(testFile, null);\n gcManager.store(preprocessedFile, false);\n JvmRun jvmRun = gcManager.getJvmRun(new Jvm(null, null), Constants.DEFAULT_BOTTLENECK_THROUGHPUT_THRESHOLD);\n Assert.assertEquals(\"GC event type count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertEquals(\"GC blocking event count not correct.\", 2, jvmRun.getBlockingEventCount());\n Assert.assertEquals(\"GC pause total not correct.\", 61, jvmRun.getTotalGcPause());\n Assert.assertEquals(\"GC first timestamp not correct.\", 1002192, jvmRun.getFirstGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last timestamp not correct.\", 1002847, jvmRun.getLastGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last duration not correct.\", 41, jvmRun.getLastGcEvent().getDuration());\n Assert.assertEquals(\"Stopped Time event count not correct.\", 6, jvmRun.getStoppedTimeEventCount());\n Assert.assertEquals(\"Stopped time total not correct.\", 1064, jvmRun.getTotalStoppedTime());\n Assert.assertEquals(\"Stopped first timestamp not correct.\", 1000964,\n jvmRun.getFirstStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last timestamp not correct.\", 1003884,\n jvmRun.getLastStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last duration not correct.\", 1000688, jvmRun.getLastStoppedEvent().getDuration());\n Assert.assertEquals(\"JVM first event timestamp not correct.\", 1000964, jvmRun.getFirstEvent().getTimestamp());\n Assert.assertEquals(\"JVM last event timestamp not correct.\", 1003884, jvmRun.getLastEvent().getTimestamp());\n Assert.assertEquals(\"JVM run duration not correct.\", 3920, jvmRun.getJvmRunDuration());\n Assert.assertEquals(\"GC throughput not correct.\", 98, jvmRun.getGcThroughput());\n Assert.assertEquals(\"Stopped time throughput not correct.\", 73, jvmRun.getStoppedTimeThroughput());\n Assert.assertTrue(Analysis.WARN_GC_STOPPED_RATIO + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_GC_STOPPED_RATIO));\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }", "@Test\n public void test33() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC(17);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1D() {\n CuteNetlibCase.doTest(\"FIT1D.SIF\", \"-9146.378092421019\", \"80453.99999999999\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize(\"'B1of2'\");\n int[] intArray0 = new int[8];\n intArray0[0] = 18;\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"'B1of2'\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(6, stringArray0.length);\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.recall((-9));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setDiscardPredictions(false);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertFalse(evaluation0.getDiscardPredictions());\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.getRevision();\n assertEquals(\"8964\", string0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\"\", false);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test\n public void test21() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.errorRate();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_07() {\n CuteNetlibCase.doTest(\"OSA-07.SIF\", \"535722.517299352\", \"4332086.205299969\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getBinRangesString(2607);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC50A() {\n CuteNetlibCase.doTest(\"SC50A.SIF\", \"-64.57507705856449\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize(\"\\tInvert matching sense of column indexes.\");\n discretize0.setOutputFormat();\n discretize0.listOptions();\n Discretize discretize1 = new Discretize();\n discretize1.setIgnoreClass(false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\\tInvert matching sense of column indexes.\";\n stringArray0[1] = \"\";\n Discretize.main(stringArray0);\n String string0 = discretize1.findNumBinsTipText();\n assertEquals(\"Optimize number of equal-width bins using leave-one-out. Doesn't work for equal-frequency binning\", string0);\n \n discretize1.setInvertSelection(false);\n discretize0.getBinRangesString(511);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n \n discretize1.getFindNumBins();\n assertEquals(10, discretize1.getBins());\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.unclassified();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test30() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertFalse(boolean0);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_14() {\n CuteNetlibCase.doTest(\"OSA-14.SIF\", \"1106462.8447362552\", \"9377699.405100001\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.toMatrixString(\"getPreBuiltClassifiers\");\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test16() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.SFSchemeEntropy();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertFalse(boolean0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test19() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBInformation();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n Discretize discretize0 = new Discretize(\"*W5D<hSCW|8@I\");\n int[] intArray0 = new int[9];\n intArray0[0] = (-1405);\n intArray0[1] = (-2938);\n intArray0[2] = (-1954);\n intArray0[3] = 9;\n intArray0[4] = 66;\n intArray0[5] = 573;\n intArray0[6] = 0;\n intArray0[7] = (-71);\n intArray0[8] = 99;\n discretize0.setAttributeIndicesArray(intArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n public void test18() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test15() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n byte[] byteArray0 = new byte[3];\n byteArray0[0] = (byte)108;\n byteArray0[1] = (byte)27;\n byteArray0[2] = (byte)14;\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n discretize0.setBins((-830));\n discretize0.getOptions();\n assertEquals((-830), discretize0.getBins());\n }", "@Test\n public void test01() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-1459.149165489484), ',');\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test13() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n @Tag(\"slow\")\n public void testCZPROB() {\n CuteNetlibCase.doTest(\"CZPROB.SIF\", \"2185196.6988565763\", \"3089066.71321333\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(0.0, Double.NaN);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testKEN_07() {\n CuteNetlibCase.doTest(\"KEN-07.SIF\", \"-6.795204433816869E8\", \"-1.61949281194431E8\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(Double.NaN);\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test15() throws Throwable {\n Discretize discretize0 = new Discretize(\"\");\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(4, stringArray0.length);\n }", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n Attribute attribute0 = new Attribute(\"invalid CVS revision - not dots!\");\n attribute0.setWeight(0.0);\n Attribute.typeToString(attribute0);\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"UR<dj;O\", arrayList0, 3);\n Instances instances1 = new Instances(instances0);\n boolean boolean0 = discretize0.setInputFormat(instances1);\n assertFalse(boolean0);\n \n String[] stringArray0 = new String[3];\n stringArray0[0] = \".bsi\";\n stringArray0[1] = \"invalid CVS revision - not dots!\";\n stringArray0[2] = \"@end\";\n discretize0.setOptions(stringArray0);\n discretize0.setOptions(stringArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test088() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBRelativeInformation();\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCRE_A() {\n CuteNetlibCase.doTest(\"CRE-A.SIF\", \"2.9889732905677114E7\", \"2.9889732905677114E7\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toCumulativeMarginDistributionString();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(\" -1 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test020() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\".arff\", true);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\".arff\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1P() {\n CuteNetlibCase.doTest(\"FIT1P.SIF\", \"9146.378092420955\", null, NumberContext.of(7, 4));\n }", "public void testLiangFigure6() {\n int[] a = {0, 0, 0, 0, 1, 1, 1, 1};\n int[] b = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] c = {0, 1, 0, 1, 0, 1, 0, 1};\n int[] ap = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] bp = {0, 1, 0, 1, 1, 1, 1, 1};\n int[] cp = {0, 0, 0, 1, 0, 1, 1, 1};\n\n for (int i = 0; i < ntimes - 1; i++) {\n cases[i][0] = a[i];\n cases[i][1] = b[i];\n cases[i][2] = c[i];\n cases[i + 1][3] = ap[i];\n cases[i + 1][4] = bp[i];\n cases[i + 1][5] = cp[i];\n }\n cases[8][0] = 0;\n cases[8][1] = 0;\n cases[8][2] = 0;\n cases[0][3] = 0;\n cases[0][4] = 0;\n cases[0][5] = 0;\n\n RevealEvaluator re = new RevealEvaluator(cases);\n\n double rea = re.entropy(a);\n assertEquals(1.0, rea, TOLERANCE);\n System.out.println(\"H(a) = \" + rea); //Should be 1.0\n\n double reb = re.entropy(b);\n assertEquals(1.0, reb, TOLERANCE);\n System.out.println(\"H(b) = \" + reb); //Should be 1.0\n\n double rec = re.entropy(c);\n assertEquals(1.0, rec, TOLERANCE);\n System.out.println(\"H(c) = \" + rec); //Should be 1.0\n\n double reab = re.jointEntropy(a, b);\n assertEquals(2.0, reab, TOLERANCE);\n System.out.println(\"H(a,b) = \" + reab); //Should be 2.0\n\n double reap = re.entropy(ap);\n assertEquals(1.0, reap, TOLERANCE);\n System.out.println(\"H(ap) = \" + reap); //Should be 1.0\n\n double rebp = re.entropy(bp);\n assertEquals(0.8112781244591328, rebp, TOLERANCE);\n System.out.println(\"H(bp) = \" + rebp); //Should be 0.8112781244591328\n\n double recp = re.entropy(cp);\n assertEquals(1.0, recp, TOLERANCE);\n System.out.println(\"H(cp) = \" + recp); //Should be 1.0\n\n double reapa = re.jointEntropy(ap, a);\n assertEquals(2.0, reapa, TOLERANCE);\n System.out.println(\"H(ap, a) = \" + reapa); //Should be 2.0\n\n double rebpb = re.jointEntropy(bp, b);\n assertEquals(1.8112781244591327, rebpb, TOLERANCE);\n System.out.println(\n \"H(bp, b) = \" + rebpb); //Should be 1.8112781244591327\n\n double recpb = re.jointEntropy(cp, b);\n assertEquals(1.8112781244591327, recpb, TOLERANCE);\n System.out.println(\n \"H(cp, b) = \" + recpb); //Should be 1.8112781244591327\n\n int[][] ab = new int[2][8];\n for (int i = 0; i < 8; i++) {\n ab[0][i] = a[i];\n ab[1][i] = b[i];\n }\n\n double rebpab = re.jointEntropy(bp, ab);\n assertEquals(2.5, rebpab, TOLERANCE);\n System.out.println(\"H(bp, a, b) = \" + rebpab); //Should be 2.5\n\n double recpab = re.jointEntropy(cp, ab);\n assertEquals(2.5, recpab, TOLERANCE);\n System.out.println(\"H(cp, a, b) = \" + recpab); //Should be 2.5\n\n int[][] abc = new int[3][8];\n for (int i = 0; i < 8; i++) {\n abc[0][i] = a[i];\n abc[1][i] = b[i];\n abc[2][i] = c[i];\n }\n\n double recpabc = re.jointEntropy(cp, abc);\n assertEquals(3.0, recpabc, TOLERANCE);\n System.out.println(\"H(cp, a, b, c) = \" + recpabc); //Should be 3.0\n\n //Setup array cases and test mutualInformation\n int[] p = new int[1];\n p[0] = 0;\n\n double rembpa = re.mutualInformation(4, p, 1);\n assertEquals(0.31127812445913294, rembpa, TOLERANCE);\n System.out.println(\n \"M(Bp, A) = \" + rembpa); //Should be 0.31127812445913294\n\n int[] pp = new int[2];\n pp[0] = 0;\n pp[1] = 1;\n\n double rmcpab = re.mutualInformation(5, pp, 1);\n assertEquals(0.5, rmcpab, TOLERANCE);\n System.out.println(\"M(Cp, [A,B]) = \" + rmcpab); //Should be 0.5\n\n int[] ppp = new int[3];\n ppp[0] = 0;\n ppp[1] = 1;\n ppp[2] = 2;\n\n double rmcpabc = re.mutualInformation(5, ppp, 1);\n assertEquals(1.0, rmcpabc, TOLERANCE);\n System.out.println(\"M(Cp, [A,B,C]) = \" + rmcpabc); //Should be 1.0\n\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCORPION() {\n CuteNetlibCase.doTest(\"SCORPION.SIF\", \"1878.1248227381068\", null, NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testOSA_60() {\n CuteNetlibCase.doTest(\"OSA-60.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test16() throws Throwable {\n Discretize discretize0 = new Discretize();\n String[] stringArray0 = discretize0.getOptions();\n discretize0.setOptions(stringArray0);\n assertEquals(6, stringArray0.length);\n \n String string0 = discretize0.globalInfo();\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"An instance filter that discretizes a range of numeric attributes in the dataset into nominal attributes. Discretization is by simple binning. Skips the class attribute if set.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR25() {\n CuteNetlibCase.doTest(\"SCAGR25.SIF\", \"-1.475343306076852E7\", null, NumberContext.of(7, 4));\n }", "@Test\n public void test14() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n discretize0.m_UseEqualFrequency = true;\n discretize0.getOptions();\n assertTrue(discretize0.getMakeBinary());\n \n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test(timeout = 4000)\n public void test040() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.falseNegativeRate((-2));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void testFitnessProportionateSelection()\n {\n }", "@Test\n public void costTest() {\n // TODO: test cost\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC205() {\n CuteNetlibCase.doTest(\"SC205.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testKEN_13() {\n CuteNetlibCase.doTest(\"KEN-13.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test049() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC((-1));\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n\tpublic void testOptimization() throws Exception {\n\t\tfor(int i = 0; i < 20000000; i++) {\n\t\t\tint _300s = (int) (Math.random() * 100);\n\t\t\tint _100s = (int) (Math.random() * 100);\n\t\t\tint _50s = (int) (Math.random() * 100);\n\t\t\tint misses = (int) (Math.random() * 100);\n\t\t\t\n\t\t\tdouble acc = OsuApiScore.getAccuracy(_300s, _100s, _50s, misses);\n\t\t\t\n\t\t\tAccuracyDistribution accuracyDistribution = AccuracyDistribution.closest(\n\t\t\t\t\t_300s + _100s + _50s + misses, misses,\n\t\t\t\t\tacc);\n\t\t\t\n\t\t\tdouble rec = OsuApiScore.getAccuracy(accuracyDistribution.getX300(),\n\t\t\t\t\taccuracyDistribution.getX100(), accuracyDistribution.getX50(),\n\t\t\t\t\taccuracyDistribution.getMiss());\n\t\t\t\n\t\t\tassertEquals(acc, rec, 0d);\n\t\t}\n\t}", "@Test\n @Tag(\"unstable\")\n @Tag(\"bm1000\")\n public void testTUFF() {\n CuteNetlibCase.doTest(\"TUFF.SIF\", \"0.29214776509361284\", \"0.8949901867574317\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test05() throws Throwable {\n Discretize discretize0 = new Discretize(\"^yH*RVC#\\\"|tm,k2XpGN\");\n String[] stringArray0 = new String[2];\n discretize0.m_ClassIndex = 906;\n discretize0.m_IgnoreClass = true;\n stringArray0[0] = \"^yH*RVC#\\\"|tm,k2XpGN\";\n stringArray0[1] = \"^yH*RVC#\\\"|tm,k2XpGN\";\n discretize0.setOptions(stringArray0);\n discretize0.setAttributeIndices(\"^yH*RVC#\\\"|tm,k2XpGN\");\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getFindNumBins());\n }", "@Test(timeout = 4000)\n public void test21() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.attributeIndicesTipText();\n assertEquals(\"Specify range of attributes to act on. This is a comma separated list of attribute indices, with \\\"first\\\" and \\\"last\\\" valid values. Specify an inclusive range with \\\"-\\\". E.g: \\\"first-3,5,6-10,last\\\".\", string0);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testSCRS8() {\n CuteNetlibCase.doTest(\"SCRS8.SIF\", \"960.0206152764557\", null, NumberContext.of(7, 4));\n }" ]
[ "0.74232537", "0.72039926", "0.7013473", "0.7004497", "0.700061", "0.6998691", "0.6975735", "0.6973312", "0.6910475", "0.68690825", "0.685255", "0.6785376", "0.6759719", "0.6757174", "0.6739618", "0.673375", "0.67206895", "0.67160875", "0.6711583", "0.67015076", "0.6698686", "0.6667778", "0.66495275", "0.66164976", "0.6583392", "0.6577355", "0.65664", "0.6558246", "0.654734", "0.65315115", "0.6531068", "0.6527578", "0.652218", "0.6515292", "0.65044504", "0.65023714", "0.6492833", "0.6488646", "0.647629", "0.64719427", "0.64631605", "0.6459375", "0.64570665", "0.64563894", "0.6438554", "0.64376736", "0.6436768", "0.6423314", "0.6420729", "0.6416775", "0.64161736", "0.64084035", "0.6407414", "0.64033496", "0.63926405", "0.6375162", "0.6368089", "0.63664436", "0.63663", "0.6361293", "0.63606983", "0.6359133", "0.6355821", "0.63308406", "0.6304854", "0.63001806", "0.62970084", "0.62952286", "0.62867314", "0.6281595", "0.6271724", "0.6271272", "0.6268654", "0.62631303", "0.6257117", "0.62509096", "0.6247505", "0.624031", "0.6238078", "0.6236608", "0.6236061", "0.6231213", "0.6221978", "0.6212219", "0.6210751", "0.62076414", "0.61955875", "0.61901057", "0.6183874", "0.618113", "0.61780965", "0.61733997", "0.6162624", "0.6152075", "0.6151141", "0.61477166", "0.61452776", "0.61293006", "0.61281914", "0.61253315", "0.61060864" ]
0.0
-1
Test case number: 21 /Coverage entropy=1.8089909587099502
@Test(timeout = 4000) public void test21() throws Throwable { FBProcedureCall fBProcedureCall0 = new FBProcedureCall(); FBProcedureParam fBProcedureParam0 = fBProcedureCall0.addParam(40, "it was not registered as output parameter."); String string0 = "--D"; FBProcedureParam fBProcedureParam1 = fBProcedureCall0.addParam(3674, "--D"); FBProcedureParam fBProcedureParam2 = new FBProcedureParam(40, "it was not registered as output parameter."); fBProcedureParam0.clone(); fBProcedureParam2.setType(31); fBProcedureParam1.setIndex((-587)); fBProcedureCall0.addOutputParam(fBProcedureParam0); fBProcedureCall0.addInputParam(fBProcedureParam2); fBProcedureCall0.getOutputParam((-1)); FBProcedureCall fBProcedureCall1 = new FBProcedureCall(); int int0 = (-201774121); try { fBProcedureCall1.registerOutParam(40, (-201774121)); fail("Expecting exception: FBSQLException"); } catch(FBSQLException e) { // // Cannot find parameter with the specified position. // verifyException("org.firebirdsql.jdbc.FBProcedureCall", e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test126() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.totalCost();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.getHeader();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test29() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.pctCorrect();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test40() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, evaluation0.unclassified(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.avgCost();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.priorEntropy();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test17() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFPriorEntropy();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanPriorEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderPRC((-1));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctIncorrect();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n \n evaluation0.useNoPriors();\n assertEquals(Double.NaN, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setNumericPriorsFromBuffer();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertEquals(2, doubleArray0.length);\n assertNotNull(doubleArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives((-1436));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test119() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString((String) null, true);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(\"null\\nTotal Number of Instances 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(false);\n assertEquals(\"=== Summary ===\\n\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n }", "@Test\n public void test35() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(Double.NaN, double0, 0.01D);\n }", "@Test\n public void test36() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.incorrect();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test16() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.SFSchemeEntropy();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test33() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n public void test21() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.errorRate();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString();\n assertEquals(\"=== Detailed Accuracy By Class ===\\n\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1D() {\n CuteNetlibCase.doTest(\"FIT1D.SIF\", \"-9146.378092421019\", \"80453.99999999999\", NumberContext.of(7, 4));\n }", "@Test\n public void test19() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBInformation();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test15() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.recall((-9));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"Y#:')*#rI\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numInstances();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n public void test13() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n public void test18() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "public void testLiangFigure6() {\n int[] a = {0, 0, 0, 0, 1, 1, 1, 1};\n int[] b = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] c = {0, 1, 0, 1, 0, 1, 0, 1};\n int[] ap = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] bp = {0, 1, 0, 1, 1, 1, 1, 1};\n int[] cp = {0, 0, 0, 1, 0, 1, 1, 1};\n\n for (int i = 0; i < ntimes - 1; i++) {\n cases[i][0] = a[i];\n cases[i][1] = b[i];\n cases[i][2] = c[i];\n cases[i + 1][3] = ap[i];\n cases[i + 1][4] = bp[i];\n cases[i + 1][5] = cp[i];\n }\n cases[8][0] = 0;\n cases[8][1] = 0;\n cases[8][2] = 0;\n cases[0][3] = 0;\n cases[0][4] = 0;\n cases[0][5] = 0;\n\n RevealEvaluator re = new RevealEvaluator(cases);\n\n double rea = re.entropy(a);\n assertEquals(1.0, rea, TOLERANCE);\n System.out.println(\"H(a) = \" + rea); //Should be 1.0\n\n double reb = re.entropy(b);\n assertEquals(1.0, reb, TOLERANCE);\n System.out.println(\"H(b) = \" + reb); //Should be 1.0\n\n double rec = re.entropy(c);\n assertEquals(1.0, rec, TOLERANCE);\n System.out.println(\"H(c) = \" + rec); //Should be 1.0\n\n double reab = re.jointEntropy(a, b);\n assertEquals(2.0, reab, TOLERANCE);\n System.out.println(\"H(a,b) = \" + reab); //Should be 2.0\n\n double reap = re.entropy(ap);\n assertEquals(1.0, reap, TOLERANCE);\n System.out.println(\"H(ap) = \" + reap); //Should be 1.0\n\n double rebp = re.entropy(bp);\n assertEquals(0.8112781244591328, rebp, TOLERANCE);\n System.out.println(\"H(bp) = \" + rebp); //Should be 0.8112781244591328\n\n double recp = re.entropy(cp);\n assertEquals(1.0, recp, TOLERANCE);\n System.out.println(\"H(cp) = \" + recp); //Should be 1.0\n\n double reapa = re.jointEntropy(ap, a);\n assertEquals(2.0, reapa, TOLERANCE);\n System.out.println(\"H(ap, a) = \" + reapa); //Should be 2.0\n\n double rebpb = re.jointEntropy(bp, b);\n assertEquals(1.8112781244591327, rebpb, TOLERANCE);\n System.out.println(\n \"H(bp, b) = \" + rebpb); //Should be 1.8112781244591327\n\n double recpb = re.jointEntropy(cp, b);\n assertEquals(1.8112781244591327, recpb, TOLERANCE);\n System.out.println(\n \"H(cp, b) = \" + recpb); //Should be 1.8112781244591327\n\n int[][] ab = new int[2][8];\n for (int i = 0; i < 8; i++) {\n ab[0][i] = a[i];\n ab[1][i] = b[i];\n }\n\n double rebpab = re.jointEntropy(bp, ab);\n assertEquals(2.5, rebpab, TOLERANCE);\n System.out.println(\"H(bp, a, b) = \" + rebpab); //Should be 2.5\n\n double recpab = re.jointEntropy(cp, ab);\n assertEquals(2.5, recpab, TOLERANCE);\n System.out.println(\"H(cp, a, b) = \" + recpab); //Should be 2.5\n\n int[][] abc = new int[3][8];\n for (int i = 0; i < 8; i++) {\n abc[0][i] = a[i];\n abc[1][i] = b[i];\n abc[2][i] = c[i];\n }\n\n double recpabc = re.jointEntropy(cp, abc);\n assertEquals(3.0, recpabc, TOLERANCE);\n System.out.println(\"H(cp, a, b, c) = \" + recpabc); //Should be 3.0\n\n //Setup array cases and test mutualInformation\n int[] p = new int[1];\n p[0] = 0;\n\n double rembpa = re.mutualInformation(4, p, 1);\n assertEquals(0.31127812445913294, rembpa, TOLERANCE);\n System.out.println(\n \"M(Bp, A) = \" + rembpa); //Should be 0.31127812445913294\n\n int[] pp = new int[2];\n pp[0] = 0;\n pp[1] = 1;\n\n double rmcpab = re.mutualInformation(5, pp, 1);\n assertEquals(0.5, rmcpab, TOLERANCE);\n System.out.println(\"M(Cp, [A,B]) = \" + rmcpab); //Should be 0.5\n\n int[] ppp = new int[3];\n ppp[0] = 0;\n ppp[1] = 1;\n ppp[2] = 2;\n\n double rmcpabc = re.mutualInformation(5, ppp, 1);\n assertEquals(1.0, rmcpabc, TOLERANCE);\n System.out.println(\"M(Cp, [A,B,C]) = \" + rmcpabc); //Should be 1.0\n\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setDiscardPredictions(false);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertFalse(evaluation0.getDiscardPredictions());\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(360, (-336.251));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.toMatrixString(\"getPreBuiltClassifiers\");\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_07() {\n CuteNetlibCase.doTest(\"OSA-07.SIF\", \"535722.517299352\", \"4332086.205299969\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.unclassified();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(Double.NaN);\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC(17);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertFalse(boolean0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test30() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertFalse(boolean0);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_14() {\n CuteNetlibCase.doTest(\"OSA-14.SIF\", \"1106462.8447362552\", \"9377699.405100001\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.getRevision();\n assertEquals(\"8964\", string0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testKEN_07() {\n CuteNetlibCase.doTest(\"KEN-07.SIF\", \"-6.795204433816869E8\", \"-1.61949281194431E8\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\"\", false);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC50A() {\n CuteNetlibCase.doTest(\"SC50A.SIF\", \"-64.57507705856449\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n discretize0.m_UseEqualFrequency = true;\n discretize0.getOptions();\n assertTrue(discretize0.getMakeBinary());\n \n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test\n public void test01() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-1459.149165489484), ',');\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test14() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(0.95);\n assertNotNull(doubleArray0);\n assertArrayEquals(new double[] {1.0, 0.0}, doubleArray0, 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "public void testSummaryStatsPartialLog() {\n\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset98.txt\");\n GcManager gcManager = new GcManager();\n File preprocessedFile = gcManager.preprocess(testFile, null);\n gcManager.store(preprocessedFile, false);\n JvmRun jvmRun = gcManager.getJvmRun(new Jvm(null, null), Constants.DEFAULT_BOTTLENECK_THROUGHPUT_THRESHOLD);\n Assert.assertEquals(\"GC event type count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertEquals(\"GC blocking event count not correct.\", 2, jvmRun.getBlockingEventCount());\n Assert.assertEquals(\"GC pause total not correct.\", 61, jvmRun.getTotalGcPause());\n Assert.assertEquals(\"GC first timestamp not correct.\", 1002192, jvmRun.getFirstGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last timestamp not correct.\", 1002847, jvmRun.getLastGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last duration not correct.\", 41, jvmRun.getLastGcEvent().getDuration());\n Assert.assertEquals(\"Stopped Time event count not correct.\", 6, jvmRun.getStoppedTimeEventCount());\n Assert.assertEquals(\"Stopped time total not correct.\", 1064, jvmRun.getTotalStoppedTime());\n Assert.assertEquals(\"Stopped first timestamp not correct.\", 1000964,\n jvmRun.getFirstStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last timestamp not correct.\", 1003884,\n jvmRun.getLastStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last duration not correct.\", 1000688, jvmRun.getLastStoppedEvent().getDuration());\n Assert.assertEquals(\"JVM first event timestamp not correct.\", 1000964, jvmRun.getFirstEvent().getTimestamp());\n Assert.assertEquals(\"JVM last event timestamp not correct.\", 1003884, jvmRun.getLastEvent().getTimestamp());\n Assert.assertEquals(\"JVM run duration not correct.\", 3920, jvmRun.getJvmRunDuration());\n Assert.assertEquals(\"GC throughput not correct.\", 98, jvmRun.getGcThroughput());\n Assert.assertEquals(\"Stopped time throughput not correct.\", 73, jvmRun.getStoppedTimeThroughput());\n Assert.assertTrue(Analysis.WARN_GC_STOPPED_RATIO + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_GC_STOPPED_RATIO));\n }", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n Discretize discretize0 = new Discretize(\"*W5D<hSCW|8@I\");\n int[] intArray0 = new int[9];\n intArray0[0] = (-1405);\n intArray0[1] = (-2938);\n intArray0[2] = (-1954);\n intArray0[3] = 9;\n intArray0[4] = 66;\n intArray0[5] = 573;\n intArray0[6] = 0;\n intArray0[7] = (-71);\n intArray0[8] = 99;\n discretize0.setAttributeIndicesArray(intArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCRE_A() {\n CuteNetlibCase.doTest(\"CRE-A.SIF\", \"2.9889732905677114E7\", \"2.9889732905677114E7\", NumberContext.of(7, 4));\n }", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(0.0, Double.NaN);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getBinRangesString(2607);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize(\"\\tInvert matching sense of column indexes.\");\n discretize0.setOutputFormat();\n discretize0.listOptions();\n Discretize discretize1 = new Discretize();\n discretize1.setIgnoreClass(false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\\tInvert matching sense of column indexes.\";\n stringArray0[1] = \"\";\n Discretize.main(stringArray0);\n String string0 = discretize1.findNumBinsTipText();\n assertEquals(\"Optimize number of equal-width bins using leave-one-out. Doesn't work for equal-frequency binning\", string0);\n \n discretize1.setInvertSelection(false);\n discretize0.getBinRangesString(511);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n \n discretize1.getFindNumBins();\n assertEquals(10, discretize1.getBins());\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1P() {\n CuteNetlibCase.doTest(\"FIT1P.SIF\", \"9146.378092420955\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n byte[] byteArray0 = new byte[3];\n byteArray0[0] = (byte)108;\n byteArray0[1] = (byte)27;\n byteArray0[2] = (byte)14;\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n discretize0.setBins((-830));\n discretize0.getOptions();\n assertEquals((-830), discretize0.getBins());\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toCumulativeMarginDistributionString();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(\" -1 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test088() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBRelativeInformation();\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCORPION() {\n CuteNetlibCase.doTest(\"SCORPION.SIF\", \"1878.1248227381068\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n Attribute attribute0 = new Attribute(\"invalid CVS revision - not dots!\");\n attribute0.setWeight(0.0);\n Attribute.typeToString(attribute0);\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"UR<dj;O\", arrayList0, 3);\n Instances instances1 = new Instances(instances0);\n boolean boolean0 = discretize0.setInputFormat(instances1);\n assertFalse(boolean0);\n \n String[] stringArray0 = new String[3];\n stringArray0[0] = \".bsi\";\n stringArray0[1] = \"invalid CVS revision - not dots!\";\n stringArray0[2] = \"@end\";\n discretize0.setOptions(stringArray0);\n discretize0.setOptions(stringArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n }", "@Test\n @Tag(\"slow\")\n public void testCZPROB() {\n CuteNetlibCase.doTest(\"CZPROB.SIF\", \"2185196.6988565763\", \"3089066.71321333\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize(\"'B1of2'\");\n int[] intArray0 = new int[8];\n intArray0[0] = 18;\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"'B1of2'\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(6, stringArray0.length);\n }", "@Test(timeout = 4000)\n public void test006() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedAreaUnderPRC();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR25() {\n CuteNetlibCase.doTest(\"SCAGR25.SIF\", \"-1.475343306076852E7\", null, NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC205() {\n CuteNetlibCase.doTest(\"SC205.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test041() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.fMeasure((-2765));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test020() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\".arff\", true);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\".arff\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "public void test_0020() {\n int nFactors = 2;\n FactorAnalysis instance = new FactorAnalysis(data, nFactors);\n\n assertEquals(instance.nObs(), 18., 1e-15);\n assertEquals(instance.nVariables(), 6., 1e-15);\n assertEquals(instance.nFactors(), 2., 1e-15);\n\n FAEstimator estimators = instance.getEstimators(400);\n\n Vector uniqueness = estimators.psi();\n assertArrayEquals(\n new double[]{0.005, 0.114, 0.642, 0.742, 0.005, 0.097},\n uniqueness.toArray(),\n 2e-2);\n\n int dof = estimators.dof();\n assertEquals(dof, 4);\n\n double fitted = estimators.logLikelihood();\n assertEquals(fitted, 1.803, 1e-3);\n\n Matrix loadings = estimators.loadings();\n assertTrue(AreMatrices.equal(\n new DenseMatrix(new double[][]{\n {0.971, 0.228},\n {0.917, 0.213},\n {0.429, 0.418},\n {0.363, 0.355},\n {0.254, 0.965},\n {0.205, 0.928}\n }),\n loadings,\n 1e-3));\n\n double testStats = estimators.statistics();\n assertEquals(testStats, 23.14, 1e-2);\n\n double pValue = estimators.pValue();\n assertEquals(pValue, 0.000119, 1e-6);//R: 1-pchisq(23.14, df=4) = 0.0001187266\n\n// System.out.println(uniqueness.toString());\n// System.out.println(fitted);\n// System.out.println(loadings.toString());\n }", "@Test(timeout = 4000)\n public void test18() throws Throwable {\n Discretize discretize0 = new Discretize(\"%\");\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n discretize0.findNumBinsTipText();\n double[][] doubleArray0 = new double[0][7];\n discretize0.m_CutPoints = doubleArray0;\n FileSystemHandling.setPermissions((EvoSuiteFile) null, true, false, true);\n discretize0.setInvertSelection(false);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n @Tag(\"unstable\")\n @Tag(\"bm1000\")\n public void testTUFF() {\n CuteNetlibCase.doTest(\"TUFF.SIF\", \"0.29214776509361284\", \"0.8949901867574317\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test16() throws Throwable {\n Discretize discretize0 = new Discretize();\n String[] stringArray0 = discretize0.getOptions();\n discretize0.setOptions(stringArray0);\n assertEquals(6, stringArray0.length);\n \n String string0 = discretize0.globalInfo();\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"An instance filter that discretizes a range of numeric attributes in the dataset into nominal attributes. Discretization is by simple binning. Skips the class attribute if set.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testOSA_60() {\n CuteNetlibCase.doTest(\"OSA-60.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test04() throws Throwable {\n Discretize discretize0 = new Discretize(\"9/&=Kq&\");\n discretize0.getBinRangesString((-1679));\n int int0 = (-98);\n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualWidthBinning((-98));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test049() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC((-1));\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test23() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.setIgnoreClass(true);\n discretize0.getOptions();\n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test\n public void test23() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n SerializedClassifier serializedClassifier0 = new SerializedClassifier();\n Object[] objectArray0 = new Object[25];\n double[] doubleArray0 = evaluation0.evaluateModel((Classifier) serializedClassifier0, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test040() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.falseNegativeRate((-2));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }" ]
[ "0.734596", "0.7165189", "0.70119363", "0.6886519", "0.68660945", "0.68567604", "0.6854933", "0.68387", "0.68370116", "0.6831555", "0.68207234", "0.6819839", "0.68181306", "0.67826486", "0.677804", "0.674909", "0.67489016", "0.67355335", "0.6666713", "0.6653919", "0.66509813", "0.6623307", "0.66116935", "0.6593253", "0.6587212", "0.65752083", "0.657202", "0.6568569", "0.65388924", "0.6508447", "0.65045875", "0.65041", "0.649415", "0.648994", "0.6476772", "0.6473247", "0.6457931", "0.6443524", "0.64383435", "0.6435474", "0.64214796", "0.6418263", "0.6417519", "0.64165103", "0.64034104", "0.63892686", "0.6386978", "0.6386207", "0.63831663", "0.6382902", "0.6379725", "0.63770574", "0.63681215", "0.6342347", "0.6339444", "0.63370734", "0.6329207", "0.6318061", "0.6314072", "0.6312814", "0.6289281", "0.62741774", "0.6271122", "0.6271064", "0.62670773", "0.6258137", "0.62561697", "0.62557065", "0.62508094", "0.6248985", "0.62407506", "0.6238995", "0.6236527", "0.6235948", "0.62347764", "0.6234721", "0.62313294", "0.6206594", "0.619976", "0.6199744", "0.6194442", "0.6188613", "0.6155015", "0.61513394", "0.6148926", "0.6138834", "0.61244303", "0.6105369", "0.60744184", "0.6064899", "0.60593086", "0.60532606", "0.60427874", "0.60427356", "0.6024448", "0.60226685", "0.60216844", "0.6013937", "0.60116416", "0.6007047", "0.60069805" ]
0.0
-1
Test case number: 22 /Coverage entropy=1.8560362344170938
@Test(timeout = 4000) public void test22() throws Throwable { FBProcedureCall fBProcedureCall0 = new FBProcedureCall(); String string0 = "it was not registered as output parameter."; FBProcedureParam fBProcedureParam0 = fBProcedureCall0.addParam(1107, "it was not registered as output parameter."); fBProcedureCall0.addOutputParam(fBProcedureParam0); fBProcedureParam0.setType(1107); fBProcedureParam0.setType(1107); fBProcedureParam0.setIndex(1107); fBProcedureParam0.setIndex(1107); fBProcedureCall0.addOutputParam(fBProcedureParam0); FBProcedureParam fBProcedureParam1 = fBProcedureCall0.getOutputParam(2); fBProcedureCall0.addInputParam(fBProcedureParam1); fBProcedureCall0.getOutputParam(1107); try { fBProcedureCall0.registerOutParam(2, 2); fail("Expecting exception: FBSQLException"); } catch(FBSQLException e) { // // Cannot find parameter with the specified position. // verifyException("org.firebirdsql.jdbc.FBProcedureCall", e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test126() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.totalCost();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.getHeader();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test29() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.pctCorrect();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test40() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, evaluation0.unclassified(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderPRC((-1));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test17() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFPriorEntropy();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.avgCost();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setNumericPriorsFromBuffer();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n \n evaluation0.useNoPriors();\n assertEquals(Double.NaN, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.priorEntropy();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(false);\n assertEquals(\"=== Summary ===\\n\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctIncorrect();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertEquals(2, doubleArray0.length);\n assertNotNull(doubleArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test119() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString((String) null, true);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(\"null\\nTotal Number of Instances 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanPriorEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives((-1436));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n public void test35() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(Double.NaN, double0, 0.01D);\n }", "@Test\n public void test36() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.incorrect();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString();\n assertEquals(\"=== Detailed Accuracy By Class ===\\n\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test33() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, double0, 0.01D);\n }", "@Test\n public void test16() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.SFSchemeEntropy();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(360, (-336.251));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"Y#:')*#rI\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numInstances();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.recall((-9));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test15() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_07() {\n CuteNetlibCase.doTest(\"OSA-07.SIF\", \"535722.517299352\", \"4332086.205299969\", NumberContext.of(7, 4));\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC50A() {\n CuteNetlibCase.doTest(\"SC50A.SIF\", \"-64.57507705856449\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setDiscardPredictions(false);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertFalse(evaluation0.getDiscardPredictions());\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n public void test13() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.toMatrixString(\"getPreBuiltClassifiers\");\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "@Test\n public void test19() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBInformation();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test01() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-1459.149165489484), ',');\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "public void testSummaryStatsPartialLog() {\n\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset98.txt\");\n GcManager gcManager = new GcManager();\n File preprocessedFile = gcManager.preprocess(testFile, null);\n gcManager.store(preprocessedFile, false);\n JvmRun jvmRun = gcManager.getJvmRun(new Jvm(null, null), Constants.DEFAULT_BOTTLENECK_THROUGHPUT_THRESHOLD);\n Assert.assertEquals(\"GC event type count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertEquals(\"GC blocking event count not correct.\", 2, jvmRun.getBlockingEventCount());\n Assert.assertEquals(\"GC pause total not correct.\", 61, jvmRun.getTotalGcPause());\n Assert.assertEquals(\"GC first timestamp not correct.\", 1002192, jvmRun.getFirstGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last timestamp not correct.\", 1002847, jvmRun.getLastGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last duration not correct.\", 41, jvmRun.getLastGcEvent().getDuration());\n Assert.assertEquals(\"Stopped Time event count not correct.\", 6, jvmRun.getStoppedTimeEventCount());\n Assert.assertEquals(\"Stopped time total not correct.\", 1064, jvmRun.getTotalStoppedTime());\n Assert.assertEquals(\"Stopped first timestamp not correct.\", 1000964,\n jvmRun.getFirstStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last timestamp not correct.\", 1003884,\n jvmRun.getLastStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last duration not correct.\", 1000688, jvmRun.getLastStoppedEvent().getDuration());\n Assert.assertEquals(\"JVM first event timestamp not correct.\", 1000964, jvmRun.getFirstEvent().getTimestamp());\n Assert.assertEquals(\"JVM last event timestamp not correct.\", 1003884, jvmRun.getLastEvent().getTimestamp());\n Assert.assertEquals(\"JVM run duration not correct.\", 3920, jvmRun.getJvmRunDuration());\n Assert.assertEquals(\"GC throughput not correct.\", 98, jvmRun.getGcThroughput());\n Assert.assertEquals(\"Stopped time throughput not correct.\", 73, jvmRun.getStoppedTimeThroughput());\n Assert.assertTrue(Analysis.WARN_GC_STOPPED_RATIO + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_GC_STOPPED_RATIO));\n }", "@Test\n public void test18() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1D() {\n CuteNetlibCase.doTest(\"FIT1D.SIF\", \"-9146.378092421019\", \"80453.99999999999\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\"\", false);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test\n public void test21() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.errorRate();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_14() {\n CuteNetlibCase.doTest(\"OSA-14.SIF\", \"1106462.8447362552\", \"9377699.405100001\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCORPION() {\n CuteNetlibCase.doTest(\"SCORPION.SIF\", \"1878.1248227381068\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.unclassified();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test30() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertFalse(boolean0);\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC(17);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "public void testLiangFigure6() {\n int[] a = {0, 0, 0, 0, 1, 1, 1, 1};\n int[] b = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] c = {0, 1, 0, 1, 0, 1, 0, 1};\n int[] ap = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] bp = {0, 1, 0, 1, 1, 1, 1, 1};\n int[] cp = {0, 0, 0, 1, 0, 1, 1, 1};\n\n for (int i = 0; i < ntimes - 1; i++) {\n cases[i][0] = a[i];\n cases[i][1] = b[i];\n cases[i][2] = c[i];\n cases[i + 1][3] = ap[i];\n cases[i + 1][4] = bp[i];\n cases[i + 1][5] = cp[i];\n }\n cases[8][0] = 0;\n cases[8][1] = 0;\n cases[8][2] = 0;\n cases[0][3] = 0;\n cases[0][4] = 0;\n cases[0][5] = 0;\n\n RevealEvaluator re = new RevealEvaluator(cases);\n\n double rea = re.entropy(a);\n assertEquals(1.0, rea, TOLERANCE);\n System.out.println(\"H(a) = \" + rea); //Should be 1.0\n\n double reb = re.entropy(b);\n assertEquals(1.0, reb, TOLERANCE);\n System.out.println(\"H(b) = \" + reb); //Should be 1.0\n\n double rec = re.entropy(c);\n assertEquals(1.0, rec, TOLERANCE);\n System.out.println(\"H(c) = \" + rec); //Should be 1.0\n\n double reab = re.jointEntropy(a, b);\n assertEquals(2.0, reab, TOLERANCE);\n System.out.println(\"H(a,b) = \" + reab); //Should be 2.0\n\n double reap = re.entropy(ap);\n assertEquals(1.0, reap, TOLERANCE);\n System.out.println(\"H(ap) = \" + reap); //Should be 1.0\n\n double rebp = re.entropy(bp);\n assertEquals(0.8112781244591328, rebp, TOLERANCE);\n System.out.println(\"H(bp) = \" + rebp); //Should be 0.8112781244591328\n\n double recp = re.entropy(cp);\n assertEquals(1.0, recp, TOLERANCE);\n System.out.println(\"H(cp) = \" + recp); //Should be 1.0\n\n double reapa = re.jointEntropy(ap, a);\n assertEquals(2.0, reapa, TOLERANCE);\n System.out.println(\"H(ap, a) = \" + reapa); //Should be 2.0\n\n double rebpb = re.jointEntropy(bp, b);\n assertEquals(1.8112781244591327, rebpb, TOLERANCE);\n System.out.println(\n \"H(bp, b) = \" + rebpb); //Should be 1.8112781244591327\n\n double recpb = re.jointEntropy(cp, b);\n assertEquals(1.8112781244591327, recpb, TOLERANCE);\n System.out.println(\n \"H(cp, b) = \" + recpb); //Should be 1.8112781244591327\n\n int[][] ab = new int[2][8];\n for (int i = 0; i < 8; i++) {\n ab[0][i] = a[i];\n ab[1][i] = b[i];\n }\n\n double rebpab = re.jointEntropy(bp, ab);\n assertEquals(2.5, rebpab, TOLERANCE);\n System.out.println(\"H(bp, a, b) = \" + rebpab); //Should be 2.5\n\n double recpab = re.jointEntropy(cp, ab);\n assertEquals(2.5, recpab, TOLERANCE);\n System.out.println(\"H(cp, a, b) = \" + recpab); //Should be 2.5\n\n int[][] abc = new int[3][8];\n for (int i = 0; i < 8; i++) {\n abc[0][i] = a[i];\n abc[1][i] = b[i];\n abc[2][i] = c[i];\n }\n\n double recpabc = re.jointEntropy(cp, abc);\n assertEquals(3.0, recpabc, TOLERANCE);\n System.out.println(\"H(cp, a, b, c) = \" + recpabc); //Should be 3.0\n\n //Setup array cases and test mutualInformation\n int[] p = new int[1];\n p[0] = 0;\n\n double rembpa = re.mutualInformation(4, p, 1);\n assertEquals(0.31127812445913294, rembpa, TOLERANCE);\n System.out.println(\n \"M(Bp, A) = \" + rembpa); //Should be 0.31127812445913294\n\n int[] pp = new int[2];\n pp[0] = 0;\n pp[1] = 1;\n\n double rmcpab = re.mutualInformation(5, pp, 1);\n assertEquals(0.5, rmcpab, TOLERANCE);\n System.out.println(\"M(Cp, [A,B]) = \" + rmcpab); //Should be 0.5\n\n int[] ppp = new int[3];\n ppp[0] = 0;\n ppp[1] = 1;\n ppp[2] = 2;\n\n double rmcpabc = re.mutualInformation(5, ppp, 1);\n assertEquals(1.0, rmcpabc, TOLERANCE);\n System.out.println(\"M(Cp, [A,B,C]) = \" + rmcpabc); //Should be 1.0\n\n }", "@Test\n @Tag(\"slow\")\n public void testKEN_07() {\n CuteNetlibCase.doTest(\"KEN-07.SIF\", \"-6.795204433816869E8\", \"-1.61949281194431E8\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertFalse(boolean0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.getRevision();\n assertEquals(\"8964\", string0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toCumulativeMarginDistributionString();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(\" -1 0 \\n\", string0);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR25() {\n CuteNetlibCase.doTest(\"SCAGR25.SIF\", \"-1.475343306076852E7\", null, NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testCZPROB() {\n CuteNetlibCase.doTest(\"CZPROB.SIF\", \"2185196.6988565763\", \"3089066.71321333\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(0.0, Double.NaN);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test14() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCRE_A() {\n CuteNetlibCase.doTest(\"CRE-A.SIF\", \"2.9889732905677114E7\", \"2.9889732905677114E7\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(Double.NaN);\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n byte[] byteArray0 = new byte[3];\n byteArray0[0] = (byte)108;\n byteArray0[1] = (byte)27;\n byteArray0[2] = (byte)14;\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n discretize0.setBins((-830));\n discretize0.getOptions();\n assertEquals((-830), discretize0.getBins());\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC205() {\n CuteNetlibCase.doTest(\"SC205.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testOSA_60() {\n CuteNetlibCase.doTest(\"OSA-60.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n discretize0.m_UseEqualFrequency = true;\n discretize0.getOptions();\n assertTrue(discretize0.getMakeBinary());\n \n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testKEN_13() {\n CuteNetlibCase.doTest(\"KEN-13.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR7() {\n CuteNetlibCase.doTest(\"SCAGR7.SIF\", \"-2331389.8243309837\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize(\"\\tInvert matching sense of column indexes.\");\n discretize0.setOutputFormat();\n discretize0.listOptions();\n Discretize discretize1 = new Discretize();\n discretize1.setIgnoreClass(false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\\tInvert matching sense of column indexes.\";\n stringArray0[1] = \"\";\n Discretize.main(stringArray0);\n String string0 = discretize1.findNumBinsTipText();\n assertEquals(\"Optimize number of equal-width bins using leave-one-out. Doesn't work for equal-frequency binning\", string0);\n \n discretize1.setInvertSelection(false);\n discretize0.getBinRangesString(511);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n \n discretize1.getFindNumBins();\n assertEquals(10, discretize1.getBins());\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(0.95);\n assertNotNull(doubleArray0);\n assertArrayEquals(new double[] {1.0, 0.0}, doubleArray0, 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getBinRangesString(2607);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testSCRS8() {\n CuteNetlibCase.doTest(\"SCRS8.SIF\", \"960.0206152764557\", null, NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1P() {\n CuteNetlibCase.doTest(\"FIT1P.SIF\", \"9146.378092420955\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC105() {\n CuteNetlibCase.doTest(\"SC105.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test088() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBRelativeInformation();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize(\"'B1of2'\");\n int[] intArray0 = new int[8];\n intArray0[0] = 18;\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"'B1of2'\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(6, stringArray0.length);\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test020() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\".arff\", true);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\".arff\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n Discretize discretize0 = new Discretize(\"*W5D<hSCW|8@I\");\n int[] intArray0 = new int[9];\n intArray0[0] = (-1405);\n intArray0[1] = (-2938);\n intArray0[2] = (-1954);\n intArray0[3] = 9;\n intArray0[4] = 66;\n intArray0[5] = 573;\n intArray0[6] = 0;\n intArray0[7] = (-71);\n intArray0[8] = 99;\n discretize0.setAttributeIndicesArray(intArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n @Tag(\"unstable\")\n @Tag(\"bm1000\")\n public void testTUFF() {\n CuteNetlibCase.doTest(\"TUFF.SIF\", \"0.29214776509361284\", \"0.8949901867574317\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testKEN_11() {\n CuteNetlibCase.doTest(\"KEN-11.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test\n public void run () {\n\t \n\t System.out.println(\"---------->\");\n\t //System.out.println(md5list.getResult());\n\t //System.out.println(hashsearch.getResult());\n\t \n\t \n\t \n\t // System.out.println(samples.Testing());\n\t //System.out.println(\"getserult: \"+samples.getResult());\n\t \n }", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n Attribute attribute0 = new Attribute(\"invalid CVS revision - not dots!\");\n attribute0.setWeight(0.0);\n Attribute.typeToString(attribute0);\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"UR<dj;O\", arrayList0, 3);\n Instances instances1 = new Instances(instances0);\n boolean boolean0 = discretize0.setInputFormat(instances1);\n assertFalse(boolean0);\n \n String[] stringArray0 = new String[3];\n stringArray0[0] = \".bsi\";\n stringArray0[1] = \"invalid CVS revision - not dots!\";\n stringArray0[2] = \"@end\";\n discretize0.setOptions(stringArray0);\n discretize0.setOptions(stringArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n }", "@Test\n public void testCalculateProbability() throws IOException, ParseException, MathException {\n System.out.println(\"calculateProbability\");\n OrganizationsRegister ro = info(\"e\", \"f\");\n String id = \"12\";\n String expResult = \"25,25 %\";\n String result = ro.calculateProbability();\n assertEquals(expResult, result);\n }", "@Test(timeout = 4000)\n public void test049() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC((-1));\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testOSA_30() {\n CuteNetlibCase.doTest(\"OSA-30.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testDEGEN2() {\n CuteNetlibCase.doTest(\"DEGEN2.SIF\", \"-1435.1779999999999\", \"-1226.12\", NumberContext.of(7, 4));\n }" ]
[ "0.72909516", "0.7227777", "0.68699604", "0.68175095", "0.68112916", "0.68013847", "0.6787803", "0.6741895", "0.67170864", "0.67018443", "0.66986", "0.6684212", "0.66717666", "0.6656986", "0.6656901", "0.6652304", "0.664189", "0.66170883", "0.6616673", "0.6590721", "0.6587139", "0.6524709", "0.6511449", "0.6493429", "0.6490561", "0.6486083", "0.64781654", "0.6439201", "0.6418391", "0.6407561", "0.6389118", "0.63587254", "0.63530564", "0.6337802", "0.6336471", "0.6336322", "0.6334692", "0.63266355", "0.6325753", "0.63229734", "0.6321803", "0.6309988", "0.6298372", "0.6295716", "0.62885207", "0.6288198", "0.6278499", "0.62773216", "0.62730867", "0.6270891", "0.6259456", "0.62591845", "0.6246231", "0.62458026", "0.6240873", "0.6238472", "0.62339157", "0.62321377", "0.62216663", "0.6200772", "0.6197623", "0.61771923", "0.6169242", "0.6166665", "0.61527336", "0.6143921", "0.6138775", "0.6129808", "0.6122377", "0.6112903", "0.61069787", "0.6106168", "0.61031556", "0.6101533", "0.6089223", "0.60696554", "0.6068778", "0.60672754", "0.6059441", "0.6056302", "0.60550064", "0.60428196", "0.6041459", "0.60414517", "0.6038667", "0.6038428", "0.60321885", "0.6026601", "0.6026588", "0.6021068", "0.60184073", "0.59897083", "0.59894156", "0.5984986", "0.59767276", "0.5967942", "0.59432966", "0.5942725", "0.5932319", "0.5923212", "0.59129274" ]
0.0
-1
Test case number: 23 /Coverage entropy=2.0729270415374588
@Test(timeout = 4000) public void test23() throws Throwable { FBProcedureCall fBProcedureCall0 = new FBProcedureCall(); FBProcedureCall fBProcedureCall1 = new FBProcedureCall(); boolean boolean0 = FBProcedureCall.OLD_CALLABLE_STATEMENT_COMPATIBILITY; FBProcedureParam fBProcedureParam0 = new FBProcedureParam(); FBProcedureCall fBProcedureCall2 = new FBProcedureCall(); FBProcedureCall fBProcedureCall3 = new FBProcedureCall(); FBProcedureCall fBProcedureCall4 = new FBProcedureCall(); FBProcedureCall fBProcedureCall5 = (FBProcedureCall)fBProcedureCall4.clone(); FBProcedureCall fBProcedureCall6 = new FBProcedureCall(); fBProcedureCall1.addOutputParam(fBProcedureParam0); FBProcedureCall fBProcedureCall7 = new FBProcedureCall(); fBProcedureCall4.equals(fBProcedureCall1); FBProcedureCall fBProcedureCall8 = new FBProcedureCall(); fBProcedureCall8.clone(); FBProcedureCall fBProcedureCall9 = new FBProcedureCall(); fBProcedureCall9.clone(); fBProcedureCall9.addInputParam(fBProcedureParam0); FBProcedureCall fBProcedureCall10 = new FBProcedureCall(); fBProcedureCall5.addOutputParam(fBProcedureParam0); FBProcedureCall fBProcedureCall11 = new FBProcedureCall(); fBProcedureCall6.addParam(1428, "org.firebirdsl.jbc.FBrocedureCall"); FBProcedureCall fBProcedureCall12 = new FBProcedureCall(); try { fBProcedureCall12.registerOutParam(1428, 1428); fail("Expecting exception: FBSQLException"); } catch(FBSQLException e) { // // Cannot find parameter with the specified position. // verifyException("org.firebirdsql.jdbc.FBProcedureCall", e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test126() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.totalCost();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.getHeader();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test29() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.pctCorrect();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test40() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, evaluation0.unclassified(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.avgCost();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test17() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFPriorEntropy();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n \n evaluation0.useNoPriors();\n assertEquals(Double.NaN, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderPRC((-1));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.priorEntropy();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctIncorrect();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setNumericPriorsFromBuffer();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(false);\n assertEquals(\"=== Summary ===\\n\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n }", "@Test(timeout = 4000)\n public void test119() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString((String) null, true);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(\"null\\nTotal Number of Instances 0 \\n\", string0);\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertEquals(2, doubleArray0.length);\n assertNotNull(doubleArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanPriorEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test36() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.incorrect();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test35() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(Double.NaN, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives((-1436));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n public void test33() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.getClassPriors();\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test16() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.SFSchemeEntropy();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_07() {\n CuteNetlibCase.doTest(\"OSA-07.SIF\", \"535722.517299352\", \"4332086.205299969\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString();\n assertEquals(\"=== Detailed Accuracy By Class ===\\n\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test19() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBInformation();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"Y#:')*#rI\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numInstances();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1D() {\n CuteNetlibCase.doTest(\"FIT1D.SIF\", \"-9146.378092421019\", \"80453.99999999999\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.recall((-9));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test18() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n public void test15() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanSchemeEntropy();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setDiscardPredictions(false);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertFalse(evaluation0.getDiscardPredictions());\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.toMatrixString(\"getPreBuiltClassifiers\");\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "public void testSummaryStatsPartialLog() {\n\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset98.txt\");\n GcManager gcManager = new GcManager();\n File preprocessedFile = gcManager.preprocess(testFile, null);\n gcManager.store(preprocessedFile, false);\n JvmRun jvmRun = gcManager.getJvmRun(new Jvm(null, null), Constants.DEFAULT_BOTTLENECK_THROUGHPUT_THRESHOLD);\n Assert.assertEquals(\"GC event type count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertEquals(\"GC blocking event count not correct.\", 2, jvmRun.getBlockingEventCount());\n Assert.assertEquals(\"GC pause total not correct.\", 61, jvmRun.getTotalGcPause());\n Assert.assertEquals(\"GC first timestamp not correct.\", 1002192, jvmRun.getFirstGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last timestamp not correct.\", 1002847, jvmRun.getLastGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last duration not correct.\", 41, jvmRun.getLastGcEvent().getDuration());\n Assert.assertEquals(\"Stopped Time event count not correct.\", 6, jvmRun.getStoppedTimeEventCount());\n Assert.assertEquals(\"Stopped time total not correct.\", 1064, jvmRun.getTotalStoppedTime());\n Assert.assertEquals(\"Stopped first timestamp not correct.\", 1000964,\n jvmRun.getFirstStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last timestamp not correct.\", 1003884,\n jvmRun.getLastStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last duration not correct.\", 1000688, jvmRun.getLastStoppedEvent().getDuration());\n Assert.assertEquals(\"JVM first event timestamp not correct.\", 1000964, jvmRun.getFirstEvent().getTimestamp());\n Assert.assertEquals(\"JVM last event timestamp not correct.\", 1003884, jvmRun.getLastEvent().getTimestamp());\n Assert.assertEquals(\"JVM run duration not correct.\", 3920, jvmRun.getJvmRunDuration());\n Assert.assertEquals(\"GC throughput not correct.\", 98, jvmRun.getGcThroughput());\n Assert.assertEquals(\"Stopped time throughput not correct.\", 73, jvmRun.getStoppedTimeThroughput());\n Assert.assertTrue(Analysis.WARN_GC_STOPPED_RATIO + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_GC_STOPPED_RATIO));\n }", "@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(360, (-336.251));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testKEN_07() {\n CuteNetlibCase.doTest(\"KEN-07.SIF\", \"-6.795204433816869E8\", \"-1.61949281194431E8\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\"\", false);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_14() {\n CuteNetlibCase.doTest(\"OSA-14.SIF\", \"1106462.8447362552\", \"9377699.405100001\", NumberContext.of(7, 4));\n }", "@Test\n public void test21() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.errorRate();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01);\n }", "public void testLiangFigure6() {\n int[] a = {0, 0, 0, 0, 1, 1, 1, 1};\n int[] b = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] c = {0, 1, 0, 1, 0, 1, 0, 1};\n int[] ap = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] bp = {0, 1, 0, 1, 1, 1, 1, 1};\n int[] cp = {0, 0, 0, 1, 0, 1, 1, 1};\n\n for (int i = 0; i < ntimes - 1; i++) {\n cases[i][0] = a[i];\n cases[i][1] = b[i];\n cases[i][2] = c[i];\n cases[i + 1][3] = ap[i];\n cases[i + 1][4] = bp[i];\n cases[i + 1][5] = cp[i];\n }\n cases[8][0] = 0;\n cases[8][1] = 0;\n cases[8][2] = 0;\n cases[0][3] = 0;\n cases[0][4] = 0;\n cases[0][5] = 0;\n\n RevealEvaluator re = new RevealEvaluator(cases);\n\n double rea = re.entropy(a);\n assertEquals(1.0, rea, TOLERANCE);\n System.out.println(\"H(a) = \" + rea); //Should be 1.0\n\n double reb = re.entropy(b);\n assertEquals(1.0, reb, TOLERANCE);\n System.out.println(\"H(b) = \" + reb); //Should be 1.0\n\n double rec = re.entropy(c);\n assertEquals(1.0, rec, TOLERANCE);\n System.out.println(\"H(c) = \" + rec); //Should be 1.0\n\n double reab = re.jointEntropy(a, b);\n assertEquals(2.0, reab, TOLERANCE);\n System.out.println(\"H(a,b) = \" + reab); //Should be 2.0\n\n double reap = re.entropy(ap);\n assertEquals(1.0, reap, TOLERANCE);\n System.out.println(\"H(ap) = \" + reap); //Should be 1.0\n\n double rebp = re.entropy(bp);\n assertEquals(0.8112781244591328, rebp, TOLERANCE);\n System.out.println(\"H(bp) = \" + rebp); //Should be 0.8112781244591328\n\n double recp = re.entropy(cp);\n assertEquals(1.0, recp, TOLERANCE);\n System.out.println(\"H(cp) = \" + recp); //Should be 1.0\n\n double reapa = re.jointEntropy(ap, a);\n assertEquals(2.0, reapa, TOLERANCE);\n System.out.println(\"H(ap, a) = \" + reapa); //Should be 2.0\n\n double rebpb = re.jointEntropy(bp, b);\n assertEquals(1.8112781244591327, rebpb, TOLERANCE);\n System.out.println(\n \"H(bp, b) = \" + rebpb); //Should be 1.8112781244591327\n\n double recpb = re.jointEntropy(cp, b);\n assertEquals(1.8112781244591327, recpb, TOLERANCE);\n System.out.println(\n \"H(cp, b) = \" + recpb); //Should be 1.8112781244591327\n\n int[][] ab = new int[2][8];\n for (int i = 0; i < 8; i++) {\n ab[0][i] = a[i];\n ab[1][i] = b[i];\n }\n\n double rebpab = re.jointEntropy(bp, ab);\n assertEquals(2.5, rebpab, TOLERANCE);\n System.out.println(\"H(bp, a, b) = \" + rebpab); //Should be 2.5\n\n double recpab = re.jointEntropy(cp, ab);\n assertEquals(2.5, recpab, TOLERANCE);\n System.out.println(\"H(cp, a, b) = \" + recpab); //Should be 2.5\n\n int[][] abc = new int[3][8];\n for (int i = 0; i < 8; i++) {\n abc[0][i] = a[i];\n abc[1][i] = b[i];\n abc[2][i] = c[i];\n }\n\n double recpabc = re.jointEntropy(cp, abc);\n assertEquals(3.0, recpabc, TOLERANCE);\n System.out.println(\"H(cp, a, b, c) = \" + recpabc); //Should be 3.0\n\n //Setup array cases and test mutualInformation\n int[] p = new int[1];\n p[0] = 0;\n\n double rembpa = re.mutualInformation(4, p, 1);\n assertEquals(0.31127812445913294, rembpa, TOLERANCE);\n System.out.println(\n \"M(Bp, A) = \" + rembpa); //Should be 0.31127812445913294\n\n int[] pp = new int[2];\n pp[0] = 0;\n pp[1] = 1;\n\n double rmcpab = re.mutualInformation(5, pp, 1);\n assertEquals(0.5, rmcpab, TOLERANCE);\n System.out.println(\"M(Cp, [A,B]) = \" + rmcpab); //Should be 0.5\n\n int[] ppp = new int[3];\n ppp[0] = 0;\n ppp[1] = 1;\n ppp[2] = 2;\n\n double rmcpabc = re.mutualInformation(5, ppp, 1);\n assertEquals(1.0, rmcpabc, TOLERANCE);\n System.out.println(\"M(Cp, [A,B,C]) = \" + rmcpabc); //Should be 1.0\n\n }", "@Test\n public void test13() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.getRevision();\n assertEquals(\"8964\", string0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCRE_A() {\n CuteNetlibCase.doTest(\"CRE-A.SIF\", \"2.9889732905677114E7\", \"2.9889732905677114E7\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(Double.NaN);\n assertNotNull(doubleArray0);\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.unclassified();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertFalse(boolean0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void test30() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertFalse(boolean0);\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC(17);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC50A() {\n CuteNetlibCase.doTest(\"SC50A.SIF\", \"-64.57507705856449\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n discretize0.m_UseEqualFrequency = true;\n discretize0.getOptions();\n assertTrue(discretize0.getMakeBinary());\n \n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test\n public void test14() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toCumulativeMarginDistributionString();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(\" -1 0 \\n\", string0);\n }", "@Test\n @Tag(\"slow\")\n public void testCZPROB() {\n CuteNetlibCase.doTest(\"CZPROB.SIF\", \"2185196.6988565763\", \"3089066.71321333\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n byte[] byteArray0 = new byte[3];\n byteArray0[0] = (byte)108;\n byteArray0[1] = (byte)27;\n byteArray0[2] = (byte)14;\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n discretize0.setBins((-830));\n discretize0.getOptions();\n assertEquals((-830), discretize0.getBins());\n }", "@Test\n public void test01() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-1459.149165489484), ',');\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test088() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBRelativeInformation();\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1P() {\n CuteNetlibCase.doTest(\"FIT1P.SIF\", \"9146.378092420955\", null, NumberContext.of(7, 4));\n }", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getBinRangesString(2607);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCORPION() {\n CuteNetlibCase.doTest(\"SCORPION.SIF\", \"1878.1248227381068\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testOSA_60() {\n CuteNetlibCase.doTest(\"OSA-60.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = evaluation0.makeDistribution(0.95);\n assertNotNull(doubleArray0);\n assertArrayEquals(new double[] {1.0, 0.0}, doubleArray0, 0.01);\n assertEquals(0.0, evaluation0.SFSchemeEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize(\"\\tInvert matching sense of column indexes.\");\n discretize0.setOutputFormat();\n discretize0.listOptions();\n Discretize discretize1 = new Discretize();\n discretize1.setIgnoreClass(false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\\tInvert matching sense of column indexes.\";\n stringArray0[1] = \"\";\n Discretize.main(stringArray0);\n String string0 = discretize1.findNumBinsTipText();\n assertEquals(\"Optimize number of equal-width bins using leave-one-out. Doesn't work for equal-frequency binning\", string0);\n \n discretize1.setInvertSelection(false);\n discretize0.getBinRangesString(511);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n \n discretize1.getFindNumBins();\n assertEquals(10, discretize1.getBins());\n }", "@Test\n public void run () {\n\t \n\t System.out.println(\"---------->\");\n\t //System.out.println(md5list.getResult());\n\t //System.out.println(hashsearch.getResult());\n\t \n\t \n\t \n\t // System.out.println(samples.Testing());\n\t //System.out.println(\"getserult: \"+samples.getResult());\n\t \n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize(\"'B1of2'\");\n int[] intArray0 = new int[8];\n intArray0[0] = 18;\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"'B1of2'\");\n discretize0.listOptions();\n String[] stringArray0 = discretize0.getOptions();\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(6, stringArray0.length);\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n Discretize discretize0 = new Discretize(\"*W5D<hSCW|8@I\");\n int[] intArray0 = new int[9];\n intArray0[0] = (-1405);\n intArray0[1] = (-2938);\n intArray0[2] = (-1954);\n intArray0[3] = 9;\n intArray0[4] = 66;\n intArray0[5] = 573;\n intArray0[6] = 0;\n intArray0[7] = (-71);\n intArray0[8] = 99;\n discretize0.setAttributeIndicesArray(intArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testKEN_13() {\n CuteNetlibCase.doTest(\"KEN-13.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(0.0, Double.NaN);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR25() {\n CuteNetlibCase.doTest(\"SCAGR25.SIF\", \"-1.475343306076852E7\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n Attribute attribute0 = new Attribute(\"invalid CVS revision - not dots!\");\n attribute0.setWeight(0.0);\n Attribute.typeToString(attribute0);\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"UR<dj;O\", arrayList0, 3);\n Instances instances1 = new Instances(instances0);\n boolean boolean0 = discretize0.setInputFormat(instances1);\n assertFalse(boolean0);\n \n String[] stringArray0 = new String[3];\n stringArray0[0] = \".bsi\";\n stringArray0[1] = \"invalid CVS revision - not dots!\";\n stringArray0[2] = \"@end\";\n discretize0.setOptions(stringArray0);\n discretize0.setOptions(stringArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n }", "@Test(timeout = 4000)\n public void test006() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedAreaUnderPRC();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testSCRS8() {\n CuteNetlibCase.doTest(\"SCRS8.SIF\", \"960.0206152764557\", null, NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC205() {\n CuteNetlibCase.doTest(\"SC205.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testMODSZK1() {\n CuteNetlibCase.doTest(\"MODSZK1.SIF\", \"320.6197293824883\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test020() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\".arff\", true);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\".arff\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testKEN_11() {\n CuteNetlibCase.doTest(\"KEN-11.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"unstable\")\n @Tag(\"bm1000\")\n public void testTUFF() {\n CuteNetlibCase.doTest(\"TUFF.SIF\", \"0.29214776509361284\", \"0.8949901867574317\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test18() throws Throwable {\n Discretize discretize0 = new Discretize(\"%\");\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n discretize0.findNumBinsTipText();\n double[][] doubleArray0 = new double[0][7];\n discretize0.m_CutPoints = doubleArray0;\n FileSystemHandling.setPermissions((EvoSuiteFile) null, true, false, true);\n discretize0.setInvertSelection(false);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test041() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.fMeasure((-2765));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testOSA_30() {\n CuteNetlibCase.doTest(\"OSA-30.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testD2Q06C() {\n CuteNetlibCase.doTest(\"D2Q06C.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }" ]
[ "0.7340602", "0.7203809", "0.69970167", "0.68821377", "0.6842105", "0.6822528", "0.6801826", "0.6792893", "0.67850786", "0.6782104", "0.6776434", "0.67659044", "0.67618084", "0.6758957", "0.6747799", "0.67426187", "0.6729287", "0.6725072", "0.6682377", "0.6658166", "0.6621201", "0.65988404", "0.6597389", "0.6587204", "0.65623534", "0.65354985", "0.6526971", "0.65246254", "0.6475212", "0.64747983", "0.6460801", "0.643298", "0.64292794", "0.6427472", "0.6418287", "0.64172214", "0.6416202", "0.64158505", "0.639805", "0.63919073", "0.63917136", "0.63889784", "0.6388827", "0.6381429", "0.6373198", "0.637064", "0.6369487", "0.6364397", "0.63623685", "0.6361277", "0.63523275", "0.6334956", "0.6334846", "0.6326426", "0.6310945", "0.63094795", "0.63035953", "0.6301542", "0.62983173", "0.6286026", "0.6282427", "0.62692857", "0.62534285", "0.6242706", "0.6232048", "0.6214846", "0.6206945", "0.61888707", "0.61856383", "0.6183279", "0.6175993", "0.6168555", "0.6167405", "0.61633086", "0.61497205", "0.6147936", "0.61467445", "0.6145739", "0.6144369", "0.61366636", "0.61281663", "0.6127983", "0.6124938", "0.612456", "0.61219037", "0.61212605", "0.6118839", "0.6097148", "0.6082214", "0.6074381", "0.6063528", "0.6058326", "0.60456616", "0.6043407", "0.6039592", "0.60391253", "0.60319173", "0.6013575", "0.6010036", "0.600654", "0.60064" ]
0.0
-1