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
This method initializes jMenuFile
private JMenu getJMenuFile() { if (jMenuFile == null) { jMenuFile = new JMenu(); jMenuFile.setMnemonic(KeyEvent.VK_F); jMenuFile.setText("File"); jMenuFile.add(getJMenuItemImport()); jMenuFile.add(getJMenuItemExport()); } return jMenuFile; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void InitializeMenu(){\n\t\tmnbBar = new JMenuBar();\n\t\tmnuFile = new JMenu(\"File\");\n\t\tmnuFormat = new JMenu(\"Format\");\n\t\tmniOpen = new JMenuItem(\"Open\");\n\t\tmniExit = new JMenuItem(\"Exit\");\n\t\tmniSave = new JMenuItem(\"Save\");\n\t\tmniSaveAs = new JMenuItem(\"Save as\");\n\t\tmniSaveAs...
[ "0.83806217", "0.82226765", "0.7979896", "0.7730418", "0.7668926", "0.7657367", "0.7500657", "0.7483465", "0.74813294", "0.7445334", "0.7381761", "0.7346806", "0.73429805", "0.7339574", "0.7337", "0.73022115", "0.7215264", "0.7200845", "0.7199113", "0.7152495", "0.7140401", ...
0.6874387
39
This method initializes jMenuHelp
private JMenu getJMenuHelp() { if (jMenuHelp == null) { jMenuHelp = new JMenu(); jMenuHelp.setText("Help"); jMenuHelp.setMnemonic(KeyEvent.VK_H); jMenuHelp.add(getJMenuItemTutorial()); } return jMenuHelp; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void initializeHelpMenu() {\n\t\tfinal JMenu helpMenu = new JMenu(\"Help\");\n\t\tthis.add(helpMenu);\n\t\t// Help\n\t\tfinal JMenuItem sysHelpItem = new JMenuItem();\n\t\tsysHelpItem.setAction(this.commands.findById(CmdHelp.DEFAULT_ID));\n\t\tsysHelpItem.setAccelerator(KeyStroke.getKeyStroke('H',\n\t\t\...
[ "0.827004", "0.76214147", "0.7355033", "0.7352908", "0.7256241", "0.721925", "0.7210963", "0.7197733", "0.71677685", "0.7157597", "0.7135689", "0.70944816", "0.7084025", "0.70779175", "0.70464575", "0.7010324", "0.69946915", "0.6988291", "0.6982313", "0.69670165", "0.6907221"...
0.7503829
2
This method initializes jMenuItemImport
private JMenuItem getJMenuItemImport() { if (jMenuItemImport == null) { jMenuItemImport = new JMenuItem(); jMenuItemImport.setText("Import..."); jMenuItemImport.setMnemonic(KeyEvent.VK_I); jMenuItemImport.setAccelerator(KeyStroke.getKeyStroke( KeyEvent.VK_I, ActionEvent.CTRL_MASK)); jMenuItemImportListener = new ActionListener() { public void actionPerformed(ActionEvent e) { importFile(); } }; jMenuItemImport.addActionListener(jMenuItemImportListener); } return jMenuItemImport; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setupImport() {\r\n\t\tmnuImport.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tnew ImportGUI();\r\n\t\t\t}\r\n\t\t});\r\n\t}", "public void InitializeMenu(){\n\t\tmnbBar = new JMenuBar();\n\t\tmnuFile = new JMenu(\"File\");\n\t\tmnuFormat = ...
[ "0.76226413", "0.68914086", "0.67495173", "0.6743546", "0.6742627", "0.65537775", "0.65121293", "0.64478284", "0.64462525", "0.6438901", "0.64346296", "0.6418415", "0.63790923", "0.6377021", "0.63760066", "0.6373361", "0.63709515", "0.6346893", "0.6316238", "0.63121796", "0.6...
0.72177845
1
This method initializes jMenuItemExport
private JMenuItem getJMenuItemExport() { if (jMenuItemExport == null) { jMenuItemExport = new JMenuItem(); jMenuItemExport.setText("Export..."); jMenuItemExport.setMnemonic(KeyEvent.VK_E); jMenuItemExport.setAccelerator(KeyStroke.getKeyStroke( KeyEvent.VK_E, ActionEvent.CTRL_MASK)); jMenuItemExportListener = new ActionListener() { public void actionPerformed(ActionEvent e) { exportFile(); } }; jMenuItemExport.addActionListener(jMenuItemExportListener); } return jMenuItemExport; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void InitializeMenu(){\n\t\tmnbBar = new JMenuBar();\n\t\tmnuFile = new JMenu(\"File\");\n\t\tmnuFormat = new JMenu(\"Format\");\n\t\tmniOpen = new JMenuItem(\"Open\");\n\t\tmniExit = new JMenuItem(\"Exit\");\n\t\tmniSave = new JMenuItem(\"Save\");\n\t\tmniSaveAs = new JMenuItem(\"Save as\");\n\t\tmniSaveAs...
[ "0.6963958", "0.67547786", "0.6720418", "0.67047995", "0.668532", "0.6646732", "0.6628173", "0.66217077", "0.6600193", "0.6536074", "0.64784503", "0.6475222", "0.6436184", "0.6375284", "0.6316374", "0.62902486", "0.6286454", "0.62816685", "0.62646013", "0.6262686", "0.6254876...
0.6908672
1
This method initializes jMenuItemTutorial
private JMenuItem getJMenuItemTutorial() { if (jMenuItemTutorial == null) { jMenuItemTutorial = new JMenuItem(); jMenuItemTutorial.setMnemonic(KeyEvent.VK_T); jMenuItemTutorial.setAccelerator(KeyStroke.getKeyStroke( KeyEvent.VK_T, ActionEvent.CTRL_MASK)); jMenuItemTutorial.setText("Tutorial"); jMenuItemTutorial.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { JOptionPane.showMessageDialog(null, "Steps to run a test:\n" + "1) Check if the current Enquirer is the one you " + "want to use.\nYou can change the current Enquirer " + "at any moment using the \"Change\"\nbutton right " + "next to the Enquirer's name.\n" + "2) Select the animals from the list on the " + "left side of the window.\n" + "3) Click \"Process\".\n" + "4) Use the combo box to select the animal which " + "results you want to analyze.\n\n" + "When you are done analyzing the results, you can" + " choose to save them on a\nfile (Sapphiron > File > Export...) " + "or run a new test by repeating steps 1 through 4.\n\n"+ "You can also see the statistics for a previously " + "run test that has been saved\n(Sapphiron > File > Import...).", "Tutorial", JOptionPane.INFORMATION_MESSAGE); } }); } return jMenuItemTutorial; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initMenu()\n {\n bar = new JMenuBar();\n fileMenu = new JMenu(\"File\");\n crawlerMenu = new JMenu(\"Crawler\"); \n aboutMenu = new JMenu(\"About\");\n \n bar.add(fileMenu);\n bar.add(crawlerMenu);\n bar.add(aboutMenu);\...
[ "0.72168523", "0.7034957", "0.7015632", "0.6958637", "0.69359845", "0.6899714", "0.68800014", "0.6857585", "0.68523693", "0.68270355", "0.67940545", "0.67722195", "0.67635006", "0.67099446", "0.67050445", "0.67050445", "0.66882837", "0.6618969", "0.6600565", "0.6585163", "0.6...
0.76522464
0
This method initializes jPanelLeft
private JPanel getJPanelLeft() { if (jPanelLeft == null) { BorderLayout borderLayout = new BorderLayout(0, 10); borderLayout.setVgap(10); jPanelLeft = new JPanel(); jPanelLeft.setLayout(borderLayout); jPanelLeft.setPreferredSize(new Dimension(170, 0)); jPanelLeft.setBorder(BorderFactory.createCompoundBorder( BorderFactory.createEmptyBorder(10, 10, 10, 5), BorderFactory.createEtchedBorder(EtchedBorder.LOWERED))); jPanelLeft.add(getJScrollPane(), BorderLayout.CENTER); jPanelLeft.add(getJbProcess(), BorderLayout.SOUTH); } return jPanelLeft; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private JPanel getJPanelLeft() {\r\n\t\tif (jPanelLeft == null) {\r\n\t\t\tjPanelLeft = new JPanel();\r\n\t\t\tjPanelLeft.setLayout(new BorderLayout());\r\n\t\t\tjLabelLeft = new JLabel(\"Left: \");\r\n\t\t\t//jLabelLeft.setPreferredSize(new Dimension(50, 20));\r\n\t\t\tjLabelLeft.setHorizontalAlignment(SwingConst...
[ "0.7643762", "0.7171162", "0.71639204", "0.6900452", "0.6852503", "0.68377775", "0.68291223", "0.68024063", "0.6716123", "0.6675626", "0.6662885", "0.66596264", "0.6559547", "0.65524405", "0.65266687", "0.64795065", "0.6473149", "0.6472495", "0.6400706", "0.6367243", "0.63606...
0.7725437
0
This method initializes jListAnimals
private JList getJListAnimals() { if (jListAnimals == null) { jListAnimalsModel = new DefaultListModel(); jListAnimals = new JList(); jListAnimals.setVisibleRowCount(15); jListAnimals.setSize(new Dimension(140, 550)); jListAnimals.setModel(jListAnimalsModel); jListAnimals.setVisibleRowCount(15); jListAnimals.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT); jListAnimals.addListSelectionListener(new ListSelectionListener() { @Override public void valueChanged(ListSelectionEvent e) { if (jListAnimals.getSelectedIndex() == -1) { jbProcess.setEnabled(false); } else { jbProcess.setEnabled(true); } } }); this.loadAnimals(); } return jListAnimals; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setupCustomAdapter() {\n AnimalAdapter adapter = new AnimalAdapter(this, animals);\n aListView.setAdapter(adapter);\n }", "public void constructor() {\n setEdibleAnimals();\n }", "public void setAnimals(ArrayList<Animal> animals) { this.animals = animals; }", "public v...
[ "0.66167593", "0.66016763", "0.6505158", "0.6366607", "0.62939966", "0.61676747", "0.6062716", "0.60471666", "0.5933622", "0.59299153", "0.58743334", "0.5840321", "0.58399403", "0.5810875", "0.58066946", "0.577034", "0.57673603", "0.5754894", "0.5753154", "0.57166624", "0.569...
0.672001
0
This method initializes jScrollPane
private JScrollPane getJScrollPane() { if (jScrollPane == null) { jScrollPane = new JScrollPane(); jScrollPane.setViewportView(getJListAnimals()); } return jScrollPane; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initScrollPane() {\n\n MyScrollPane = new JScrollPane(MyTextArea);\n super.addCenter(MyScrollPane);\n\n }", "private void initialize() {\n\t\tthis.setLayout(new BorderLayout());\n\t\tthis.setSize(300, 200);\n\t\tthis.add(getJScrollPane(), java.awt.BorderLayout.CENTER);\n\t}", "public void i...
[ "0.8158612", "0.80634016", "0.78972113", "0.78066516", "0.7778996", "0.75097865", "0.7445952", "0.7438688", "0.74012434", "0.73987013", "0.7282151", "0.72807527", "0.70273954", "0.6921892", "0.68968827", "0.68917334", "0.6870333", "0.6858035", "0.6820447", "0.680897", "0.6790...
0.66884226
30
This method initializes jbProcess
private JButton getJbProcess() { if (jbProcess == null) { jbProcess = new JButton(); jbProcess.setText("Process"); jbProcess.setPreferredSize(new Dimension(140, 30)); jbProcess.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT); jbProcess.setEnabled(false); jbProcess.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { processAnimals(); } }); } return jbProcess; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract void initializeProcess();", "private void statInit() {\n\t\t//\t\n\t\tif (getAD_Process_ID() > 0) {\n\t\t\t//\tFR [ 245 ]\n\t\t\tinitProcessInfo();\n\t\t\tprocessParameterPanel = new ProcessPanel(getWindowNo(), getBrowseProcessInfo());\n\t\t\tprocessParameterPanel.setColumns(ProcessController.COL...
[ "0.7509417", "0.69625384", "0.68842936", "0.6802253", "0.6802253", "0.6762626", "0.6762626", "0.6762626", "0.6762626", "0.6762626", "0.674023", "0.67313224", "0.65593153", "0.644461", "0.6409369", "0.64052945", "0.6405194", "0.6368169", "0.6358322", "0.6355064", "0.62875634",...
0.0
-1
This method initializes jPanelRight
private JPanel getJPanelRight() { if (jPanelRight == null) { jPanelRight = new JPanel(); jPanelRight.setLayout(new BorderLayout()); jPanelRight.add(getJTabbedPane(), BorderLayout.CENTER); jPanelRight.add(getJPanelTopRight(), BorderLayout.NORTH); jPanelRight.setBorder(BorderFactory.createCompoundBorder( BorderFactory.createEmptyBorder(10, 5, 10, 10), BorderFactory.createEtchedBorder(EtchedBorder.LOWERED))); } return jPanelRight; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private JPanel getJPanelRight() {\r\n\t\tif (jPanelRight == null) {\r\n\t\t\tjPanelRight = new JPanel();\r\n\t\t\tjPanelRight.setLayout(new BorderLayout());\r\n\t\t\tjLabelRight = new JLabel(\"Right: \");\r\n\t\t\t//jLabelRight.setPreferredSize(new Dimension(40, 20));\r\n\t\t\tjLabelRight.setHorizontalAlignment(Sw...
[ "0.74933743", "0.74793315", "0.74053276", "0.71448165", "0.69240457", "0.67940444", "0.661994", "0.65741795", "0.65675926", "0.64614034", "0.63312244", "0.6329891", "0.6266112", "0.6205877", "0.61602604", "0.6106226", "0.609966", "0.60980934", "0.60892797", "0.6076804", "0.60...
0.74606586
2
This method initializes jPanelTopRight
private JPanel getJPanelTopRight() { if (jPanelTopRight == null) { jPanelTopRight = new JPanel(); GridBagLayout gbl = new GridBagLayout(); jPanelTopRight.setLayout(gbl); jPanelTopRight.setBorder(BorderFactory.createCompoundBorder( BorderFactory.createEmptyBorder(5, 5, 5, 5), BorderFactory.createEtchedBorder(EtchedBorder.LOWERED))); GridBagConstraints gbc = new GridBagConstraints(0, 0, 1, 1, 0.01, 1, GridBagConstraints.LINE_START, GridBagConstraints.NONE, new Insets(2, 2, 2, 2), 0, 0); jPanelTopRight.add(new JLabel("Current Enquirer:"), gbc); gbc.gridx = 1; gbc.weightx = 0.8; gbc.anchor = GridBagConstraints.LINE_START; gbc.fill = GridBagConstraints.NONE; // Panel that ensures that the minimum label size will be fixed. JPanel currentEnquirer = new JPanel(); currentEnquirer.setLayout(new BorderLayout()); currentEnquirer.add(getJLCurrentEnquirer(), BorderLayout.CENTER); currentEnquirer.setMinimumSize(new Dimension(400, 20)); currentEnquirer.setSize(new Dimension(400, 20)); currentEnquirer.setPreferredSize(new Dimension(400, 20)); jPanelTopRight.add(currentEnquirer, gbc); gbc.weightx = 0.1; gbc.gridx = 2; gbc.anchor = GridBagConstraints.LINE_END; gbc.fill = GridBagConstraints.NONE; jPanelTopRight.add(getJbChangeEnquirer(), gbc); gbc.weightx = 0.01; gbc.gridx = 0; gbc.gridy = 1; gbc.anchor = GridBagConstraints.LINE_START; jPanelTopRight.add(new JLabel("Current animal:"), gbc); gbc.weightx = 0.8; gbc.gridx = 1; gbc.gridwidth = 2; gbc.fill = GridBagConstraints.BOTH; jPanelTopRight.add(getJComboBox(), gbc); } return jPanelTopRight; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void buildTopPanel() {\n \t\tJPanel panel = new JPanel();\n \t\tpanel.setLayout(new BorderLayout(10, 10));\n \t\t\n \t\t// this does not need to be referenced else where, only for layout\n \t\tJPanel paneButtons = new JPanel();\n \t\tGridLayout bl = new GridLayout(2, 1);\n \t\tpaneButtons.setLayout(bl);\n ...
[ "0.70537883", "0.6838381", "0.68131113", "0.66454196", "0.6546108", "0.6369168", "0.63419133", "0.6334853", "0.632048", "0.6319945", "0.6318532", "0.6218492", "0.61965954", "0.6159202", "0.6152888", "0.6148243", "0.613073", "0.6121233", "0.61140335", "0.6113537", "0.60711277"...
0.7518624
0
This method initializes jlCurrentEnquirer
private JLabel getJLCurrentEnquirer() { if (jlCurrentEnquirer == null) { jlCurrentEnquirer = new JLabel(); } return jlCurrentEnquirer; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void initSPARQLAnythingEngine() {\n\t\t// Register the JSON-LD parser factory for extension .json\n\t\tReaderRIOTFactory parserFactoryJsonLD = new RiotUtils.ReaderRIOTFactoryJSONLD();\n\t\tRDFParserRegistry.registerLangTriples(RiotUtils.JSON, parserFactoryJsonLD);\n\t\t// Setup FX executor\n\t\t...
[ "0.5548861", "0.55435115", "0.54413074", "0.5375078", "0.5374549", "0.53502136", "0.53491795", "0.5342112", "0.52751267", "0.526831", "0.52568", "0.52544016", "0.52515584", "0.52316546", "0.520998", "0.52066207", "0.52056783", "0.51959634", "0.5183492", "0.51656854", "0.51380...
0.6328133
0
This method initializes jTabbedPane
private JTabbedPane getJTabbedPane() { if (jTabbedPane == null) { jTabbedPane = new JTabbedPane(); jTabbedPane.setBackground(new Color(225, 231, 236)); jTabbedPane.setPreferredSize(new Dimension(200, 300)); } return jTabbedPane; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void init() {\n\t\ttabbed = new JTabbedPane();\n\t\ttabbed.insertTab(\"Sesion\", null, getPanelSesion(), \"Control de la sesion\", 0);\n\t\ttabbed.insertTab(\"Evolución bolsa\", null, new JPanel(), \"Control de los usuarios\", 1);\n\t\ttabbed.insertTab(\"Eventos\", null, new JPanel(), \"Control de los event...
[ "0.84562814", "0.80520165", "0.79778284", "0.77527577", "0.7731092", "0.7689353", "0.7599508", "0.75829744", "0.75653684", "0.7545236", "0.7532078", "0.7517102", "0.7497571", "0.74869066", "0.7483791", "0.7443947", "0.7433716", "0.7402284", "0.7385441", "0.73794115", "0.73117...
0.67730206
73
This method initializes jComboBox
private JComboBox getJComboBox() { if (jComboBox == null) { jComboBox = new JComboBox(); jComboBox.setEnabled(false); ActionListener al = new ActionListener() { public void actionPerformed(ActionEvent e) { String animal = getCurrentAnimal(); if (animal != null) { jTabbedPane.removeAll(); createFlowTab(animal); createResourcesTab(animal); createChartTab(animal); } } }; // Ensures that the default listener will be executed first. jComboBoxListeners.addLast(al); } return jComboBox; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tprotected void InitComboBox() {\n\t\t\r\n\t}", "public void initialize() {\n fillCombobox();\n }", "private void initComboBox() {\n jComboBox1.removeAllItems();\n listaDeInstrutores = instrutorDao.recuperarInstrutor();\n listaDeInstrutores.forEach((ex) -> {\n ...
[ "0.828814", "0.8276062", "0.8169634", "0.8053636", "0.799597", "0.7865134", "0.77561736", "0.7672083", "0.7494917", "0.7419144", "0.7389112", "0.7349001", "0.7336453", "0.7291513", "0.7277404", "0.71738386", "0.71506804", "0.71492165", "0.70816064", "0.70805174", "0.70695406"...
0.6719909
61
TODO Autogenerated method stub Vector v = new Vector();
public static void main(String[] args) { Vector<Integer> v1 = new Vector<Integer>(); for(int i:v1) { System.out.println(i); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public VOIVector() {\r\n super();\r\n }", "public Vector() {\n construct();\n }", "@Model\r\n\tpublic Vector() {\r\n\t\tthis(50,50);\r\n\t}", "public Vector()\r\n {\r\n // initialise instance variables\r\n first = null;\r\n last = null;\r\n count = 0;\r\n ...
[ "0.80537426", "0.78864443", "0.75053924", "0.7479356", "0.73069", "0.7241337", "0.71743464", "0.7076439", "0.7032007", "0.702034", "0.69474363", "0.6911621", "0.68562865", "0.6829164", "0.6807444", "0.67816204", "0.672291", "0.6701407", "0.6694324", "0.66925424", "0.66809326"...
0.0
-1
Created by Administrator on 2016/5/31.
public interface FloatView { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "@Override\n public void perish() {\n \n }", "@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\tpublic void entrenar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Ov...
[ "0.6312128", "0.6123756", "0.6066653", "0.6013072", "0.59753054", "0.591965", "0.5875548", "0.5867729", "0.58669746", "0.58596784", "0.58596784", "0.5825416", "0.5805833", "0.5805833", "0.5805785", "0.580244", "0.5786732", "0.578151", "0.5776008", "0.5771515", "0.5758261", ...
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { double v, v1, t1, t2, l; v = 19; v1 = 7; t1 = 0.5; t2 = 1; l = v * t1 + (v - v1) * t2; System.out.println("l = " + l + " км"); }
{ "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 getExr...
[ "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.608016...
0.0
-1
Javi da je potrebna suradnja dodana
void setAddListener(AddNeededCollaborationListener addNeededCollaborationListener);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void cajas() {\n\t\t\n\t}", "public void nastaviIgru() {\r\n\t\t// nastavi igru poslije pobjede\r\n\t\tigrajPoslijePobjede = true;\r\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "public abstract String dohvatiKontakt();", "pr...
[ "0.70431215", "0.6448193", "0.644053", "0.6376527", "0.6315388", "0.6238275", "0.6214057", "0.6184895", "0.6166095", "0.61384356", "0.6118782", "0.61075324", "0.61068827", "0.6102882", "0.6099954", "0.6082661", "0.60795254", "0.60764706", "0.60711294", "0.60695416", "0.605731...
0.0
-1
TODO: Warning this method won't work in the case the id fields are not set
@Override public boolean equals(Object object) { if (!(object instanceof Ejercicio)) { return false; } Ejercicio other = (Ejercicio) object; if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) { return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setId(Integer id) { this.id = id; }", "private Integer getId() { return this.id; }", "public void setId(int id){ this.id = id; }", "public void setId(Long id) {this.id = id;}", "public void setId(Long id) {this.id = id;}", "public void setID(String idIn) {this.id = idIn;}", "public void se...
[ "0.68954784", "0.68378097", "0.6704338", "0.66405046", "0.66405046", "0.6591173", "0.6577649", "0.6577649", "0.657354", "0.657354", "0.657354", "0.657354", "0.657354", "0.657354", "0.65609664", "0.65609664", "0.6543523", "0.65234846", "0.6514877", "0.6486739", "0.64767367", ...
0.0
-1
Create an alien in the graphics window
public Alien(GWindow window, Point center) { super(window, center); //this.lives = (int) (Math.random() * 3 + 1); // Display this Alien //this.draw(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void createGUI(){\n DrawingArea drawingArea = new DrawingArea();\n ToolSelect utilityBar = new ToolSelect();\n MenuBar menuBar = new MenuBar();\n JFrame.setDefaultLookAndFeelDecorated(true);\n JFrame frame = new JFrame(\"GUIMk1\");\n frame.setDefaultCloseOpe...
[ "0.61770856", "0.6013959", "0.6000696", "0.5944182", "0.59427655", "0.5938124", "0.5936557", "0.59340835", "0.5928166", "0.5900896", "0.5874439", "0.58405495", "0.5839405", "0.5831902", "0.58163214", "0.58033705", "0.57559484", "0.5708537", "0.5707475", "0.5701852", "0.569639...
0.63873357
0
The alien is being shot Decrement its number of lives and erase it from the graphics window if it is dead.
public void isShot() { lives -=1; if(isDead()) { this.erase(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void loseLife() {\r\n\t\thitGraphic(player);\r\n\t\tif (hits ==1) {\r\n\t\t\tlifeBar.scale(.67, 1);\r\n\t\t\tlifeBar.setColor(Color.ORANGE);\r\n\t\t} else if (hits == 2) {\r\n\t\t\tlifeBar.scale(.5, 1);\r\n\t\t\tlifeBar.setColor(Color.RED);\r\n\t\t} else if (hits == 3) {\r\n\t\t\tremove(lifeBar);\r\n\t\t\t...
[ "0.72905374", "0.7244734", "0.72077954", "0.7190623", "0.6972072", "0.6884646", "0.68703884", "0.6798525", "0.67855287", "0.67628735", "0.6741134", "0.6716936", "0.6660934", "0.66448355", "0.66375613", "0.6593368", "0.6543433", "0.6539229", "0.65166974", "0.65151525", "0.6513...
0.75884783
0
Is this Alien dead?
public boolean isDead() { return this.lives == 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isDead();", "Boolean isDead();", "public boolean isDead()\n {\n // TODO: replace this line with your code\n }", "default public boolean dead() {\n return life().dead();\n }", "public boolean getDead();", "public boolean isDead() {\r\n \t\treturn this.isDead;\r\n \t}"...
[ "0.7280425", "0.7250413", "0.7064373", "0.6856638", "0.6818696", "0.6788179", "0.67363966", "0.67362446", "0.67325485", "0.6675458", "0.664521", "0.6640285", "0.66158926", "0.6611523", "0.6584939", "0.6584939", "0.65754974", "0.6505053", "0.6491895", "0.6482965", "0.6442224",...
0.69884247
3
Return the location of this Alien
public Point getLocation() { return this.center; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Location getLocation() {\n return name.getLocation();\n }", "@AutoEscape\n\tpublic String getLocation();", "public String getLocationString() {\n return getCenter().toString();\n }", "String getLocation();", "String getLocation();", "String getLocation();", "public in...
[ "0.6799982", "0.66726875", "0.66152817", "0.6561729", "0.6561729", "0.6561729", "0.6531718", "0.6529065", "0.6529065", "0.6529065", "0.6529065", "0.6529065", "0.6529065", "0.6529065", "0.6529065", "0.64837956", "0.648261", "0.6464588", "0.64195114", "0.6410031", "0.64083004",...
0.62885803
34
Move this Alien As a start make all of the aliens move downward. If an alien reaches the bottom of the screen, it reappears at the top.
public abstract void move();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void moveDown()\n\t{\n\t\ty = Math.min(y + 1, main.HEIGHT-1);\n\t\tsprite.setPosition(x*sprite.getWidth(),y*sprite.getHeight());\n\t}", "public void moveDown() {\n\t\tsetPosY(getPosY() + steps);\n\t}", "public void moveDown() {\n locY = locY - 1;\n }", "void moveUp() {\n\t\tsetY(y-1);\r\n\t\...
[ "0.6610564", "0.65384734", "0.6523972", "0.6461723", "0.64490616", "0.6418224", "0.64168864", "0.6389117", "0.6374799", "0.6343638", "0.63000745", "0.62519234", "0.6251101", "0.6238938", "0.6234292", "0.622316", "0.621201", "0.61874217", "0.6181908", "0.6181371", "0.61663157"...
0.0
-1
Display this Alien in the graphics window
protected abstract void draw();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void display() {\n EasyViewer.beginOverlay();\n \n glColor4d( 0,1,0,alpha.getValue() );\n glLineWidth(2); \n glBegin( GL_LINE_STRIP );\n for ( int i = 0; i < 10; i++) {\n glVertex2d( 200 + i*10, 100 +i*i );\n }\n glEnd(...
[ "0.7058892", "0.70017433", "0.6766287", "0.67036116", "0.6578255", "0.6327524", "0.62713647", "0.6219181", "0.6205613", "0.6203142", "0.6170591", "0.6133982", "0.6133426", "0.6130651", "0.6102661", "0.607916", "0.607916", "0.6075866", "0.60690403", "0.60690403", "0.60660505",...
0.0
-1
Returns if the alien is shooting at the player.
public boolean isShooting() { return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isShooting() {\n return shooting;\n }", "public boolean isShootUp() {\n return shootUp;\n }", "public boolean isShootLeft() {\n return shootLeft;\n }", "public boolean isShootDown() {\n return shootDown;\n }", "public boolean isShootRight() {\n ...
[ "0.7731219", "0.7412062", "0.719287", "0.7173503", "0.69487745", "0.68441635", "0.6763457", "0.675302", "0.67288065", "0.6652534", "0.6555878", "0.6427237", "0.641874", "0.6377254", "0.63682586", "0.6345031", "0.62466246", "0.6199021", "0.61593723", "0.615073", "0.61353534", ...
0.7574376
1
Adds bullets to the list of bullets if the alien is shooting.
public void shoot(ArrayList<Bullet> alienBullets) { //do nothing usually }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void shoot(){\n int bulletPosX = posX;\n int bulletPosY = posY;\n int bulletVelX = 0;\n int bulletVelY = -9;\n //add the new bullets to the array of bullets\n bullets.add(new Bullet(bulletPosX,bulletPosY,bulletVelX,bulletVelY,0,attack));\n }", "public void shoo...
[ "0.7964827", "0.7604258", "0.73348", "0.72883314", "0.72813106", "0.7271773", "0.715625", "0.71394724", "0.7128371", "0.7116875", "0.71161366", "0.6998206", "0.6996645", "0.69344157", "0.6877172", "0.68591446", "0.68401986", "0.68354976", "0.68014365", "0.6787227", "0.6636781...
0.7800071
1
Returns the width of the alien ship.
public int getWidth() { return WIDTH; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getShipLength() {\n return shipLength;\n }", "public double getWidth() {\n\t\tdouble width = Math.round(sideLength + (2 * sideLength * \n\t\t\t\tMath.sin(Math.PI / 4)));\n\t\treturn width;\n\t}", "public double getWidth() {\n return location.width();\n }", "public int g...
[ "0.73658913", "0.72440594", "0.721084", "0.7158246", "0.71153504", "0.71027833", "0.71008074", "0.70610726", "0.7021814", "0.7018484", "0.7004194", "0.69861984", "0.6985584", "0.6978806", "0.6978768", "0.6978768", "0.6967584", "0.694409", "0.69284105", "0.69284105", "0.692841...
0.6862644
79
Returns the height of the alien ship.
public int getHeight() { return HEIGHT; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getHeight() {\n return location.height();\n }", "public int getHeight() {\n return bala.getHeight();\n }", "public double getHeight() {\n\t\tdouble height = Math.round(sideLength + (2 * sideLength * \n\t\t\t\tMath.sin(Math.PI / 4)));\n\t\treturn height;\n\t}", "publi...
[ "0.7520937", "0.7380086", "0.7370866", "0.73271704", "0.73110837", "0.73106354", "0.73092985", "0.73092985", "0.7308826", "0.73027474", "0.7299495", "0.7299495", "0.7299495", "0.7299495", "0.7299495", "0.7299495", "0.7299495", "0.7299495", "0.7299495", "0.7299495", "0.7299495...
0.71136
81
Returns true if this ship is the boss ship.
public boolean isTheBoss() { return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Boolean isBoss();", "@JsonProperty(\"has_boss\")\n public boolean getHasBoss() {\n return hasBoss;\n }", "public IBossEntity getBossEntity() {\n\t\treturn bossEntity;\n\t}", "public boolean isShipAlreadyPiloted() {\t\t\n\t\tfor (ACBaseShip othership : Autocraft.shipmanager.ships.values()) {\n\t\...
[ "0.72231066", "0.6331351", "0.626892", "0.6211059", "0.60044473", "0.5990228", "0.59812", "0.59536505", "0.5882267", "0.58309627", "0.57836765", "0.5753205", "0.5707906", "0.5672809", "0.5657952", "0.5656167", "0.5630528", "0.5604088", "0.5593596", "0.5568308", "0.5565597", ...
0.75301725
0
Initializes the controller class. Initializes the controller class.
@Override public void initialize(URL url, ResourceBundle rb) { retornararImg(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public MainController() {\n\t\tcontroller = new Controller(this);\n\t}", "private void initialize() {\n\t\tcontroller = Controller.getInstance();\n\t}", "public Controller() {\n super();\n }", "public Controller() {\n super();\n }", "public Controller()\n\t{\n\n\t}", "public abstract ...
[ "0.80138475", "0.79916525", "0.77871776", "0.77871776", "0.7637472", "0.76333284", "0.75243264", "0.7501471", "0.75010437", "0.74830896", "0.74286085", "0.7119405", "0.7086906", "0.70607597", "0.7039199", "0.6999344", "0.69837826", "0.69585925", "0.69410056", "0.69314504", "0...
0.0
-1
Destruction of the servlet.
public void destroy() { super.destroy(); // Just puts "destroy" string in log // Put your code here }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void destroy() {\n\t\tsuper.destroy(); \n\t\tSystem.out.println(\"=====destory servlet=========\");\n\t}", "public final void destroy()\n {\n log.info(\"PerformanceData Servlet: Done shutting down!\");\n }", "@Override\r\n\tpublic void destroy() {\n\t\tSystem.out.println(\"second servlet de...
[ "0.8357607", "0.8068459", "0.7901647", "0.7500556", "0.7443264", "0.6997455", "0.69502616", "0.6783583", "0.6645547", "0.66289103", "0.65331405", "0.64577305", "0.641841", "0.6385528", "0.63693154", "0.63544", "0.63544", "0.63544", "0.63544", "0.6344062", "0.63351953", "0.6...
0.0
-1
Initialization of the servlet.
public void init() throws ServletException { // Put your code here }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void init() throws ServletException {\r\n\r\n\t}", "public void init() throws ServletException {\n }", "public void init() throws ServletException {\n\t\t\n\t}", "public void init() throws ServletException {\n\t\t// Put your code here\n\t\t\n\t}", "public void init() throws ServletException {\n\t...
[ "0.8178207", "0.8166057", "0.81264925", "0.81109667", "0.80646193", "0.805903", "0.8043129", "0.8043129", "0.8043129", "0.8043129", "0.8043129", "0.8043129", "0.8043129", "0.8043129", "0.8043129", "0.8043129", "0.8043129", "0.8043129", "0.8043129", "0.8043129", "0.8043129", ...
0.8115332
21
Google sign in Logic functions
private void resolveSignInError() { if (mConnectionResult.hasResolution()) { try { mIntentInProgress = true; mConnectionResult.startResolutionForResult(this, RC_SIGN_IN); } catch (IntentSender.SendIntentException e) { mIntentInProgress = false; mGoogleApiClient.connect(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void signIn(){\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 GoogleSignInClient mGoogleSignInClient = ...
[ "0.7057165", "0.6980984", "0.6978765", "0.69759995", "0.69759995", "0.69759995", "0.695463", "0.69170654", "0.69152457", "0.69089574", "0.69089574", "0.69089574", "0.69089574", "0.6905139", "0.685991", "0.6829901", "0.6711753", "0.67075896", "0.66990143", "0.6689446", "0.6665...
0.0
-1
Registration of user: When user presses login through facebook/google, both call this function in the end. After registraton in server, this function automatically calls data fill function
private void registerForEmail(final String email, final String name, final String facebookId, final String token, final String imageUrl, final boolean isFb){ // String url = Router.User.getWIthEmailComplete(email); // JSONObject params = new JSONObject(); // try { // params.put("name",name); // params.put("isFb",isFb); // params.put("token",token); // params.put("email",email); // params.put("profilepic",imageUrl); // params.put("facebookId",facebookId); // } catch (JSONException e) {e.printStackTrace();} // JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.POST, url, params, new Response.Listener<JSONObject>() { // // @Override // public void onResponse(JSONObject jsonObject) { // try { // JSONObject result = jsonObject.getJSONObject("result"); // String userId = result.getString("userId"); // userMain.userId = userId; // userMain.token = token; // userMain.email = email; // userMain.authProvider = (isFb)?"facebook":"google"; // updateLoginTokens(); // userMain.saveUserDataLocally(); // // loginWithUserId(userId); // } catch (JSONException e) { // e.printStackTrace(); // } // } // }, new Response.ErrorListener() { // @Override // public void onErrorResponse(VolleyError volleyError) { // Log.e("ERROR","error in registerForEmail"); // } // }); // MainApplication.getInstance().getRequestQueue().add(jsonObjectRequest); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void RegisterFacebookSignup() {\n\n\t\ttry {\n\t\t\tLocalData data = new LocalData(SplashActivity.this);\n\n\t\t\tArrayList<String> asName = new ArrayList<String>();\n\t\t\tArrayList<String> asValue = new ArrayList<String>();\n\n\t\t\tasName.add(\"email\");\n\t\t\tasName.add(\"firstname\");\n\t\t\tasName.a...
[ "0.780254", "0.7534647", "0.7503292", "0.7437808", "0.73942596", "0.73477286", "0.73435044", "0.7120933", "0.6933816", "0.69191", "0.69117653", "0.6876569", "0.68686414", "0.6843369", "0.6824261", "0.68217427", "0.6806813", "0.6804138", "0.67959887", "0.6769226", "0.67579913"...
0.689096
11
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml.
@Override public boolean onOptionsItemSelected(MenuItem item) { int id = item.getItemId(); //noinspection SimplifiableIfStatement if (id == R.id.action_settings) { return true; } return super.onOptionsItemSelected(item); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n ...
[ "0.7904975", "0.78056985", "0.77671826", "0.77275974", "0.7632173", "0.7622138", "0.75856143", "0.7531176", "0.7488386", "0.74576557", "0.74576557", "0.74391466", "0.7422802", "0.7403698", "0.7392229", "0.73873955", "0.73796785", "0.737091", "0.73627585", "0.7356357", "0.7346...
0.0
-1
MAIN USER UPSERT ANY LOGIN METHOD SHOULD IN THE END CALL THIS FUNCTION This first sends server email to get userId through user object, then updates in local and then syncs with server
private void loginWithUserId(final TokenHandler tokenHandler) throws JSONException { // String url = Router.User.getWIthIdComplete(userId); // Logg.m("MAIN", "Pulling all data with userID : " + userId); // JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.GET, url, new JSONObject(), new Response.Listener<JSONObject>() { // @Override // public void onResponse(JSONObject response) { // try { // Logg.m("MAIN", "Response : Email check = " + response.toString()); // if(response.getString("status").equalsIgnoreCase("success")) { // // //Gets if user has previous registration data // MainApplication.getInstance().data.refillCompleteData(response.getJSONObject("result")); // tellserviceToReconnectToOpenfire(); // // loginToMainApp(); // }else{ // Utils.showDebugToast(getApplicationContext(),"error in creating user"); // } // } catch (JSONException e) { // e.printStackTrace(); // } // } // }, new Response.ErrorListener() { // @Override // public void onErrorResponse(VolleyError error) { // Log.d("ERROR","Error in getting all user data"+error.getLocalizedMessage()); // } // }); // // MainApplication.getInstance().getRequestQueue().add(jsonObjectRequest); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void retrieveAndSaveUserId(Context context) {\r\n\t\t// if (updateRequired(context)) {\r\n\t\tnew LoadAndSaveUserIdFromACServiceTask(context).execute();\r\n\t\t// }\r\n\t}", "private void updateUserLogin() {\n\t\tSessionManager sessionManager = new SessionManager(\n\t\t\t\tMyApps.getAppContext());\...
[ "0.63914365", "0.6356951", "0.6349983", "0.61816573", "0.61702406", "0.6094199", "0.6079003", "0.6004405", "0.6002977", "0.5989594", "0.5958772", "0.5950821", "0.59001696", "0.5877809", "0.58763283", "0.584633", "0.5833652", "0.5830285", "0.5827677", "0.5822675", "0.5787255",...
0.66620266
0
UI OF SIGNUP SCREEN
private void setUpSlidesUI(){ mPager = (ViewPager) findViewById(R.id.pager); btn_login_facebook = (ImageButton) findViewById(R.id.btn_login_facebook); btn_login_google = (ImageButton) findViewById(R.id.btn_login_google); initializeSliderUI(); btn_login_facebook = (ImageButton) findViewById(R.id.btn_login_facebook); btn_login_facebook.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { LoginManager.getInstance().logInWithReadPermissions(SignupActivity.this, Arrays.asList("email", "public_profile")); } }); btn_login_notnow = (ImageButton) findViewById(R.id.btn_login_notnow); btn_login_notnow.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { tokenHandler.skipLogin(); gotoMainApp(); } }); btn_login_google = (ImageButton) findViewById(R.id.btn_login_google); btn_login_google.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { signInWithGplus(); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public SIGNUP_2() {\n initComponents();\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tJOptionPane.showMessageDialog(mainscreen, \"Created by Saadia Aman and Ammar Israr\");\n\t\t\t}", "public SignUpScreen(UserController userController) {\n super(userController);...
[ "0.6329107", "0.6195717", "0.6194285", "0.60646886", "0.60591364", "0.6022865", "0.60007733", "0.59917146", "0.59741414", "0.5970896", "0.5969696", "0.5965569", "0.59317607", "0.5922643", "0.59009033", "0.58972573", "0.58934563", "0.58782196", "0.58604836", "0.5846768", "0.58...
0.0
-1
if(i==0) return new IntroSlideFragment();
@Override public Fragment getItem(int i) { Fragment fragment = new SlideFragment(); Bundle args = new Bundle(); args.putString(SlideFragment.QUOTE, slidesQuotes.get(i)); args.putInt(SlideFragment.IMAGE, slidesImages.get(i)); fragment.setArguments(args); return fragment; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_recipe_slider, container, false);\n\n mSectionsPagerAdapter = new SectionsPagerAdapter(getActivity().getSupportFragmen...
[ "0.64171475", "0.637338", "0.62735564", "0.6249322", "0.61023587", "0.60153186", "0.59735936", "0.5952246", "0.5900177", "0.5883313", "0.58808297", "0.58740383", "0.5873835", "0.5868442", "0.5810542", "0.5800063", "0.5789781", "0.5763472", "0.5761591", "0.57602054", "0.575533...
0.6387801
1
TODO: 25.09.2016 allow null blocks?
public static List<String> formatBlocks(List<DisplayBlock> blocks, int baseWidth, Separations separations, Padding padding, Borders borders) { String format; if (borders != null && borders.getVertical() != null) { format = getPaddingFormatWithBorders(baseWidth, padding, borders.getVertical()); } else { format = getPaddingFormat(baseWidth, padding); } int widthForChildren = getWidthForChildren(baseWidth, padding, borders != null); String padLine = String.format(format, ""); List<String> result = new ArrayList<>(); if (separations != null && separations.getSeparationLinesCount() > 0) { //prepare separation lines List<String> separation; if (borders != null && borders.getVertical() != null) { separation = createBorderedSeparation(baseWidth, separations, borders.getVertical()); } else { separation = createSeparation(baseWidth, separations); } //append to result each block and a separator after Iterator<DisplayBlock> iterator = blocks.listIterator(); while (iterator.hasNext()) { //formatting and appending lines of child block to result result.addAll(iterator.next() .buildLines(widthForChildren) .stream() .map(s -> String.format(format, s)) .collect(Collectors.toList())); //append separator if there is a next block if (iterator.hasNext()) { result.addAll(separation); } } // return result; } else { //just append formatted blocks to each other result = blocks.stream() .flatMap(b -> b.buildLines(widthForChildren).stream()) .map(s -> String.format(format, s)) .collect(Collectors.toList()); } return padAndBorderTopAndBottom(baseWidth, padding, padLine, borders, result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public T caseBlock(Block object) {\r\n\t\treturn 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: */ }", "public boolean blockEmpty()\r\n/* 72: */ {\r\n/* 73: 60 */ return false;\r\n/* 74: */ ...
[ "0.6152993", "0.6141257", "0.6087531", "0.60664964", "0.59797883", "0.59696895", "0.5940747", "0.58344406", "0.57450074", "0.5714817", "0.57079494", "0.5649766", "0.5626455", "0.5569248", "0.5560381", "0.55433136", "0.5540531", "0.5498053", "0.54898643", "0.54848045", "0.5482...
0.0
-1
TODO Autogenerated method stub
public List<OnlineRate> getOnlineRateWordTwo(OnlineRate onlineRate) { return this.baseDao.queryForList("oracle-OnlineRateSQL.findTwoCarInfoList",onlineRate); }
{ "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 getExr...
[ "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.608016...
0.0
-1
TODO Autogenerated method stub
public List<OnlineRate> getOnlineRateWordThree(OnlineRate onlineRate) { return this.baseDao.queryForList("oracle-OnlineRateSQL.findThreeCarInfoList",onlineRate); }
{ "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 getExr...
[ "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.608016...
0.0
-1
Increases webhooks count by 1 for the specific client;
private synchronized void increaseWebhook(String clientId) { clientWebhooks.put(clientId, webhookCount(clientId) + 1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private synchronized int webhookCount(String clientId) {\n if (!clientWebhooks.containsKey(clientId))\n clientWebhooks.put(clientId, 0);\n return clientWebhooks.get(clientId);\n }", "private synchronized void decreaseWebhook(String clientId) {\n clientWebhooks.put(clientId...
[ "0.75445765", "0.7536434", "0.6976803", "0.6344147", "0.61314553", "0.60100174", "0.6001548", "0.59203005", "0.5853446", "0.58440053", "0.5816411", "0.58086485", "0.5766964", "0.575738", "0.57387215", "0.5723756", "0.5715019", "0.5679621", "0.566288", "0.5648538", "0.56319857...
0.8784487
0
Decreases webhooks count by 1 for the specific client;
private synchronized void decreaseWebhook(String clientId) { clientWebhooks.put(clientId, webhookCount(clientId) - 1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private synchronized void increaseWebhook(String clientId) {\n clientWebhooks.put(clientId, webhookCount(clientId) + 1);\n }", "public static void decreaseNumberOfClients()\n {\n --numberOfClients;\n }", "private synchronized int webhookCount(String clientId) {\n if (!clientWeb...
[ "0.7799711", "0.69116396", "0.6731905", "0.64065206", "0.61374444", "0.6052973", "0.5778652", "0.5712583", "0.5589882", "0.5576275", "0.5502458", "0.5479579", "0.5459347", "0.53728265", "0.5295258", "0.5272318", "0.5265732", "0.523856", "0.5234273", "0.5208831", "0.5204907", ...
0.8482742
0
Return the number of webhooks associated with a specific user
private synchronized int webhookCount(String clientId) { if (!clientWebhooks.containsKey(clientId)) clientWebhooks.put(clientId, 0); return clientWebhooks.get(clientId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getWallItemsCount(String userUuid);", "int countByExample(OfUserWechatExample example);", "String getNotificationCount(Long userId) throws JsonProcessingException;", "int getUserCount();", "int getUserCount();", "public int getWallItemsCount(String userUuid, ProfilePrivacy privacy);", "publi...
[ "0.64887184", "0.6407163", "0.64041543", "0.6383103", "0.6383103", "0.6272484", "0.61740685", "0.61386377", "0.59143806", "0.5897317", "0.5880152", "0.5858208", "0.5858208", "0.5858208", "0.58316517", "0.57636946", "0.5733791", "0.5710742", "0.5710742", "0.57062143", "0.57055...
0.67429924
0
Indicates if the max number of hooks has been reached by a client
private synchronized boolean webhookMaxed(String clientId) { return webhookCount(clientId) > this.maxJobsPerClient ? true : false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasMaximumBackoff();", "boolean hasMaxCount();", "public static boolean exceedsMaxCount() {\n final long maxTestCount = HostConfig.getMaxTestCount();\n return (maxTestCount > 0) && (mTestCount >= maxTestCount);\n }", "public boolean limitHit() {\r\n return (count >= maxCoun...
[ "0.70364153", "0.6826539", "0.6806734", "0.6790959", "0.662102", "0.6423819", "0.6419464", "0.6402354", "0.6381679", "0.6353813", "0.63305306", "0.62922907", "0.62585723", "0.624581", "0.6241183", "0.6145354", "0.6025546", "0.5993258", "0.59451544", "0.59447014", "0.5899315",...
0.77342343
0
Executes a post request to a specific URL.
private int doPost(String url) { if (!url.toLowerCase().startsWith("http")) { url = "http://" + url; } HttpResponse response = null; try { HttpPost httpPost = new HttpPost(url); response = httpClient.execute(httpPost); return response.getStatusLine().getStatusCode(); } catch (IllegalStateException | IOException e) { LOGGER.error(String.format("Error processing webhook %s", url), e); } finally { if (response != null && response.getEntity() != null) { try { EntityUtils.consume(response.getEntity()); } catch (IOException e) { LOGGER.error(String.format("Unable to release connection for webhook %s", url), e); } } } return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String postRequest(String url);", "HttpResponse post(URL url, Map<String, String> headers, byte[] body, String mediaType)\n throws IOException;", "public HttpResponse postData(String url) {\n\t HttpClient httpclient = new DefaultHttpClient();\n\t HttpPost httppost = new HttpPost(url);\n\n\t try {...
[ "0.76367295", "0.6772186", "0.64775723", "0.6401243", "0.63514316", "0.6336422", "0.6335164", "0.6221289", "0.6202674", "0.61603564", "0.6149093", "0.61294764", "0.612905", "0.6096543", "0.6013364", "0.6008114", "0.60015804", "0.598263", "0.59799635", "0.5969565", "0.5960706"...
0.63627195
4
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() { buttonGroup1 = new javax.swing.ButtonGroup(); jLabel1 = new javax.swing.JLabel(); studentIdTxt = new javax.swing.JTextField(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jLabel5 = new javax.swing.JLabel(); jLabel6 = new javax.swing.JLabel(); jLabel7 = new javax.swing.JLabel(); jLabel8 = new javax.swing.JLabel(); jLabel9 = new javax.swing.JLabel(); jLabel10 = new javax.swing.JLabel(); studentFirstNameTxt = new javax.swing.JTextField(); studentPerAddressTxt = new javax.swing.JTextField(); studentEmailTxt = new javax.swing.JTextField(); studentProgramTxt = new javax.swing.JTextField(); studentMiddleNameTxt = new javax.swing.JTextField(); studentTemporaryTxt = new javax.swing.JTextField(); studentMobileTxt = new javax.swing.JTextField(); jLabel11 = new javax.swing.JLabel(); jLabel12 = new javax.swing.JLabel(); studentLastNameTxt = new javax.swing.JTextField(); studentSectionTxt = new javax.swing.JTextField(); addStudentBtn = new javax.swing.JButton(); editStudentBtn = new javax.swing.JButton(); deleteStudentBtn = new javax.swing.JButton(); clearStudentBtn = new javax.swing.JButton(); cancelStudentBtn = new javax.swing.JButton(); maleRadio = new javax.swing.JRadioButton(); femaleRadio = new javax.swing.JRadioButton(); jScrollPane1 = new javax.swing.JScrollPane(); studentTable = new javax.swing.JTable(); semesterCombo = new javax.swing.JComboBox(); jButton1 = new javax.swing.JButton(); jLabel1.setText("StudentID"); studentIdTxt.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { studentIdTxtActionPerformed(evt); } }); jLabel2.setText("FirstName"); jLabel3.setText("Gender"); jLabel4.setText("Permanent Address"); jLabel5.setText("Email"); jLabel6.setText("Program"); jLabel7.setText("MiddleName"); jLabel8.setText("Temporary Address"); jLabel9.setText("Mobile"); jLabel10.setText("Semester"); studentFirstNameTxt.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { studentFirstNameTxtActionPerformed(evt); } }); studentPerAddressTxt.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { studentPerAddressTxtActionPerformed(evt); } }); studentProgramTxt.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { studentProgramTxtActionPerformed(evt); } }); studentMiddleNameTxt.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { studentMiddleNameTxtActionPerformed(evt); } }); studentTemporaryTxt.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { studentTemporaryTxtActionPerformed(evt); } }); jLabel11.setText("LastName"); jLabel12.setText("Section"); addStudentBtn.setText("Add"); addStudentBtn.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { addStudentBtnActionPerformed(evt); } }); editStudentBtn.setText("Edit"); editStudentBtn.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { editStudentBtnActionPerformed(evt); } }); deleteStudentBtn.setText("Delete"); deleteStudentBtn.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { deleteStudentBtnActionPerformed(evt); } }); clearStudentBtn.setText("Clear"); clearStudentBtn.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { clearStudentBtnActionPerformed(evt); } }); cancelStudentBtn.setText("Cancel"); cancelStudentBtn.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { cancelStudentBtnActionPerformed(evt); } }); maleRadio.setText("Male"); maleRadio.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { maleRadioActionPerformed(evt); } }); femaleRadio.setText("Female"); studentTable.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { {null, null, null, null}, {null, null, null, null}, {null, null, null, null}, {null, null, null, null} }, new String [] { "Title 1", "Title 2", "Title 3", "Title 4" } )); jScrollPane1.setViewportView(studentTable); semesterCombo.setModel(new javax.swing.DefaultComboBoxModel(new String[] {"", "First", "Second", "Third", "Fourth","Fifth","Sixth","Seventh","Eighth" })); semesterCombo.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { semesterComboActionPerformed(evt); } }); jButton1.setText("View"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jLabel1, javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel2, javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel3, javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel6) .addComponent(jLabel5)) .addGap(72, 72, 72) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(studentEmailTxt, javax.swing.GroupLayout.DEFAULT_SIZE, 100, Short.MAX_VALUE) .addComponent(studentProgramTxt))) .addGroup(layout.createSequentialGroup() .addComponent(jButton1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(addStudentBtn))) .addGap(29, 29, 29) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(38, 38, 38) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel7) .addComponent(jLabel10) .addComponent(jLabel9)) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(55, 55, 55) .addComponent(studentMiddleNameTxt, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(semesterCombo, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE)))) .addGroup(layout.createSequentialGroup() .addComponent(editStudentBtn) .addGap(18, 18, 18) .addComponent(deleteStudentBtn))) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(clearStudentBtn) .addGap(41, 41, 41) .addComponent(cancelStudentBtn)) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel11) .addComponent(jLabel12)) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(studentSectionTxt, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(studentLastNameTxt, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE))))) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(279, 279, 279) .addComponent(jLabel8)) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(studentFirstNameTxt, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(studentIdTxt, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(layout.createSequentialGroup() .addComponent(jLabel4) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(layout.createSequentialGroup() .addComponent(maleRadio) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(femaleRadio)) .addComponent(studentPerAddressTxt, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE))))) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(studentMobileTxt, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(studentTemporaryTxt, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)))) .addGap(0, 17, Short.MAX_VALUE))) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel1) .addComponent(studentIdTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel2) .addComponent(jLabel7) .addComponent(studentFirstNameTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(studentMiddleNameTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel11) .addComponent(studentLastNameTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel3) .addComponent(maleRadio) .addComponent(femaleRadio)) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel4) .addComponent(jLabel8) .addComponent(studentPerAddressTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(studentTemporaryTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel5) .addComponent(jLabel9) .addComponent(studentEmailTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(studentMobileTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(studentProgramTxt, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel10)) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel6) .addComponent(jLabel12) .addComponent(studentSectionTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(semesterCombo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(editStudentBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(addStudentBtn) .addComponent(jButton1)) .addComponent(clearStudentBtn) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(deleteStudentBtn) .addComponent(cancelStudentBtn))) .addGap(18, 18, 18) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); }
{ "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 ...
[ "0.7320782", "0.72918797", "0.72918797", "0.72918797", "0.728645", "0.72498447", "0.7214492", "0.720934", "0.7197145", "0.71912014", "0.71852076", "0.7160113", "0.71487373", "0.70943654", "0.70820624", "0.7058153", "0.69883204", "0.6978216", "0.69558746", "0.6955715", "0.6945...
0.0
-1
TODO Autogenerated method stub
@Override public void handle(MouseEvent arg0) { if (enabled) { this.cancel(); this.start(); } }
{ "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 getExr...
[ "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.608016...
0.0
-1
1. Ask the user if they know how to write code.
public static void main(String[] args) { String answer = JOptionPane.showInputDialog("Can you write code?(Do not use capitals)"); // 2. If they say "yes", tell them they will rule the world. if(answer.equals("yes")){ JOptionPane.showMessageDialog(null," Of course you do, you're in a programming class."); }else if(answer.equals("no")){ JOptionPane.showMessageDialog(null," Are you serios?! You're in a coding class!"); }else{ JOptionPane.showMessageDialog(null," What?"); } // 3. Otherwise, wish them good luck washing dishes. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n\t\tString response=JOptionPane.showInputDialog(null,\"Do you know how to write code?\");\n\t\t// 2. If they say \"yes\", tell them they will rule the world.\n\t\tif(response.equalsIgnoreCase(\"yes\") || response.equalsIgnoreCase(\"sure\"))\n\t\t{\n\t\t\tJOptionPane.showMe...
[ "0.6998794", "0.6547582", "0.6411726", "0.6292465", "0.6181491", "0.6157223", "0.60655534", "0.60655534", "0.60655534", "0.6037798", "0.5973313", "0.5924299", "0.5914779", "0.59080654", "0.58565176", "0.5841578", "0.5824423", "0.5788961", "0.57667494", "0.5755724", "0.5747943...
0.67379296
1
Artist q = new Artist("List", true);
public static List<Artist> makeChild1() { Artist q = new Artist("", true); return Arrays.asList(q); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void create(Artist artist);", "public Artist getByName(String name);", "public boolean isArtist(){return isArtist;}", "public Artist(String name, Genre mainGenre) {\n this.name = name;\n this.cataloue = new ArrayList<Record>();\n this.mainGenre = mainGenre;\n }", "public Song(String title, String...
[ "0.74995637", "0.70734966", "0.7005017", "0.6871238", "0.67905617", "0.668269", "0.668269", "0.6659613", "0.663645", "0.6586871", "0.6553213", "0.64880496", "0.64669174", "0.6458119", "0.6458119", "0.6431763", "0.64158547", "0.6413114", "0.64076316", "0.63846385", "0.6341714"...
0.64645493
13
Artist q = new Artist("My Account", true);
public static List<Artist> makeChild2() { Artist q = new Artist("", true); return Arrays.asList(q); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void create(Artist artist);", "public void setArtist(String artist) {\n this.artist = artist;\n }", "public void setArtist(String artist) {\n this.artist = artist;\n }", "public boolean isArtist(){return isArtist;}", "public Song(String title, String artist) {\r\n this.title = title;...
[ "0.7595183", "0.6893631", "0.6893631", "0.6829293", "0.6821199", "0.67585564", "0.6680123", "0.66290593", "0.6574183", "0.6574183", "0.6522873", "0.64117897", "0.6392396", "0.6324101", "0.6314108", "0.6291843", "0.62846345", "0.6272874", "0.6269018", "0.6265322", "0.62434864"...
0.0
-1
Artist q = new Artist("Reserve a Delivery Slot", true);
public static List<Artist> makeChild3() { Artist q = new Artist("", true); return Arrays.asList(q); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void create(Artist artist);", "public Song(String title, String artist) {\r\n this.title = title;\r\n this.artist = artist;\r\n }", "public boolean isArtist(){return isArtist;}", "public void setArtist(String artist) {\n this.artist = artist;\n }", "public void setArtist(String artist) {\n...
[ "0.7673608", "0.68745375", "0.68591386", "0.6825178", "0.6825178", "0.6743939", "0.6729718", "0.6494655", "0.6455094", "0.64539605", "0.64183265", "0.6355431", "0.63418186", "0.630341", "0.6292819", "0.6292819", "0.62771606", "0.62488943", "0.62452054", "0.62168366", "0.61855...
0.0
-1
Artist q = new Artist("Explore", true);
public static List<Artist> makeChild4() { Artist q = new Artist("", true); return Arrays.asList(q); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void create(Artist artist);", "public boolean isArtist(){return isArtist;}", "public Artist getByName(String name);", "public Song(String title, String artist) {\r\n this.title = title;\r\n this.artist = artist;\r\n }", "public void setArtist(String artist) {\n this.artist = artist;\n }", ...
[ "0.7578276", "0.7211789", "0.69951665", "0.68658644", "0.6783897", "0.6783897", "0.67120546", "0.66749173", "0.6628437", "0.6538327", "0.6536256", "0.64666814", "0.6448713", "0.6448713", "0.6424831", "0.63826406", "0.63533664", "0.6350755", "0.63307613", "0.63013065", "0.6255...
0.0
-1
Artist q = new Artist("On Sale", true);
public static List<Artist> makeChild5() { Artist q = new Artist("", true); return Arrays.asList(q); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void create(Artist artist);", "public boolean isArtist(){return isArtist;}", "public void setArtist(String artist) {\n this.artist = artist;\n }", "public void setArtist(String artist) {\n this.artist = artist;\n }", "public Song(String title, String artist) {\r\n this.title = title;...
[ "0.768139", "0.71813565", "0.67879087", "0.67879087", "0.669293", "0.6678069", "0.661998", "0.6606409", "0.656386", "0.64456415", "0.64448804", "0.64263135", "0.64263135", "0.6414006", "0.63776654", "0.6371198", "0.6260281", "0.62173355", "0.62138736", "0.6096047", "0.6079004...
0.0
-1
Artist q = new Artist("New", true);
public static List<Artist> makeChild6() { Artist q = new Artist("", true); return Arrays.asList(q); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void create(Artist artist);", "public Song(String title, String artist) {\r\n this.title = title;\r\n this.artist = artist;\r\n }", "public boolean isArtist(){return isArtist;}", "public void setArtist(String artist) {\n this.artist = artist;\n }", "public void setArtist(String artist) {\n...
[ "0.7752064", "0.69170904", "0.6822124", "0.6693266", "0.6693266", "0.66635936", "0.6652259", "0.65971744", "0.659246", "0.6513705", "0.6504348", "0.64588916", "0.64511925", "0.63454986", "0.62926984", "0.6269386", "0.62527066", "0.6219115", "0.61957455", "0.61957455", "0.6141...
0.55061346
81
Artist q = new Artist("Marketplace", true);
public static List<Artist> makeChild7() { Artist q = new Artist("", true); return Arrays.asList(q); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void create(Artist artist);", "public boolean isArtist(){return isArtist;}", "public void setArtist(String artist) {\n this.artist = artist;\n }", "public void setArtist(String artist) {\n this.artist = artist;\n }", "public Artist getByName(String name);", "public void setArtist(Stri...
[ "0.7691622", "0.71838135", "0.71111566", "0.71111566", "0.70484644", "0.6986921", "0.69460934", "0.677838", "0.6743083", "0.6740117", "0.6740117", "0.67053825", "0.6674685", "0.66592145", "0.6601654", "0.6598725", "0.6594642", "0.6492996", "0.64463276", "0.64433897", "0.64208...
0.0
-1
Setter for the tenant key
@Deprecated public void setTenantKey(String base64) throws FHIRException { try { Base64.getDecoder().decode(base64); this.tenantKey = base64; } catch (IllegalArgumentException x) { // Tenant key is a secret, so don't include it in any error message throw new FHIRException("Invalid tenantKey."); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void addTenantKey() {\n if (!MULTITENANT_FEATURE_ENABLED.contains(dbType)) {\n return;\n }\n\n // Only if the Tenant Key file is provided as a parameter is it not null.\n // in this case we want special behavior.\n if (tenantKeyFileUtil.keyFileExists(tenantK...
[ "0.6915631", "0.64264107", "0.61233425", "0.60166985", "0.5901306", "0.584697", "0.5780612", "0.5688084", "0.56780195", "0.56517655", "0.5632255", "0.561274", "0.55978096", "0.5591734", "0.5536769", "0.5521332", "0.55071247", "0.55049074", "0.5480568", "0.5460851", "0.5454456...
0.5949353
4
Sets the specified FHIRRequestContext instance on the current thread, so that it can be used by FHIR Server downstream processing. This method is called when the FHIR Server starts processing a request.
public static void set(FHIRRequestContext context) { contexts.set(context); if (log.isLoggable(Level.FINEST)) { log.finest("FHIRRequestContext.set: " + context.toString()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void setRequestContext(SOAPRequestContext context) {\n REQUEST_CONTEXT_HOLDER.set(context);\n }", "private void setupRequestContext() {\n\t\tMockHttpServletRequest request = new MockHttpServletRequest();\n\t\tServletRequestAttributes attributes = new ServletRequestAttributes(request);\n\t...
[ "0.64089817", "0.6133993", "0.61176914", "0.61176914", "0.5484272", "0.5469202", "0.54449856", "0.54449856", "0.54449856", "0.54439306", "0.53713274", "0.53626764", "0.53304356", "0.5321017", "0.52958", "0.51723164", "0.5166304", "0.51308656", "0.5077982", "0.5065942", "0.505...
0.7095743
0
Returns the FHIRRequestContext on the current thread.
public static FHIRRequestContext get() { FHIRRequestContext result = contexts.get(); if (log.isLoggable(Level.FINEST)) { log.finest("FHIRRequestContext.get: " + result.toString()); } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ContextRequest getContext() {\n\t\treturn context;\n\t}", "public static HttpServletRequest getHttpServletRequest() {\n try {\n HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.currentRequestAttributes()).getRequest();\n return request;\n } ...
[ "0.64829224", "0.63472104", "0.62833947", "0.60317594", "0.59717554", "0.5966794", "0.5940638", "0.5930058", "0.591976", "0.5901311", "0.5889561", "0.5889561", "0.5889561", "0.5889561", "0.5889561", "0.5889561", "0.5889561", "0.5889561", "0.5889561", "0.5889561", "0.5889561",...
0.8068493
0
Removes the FHIRRequestContext that's set on the current thread. This method is called when the FHIR Server is finished processing a request.
public static void remove() { contexts.remove(); log.finest("FHIRRequestContext.remove invoked."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void clearContext() {\n log.debug(\"Clearing the current HTTP Request Headers context\");\n context.remove();\n }", "@Override\n\tpublic void doFilter(ServletRequest request, ServletResponse response,\n\t\t\tFilterChain filterChain) throws IOException, ServletException {\n\t\tStrin...
[ "0.64169014", "0.6099127", "0.59389395", "0.563305", "0.5625016", "0.55436486", "0.5483969", "0.54246706", "0.54169565", "0.5294578", "0.52872163", "0.5269967", "0.5248208", "0.51665264", "0.515362", "0.5150656", "0.5145115", "0.51254934", "0.51195264", "0.50623053", "0.50623...
0.75001216
0
Private constructor so no one can instantiate this class.
private SelfShieldingCalc() { // This class should just contain static methods. Don't let anyone // instantiate it. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Topography()\n\t{\n\t\tthrow new IllegalStateException(\"This is an utility class, it can not be instantiated\");\n\t}", "private Rekenhulp()\n\t{\n\t}", "private Instantiation(){}", "private ATCres() {\r\n // prevent to instantiate this class\r\n }", "@SuppressWarnings(\"unused\")\n ...
[ "0.76996017", "0.76639235", "0.7634555", "0.75005054", "0.7498248", "0.7468567", "0.74532175", "0.744219", "0.7385894", "0.7331906", "0.73025227", "0.7297392", "0.72835547", "0.7264621", "0.72263813", "0.72255576", "0.72254884", "0.7224537", "0.72219634", "0.7215041", "0.7215...
0.0
-1
Correct the specified spectrometer DataSet for selfshielding by the sample. The DataSet must be in terms of EnergyLoss or timeofflight
public static Vector SelfShielding( DataSet ds, float mutS, float mutA, float gamma, boolean make_new_ds ) { if ( ds == null ) throw new IllegalArgumentException("DataSet is null"); if ( ds.getNum_entries() <= 0 ) throw new IllegalArgumentException("DataSet is empty"); Data data; DataSet new_ds; float[] y_vals; float[] x_vals; float[] err_vals; float[] self_vals; float[] energy_vals; double phi, phi_rad; double self; double Ei; DetectorPosition pos; if ( make_new_ds ) new_ds = (DataSet)ds.clone(); else new_ds = ds; DataSetFactory ds_factory = new DataSetFactory( "Self-Shielding Factors", ds.getX_units(), ds.getX_label(), "number", "self factor" ); DataSet self_ds = ds_factory.getDataSet(); String units = ds.getX_units(); boolean time_of_flight = false; if ( units.equalsIgnoreCase( "time(us)" ) ) time_of_flight = true; int num_data = ds.getNum_entries(); for (int index = 0; index < num_data; index++ ) { data = new_ds.getData_entry( index ); y_vals = data.getY_values(); x_vals = data.getX_values(); err_vals = data.getErrors(); Ei = AttrUtil.getEnergyIn( data ); pos = AttrUtil.getDetectorPosition( data ); phi_rad = pos.getScatteringAngle(); phi = phi_rad * 180.0 / Math.PI; if ( data.isHistogram() ) // use bin centers for ( int i = 0; i < x_vals.length-1; i++ ) x_vals[i] = (x_vals[i] + x_vals[i+1])/2; energy_vals = new float[ y_vals.length ]; // find energy at Xs float length = pos.getDistance(); if ( time_of_flight ) // convert to ENERGY for ( int i = 0; i < energy_vals.length; i++ ) energy_vals[i] = tof_calc.Energy( length, x_vals[i] ); else for ( int i = 0; i < energy_vals.length; i++ ) // assume x_vals are energy_vals[i] = (float)(Ei - x_vals[i]); // ENERGY LOSS so also // convert to ENERGY self_vals = new float[ y_vals.length ]; for ( int i = 0; i < y_vals.length; i++ ) { self = SelfShielding( energy_vals[i], Ei, phi, mutS, mutA, gamma ); y_vals[i] *= self; err_vals[i] *= self; self_vals[i] = (float)self; } // y_vals are changed by ((TabulatedData)data).setErrors(err_vals); // reference, but we need // to explicitly set the // new error values float[] new_x_vals = new float[self_vals.length]; // now make a new Data for ( int i = 0; i < new_x_vals.length; i++ ) // block for the self new_x_vals[i] = x_vals[i]; // shieldling factors // relative to original // x_vals. Data d = new FunctionTable( new VariableXScale(new_x_vals), self_vals, index ); self_ds.addData_entry( d ); } new_ds.addLog_entry("Applied Self Shielding correction using \n"+ " mutS = " + mutS + "\n" + " mutA = " + mutA + "\n" + " gamma = " + gamma + "\n" ); self_ds.addLog_entry("Created DataSet using Energy Loss values \n" + "as the X-values and the calculated self \n" + "shielding factors for the Y-values." ); Vector results = new Vector(); results.add( new_ds ); results.add( self_ds ); return results; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void updateOscilloscopeData() {\n rmsSum = 0;\n boolean overshoot = false;\n int reactorFrequency = getReactorFrequency().intValue();\n int reactorAmplitude = getReactorAmplitude().intValue();\n double reactorPhase = getReactorPhase().doubleValue();\n int controlFre...
[ "0.5229264", "0.49174646", "0.47903907", "0.473097", "0.46902567", "0.46842363", "0.46328658", "0.45875245", "0.45841646", "0.4568018", "0.4552366", "0.45463985", "0.45131248", "0.4508075", "0.4500568", "0.44992363", "0.44991675", "0.44694617", "0.44574696", "0.4456853", "0.4...
0.5047404
1
Calculate a correction factor for selfshielding by the sample, for one specific energy level.
public static double SelfShielding( double energy, double Ei, double phi, double mutS, double mutA, double gamma ) { double self = 0; // the calculated self shielding double muti, mutf; double gamma_rad = gamma * Math.PI/180; // radian version of angles for double phi_rad = phi * Math.PI/180; // Math.cos() function if ( mutA == 0 && mutS == 0 ) self = 1.0; // default to self = 1 else if ( gamma < 89.9 || gamma > 90.1 ) // do the full calculation { muti = ( mutS + mutA * Math.sqrt(25.299/Ei)) / Math.cos(gamma_rad); if ( phi-gamma < 89.9 ) { mutf = (mutS+mutA*Math.sqrt(25.299/energy))/ Math.cos( phi_rad - gamma_rad ); self = (mutf-muti)/(Math.exp(-muti)-Math.exp(-mutf)); } else if ( phi-gamma > 90.1 ) { mutf = (mutS+mutA*Math.sqrt(25.299/energy))/ Math.cos( phi_rad - gamma_rad ); self = (mutf-muti)/(Math.exp(mutf-muti)-1.0); } } return self; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected double updateCorrect(double oldVal, double difflevel) {\r\n double pSlip = 0.4 ; //0.5 - difflevel / 10;\r\n double pGuess = 0.4 ; //0.5 - difflevel / 10 ;\r\n\r\n double newVal= ((1 - pSlip) * oldVal) / (((1 - pSlip) * oldVal) + (pGuess * (1 - oldVal)));\r\n return newVal;\r\...
[ "0.5930689", "0.5484262", "0.5481001", "0.54533994", "0.54507357", "0.5345414", "0.5238644", "0.5187951", "0.51869804", "0.5176482", "0.5162171", "0.51429", "0.5141228", "0.51397777", "0.50570613", "0.5034214", "0.50218", "0.5014798", "0.49687144", "0.49682015", "0.49620306",...
0.46292353
73
Main program for basic functionality tests.
public static void main( String args[] ) { double Ei = 500; double EPS = 10; double phi = 60; float mutS = 0.1f; float mutA = 0.2f; float gamma = 45; double energy = Ei - EPS; double self = SelfShielding( energy, Ei, phi, mutS, mutA, gamma ); System.out.println( "self shielding factor = " + self ); // result should be: 1.1944503488285683 String filename = "/usr2/HRCS_TEST/hrcs3084.run"; RunfileRetriever rr = new RunfileRetriever( filename ); DataSet ds = rr.getDataSet(1); Operator ToEL = new SpectrometerTofToEnergyLoss( ds, 0, 0, 0 ); ds = (DataSet)ToEL.getResult(); new ViewManager( ds, IViewManager.IMAGE ); Vector result = SelfShielding( ds, mutS, mutA, gamma, true ); DataSet ss_ds_1 = (DataSet)result.elementAt(0); new ViewManager( ss_ds_1, IViewManager.IMAGE ); DataSet ss_ds_2 = (DataSet)result.elementAt(1); new ViewManager( ss_ds_2, IViewManager.IMAGE ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args){\n new Testing().runTests();\r\n \r\n }", "@Test\n public void main() {\n MainApp.main(new String[] {});\n }", "public static void main(String[] args) {\n // PUT YOUR TEST CODE HERE\n }", "@Test\n public void testMain() {\n ...
[ "0.79663366", "0.78630346", "0.7860378", "0.7804028", "0.7780934", "0.7698685", "0.76852936", "0.75964165", "0.75804526", "0.7505777", "0.7491956", "0.7484661", "0.74537975", "0.74448854", "0.74385136", "0.74238294", "0.7408518", "0.740261", "0.7391914", "0.7387045", "0.73830...
0.0
-1
Created by com.hongbao.api.MybatisCodeGenerate on 20161212
public interface ReWelfareDAO { int deleteByPrimaryKey(Long welfareId); void insert(ReWelfare record); void insertSelective(ReWelfare record); void insertBatch(List<ReWelfare> records); ReWelfare selectByPrimaryKey(Long welfareId); int updateByPrimaryKeySelective(ReWelfare record); int updateByPrimaryKey(ReWelfare record); /** * 精选列表 * @param platform * @return */ List<ReWelfare> selectSelectionListByPlatform(int platform); /** * 福利 * * @param platform * @param welfareId * @param welfareType * @return */ List<ReWelfare> selectListByPlatform(int platform, Long welfareId, Integer welfareType); /** * 从mysql中获取福利id列表 * @param platform 平台 * @param welfareType 类型 * @return */ List<Long> selectWelfareIdListOrderByUpdateTimeDesc(int platform,Integer welfareType); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface CrmDmDbsBmsMapper {\n public static String TABLENAME = \"crm_dm_bds_bms\";\n @Select(\"select * from \"+TABLENAME+\" WHERE staff_city_id=#{cityId, jdbcType=BIGINT} limit 10 \")\n @Results({\n @Result(column=\"id\", property=\"id\", jdbcType= JdbcType.BIGINT, id=true),\n @Res...
[ "0.68839437", "0.6557645", "0.65526265", "0.6477804", "0.63311315", "0.63127875", "0.62889457", "0.62748", "0.62427723", "0.62232095", "0.620055", "0.6200509", "0.62003046", "0.61891437", "0.6187125", "0.61808026", "0.6179314", "0.61633724", "0.60937005", "0.6093071", "0.6082...
0.0
-1
Have 2 users: 1) 1 Vasya Murmansk. 2) 5 Vova Vologda. Expect map: 1 : Vasya 5 : Vova.
@Test public void whenHaveListOfUsersThenMakeMapOfUsers() { HashMap<Integer, User> expect = new HashMap<>(); User firstUser = new User(1, "Vasya", "Murmansk"); User secondUser = new User(5, "Vova", "Vologda"); expect.put(1, firstUser); expect.put(5, secondUser); List<User> list = new ArrayList<>(); list.add(firstUser); list.add(secondUser); UserConvert userConvert = new UserConvert(); assertThat(userConvert.process(list), is(expect)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setUserMap() {\n ResultSet rs = Business.getInstance().getData().getAllUsers();\n try {\n while (rs.next()) {\n userMap.put(rs.getString(\"username\"), new User(rs.getInt(\"id\"),\n rs.getString(\"name\"),\n rs.getStr...
[ "0.63361156", "0.6184911", "0.61669093", "0.6126356", "0.58625925", "0.5837498", "0.5674721", "0.5655693", "0.5619762", "0.56165296", "0.5546396", "0.5479958", "0.54604906", "0.5454519", "0.54340565", "0.54055244", "0.5373021", "0.5283445", "0.5274758", "0.527051", "0.5258285...
0.53454906
17
private double height; private int h2; private double imwidth; private double pwidth; private int oldwidth; private int oldheight; private int L; private double oldX; private double oldY; private double DoldWidth; private double DoldHeight; private double newX; private int inewX; private double newY; private int inewY; Constructor that takes an Image as the parameter and sets up the Panel
public SymImage(Image SymImage) { this.imgBackground = SymImage; /** * Setup for Scaling imwidth = (double) this.imgBackground.getWidth(null); oldwidth = 461; oldheight = 361; */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ScrollingImagePanel(RenderedImage im, int width, int height) {\n super();\n this.im = im;\n this.panelWidth = width; \n this.panelHeight = height;\n \n ic = new ImageCanvas(im);\n\n getHAdjustable().addAdjustmentListener(this);\n getVAdjustable().addAdjustmentListener(this);\n \n...
[ "0.681392", "0.67335296", "0.6531845", "0.63887155", "0.63761747", "0.63108546", "0.6280318", "0.62664217", "0.625487", "0.60428387", "0.60334504", "0.60182285", "0.601126", "0.59983724", "0.59982955", "0.59927094", "0.5954151", "0.5941045", "0.5934117", "0.59200865", "0.5901...
0.5594563
57
Method to change the background image
public void ChangeImage(Image SymImage){ this.imgBackground = SymImage; /** imwidth = (double) this.imgBackground.getWidth(null); oldwidth = 461; oldheight = 361; */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setBackgroundImage(BackgroundImage image) {\n this.backgroundImage = image;\n }", "public void setBackground(){\r\n Image background = new Image(\"Cards/table.jpg\", 192, 80, false, true);\r\n BackgroundImage backgroundImg = new BackgroundImage(background, BackgroundRepeat.REPEA...
[ "0.81308454", "0.7703056", "0.7585706", "0.7581351", "0.7445809", "0.74289066", "0.73339355", "0.7242165", "0.7171092", "0.7111988", "0.7087589", "0.68907374", "0.6888842", "0.68858063", "0.67958426", "0.6763298", "0.6761408", "0.67514235", "0.6712769", "0.66833764", "0.66804...
0.61350816
49
TODO Autogenerated method stub
@Override protected void onCreate(Bundle savedInstanceState) { mActivityManager = (ActivityManager) (getSystemService(Context.ACTIVITY_SERVICE)); super.onCreate(savedInstanceState); }
{ "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 getExr...
[ "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.608016...
0.0
-1
When an object implementing interface Runnable is used to create a thread, starting the thread causes the object's run method to be called in that separately executing thread. The general contract of the method run is that it may take any action whatsoever.
@Override public void run() { while (true) { synchronized (student) { //判断有没有 if (student.flag) { try { student.wait(); //立即释放锁,将来醒过来的时候还是从这里醒过来 } catch (InterruptedException e) { e.printStackTrace(); } } if (i % 2 == 0) { student.name = "muzi"; student.age = 24; } else { student.name = "wacai"; student.age = 30; } i++; //修改标记 student.flag = true; //唤醒线程 student.notify(); //唤醒不代表可以立即执行,必须还得抢cpu执行权 } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface Startable extends Runnable {\n \n /**\n * Waits until the thread this object is running in is finished before returning.\n */\n public void join();\n \n /**\n * Checks whether the component is done with its work.\n * @return <code>true</code> if the component is fini...
[ "0.70473224", "0.6959602", "0.68878573", "0.67356926", "0.6643415", "0.6577995", "0.65193015", "0.64961", "0.64958775", "0.64664197", "0.6445248", "0.6440278", "0.63915735", "0.63882184", "0.6380882", "0.63735896", "0.6365825", "0.6365825", "0.6365825", "0.6365825", "0.636582...
0.0
-1
When an object implementing interface Runnable is used to create a thread, starting the thread causes the object's run method to be called in that separately executing thread. The general contract of the method run is that it may take any action whatsoever.
@Override public void run() { synchronized (student) { if (!student.flag) { try { student.wait(); //立即释放锁 } catch (InterruptedException e) { e.printStackTrace(); } } System.out.println(student.name + ":" + student.age); //修改标记 student.flag = false; //唤醒线程 student.notify(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface Startable extends Runnable {\n \n /**\n * Waits until the thread this object is running in is finished before returning.\n */\n public void join();\n \n /**\n * Checks whether the component is done with its work.\n * @return <code>true</code> if the component is fini...
[ "0.70480806", "0.69602704", "0.6888582", "0.67372245", "0.6644613", "0.65788174", "0.6518699", "0.6495727", "0.6494343", "0.6466113", "0.6445565", "0.64434195", "0.6392324", "0.63891566", "0.6379436", "0.6373755", "0.6366418", "0.6366418", "0.6366418", "0.6366418", "0.6366418...
0.0
-1
Instantiates a new Uri register executor subscriber.
public URIRegisterExecutorSubscriber(final Map<String, ShenyuClientRegisterServiceFactory> shenyuClientRegisterService) { this.shenyuClientRegisterService = shenyuClientRegisterService; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void register(Object subscriber) {\n }", "public abstract Endpoint createAndPublishEndpoint(String address, Object implementor);", "Subscriber create(Subscriber subscriber);", "public Endpoint registerConsumer(NodeName nodeName, String name,\n Str...
[ "0.5307305", "0.5292064", "0.5247383", "0.51800144", "0.5146448", "0.5033609", "0.5022439", "0.49856037", "0.4981442", "0.48866978", "0.48826164", "0.48717073", "0.48641068", "0.48636806", "0.48561987", "0.4853984", "0.48342827", "0.48312604", "0.48154184", "0.48043865", "0.4...
0.5592062
0
Handles the error if one occurs.
private void action_error(HttpServletRequest request, HttpServletResponse response) throws IOException { //assumiamo che l'eccezione sia passata tramite gli attributi della request //we assume that the exception has been passed using the request attributes Map data=new HashMap(); Exception exception = (Exception) request.getAttribute("exception"); String message; if (exception != null && exception.getMessage() != null) { message = exception.getMessage(); } else { message = "Unknown error"; } data.put("errore",message); FreeMarker.process("404error.html",data, response, getServletContext()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void handleError(Exception ex);", "protected void handleError(String error, boolean fromSysErr) {}", "public void handleError(int code);", "protected void handleError(ErrorEvent event)\r\n\t{\r\n\t\t// no default behavior\r\n\t}", "@Override\n\t\t\t\t\t\t\tpublic void error(Exception e) {\n\t\t\t\t\t\t\t\t...
[ "0.7445081", "0.72651637", "0.72538644", "0.7175648", "0.7126768", "0.70865476", "0.70865476", "0.6867484", "0.6824204", "0.6746739", "0.66956973", "0.6636426", "0.6635718", "0.6633121", "0.6621006", "0.6576472", "0.65499496", "0.6540955", "0.6527723", "0.64859843", "0.646357...
0.0
-1
Processes requests for both HTTP GET and POST methods.
protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException, NamingException, SQLException, ParserConfigurationException, org.xml.sax.SAXException { Map data= new HashMap(); TrascrizioneDAOImplements t=new TrascrizioneDAOImplements(); UtenteDAOImplements u=new UtenteDAOImplements(); NotificaDAOImplements n=new NotificaDAOImplements(); HttpSession s = SecurityLayer.checkSession(request); Database.connect(); String email=u.getUtenteSingolo((int) s.getAttribute("userid")).getEmail(); if (!isNull(s) && ((String)s.getAttribute("username")).equals(email+"stafftrascrittore")) { Immagine image = null; String opera=request.getParameter("opera"); int immagine = (request.getParameter("npg") == null) ? 99999 : Integer.parseInt(request.getParameter("npg")); if(!isNull(opera) && (immagine!=99999)){ OperaDAOImplements o=new OperaDAOImplements(); ImmagineDAOImplements i=new ImmagineDAOImplements(); Opera op=o.getOperaSingola(opera); image=i.getImmagineSingola(op.getId(), immagine); data.put("opera",op); data.put("immagine",image); data.put("staff","Trascrizioni"); } if(!isNull(image)){model.transfer_objects.Trascrizione tr=t.getTrascrizioneImmagine(image.getId()); if(!isNull(tr)){ File file=new File(getServletContext().getRealPath("")+"Trascrizioni/teicontainer.xml"); FileUtils.writeStringToFile(file,tr.getFile(),"UTF-8"); data.put("trascrizione","\"Trascrizioni/teicontainer.xml\""); }else data.put("trascrizione","\"Trascrizioni/teistart.xml\""); data.put("opera","\""+opera+"\""); } //gestico ricezione ajax if("XMLHttpRequest".equals(request.getHeader("X-Requested-With"))){ String x=request.getParameter("xmlString"); int npg=Integer.parseInt(request.getParameter("npg")); JSONObject obj = null; if(validateWithIntXSDUsingDOM(x)){ model.transfer_objects.Trascrizione tr=t.getTrascrizioneImmagine(npg); data.put("file",x); t.updateTrascrizione(data,"immagine="+Integer.parseInt(request.getParameter("img"))); try { obj = new JSONObject().put("success",true); } catch (JSONException ex) { Logger.getLogger(Trascrizione.class.getName()).log(Level.SEVERE, null, ex); } try (PrintWriter out = response.getWriter()) { out.print(obj); } Database.close(); return; }else{try { obj = new JSONObject().put("success",false).put("alert",error.replace("è", "&egrave;").replace("È","&Egrave;").replace("à","&agrave;")); } catch (JSONException ex) { Logger.getLogger(Trascrizione.class.getName()).log(Level.SEVERE, null, ex); } try (PrintWriter out = response.getWriter()) { out.print(obj); } Database.close(); return; } } if(!isNull(request.getParameter("trascrittore"))){ int img=Integer.parseInt(request.getParameter("img")); File xml=new File(getServletContext().getRealPath("")+"Trascrizioni/teistart.xml"); if(t.addTrascrizione(new model.transfer_objects.Trascrizione(FileUtils.readFileToString(xml, "UTF-8"),false,img))){ Notifica nt=new Notifica( Integer.parseInt(request.getParameter("trascrittore")), "Trascrizione Iniziata", t.getTrascrizioneImmagine(img).getId()); n.addNotifica("notifiche_trascrizione", nt); }} Database.close(); FreeMarker.process("back_editor.html", data, response, getServletContext()); }else{ Database.close(); action_error(request,response);} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void doPost(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException {\n final String method = req.getParameter(METHOD);\n if (GET.equals(method)) {\n doGet(req, resp);\n } else {\n resp.setStatus(HttpServletResponse.SC_METHOD_NOT_...
[ "0.7004024", "0.66585696", "0.66031146", "0.6510023", "0.6447109", "0.64421695", "0.64405906", "0.64321136", "0.6428049", "0.6424289", "0.6424289", "0.6419742", "0.6419742", "0.6419742", "0.6418235", "0.64143145", "0.64143145", "0.6400266", "0.63939095", "0.63939095", "0.6392...
0.0
-1
Handles the HTTP GET method.
@Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { try { processRequest(request, response); } catch (NamingException | SQLException ex) { Logger.getLogger(Trascrizione.class.getName()).log(Level.SEVERE, null, ex); action_error(request, response); } catch (ParserConfigurationException | SAXException ex) { Logger.getLogger(Trascrizione.class.getName()).log(Level.SEVERE, null, ex); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void doGet( )\n {\n \n }", "@Override\n\tprotected void executeGet(GetRequest request, OperationResponse response) {\n\t}", "@Override\n\tprotected Method getMethod() {\n\t\treturn Method.GET;\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) thro...
[ "0.7589609", "0.71665615", "0.71148175", "0.705623", "0.7030174", "0.70291144", "0.6995984", "0.697576", "0.68883485", "0.6873811", "0.6853569", "0.6843572", "0.6843572", "0.6835363", "0.6835363", "0.6835363", "0.68195957", "0.6817864", "0.6797789", "0.67810035", "0.6761234",...
0.0
-1
Handles the HTTP POST method.
@Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { try { processRequest(request, response); } catch (NamingException | SQLException ex) { Logger.getLogger(Trascrizione.class.getName()).log(Level.SEVERE, null, ex); action_error(request, response); } catch (ParserConfigurationException | SAXException ex) { Logger.getLogger(Trascrizione.class.getName()).log(Level.SEVERE, null, ex); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void doPost(Request request, Response response) {\n\n\t}", "@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) {\n }", "public void doPost( )\n {\n \n }", "@Override\n public String getMethod() {\n return \"POST\";\n ...
[ "0.7327792", "0.71364146", "0.71150917", "0.7103484", "0.7098967", "0.7022197", "0.7014374", "0.6963617", "0.6887727", "0.67830557", "0.6772561", "0.67459744", "0.6666483", "0.65569043", "0.655617", "0.65236866", "0.6523533", "0.6523533", "0.6523533", "0.652217", "0.65187013"...
0.0
-1
Returns a short description of the servlet.
@Override public String getServletInfo() { return "Short description"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getServletInfo()\n {\n return \"Short description\";\n }", "public String getServletInfo() {\n return \"Short description\";\n }", "public String getServletInfo() {\n return \"Short description\";\n }", "public String getServletInfo() {\n return \"Short d...
[ "0.87634975", "0.8732279", "0.8732279", "0.8732279", "0.8732279", "0.8732279", "0.8732279", "0.8732279", "0.8732279", "0.8732279", "0.8732279", "0.8699131", "0.8699131", "0.8699131", "0.8699131", "0.8699131", "0.8699131", "0.8531295", "0.8531295", "0.85282224", "0.85282224", ...
0.0
-1
connect to MySQL database
public static Connection getConnect(){ String url = "jdbc:mysql://120.24.220.176:3306/second_mysql_test"; Connection connecter = null; try { Class.forName("com.mysql.jdbc.Driver"); // java反射,固定写法 connecter = (Connection) DriverManager.getConnection(url, "root", "581825"); } catch (ClassNotFoundException e) { e.printStackTrace(); } catch (SQLException e) { System.out.println("SQLException: " + e.getMessage()); System.out.println("SQLState: " + e.getSQLState()); System.out.println("VendorError: " + e.getErrorCode()); } return connecter; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void connectToDatabase(){\n\t\ttry{\n\t\t connection = DriverManager.getConnection(dbConfig.getUrl(), dbConfig.getUser(), dbConfig.getPassword());\n\t\t System.out.println(\"Successfully connected to database.\");\n\t\t} catch (Exception e){\n\t\t\tSystem.out.println(\"An error occurred while attempti...
[ "0.79105484", "0.7881183", "0.78777426", "0.7854197", "0.78484917", "0.77485365", "0.7716164", "0.7660094", "0.7653861", "0.7651256", "0.76296467", "0.7617446", "0.75836164", "0.75539714", "0.75464064", "0.75388545", "0.75297564", "0.74875313", "0.74760884", "0.74632525", "0....
0.0
-1
/ If a String is reversed and it remains unchanged, that is called Palindrome. For example, MOM,DAD,MADAM are Palindrome. So write java code to check if a given String is Palindrome or not.
public static void main(String[] args) { String s = "MOM"; String reverse = ""; String d = "IMTIAZ"; String back = ""; char[] word = s.toLowerCase().toCharArray(); for (int i = s.length() - 1; i >= 0; i--) { reverse = reverse + s.charAt(i); for (int j = d.length() - 1; j >= 0; j--) { back = back + d.charAt(j); } } if (s.equals(reverse)) { System.out.println(s + "--word is a palindron"); } else { System.out.println(s + "--word is not a palindron"); } if (d.equals(back)) System.out.println(d + "--word is a palindron"); else System.out.println(d + "--word is not a palindron"); isPalindrome("MADAM"); isPalindrome("IMTIAZ"); isPalindrome("AHMED"); isPalindrome("MOM"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static boolean IsPalindrome(String string){\r\n \r\n string = string.replace(\" \", \"\");\r\n \r\n String reverseString = new StringBuilder(string).reverse().toString();\r\n\r\n return reverseString.equalsIgnoreCase(string);\r\n }", "public static boolean isPalindrom...
[ "0.8673043", "0.8396192", "0.83919597", "0.8379654", "0.835144", "0.83445054", "0.82991123", "0.82990974", "0.82921505", "0.82912415", "0.82858133", "0.82805926", "0.823032", "0.82260364", "0.8217167", "0.8214045", "0.8211753", "0.8199614", "0.8169976", "0.8145782", "0.813954...
0.7575388
57
TODO Autogenerated method stub
@Override public void sit() { }
{ "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 getExr...
[ "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.608016...
0.0
-1
TODO Autogenerated method stub
@Override public void roll() { System.out.println("구른다."); }
{ "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 getExr...
[ "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.608016...
0.0
-1
Created by rsbulanon on 6/23/16.
public interface OnApiRequestListener { void onApiRequestBegin(final String action); void onApiRequestSuccess(final String action, final Object result); void onApiRequestFailed(final String action, final Throwable t); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n public void func_104112_b() {\n \n }", "public final void mo51373a() {\n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "protected boolean func_70814_o() { return true; }", "private stendhal() {\n\t}", "pri...
[ "0.58404994", "0.58212507", "0.5784913", "0.5729383", "0.57196784", "0.56737", "0.56638855", "0.56605697", "0.563887", "0.563242", "0.5616236", "0.5616236", "0.55724674", "0.55724674", "0.55724674", "0.55724674", "0.55724674", "0.5546916", "0.5541354", "0.5535566", "0.5521171...
0.0
-1
Created by Hamza on 10/16/2017.
public interface ReviewContract { /* View - this defines the methods that the pure views like Activity or Fragments etc will implement. */ public interface View{ void setupViews(); void onClickSubmitReview(); void showSuccessfullReviewSubmit(); void showErrorSubmitReview(); } /* Actions - this defines the methods the pure Presenter class will implement. Also known as user actions, this is where the app logic is defined. */ public interface Actions { void initScreen(); void submitReview(String accessToken, String productID, String rating, String orderDID, String comment); } /* this defines the methods that pure model or persistence class like database or server data will implement. */ public interface Repository { } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpubl...
[ "0.60633606", "0.58811593", "0.58738595", "0.58323544", "0.5802316", "0.572205", "0.572205", "0.5672263", "0.56692666", "0.56660354", "0.5656198", "0.564758", "0.5639575", "0.56300676", "0.5606073", "0.5604094", "0.56001437", "0.56001437", "0.56001437", "0.56001437", "0.56001...
0.0
-1
/ View this defines the methods that the pure views like Activity or Fragments etc will implement.
public interface View{ void setupViews(); void onClickSubmitReview(); void showSuccessfullReviewSubmit(); void showErrorSubmitReview(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface BaseView {\n\n /**\n * 显示正在加载的View-id,以及携带的数据 args\n */\n void showLoading(int id, Bundle args);\n\n /**\n * 关闭正在加载的View-id\n */\n void dimissLoading(int id);\n\n /**显示提示\n * @param msg\n */\n void showToast(String msg,int resId);\n\n /**\n * 获取上下文\...
[ "0.74086523", "0.71802455", "0.7152819", "0.70644915", "0.70248866", "0.6970548", "0.6944639", "0.6914258", "0.6903865", "0.6883366", "0.68397135", "0.6824631", "0.6824631", "0.6824631", "0.6824631", "0.6824631", "0.6824631", "0.6824631", "0.68231857", "0.68231857", "0.682318...
0.6888496
9
/ Actions this defines the methods the pure Presenter class will implement. Also known as user actions, this is where the app logic is defined.
public interface Actions { void initScreen(); void submitReview(String accessToken, String productID, String rating, String orderDID, String comment); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void action() {\n }", "@Override\n public void action() {\n }", "@Override\n public void action() {\n }", "@Override\r\n\tpublic void action() {\n\t\t\r\n\t}", "public interface AppAction\n{\n void login(String name, St...
[ "0.69671345", "0.69671345", "0.69671345", "0.6911453", "0.6890164", "0.67584693", "0.67141294", "0.66181254", "0.66181254", "0.66181254", "0.66181254", "0.6553898", "0.652", "0.652", "0.65142924", "0.65142924", "0.65142924", "0.65142924", "0.65142924", "0.65142924", "0.651429...
0.6888255
5
/ this defines the methods that pure model or persistence class like database or server data will implement.
public interface Repository { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface DatabaseTool {\r\n\r\n\t\r\n\t/**\r\n\t * Get all objects from the database. It should retrieve all information and put it into the database. It is important\r\n\t * that the name in the database and the name in the class matches. It is not case sensitive. It will default follow\r\n\t * complex ob...
[ "0.6644144", "0.65990096", "0.6571834", "0.65690696", "0.6553046", "0.6400586", "0.6378455", "0.63327974", "0.6305803", "0.630182", "0.6299689", "0.6295101", "0.6292461", "0.62548196", "0.6222365", "0.62151444", "0.62134635", "0.6212494", "0.6197097", "0.61969334", "0.6196657...
0.0
-1
put values in a list
public static List<String> sortUniqueWords(HashMap<String, Integer> tracker, List<String> allWords) { List<Integer> frequency = new ArrayList<>(tracker.values()); frequency.sort(Collections.reverseOrder()); List<String> result = new ArrayList<>(); while(!tracker.isEmpty()){ for (String key : allWords) { if(frequency.size()!= 0 && frequency.get(0) == tracker.get(key)){ frequency.remove(0); result.add(key + " " + tracker.get(key)); tracker.remove(key); } } } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List getValues();", "java.util.List<java.lang.String> getValuesList();", "public List<Object> getValues();", "public void jibxAddValues(List values) {\n if (values != null) {\n allocateValues();\n this.values.addAll(values);\n }\n }", "public void setValues(List<Objec...
[ "0.73460525", "0.70434505", "0.67365247", "0.6486409", "0.64536273", "0.6412441", "0.63917863", "0.6302317", "0.6262583", "0.6234613", "0.6161974", "0.6156588", "0.61332226", "0.61145926", "0.6113585", "0.609391", "0.60736984", "0.6044111", "0.60338175", "0.6028579", "0.60039...
0.0
-1
Retornar os dados do Banco
public static void getProduto(){ try { PreparedStatement stmn = connection.prepareStatement("select id_produto, codigo, produto.descricao pd,preco, grupo.descricao gd from produto inner join grupo on grupo.id_grupo = produto.idgrupo order by codigo"); ResultSet result = stmn.executeQuery(); System.out.println("id|codigo|descricao|preco|grupo"); while (result.next()){ long id_produto = result.getLong("id_produto"); String codigo = result.getString("codigo"); String pd = result.getString("pd"); String preco = result.getString("preco"); String gd = result.getString("gd"); System.out.println(id_produto+"\t"+codigo+"\t"+pd+"\t"+preco+"\t"+gd); } }catch (Exception throwables){ throwables.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public ArrayList<Endereco> buscar() {\n PreparedStatement stmt;\n ResultSet rs;\n ArrayList<Endereco> arrayEndereco = new ArrayList<>();\n try {\n \n stmt = ConexaoBD.conectar().prepareStatement(\"SELECT * FROM Endereco\");\n rs = stmt.ex...
[ "0.69106436", "0.6837204", "0.67828244", "0.6740992", "0.66512614", "0.657707", "0.6572332", "0.655755", "0.6540599", "0.65349704", "0.6531998", "0.64811236", "0.6385025", "0.6377917", "0.6355039", "0.632004", "0.6312551", "0.63021165", "0.62901884", "0.62891465", "0.62670904...
0.0
-1
Editar registro do banco
public static void atualizarProduto(long id_produto, String codigo, String descricao,String preco,long idgrupo){ try { PreparedStatement stmn = connection.prepareStatement("Update produto set codigo = ?, descricao =? , preco =?,idgrupo =? where id_produto = ?"); stmn.setString(1,codigo); stmn.setString(2,descricao); stmn.setString(3,preco); stmn.setLong(4,idgrupo); stmn.setLong(5,id_produto); int row = stmn.executeUpdate(); if(row == 0){ System.out.println("Informação não alterada"); }else{ System.out.println("Dados atualizados"); } } catch (SQLException throwables) { throwables.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void editar(Contato contato) {\n\t\tthis.dao.editar(contato);\n\t\t\n\t}", "public void editar(AplicacionOferta aplicacionOferta){\n try{\n aplicacionOfertaDao.edit(aplicacionOferta);\n }catch(Exception e){\n Logger.getLogger(AplicacionOfertaServicio.class....
[ "0.7144406", "0.6604007", "0.65939564", "0.6557078", "0.6473884", "0.64716315", "0.6461881", "0.64390314", "0.6436293", "0.6402756", "0.6319817", "0.627707", "0.62661624", "0.6211001", "0.61891216", "0.6180815", "0.61049", "0.6104105", "0.610403", "0.6092226", "0.6087211", ...
0.0
-1
Deletar dados do Banco
public static void deletarProduto(long id_produto) { PreparedStatement stmn = null; try { stmn = connection.prepareStatement("Delete from produto where id_produto = ?"); stmn.setLong(1, id_produto); int row = stmn.executeUpdate(); if (row == 0) { System.out.println("Não foi possível excluir o registro do id " + id_produto); } else { System.out.println("Produto exluído com sucesso"); } } catch (SQLException throwables) { throwables.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void imprimirBancoDados() {\n\t\tSystem.out.println(\"Nome do Banco: \"+nomeBanco);\n\t\tSystem.out.println(\"Tipo do Banco: \"+tipoBanco);\n\t\tSystem.out.println(\"Lista de Metodos: \"+listaMetodos);\n\t}", "public void Lista(){\n\t\tcabeza = null;\n\t\ttamanio = 0;\n\t}", "public void im...
[ "0.7205079", "0.66970325", "0.6550745", "0.65398926", "0.64905834", "0.6465591", "0.6382745", "0.63365126", "0.63070315", "0.6294776", "0.6249232", "0.62275004", "0.6183146", "0.6175531", "0.61636215", "0.61561036", "0.61543256", "0.613726", "0.61368304", "0.61350065", "0.612...
0.0
-1
This method checks if the object is in the area where the mouse is clicked. If the mouseclick happens in a shape, that shape will be selected.
@Override public void mouseClicked(MouseEvent event) { System.out.println("clicked"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void checkClickedArea(int xMouse,int yMouse)\n {\n\n isSelected=false;\n if(targetable==true&&(xMouse>=xBeginMap+15&&xMouse<=xEndMap-15\n &&yMouse>=yBeginMap+15&&yMouse<=yEndMap-15))\n {\n\n isSelected=true;\n }\n\n }", "protected abstract boolea...
[ "0.72323924", "0.6678058", "0.65169203", "0.6500201", "0.6483899", "0.63772154", "0.636324", "0.63526666", "0.62917084", "0.6280277", "0.62771404", "0.6221154", "0.6212404", "0.62017953", "0.6185693", "0.6175247", "0.616189", "0.60788304", "0.6053974", "0.60518837", "0.600649...
0.0
-1
When the mouse is pressed, depending on which state, mousePressed will do something different
@Override public void mousePressed(MouseEvent event) { // on left mouse press, draw shapes System.out.println("pressed"); switch (state) { case DRAWRECT: // for drawing rectangle RectangleNode rectangle = new RectangleNode(event.getX(), event.getY()); shapes.add(rectangle); repaint(); state = SELECT; break; case DRAWELLIPSE: // for drawing ellipse EllipseNode ellipse = new EllipseNode(event.getX(), event.getY()); shapes.add(ellipse); repaint(); state = SELECT; break; case DRAWEDGE: // for drawing edge start Edge edge = new Edge(event.getX(), event.getY(), event.getX(), event.getY()); currentEdge = edge; shapes.add(edge); repaint(); state = DRAWINGEDGE; break; case DRAWINGEDGE: // for drawing edge end repaint(); currentEdge = null; state = SELECT; break; default: // select if (event.getButton() == MouseEvent.BUTTON1) { // if the left mouse button is clicked for (int i = 0; i < shapes.size(); i++) { if (shapes.get(i).isClicked(event.getX(), event.getY())) { // checks if the mouse click is in a shape System.out.println("selecting shit"); if (selectedElement != null) { selectedElement.setColor(Color.BLACK); repaint(); selectedElement = null; } selectedElement = shapes.get(i); selectedElement.setColor(Color.BLUE); repaint(); break; } else if (selectedElement != null) { System.out.println("deselecting shit"); selectedElement.setColor(Color.BLACK); repaint(); selectedElement = null; } } } break; } if (event.getButton() == MouseEvent.BUTTON3 && selectedElement != null) { // on right mouse press shape is DELETED System.out.println("BUTTON TWO ASDFGHJKL;"); shapes.remove(selectedElement); selectedElement = null; repaint(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public boolean mousePressed(MouseEvent e) {\r\n state = 2;\r\n return true;\r\n }", "public void mousePressed() {\n\t\tif(detectCollision(this.p.mouseX,this.p.mouseY)) {\n\t\t\tthis.isPressed = true;\n\t\t\tclick();\n\t\t}\n\t}", "public void mousePressed() {\n }", "publi...
[ "0.8061793", "0.76591104", "0.76285714", "0.7479081", "0.7479081", "0.7479081", "0.74450964", "0.74340653", "0.7427547", "0.7327405", "0.7322963", "0.7303232", "0.72885334", "0.72805655", "0.7274776", "0.72668827", "0.7264743", "0.72574437", "0.72574437", "0.72574437", "0.725...
0.0
-1
Created by nuri on 25.07.2018
public interface AsyncPredicateListener { void onTrue(); void onFalse(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r...
[ "0.589911", "0.56863517", "0.5607863", "0.5549205", "0.55373675", "0.54524124", "0.54524124", "0.5450766", "0.5434322", "0.5428308", "0.5416212", "0.5415533", "0.540883", "0.54088056", "0.5398605", "0.53817695", "0.53772", "0.5366361", "0.53506446", "0.53459394", "0.53456783"...
0.0
-1
Call some getEntry method according to the arguments.
public Object callGetEntry(Configuration conf, Object testCase, String component, String name, Class type, Object defaultValue, Object data) throws ConfigurationException, TestException { if ( testCase == GET_ENTRY_3ARG_CASE) { return conf.getEntry(component, name, type); } else if (testCase == GET_ENTRY_4ARG_CASE) { return conf.getEntry(component, name, type, defaultValue); } else if (testCase == GET_ENTRY_5ARG_CASE) { return conf.getEntry(component, name, type, defaultValue, data); } else { throw new TestException("Unexpected test case"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void entry(Object... params) {\n\n\t}", "protected abstract S get(E entry);", "public Cache.Entry get(String param1) {\n }", "@KeepForSdk\n public abstract T getEntry(int i, int i2);", "@Test\n public void mapGet() {\n check(MAPGET);\n query(MAPGET.args(MAPNEW.args(\"()\"), ...
[ "0.62910146", "0.6230453", "0.60007375", "0.5976798", "0.5939193", "0.56284606", "0.5602727", "0.557037", "0.5533323", "0.5489209", "0.541253", "0.54023963", "0.53425145", "0.53224075", "0.53185636", "0.5281398", "0.52773315", "0.5200812", "0.5195102", "0.51923156", "0.519017...
0.63279384
0
Start test execution for the case. Actions see in class description.
public void runCase(Object testCase) throws Exception { logger.log(Level.INFO, "--------------------------"); final String componentName = FakeAbstractConfiguration.validComponentName; final Object[][] primitiveCases = FakeAbstractConfiguration.primitiveCases; String entryName = null; Object defaultValue = null; Object data = null; Object result = null; // 1 FakeAbstractConfiguration conf = new FakeAbstractConfiguration(); entryName = conf.validEntryName; defaultValue = new DefaultTestComponent(); data = new Object(); result = callGetEntry(conf, testCase, componentName, entryName, TestComponent.class, defaultValue, data); if (!(conf.getComponent().equals(componentName))) { throw new TestException( "component argument was not delivered successfully"); } if (!(conf.getName().equals(entryName))) { throw new TestException( "name argument was not delivered successfully"); } if (!(conf.getType().equals(TestComponent.class))) { throw new TestException( "type argument was not delivered successfully"); } if (testCase == GET_ENTRY_5ARG_CASE && !(conf.getData().equals(data))) { throw new TestException( "data argument was not delivered successfully"); } if (conf.getReturn() != result) { throw new TestException( "getEntry returns invalid object"); } // 2 if ( testCase == GET_ENTRY_4ARG_CASE || testCase == GET_ENTRY_5ARG_CASE) { conf = new FakeAbstractConfiguration(); entryName = "unexistEntry"; defaultValue = new DefaultTestComponent(); result = callGetEntry(conf, testCase, componentName, entryName, TestComponent.class, defaultValue, data); if (!(result.equals(defaultValue))) { throw new TestException( "getEntry should return default test component"); } } // 3 if ( testCase == GET_ENTRY_4ARG_CASE || testCase == GET_ENTRY_5ARG_CASE) { conf = new FakeAbstractConfiguration(); entryName = "unexistEntry"; try { result = callGetEntry(conf, testCase, componentName, entryName, TestComponent.class, Configuration.NO_DEFAULT, data); throw new TestException( "NoSuchEntryException should be thrown" + " in case of absent entry" + " and dafault value is equal to" + " Configuration.NO_DEFAULT"); } catch (NoSuchEntryException ignore) { logger.log(Level.INFO, "NoSuchEntryException in case of absent entry" + " and dafault value is equal to" + " Configuration.NO_DEFAULT"); } } // 4 for (int j = 0; j < primitiveCases.length; ++j) { Object[] subCase = primitiveCases[j]; logger.log(Level.INFO, "-- subcase: " + subCase[0]); entryName = (String) subCase[0]; Object returnValue = subCase[1]; defaultValue = subCase[2]; Class entryType = (Class) subCase[3]; conf = new FakeAbstractConfiguration(); result = callGetEntry(conf, testCase, componentName, entryName, entryType, defaultValue, null); if (!(result.equals(returnValue))) { throw new TestException( "getEntry returns invalid value: " + result); } } // 5 conf = new FakeAbstractConfiguration(); entryName = conf.validEntryName; try { result = callGetEntry(conf, testCase, null, entryName, TestComponent.class, Configuration.NO_DEFAULT, null); throw new TestException( "NullPointerException should be thrown if" + " component is null"); } catch (NullPointerException ignore) { logger.log(Level.INFO, "NullPointerException in case of" + " component is null"); } // 6 conf = new FakeAbstractConfiguration(); try { result = callGetEntry(conf, testCase, componentName, null, TestComponent.class, Configuration.NO_DEFAULT, null); throw new TestException( "NullPointerException should be thrown if" + " name is null"); } catch (NullPointerException ignore) { logger.log(Level.INFO, "NullPointerException in case of" + " name is null"); } // 7 conf = new FakeAbstractConfiguration(); entryName = conf.validEntryName; try { result = callGetEntry(conf, testCase, componentName, entryName, null, Configuration.NO_DEFAULT, null); throw new TestException( "NullPointerException should be thrown if" + " type is null"); } catch (NullPointerException ignore) { logger.log(Level.INFO, "NullPointerException in case of" + " type is null"); } // 8 conf = new FakeAbstractConfiguration(); entryName = conf.validEntryName; try { result = callGetEntry(conf, testCase, "invalid qualified identifier", entryName, TestComponent.class, Configuration.NO_DEFAULT, null); throw new TestException( "IllegalArgumentException should be thrown if" + " component is not valid qualified identifier"); } catch (IllegalArgumentException ignore) { logger.log(Level.INFO, "IllegalArgumentException in case of" + " component is not valid qualified identifier"); } // 9 conf = new FakeAbstractConfiguration(); entryName = conf.validEntryName; try { result = callGetEntry(conf, testCase, componentName, "invalid identifier", TestComponent.class, Configuration.NO_DEFAULT, null); throw new TestException( "IllegalArgumentException should be thrown if" + " name is not valid identifier"); } catch (IllegalArgumentException ignore) { logger.log(Level.INFO, "IllegalArgumentException in case of" + " name is not valid identifier"); } // 10 if ( testCase == GET_ENTRY_4ARG_CASE || testCase == GET_ENTRY_5ARG_CASE) { conf = new FakeAbstractConfiguration(); entryName = conf.validEntryName; try { result = callGetEntry(conf, testCase, componentName, entryName, TestComponent.class, new Object(), null); throw new TestException( "IllegalArgumentException should be thrown if" + " defaultValue is not of the right type"); } catch (IllegalArgumentException ignore) { logger.log(Level.INFO, "IllegalArgumentException in case of" + " defaultValue is not of the right type"); } } // 11 final Throwable[] exceptionList = { new java.lang.ArrayIndexOutOfBoundsException(), new java.lang.SecurityException(), new java.lang.NullPointerException(), new java.lang.ArithmeticException(), new java.lang.ArrayStoreException(), new java.lang.ClassCastException(), new java.util.EmptyStackException(), new java.lang.IllegalArgumentException(), new java.lang.IllegalMonitorStateException(), new java.lang.IllegalStateException(), new java.lang.IndexOutOfBoundsException(), new java.util.MissingResourceException("","",""), new java.lang.NegativeArraySizeException(), new java.util.NoSuchElementException(), new java.lang.NullPointerException(), new java.security.ProviderException(), new java.lang.SecurityException(), new java.lang.reflect.UndeclaredThrowableException(null), new java.lang.UnsupportedOperationException() }; for (int e = 0; e < exceptionList.length; ++e) { Throwable testException = exceptionList[e]; logger.log(Level.INFO, "-- subcase: " + testException); conf = new FakeAbstractConfiguration(); conf.setException(testException); entryName = conf.validEntryName; defaultValue = new DefaultTestComponent(); data = new Object(); try { result = callGetEntry(conf, testCase, componentName, entryName, TestComponent.class, defaultValue, data); throw new TestException( "getEntry should throw an exception"); } catch (ConfigurationException ce) { if (!(ce.getCause().equals(testException))) { throw new TestException( "getEntry throws an exception with invalid cause"); } } } conf.setException(null); // 12 final Throwable[] exceptionList2 = { new ConfigurationException(""), new ConfigurationNotFoundException(""), new NoSuchEntryException(""), new Error() }; for (int e = 0; e < exceptionList2.length; ++e) { Throwable testException = exceptionList2[e]; logger.log(Level.INFO, "-- subcase: " + testException); conf = new FakeAbstractConfiguration(); conf.setException(testException); entryName = conf.validEntryName; defaultValue = Configuration.NO_DEFAULT; data = new Object(); try { result = callGetEntry(conf, testCase, componentName, entryName, TestComponent.class, defaultValue, data); throw new TestException( "getEntry should throw an exception"); } catch (ConfigurationException ce) { if (!(ce.equals(testException))) { throw new TestException( "getEntry throws invalid exception"); } } catch (Error er) { if (!(er.equals(testException))) { throw new TestException( "getEntry throws an exception with invalid cause"); } } } conf.setException(null); // 13 conf = new FakeAbstractConfiguration(); conf.setReturn(new Object()); entryName = conf.validEntryName; defaultValue = new DefaultTestComponent(); data = new Object(); try { result = callGetEntry(conf, testCase, componentName, entryName, TestComponent.class, defaultValue, data); throw new TestException( "getEntry should throw ConfigurationException in case of" + " the return is not of the right type"); } catch (ConfigurationException ignore) { logger.log(Level.INFO, "ConfigurationException in case of" + " the return is not of the right type"); } // 14 for (int j = 0; j < primitiveCases.length; ++j) { Object[] subCase = primitiveCases[j]; logger.log(Level.INFO, "-- subcase: " + subCase[0]); entryName = (String) subCase[0]; Object returnValue = subCase[1]; defaultValue = subCase[2]; Class entryType = (Class) subCase[3]; conf = new FakeAbstractConfiguration(); conf.setReturn(new Object()); try { result = callGetEntry(conf, testCase, componentName, entryName, entryType, defaultValue, null); throw new TestException( "getEntry should throw ConfigurationException" + " in case of the return is not of the right type"); } catch (ConfigurationException ignore) { logger.log(Level.INFO, "ConfigurationException in case of" + " the return is not of the right type"); } } // 15 if ( testCase == GET_ENTRY_4ARG_CASE || testCase == GET_ENTRY_5ARG_CASE) { for (int j = 0; j < primitiveCases.length; ++j) { Object[] subCase = primitiveCases[j]; logger.log(Level.INFO, "-- subcase: " + subCase[0]); entryName = (String) subCase[0]; Object returnValue = subCase[1]; defaultValue = new Object(); Class entryType = (Class) subCase[3]; conf = new FakeAbstractConfiguration(); try { result = callGetEntry(conf, testCase, componentName, entryName, entryType, defaultValue, null); throw new TestException( "getEntry should throw IllegalArgumentException" + " in case of the default value is not the" + " associated wrapper class"); } catch (IllegalArgumentException ignore) { logger.log(Level.INFO, "IllegalArgumentException in case of" + " the default value is not the" + " associated wrapper class"); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void startTests() {\n if(testSettings.accessibleProperties || testSettings.accessibleInterface)\n testProperties();\n if(testSettings.tabTraversal)\n testTraversal();\n }", "public static void startTestCase(String testCase) throws Exception\n\t{\n\t\tint currentSuite...
[ "0.73513204", "0.72445744", "0.7164036", "0.7125145", "0.6858556", "0.6781465", "0.6768893", "0.676418", "0.6718243", "0.66826123", "0.6672932", "0.6640681", "0.66273224", "0.66268563", "0.66064984", "0.65911025", "0.6585745", "0.6538417", "0.6525036", "0.6523306", "0.6496717...
0.0
-1
This method performs all actions mentioned in class description.
public void run() throws Exception { for (int i = 0; i < testCases.length; ++i) { runCase(testCases[i]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void action() {\n }", "@Override\n public void action() {\n }", "@Override\n public void action() {\n }", "@Override\r\n\tpublic void action() {\n\t\t\r\n\t}", "public void performAction() {\n\t\t// TODO Auto-generated met...
[ "0.6645345", "0.6645345", "0.6645345", "0.6571593", "0.6332165", "0.6301484", "0.62074566", "0.61583364", "0.6093848", "0.6057415", "0.6005581", "0.6005581", "0.59993446", "0.5991552", "0.5987126", "0.59687304", "0.5961599", "0.59595484", "0.5946821", "0.59277606", "0.5909455...
0.0
-1
Given a list of categories, the function inserts them into MongoDB DMOZ database categories collection
void insertDocuments(Collection<Category> categoryList){ mongoCollection.drop(); for(Category category : categoryList){ String json = gson.toJson(category); Document document = Document.parse(json); mongoCollection.insertOne(document); System.out.println(json); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Flowable<List<Category>> addCategories(List<Category> categories) {\n return executeTransaction((bgRealm, subscriber) -> {\n bgRealm.copyToRealmOrUpdate(categories);\n });\n }", "private List<CategoryDb> createCategoryInstances(List<String> names) {\n List<CategoryDb> li...
[ "0.6621397", "0.60443807", "0.5934954", "0.59087145", "0.58468693", "0.5805875", "0.56988317", "0.5665928", "0.56512845", "0.5611086", "0.5592697", "0.5570977", "0.55663735", "0.5481304", "0.54663986", "0.54487467", "0.5426223", "0.5401622", "0.539972", "0.5363642", "0.536165...
0.80213124
0
Collects all categories where categories have no content and have siteURLs to extract content from. Iteratively extracts content from each URL and update it category respectively. Note: This function uses boiler pipe to get filtered content from a URL.
void updateContent(){ Document query = new Document(); // selected_collection.find({'locations' : {'$exists' : False}}, no_cursor_timeout=True) query.put("$where", "this.categoryContent.length==0 & this.siteURLs.length>0"); FindIterable findIterable = mongoCollection.find(query); int count = 0; for (Object doc: findIterable){ System.out.println(doc); StringBuilder content = new StringBuilder(); Document result = (Document) doc; int id = result.getInteger("id"); List<String> siteURLs = (List<String>) result.get("siteURLs"); int urlsCount = 0; for(String url :siteURLs){ try { String urlContent = getContent(url); if(urlContent != null){ content.append(urlContent).append("\n"); urlsCount++; if (urlsCount >= 5) break; } } catch (BoilerpipeProcessingException e) { System.err.println("URL: " + url + " Message: " + e.getMessage()); } catch (Exception e) { e.printStackTrace(); } } mongoCollection.updateOne(new Document("id", id),new Document("$set", new Document("categoryContent", content.toString()))); count++; } System.out.println(count); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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 -> {\...
[ "0.57321364", "0.5672516", "0.56496495", "0.5509219", "0.5380969", "0.5364446", "0.5207593", "0.5166012", "0.5118938", "0.50595045", "0.5047366", "0.5025237", "0.49758434", "0.49366525", "0.49251825", "0.49133983", "0.49104467", "0.48956928", "0.482763", "0.48133785", "0.4788...
0.5569044
3
Given a URL, this function creates a HTTP connection with URL and extracts its content using Boiler pipe. Note: If URL is redirected this function keeps on moving forward with redirected location till status code is different from 301.
private String getContent(String url) throws BoilerpipeProcessingException, IOException { int code; HttpURLConnection connection = null; URL uri; do{ uri = new URL(url); if(connection != null) connection.disconnect(); connection = (HttpURLConnection)uri.openConnection(); connection.setRequestMethod("GET"); connection.setConnectTimeout(5000); connection.setReadTimeout(5000); connection.connect(); code = connection.getResponseCode(); if(code == 301) url = connection.getHeaderField( "Location" ); }while (code == 301); System.out.println(url + " :: " + code); String content = null; if(code < 400) { content = ArticleExtractor.INSTANCE.getText(uri); } connection.disconnect(); return content; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private HttpConnection open(String url) throws IOException {\n HttpConnection c;\n int status = -1;\n\n // Open the connection and check for redirects\n while (true) {\n c = (HttpConnection) Connector.open(url);\n\n // Get the status code,\n // causing t...
[ "0.70495987", "0.6027595", "0.5963371", "0.59381896", "0.5905456", "0.58327913", "0.5798966", "0.57650316", "0.5732553", "0.5702279", "0.56723726", "0.5660268", "0.5655111", "0.565452", "0.564496", "0.56434554", "0.55833995", "0.5536142", "0.55262244", "0.5518354", "0.5514371...
0.7596612
0