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
Given a string, return a new string where the last 3 chars are now in upper case. If the string has less than 3 chars, uppercase whatever is there. EndUp("Hello") > "HeLLO" EndUp("hi there") > "hi thERE" EndUp("hi") > "HI"
public String EndUp(String s) { if (s.length() >= 3) { return s.substring(0, s.length()-3)+s.substring(s.length()-3).toUpperCase(); } else { return s.toUpperCase(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String endUp(String str) {\n if (str.length() <= 3) {\n return str.toUpperCase();\n } else {\n return str.substring(0, str.length()-3) + str.substring(str.length()-3).toUpperCase();\n }\n}", "public static String upperCase(String s) {\n\t\tString upper= \" \";\n\t\tfor (int i=0; i<s.length(); i++...
[ "0.8370766", "0.68378645", "0.6653839", "0.6268298", "0.6065006", "0.60618955", "0.602284", "0.60226345", "0.6002705", "0.5963199", "0.59436893", "0.58570886", "0.58510435", "0.5837474", "0.58345693", "0.58343", "0.5826225", "0.5816301", "0.58048946", "0.5802826", "0.5792636"...
0.77959365
1
This method calculate prime factor and add it to primeFactor list
public static HashSet<Integer> primeFactors(int number) { int n = number; HashSet<Integer> primeFactors = new HashSet<Integer>(); for (int i = 2; i <= n; i++) { while (n % i == 0) { primeFactors.add(i); n /= i; } } return primeFactors; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "ArrayList<BigInteger> factorize(BigInteger num) {\n ArrayList<BigInteger> result = calcPrimeFactors(num);\n return result;\n }", "public static ArrayList primeFactors(int num, int num2)\n { \n //if the number is prime add it to the arrayList\n if(isPrime(num))\n {\n primeFactorsList.add(...
[ "0.74858385", "0.70956045", "0.68990517", "0.6780022", "0.67373633", "0.67180544", "0.6632821", "0.6314862", "0.62339735", "0.61173683", "0.604235", "0.60352653", "0.60224575", "0.6016963", "0.5953784", "0.5946653", "0.59255487", "0.5880761", "0.5854824", "0.5847457", "0.5761...
0.5918194
17
/ This method creates a virtual memory. This method creates memory only once. If called again it simply return without recreating the memory. Thus keeps only one instance of memory and prevent from resetting.
public static void initializeMemory(){ if(memory == null){ memory = new TreeMap<String,String>(); for(int i=0;i<2048;i++){ memory.put(Utility.decimalToHex(i, 3), null); } memory_fmbv = new int[256]; for(int i:memory_fmbv){ memory_fmbv[i] = 0; } } if(diskJobStorage == null){ diskJobStorage = new TreeMap<String,DiskSMT>(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Memory getInstance(){\n if (mem == null) mem = new Memory(4000);\n return mem;\n }", "public PhysicalMemory()\n {\n frames = new TreeMap<Long, MemoryFrame>();\n for (int i = 0; i < Const.MEM_FRAMES; i++) {\n MemoryFrame frame = new MemoryFrame(i);\n ...
[ "0.61186975", "0.607317", "0.5992115", "0.59680456", "0.59212524", "0.5869528", "0.58410203", "0.5814559", "0.57950145", "0.5770562", "0.5745808", "0.5742713", "0.5691112", "0.5677797", "0.5671004", "0.5647958", "0.5626811", "0.551827", "0.545198", "0.5418253", "0.5407899", ...
0.57225126
12
/ This method finds and returns the available frame. If none is available it returns 1.
public static int getFreeFrame(){ int frameNo = -1; for(int i=0;i<memory_fmbv.length;i++){ if(memory_fmbv[i] == 0){ frameNo = i; memory_fmbv[i] = 1; break; } } return frameNo; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int pickVictim() {\r\n\t\t\r\n\t\tfor(int counter = 0; counter < numberOfFrame * 2; counter++) {\r\n\r\n\t\t\tif(frametab[current].getPageId().pid==INVALID_PAGEID)\r\n\t\t\t//if(frametab[current].getValid())\r\n\t\t\t{\r\n\t\t\t\tavailFrame = true;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif(frametab[current]....
[ "0.7095855", "0.6621429", "0.65628403", "0.65287405", "0.62915117", "0.6194907", "0.6193334", "0.6153423", "0.60996985", "0.60509145", "0.59884244", "0.597611", "0.5967719", "0.5903622", "0.58629036", "0.5824236", "0.57730234", "0.57295585", "0.57184607", "0.57103366", "0.569...
0.71278566
0
/ This method loads the instruction at the specified address.
public static void loadInstructionOntoDisk(String address,String instruction){ memory.put(address, instruction); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private SimInstruction getInstruction(Addr address) {\n var inst = decodedInstructions.get(address);\n\n if (inst != null) {\n return inst;\n }\n\n // Try to decode instruction\n var rawInstruction = program.get(address);\n\n // System.out.println(\"INSTRUC: \" ...
[ "0.69456464", "0.6909738", "0.65496755", "0.6166984", "0.60800546", "0.6063958", "0.5941318", "0.5904331", "0.5785976", "0.5735481", "0.5577904", "0.5568082", "0.5549568", "0.549329", "0.5478154", "0.546954", "0.54258555", "0.53791314", "0.53278303", "0.531537", "0.5305352", ...
0.69650614
0
/ This method creats a SMT and PMT for the DISK for a respective job. This is done to keep a track where in DISK we have loaded the job pages.
public static void setDiskPageToFrameMapping(String jobId,int segment,String pageAddress,String frameAddress){ if(diskJobStorage.get(jobId) == null){ DiskSMT smt = new DiskSMT(); smt.segment[segment] = new DiskPMT(); smt.segment[segment].pageFrameMap.put(pageAddress, frameAddress); diskJobStorage.put(jobId, smt); }else{ DiskSMT smt = diskJobStorage.get(jobId); DiskPMT pmt = null; if(smt.segment[segment] == null){ smt.segment[segment] = new DiskPMT(); pmt = smt.segment[segment]; }else{ pmt = smt.segment[segment]; } pmt.pageFrameMap.put(pageAddress, frameAddress); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\tanalyzerJobEClass = createEClass(ANALYZER_JOB);\n\t\tcreateEReference(analyzerJobEClass, ANALYZER_JOB__RFS_SERVICE);\n\n\t\tcomponentFailureEClass = createEClass(COMPONENT_FAILU...
[ "0.52302665", "0.51220393", "0.5006862", "0.4963934", "0.49413237", "0.4907734", "0.48869887", "0.48862758", "0.48781902", "0.48686516", "0.48306078", "0.4772982", "0.4735386", "0.47350302", "0.47155455", "0.4713072", "0.46978822", "0.4684291", "0.46818396", "0.4670889", "0.4...
0.0
-1
/ It method returns the PMT for a given job and its segment.
public static DiskPMT getDiskSegmentPMT(String jobId,int segment){ DiskSMT smt = diskJobStorage.get(jobId); return smt.segment[segment]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getJob_TM() {\r\n return job_TM;\r\n }", "@Digits(integer=9,fraction=0)\n\t@Override\n\tpublic String getJob() {\n\t\treturn super.getJob();\n\t}", "public static MultiProcessModel buildmpmFromPetri(Petrinet pet){\n\n MultiProcessModel model = new MultiProcessModel(pet.getId());\n ...
[ "0.51602477", "0.4934256", "0.48674467", "0.4860063", "0.4846785", "0.48385146", "0.4831337", "0.48120975", "0.47210598", "0.4718675", "0.469286", "0.46356812", "0.46297738", "0.46059048", "0.4571245", "0.45691422", "0.4529861", "0.45127925", "0.45114297", "0.449643", "0.4490...
0.7632446
0
/ This method reads information from disk at a given address.
public static String readDiskMemory(String address){ return memory.get(address); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String read(int address)\n {\n return MMU.read(VMA.get( address/RAM.getPageSize()) * RAM.getPageSize() + (address % RAM.getPageSize()));\n }", "protected byte direct_read(int address) {\n return segment_data[address];\n }", "private LogData readEntry(FileHandle fh, long address)\n...
[ "0.64744776", "0.6057818", "0.6048654", "0.60068375", "0.5884014", "0.58455235", "0.57489157", "0.57299334", "0.572653", "0.5684715", "0.56719506", "0.5540144", "0.55319345", "0.5531391", "0.54879427", "0.5417231", "0.5338911", "0.5301814", "0.5287191", "0.52631086", "0.52004...
0.6944777
0
TODO Autogenerated method stub
@Override public void attaquer() { System.out.println("Je suis " + this.nom + ", j'ai " + this.age + " ans et je cueille le gui !"); }
{ "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
/ access modifiers changed from: protected
public void a(@NonNull byte[] bArr) { this.a = bArr; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void prot() {\n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override...
[ "0.7375736", "0.7042321", "0.6922649", "0.6909494", "0.68470824", "0.6830288", "0.68062353", "0.6583185", "0.6539446", "0.65011257", "0.64917654", "0.64917654", "0.64733833", "0.6438831", "0.64330196", "0.64330196", "0.64295477", "0.6426414", "0.6420484", "0.64083177", "0.640...
0.0
-1
/ access modifiers changed from: protected
@NonNull public String a() { return "com.subao.gamemaster.script"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void prot() {\n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override...
[ "0.7375736", "0.7042321", "0.6922649", "0.6909494", "0.68470824", "0.6830288", "0.68062353", "0.6583185", "0.6539446", "0.65011257", "0.64917654", "0.64917654", "0.64733833", "0.6438831", "0.64330196", "0.64330196", "0.64295477", "0.6426414", "0.6420484", "0.64083177", "0.640...
0.0
-1
public static final Profile_Deprecated ATTACHMENT_PROFILE = Profile_Deprecated.getProfile("attachmentService.properties");
public static String getKey(String clientId) { return Config.get("key." + clientId, "", TAG_ATTACHMENT_SERVICE, getAppSet()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract Properties getProfileProperties();", "public String getServiceAccountPropertiesFile() {\r\n return serviceAccountPropertiesFileName;\r\n }", "@javax.annotation.Nullable\n @ApiModelProperty(value = \"In Prince 9.0 and up you can set the PDF profile.\")\n @JsonProperty(JSON_PROPERTY_PROFILE...
[ "0.61038846", "0.56859446", "0.550225", "0.5459414", "0.5454706", "0.54230183", "0.5392584", "0.5363515", "0.5359111", "0.534882", "0.5348092", "0.5293511", "0.5282995", "0.5276828", "0.52663547", "0.5259538", "0.52561045", "0.52550906", "0.5232889", "0.52129185", "0.5199105"...
0.0
-1
TODO create viewmodel for this to get a list of plants need to observe that from Onviewcreated get new instance of plantsadapter and set adapter of recycler view to that adapter. logic in quotes and imgur
@Override public View onCreateView( LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState ) { // Inflate the layout for this fragment return inflater.inflate(R.layout.fragment_plant_selection, container, false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setUpRecyclerView() {\n\n if (listOfPlants.size() == 0) {\n populatePlantList();\n }\n\n mRecyclerView.setHasFixedSize(true);\n mLayoutManager = new LinearLayoutManager(getContext());\n mAdapter = new RecyclerViewAdapter(listOfPlants, getActivi...
[ "0.6851383", "0.6384925", "0.620633", "0.6181007", "0.6133183", "0.6079418", "0.60571486", "0.60323656", "0.6001041", "0.5991778", "0.5941418", "0.5928797", "0.5924523", "0.5906634", "0.58998615", "0.58974457", "0.5880085", "0.587363", "0.58615035", "0.5807458", "0.5805258", ...
0.0
-1
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() { jScrollPane1 = new javax.swing.JScrollPane(); jTable1 = new javax.swing.JTable(); jFrame1 = new javax.swing.JFrame(); jScrollPane3 = new javax.swing.JScrollPane(); Tabla_Invenatrio1 = new javax.swing.JTable(); jCodigo = new javax.swing.JLabel(); TxtVerficaVentana = new javax.swing.JLabel(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); TxtNombreProducto = new javax.swing.JTextField(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); TxtMarcaProducto = new javax.swing.JTextField(); Txtcosto = new javax.swing.JTextField(); jLabel5 = new javax.swing.JLabel(); jsCantidad = new javax.swing.JSpinner(); jScrollPane2 = new javax.swing.JScrollPane(); TablaInventario = new javax.swing.JTable(); btnGuardar = new javax.swing.JButton(); btnEliminar = new javax.swing.JButton(); btnEditar = new javax.swing.JButton(); btnNuevo = new javax.swing.JButton(); jLabel6 = new javax.swing.JLabel(); TxtcodigoProducto = new javax.swing.JTextField(); txtBuscar = new javax.swing.JTextField(); BtnBuscar = new javax.swing.JButton(); BtnInventario = new javax.swing.JButton(); BtnSalir = new javax.swing.JButton(); jTable1.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(jTable1); Tabla_Invenatrio1.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" } )); jScrollPane3.setViewportView(Tabla_Invenatrio1); jCodigo.setText("jLabel7"); TxtVerficaVentana.setText("0"); javax.swing.GroupLayout jFrame1Layout = new javax.swing.GroupLayout(jFrame1.getContentPane()); jFrame1.getContentPane().setLayout(jFrame1Layout); jFrame1Layout.setHorizontalGroup( jFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jFrame1Layout.createSequentialGroup() .addContainerGap() .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 375, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(66, Short.MAX_VALUE)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jFrame1Layout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(TxtVerficaVentana) .addGap(71, 71, 71) .addComponent(jCodigo) .addGap(145, 145, 145)) ); jFrame1Layout.setVerticalGroup( jFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jFrame1Layout.createSequentialGroup() .addContainerGap() .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 275, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(jFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jFrame1Layout.createSequentialGroup() .addGap(18, 18, 18) .addComponent(jCodigo) .addContainerGap(22, Short.MAX_VALUE)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jFrame1Layout.createSequentialGroup() .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(TxtVerficaVentana) .addContainerGap()))) ); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); addWindowListener(new java.awt.event.WindowAdapter() { public void windowOpened(java.awt.event.WindowEvent evt) { formWindowOpened(evt); } }); jLabel1.setFont(new java.awt.Font("RomanT", 1, 36)); // NOI18N jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel1.setText("Lista de Inventario"); jLabel2.setFont(new java.awt.Font("Yu Gothic", 1, 14)); // NOI18N jLabel2.setText("Nombre del producto:"); TxtNombreProducto.setFont(new java.awt.Font("Yu Gothic", 1, 14)); // NOI18N TxtNombreProducto.setBorder(null); TxtNombreProducto.setCursor(new java.awt.Cursor(java.awt.Cursor.TEXT_CURSOR)); TxtNombreProducto.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { TxtNombreProductoActionPerformed(evt); } }); jLabel3.setFont(new java.awt.Font("Yu Gothic", 1, 14)); // NOI18N jLabel3.setText("Marca:"); jLabel4.setFont(new java.awt.Font("Yu Gothic", 1, 14)); // NOI18N jLabel4.setText("Costo:"); TxtMarcaProducto.setFont(new java.awt.Font("Yu Gothic", 1, 14)); // NOI18N TxtMarcaProducto.setBorder(null); TxtMarcaProducto.setCursor(new java.awt.Cursor(java.awt.Cursor.TEXT_CURSOR)); TxtMarcaProducto.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { TxtMarcaProductoActionPerformed(evt); } }); Txtcosto.setFont(new java.awt.Font("Yu Gothic", 1, 14)); // NOI18N Txtcosto.setBorder(null); Txtcosto.setCursor(new java.awt.Cursor(java.awt.Cursor.TEXT_CURSOR)); Txtcosto.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { TxtcostoActionPerformed(evt); } }); jLabel5.setFont(new java.awt.Font("Yu Gothic", 1, 14)); // NOI18N jLabel5.setText("Cantidad:"); TablaInventario.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" } )); TablaInventario.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { TablaInventarioMouseClicked(evt); } }); jScrollPane2.setViewportView(TablaInventario); btnGuardar.setText("Guardar"); btnGuardar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnGuardarActionPerformed(evt); } }); btnEliminar.setText("Eliminar"); btnEliminar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnEliminarActionPerformed(evt); } }); btnEditar.setText("Editar"); btnEditar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnEditarActionPerformed(evt); } }); btnNuevo.setText("Nuevo Registro"); btnNuevo.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnNuevoActionPerformed(evt); } }); jLabel6.setFont(new java.awt.Font("Yu Gothic", 1, 14)); // NOI18N jLabel6.setText("Codigo del Producto:"); TxtcodigoProducto.setFont(new java.awt.Font("Yu Gothic", 1, 14)); // NOI18N TxtcodigoProducto.setBorder(null); TxtcodigoProducto.setCursor(new java.awt.Cursor(java.awt.Cursor.TEXT_CURSOR)); TxtcodigoProducto.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { TxtcodigoProductoActionPerformed(evt); } }); txtBuscar.setFont(new java.awt.Font("Yu Gothic", 1, 14)); // NOI18N txtBuscar.setBorder(null); txtBuscar.setCursor(new java.awt.Cursor(java.awt.Cursor.TEXT_CURSOR)); txtBuscar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { txtBuscarActionPerformed(evt); } }); BtnBuscar.setText("Buscar"); BtnBuscar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { BtnBuscarActionPerformed(evt); } }); BtnInventario.setBackground(new java.awt.Color(0, 102, 204)); BtnInventario.setText("Ingresar A Servicio"); BtnInventario.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { BtnInventarioActionPerformed(evt); } }); BtnSalir.setBackground(new java.awt.Color(255, 0, 0)); BtnSalir.setText("Salir"); BtnSalir.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { BtnSalirActionPerformed(evt); } }); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollPane2) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(82, 82, 82) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jLabel4) .addComponent(jLabel5)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(Txtcosto, javax.swing.GroupLayout.PREFERRED_SIZE, 182, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jsCantidad, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(layout.createSequentialGroup() .addComponent(jLabel3) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(TxtMarcaProducto, javax.swing.GroupLayout.PREFERRED_SIZE, 182, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jLabel6) .addComponent(jLabel2)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(TxtNombreProducto, javax.swing.GroupLayout.PREFERRED_SIZE, 182, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(TxtcodigoProducto, javax.swing.GroupLayout.PREFERRED_SIZE, 182, javax.swing.GroupLayout.PREFERRED_SIZE))))) .addGap(0, 0, Short.MAX_VALUE)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addComponent(txtBuscar, javax.swing.GroupLayout.PREFERRED_SIZE, 132, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(BtnBuscar) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 10, Short.MAX_VALUE) .addComponent(btnNuevo) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(btnGuardar, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(btnEliminar, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(btnEditar, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addGap(0, 0, Short.MAX_VALUE) .addComponent(BtnInventario, javax.swing.GroupLayout.PREFERRED_SIZE, 134, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(BtnSalir))) .addContainerGap()) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addGap(0, 0, Short.MAX_VALUE) .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 503, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(68, 68, 68)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(25, 25, 25) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel6) .addComponent(TxtcodigoProducto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel2) .addComponent(TxtNombreProducto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel3) .addComponent(TxtMarcaProducto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel4) .addComponent(Txtcosto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel5) .addComponent(jsCantidad, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(19, 19, 19) .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(btnGuardar) .addComponent(btnEliminar) .addComponent(btnEditar) .addComponent(btnNuevo) .addComponent(txtBuscar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(BtnBuscar)) .addGap(10, 10, 10) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(BtnSalir, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(BtnInventario))) ); pack(); }
{ "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
String string = StreamUtils.copyToString(request.getInputStream(), StandardCharsets.UTF_8); Map mapObj = JSONObject.fromObject(string); System.out.println(mapObj); String id=(String)mapObj.get("id");
@RequestMapping("/getAboutUs") public List<AboutUs> getAboutUsList(HttpServletRequest request) throws IOException{ List<AboutUs> aboutUsList= aboutUsService.find(); return aboutUsList; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static JSONObject readJsonObject(HttpServletRequest request) {\n StringBuffer sb = new StringBuffer();\n String line = null;\n try {\n\t //get the body information from request which is a kind JSON file.\n BufferedReader reader = request.getReader(); \n while ((line = reader.readLine()) != nul...
[ "0.6393757", "0.6121286", "0.60960805", "0.6030225", "0.58011305", "0.57514834", "0.5718231", "0.56312215", "0.5589023", "0.555932", "0.5542777", "0.5540041", "0.5535857", "0.5515353", "0.54971266", "0.54633856", "0.545093", "0.54457307", "0.5427435", "0.54194206", "0.5394100...
0.0
-1
Round to 2 decimal places
@Override protected String exec(HashMap<String, String> params) { return Math.round(poller.getTps() * 100) / 100.0 + ""; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "double roundTwoDecimals(double d) { \n DecimalFormat twoDForm = new DecimalFormat(\"#.##\"); \n return Double.valueOf(twoDForm.format(d));\n }", "public String roundOffTo2DecPlaces(float val){\r\n\t\treturn String.format(\"%.2f\", val);\r\n\t}", "public static double round2(double x) {\n\t...
[ "0.74792814", "0.7320694", "0.703776", "0.6866365", "0.684381", "0.66237646", "0.6536911", "0.64929706", "0.6466503", "0.6377438", "0.6317437", "0.6287782", "0.62482953", "0.6031519", "0.6019661", "0.6003842", "0.59993494", "0.5959314", "0.5952096", "0.59431434", "0.5942312",...
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { }
{ "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
Initializes an instance of VisibilityWriteAsyncClient class.
@Generated VisibilityWriteAsyncClient(VisibilityWritesImpl serviceClient) { this.serviceClient = serviceClient; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public PublishingClientImpl() {\n this.httpClientSupplier = () -> HttpClients.createDefault();\n this.requestBuilder = new PublishingRequestBuilderImpl();\n }", "public AsyncEpoxyController() {\n this(true);\n }", "public static aVisibility setVisibility()\n {\n read_if_needed_();\n ...
[ "0.5360546", "0.5227594", "0.50759846", "0.5053884", "0.50506413", "0.49433634", "0.4839567", "0.4836383", "0.48013106", "0.47847295", "0.47252956", "0.46956056", "0.46849293", "0.46730357", "0.4667017", "0.4664896", "0.4662539", "0.4660631", "0.46353984", "0.46339414", "0.46...
0.69222504
0
TODO Autogenerated method stub
public static void main(String[] args) { LinkedHashMap<Integer, String> hm = new LinkedHashMap<Integer, String>(); // Inserting the Elements hm.put(3, "Geeks"); hm.put(2, "For"); hm.put(1, "Geeks"); for (Map.Entry<Integer, String> mapElement : hm.entrySet()) { Integer key = mapElement.getKey(); // Finding the value String value = mapElement.getValue(); // print the key : value pair System.out.println(key + " : " + value); } }
{ "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
jhipsterneedleentityaddfield JHipster will add fields here, do not remove
public String getId() { return id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void addField(\n JavaSymbolName propertyName,\n JavaType propertyType,\n String columnName,\n String columnType,\n JavaType className,\n boolean id,\n boolean oneToOne, boolean oneToMany, boolean manyToOne, boolean manyToMany, String mapp...
[ "0.62935424", "0.5985966", "0.59330326", "0.5805937", "0.5701243", "0.56256855", "0.56225914", "0.56027466", "0.5590212", "0.55272454", "0.5524442", "0.55027753", "0.5450715", "0.5450022", "0.544771", "0.54397124", "0.542143", "0.53969616", "0.5391886", "0.538626", "0.5379215...
0.0
-1
jhipsterneedleentityaddgetterssetters JHipster will add getters and setters here, do not remove
@Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof Sponsor)) { return false; } return id != null && id.equals(((Sponsor) o).id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface CommonEntityMethod extends ToJson,GetFieldValue,SetFieldValue{\n}", "static void setPropertiesFromGetters(TableEntity entity, ClientLogger logger) {\n Class<?> myClass = entity.getClass();\n\n // Do nothing if the entity is actually a `TableEntity` rather than a subclass\n i...
[ "0.63288254", "0.6107141", "0.5660178", "0.56505525", "0.5532638", "0.54641825", "0.54625857", "0.5449152", "0.54330444", "0.5414392", "0.53870034", "0.53786784", "0.53507614", "0.5342341", "0.53358173", "0.5329418", "0.5323906", "0.53226995", "0.5315846", "0.5303228", "0.529...
0.0
-1
Calls the parent constructor and populates this menu bar.
public EditImgMenuBar(EditImgPanel currentPanel) { super(); if (currentPanel == null) { throw new NullPointerException(); } this.currentPanel = currentPanel; this.constructMenuItems(); this.constructMenus(); this.add(this.fileMenu); this.add(this.editMenu); this.add(this.caseMenu); this.add(this.imageMenu); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public MainMenu() {\n super();\n }", "public ItemMenu() {\n super(null, null);\n }", "private void initMenu()\n {\n bar = new JMenuBar();\n fileMenu = new JMenu(\"File\");\n crawlerMenu = new JMenu(\"Crawler\"); \n aboutMenu = new JMenu(...
[ "0.7281054", "0.7194148", "0.7166596", "0.7135346", "0.7125871", "0.7086297", "0.7061249", "0.704418", "0.70215034", "0.69981456", "0.69777334", "0.6964306", "0.69594145", "0.69594145", "0.69594145", "0.69460934", "0.6928152", "0.69166887", "0.68817693", "0.68353796", "0.6834...
0.0
-1
Mandatory method required in all classes that implement ActionListener. Below is a list of possible source objects and their corresponding actions: An instance of JMenuItem Calls the matching method for the selected JMenuItem within EditImgPanel.
public void actionPerformed(ActionEvent e) { if (e.getSource() == this.saveImageMenuItem) { this.currentPanel.saveImg(); } else if (e.getSource() == this.quitMenuItem) { this.currentPanel.quit(); } else if (e.getSource() == this.undoMenuItem) { this.currentPanel.undo(); } else if (e.getSource() == this.redoMenuItem) { this.currentPanel.redo(); } else if (e.getSource() == this.removeImageMenuItem) { this.currentPanel.removeImg(); } else if (e.getSource() == this.antiAliasMenuItem) { this.currentPanel.antiAlias(); } else if (e.getSource() == this.brightenMenuItem) { this.currentPanel.brighten(); } else if (e.getSource() == this.darkenMenuItem) { this.currentPanel.darken(); } else if (e.getSource() == this.grayscaleMenuItem) { this.currentPanel.grayscale(); } else if (e.getSource() == this.resizeMenuItem) { this.currentPanel.resizeImg(); } else if (e.getSource() == this.cropMenuItem) { this.currentPanel.crop(); } else if (e.getSource() == this.rotate90MenuItem) { this.currentPanel.rotate90(); } else if (e.getSource() == this.rotate180MenuItem) { this.currentPanel.rotate180(); } else if (e.getSource() == this.rotate270MenuItem) { this.currentPanel.rotate270(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void actionPerformed(ActionEvent event)\n {\n Object source = event.getSource();\n\n if (source == fileNewItem)\n {\n //\n // File->New is clicked.\n //\n parent.onFileNew();\n }\n else if (source == fileOpenIte...
[ "0.6314949", "0.61994857", "0.6191957", "0.6180328", "0.60913205", "0.6026139", "0.60199", "0.60165524", "0.6013303", "0.598591", "0.5980827", "0.5974019", "0.5968653", "0.5967219", "0.5955413", "0.59321415", "0.5924689", "0.59241533", "0.59241533", "0.59241533", "0.5913396",...
0.63513315
0
Initializes all of the menu items.
private void constructMenuItems() { this.saveImageMenuItem = ComponentGenerator.generateMenuItem("Save Image", this, KeyStroke.getKeyStroke(KeyEvent.VK_S, ActionEvent.CTRL_MASK)); this.quitMenuItem = ComponentGenerator.generateMenuItem("Quit", this, KeyStroke.getKeyStroke(KeyEvent.VK_Q, ActionEvent.CTRL_MASK)); this.undoMenuItem = ComponentGenerator.generateMenuItem("Undo", this, KeyStroke.getKeyStroke(KeyEvent.VK_Z, ActionEvent.CTRL_MASK)); this.redoMenuItem = ComponentGenerator.generateMenuItem("Redo", this, KeyStroke.getKeyStroke(KeyEvent.VK_Y, ActionEvent.CTRL_MASK)); this.removeImageMenuItem = ComponentGenerator.generateMenuItem("Remove Image from Case", this); this.antiAliasMenuItem = ComponentGenerator.generateMenuItem("Apply Anti Aliasing", this); this.brightenMenuItem = ComponentGenerator.generateMenuItem("Brighten by 10%", this); this.darkenMenuItem = ComponentGenerator.generateMenuItem("Darken by 10%", this); this.grayscaleMenuItem = ComponentGenerator.generateMenuItem("Convert to Grayscale", this); this.resizeMenuItem = ComponentGenerator.generateMenuItem("Resize Image", this); this.cropMenuItem = ComponentGenerator.generateMenuItem("Crop Image", this); this.rotate90MenuItem = ComponentGenerator.generateMenuItem("Rotate Image 90\u00b0 Right", this); this.rotate180MenuItem = ComponentGenerator.generateMenuItem("Rotate Image 180\u00b0 Right", this); this.rotate270MenuItem = ComponentGenerator.generateMenuItem("Rotate Image 270\u00b0 Right", this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void initializeMenuItems() {\n\t\tuserMenuButton = new MenuButton();\n\t\tmenu1 = new MenuItem(bundle.getString(\"mVmenu1\")); //\n\t\tmenu2 = new MenuItem(bundle.getString(\"mVmenu2\")); //\n\t}", "protected void initialize() {\n\t\tthis.initializeFileMenu();\n\t\tthis.initializeEditMenu();\n\t\tthis.ini...
[ "0.85739374", "0.78273296", "0.78216445", "0.7693371", "0.762406", "0.75962013", "0.745647", "0.7274412", "0.72297376", "0.71779674", "0.7161971", "0.705997", "0.70530325", "0.7014435", "0.69702715", "0.6956118", "0.68884504", "0.687883", "0.6867195", "0.6860065", "0.685903",...
0.7137426
11
Initializes and populates all of the menus.
private void constructMenus() { this.fileMenu = new JMenu("File"); this.editMenu = new JMenu("Edit"); this.caseMenu = new JMenu("Case"); this.imageMenu = new JMenu("Image"); this.fileMenu.add(this.saveImageMenuItem); this.fileMenu.addSeparator(); this.fileMenu.add(this.quitMenuItem); this.editMenu.add(this.undoMenuItem); this.editMenu.add(this.redoMenuItem); this.caseMenu.add(this.removeImageMenuItem); this.imageMenu.add(this.antiAliasMenuItem); this.imageMenu.addSeparator(); this.imageMenu.add(this.brightenMenuItem); this.imageMenu.add(this.darkenMenuItem); this.imageMenu.addSeparator(); this.imageMenu.add(this.grayscaleMenuItem); this.imageMenu.addSeparator(); this.imageMenu.add(this.resizeMenuItem); this.imageMenu.addSeparator(); this.imageMenu.add(this.cropMenuItem); this.imageMenu.addSeparator(); this.imageMenu.add(this.rotate90MenuItem); this.imageMenu.add(this.rotate180MenuItem); this.imageMenu.add(this.rotate270MenuItem); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void initializeMenuItems() {\n\t\tuserMenuButton = new MenuButton();\n\t\tmenu1 = new MenuItem(bundle.getString(\"mVmenu1\")); //\n\t\tmenu2 = new MenuItem(bundle.getString(\"mVmenu2\")); //\n\t}", "public void initMenubar() {\n\t\tremoveAll();\n\n\t\t// \"File\"\n\t\tfileMenu = new FileMenuD(app);\n\t\ta...
[ "0.8138221", "0.78363174", "0.7834916", "0.7711388", "0.7485364", "0.7472693", "0.7449749", "0.74230415", "0.7392359", "0.7325791", "0.7207205", "0.7185223", "0.7172491", "0.71631974", "0.71433365", "0.71353805", "0.71341056", "0.71295714", "0.7104742", "0.70940316", "0.70744...
0.75974834
4
This function allows setting a value for _accessURL
public EndpointBuilder _accessURL_(URI _accessURL_) { this.endpointImpl.setAccessURL(_accessURL_); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void changeAccess(final BoxSharedLink.Access access){\n if (access == null){\n // Should not be possible to get here.\n Toast.makeText(this, \"No access chosen\", Toast.LENGTH_LONG).show();\n return;\n }\n executeRequest((BoxRequestItem)getCreatedShared...
[ "0.66286623", "0.6441533", "0.64264315", "0.630217", "0.62199795", "0.6219301", "0.6133383", "0.59863436", "0.595123", "0.58933455", "0.5884463", "0.5861637", "0.5839877", "0.57961214", "0.57782507", "0.5759143", "0.5741051", "0.57383615", "0.57196325", "0.57187855", "0.57169...
0.71797574
0
This function allows setting a value for _endpointInformation
public EndpointBuilder _endpointInformation_(List<TypedLiteral> _endpointInformation_) { this.endpointImpl.setEndpointInformation(_endpointInformation_); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setEndpointParameter(Endpoint endpoint, String name, Object value) throws RuntimeCamelException;", "void setEndpoint(String endpoint);", "void setValue(Endpoint endpoint, double value) {\n endpoint.setValue(this, value);\n }", "public void setEndpoint(org.hl7.fhir.Uri endpoint)\n {\n gener...
[ "0.7281066", "0.71175635", "0.67822236", "0.6724866", "0.65267426", "0.6392719", "0.63483787", "0.62973607", "0.6185901", "0.6145069", "0.6137685", "0.5994301", "0.5982792", "0.5868453", "0.586566", "0.5846061", "0.58426434", "0.57387185", "0.56763554", "0.5675186", "0.564706...
0.6505339
5
This function allows adding a value to the List _endpointInformation
public EndpointBuilder _endpointInformation_(TypedLiteral _endpointInformation_) { this.endpointImpl.getEndpointInformation().add(_endpointInformation_); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public EndpointBuilder _endpointInformation_(List<TypedLiteral> _endpointInformation_) {\n this.endpointImpl.setEndpointInformation(_endpointInformation_);\n return this;\n }", "public void addEndpoint(Endpoint endpoint)\r\n {\r\n getEndpoints().add(endpoint);\r\n }", "public void...
[ "0.69204414", "0.67598975", "0.6311411", "0.6049466", "0.5936242", "0.57633466", "0.5758384", "0.56846076", "0.56774634", "0.56406265", "0.55741006", "0.5567515", "0.5557735", "0.5549896", "0.55445987", "0.5540787", "0.5538044", "0.5536629", "0.5528527", "0.552433", "0.550707...
0.675165
2
This function allows setting a value for _endpointDocumentation
public EndpointBuilder _endpointDocumentation_(List<URI> _endpointDocumentation_) { this.endpointImpl.setEndpointDocumentation(_endpointDocumentation_); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public EndpointBuilder _endpointDocumentation_(URI _endpointDocumentation_) {\n this.endpointImpl.getEndpointDocumentation().add(_endpointDocumentation_);\n return this;\n }", "@JsonProperty(\"documentation\")\r\n public void setDocumentation(String documentation) {\r\n this.documentat...
[ "0.7324642", "0.64907044", "0.6276136", "0.6113396", "0.6007766", "0.5896722", "0.5896722", "0.5868769", "0.582876", "0.582876", "0.582876", "0.582876", "0.578025", "0.5737142", "0.57237226", "0.5703939", "0.57013375", "0.57000613", "0.5698313", "0.5698313", "0.56679964", "...
0.70693374
1
This function allows adding a value to the List _endpointDocumentation
public EndpointBuilder _endpointDocumentation_(URI _endpointDocumentation_) { this.endpointImpl.getEndpointDocumentation().add(_endpointDocumentation_); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public EndpointBuilder _endpointDocumentation_(List<URI> _endpointDocumentation_) {\n this.endpointImpl.setEndpointDocumentation(_endpointDocumentation_);\n return this;\n }", "public EndpointBuilder _endpointInformation_(List<TypedLiteral> _endpointInformation_) {\n this.endpointImpl.set...
[ "0.70976216", "0.60444945", "0.5906837", "0.58198166", "0.5782678", "0.57585335", "0.5728818", "0.569953", "0.564082", "0.55767673", "0.55767673", "0.55693513", "0.55546963", "0.5485321", "0.54537374", "0.5442659", "0.54422975", "0.5426731", "0.5418018", "0.5383319", "0.53427...
0.69035393
1
This function allows setting a value for _path
public EndpointBuilder _path_(String _path_) { this.endpointImpl.setPath(_path_); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setPath(String path)\r\n/* 21: */ {\r\n/* 22:53 */ this.path = path;\r\n/* 23: */ }", "void setPath(String path);", "public void setPath(String path);", "public void setPath(String path)\n {\n try\n {\n // Tokenize the path\n pathArray = getPathR...
[ "0.83878493", "0.8307544", "0.8126465", "0.8054161", "0.7838338", "0.7825419", "0.77167666", "0.7627799", "0.7610795", "0.76006687", "0.75983936", "0.75164056", "0.75164056", "0.75164056", "0.7434984", "0.7434984", "0.7434984", "0.7434984", "0.7434984", "0.7434984", "0.743498...
0.6437665
95
This function allows setting a value for _inboundPath
public EndpointBuilder _inboundPath_(String _inboundPath_) { this.endpointImpl.setInboundPath(_inboundPath_); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public EndpointBuilder _outboundPath_(String _outboundPath_) {\n this.endpointImpl.setOutboundPath(_outboundPath_);\n return this;\n }", "public void setPath(String path)\n {\n try\n {\n // Tokenize the path\n pathArray = getPathResolved(path);\n \n ...
[ "0.6277712", "0.6199549", "0.59116447", "0.5890593", "0.5812263", "0.5688201", "0.56564015", "0.56156784", "0.5591182", "0.5561078", "0.5492122", "0.54751235", "0.5428729", "0.5405906", "0.5382811", "0.53788245", "0.53602344", "0.535308", "0.5316385", "0.53123295", "0.5303272...
0.75332177
0
This function allows setting a value for _outboundPath
public EndpointBuilder _outboundPath_(String _outboundPath_) { this.endpointImpl.setOutboundPath(_outboundPath_); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public EndpointBuilder _inboundPath_(String _inboundPath_) {\n this.endpointImpl.setInboundPath(_inboundPath_);\n return this;\n }", "public EndpointBuilder _path_(String _path_) {\n this.endpointImpl.setPath(_path_);\n return this;\n }", "public void setPathway(PathwayHolder ...
[ "0.6308397", "0.5463267", "0.53408575", "0.52495366", "0.52474976", "0.52119595", "0.5208429", "0.519988", "0.5168603", "0.51315296", "0.50729203", "0.5060999", "0.50437653", "0.50156075", "0.5010975", "0.5004222", "0.50006753", "0.49917597", "0.4988649", "0.4986266", "0.4985...
0.7668552
0
This function takes the values that were set previously via the other functions of this class and turns them into a Java bean.
@Override public Endpoint build() throws ConstraintViolationException { VocabUtil.getInstance().validate(endpointImpl); return endpointImpl; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static BeanUtilsBean createBeanUtilsBean()\n {\n ConvertUtilsBean cub = new ConvertUtilsBean();\n \n // TODO: is there a smarter way to tell beanutils not to use defaults?\n \n final boolean[] booleanArray = new boolean[0];\n final byte[] byteArray = new byte[0];\n ...
[ "0.6718397", "0.621185", "0.59497106", "0.5940171", "0.5662962", "0.5641485", "0.56330365", "0.55110085", "0.5507106", "0.54395884", "0.53422755", "0.53110605", "0.5288738", "0.5256504", "0.52554125", "0.5230427", "0.5224385", "0.5214087", "0.51788247", "0.5177093", "0.517571...
0.0
-1
Use this factory method to create a new instance of this fragment using the provided parameters.
public static CalcFragment newInstance(String param1, String param2) { CalcFragment fragment = new CalcFragment(); Bundle args = new Bundle(); args.putString(ARG_PARAM1, param1); args.putString(ARG_PARAM2, param2); fragment.setArguments(args); return fragment; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static FragmentTousWanted newInstance() {\n FragmentTousWanted fragment = new FragmentTousWanted();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }", "protected abstract Fragment createFragment();", "public void createFragment() {\n\n ...
[ "0.7259329", "0.72331375", "0.71140355", "0.69909847", "0.69902235", "0.6834592", "0.683074", "0.68134046", "0.6801526", "0.6801054", "0.67653185", "0.6739714", "0.6739714", "0.6727412", "0.6717231", "0.6705855", "0.6692112", "0.6691661", "0.66869426", "0.66606814", "0.664618...
0.0
-1
TODO Autogenerated method stub
@Override public void onClick(View v) { float num1 = 0; float num2 = 0; float result = 0; // Проверяем поля на пустоту if (TextUtils.isEmpty(etNum1.getText().toString()) || TextUtils.isEmpty(etNum2.getText().toString())) { return; } // читаем EditText и заполняем переменные числами num1 = Float.parseFloat(etNum1.getText().toString()); num2 = Float.parseFloat(etNum2.getText().toString()); // определяем нажатую кнопку и выполняем соответствующую операцию // в oper пишем операцию, потом будем использовать в выводе switch (v.getId()) { case R.id.button: oper = "+"; result = num1 + num2; break; case R.id.button5: oper = "-"; result = num1 - num2; break; case R.id.button6: oper = "*"; result = num1 * num2; break; case R.id.button7: oper = "/"; result = num1 / num2; break; default: break; } // формируем строку вывода tvResult.setText(num1 + " " + oper + " " + num2 + " = " + result); }
{ "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.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0...
0.0
-1
ArrayList result = new ArrayList();
public ProductVaccine searchProduct(int id) { for(ProductVaccine p : productCatalog) { if(p.getVaccineNumber() == id) { return p; } } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "a(ArrayList arrayList) {\n super(1);\n this.$result = arrayList;\n }", "public ArrayList<Integer> getResults(){\n return results;\n }", "List<T> getResults();", "public static <T> ArrayList<T> createArrayList() {\n \t\treturn new ArrayList<T>();\n \t}", "ArrayList<E> ...
[ "0.7151776", "0.6924803", "0.67051005", "0.66038615", "0.65923303", "0.6585723", "0.65053254", "0.6500206", "0.6468077", "0.6462556", "0.64247566", "0.6397897", "0.63907987", "0.6376701", "0.62602425", "0.62524235", "0.619821", "0.6187014", "0.6165049", "0.6137948", "0.613557...
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { TreeNode first=new TreeNode(1); first.left=new TreeNode(2); first.right=new TreeNode(3); TreeNode second=new TreeNode(1); second.left=new TreeNode(2); second.right=new TreeNode(4); if(isSame(first, second)){ System.out.println("Same Tree!"); }else{ System.out.println("is Not Same Tree!"); } }
{ "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
Logs the sensor has been pluged.
public void onSensorPlug(String idSensor) // evento que se genera al conectar el lector de huella { objpantprincipal.writeLog("Lector "+idSensor+": Conectado."); try { //Start capturing from plugged sensor. GrFingerJava.startCapture(idSensor, this, this); } catch (GrFingerJavaException e) { //write error to log objpantprincipal.writeLog(e.getMessage()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void logSensorData () {\n\t}", "public void logLocation(View view) {\n writeGPSDataToDB(locationHandler.getLatitude(), locationHandler.getLongitude(), locationHandler.getAltitude());\n databaseHandler.setValueInExpInfo(((TextView) findViewById(R.id.accelerate_indicator_rec)).getText().toStri...
[ "0.761475", "0.65860397", "0.64131415", "0.6314399", "0.6273644", "0.62680256", "0.62680256", "0.617776", "0.60786", "0.6077653", "0.6063591", "0.60481113", "0.6034459", "0.6012781", "0.6012781", "0.6012781", "0.599707", "0.59783095", "0.59399474", "0.58258486", "0.5742226", ...
0.5389312
51
Logs the sensor has been unpluged.
public void onSensorUnplug(String idSensor) // evento que se genera al desconectar el lector de huella { objpantprincipal.writeLog("Lector "+idSensor+": Desconectado."); try { GrFingerJava.stopCapture(idSensor); } catch (GrFingerJavaException e) { Toolkit.getDefaultToolkit().beep(); objpantprincipal.writeLog(e.getMessage()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void off() {\n\t\tSystem.out.println(\"Tuner is off\");\n\t}", "public void logPlayerOut() {\n if (sessionInfo.isPlayerInParty())\n {\n leaveParty();\n }\n LogDispatcher.getInstance().onLogRequestReceived(new ConcreteSimpleLoggingRequest(LoggingRequest.Severity.INFO,...
[ "0.5973721", "0.59244245", "0.5922333", "0.59085584", "0.58767164", "0.5844725", "0.58335924", "0.5828292", "0.5823098", "0.58117044", "0.5773315", "0.5768254", "0.57665783", "0.57429105", "0.57120043", "0.57115424", "0.56977046", "0.5668771", "0.56679803", "0.5645388", "0.56...
0.64331424
0
Just signals that a finger event ocurred. ui.writeLog("Lector "+idSensor+": Dedo colocado.");
public void onFingerDown(String idSensor) // evento que se genera al colocar un dedo en el lector { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void onSensorUnplug(String idSensor) // evento que se genera al desconectar el lector de huella\n{\n objpantprincipal.writeLog(\"Lector \"+idSensor+\": Desconectado.\");\n try {\n GrFingerJava.stopCapture(idSensor);\n } catch (GrFingerJavaException e) {\n Toolkit.getDef...
[ "0.7415873", "0.6860824", "0.67012906", "0.6316904", "0.6127635", "0.6127635", "0.6126328", "0.6092748", "0.6021283", "0.5955583", "0.5939966", "0.58825815", "0.58434665", "0.578558", "0.5769247", "0.57658553", "0.57609683", "0.5711246", "0.5686228", "0.56822544", "0.5674783"...
0.720214
1
Just signals that a finger event ocurred. ui.writeLog("Lector "+idSensor+": Dedo removido.");
public void onFingerUp(String idSensor) // evento que se genera al levantar el dedo del lector { objpantprincipal.repintarp(); if (conectado == true) identificarPersona(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void onSensorUnplug(String idSensor) // evento que se genera al desconectar el lector de huella\n{\n objpantprincipal.writeLog(\"Lector \"+idSensor+\": Desconectado.\");\n try {\n GrFingerJava.stopCapture(idSensor);\n } catch (GrFingerJavaException e) {\n Toolkit.getDef...
[ "0.7652446", "0.6839219", "0.6063429", "0.59827", "0.59538954", "0.59315586", "0.58387583", "0.58346844", "0.578188", "0.5773102", "0.5773102", "0.5669271", "0.5659939", "0.5584921", "0.5573155", "0.55688924", "0.5560389", "0.5558104", "0.5498824", "0.54982126", "0.54697275",...
0.65689343
2
Inicializa el Fingerprint SDK y habilita la captura de huellas.
public void inicializarCaptura() { try { fingerprintSDK = new MatchingContext(); //Inicializa la captura de huella digital. GrFingerJava.initializeCapture(this); objpantprincipal.writeLog("**SDK de huella dactilar inicializado con éxito**"); } catch (Exception e) { //Si ocurre un error se cierra la aplicación. //If any error ocurred while initializing GrFinger, //writes the error to log Toolkit.getDefaultToolkit().beep(); objpantprincipal.writeLog(e.getMessage()); //System.exit(1); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initVuforia() {\n VuforiaLocalizer.Parameters parameters = new VuforiaLocalizer.Parameters();\n\n parameters.vuforiaLicenseKey = VUFORIA_KEY;\n //initialize either phone or webcam depending on field set during object initialization\n if(device == Device.Phone){\n ...
[ "0.60765094", "0.5920506", "0.5901687", "0.58089215", "0.58018684", "0.5782551", "0.578133", "0.5757004", "0.57486904", "0.5730362", "0.5705325", "0.56928307", "0.5624603", "0.55873024", "0.55538917", "0.55233157", "0.55163157", "0.5504919", "0.55036193", "0.54994375", "0.549...
0.8047442
0
Extrae la plantilla de la imagen de la huella actual.
public void extract() { try { //Extrae la plantilla de la imagen. template = fingerprintSDK.extract(fingerprint); //Notifies it has been extracted and the quality of the extraction //write template quality to log switch (template.getQuality()){ case Template.HIGH_QUALITY: objpantprincipal.pintaraltacalidad(); break; case Template.MEDIUM_QUALITY: objpantprincipal.pintarmedianacalidad(); break; case Template.LOW_QUALITY: objpantprincipal.pintarbajacalidad(); break; } //Muestra la plantilla en la imagen objpantprincipal.showImage(GrFingerJava.getBiometricImage(template,fingerprint)); objpantprincipal.writeLog("Minucias extraidas con éxito"); } catch (GrFingerJavaException e) { //write error to log Toolkit.getDefaultToolkit().beep(); objpantprincipal.writeLog("Error, no se pudieron extraer las minucias, vuelva a intentarlo"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void rellenaImagen()\n {\n rellenaDatos(\"1\",\"Samsung\", \"cv3\", \"blanco\" , \"50\", 1200,2);\n rellenaDatos(\"2\",\"Samsung\", \"cv5\", \"negro\" , \"30\", 600,5);\n }", "public void cambiarImagenGrande(ImagenTemp it) {\n\t\t\n\t\t//TODO automatizar haciendo que el método directam...
[ "0.6822446", "0.66445786", "0.66422737", "0.6640422", "0.6563119", "0.64735866", "0.63768244", "0.63672775", "0.63382494", "0.6334344", "0.63292354", "0.6277205", "0.6249639", "0.6209951", "0.6192585", "0.6185522", "0.61182696", "0.6113293", "0.6106773", "0.60977924", "0.6081...
0.0
-1
verifica la huella digital actual contra otra en la base de datos
public void identificarPersona() { try { //Obtiene todas las huellas de la bd ResultSet rsIdentificar = identificarhue.executeQuery(); //Si se encuentra la huella en la base de datos while(rsIdentificar.next()){ //Lee la plantilla de la base de datos byte templateBuffer[] = rsIdentificar.getBytes("huellap"); //Crea una nueva plantilla Template referenceTemplate = new Template(templateBuffer); //compara las plantilas (actual vs bd) boolean coinciden = fingerprintSDK.verify(template,referenceTemplate); //Si encuentra coincidencia entonces envia true y si no entonces envia false if (coinciden){ objpantprincipal.coincidehuella(true); return; } else{ objpantprincipal.coincidehuella(false); } } } catch (SQLException e) { initDB(); identificarPersona(); } catch (GrFingerJavaException e) { Toolkit.getDefaultToolkit().beep(); JOptionPane.showMessageDialog(null, e.getMessage()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean diaHabilDomingoPlacaA(int diaActual){\n\t\treturn diaActual == DOMINGO;\n\t}", "public boolean darPerdio(){\r\n\t\treturn perdio;\r\n\t}", "public boolean tieneRepresentacionGrafica();", "private void verificarDatos(int fila) {\n try {\n colValidada = -1;\n\n floa...
[ "0.5608034", "0.55777997", "0.5530218", "0.54772556", "0.54365546", "0.5433465", "0.5391714", "0.5382704", "0.5377909", "0.5366934", "0.53542286", "0.534736", "0.53272027", "0.5285725", "0.52851737", "0.5253053", "0.5242913", "0.52356803", "0.5225998", "0.52154094", "0.519806...
0.5523724
3
Stops fingerprint capture and closes the database connection.
public void destroy() { destroyFingerprintSDK(); //destroyDB(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void closeDatabase() {\n if (instance != null) {\n instance.kill();\n instance = null;\n }\n }", "private static void disconnectDatabase(){\n\t\ttry{\n\t\t\tif (connection != null) connection.close();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();...
[ "0.6461363", "0.6337675", "0.63307893", "0.6162298", "0.606058", "0.60375893", "0.60285383", "0.60255575", "0.6001271", "0.5995057", "0.59893864", "0.5977477", "0.5967586", "0.5892194", "0.58773094", "0.5869512", "0.58682835", "0.5862177", "0.58597547", "0.5832703", "0.582674...
0.60088205
8
Constructor with no logging
public SimpleKafkaSpecExecutorInstance(Config config) { this(config, Optional.<Logger>absent()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Log()\n {\n //Hides implicit constructor.\n }", "private Log() {\r\n\t}", "public MyLogger () {}", "private LogUtil() {\r\n /* no-op */\r\n }", "private Log() {\n }", "private Logger(){ }", "private ExtentLogger() {}", "public Log() { //Null constructor is adequate as all ...
[ "0.8019534", "0.7876762", "0.78591526", "0.77916557", "0.774889", "0.7603243", "0.7473508", "0.7457791", "0.7455316", "0.7446388", "0.7437398", "0.74013597", "0.73540634", "0.7352186", "0.7337183", "0.7320443", "0.7299727", "0.7263939", "0.7255007", "0.72439396", "0.7238985",...
0.0
-1
Spec Executor Instance basic definition.
@Override public URI getUri() { return _specExecutorInstanceUri; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Executor getExecutor() {\n return executor;\n }", "public ExecutionFactoryImpl() {\n\t\tsuper();\n\t}", "public SimpleKafkaSpecExecutorInstance(Config config) {\n this(config, Optional.<Logger>absent());\n }", "public SequentialExecutor(Executor executor)\r\n {\r\n myExecutor =...
[ "0.6200681", "0.6122286", "0.60953754", "0.60546845", "0.6045053", "0.5988414", "0.59435743", "0.59324473", "0.5874883", "0.58727324", "0.5872428", "0.58517796", "0.5851079", "0.5835572", "0.5756978", "0.5748787", "0.5726356", "0.5709337", "0.5701505", "0.5683601", "0.5658356...
0.560582
25
Spec Executor Instance Producer capabilities.
@Override public Future<?> addSpec(Spec addedSpec) { SpecExecutorInstanceDataPacket sidp = new SpecExecutorInstanceDataPacket(Verb.ADD, addedSpec.getUri(), addedSpec); return _kafka08Producer.write(gson.toJson(sidp), WriteCallback.EMPTY); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setProducer(Producer producer){\n this.producer = producer;\n }", "@ApplicationScoped\n @Produces\n public ProducerActions<MessageKey, MessageValue> createKafkaProducer() {\n Properties props = (Properties) producerProperties.clone();\n\n // Configure kafka settings\n ...
[ "0.5634188", "0.55858153", "0.54507303", "0.5334803", "0.5209366", "0.5200137", "0.51997644", "0.5192769", "0.5191808", "0.51502424", "0.5149477", "0.5099094", "0.5087116", "0.50744253", "0.50619537", "0.506146", "0.50563586", "0.5000392", "0.49860403", "0.49759632", "0.49647...
0.5209867
4
Spec Executor Instance Consumer capabilities.
@Override public Future<? extends Map<Verb, Spec>> changedSpecs() { Map<Verb, Spec> verbSpecMap = Maps.newHashMap(); initializeWatermarks(); this.currentPartitionIdx = -1; while (!allPartitionsFinished()) { if (currentPartitionFinished()) { moveToNextPartition(); continue; } if (this.messageIterator == null || !this.messageIterator.hasNext()) { try { this.messageIterator = fetchNextMessageBuffer(); } catch (Exception e) { if (_log.isPresent()) { _log.get().error(String.format("Failed to fetch next message buffer for partition %s. Will skip this partition.", getCurrentPartition()), e); } moveToNextPartition(); continue; } if (this.messageIterator == null || !this.messageIterator.hasNext()) { moveToNextPartition(); continue; } } while (!currentPartitionFinished()) { if (!this.messageIterator.hasNext()) { break; } KafkaConsumerRecord nextValidMessage = this.messageIterator.next(); // Even though we ask Kafka to give us a message buffer starting from offset x, it may // return a buffer that starts from offset smaller than x, so we need to skip messages // until we get to x. if (nextValidMessage.getOffset() < _nextWatermark.get(this.currentPartitionIdx)) { continue; } _nextWatermark.set(this.currentPartitionIdx, nextValidMessage.getNextOffset()); try { SpecExecutorInstanceDataPacket record = null; if (nextValidMessage instanceof ByteArrayBasedKafkaRecord) { record = decodeRecord((ByteArrayBasedKafkaRecord)nextValidMessage); } else if (nextValidMessage instanceof DecodeableKafkaRecord){ record = ((DecodeableKafkaRecord<?, SpecExecutorInstanceDataPacket>) nextValidMessage).getValue(); } else { throw new IllegalStateException( "Unsupported KafkaConsumerRecord type. The returned record can either be ByteArrayBasedKafkaRecord" + " or DecodeableKafkaRecord"); } verbSpecMap.put(record._verb, record._spec); } catch (Throwable t) { throw new RuntimeException(t); } } } return new CompletedFuture(verbSpecMap, null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Consumer getConsumer();", "public interface Consumer {\n\n @Nonnull\n String getApiKey();\n\n void setApiKey(@Nonnull String apiKey);\n\n @Nonnull\n String getLoginId();\n\n void setLoginId(@Nonnull String loginId);\n\n @Nonnull\n String getSiteKey();\n\n void setSiteKey(@Nonnull Strin...
[ "0.55879235", "0.52943724", "0.5288094", "0.5165319", "0.5142866", "0.511629", "0.5115374", "0.510809", "0.509092", "0.50630397", "0.49863377", "0.49446693", "0.4930785", "0.492072", "0.4913381", "0.4909768", "0.48908895", "0.48887327", "0.48740944", "0.4870735", "0.48692992"...
0.0
-1
Clean up database after test is done or use a persistence unit with dropandcreate to start up clean on every test
@AfterAll public static void tearDownClass() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@After\n public void clearup() {\n try {\n pm.close();\n DriverManager.getConnection(\"jdbc:derby:memory:test_db;drop=true\");\n } catch (SQLException se) {\n if (!se.getSQLState().equals(\"08006\")) {\n // SQLState 08006 indicates a success\n se.printStackTrace();\n }\n ...
[ "0.8312322", "0.8165006", "0.79895437", "0.7893331", "0.78494805", "0.78494805", "0.7769408", "0.7739901", "0.7729149", "0.7700986", "0.7624213", "0.7606276", "0.75926137", "0.7557551", "0.7546347", "0.7512263", "0.74067664", "0.739751", "0.73555946", "0.7351315", "0.73456097...
0.0
-1
Construtor da classe ItemPedido. (NEW)
public ItemPedido (Item item, Estado estado) { this.item = item; this.estado = estado; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public OrderItem() {}", "public Item()\n {\n super();\n }", "Items(int quantidade,Produto produto){\n\t\tqntd = quantidade;\n\t\tthis.produto = produto;\n\t\t\n\t}", "private Item(){}", "public Item(){}", "public void inicializarItemInvoice() {\r\n\t\ttry {\r\n\t\t\teditarItem = false;\r\n\t...
[ "0.6603382", "0.6527474", "0.64984655", "0.6456371", "0.6447867", "0.642977", "0.6412373", "0.63627404", "0.6323998", "0.6323998", "0.6316894", "0.63133806", "0.63133806", "0.6301217", "0.6300675", "0.62788707", "0.6237415", "0.62325656", "0.61842704", "0.61734295", "0.616848...
0.76039803
0
Retorna um objeto do tipo Item.
public Item getItem () { return item; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Item getItem() { \n return myItem;\n }", "@Override\n\tpublic AbstractItem getObject() {\n\t\tif(item == null) {\n\t\t\titem = new HiTechItem();\n\t\t}\n\t\treturn item;\n\t}", "public Item getItem() {\n return item;\n }", "public Item getItem() {\n Item item = new Item(...
[ "0.75412107", "0.74868065", "0.7350959", "0.73412836", "0.73364973", "0.7272481", "0.7244298", "0.7230986", "0.72243476", "0.72176206", "0.7207487", "0.71949047", "0.7101286", "0.7101286", "0.70987177", "0.70987177", "0.7076923", "0.70749533", "0.7021741", "0.69829065", "0.69...
0.74546987
2
Retorna o estado de um item.
public Estado getEstado () { return estado; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Boolean hasItems() {\n return this.hasItems;\n }", "@Override\n public com.gensym.util.Symbol getItemStatus() throws G2AccessException {\n java.lang.Object retnValue = getAttributeValue (SystemAttributeSymbols.ITEM_STATUS_);\n return (com.gensym.util.Symbol)retnValue;\n }", "public boo...
[ "0.6407981", "0.63872117", "0.63237983", "0.6300058", "0.6248283", "0.6221403", "0.61927426", "0.61668175", "0.61668175", "0.61668175", "0.6098907", "0.59642476", "0.59441465", "0.5883378", "0.58670604", "0.58472663", "0.5830883", "0.5826708", "0.57189596", "0.56930685", "0.5...
0.53151816
95
Modifica um objeto item.
public void setItem (Item item) { this.item = item; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void modifyItem(Object toUpdated) {}", "public void setEditedItem(Object item) {editedItem = item;}", "public void setItem(Item item) {\n this.item = item;\n }", "Item update(Item item);", "void updateItem(IDAOSession session, Item item);", "public void setItem (Obje...
[ "0.70748645", "0.7033465", "0.70124316", "0.69722885", "0.69468486", "0.68529207", "0.6821182", "0.6794375", "0.6794375", "0.668231", "0.6658386", "0.66521937", "0.66370684", "0.66030824", "0.65917253", "0.6569037", "0.6569037", "0.6558645", "0.65423924", "0.65203315", "0.651...
0.691203
5
/ Action that can be Performed on the Elements Headers
private void clickSignOn() { this.clickElement(signon); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public ElementHeader getElementHeader()\n {\n return elementHeader;\n }", "@Override\n public void setElementHeader(ElementHeader elementHeader)\n {\n this.elementHeader = elementHeader;\n }", "public void setElementHeader(ElementHeader elementHeader)\n {\n ...
[ "0.6673288", "0.6128329", "0.6116403", "0.60650134", "0.60635644", "0.59291184", "0.591392", "0.5878887", "0.58578384", "0.57766265", "0.5734897", "0.5732287", "0.57090664", "0.5653267", "0.56315225", "0.563116", "0.5626387", "0.5610936", "0.56042624", "0.55996776", "0.558197...
0.0
-1
/ Functions that can be used in TestClass Headers
public MenuSignOnPageClass navigateToSignOn() { this.clickSignOn(); return new MenuSignOnPageClass(myDriver, myWait); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private test5() {\r\n\t\r\n\t}", "static void testCaculator(){\n }", "public static void dummyTest(){}", "public static void dummyTest(){}", "private HeaderBrandingTest()\n\t{\n\t\tBaseTest.classLogger = LoggerFactory.getLogger( HeaderBrandingTest.class );\n\t}", "private ProtomakEngineTestHelper() {\...
[ "0.6567214", "0.652562", "0.64943856", "0.64943856", "0.63416874", "0.6298567", "0.6277957", "0.6258364", "0.62389386", "0.6232925", "0.6214075", "0.61701643", "0.6168698", "0.6168698", "0.6135422", "0.6130488", "0.6127414", "0.61191607", "0.610821", "0.6099596", "0.6069611",...
0.0
-1
write your code in Java SE 8
public int solution(int X, int Y, int D) { int step = 0; int dis = Y - X; step = dis / D; if(dis % D != 0) step += 1; return step; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n\t\tnew Action() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void execute(String content) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tSystem.out.println(content);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}.execute(\"jdk1.8之前匿名内部类实现方式\");\r\n\t\t\r\n\t\t\r\n\t\t//lambda\r\n\...
[ "0.5890391", "0.58054996", "0.57008785", "0.56167847", "0.54946315", "0.54761344", "0.524263", "0.52340496", "0.5233149", "0.52029705", "0.5160466", "0.51574665", "0.5143396", "0.5094738", "0.5084682", "0.5069909", "0.50661004", "0.50645214", "0.5064437", "0.50475377", "0.504...
0.0
-1
Creates a new ObjectNameAwareListenerImpl
public ObjectNameAwareListenerImpl(NotificationListener listener, ObjectName objectName) { this.listener = listener; this.objectName = objectName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private DefaultListener() {\n }", "public MyListener() {\r\n }", "public interface RemoteContextListenerInterface extends Remote\n{\n /**\n * Called when an object has been added.\n * <p>\n * The binding of the newly added object can be obtained using <tt>evt.getNewBinding()</tt>.\n * ...
[ "0.586542", "0.5581704", "0.5458969", "0.54186964", "0.5375831", "0.5364621", "0.5328557", "0.53171813", "0.5308939", "0.5299318", "0.52751666", "0.5269362", "0.5255779", "0.52485347", "0.5237918", "0.5189553", "0.5181246", "0.5149607", "0.5108354", "0.5086792", "0.5086792", ...
0.7076742
0
Metodo hacer una suma de dos numero enteros
public static int suma (int x, int y){ int s=x+y; return s; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int p_sum(){\n Scanner keyboard = new Scanner(System.in);\n System.out.println(\"please put the how many numbers you want to sum:\");\n int v_sum_numbers = keyboard.nextInt();\n int v_total_sum= 0;\n for (int i=1; i<=v_sum_numbers;i=i+1){\n System.out.pri...
[ "0.70729786", "0.69818234", "0.6938835", "0.68934673", "0.6788262", "0.6739194", "0.67274636", "0.6714858", "0.6683385", "0.6665114", "0.6662163", "0.65865874", "0.65800965", "0.65117866", "0.6507254", "0.64625424", "0.6439769", "0.64394325", "0.640677", "0.6351774", "0.63464...
0.0
-1
Metodo numero de divisores de un numero entero
public static int contarDivisores(int n){ int contDivisores=0; for(int i=1;i<=n;i++){ if(n%i==0){contDivisores++;} } return contDivisores; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count...
[ "0.71314067", "0.71314067", "0.71314067", "0.71314067", "0.71314067", "0.71314067", "0.71314067", "0.71314067", "0.71314067", "0.71314067", "0.71314067", "0.71314067", "0.71314067", "0.71314067", "0.71314067", "0.71314067", "0.71314067", "0.71314067", "0.71314067", "0.71314067"...
0.6450423
82
Metodo saber divisores de un numero entero
public static void divisores(int n){ for(int i=1;i<=n;i++){ if(n%i==0){System.out.println(i+" es divisor");} } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count...
[ "0.706251", "0.706251", "0.706251", "0.706251", "0.706251", "0.706251", "0.706251", "0.706251", "0.706251", "0.706251", "0.706251", "0.706251", "0.706251", "0.706251", "0.706251", "0.706251", "0.706251", "0.706251", "0.706251", "0.706251", "0.706251", "0.706251", "0.70625...
0.6910736
76
Metodo saber suma divisores de un numero entero
public static int sumaDivisores(int n){ int suma=0; for (int i=1;i<=n;i++){ if (n%i==0){suma+=i;} } return suma; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public int divisor_sum(int n) {\n int x;\n int sum = 0;\n for (int i = 1; i <= n; i++) {\n if(n%i == 0){\n x = i;\n sum += x;\n }\n }\n return sum;\n }", "public int Div(int num){\n\tint count01 ;\n\tint coun...
[ "0.70522463", "0.6785682", "0.6785682", "0.6785682", "0.6785682", "0.6785682", "0.6785682", "0.6785682", "0.6785682", "0.6785682", "0.6785682", "0.6785682", "0.6785682", "0.6785682", "0.6785682", "0.6785682", "0.6785682", "0.6785682", "0.6785682", "0.6785682", "0.6785682", ...
0.7400858
0
Metodo calcular factorial de un numero entero
public static long factorial(int n){ long fact=1; for(int i=1;i<=n;i++){ fact=(fact*i); } return fact; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public long factorial(int num){\r\n long f=1;\r\n for(int i=1;i<=num;i++)\r\n f=f*i;\r\n \r\n if(num>=1) return f;\r\n else if(num==0)return 1;\r\n \r\n return 1;\r\n }", "public int factorial(int num) \n {\n number = num;\n f=1;\n ...
[ "0.77580136", "0.765038", "0.7366332", "0.73651093", "0.7308661", "0.7257557", "0.7250758", "0.7226149", "0.7209763", "0.71589804", "0.7141078", "0.71342534", "0.7126259", "0.70875186", "0.70874953", "0.70726913", "0.7047635", "0.70452297", "0.7022777", "0.7003616", "0.699686...
0.7077585
15
0 1 1 2 3 5 8 13 21
public static void main(String[] args) { int sum = 0; int i1= 0; int i2 = 1; for(int i = 0; i<=10; i++) { sum = i1 + i2; i1= i2; i2 =sum; System.out.print(sum+" "); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int fillCount();", "public static void main(String[] args) {\n\t\t\r\n\t\tint i, x=4,w=9,q;\r\n\t\tfor(i=-1;i<20;i+=3) {\r\n\t\t\tx++;\r\n\t\t\tfor(q=4;q<11;q++) {\r\n\t\t\t\tdo {\r\n\t\t\t\t\ti=+3;\r\n\t\t\t\t\tw=sizeof(i);\r\n\t\t\t\t\ti=x+w;\r\n\t\t\t\t\tx=w+i;\r\n\t\t\t\t\t\t\r\n\t\t\t\t} while (x<15);\r\n\t...
[ "0.58627266", "0.5793889", "0.57194823", "0.56568456", "0.55194885", "0.5476727", "0.5463152", "0.5424943", "0.5414718", "0.53673714", "0.5353528", "0.53515404", "0.5342349", "0.5331328", "0.5319755", "0.5319755", "0.5313431", "0.52991205", "0.52788454", "0.5271375", "0.52702...
0.0
-1
Get the random ID
public static String getUUID() { return UUID.randomUUID().toString().toUpperCase().replace("-", "").substring(0, 5); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int IdRandom() {\n\t\tRandom random = new Random();\n\t\tint id = random.nextInt(899999) + 100000;\n\t\treturn id;\n\t}", "public static final String getRandomId() {\r\n return (\"\" + Math.random()).substring(2);\r\n }", "public static int genID(){\n Random rand = new Random();\n\n ...
[ "0.83546376", "0.8300053", "0.80751884", "0.80077153", "0.8002431", "0.79968995", "0.7888428", "0.7857935", "0.781951", "0.76879424", "0.7647723", "0.761233", "0.74756545", "0.7424331", "0.7415123", "0.73898983", "0.7355781", "0.7350183", "0.73402125", "0.7326829", "0.7309937...
0.6674653
93
subclasses may override subclasses may override
public void completeHasRestartTaskRule_Value(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { // subclasses may override }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void prot() {\n }", "@Override\n protected void checkSubclass() {\n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tpublic void comer() {\n\t\...
[ "0.71202815", "0.69011277", "0.6844959", "0.6820635", "0.6796313", "0.6722267", "0.66956747", "0.66956747", "0.66956747", "0.66881394", "0.66881394", "0.66881394", "0.66881394", "0.66881394", "0.66881394", "0.66881394", "0.66881394", "0.66881394", "0.66881394", "0.66881394", ...
0.0
-1
subclasses may override subclasses may override
public void completeTrustedRule_Value(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { // subclasses may override }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void prot() {\n }", "@Override\n protected void checkSubclass() {\n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tpublic void comer() {\n\t\...
[ "0.7120322", "0.69013816", "0.6845035", "0.6820942", "0.6796199", "0.6722498", "0.6695857", "0.6695857", "0.6695857", "0.66881627", "0.66881627", "0.66881627", "0.66881627", "0.66881627", "0.66881627", "0.66881627", "0.66881627", "0.66881627", "0.66881627", "0.66881627", "0.6...
0.0
-1
subclasses may override subclasses may override
public void completeTimingProtectionRule_Value(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { // subclasses may override }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void prot() {\n }", "@Override\n protected void checkSubclass() {\n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tpublic void comer() {\n\t\...
[ "0.71202815", "0.69011277", "0.6844959", "0.6820635", "0.6796313", "0.6722267", "0.66956747", "0.66956747", "0.66956747", "0.66881394", "0.66881394", "0.66881394", "0.66881394", "0.66881394", "0.66881394", "0.66881394", "0.66881394", "0.66881394", "0.66881394", "0.66881394", ...
0.0
-1
subclasses may override subclasses may override
public void completeMemoryProtectionRule_Value(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { // subclasses may override }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void prot() {\n }", "@Override\n protected void checkSubclass() {\n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tpublic void comer() {\n\t\...
[ "0.71202815", "0.69011277", "0.6844959", "0.6820635", "0.6796313", "0.6722267", "0.66956747", "0.66956747", "0.66956747", "0.66881394", "0.66881394", "0.66881394", "0.66881394", "0.66881394", "0.66881394", "0.66881394", "0.66881394", "0.66881394", "0.66881394", "0.66881394", ...
0.0
-1
subclasses may override subclasses may override
public void completeIpduPropertyRule_Value(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { // subclasses may override }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void prot() {\n }", "@Override\n protected void checkSubclass() {\n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tpublic void comer() {\n\t\...
[ "0.71202815", "0.69011277", "0.6844959", "0.6820635", "0.6796313", "0.6722267", "0.66956747", "0.66956747", "0.66956747", "0.66881394", "0.66881394", "0.66881394", "0.66881394", "0.66881394", "0.66881394", "0.66881394", "0.66881394", "0.66881394", "0.66881394", "0.66881394", ...
0.0
-1
subclasses may override subclasses may override subclasses may override
public void completeTransmissionModeRule_Value(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { // subclasses may override // subclasses may override }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void prot() {\n }", "@Override\n protected void checkSubclass() {\n }", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void dosomething() ...
[ "0.7095306", "0.6880825", "0.68770015", "0.68425095", "0.68219936", "0.6779929", "0.6767584", "0.67147857", "0.66815436", "0.66815436", "0.66815436", "0.66815436", "0.66815436", "0.66815436", "0.66815436", "0.66815436", "0.66815436", "0.66815436", "0.66815436", "0.66815436", ...
0.0
-1
subclasses may override subclasses may override subclasses may override
public void completeNetworkMsgPropertyRule_Value(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { // subclasses may override // subclasses may override }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void prot() {\n }", "@Override\n protected void checkSubclass() {\n }", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void dosomething() ...
[ "0.70949244", "0.68813294", "0.687678", "0.6842395", "0.68222713", "0.6779831", "0.6767884", "0.67147446", "0.66821367", "0.66821367", "0.66821367", "0.66821367", "0.66821367", "0.66821367", "0.66821367", "0.66821367", "0.66821367", "0.66821367", "0.66821367", "0.66821367", "...
0.0
-1
TODO Autogenerated method stub
public void save(User user) { userDetails.setUserName(user.getUserName()); userDetails.setPassword(user.getPassword()); userDetails.setFname(user.getFname()); userDetails.setLname(user.getLname()); userDetails.setAge(user.getAge()); userDetailsRepositroy.save(userDetails); }
{ "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
RestTemplate restTemplate = new RestTemplate();
@GetMapping("/hi") public String sayHello(){ return "Hello"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public RestTemplate getRestTemplate();", "@Bean\n\tpublic RestTemplate restTemplate() {\n\t\treturn new RestTemplate();\n\t}", "@Bean\n public RestTemplate restTemplate(){\n return new RestTemplate();\n }", "@Bean\n RestTemplate restTemplate(){\n return new RestTemplate();\n }", "...
[ "0.8809254", "0.82661325", "0.82212025", "0.8179373", "0.8169177", "0.7949748", "0.7716036", "0.7700932", "0.756919", "0.73793733", "0.7351645", "0.73415333", "0.7216376", "0.7157838", "0.69326484", "0.68533754", "0.6805484", "0.67559433", "0.67559433", "0.6616522", "0.661596...
0.0
-1
Paytm (1, 10) (2,20) paytm.com/balance/1 10
@GetMapping("/balance/{id}") public Integer getBalance(@PathVariable("id") String id){ System.out.println(id); HashMap<Integer,Integer> dataStore = new HashMap<>(); dataStore.put(1,10); dataStore.put(2,20); return dataStore.get(Integer.parseInt(id)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getBalanceInfo(String request,String user);", "public void balance(int arg1)\n \n {\n \tint sum=0;\n int s;\n int i=0;\n response=RestAssured.get(\"http://18.222.188.206:3333/accounts\");\n Bala=response.jsonPath().getList(\"Balance\");\n while(i<=Bala.size())\n...
[ "0.66908044", "0.64788795", "0.62995607", "0.6139681", "0.61361945", "0.6025314", "0.5988152", "0.5988152", "0.5773129", "0.57573557", "0.57369494", "0.5735312", "0.568467", "0.56745267", "0.56268126", "0.55960333", "0.5591125", "0.55788654", "0.5556824", "0.5536444", "0.5535...
0.5445595
30
System.out.println("hi"); JVM > Windows > System calls
@PostMapping("/users") public User createUser(@RequestBody User user){ return service.addAUser(user); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void sysout() {\nSystem.out.println(\"pandiya\");\n}", "private void syso() {\nSystem.out();\r\n}", "static void print (){\n \t\tSystem.out.println();\r\n \t}", "public static void print() {\r\n System.out.println();\r\n }", "public void println()\n\t{\n\t\tSystem.out.println();\n\t}", ...
[ "0.7145716", "0.71073806", "0.69140315", "0.67841893", "0.6546243", "0.6511204", "0.64349294", "0.64129454", "0.63730353", "0.6363985", "0.63480306", "0.63052726", "0.6276371", "0.6243393", "0.621632", "0.6189858", "0.61894166", "0.6171204", "0.6166156", "0.6128392", "0.61223...
0.0
-1
Function to check whether a number is a prime number or not
static boolean isPrime(String number) { int num = Integer.valueOf(number); for(int i = 2; i * i <= num; i++) { if ((num % i) == 0) return false; } return num > 1 ? true : false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static boolean isPrime(int number){\n for(int divisor = 2; divisor <= number / 2; divisor++){\n if(number % divisor == 0){ // If true. number is not prime\n return false;\n }\n }\n return true; // Number is prime\n }", "public boolean isPri...
[ "0.7979626", "0.79543483", "0.7932136", "0.79170233", "0.7886466", "0.7820278", "0.78182125", "0.7779928", "0.7768987", "0.7767504", "0.77578884", "0.7692718", "0.76868355", "0.76398844", "0.76244426", "0.7619331", "0.758109", "0.7577668", "0.7569398", "0.7568815", "0.7568404...
0.77305204
11
Function to find the count of ways to split String into prime numbers
static int countPrimeStrings(String number, int i) { // 1 based indexing if (i == 0) return 1; int cnt = 0; // Consider every suffix up to 6 digits for(int j = 1; j <= 6; j++) { // Number should not have // a leading zero and it // should be a prime number if (i - j >= 0 && number.charAt(i - j) != '0' && isPrime(number.substring(i - j, i))) { cnt += countPrimeStrings(number, i - j); cnt %= MOD; } } // Return the final result return cnt; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static\nint\ncountPairs(String str) \n\n{ \n\nint\nresult = \n0\n; \n\nint\nn = str.length(); \n\n\nfor\n(\nint\ni = \n0\n; i < n; i++) \n\n\n// This loop runs at most 26 times \n\nfor\n(\nint\nj = \n1\n; (i + j) < n && j <= MAX_CHAR; j++) \n\nif\n((Math.abs(str.charAt(i + j) - str.charAt(i)) == j)) \n\nresult++; ...
[ "0.67307884", "0.6398513", "0.63969886", "0.63155276", "0.6148573", "0.6148133", "0.6127349", "0.612399", "0.6080152", "0.60610986", "0.6044722", "0.60071474", "0.59831434", "0.5952408", "0.5905426", "0.5887481", "0.5874475", "0.58614236", "0.58384484", "0.58233464", "0.58211...
0.7617951
0
Checks the column headers have changed. If they have, need to update the logic in this method or the column index in the constructor.
@Override public void validateHeaderColumns() { String assigned = getAssignedVolunteers(); if (!"TotalVolunteerAssignments".equals(assigned)) { throw new IllegalStateException( "The total volunteer assignments column has changed. It is now showing as " + assigned + ". Please update VolunteerDashboardRow"); } String unassigned = getUnassignedVolunteers(); if (!"UnassignedApplicants".equals(unassigned)) { throw new IllegalStateException( "The unassigned applicants column has changed. It is now showing as " + unassigned + ". Please update VolunteerDashboardRow"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void searchAndVerifyColumnHeader()\r\n\t{\r\n\t\tselectCriteriaAndSearchValue();\r\n\t\tsearchColumnHeaderValidation();\r\n\t}", "protected boolean hasColumn(String header, boolean caseSensitive) {\n return getColumnIndex(header, caseSensitive) > -1;\n }", "public void setColumnName(String newVal) {...
[ "0.706508", "0.64858663", "0.63773817", "0.6372393", "0.6262778", "0.6182451", "0.60194075", "0.59906656", "0.5985577", "0.59642476", "0.5943198", "0.59299296", "0.591204", "0.5899111", "0.5895154", "0.5860685", "0.58548105", "0.5851728", "0.58505964", "0.5827775", "0.5807116...
0.7153644
0
Login the user to PageSeeder using the username and password. If successful, the user is automatically redirected to the initially protected target URI or the default page after authentication.
public void login(HttpServletRequest req, HttpServletResponse res) throws IOException { // Client credentials Properties p = GlobalSettings.getNode("oauth.password-credentials"); String clientId = p.getProperty("client"); String secret = p.getProperty("secret"); ClientCredentials clientCredentials = new ClientCredentials(clientId, secret); // User credentials String username = req.getParameter("username"); String password = req.getParameter("password"); UsernamePassword userCredentials = new UsernamePassword(username, password); // Create request TokenResponse oauth = TokenRequest.newPassword(userCredentials, clientCredentials).post(); if (oauth.isSuccessful()) { PSToken token = oauth.getAccessToken(); // If open id was defined, we can get the member directly PSMember member = oauth.getMember(); if (member == null) { member = OAuthUtils.retrieve(token); } if (member != null) { OAuthUser user = new OAuthUser(member, token); HttpSession session = req.getSession(false); String goToURL = this.defaultTarget; if (session != null) { ProtectedRequest target = (ProtectedRequest)session.getAttribute(AuthSessions.REQUEST_ATTRIBUTE); if (target != null) { goToURL = target.url(); session.invalidate(); } } session = req.getSession(true); session.setAttribute(AuthSessions.USER_ATTRIBUTE, user); res.sendRedirect(goToURL); } else { LOGGER.error("Unable to identify user!"); res.sendError(HttpServletResponse.SC_FORBIDDEN); } } else { LOGGER.error("OAuth failed '{}': {}", oauth.getError(), oauth.getErrorDescription()); if (oauth.isAvailable()) { res.sendError(HttpServletResponse.SC_FORBIDDEN); } else { res.sendError(HttpServletResponse.SC_BAD_GATEWAY); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public LoginPage goToLoginPage() {\n loginButton.click();\n return new LoginPage();\n }", "@Given(\"Login Functionality\")\n public void Login_Functionality() {\n String url = ConfigurationReader.get(\"url\");\n Driver.get().get(url);\n //login with valid credentials\n ...
[ "0.6678963", "0.6672408", "0.65796566", "0.653579", "0.6421751", "0.6398614", "0.63953173", "0.6316261", "0.6311816", "0.6307023", "0.62951046", "0.6257274", "0.62480575", "0.6246825", "0.6151828", "0.6139466", "0.6124118", "0.61240757", "0.6115723", "0.60733926", "0.6065718"...
0.0
-1
Save the protected request
private void loginForm(HttpServletRequest req, HttpServletResponse res) throws IOException { String url = req.getRequestURI(); String query = req.getQueryString(); if (query != null) { url = url + '?' +query; } ProtectedRequest target = new ProtectedRequest(url); // Store in current session HttpSession session = req.getSession(true); session.setAttribute(AuthSessions.REQUEST_ATTRIBUTE, target); res.sendRedirect(this.loginForm); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void saveRequest(HttpServletRequest request,\n\t\t\tHttpServletResponse response) {\n\t\tif (!justUseSavedRequestOnGet || \"GET\".equals(request.getMethod())) {\n\t\t\tDefaultSavedRequest savedRequest = new DefaultSavedRequest(request,\n\t\t\t\t\tportResolver);\n\n\t\t\tif (createSessionAllowed...
[ "0.6896271", "0.651522", "0.5963599", "0.59191024", "0.5891288", "0.58711815", "0.5866574", "0.58662534", "0.580498", "0.57904816", "0.5783591", "0.562456", "0.5533898", "0.54962933", "0.5487408", "0.54561496", "0.5444474", "0.5422109", "0.5408683", "0.5404419", "0.536731", ...
0.0
-1
TODO Autogenerated method stub
@Override public String count(String sql) { return null; }
{ "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
more advanced usage some nodes get used while others are verified 12 nodes, leafs are 1628
public void testAdvancedUsage() throws Exception { Map<Integer, byte[]> tree = createRandomTree(12, xorGen); TreeStorage storage = new TreeStorage(tree.get(1),xorGen, 12); // add 3, 5, 9, 16 storage.add(3, tree.get(3)); storage.add(5, tree.get(5)); storage.add(9, tree.get(9)); storage.add(16, tree.get(16)); assertFalse(storage.getVerifiedNodes().contains(3)); assertFalse(storage.getVerifiedNodes().contains(5)); assertFalse(storage.getVerifiedNodes().contains(9)); assertFalse(storage.getVerifiedNodes().contains(16)); // add broken 17, nothing changes assertFalse(storage.add(17, tree.get(16))); assertFalse(storage.getVerifiedNodes().contains(3)); assertFalse(storage.getVerifiedNodes().contains(5)); assertFalse(storage.getVerifiedNodes().contains(9)); assertFalse(storage.getVerifiedNodes().contains(16)); // add real 17, they all become verified assertTrue(storage.add(17, tree.get(17))); // assert storage.add(17, tree.get(17)); assertTrue(storage.getVerifiedNodes().contains(3)); assertTrue(storage.getVerifiedNodes().contains(5)); assertTrue(storage.getVerifiedNodes().contains(9)); assertTrue(storage.getVerifiedNodes().contains(16)); assertTrue(storage.getVerifiedNodes().contains(17)); assertEquals(6, storage.getVerifiedNodes().size()); // use 3, 5, 9, 16 storage.used(3); storage.used(5); storage.used(9); storage.used(16); assertEquals(6, storage.getVerifiedNodes().size()); // use 17 and only the root remains storage.used(17); assertEquals(1,storage.getVerifiedNodes().size()); assertEquals(1,storage.getUsedNodes().size()); assertTrue(storage.getVerifiedNodes().containsAll(storage.getUsedNodes())); assertTrue(storage.getVerifiedNodes().contains(1)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Vector<Node> GetAdditionalSubNodes();", "@Test(timeout = 4000)\n public void test21() throws Throwable {\n byte[] byteArray0 = new byte[0];\n ByteArrayInputStream byteArrayInputStream0 = new ByteArrayInputStream(byteArray0, 1, 1);\n JavaParser javaParser0 = new JavaParser(byteArrayInputS...
[ "0.64497566", "0.6442148", "0.6346935", "0.6307574", "0.62643033", "0.6261328", "0.62352383", "0.61754996", "0.613586", "0.61056465", "0.60577315", "0.60572326", "0.6036015", "0.6009667", "0.59942895", "0.5992574", "0.59714043", "0.5964053", "0.59391207", "0.5913362", "0.5898...
0.62958515
4
/ 1 1 1 x | 3
public static abstract interface M0_callbackPtr { public abstract int handler(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int Sigma0(int x) {\n int a = ROTR(7, x);\n int b = ROTR(18, x);\n int c = x >>> 3;\n int ret = a ^ b ^ c;\n return ret;\n }", "private int Sigma1(int x) {\n int a = ROTR(17, x);\n int b = ROTR(19, x);\n int c = x >>> 10;\n int ret = a ^ b...
[ "0.59951353", "0.5748897", "0.5635103", "0.5502295", "0.5493296", "0.5460679", "0.53048974", "0.5299089", "0.5271076", "0.5257735", "0.52573025", "0.5238888", "0.52275705", "0.5221349", "0.5220903", "0.52068603", "0.5180255", "0.5159986", "0.5139046", "0.5135551", "0.5108978"...
0.0
-1
Convert the given object to string with each line indented by 4 spaces (except the first line).
private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String toIndentedString(Object object) {\n if (object == null) {\n return EndpointCentralConstants.NULL_STRING;\n }\n return object.toString().replace(EndpointCentralConstants.LINE_BREAK,\n EndpointCentralConstants.LINE_BREAK + EndpointCentralConstants.TAB_SPA...
[ "0.78847593", "0.75493765", "0.74971926", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0...
0.0
-1
No email set, keyfile doesn't exist, but that's OK.
@Test public void exceptionIsThrownForNoServiceAccountEmail() { configuration.set(getConfigKey(SERVICE_ACCOUNT_KEYFILE_SUFFIX), "aFile"); IllegalArgumentException thrown = assertThrows(IllegalArgumentException.class, this::getCredentialFactory); assertThat(thrown) .hasMessageThat() .isEqualTo("Email must be set if using service account auth and a key file is specified."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void emailNotExistsAuth() {\n\t\tassertFalse(service.emailExists(\"iamlegend@willsmith.com\"));\n\t}", "@Test\n\tpublic void emailExistsAuth() {\n\t\tassertTrue(service.emailExists(\"neagu_ionutalin@icloud.com\"));\n\t}", "@Test\n public void emailDoesNotExistTest() {\n driver.manage(...
[ "0.5741806", "0.5700695", "0.5597308", "0.55434495", "0.5395002", "0.5392889", "0.5384658", "0.53529125", "0.5317774", "0.5293989", "0.5274079", "0.52566564", "0.524606", "0.52370554", "0.5176407", "0.51646066", "0.5155574", "0.5114647", "0.51047945", "0.5096989", "0.5089084"...
0.6348892
0
can contain duplicates maintains insertion order non synchronised allows random access as arrays works on index basis manipulation is slow because lots of shifting occurs when element is removed from list
public static void main(String[] args) { ArrayList<Integer> arrayList=new ArrayList<>(); arrayList.add(1); arrayList.add(1); arrayList.add(2); arrayList.add(5); System.out.println(arrayList); System.out.println(arrayList.remove(1)); System.out.println(arrayList); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void removeDuplication() {\r\n\t\t//checks if the array contains any elements\r\n\t\tif (!isEmpty()) {\t//contains elements\r\n\t\t\t//loop to execute for every element in the array\r\n\t\t\tfor (int i=0;i<size-1;i++) {\r\n\t\t\t\tObject element=list[i];\t//to store value of element in array\r\n\t\t\t\t//lo...
[ "0.65890044", "0.6558485", "0.6370861", "0.62561375", "0.6253048", "0.6040228", "0.6021368", "0.60213596", "0.5963545", "0.5956442", "0.5945072", "0.59404516", "0.593639", "0.5911991", "0.5876351", "0.58622", "0.58230746", "0.5804624", "0.5796249", "0.5774362", "0.5770829", ...
0.58168447
17
Set up the test environment by forcing the retry delay and limit to small values for the test and setting up the request context object.
@Before public void setup() { config.setProperty(Constants.PROPERTY_RETRY_DELAY, "1"); config.setProperty(Constants.PROPERTY_RETRY_LIMIT, "3"); rc = new RequestContext(null); rc.setTimeToLiveSeconds(2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void setUp() {\n RequestFactory.defaultFactory = new RequestFactory() {\n @Override\n public Request createRequest(\n String httpMethod,\n String apiMethod,\n RequestType type,\n Map<String, Object> params) {\n return new RequestHelper(httpMetho...
[ "0.6802958", "0.65811515", "0.64588183", "0.6367209", "0.6358145", "0.63311255", "0.6327897", "0.6327897", "0.6325343", "0.6287349", "0.6253821", "0.6250096", "0.6235434", "0.6204548", "0.6132974", "0.612762", "0.6113", "0.6112524", "0.61055046", "0.6084612", "0.6050522", "...
0.82564694
0
Ensure that we set up the property correctly
@Test public void testRetryDelayProperty() { assertEquals(1, rc.getRetryDelay()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setupProperties() {\n // left empty for subclass to override\n }", "@Override\n public void afterPropertiesSet() {\n validateProperties();\n }", "protected void afterPropertiesSetInternal() {\n\t\t// override this method\n\t}", "private ReadProperty()\r\n {\r\n\r\n }"...
[ "0.7190679", "0.68819875", "0.6576796", "0.6540465", "0.6497911", "0.64856744", "0.6371518", "0.6316341", "0.62434965", "0.6241427", "0.62046975", "0.61900306", "0.6144099", "0.6122066", "0.6100461", "0.6100461", "0.6100461", "0.6084809", "0.60544986", "0.6034254", "0.6011088...
0.0
-1
Ensure that we set up the property correctly
@Test public void testRetryLimitProperty() { assertEquals(3, rc.getRetryLimit()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setupProperties() {\n // left empty for subclass to override\n }", "@Override\n public void afterPropertiesSet() {\n validateProperties();\n }", "protected void afterPropertiesSetInternal() {\n\t\t// override this method\n\t}", "private ReadProperty()\r\n {\r\n\r\n }"...
[ "0.7190679", "0.68819875", "0.6576796", "0.6540465", "0.6497911", "0.64856744", "0.6371518", "0.6316341", "0.62434965", "0.6241427", "0.62046975", "0.61900306", "0.6144099", "0.6122066", "0.6100461", "0.6100461", "0.6100461", "0.6084809", "0.60544986", "0.6034254", "0.6011088...
0.0
-1
This test ensures that the retry attempt counter is zero on a new context
@Test public void testRetryCountNoRetries() { assertEquals(0, rc.getAttempts()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testCanRetry() {\n assertEquals(0, rc.getAttempts());\n assertTrue(rc.attempt());\n assertEquals(1, rc.getAttempts());\n assertTrue(rc.attempt());\n assertEquals(2, rc.getAttempts());\n assertTrue(rc.attempt());\n assertEquals(3, rc.getAttempt...
[ "0.6726419", "0.66245943", "0.6576148", "0.64489824", "0.6363751", "0.6328026", "0.627478", "0.618031", "0.6152728", "0.6147767", "0.61317325", "0.6107934", "0.6075155", "0.60288537", "0.60223186", "0.6020415", "0.5963573", "0.5937233", "0.5922301", "0.58409846", "0.58403486"...
0.70762277
0
Test that the delay is accurate
@Test public void testDelay() { long future = System.currentTimeMillis() + (rc.getRetryDelay() * 1000L); rc.delay(); assertTrue(System.currentTimeMillis() >= future); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getDelay();", "public long getDelay();", "private void emulateDelay() {\n try {\n Thread.sleep(700);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }", "@Test\n public void testGetProjectileSpikeDelay() {\n assertEquals(...
[ "0.6811545", "0.66810834", "0.660426", "0.647542", "0.644686", "0.6394352", "0.6391588", "0.637925", "0.6351445", "0.6324794", "0.6319478", "0.6295554", "0.62819016", "0.62736946", "0.62465197", "0.6244729", "0.62319106", "0.62166995", "0.62092835", "0.6198961", "0.6198145", ...
0.7817724
0
The RequestContext tracks the number of retry attempts against the limit. This test verifies that tracking logic works correctly.
@Test public void testCanRetry() { assertEquals(0, rc.getAttempts()); assertTrue(rc.attempt()); assertEquals(1, rc.getAttempts()); assertTrue(rc.attempt()); assertEquals(2, rc.getAttempts()); assertTrue(rc.attempt()); assertEquals(3, rc.getAttempts()); assertFalse(rc.attempt()); assertEquals(3, rc.getAttempts()); assertFalse(rc.attempt()); assertEquals(3, rc.getAttempts()); assertFalse(rc.attempt()); assertEquals(3, rc.getAttempts()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getRequestRetryCount() {\n \t\treturn 1;\n \t}", "@Override\n\tpublic void onRepeatRequest(HttpRequest request,int requestId, int count) {\n\t\t\n\t}", "public interface Limiter {\n public boolean needLimit(RequestContext context);\n}", "@Override\n public abstract long getRequ...
[ "0.6648589", "0.6325378", "0.5914796", "0.5878195", "0.5822782", "0.58137655", "0.57329845", "0.5708862", "0.5684719", "0.5657715", "0.5570954", "0.5554344", "0.54580957", "0.54580957", "0.5457172", "0.5416655", "0.5402923", "0.5393812", "0.53902406", "0.5383353", "0.5372361"...
0.0
-1
The same RequestContext is used throughout the processing, and retries need to be reset once successfully connected so that any earlier (successful) recoveries are not considered when performing any new future recoveries. This test ensures that a reset clears the retry counter and that we can attempt retries again up to the limit.
@Test public void testResetAndCanRetry() { assertTrue(rc.attempt()); assertTrue(rc.attempt()); assertTrue(rc.attempt()); rc.reset(); assertTrue(rc.attempt()); assertTrue(rc.attempt()); assertTrue(rc.attempt()); assertFalse(rc.attempt()); assertFalse(rc.attempt()); assertFalse(rc.attempt()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getRequestRetryCount() {\n \t\treturn 1;\n \t}", "public void resetTries() {\n this.tries = 0;\n }", "protected int retryLimit() {\n return DEFAULT_RETRIES;\n }", "private void resetTriesRemaining() {\n triesLeft[0] = tryLimit;\n }", "@Override\n\t\tpublic b...
[ "0.65051943", "0.6295032", "0.61309886", "0.61308515", "0.5965643", "0.5905009", "0.583532", "0.581495", "0.579844", "0.57951415", "0.5734838", "0.5705088", "0.5623455", "0.5614592", "0.55716723", "0.5566826", "0.5564051", "0.5557294", "0.55427086", "0.55405915", "0.55348486"...
0.6507426
0
Created by usuario on 9/02/17.
public interface IListPresenter { int CATEGORY = 1; int PRODUCT = 2; int DELETE_MULTIPLE_ITEMS = 31; interface View{ void showUndoSnackbar(ArrayList<?> items); Context getContext(); CursorAdapter getCursorAdapter(); void setCursor(Cursor cursor); } interface Presenter { Context getContext(); IListPresenter.View getView(); Map<Integer, Boolean> getListSelectionItems(); void getAllValues(CursorAdapter adapter); void restartLoader(CursorAdapter adapter); void setNewSelection(int position, boolean checked); void removeSelection(int position); void clearSelection(); void deleteMultipleItems(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\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 comer() \r\n\t{\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Overr...
[ "0.607722", "0.5990382", "0.5980783", "0.5954639", "0.59246415", "0.5913315", "0.58661306", "0.58632445", "0.5856966", "0.5811339", "0.5811339", "0.5809774", "0.5767887", "0.57482064", "0.57252717", "0.5689543", "0.5677133", "0.56667596", "0.56624544", "0.56545097", "0.564088...
0.0
-1
Creates an instance of the switch.
public SensorDeploymentLanguageSwitch() { if (modelPackage == null) { modelPackage = SensorDeploymentLanguagePackage.eINSTANCE; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic Structure createNew() {\n\t\treturn new FloorSwitch();\n\t}", "Instance createInstance();", "public Command createInstance() {\n\t\t\n\t\tif(name == \"Direction\")\n\t\t\treturn new Direction();\n\t\t\n\t\tif(name == \"Gear\")\n\t\t\treturn new Gear();\n\t\t\n\t\tif(name == \"Pause\")\n\t\t...
[ "0.6411882", "0.6246885", "0.6101279", "0.6056805", "0.58982885", "0.58335745", "0.58183885", "0.5779628", "0.5765373", "0.567933", "0.5670524", "0.5655171", "0.56360334", "0.56218755", "0.5599665", "0.5561759", "0.5553123", "0.5523057", "0.5465328", "0.5459082", "0.5438984",...
0.0
-1
Checks whether this is a switch for the given package.
@Override protected boolean isSwitchFor(EPackage ePackage) { return ePackage == modelPackage; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean isSystemPackage(String packageName);", "@Override\n\tprotected boolean isSwitchFor(EPackage ePackage)\n\t{\n\t\treturn ePackage == modelPackage;\n\t}", "@Override\r\n\tprotected boolean isSwitchFor(EPackage ePackage) {\r\n\t\treturn ePackage == modelPackage;\r\n\t}", "@Override\r\n\tprotected boolean...
[ "0.6314985", "0.62542677", "0.6252982", "0.6252982", "0.6252982", "0.6252982", "0.6105223", "0.60961777", "0.60961777", "0.60961777", "0.60961777", "0.60961777", "0.60961777", "0.6023195", "0.60106975", "0.60082674", "0.60082674", "0.5821838", "0.57280475", "0.5681909", "0.56...
0.6341777
14
Calls caseXXX for each class of the model until one returns a non null result; it yields that result.
@Override protected T doSwitch(int classifierID, EObject theEObject) { switch (classifierID) { case SensorDeploymentLanguagePackage.CATALOG: { Catalog catalog = (Catalog)theEObject; T result = caseCatalog(catalog); if (result == null) result = defaultCase(theEObject); return result; } case SensorDeploymentLanguagePackage.CONTAINER: { Container container = (Container)theEObject; T result = caseContainer(container); if (result == null) result = caseContainable(container); if (result == null) result = defaultCase(theEObject); return result; } case SensorDeploymentLanguagePackage.CONTAINABLE: { Containable containable = (Containable)theEObject; T result = caseContainable(containable); if (result == null) result = defaultCase(theEObject); return result; } case SensorDeploymentLanguagePackage.SENSOR: { Sensor sensor = (Sensor)theEObject; T result = caseSensor(sensor); if (result == null) result = caseContainable(sensor); if (result == null) result = defaultCase(theEObject); return result; } case SensorDeploymentLanguagePackage.PERIODIC: { Periodic periodic = (Periodic)theEObject; T result = casePeriodic(periodic); if (result == null) result = caseSensor(periodic); if (result == null) result = caseContainable(periodic); if (result == null) result = defaultCase(theEObject); return result; } case SensorDeploymentLanguagePackage.EVENT_BASED: { Event_Based event_Based = (Event_Based)theEObject; T result = caseEvent_Based(event_Based); if (result == null) result = caseSensor(event_Based); if (result == null) result = caseContainable(event_Based); if (result == null) result = defaultCase(theEObject); return result; } case SensorDeploymentLanguagePackage.OBSERVATION: { Observation observation = (Observation)theEObject; T result = caseObservation(observation); if (result == null) result = defaultCase(theEObject); return result; } case SensorDeploymentLanguagePackage.FIELD: { Field field = (Field)theEObject; T result = caseField(field); if (result == null) result = defaultCase(theEObject); return result; } case SensorDeploymentLanguagePackage.RANGE: { Range range = (Range)theEObject; T result = caseRange(range); if (result == null) result = defaultCase(theEObject); return result; } case SensorDeploymentLanguagePackage.CONTINUOUS: { Continuous continuous = (Continuous)theEObject; T result = caseContinuous(continuous); if (result == null) result = caseRange(continuous); if (result == null) result = defaultCase(theEObject); return result; } case SensorDeploymentLanguagePackage.DISCRETE: { Discrete discrete = (Discrete)theEObject; T result = caseDiscrete(discrete); if (result == null) result = caseRange(discrete); if (result == null) result = defaultCase(theEObject); return result; } case SensorDeploymentLanguagePackage.DATA_TYPE: { DataType dataType = (DataType)theEObject; T result = caseDataType(dataType); if (result == null) result = defaultCase(theEObject); return result; } case SensorDeploymentLanguagePackage.INTEGER: { sensorDeploymentLanguage.Integer integer = (sensorDeploymentLanguage.Integer)theEObject; T result = caseInteger(integer); if (result == null) result = caseDataType(integer); if (result == null) result = defaultCase(theEObject); return result; } case SensorDeploymentLanguagePackage.FLOAT: { sensorDeploymentLanguage.Float float_ = (sensorDeploymentLanguage.Float)theEObject; T result = caseFloat(float_); if (result == null) result = caseDataType(float_); if (result == null) result = defaultCase(theEObject); return result; } case SensorDeploymentLanguagePackage.STRING: { sensorDeploymentLanguage.String string = (sensorDeploymentLanguage.String)theEObject; T result = caseString(string); if (result == null) result = caseDataType(string); if (result == null) result = defaultCase(theEObject); return result; } case SensorDeploymentLanguagePackage.ATOMIC: { Atomic atomic = (Atomic)theEObject; T result = caseAtomic(atomic); if (result == null) result = caseField(atomic); if (result == null) result = defaultCase(theEObject); return result; } case SensorDeploymentLanguagePackage.CALCULATED: { Calculated calculated = (Calculated)theEObject; T result = caseCalculated(calculated); if (result == null) result = caseField(calculated); if (result == null) result = defaultCase(theEObject); return result; } default: return defaultCase(theEObject); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected T doSwitch(int classifierID, EObject theEObject)\n {\n switch (classifierID)\n {\n case CustomPrologPackage.MODEL:\n {\n Model model = (Model)theEObject;\n T result = caseModel(model);\n if (result == null) result = defaultCase(theEObject);\n retu...
[ "0.5828588", "0.5752554", "0.57062906", "0.56732863", "0.5651947", "0.5651947", "0.5651947", "0.5650233", "0.55670804", "0.5538706", "0.5510005", "0.5501051", "0.5469857", "0.5456122", "0.54121107", "0.5410395", "0.5394021", "0.53935933", "0.5389968", "0.5375578", "0.5372414"...
0.49842387
52
Returns the result of interpreting the object as an instance of 'Catalog'. This implementation returns null; returning a nonnull result will terminate the switch.
public T caseCatalog(Catalog object) { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Catalog getCatalog();", "Catalog getCatalog();", "Catalog getCatalog();", "public ProductCatalog getCatalog() throws RemoteException;", "public String getIsCatalog() {\n return isCatalog;\n }", "@Override\r\n\t\tpublic String getCatalog() throws SQLException {\n\t\t\treturn null;\r\n\t\t...
[ "0.6606422", "0.65406734", "0.65406734", "0.61967415", "0.60355294", "0.60173565", "0.5932119", "0.57547265", "0.5740943", "0.5658167", "0.56513697", "0.5627277", "0.5627277", "0.56188446", "0.56142735", "0.5511216", "0.54873335", "0.54079497", "0.5398311", "0.53642946", "0.5...
0.75647116
0