query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
Clear all data in the text fields
public void clearTextFields(ArrayList<Person> list) { super.clearTextFields(list); vatNumberField.setText(""); contactNameField.setText(""); revalidate(); repaint(); }
[ "public void clearTextFields() {\r\n\t\ttitulo.setText(\"\");\r\n\t\tautor.setText(\"\");\r\n\t\teditora.setText(\"\");\r\n\t\tclassificacao.setText(\"\");\r\n\t\tlocal.setText(\"\");\r\n\t}", "private void clearTextFields(){\n textId.setText(\"\");\n textName.setText(\"\");\n textNrPlaces.se...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Ingreso de datos registro usuario
@Test // validación campo nombre public void registerUser2() throws InterruptedException { driver.findElement(UserIdentification).sendKeys("78151556"); driver.findElement(UserName).sendKeys(""); driver.findElement(UserLastName).sendKeys("Pulido"); driver.findElement(UserEmail).sendKeys("camila@gmail.com");...
[ "public void registroUsuario(Usuario miusuario);", "private void insertarUsuario() throws IOException {\n usuario.setNombre(nombre);\n usuario.setPaterno(paterno);\n usuario.setMaterno(materno);\n usuario.setNombreLogin(nombreLogin);\n usuario.setPassword(MD5.encriptar(password)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a String representation of the number of Cow rescued and the number of Extra Cow rescued
public String toString() { return ("Number of Cow: " + numCow + " & Number of Extra Cow: " + numExtraCow); }
[ "public String getWatnutCnt(String s) {\n return ((watnutCnt != INTNULL) ? new Integer(watnutCnt).toString() : \"\");\n }", "public int getCowNumber() {\n if(cows!=null){\n return cows.length;\n }\n else {\n return 0;\n }\n }", "public void getMilkC...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Object hiberOjb =en;// convertEntity2Hiber(en);
@Override public void insertEntity(En en) { beforeSaveEntity( en /*,hiberOjb*/); en.syncUK(); getSession().save( en); }
[ "S convertToEntity(D dto);", "public LenguajeEntity toEntity()\r\n {\r\n LenguajeEntity entity = new LenguajeEntity();\r\n entity.setId(this.id);\r\n entity.setNombre(this.nombre);\r\n entity.setExperiencia(this.experiencia);\r\n if(this.programador != null)\r\n {\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override protected Serializable pkVal() { return id; }
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Accessor for the property "Lease" Getter for property Lease. An array of Leases to transfer.
public com.tangosol.coherence.component.net.Lease[] getLease() { return __m_Lease; }
[ "public ArrayList<Lease> getLeases(){\r\n return leases;\r\n }", "public Integer getLeaseAmount() {\r\n return leaseAmount;\r\n }", "public String getLeasePayment() {\n return leasePayment;\n }", "public java.util.Enumeration getLeaseVPayments() throws java.rmi.RemoteException, j...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the updated on.
public void setUpdatedOn(Date updatedOn) { this.updatedOn = updatedOn; }
[ "public Builder setUpdatedOn(long value) {\n bitField0_ |= 0x00000010;\n updatedOn_ = value;\n onChanged();\n return this;\n }", "public String getUpdatedOn() {\n\t\treturn updatedOn;\n\t}", "public long getUpdatedOn() {\n return updatedOn;\n }", "public void update(boolea...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test case number: 93 /Coverage entropy=1.05938459334224
@Test(timeout = 4000) public void test093() throws Throwable { ClassWriter classWriter0 = new ClassWriter((-33)); String[] stringArray0 = new String[1]; stringArray0[0] = "<r"; MethodWriter methodWriter0 = new MethodWriter(classWriter0, 2, "<r", "c[YD0cW)PVu", "<r", stringArray0, true, false...
[ "@Test(timeout = 4000)\n public void test147() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n String string0 = ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a list of all the nested properties with getters of a supplied type.
public static List<PropertyInfo> getBeanCompliantNestedPropertiesWithGetters(Class<?> beanClass) throws UnifyException { return beanNestedPropertiesWithGetterMap.get(beanClass); }
[ "private List<Property> collectAllProperties(final EntityType type) {\n final List<Property> result = new ArrayList<Property>();\n EList<Property> _properties = type.getProperties();\n result.addAll(_properties);\n ComplexType _parent = type.getParent();\n boolean _notEquals = (!Objects.equal(_parent...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Placement policy configuration. .yandex.cloud.compute.v1.PlacementPolicy placement_policy = 11;
boolean hasPlacementPolicy();
[ "yandex.cloud.api.k8s.v1.NodeOuterClass.PlacementPolicyOrBuilder getPlacementPolicyOrBuilder();", "yandex.cloud.api.k8s.v1.NodeOuterClass.PlacementPolicy getPlacementPolicy();", "public CustomPlacementConfig getCustomPlacementConfig() {\n return customPlacementConfig;\n }", "public String getPlacement() {...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
when user comeback from send OTP activity
@Override protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) { super.onActivityResult(requestCode, resultCode, data); if(requestCode == REQUEST_CODE){ if(data!=null){ //getting data about user's authenticationg isAuthen...
[ "public void limpiarOtp() {\n if (!FacesContext.getCurrentInstance().isPostback()) {\n this.codigoOTP = \"\";\n if (sesionController.isReiniciarForm()) {\n this.otpGenerado = false;\n }\n }\n }", "@Override\n public void onCodeSent(String...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
1 => todo //2 => asistente (No alta curso ni baja)//3 => consultor
public MenuPrincipal() { initComponents(); this.setExtendedState(JFrame.MAXIMIZED_BOTH); this.setLocationRelativeTo(null); jmiEditarIscripcion.setEnabled(false); jmiEditarIscripcionMatriculado.setEnabled(false); jmiEditarIscripcionOtro.setEnabled(false); jmiEditar...
[ "private int call_recuperartodos() throws NumberFormatException, FileNotFoundException, IOException {\n\t\t// Llamar a la función recuperartodos de GestionDatos\n\t\tint ruta=model.recuperartodos(view.getId().getText());\n\t\treturn 1;\n\t}", "public void buscar() \n \n {\n estado = u.co...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column rd_loan_agreement.deptMethod
public String getDeptmethod() { return deptmethod; }
[ "public BigDecimal getDEPT_CODE()\r\n {\r\n\treturn DEPT_CODE;\r\n }", "@Override\n\tpublic String getDepartmentBudgetDetails(String departmentCode) {\n\t\tlogger.info(\"In getDepartmentBudgetDetails() method of InventoryDaoImpl\");\n\t\tString departmentBudgetDetails = \"\";\n\t\tSqlSession session =sqlSes...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public void traceForFourmiliere(Adulte adulte) { this.nombresAdults++; }
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public Timesheet getCurrentTimesheet(Employee e) { return null; }
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ 26: / 27:
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9) /* 28: */ { /* 29: 30 */ ItemStack playerItem = player.getCurrentEquippedItem(); /* 30: 31 */ TileEntity te = world.getTileEntity(x, y, z); /* 31: 32 */ if ((te insta...
[ "private static int cti(char c) {\n return (int) c % 26;\n }", "static void vigenereCipherDec(String message, String key) {\n char k, lc = 'a', hc = 'A', charCase;//lowCase highCase\n key=key.toLowerCase();\n int iKey = 0;\n for (char c : message.toCharArray()) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Bind all orders to list view
public void bindLIveuserList(ArrayList<ContactsLivelistVO> list) { try { Liveuserlist = list; if (list.isEmpty()) { } else { liveadapter = new ContactsLiveAdapter(this, Liveuserlist); liveuserrecyclerView.setAdapter(liveadapter); ...
[ "@Override\n\tpublic List<Order> viewAllOrders() {\n\t\t\n\n\t\treturn orderRep.findAll();\n\t}", "public void listOrders (){}", "public List<OrderDetails> viewAllOrders(int id);", "public void showOrders() {\n\t\tList<Customer> customers = service.findAll(filterText.getValue());\n\t\tgrid.setContainerDataSou...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
You need to call this open up the database
public void OpenDB() { db = db_helper.getWritableDatabase(); }
[ "@Override\n\tpublic void open() {\n\t\tloadDatabase();\n\t}", "public void openDatabase() {\n\t\tberkeleydb = new DBWrapper();\n\t\tberkeleydb.initializeDB(dbDirectory);\n\t\tindices = new SimpleDA(berkeleydb.store);\n\t\tenvmnt = berkeleydb.myEnv;\n\t}", "private void initDatabase() {\n dbConnection.op...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override protected void onPause() { super.onPause(); mShakeListener.stop(); }
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Send the name from the nameField to the server and wait for a response.
private void sendNameToServer() { // First, we validate the input. errorLabel.setText(""); final String textToServer = idField.getText(); if (textToServer == null || textToServer.trim().length() == 0) { errorLabel.setText("Please enter an ID"); return; } ...
[ "void nameToServer(String name) throws IOException, InterruptedException {\n\n HttpRequest request = HttpRequest.newBuilder().PUT(ofFormString(name)).uri(URI.create(uriString + \"/setName\"))\n .header(\"Token\", token).build();\n\n HttpResponse<String> response = httpClient.send(reques...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Utility for returning the address of a service in the form host:port
public static String getHostPortString(HostAndPort address) { if (address == null) { return null; } return address.toString(); }
[ "public synchronized String getServiceHost()\r\n/* 143: */ {\r\n/* 144:117 */ return \"http://alpha.visl.sdu.dk:80/tools/office/\";\r\n/* 145: */ }", "public static String getServiceAddress(URL url) {\n\t\tString address = url.getProtocol() + \"://\" + url.getHost() + url.getPath();\n\t\tint index =...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
handle link enter events of links between 1 and 3 (in some cases there are several links between Link1 and Link3)
@Override public void handleEvent(LinkLeaveEvent event) { if(!(event.getLinkId().equals(Id.create("Link1",Link.class)) || event.getLinkId().equals(Id.create("Link3", Link.class )))){ this.linkTravelTimes.put(event.getLinkId() , event.getTime() - this.linkEnterTimes.get(event.getLinkId())); }...
[ "public void hyperlinkUpdate (HyperlinkEvent event)\n {\n //if one of the hyperlinks is clicked on and activated\n if (event.getEventType() == HyperlinkEvent.EventType.ACTIVATED)\n {\n //calls the getThePage method to display the selected hyperlink URL\n getThePage (event.getURL().to...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieve a character's number of carry capacity.
public static int can_carry_n(MudCharacter character) { if (!character.IS_NPC() && character.level >= Globals.LEVEL_IMMORTAL) { return 1000; } if (!character.IS_NPC() && Macros.IS_SET(character.act.index(), MobileActor.PET.index())) { return 0; } return EquipmentWearLocation.MAX_WEAR.inde...
[ "public int getCarryCap() {\n\t\treturn _carryCap;\n\t}", "public Integer getCarryNum() {\r\n return carryNum;\r\n }", "public int capacity() {\n\t\treturn (int) (buffer.capacity() >> shift());\n\t}", "public int getCap(){\n return capacity;\n }", "public int getByteCapacity();", "publ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Start nonblocking execution of LoginTask.
public void startLogin(User user, Auth auth) { cancelTask(); Log.i("Log", "Login Task Starting"); loginTask = new LoginTask(this.callback, user, auth); loginTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, NetworkHandler.API_ENDPOINT + "login"); }
[ "private void login() {\n\n showProgressDialog();\n\n new LoginTask(getNameEditText().getText() + \"\", getPasswordEditText().getText() + \"\") {\n\n @Override\n public void onFailure() {\n Log.d(\"DEBUG\", \"onFailure\");\n //manageTextViewError(get...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
COMPLETED (2) Override the doInBackground method to perform the query. Return the results. (Hint: You've already written the code to perform the query)
@Override protected String doInBackground(URL... params) { URL searchUrl = params[0]; String RideShareSearchResults = null; try { RideShareSearchResults = NetworkUtils.getResponseFromHttpUrl(searchUrl); } catch (IOException e) { e.p...
[ "@Override\n protected Cursor doInBackground(Void... params) {\n return(doQuery());\n }", "@Override\r\n \t\tprotected Cursor doInBackground(String ... queries)\r\n \t\t{\r\n \t\t\tCursor cursor = null;\r\n \t\t\tSQLiteDatabase database = mDatabaseHandler.getWritableDatabase();\r\n \t\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of cruiseIsConcurrent method, of class RestClientCruise.
@Test @Ignore public void testCruiseIsConcurrent() throws Exception { System.out.println("cruiseIsConcurrent"); CruiseBean test = null; RestClientCruise instance = new RestClientCruise(); boolean expResult = false; boolean result = instance.cruiseIsConcurrent(test); ...
[ "public static void exampleConcurrent() {\n }", "public void setIsConcurrent(String isConcurrent) {\n this.isConcurrent = isConcurrent == null ? null : isConcurrent.trim();\n }", "@Test\n public void concurrencyTest() {\n // TODO: test concurrency\n }", "@Override\r\n \tpublic boolea...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns string representation of the built uri.
public String toString() { return urlBuilder.toString(); }
[ "public String toURI() {\n/* 265 */ StringBuilder buffer = new StringBuilder();\n/* 266 */ buffer.append(this.schemeName);\n/* 267 */ buffer.append(\"://\");\n/* 268 */ buffer.append(this.hostname);\n/* 269 */ if (this.port != -1) {\n/* 270 */ buffer.append(':');\n/* 271 */ buffer.ap...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
public void sessionCreated(FlexSession arg0) { System.out.println("sessionCreated"+arg0.getId()); }
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This test first opens the default sample in the Salt format and then export and imports it again. Using the exporter allows us to test the import without storing the exmaralda files as test resource.
@Test void testExportAndImportExmaralda() throws IOException { // Check that export is disabled for empty default project (which has no // location on disk) assertFalse(getFileMenu().menu(EXPORT).isEnabled()); // Open example corpus openDefaultExample(); assertTrue(getFileMenu().menu(EXPORT)....
[ "@Test\n public void open_exporter() throws Exception {\n DataModelSourceProvider provider = new SpiDataModelSourceProvider(getClass().getClassLoader());\n URI uri = new URI(\"windgate:\" + MockExporter.class.getName());\n ValueDefinition<String> definition = ValueDefinition.of(String.class)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the customer object
public void setCustomer(Customer customer) { this.customer = customer; }
[ "void setCustomer(Customer customer);", "@Override\n\tpublic void setCustomer(Customer customer) {\n\t\t\n\t}", "public void setCustomer(User customer) {\n this.customer = customer;\n }", "public void setCustomer(final Customer customer) {\r\n\t\tthis.customer = customer;\r\n\t}", "public void set...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Handles the HTTP GET method.
@Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); }
[ "@Override\n\tpublic void handleGET(CoapExchange exchange) {\n\n\t\t\n\t}", "protected void doGet(HttpServletRequest req, HttpServletResponse response) throws ServletException, IOException {\r\n\t\tSystem.out.println(\"--> get\");\r\n\t}", "public void doGet(HttpServletRequest request, HttpServletResponse respo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method corresponds to the database table t_mgm_black_name_list
public Criteria andNameGreaterThanOrEqualToColumn(TMgmBlackNameList.Column column) { addCriterion(new StringBuilder("`name` >= ").append(column.getEscapedColumnName()).toString()); return (Criteria) this; }
[ "public void addBlackList(String name, String number) {\n SQLiteDatabase db=openDb();\n ContentValues values=new ContentValues();\n values.put(NAME, name);\n values.put(NUMBER, number);\n db.insert(BLACK_LIST_TAB, null, values);\n db.close();\n }", "TMgmBlackNameListCh...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Consume energy on the receiving side and return a number indicating how good this went.
private static int consumeReceiverEnergy(EntityPlayer player, BlockPos c, int dimension) { World world = DimensionManager.getWorld(dimension); TileEntity te = world.getTileEntity(c); if (!(te instanceof MatterReceiverTileEntity)) { Logging.warn(player, "Something went wrong with the ...
[ "public float receiveElectricity(ElectricityPack receive, boolean doReceive)\n {\n \n if (receive != null)\n {\n float prevEnergyStored = this.getEnergyStored();\n float newStoredEnergy = Math.min(this.getEnergyStored() + receive.getWatts(), this.getMaxEnergyStored());\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set up test class.
@BeforeClass public static void setUpSimulator() { LoggerUtil.setLevel("ROOT", "INFO"); LoggerUtil.setLevel("org.eclipse.jetty", "WARN"); try { Util.buildAaiSim(); } catch (final Exception e) { fail(e.getMessage()); } }
[ "@BeforeClass\r\n public static void setUpClass() \r\n {\r\n WSBaseIdeaTest.setUpClass();\r\n }", "default void setUp(){}", "public static void setUp() {\n\n }", "protected void setUp() {\n contestType = new ContestType();\n }", "@BeforeClass\n public static void setUpClass()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Computes the best case of returns from the distribution based on the best case percentile
public double getBestCase() { Arrays.sort(this.result); return getPercentileValue(PortfolioSimulator.getBestcasePercentile()); }
[ "@Override\n public Double computeFitness(Double[] item) {\n Hyperbolic<SourceCodeBlock> hyperbolic = new Hyperbolic<>(item[0], item[1], item[2]);\n\n // generate rankings in separate directory\n int uniqueBucketID = bucketID.getAndIncrement();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the value of intervalDequeueWaits
public long getIntervalDequeueWaits() { synchronized( lock ) { return this.intervalDequeueWaits; } }
[ "public int waitQueueLength();", "public int getWaiting() {\r\n\t\tif (!hasWaiters())\r\n\t\t\treturn 0;\r\n\t\tIterator<RegisteredSignal> iter = queue.iterator();\r\n\t\tint count = 0;\r\n\t\twhile (iter.hasNext()) {\r\n\t\t\tSignal next = iter.next();\r\n\t\t\tif (!next.isCancelled())\r\n\t\t\t\tcount++;\r\n\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
RESTART THREAD AND OPEN LOCKER FOR run();
private void resume() { locker = true; /*running = true; started = false; connection.start(); touchConnection.start(); keyConnection.start();*/ }
[ "@Override\n public void run() {\n LockSupport.park(this);\n /* lockNoFir.lock();\n while(true){\n System.out.println(Thread.currentThread().getName());\n }*/\n System.out.println(Thread.currentThread().getName());\n // LockSuppor...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Writes a string that does not contain embedded tabs or newlines.
private void _write(String s, int off, int len) { _pos += len; super.write(s, off, len); }
[ "public void writeString(String s);", "private void outputNonToken(String aString, BufferedWriter output)\n\t{\n\t\tif (!canWrite)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tif (aString.length() > 0)\n\t\t{\n\t\t\tFileAccess.write(output, aString);\n\t\t}\n\t}", "void write(final String string) throws WriterException;...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method to valid if the excel file has valid extension.
@Override public boolean isValidExcelFile(String fileName) { return fileName.toLowerCase().endsWith(".xlsx") || fileName.toLowerCase().endsWith(".xls"); }
[ "public boolean extensionValid() {\r\n return this.extension.matches(\"[0-9]{1,3}-[0-9]{1,2}\");\r\n }", "private static boolean isValidExtension(String extension) {\n return contains(Extension.class, extension);\n }", "@Override\n public boolean checkExtension(String ext) {\n retu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A context refresh event listener. Get all tasks from DB and reschedule them in case of context restarted
@EventListener({ContextRefreshedEvent.class}) void contextRefreshedEvent() { List<Map<String, Object>> allSchedules = scheduleRepository.getAll(); allSchedules.forEach(schedule -> manager.addTaskToScheduler((String) schedule.get("job_name"), (String) schedule.get("cron"), ...
[ "@Override\n\tpublic void refreshTasks() {\n\n\t}", "Database refresh(Context context);", "@Override\n\tpublic void onApplicationEvent(ContextRefreshedEvent event) {\n\t\ttry {\n\t\t\tauartz.scheduleJobs();\n\t\t} catch (SchedulerException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This returns true when the game is over by either hitting a bomb or all flags have been correctly placed
public boolean gameOver(){ boolean gameOver = false; boolean win = false; ArrayList<Square> squares = fillSquareArrayList(); for(int i = 0; i < squares.size() && !gameOver; i++){ if(squares.get(i).getHasBomb() && squares.get(i).getIsRevealed()){ gameOver = true; } } if(board.getFlagCount() == 0 &&...
[ "public void hitCheck2(){\n\n //First thing to check for: Lives\n if(lives == 0){\n try {\n mTimer.cancel();\n mTimer = null;\n }catch (Exception e){\n Log.d(\"TIMER_ERROR\", e.getMessage());\n }\n //GAME OVER\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Return a set of all dotted names as visible to the user. This means that we convert any dotted names beginning with a config name to dotted names beginning with its corresponding server name. Certain domain names are also aliased into the server name.
protected java.util.Set allDottedNameStringsThrow( ) throws DottedNameServerInfo.UnavailableException { final Set srcSet = mSrcQuery.allDottedNameStrings(); final Iterator iter = srcSet.iterator(); final HashSet destSet = new HashSet(); final Set configNames = mServerInfo.getConfigNames(); while (...
[ "public SortedSet getDomainNames()\r\n {\r\n return root_.getNamesOfDirectSubdomains();\r\n }", "java.util.List<com.v2ray.core.common.net.Endpoint>\n getNameServersList();", "List /*String*/ getAliasNames();", "java.util.List<String> sanDnsNames();", "public List<String> getDomainNames() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a new TCustomerProductLimitDao without any configuration
public TCustomerProductLimitDao() { super(TCustomerProductLimit.T_CUSTOMER_PRODUCT_LIMIT, cn.zyj.dbexporter.jooq.db_mall.tables.pojos.TCustomerProductLimit.class); }
[ "protected ProductDaoWithJdbc() {\n }", "public TProductSourceDAOImpl() {\n super();\n }", "public ProductBL() {\n dao = new ProductDAO();\n priceValidator = new PriceValidator();\n }", "private CriterionDbmsDao() {\r\n }", "public void setJpoProductNumLimitDao(JpoProductNum...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Created by Administrator on 2017/05/16
public interface WeatherFragmentModel{ void refreshWeather(Context context, String mCityName, MVPCallBack<WeatherInfo> mvpCallBack); void getConstellation(Context context, String name, MVPCallBack<ConstellationBean> mvpCallBack); }
[ "@Override\n }", "@Override\n public void extornar() {\n \n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "private static void EX5() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n public int utilite() {\n ret...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method creates the state element (i.e. a single state definition within a state set, inside a format element). Because state elements require a symbol attribute it needs to be passed in here.
CharacterState createCharacterState(Object symbol);
[ "StatesAttribute createStatesAttribute();", "public State createState();", "public ConverterState createNextStateForSymbol(String symbol)\n\t\t{\n\t\t\tSet<State> nextNfaStates = getNextNfaStatesForSymbol(symbol);\n\t\t\tSet<State> result = new LinkedHashSet<State>();\n\t\t\t\n\t\t\tfor (State nextState : nextN...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the entity by criterion.
public T getEntityByCriterion() { return criterion.thenGetResult(); }
[ "protected T getFirstObjectByCriteria(Criterion... criterion) {\n return findByCriteria(criterion).get(0);\n }", "E get(E entity);", "protected T getFirstObjectByCriteria(Order orderBy, Criterion... criterion) {\r\n\r\n LOG.info(\"Entered getFirstObjectByCriteria(Order orderBy, Criterion... cri...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
public void onClick(View v) { finish(); Intent i=new Intent(getApplicationContext(),Delete.class); startActivity(i); }
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
public void actionPerformed(ActionEvent arg0 ) { counter=counter+1; if(counter==5) { showPicture("jackInTheBox.png"); } }
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Helper method to call in the listener loop
private void loopCall(SafeSocket ss,boolean isLogin) throws InterruptedException { if(isLogin){ listenLogin(ss); }else{ listenCompletion(ss); } }
[ "@Override\n protected void setListener() {\n }", "@Override\n\tpublic void Listen() {\n\t\t\n\t}", "public void run() {\n listen();\r\n }", "private void initListener() {\n\t}", "public abstract void onRun();", "@Override\n public void run() {\n try {...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Turns to the desired angle using a proportional controller
public void turnTo(double angle) { int KP = 200; int TP = 0; while (true) { float[] reading = getGsample(); float error = (float) (angle - reading[reading.length - 1]); float turn = KP * error; turn = turn / 100; float powerR = (TP + turn); float powerL = (TP - turn); if (...
[ "public void turnAngleUsingPidControllerTowardCube() {\n\t\tdrivetrain.turnAngleUsingPidController(camera.getAngleToTurnToTarget());\n\t\t/*drivetrain.turnAngleUsingPidController(calculateProperTurnAngle(\n\t\t\t\tcamera.getAngleToTurnToTarget(),camera.getDistanceToTargetUsingHorizontalFov()));*/\n\t}", "void set...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
set the displayName to set
public void setDisplayName(String displayName) { this.displayName = displayName; }
[ "protected void setDisplayName(final String displayName) {\n this.displayName = displayName;\n }", "public void setDisplayName (java.lang.String displayName) {\r\n\t\tthis.displayName = displayName;\r\n\t}", "public void setDisplayName(String displayName) {\r\n this.displayName = displayName == null ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Metodo che comunica che un giocatore che ha assistito ad un abbattimento deve essere pagato per il suo silenzio.
public void pagaSilenzio(Giocatore giocatoreCorrente, Giocatore giocatoreDaPagare) { inviaTuttiGiocatori(encoder.pagaSilenzio(giocatoreCorrente, giocatoreDaPagare)); }
[ "private void controlaBotaoPrescricaoMedica() {\r\n try {\r\n\r\n if (aghuFacade.isHCPA()){\r\n\t\n //ii) Se for o HCPA e a unidade do paciente estiver no parâmetro criado chama AGHUse senão chama AGHWEB\r\n if (unidadeDoAtendimentoEstaNoParametro() == false){\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
repeated .restprotocolbuffers.Student student = 3;
java.util.List<org.techfrog.restprotocolbuffers.model.Student> getStudentList();
[ "@Override\n protected void initChannel(SocketChannel ch) {\n ch.pipeline().addLast(new ProtobufDecoder(Information.Student.getDefaultInstance()));\n ch.pipeline().addLast(new ProtobufEncoder());\n ch.pipeline()....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
??? Creates a list of all the classes of the proteins of the classes of a class list and saves them in a separate file ...
public Vector createClassCodeList(String[] proteinCodeList, String[] simpleClassCideList, String filename) { Vector classCodes = new Vector(1, 1); for (int i = 0; i < simpleClassCideList.length; i++) { ProteinClass newClass = new ProteinClass(simpleClassCideList[i]); classCodes.a...
[ "private void createClasses ()\r\n\t{\n\t\tfor (RefOntoUML.Class c : ontoAbstraction.classes)\r\n\t\t{\r\n\t\t\tif (!(c instanceof RefOntoUML.AntiRigidSortalClass) && !(c instanceof RefOntoUML.Quality))\r\n\t\t\t{\r\n\t\t\t\t// Corresponding UML.Class\r\n\t\t\t\torg.eclipse.uml2.uml.Class c2 = Onto2InfoMap.getClass...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
repeated .SalesReturnOrderItem itemList = 3;
com.yhglobal.gongxiao.sales.microservice.SalesOrderReturnServiceStructure.SalesReturnOrderItem getItemList(int index);
[ "void generateItemBill(Item... items);", "@Test\n\tpublic void findAllOrderedItemss() {\n\t\t// TODO: JUnit - Populate test inputs for operation: findAllOrderedItemss \n\t\tInteger startResult = 0;\n\t\tInteger maxRows = 0;\n\t\tList<OrderedItems> response = null;\n\t\tresponse = service.findAllOrderedItemss(star...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Transforms an EMFbased XML Resource instance into a DOM Document Element.
public static Element transformEmfToDom(XMLResource resource) throws Exception { org.w3c.dom.Document domDocument = XMLUtils.createDomDocument(); // FIXME Fix for issue 121 resource.save(domDocument, EMF_SAVE_OPTIONS, null); //resource.save(domDocument, EMF_SAVE_OPTIONS, EMF_DOM_HANDLER); return domDocument....
[ "public abstract Element toXml(Document document);", "public Element asElement() {\n\t\tElement root = getRootElement();\n\t\t// doc is necessary for setNoteText calls\n\t\tthis.doc = DocumentHelper.createDocument(root);\n\t\tif (notEmpty(title))\n\t\t\tsetNodeText(\"/serviceDescription/dc:title\", title);\n\t\ti...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ renamed from: a
void mo28022a(zzcze<E, ?> zzcze);
[ "public interface C3511a {\n /* renamed from: a */\n void mo29057a(int i);\n }", "interface C4511c {\n /* renamed from: a */\n void mo29775a();\n }", "public interface ans {\n /* renamed from: a */\n void mo1174a();\n}", "public interface C24712af {\n /* renamed from...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Remove a child TreeNode from this TreeNode. Connectors are automatically cleared up.
public void removeChildNode(final WiresBaseTreeNode child) { child.setParentNode(null); final int index = children.indexOf(child); final WiresTreeNodeConnector connector = connectors.get(index); children.remove(child); connectors.remove(connector); getLayer().remove(conne...
[ "@Override public void removeChild(TreeNode child) {\n removePlatform((Platform) child);\n }", "public Node<T> removeChild() {\r\n int childrenLen = children.size();\r\n if (childrenLen != 0) {\r\n Node<T> child = children.remove(childrenLen - 1);\r\n child.parent = n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the stopButton to its preferred value.
public void setStopButton(JButton stopButton) { this.stopButton = stopButton; }
[ "public void setStopButtonStatus(boolean enabled);", "public Builder setStop(boolean value) {\n bitField0_ |= 0x00000002;\n stop_ = value;\n onChanged();\n return this;\n }", "protected void stopButtonAction(){\n\t\tpauseLogic();\n\t\tplaybackLoc = 0;\n\t}", "@Override\n\t\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
BinarySearchTree Tests Testing add/addRecursive
@Test void bstTest1() { BinarySearchTree<Integer> bst = new BinarySearchTree<Integer>(); bst.add(500); bst.add(100); bst.add(1000); bst.add(50); bst.add(150); bst.add(750); bst.add(1250); bst.add(1300); bst.add(75); bst.add(25); bst.add(125); bst.add(175); bst.add(775); bst.add(725); bs...
[ "@Test\n public void testAdd() {\n System.out.println(\"add\");\n AVLNode instance = SampleTrees.getRootSingleNode().getRoot();\n boolean result = instance.equals(new AVLNode(42));\n boolean expResult = true;\n assertEquals(expResult, result);\n // 1\n instance = ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__OpCompare__Group_1__1__Impl" $ANTLR start "rule__XOtherOperatorExpression__Group__0" InternalSARL.g:33999:1: rule__XOtherOperatorExpression__Group__0 : rule__XOtherOperatorExpression__Group__0__Impl rule__XOtherOperatorExpression__Group__1 ;
public final void rule__XOtherOperatorExpression__Group__0() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalSARL.g:34003:1: ( rule__XOtherOperatorExpression__Group__0__Impl rule__XOtherOperatorExpression__Group__1 ) // InternalSARL.g:...
[ "public final void rule__XOtherOperatorExpression__Group_1_0__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalOcelet.g:11573:1: ( ( ( rule__XOtherOperatorExpression__Group_1_0_0__0 ) ) )\n // InternalOcelet.g:11574...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional string CFICode = 55;
public com.google.protobuf.ByteString getCFICodeBytes() { java.lang.Object ref = cFICode_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); cFICode_ = b; ...
[ "java.lang.String getFipsCode();", "String mo30361a(C24599c c24599c);", "void mo4902a(String str, C4514a c4514a);", "void mo24495a(C12578a c12578a);", "public char getCLIChar();", "public interface C0182f {\n}", "void mo2494a(C0798a c0798a);", "String getCrc();", "void mo5799a(C5484b c5484b);", "p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
GET times of one Attempt with id Path = 'api/attempts'
@GET @Produces(MediaType.APPLICATION_JSON) @Path("{id}/times") public Response getTimes(@PathParam("id") Long id) { if (this.attemptService.findById(id) == null || this.attemptService.findById(id).getTestTemplate() == null ){ return Response.noContent().build(); } else { TimesModelAttempt result = new Time...
[ "public int getAttempts(){\n return attempts; \n }", "public void addAttempt() {\r\n\t\tattempts++;\r\n\t}", "public static Attempt getAttemptById(int attemptID) {\n\t\tConnection conn = null;\n\t\tPreparedStatement ps = null;\n\t\tString query = \"select * from Attempt where attemptID = ?\";\n\t\tRes...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
affichage de la base de clauses representant le probleme
public void affBase(){ System.out.println("Base de clause utilise "+nbVariables+ " variables et contient les clauses suivantes : ") ; for (ArrayList<Integer> cl : base) { System.out.println(cl) ; } }
[ "public void chargedClauses(){\n\t\tSystem.out.println(\"\\nThe added restriction are:\");\n\t\tfor(String st : clauses){\n\t\t\tSystem.out.println(\" - \" + st);\n\t\t}\n\t\tfor(String st : order){\n\t\t\tSystem.out.println(\" - \" + st);\n\t\t}\n\t}", "public AndClause() {\n }", "public abstract String che...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the Type field.
public void setType(typekey.NoteType value);
[ "public void setType(Type type) {\n mType = type;\n }", "public void setType (String pType)\n {\n mType = pType;\n }", "public void setType(Type type) {\n if (type == null) {\n throw new IllegalArgumentException(\"Type cannot be null.\");\n }\n this.type = type...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Load ui data here
@Override public void onCreated() { //find our list try { getElementsByIds(new DKViewMap[]{ new DKViewMap(R.id.listview, list) }); //now iterate through supported activities and create a list of strings List<DKActivityBase> activities = getDebugActivities(); String[] items = new Stri...
[ "private void loadData() throws IOException, ClassNotFoundException {\n UI load = new UI(LoadDataMenu);\n\n load.setHandler(1,()->{\n load(true);\n load.returnMenu();\n });\n load.setHandler(2,()->{\n load(false);\n load.returnMenu();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Returns the inDegree
public int inDegree(int v) { return inDegree(v); }
[ "public int getDegree() {\n /* TODO */\n return 0;\n }", "public int getOutDegree ();", "@Override\n public int getDegree() { return inDegree + outDegree; }", "public int getInDegree ( int node_index ) ;", "public int getDegree(){\n\t\treturn degree;\n\t}", "public int getD...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional .hadoop.mapreduce.JobIdProto job_id = 1;
private com.google.protobuf.SingleFieldBuilder< org.apache.hadoop.mapreduce.v2.proto.MRProtos.JobIdProto, org.apache.hadoop.mapreduce.v2.proto.MRProtos.JobIdProto.Builder, org.apache.hadoop.mapreduce.v2.proto.MRProtos.JobIdProtoOrBuilder> getJobIdFieldBuilder() { if (jobIdBuilder_ == null) ...
[ "public JobId getJobId(){\n return jobId;\n }", "public void setId(JobId id) {\n jobInfo.setJobId(id);\n }", "public com.google.protobuf.StringValueOrBuilder getJobIdOrBuilder() {\n if (jobIdBuilder_ != null) {\n return jobIdBuilder_.getMessageOrBuilder();\n } else {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
do something with the current node instead of System.out System.out.println(node.getNodeName());
public static void findCDATAelementsAndReplace(Node node,Document document) { NodeList nodeList = node.getChildNodes(); for (int i = 0; i < nodeList.getLength(); i++) { Node currentNode = nodeList.item(i); if (currentNode.getNodeType() == Node.ELEMENT_NODE) { //c...
[ "public void visit(TreeNode node){\n\t\tSystem.out.println(node.val);\n\t}", "public void printNode(){\n\t\tSystem.out.print(\"Node \" + this.index);\n\t}", "public static void printNodeType(Node node) {\n System.out.println(\" Node \" + node.getNodeName() + \" ->\");\n switch (node.getNodeType())...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ access modifiers changed from: protected
public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.custom_field_layout); this.pref = new SettingPreference(getApplicationContext()); new Bugsense().startBugsense(getApplicationContext()); findViewId(); }
[ "@Override\n }", "protected void method_5557() {}", "@Override\n public void extornar() {\n \n }", "@Override\r\n public void publicando() {\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "pro...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional string ctnope = 1;
public boolean hasCtnope() { return instance.hasCtnope(); }
[ "private void assertNotNull(String string, String name) {\n\t\t\t\n\t\t}", "@Test(timeout = 4000)\n public void test145() throws Throwable {\n String string0 = Evaluation.makeOptionString((Classifier) null, true);\n assertNotNull(string0);\n }", "boolean hasVarString();", "@Test(timeout = 4000)\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
User cancelled the dialog
public void onClick(DialogInterface dialog, int id) { }
[ "protected void cancelDialog() {\n userInput = null;\n closeDialog();\n }", "@Override\n\t\t\tpublic void cancel() {\n\t\t\t\tdialog.dismiss();\n\t\t\t}", "public void cancel () {\n\t\tdialogObject.doCallback(null);\n\t}", "void cancelButtonPressed()\n\t{\n\t\tcloseDlg();\n\t}", "@Override\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Problem Heap 1 write a method that finds the index of an item's left child. The parameter parent in this method is the index of the parent element The left child's index is twice the parent's plus 1
private int leftIndex(int parent) { int leftIndex ; //complete this leftIndex=(2*parent- 2); return leftIndex; }
[ "private int getLeftChildIndex(int parentIndex) { return 2 * parentIndex; }", "private int leftChild(int index) { return items[getLeftChildIndex(index)]; }", "private int getLeftChildIndex(int parentIndex){\n return 2*parentIndex+1;\n }", "private int getLeftChildIndex(int currIndex) {\n retu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a NumberValidator for a currency format for the current default locale.
public static NumberValidator getCurrencyInstance() { return new NumberValidator(NumberFormat.getCurrencyInstance()); }
[ "public static NumberFormat getNumberInstance(Locale paramLocale) {\n/* 469 */ return getInstance(paramLocale, 0);\n/* */ }", "public NumberFormat getNumberFormat(Locale iLocale);", "public static final NumberFormat getNumberInstance() {\n/* 458 */ return getInstance(Locale.getDefault(Locale.Ca...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A string containing a valid FinalGameState as defined in the documentation.
public String getFinalGameStateJSON();
[ "private String buildDefaultGameState(){\n return \"Winner:-1 NextTurn:Blue MoveCount:0 Red:7,0,0/6,0,6/4,1,1/2,1,5/1,2,0/5,2,2/3,2,4/8,2,6 Blue:8,6,0/3,6,2/5,6,4/1,6,6/2,7,1/4,7,5/6,8,0/7,8,6\";\n }", "public String getGameStateString() {\n\t\tString state = \"Game state:\\n\";\n\t\t\n\t\tstate += \"Th...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
tranforma dintr un string in lista de objecte de tipul numerelor complexe si semnul folosind regex va intrebati de ce am semnul pe pozitia 1 a listei well functia asta era complet diferita pana miam dat seama ca ea crapa undeva si ca sa nu schimb si get operation am facut sa fie bine :)
public static String[] listify(String input) { String regex0 = "(-?)(\\d+(\\.\\d+)?)(|\\+|\\-|\\+-)(\\d+(\\.\\d+)?(\\*?))i";//a+ -sau+-b(*?)i (0) String regex1="(-?)(\\d+(\\.\\d+)?)(\\+|\\-)(|\\-)i";//a+ -sau+-i (1) String regex2="(-?)(\\d+(\\.\\d+)?)(\\*?)i";//b(*?)i (2) String re...
[ "public static String multiplicaColchetes(String str)throws Exception{\n str = multiplicaParentesis(str);\n String elemento = \"\", str3 = \"\";\n int a = posPattern(str, \"\\\\[\"), b = posPattern(str, \"\\\\]\");\n int n = Integer.parseInt(\"\"+str.charAt(b+1));\n for(int i = 0;...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Register user with given unencrypted password.
Long registerUser(UserCreateDTO userCreateDTO, String unencryptedPassword);
[ "void createUser(final User user, final String password);", "private void registerUser(final String name, final String email,\n final String password) {\n }", "Result createPassword(User user, String password) throws NoSuchAlgorithmException;", "public native UserInfo register(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
refers to next node in the list (null if none) constructs a new ListNode
public ListNode(double d) { this(d, null); }
[ "OneWayListNode<T> next();", "public ListNode(int data) {\r\n this.data = data;\r\n this.next = null\r\n // initially pointing to null until set a reference to the next node \r\n }", "public ListNode() {\n this(0, null);\n }", "public ListNode() {\n this(0, null);\n }"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks how many courses the student has passed
public int calcPassedCourseNum() { if (course1.isPassed() && !course2.isPassed() && !course3.isPassed()) return 1; else if (course2.isPassed() && !course1.isPassed() && !course3.isPassed()) return 1; else if (course3.isPassed() && !course2.isPassed() && !course1.isPassed(...
[ "public int getNumOfCoursesTaken() {\n return m_numOfCoursesTaken;\n }", "private int checkCourse(StudentRecord studentRecord) {\n // Calculate total credits, lab fee and online course fee\n int totalCredit = 0;\n for (Course course : studentRecord.getCourses()) {\n // Calculat...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
fonction pour supprimer un produit
private void supprimerProduitPanier(BaseProduit baseProduit, PanierDuClient panierClient, String nomDeProduit) { for (int i = 0; i < baseProduit.getListeDeProduit().size(); i++) { if (nomDeProduit.equals( baseProduit.getListeDeProduit().get( i ).getNomProduit() )){ baseProduit.getL...
[ "public String supprimerProduit() {\r\n\t\tint prSuppr = produitService.deleteProduit(produit);\r\n\r\n\t\tif (prSuppr != 0) {\r\n\t\t\t// recuperation de la liste\r\n\t\t\tList<Produit> liste = produitService.getAllProduit(); //, client\r\n\t\t\tmaSession.setAttribute(\"produitsListe\", liste);\r\n\r\n\t\t\tret...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test case number: 24 /Coverage entropy=1.4105135571148382
@Test(timeout = 4000) public void test24() throws Throwable { ExpressionMatrixImpl expressionMatrixImpl0 = new ExpressionMatrixImpl(); expressionMatrixImpl0.creatMatrix(0); expressionMatrixImpl0.getNumberOfElements(); expressionMatrixImpl0.toString(); expressionMatrixImpl0.getNumberOfE...
[ "@Test(timeout = 4000)\n public void test147() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n String string0 = ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional .com.kedacom.ops.flink.etl.proto.DssNetAddr DstAddr = 2;
public Builder setDstAddr(com.kedacom.ops.flink.etl.proto.Dssevstruct.DssNetAddr value) { if (dstAddrBuilder_ == null) { if (value == null) { throw new NullPointerException(); } dstAddr_ = value; onChanged(); } else { dstAddrBuilder_.setMessa...
[ "public Ip4Address tunDstAddr() {\n return tunDestAddr;\n }", "static void Z41_ssN0_dddd_addr(void)\n{\n\tGET_DST(OP0,NIB3);\n\tGET_SRC(OP0,NIB2);\n\tGET_ADDR(OP1);\n\taddr += RW(src);\n\tRW(dst) = ADDW( RW(dst), RDMEM_W(addr) );\t/* ASG */\n}", "static void Z56_0000_dddd_addr(void)\n{\n\tGET_DST(OP0,...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public Integer next() { Integer res = this.buffer; if(this.iterator.hasNext()) this.buffer = this.iterator.next(); else this.buffer = null; return res; }
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Inflates a menu, a menu resource id must be defined in onCreate method
@Override public boolean onCreateOptionsMenu(Menu menu) { if (mMenu != 0) { MenuInflater inflater = getMenuInflater(); inflater.inflate(mMenu, menu); } else { super.onCreateOptionsMenu(menu); } return true; }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater(); // Get menu inflater from context\n \tinflater.inflate(R.menu.menu, menu); // use inflater to inflate menu from resource xml\n \treturn true; // \n }", "@Override\n public void onCreateOpt...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Searches for routes in the specified transit gateway route table.
@Override public SearchTransitGatewayRoutesResult searchTransitGatewayRoutes(SearchTransitGatewayRoutesRequest request) { request = beforeClientExecution(request); return executeSearchTransitGatewayRoutes(request); }
[ "RouteTable routeTable();", "public static void searchByRoute(String text) throws IOException {\n\t\tString inputRoute = Input.promptForRoute(); \n\t\t\n\t\tPattern pattern = Pattern.compile(\"<a href=\\\"(/schedules/route.*)\\\">.*\" + inputRoute);\n\t\tMatcher matcher = pattern.matcher(text);\n\t\t\n\t\tif (mat...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Remove from the tree. Nothing is done if x is not found.
public void remove( AnyType x ) { root = remove( x, root ); }
[ "public void remove(E x) {\n\t\tBinaryNode<E> newTree;\n\t\t\n\t\t// If x is found, it will be at the root\n\t\troot = splay(x, root);\n\t\tif (root.element.compareTo(x) != 0)\n\t\t\treturn ; // Item not found; do nothing\n\t\t\n\t\tif (root.left == nullNode)\n\t\t\tnewTree = root.right;\n\t\telse {\n\t\t\t// Find ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Called when the root tree view node is selected
private void buildPieChartView() { chartRoot.setCenter(new PieChartController().getPieChart(tasks)); }
[ "public void selectRoot () {\r\n TreePath path = new TreePath(explorerTreeRoot.getPath());\r\n getExplorerTree().setSelectionPath(path);\r\n }", "private void setupTreeSelectionHandler() {\n application.addSelectionHandler(new SelectionHandler<TreeItem>() {\r\n public void onSel...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the Filter value.
static public final DocFilter getFilter() { return filter; }
[ "public Filter getValue() {\n\t\tFilter filter = super.getValue();\n\t\tif (Filter.UNKNOWN != filter) {\n\t\t\treturn filter;\n\t\t} else if (rdChangedOrNormal.getSelection()) {\n\t\t\treturn Filter.CHANGED_OR_NORMAL;\n\t\t} else if (rdEmptyOrNormal.getSelection()) {\n\t\t\treturn Filter.EMPTY_OR_NORMAL;\n\t\t} els...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets value as the attribute value for EmployeeId
public void setEmployeeId(Number value) { setAttributeInternal(EMPLOYEEID, value); }
[ "public void setEmployeeID(int value) {\n this.employeeID = value;\n }", "public void setEmployeeId(Integer employeeId)\r\n/* 48: */ {\r\n/* 49:48 */ this.employeeId = employeeId;\r\n/* 50: */ }", "public void testSetEmployeeId() {\r\n System.out.println(\"setEmploye...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the name of the S3 bucket.
public String getBucketName() { return this.bucketName; }
[ "String bucketName();", "public String bucketName() {\n return bucketName;\n }", "public String getBucketName() { return this.bucketName; }", "public static String getBucketNameFromLocation(String location) {\n validateS3Url(location);\n int bucketEndIndex = validateExistBucketNameFromLocati...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
public static void main(String[] args) throws NumberFormatException, IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int t = Integer.parseInt(br.readLine()); while(t-->0){ int n = Integer.parseInt(br.readLine()); int arr[] = new int[n]; int i=0;long sum=0; ...
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Update POM.xml with JSSC Maven dependency
private void updatePOM4Server(Context ctx) { try { final InputStream input = new FileInputStream(ctx.getOutputDirectory() + "/pom.xml"); final List<String> packLines = IOUtils.readLines(input, Charset.forName("UTF-8")); String pom = ""; for (String line : packLine...
[ "private void updatePaxConstructProject()\n throws MojoExecutionException\n {\n try\n {\n // only need to update in one place...\n Pom pom = PomUtils.readPom( targetDirectory );\n boolean foundPlugin = pom.updatePluginVersion( \"org.ops4j\", \"maven-pax-plugi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the column that the dalek is on
public int getCol(){ return this.col; }
[ "public Long getColumn() {\n return column;\n }", "public int column() {return col;}", "com.guidewire.datamodel.ColumnDocument.Column getColumn();", "public String getColumnName (int column);", "public int getCol(){\r\n\t\treturn column;\r\n\t}", "protected int getColumn() { return column; }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The standard list page size.
public List setPageSize(java.lang.Integer pageSize) { this.pageSize = pageSize; return this; }
[ "public int getPageSize() {\n return DEFAULT_PAGE_SIZE;\n }", "int getpagesize();", "long getPageSize() {\n return usedBytesCount.rounder.osPageSize;\n }", "@Override\n\tpublic int getPageSize() {\n\t\treturn size;\n\t}", "public int getSize(){\n return this.listSize;\n }", "int getPaged...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Destruction of the servlet.
public void destroy() { super.destroy(); // Just puts "destroy" string in log // Put your code here }
[ "@Override\n\tpublic void destroy(){\n\t\tsuper.destroy();\n\t\tlog(\"Destroying the servlet\");\n\t}", "@Override\r\n\tpublic void destroy() {\n\t\tsuper.destroy();\r\n\t\t\r\n\t\tSystem.out.println(\"servlet destroy!!!\");\r\n\t}", "public void destroy() {\r\n\t\tsuper.destroy();\r\n\t\tlogger.info(\"InitServ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
HACK, response is not valid json, but always seems to start with "song = " .... and then valid json
@Override public void onResponse(String response) { final String json = response.substring(7); try { JSONObject jsonObject = new JSONObject(json); lyricsTextView.setText(jsonObject.getString("lyrics")); ...
[ "private static Song parseSongObject(JSONObject songObject) throws JSONException {\n String id = songObject.getString(SONG_ID_KEY);\n\n String title = \"\" ;\n if (songObject.has(SONG_TITLE_KEY)) {\n title = songObject.getString(SONG_TITLE_KEY);\n }\n\n String genre = \...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Updates cache strategy to match the state of the GUI.
private void updateStrategy() { try { ICacheStrategy strategy = strategyValue(strategyChooser.getSelectedIndex()); if (strategy != null) cache.setStrategy(strategy); } catch (CacheException exc) { LOGGER.info("", exc); } }
[ "@Override\n protected void updateCache() {\n\n }", "public void updateCacheStates() {\n mCachedTint = mTint;\n mCachedTintMode = mTintMode;\n mCachedRootAlpha = mVPathRenderer.getRootAlpha();\n mCachedAutoMirrored = mAutoMirrored;\n mCacheDirty...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the BEmail attribute descriptor. This method supports advanced MATISSE programming techniques such as dynamically modifying the schema.
public static com.matisse.reflect.MtAttribute getBEmailAttribute(com.matisse.MtDatabase db) { return (com.matisse.reflect.MtAttribute)db.getCachedObject(bEmailCID); }
[ "public String getEmail() {\n // Bouml preserved body begin 00040D82\n\t //System.out.println(emailFacturation);\n\t return emailFacturation;\n // Bouml preserved body end 00040D82\n }", "public String getemail() {\n return (String) getAttributeInternal(EMAIL);\n }", "public int getEmail()\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Regnal Years (Edward II)
@Test public void test_Edward_II_1() throws IOException { DateFromRegnalDate dateFromRegnalDate = new DateFromRegnalDate(); RegnalYear regnalYear = dateFromRegnalDate.rangeForRegnalYear(1, "edw", 2); assertEquals("1307-07-08", regnalYear.getRegnalYearStartAsString()); assertEquals("1...
[ "public int getYears();", "public int getYear(){\n\t\treturn expYear;\n\t}", "public int calculateAgeYears();", "int getYearOfCommencement();", "private int[] yearGenerator(int year) {\r\n int birthYear = year - randomNumGenerator(120);\r\n while (((year - birthYear) < 13) || (year - birthYear...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
write your code here
public static void main(String[] args) { String txt="Arun is my name"; String pat="Arug"; char text[]=txt.toCharArray(); char pattern[]=pat.toCharArray(); int i=0; int j=0; if(subsearch(text,pattern,i,j)) System.out.println("Found"); else ...
[ "void stuffForYouToDo() {\n\t\t// Write your code here...\n\t\t\n\t\t\n\t\t\n\t}", "@Override\r\n\t\t\t\tvoid eval() {\r\n\r\n\t\t\t\t\t// YOUR CODE IN THIS SPACE\r\n\t\t\t\t}", "private static void EX5() {\n\t\t\r\n\t}", "@Override\n\tpublic void dosomethiing3() {\n\n\t}", "@Override\n }", "pu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }