query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
Insert a fix context into memory during a rule parse. FixVersion and MsgType are not permitted to be modified.
@Override public void putContext(String ctx, String value) { if (ctx.equals("8")) { throw new IllegalArgumentException( "Invalid context change. Can't change FIX Version."); } if (ctx.equals("35")) { throw new IllegalArgumentException( "Invalid context change. Can't change ...
[ "public void pushContext() {\n super.pushContext();\n if (fCurrentContext + 1 == fValidContext.length) {\n boolean[] contextarray = new boolean[fValidContext.length * 2];\n System.arraycopy(fValidContext, 0, contextarray, 0, fValidContext.length);\n fValidContext = con...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "entryRuleFunctionality" $ANTLR start "ruleFunctionality" InternalMyDsl.g:1162:1: ruleFunctionality : ( ( rule__Functionality__Group__0 ) ) ;
public final void ruleFunctionality() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalMyDsl.g:1166:2: ( ( ( rule__Functionality__Group__0 ) ) ) // InternalMyDsl.g:1167:2: ( ( rule__Functionality__Group__0 ) ) { ...
[ "public final void rule__Functionality__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:8106:1: ( ( 'functionality' ) )\n // InternalMyDsl.g:8107:1: ( 'functionality' )\n {\n //...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Deletes a contact with the passed in User and ID.
public static void deleteContact(String user, long id) { Contact contact = Contact.find().byId(id); UserInfo userInfo = UserInfo.find().where().eq("email", user).findUnique(); userInfo.getContacts().remove(contact); userInfo.save(); contact.setUserInfo(null); contact.delete(); }
[ "public void deleteContact(int id){\r\n\t\tObject record = hibernateTemplate.load(Contact.class, id);\r\n\t\thibernateTemplate.delete(record);\r\n\t}", "public void deleteContact(Contact contact){\n SQLiteDatabase db = this.getWritableDatabase();\n db.delete(TABLE_NAME, ID + \"=?\",new String[]{St...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This interface enables implementers to provide methodrelated parameters to the artifact capture framework.
public interface ArtifactParams { /** * Get get JUnit method description object for the current test class instance. * * @return JUnit method description object */ Description getDescription(); /** * Get the parameters associated with this test class instance. ...
[ "public interface ReleaseInterceptorAction extends MavenArgumentInterceptorAction {\n}", "public interface ArtifactVisitor extends Visitor {\n default void visit(Artifacts artifacts){\n artifacts.accept(this);\n }\n\n default void visit(Artifact artifact){\n artifact.accept(this);\n }\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get a movie from IMDb as a JSON object.
public JSONObject getMovieByIMDBID(String id) { final String url = this.buildURL(id, IMDB_INFO); String response = this.getResponse(url); return (response == null) ? null : parseStringToJSON(response); }
[ "private Movie getMovie() {\n Gson gson = new Gson();\n return gson.fromJson(result, Movie.class);\n }", "@GET(\"movie_details.json?with_cast=true&with_images=true\")\n Call<MovieDetailsResponse> getMovieDetails(@Query(\"movie_id\") String id);", "@GET\r\n @Path(\"read\")\r\n @Produces...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns all rows from the XFIFBANKDETL table that match the specified arbitrary SQL statement
public Xfifbankdetl[] findByDynamicWhere(String sql, Object[] sqlParams) throws XfifbankdetlDaoException;
[ "List<QueryRow> query( Workspace workspace,\n String language,\n String statement ) throws Exception;", "public Statement findStatement(XDI3Statement statementXri);", "public static List<List<String> > indexQueryRaw(String tableName, String condition) throws SQL...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructor de la clase IPDPaciente, sin parametros
public IPDPaciente() { }
[ "public IPDPaciente(String rutPaciente, String nombrePaciente, Date fechaInicio, Date fechaTermino, boolean esGes, boolean notificacionPacienteGES, boolean confirmado, boolean descartado, boolean exceptuado, String observacion, String codPatologias, String idRegistrador, Date fechaDeGuardado, int sec_id_paciente) {...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Iterative function to search a key in Trie. It returns true if the key is found in the Trie, else it returns false
public boolean search(String key) { System.out.print("Searching \"" + key + "\" : "); Trie curr = this; // do for each character of the key for (int i = 0; i < key.length(); i++) { // go to the next node curr = curr.children.get(key.charAt(i) - 'a');...
[ "boolean equalsTrie(T key);", "static boolean search(String key) {\n int lvl, idx;\n int n = key.length();\n TrieNode tn = root;\n\n for (lvl = 0; lvl < n; lvl++) {\n idx = key.charAt(lvl) - 'a';\n if (tn.children[idx] == null) return false...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks if the BinaryWord is the NullWord
public boolean isNullWord() { if (this.toDecimal() == 0) { return true; } else { return false; } }
[ "public boolean isNullOrUndef() {\n checkNotPolymorphicOrUnknown();\n return (flags & (NULL | UNDEF)) != 0\n && (flags & (NUM | STR | BOOL)) == 0 && num == null && str == null && object_labels == null && getters == null && setters == null;\n }", "@Override\n public ITypes orwith...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
get intervention by id rest api
@GetMapping("/interventions/{id}") public ResponseEntity<Intervention> getInterventionById(@PathVariable Long id) { Intervention intervention = interventionRepository.findById(id) .orElseThrow(() -> new ResourceNotFoundException("Intervention not exist with id :" + id)); return ResponseEntity.ok(intervention);...
[ "@GetMapping(\"/act-kodus/{id}\")\n @Timed\n public ResponseEntity<ActKodu> getActKodu(@PathVariable Long id) {\n log.debug(\"REST request to get ActKodu : {}\", id);\n ActKodu actKodu = actKoduRepository.findOne(id);\n return ResponseUtil.wrapOrNotFound(Optional.ofNullable(actKodu));\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets first nonloopback IP of the local machine. It walks through all interfaces and their IP addresses, and look for the first IP address that seems external. External IP is an IP which is not loopback. The returned IP is supposed to be a nonvirtual.
public static InetAddress getNonLoopbackNetworkAddress() { Map<String, InetAddress> addrMap = getNonLoopbackNetworkAddresses(); if (addrMap == null || addrMap.isEmpty()) return null; Iterator<Entry<String, InetAddress>> it = addrMap.entrySet().iterator(); if (!it.hasNext()) return null; Entry<String,...
[ "private static InetAddress getLocalHostLANAddress() throws UnknownHostException {\n\t\ttry {\n\t\t\tInetAddress candidateAddress = null;\n\t\t\t// Iterate all NICs (network interface cards)...\n\t\t\tfor (final Enumeration ifaces = NetworkInterface.getNetworkInterfaces(); ifaces.hasMoreElements();) {\n\t\t\t\tfina...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the current run mode for this motor
@Override public void setMode(RunMode mode) { }
[ "public void setMode(DcMotor.RunMode mode) {\n lDrive.setMode(mode);\n rDrive.setMode(mode);\n }", "void setMotorsMode(DcMotor.RunMode runMode);", "void setRunMode(TaskRunMode runMode);", "void changeDroneMode(@NonNull String mode);", "public void setMode(int mode);", "void setMode(int mo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
PRE: POST: Deletes all neighbours of this tweet
public void deleteAllNeighbours() { neighbours.clear(); }
[ "void deleteNeighbourFavorites(Neighbour neighbour);", "public void clearNeighbors();", "public void removeNeighbours(){\n\t\tgetNeighbours().removeAll(getNeighbours());\n\t}", "public void clearNeighbors() {\n nodeNeighbors.clear();\n }", "void removeFavNeighbour(Neighbour neighbour);", "@Test ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Updates the title of the custom level
@Override public void insertUpdate(DocumentEvent arg0) { changeLvlNameTitle(); }
[ "public void changeLvlNameTitle() {\n\t\tapplication.getLbLevelView().getLevelNameLbl()\n\t\t\t\t.setText(\"\\\"\" + textField.getText() + \"\\\"\");\n\t\tif (textField.getText().equals(\"\"))\n\t\t\tapplication.getLbLevelView().getLevelNameLbl().setText(\"New Level\");\n\t\tapplication.getLbLevelView().getSaveLbl(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Charges the arrow and updates the Direction the player faces.
private void chargeArrow() { if(bowCharge < MAX_CHARGE) { bowCharge += CHARGE_INCR; } //System.out.println("bowCharge " + bowCharge); currentArrow.updateAiming(mouseX, mouseY); if(currentArrow.getMovementAngle() >= 0) { curren...
[ "public void updateDirectionFace();", "public void winArrow(){\n hero.incrementArrow();\n }", "protected void refreshArrow() {\n\t\tif (this.isCorrectlySwiped())\n\t\t\tarrow.setTexture(arrowGreen);\n\t\telse\n\t\t\tarrow.setTexture(arrowGray);\n\t}", "public void addArrow(ProtocolArrow arrow, ENTIT...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the unique package code if the duration is greater than 0 from the last 120 days
public List<Integer> getUniqueNonZeroPkgCodes() { List<Integer> uniquePkgCodes = new ArrayList<>(); SQLiteDatabase db = DBHelper.getInstance(context).getReadableDatabase(); Cursor c = db.rawQuery("select distinct " + Constants.KEY_APP_CATEGORY + " from " + Constants.TABLE...
[ "io.dstore.values.TimestampValue getToCodeValidUntil();", "String getDurationUomId();", "io.dstore.values.TimestampValue getFromCodeValidUntil();", "private boolean codeExpired (String code) {\r\n\t\tint maxMin = 30;\r\n\t\tlong timeCreated = resetCodeToTimeCreated.get(code);\r\n\t\tdouble timeDiffMili = ((do...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Metodo que devuelve el RunTime rt, ejecucion de agentes
public static Runtime getRunTime() { return rt; }
[ "public void setRuntime(String rt) {\n runDate = rt;\n }", "public int getRunTime() { return runTime; }", "public static String _process_globals() throws Exception{\n_vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv5 = new anywheresoftware.b4a.objects.Timer();\n //BA.debugLineNum = 10;BA.debugLine=\"Priva...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a new Grammar rule with left as the LHS component, the right hand side components rhs and a weight (probability)
public GrammarRule(String left, ArrayList<String> rhs, double weight){ this.lhs = left; this.rhs = rhs; this.weight = weight; }
[ "private void new_rhs() {\n PRODUCTION p;\n\n p = new PRODUCTION();\n p.num = _num_productions++;\n p.lhs = _sp.lhs;\n p.next = _sp.lhs.productions;\n _sp.lhs.productions = p;\n _sp.rhs = p;\n }", "public void toGramm...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method Called when a Polyline is clicked. Presents a Marker between the two points of Polyline with the distance between them
@Override public void onPolylineClick(Polyline polyline) { LatLng place1 = polyline.getPoints().get(0); LatLng place2 = polyline.getPoints().get(1); LatLng mid_point = Utils.midPoint(place1.latitude, place1.longitude, place2.latitude, place2.longitude); double distance = Utils.di...
[ "private void handleMapClick(LatLng pointFromMap){\n if (MAP_MODE == MAP_MEASURE_LINE_MODE) {\n if (!contextualMenuShown)\n toolbar.startActionMode(myActionModeCallback);\n\n //for point\n Coordinate jtspoint = new Coordinate(pointFromMap.longitude, pointFromMa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets search minimum items per page.
int getSearchMinimumItemsPerPage() throws UnifyException;
[ "public Integer getMinItems() {\n\t\treturn minItems;\n\t}", "public int getMinimumItemsToShow() {\n return minimumItemsToShow;\n }", "int getFirstItemOnPage();", "public Integer minimumItems() {\n return this.minimumItems;\n }", "public int getRealPerPage();", "int getMaxFindingsPer...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Select checklist for Shop Smart activity
public void selectShopSmartChecklist(){ List<WebElement> goalsList = driver.findElements(chooseYourGoalsList); int size = goalsList.size(); for(int i = 0;i<size;i++) { goalsList.get(i).click(); Reporter.log("Clicked on the radio button to select different goals.."); } }
[ "public void selectShopSmartChecklist(){\n\t\t\t\tList<WebElement> goalsList\t= driver.findElements(chooseYourGoalsList);\n\t\t\t\tint size = goalsList.size();\n\t\t\t\tfor(int i = 0;i<size;i++)\n\t\t\t\t{\n\t\t\t\t\tgoalsList.get(i).click();\n\t\t\t\t\tReporter.log(\"Clicked on the radio button to select different...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Created by Shayla on 3/14/2015. Interface to access a list of all Kingdoms using the REST Api
public interface KingdomsInterface { @GET("/api/v1/kingdoms") public void kingdoms(Callback<List<Kingdom>> callback); }
[ "private void requestData() {\n\n RestAdapter adapter = new RestAdapter.Builder().setEndpoint(ENDPOINT).build();\n\n KingdomAPI api = adapter.create(KingdomAPI.class);\n\n api.getKingdoms(new Callback<List<KingdomInformation>>() {\n @Override\n public void success(List<Kin...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Makes a piece deletable
public void makeDeletable(final Node node, final Piece piece, final int row, final int column){ final LevelBuilderController lbc = this; node.setOnMouseClicked(new EventHandler<MouseEvent>(){ public void handle(MouseEvent event){ MouseButton button = event.getButton(); ...
[ "public void removePiece(){\n piece = null;\n }", "public void makesNotHere(){this.piece.unAffect();}", "protected boolean isPieceOfFurnitureDeletable(HomePieceOfFurniture piece) {\n return true;\n }", "public void delete()\n\t{\n\t\tgetPiece().delete(this);\n\t}", "public abstract void pieceU...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Remove a ResultListener from the list of ResultListeners. From javax.speech.recognition.Recognizer.
public void removeResultListener(ResultListener listener) { resultListeners.remove(listener); }
[ "public synchronized void removeResultTabListener(IResultTabListener lis)\n \t{\n \t\tif (lis == null)\n \t\t{\n \t\t\tthrow new IllegalArgumentException(\"IResultTabListener == null\");\n \t\t}\n \t\t_listeners.remove(IResultTabListener.class, lis);\n \t}", "void removeListener(ISearchResultListener l);", "pub...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Imports SalesPerson data to the database from a given CSV file
public static void importFromCSV(Connection conn, String filename) throws SQLException { String sql = "MERGE INTO salesperson(SALESPERSON_ID, FIRST_NAME, LAST_NAME, PHONE, EMAIL, DEALER_ID)" + " SELECT * FROM CSVREAD('" + filename + "')"; Statement stmt = conn.createS...
[ "public void loadCSVData() throws IOException, SQLException {\r\n //SQL statement to load csv information into data table\r\n String insertvaluesSQL = \"INSERT INTO data\"\r\n + \"(InvoiceNo, StockCode, Description, Quantity, InvoiceDate, UnitPrice, CustomerID, Country)\"\r\n + \" VALUES...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
For a given room, records the positions of the outside edges, walls, and floor.
private void getPositions() { for (int i = 0; i < this.height; i++) { for (int j = 0; j < this.width; j++) { Position pos = new Position(this.lowerLeft, j, i); // If top, bottom, left, or right row, it is a wall. if (isWall(j, i)) { ...
[ "private void calcRoom() {\n floorArea = Math.round(width * length * 10000.0)/10000.0;\n wallArea = Math.round(((width * 2) + (length * 2)) * height * 10000.0)/10000.0;\n volume = Math.round(width * length * height *1000000.0)/1000000.0;\n }", "private void setupRooms() {\n\t\tthis.listOfC...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieves the list model for canvas instructions
public static DefaultListModel<String> getCanvasListModel() { return canvasListModel; }
[ "public List<InstructionData> getInstructions();", "@Override\n public List<? extends Object> getModelList()\n {\n AttributeDescriptor.ComponentType compType = getComponentType(getOperator());\n DemoAttributeDescriptor attrDesc = (DemoAttributeDescriptor ) getAttribute();\n \n if (attrDe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set max worker thread number N, Seed workers should be set to N/5 by default, and others are Resource workers.
public void setMaxThreadNumber(int maxThreadNumber) { this.maxThreadNumber = maxThreadNumber; this.maxThreadNumberSeedWorker = maxThreadNumber / 5 == 0 ? 1 : maxThreadNumber / 5; this.maxThreadNumberResourceWorker = this.maxThreadNumber - this.maxThreadNumberSeedWorker; }
[ "public void setMaxThreadNumberSeedWorker(int maxThreadNumberSeedWorker) {\n\t\tif (maxThreadNumberSeedWorker < maxThreadNumber) {\n\t\t\tthis.maxThreadNumberResourceWorker = this.maxThreadNumber - this.maxThreadNumberSeedWorker;\n\t\t}\n\t}", "void setMaxThreads(int max);", "void setMaxMasterThreads(int max);"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
GET /tagrequests/:id : get the "id" tagRequest.
@GetMapping("/tag-requests/{id}") @Timed public ResponseEntity<TagRequestDTO> getTagRequest(@PathVariable Long id) { log.debug("REST request to get TagRequest : {}", id); TagRequestDTO tagRequestDTO = tagRequestService.findOne(id); return ResponseUtil.wrapOrNotFound(Optional.ofNullable(t...
[ "public Request getRequest(UUID id);", "@GetMapping(\"/mark-tags/{id}\")\n @Timed\n public ResponseEntity<Tag> getMarkTag(@PathVariable Long id) {\n log.debug(\"REST request to get Tag : {}\", id);\n Tag markTag = markTagRepository.findOne(id);\n return ResponseUtil.wrapOrNotFound(Optio...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
FIXME return DataManager.getInstance(context).getPrefManager().getLastNavFragment(context, VideoListFragment.TAG);
String getLastNavFragment(Context context) { return null; }
[ "private Fragment getLast() {\n Fragment last;\n switch (lastFragment) {\n case \"userHomeFragment\":\n last = userHomeFragment;\n break;\n case \"scheduleFragment\":\n last = scheduleFragment;\n break;\n case...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a validation builder for DigitalAgreement.
@Nonnull public static UBL22ValidatorBuilder <DigitalAgreementType> digitalAgreement () { return UBL22ValidatorBuilder.create (DigitalAgreementType.class); }
[ "@Nonnull\n public static UBL23WriterBuilder <DigitalAgreementType> digitalAgreement ()\n {\n return UBL23WriterBuilder.create (DigitalAgreementType.class);\n }", "@Nonnull public static UBL23ReaderBuilder<DigitalAgreementType> digitalAgreement(){return UBL23ReaderBuilder.create(DigitalAgreementType.class);...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
associate the ip to instance
public void associateIP(String instanceId, String instanceIp){ System.out.println("Now associate IP"); AssociateAddressRequest aar = new AssociateAddressRequest(); aar.setInstanceId(instanceId); aar.setPublicIp(instanceIp); ec2.associateAddress(aar); }
[ "public abstract String associatePredefinedAddress(NodeMetadata node, String ip);", "void createAvailableIp(K8sIpam ipam);", "K8sIpam allocatedIp(String ipamId);", "public void setIpAddress(InetAddress addr) \n\t{\n\t\tthis.ipAddress = addr;\n\t}", "void updateAvailableIp(K8sIpam ipam);", "public void set...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Internal support for 'void save (String)' and 'void save (String, ModelQuadMesh[])'. ModelQuadMesh uses this function to write vertices, normals, and connectivity indices to the file.
protected void save(RandomAccessFile kOut, ViewJProgressBar progress, int added, int total) throws IOException { Point3f kVertex = new Point3f(); Vector3f kNormal = new Vector3f(); // write vertices kOut.writeInt(vertex.length); byte[] bufferByte = new byte[vertex.length...
[ "public static void save(String kName, ModelQuadMesh[] akComponent, ViewJProgressBar progress) throws IOException {\r\n\r\n if (akComponent.length == 0) {\r\n return;\r\n }\r\n\r\n RandomAccessFile kOut = new RandomAccessFile(new File(kName), \"rw\");\r\n\r\n kOut.writeInt(2);...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Prepare to read BAM from a compressed stream (seekable)
private BAMFileReader2( final BlockCompressedInputStream compressedInputStream, final SeekableStream indexStream, final boolean eagerDecode, final boolean useAsynchronousIO, final String source, final ValidationStringency validationStringency, final SAMRecordFactory samRecordFa...
[ "BzipReader(File bzip) throws IOException {\n in = new CBZip2InputStream(new FileInputStream(bzip));\n }", "public LzoBufferedPositionedInputStream(InputStream in, long pos) {\n super(in, pos);\n\n if (in instanceof LzopInputStream) {\n lzopIn_ = (LzopInputStream)in;\n start_ = pos;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Teste para adicionar na posicao 3
@Test public void testAddPos3() throws BozoException{ p = new Placar(); p.add(3, new int[] {1,2,6,4,5}); assertEquals(0,p.getScore()); }
[ "@Test\r\n\tpublic void testAddPos8_3() throws BozoException{\r\n\t\tp = new Placar();\r\n\t\tp.add(8, new int[] {1,6,6,6,5});\r\n\t\tassertEquals(0,p.getScore());\r\n\t}", "@Test\r\n\tpublic void testAddPos4() throws BozoException{\r\n\t\tp = new Placar();\r\n\t\tp.add(4, new int[] {5,2,3,4,5});\r\n\t\tassertEqu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Unsets the "gibbmt" element
public void unsetGibbmt() { synchronized (monitor()) { check_orphaned(); get_store().remove_element(GIBBMT$4, 0); } }
[ "public void unsetGibbsq()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(GIBBSQ$2, 0);\r\n }\r\n }", "public void unsetGenbank()\r\n {\r\n synchronized (monitor())\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Just selects an item. Has OK status if no runtime exceptions occurred The following method tests are to be completed successfully before : addItems : to have some items
public void _selectItem() { requiredMethod("addItems()") ; boolean result = true ; oObj.selectItem("Item3", true) ; tRes.tested("selectItem()", result) ; }
[ "@Test\n\tpublic void addItemTest() {\n\t\tvendingMachine.addItem(item,VendingMachine.A_CODE);\n\t\tassertEquals(item, vendingMachine.getItem(VendingMachine.A_CODE));\n\t}", "@Test\n void test_addItemToListIfStatusMatchesForComplete() {\n // set values to complete\n setListOfItemsToComplete();\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the "References" element
void setReferences(x0101.oecdStandardAuditFileTaxPT1.ReferencesDocument.References references);
[ "public void setReferences(org.purl.dc.elements.x11.SimpleLiteral references)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.purl.dc.elements.x11.SimpleLiteral target = null;\r\n target = (org.purl.dc.elements.x11.SimpleLiteral)get_store().fi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "entryRuleForLoopRule" $ANTLR start "ruleForLoopRule" InternalUclid.g:3581:1: ruleForLoopRule returns [EObject current=null] : (otherlv_0= 'for' ( (lv_iterator_1_0= ruleVarDecl ) ) otherlv_2= 'in' otherlv_3= 'range' otherlv_4= '(' ( (lv_lb_5_0= ruleConstRule ) ) otherlv_6= ',' ( (lv_ub_7_0= ruleConstRule ) )...
public final EObject ruleForLoopRule() throws RecognitionException { EObject current = null; Token otherlv_0=null; Token otherlv_2=null; Token otherlv_3=null; Token otherlv_4=null; Token otherlv_6=null; Token otherlv_8=null; EObject lv_iterator_1_0 = null...
[ "public final EObject entryRuleForLoopRule() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleForLoopRule = null;\n\n\n try {\n // InternalUclid.g:3574:52: (iv_ruleForLoopRule= ruleForLoopRule EOF )\n // InternalUclid.g:3575:2: iv_ruleForLoopRule=...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ public UiActionManager getUiActionManager(RetailscmUserContext userContext, String pageId, String code, String icon, String title, int displayOrder, String brief, String imageUrl, String linkToUrl, String extraData ,String [] tokensExpr) throws Exception;
public Page addUiAction(RetailscmUserContext userContext, String pageId, String code, String icon, String title, int displayOrder, String brief, String imageUrl, String linkToUrl, String extraData , String [] tokensExpr) throws Exception;
[ "public GenericForm addFormAction(BcexUserContext userContext, String genericFormId, String label, String localeKey, String actionKey, String level, String url , String [] tokensExpr) throws Exception;", "public UserApp addQuickLink(DemodataUserContext userContext, String userAppId, String name, String icon, S...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
added in order to mutate the customer's last name updates the last name of the customer to a new name does not have implementation but will be used when the application has a screen to edit customer's files
public void changeLastName(String newName) throws IOException { // update the customer's last name instance variable this.lastName = newName; // write the changes to the customer's file this.write(); // update the custome's user name this.updateUserName(); }
[ "private void updateUserName() {\n\t\t// if the customer has a first and last name update their username to be\n\t\t// the concatenation of their first and last name (in lower case)\n\t\t// else, make their username their first name\n\t\tif (!this.lastName.equals(Customer.EMPTY_LAST_NAME)) {\n\t\t\tthis.userName = ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Performs domainmatch as defined by the RFC2965. Host A's name domainmatches host B's if their host name strings stringcompare equal; or A is a HDN string and has the form NB, where N is a nonempty name string, B has the form .B', and B' is a HDN string. (So, x.y.com domainmatches .Y.com but not Y.com.)
public boolean domainMatch(final String host, final String domain) { final boolean match = host.equals(domain) || (domain.startsWith(".") && host.endsWith(domain)); return match; }
[ "public void testDomainMatchesOnLocalAddresses() {\n assertFalse(HttpCookie.domainMatches(\"localhost\", \"localhost\"));\n assertFalse(HttpCookie.domainMatches(\"b\", \"b\"));\n }", "private boolean isValidDomain(String domain) {\r\n\t\tif (domain.length() >= 3) {\r\n\t\t\tString[] tokens = doma...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ ensure Account.GID == GID
public void setGID(String GID) { String[] emailParts = this.GID.split("@"); //Recover the original file name String fileName = this.name + "_" + emailParts[0] + "_" + emailParts[1]; File f = new File(fileName); if (f.exists()) { f.delete(); } this.GID = GID; saveAccount(); }
[ "Integer getGCSGID();", "public long getGid() {\n return gid_;\n }", "AccountID generate();", "public void setGID(java.lang.Integer GID) {\n\t\t this.GID = GID;\n\t }", "public void setGid(Long gid) {\n this.gid = gid;\n }", "private void requireNovel(Account account) {\n if (accounts...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Start or stop the tracking
private void handleStartButton() { // Check if service is running if (!ServiceDetectionHelper.isServiceRunning(getApplicationContext(), LocationService.class)) { // Start was pressed // Find a reserved track Track track; try { track = fin...
[ "public void startTracking() {\n if (mTracker == null) {\n GoogleAnalytics googleAnalytics = GoogleAnalytics.getInstance(this);\n // Get tracker\n mTracker = googleAnalytics.newTracker(R.xml.track_config);\n // Enable tracking of Activities\n googleAnaly...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test imports CSV file into a table on not affinity node and checks the created entries using SELECT statement.
@Test public void testBulkLoadToNonAffinityNode() throws Exception { IgniteEx client = startClientGrid(getConfiguration("client")); try (Connection con = connect(client, null)) { con.setSchema('"' + DEFAULT_CACHE_NAME + '"'); try (Statement stmt = con.createStatement()) { ...
[ "@Override\n\tpublic boolean importCSVAsTable(String file, String tableName){\n\t\tString command = \"DROP TABLE \"+ tableName +\" IF EXISTS; CREATE TABLE \"+ tableName +\" AS SELECT * FROM CSVREAD('\" + file + \"');\";\n\t\tDM.addNode(new TableNode(tableName));\n\t\tif(!IDBCutoff){\n\t\treturn DB.arbitrarySQL(comm...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Delete the feedback on the NLU Domain Version.
public Future<Void> deleteLanguageunderstandingDomainFeedbackFeedbackIdAsync(DeleteLanguageunderstandingDomainFeedbackFeedbackIdRequest request, final AsyncApiCallback<Void> callback) { try { final SettableFuture<Void> future = SettableFuture.create(); final boolean shouldThrowErrors = pcapiClient.getSh...
[ "Feedback deleteFeedback(long id);", "public String delete() {\r\n \tcm.detach(competency);\r\n saveMessage(getText(\"competency.deleted\"));\r\n\r\n return SUCCESS;\r\n }", "void deleteFeedbackEntry(String feedbackID) throws FeedbackManagementException;", "public void deleteLastFeedback()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates new form VLogin
public VLogin() { initComponents(); }
[ "public new_user_login() {\n initComponents();\n }", "public V_Login() {\n initComponents();\n }", "public String createFromAdmin() {\n try {\n LogInGateway login = new LogInGateway(username, password, admin);\n if (!username.isEmpty()) {\n login.c...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__Right__AttributeWhereRightAssignment_0_4" $ANTLR start "rule__Right__ValueAssignment_1" ../emfviews.dsl.ui/srcgen/emfviews/dsl/ui/contentassist/antlr/internal/InternalSqlview.g:2818:1: rule__Right__ValueAssignment_1 : ( ruleEString ) ;
public final void rule__Right__ValueAssignment_1() throws RecognitionException { int stackSize = keepStackSize(); try { // ../emfviews.dsl.ui/src-gen/emfviews/dsl/ui/contentassist/antlr/internal/InternalSqlview.g:2822:1: ( ( ruleEString ) ) // ../emfviews.dsl.ui/s...
[ "public final void rule__Annotation__ValueAssignment_0_2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalReflex.g:9832:1: ( ( RULE_STRING ) )\n // InternalReflex.g:9833:2: ( RULE_STRING )\n {\n // Int...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
needs to be big to account for error / Constructs a Balloon object using information provided by its subclasses, including the number of lives the balloon has, the money the user will earn from popping the Balloon, its image, and its coordinates in pixels. Parameters: lives = number of lives the balloon has moneyEarned...
public Balloon(int lives, int moneyEarned, Image bloon, double xCoordinate, double yCoordinate) { this.lives = lives; this.moneyEarned = moneyEarned; this.bloon = bloon; transformedBloon = new ImageView(bloon); transformedBloon.setX(xCoordinate); transformedBloon.setY(yCoordinate);; ...
[ "private void createObjectives() {\n\t\tint height = ballRadius + BALL_SEPARATION; \n\t\tint widthIterator = BALL_SEPARATION + ballRadius;\n\t\tint nextBallPosition = BALL_SEPARATION + ballRadius * 2;\n\t\tint neededSpace = BALL_SEPARATION * 2 + ballRadius * 3; \n\t\tboolean keepPainting = true;\n\t\tint iterator =...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the itemsList value for this DoGetItemsListResponse.
public ItemsListType[] getItemsList() { return itemsList; }
[ "public List<Item> getItems() {\n\t\treturn Collections.unmodifiableList(items);\n\t}", "public List<ListItem> getAllListItems() {\n return listItems;\n }", "public List<ItemDTO> getItems() {\r\n\t\tList<ItemDTO> returnItemList = new ArrayList<>();\r\n\t\tfor(Item item : itemList){\r\n\t\t\treturnItem...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
populatePagedListHolder populates the Spring PagedListHolder class with the list of news stories in order to handle the news story pagination. Retrieves the request object 'page' to determine which direction the navigation of the pages should be processed.
private PagedListHolder<NewsArticle> populatePagedListHolder(final HttpServletRequest request) { @SuppressWarnings("unchecked") PagedListHolder<NewsArticle> pagedListHolder = (PagedListHolder<NewsArticle>) request.getSession().getAttribute(ARTICLE_LIST); // If first time on page...
[ "@RequestMapping(value = \"/news\", method = RequestMethod.GET)\n public String viewNewsArticles(final HttpServletRequest request, final HttpServletResponse response, final Model model) {\n PagedListHolder<NewsArticle> pagedListHolder = populatePagedListHolder(request);\n\n request.getSession().set...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the flashcard list
ReadOnlyFlashcardList getFlashcardList();
[ "public List<Flashcard> readAllFlashcardsList();", "public FlashcardList getFlashcardList() {\n return flashcardList;\n }", "public List<Flashcard> getFlashcards() {\n return flashcards;\n }", "public ArrayList<FlashCard> getFlashCards()\n\t{\n\t\tfor(int i = 0; i < 10; i++)\n\t\t{\n\t\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This test does the following : 1)Perform put operation 2)Verify entry evicted is LIFO Entry and is not present in vm
@Test public void testLIFOEntryEviction() { try { assertNotNull(cache); LocalRegion rgn = (LocalRegion) cache.getRegion(SEPARATOR + regionName); assertNotNull(rgn); assertEquals("Region is not properly cleared ", 0, rgn.size()); assertTrue("Entry count not 0 ", new Long(0).equals(li...
[ "@Test\n public void testGetEvictedEntry() throws EntryNotFoundException {\n hasBeenNotified = false;\n diskProps.setDiskDirs(dirs);\n diskProps.setPersistBackup(false);\n diskProps.setRolling(false);\n diskProps.setCompactionThreshold(100);\n diskProps.setAllowForceCompaction(true);\n diskPro...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__IfStmt__Group__1__Impl" $ANTLR start "rule__IfStmt__Group__2" InternalMGPL.g:2605:1: rule__IfStmt__Group__2 : rule__IfStmt__Group__2__Impl rule__IfStmt__Group__3 ;
public final void rule__IfStmt__Group__2() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalMGPL.g:2609:1: ( rule__IfStmt__Group__2__Impl rule__IfStmt__Group__3 ) // InternalMGPL.g:2610:2: rule__IfStmt__Group__2__Impl rule__IfStmt__Grou...
[ "public final void rule__IfStmt__Group__2() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:7889:1: ( rule__IfStmt__Group__2__Impl rule__IfStmt__Group__3 )\r\n // InternalGo.g:7890:2: rule__IfStmt__Group__2__I...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
multiply all values by v
public void mulInside(double v){ for (int i = 0 ; i < val.length; i++){ val[i] *= v; } }
[ "public void mulOrigin(double v){\n\t\tmulColumn(v,getColumns());\n\t}", "public final Tuple4i mulX(int v) {\n\t\tthis.values[roTrick + 0] *= v;\n\n\t\tthis.isDirty[0] = true;\n\n\t\treturn (this);\n\t}", "public final Tuple4i mulW(int v) {\n\t\tthis.values[roTrick + 3] *= v;\n\n\t\tthis.isDirty[0] = true;\n\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO: Modify this method to compute the same reciprocal sum as seqArraySum, but use two tasks running in parallel under the Java Fork Join framework. You may assume that the length of the input array is evenly divisible by 2.
protected static double parArraySum(double[] X) { long startTime = System.nanoTime(); assert X.length % 2 == 0; sum1 = 0; sum2 = 0; // System.setProperty("java.util.concurrent.ForkJoinPool.common.parallelism", "4"); // ForkJoinPool pool = new ForkJoinPool(4); fini...
[ "static long sumArray(int[] array) {\n return ForkJoinPool.commonPool().invoke(new SumTask(array, 0, array.length));\n }", "protected static double parManyTaskArraySum(final double[] input,\n final int numTasks) {\n sum = 0;\n\n// final int ch...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the grave type.
public void setType(GraveType type) { this.type = type; }
[ "public void setType(Type t) {\n type = t;\n }", "public void setType(Object type) {\n this.type = type;\n }", "@JsonProperty(\"featuresType\")\n public void setType(GarageFeatures.Type type) {\n this.type = type;\n }", "public void setCurrentType(){\n \tsetType(\"terse\");...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test the performance of KvStoreHub
@Test public void pressureTest() throws Exception { int itemsCount = 100_000; KvStoreHub hub = new KvStoreHub(new Configuration()); Random random = new Random(); Stopwatch stopwatch = Stopwatch.createStarted(); for (int i = 0; i < itemsCount; i++) if (random.nextInt()...
[ "public void testPerformance() {\n \t}", "@Test\n public void bandwidthUsedTest() {\n // TODO: test bandwidthUsed\n }", "public void testGenerateBrokerAndVirtualhostStatistics() throws Exception\n {\n sendUsing(_test, 5, 200);\n Thread.sleep(1000);\n \n for (ManagedCo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
If the expand option &x60;issuesstatus&x60; is used, returns the count of issues in this version for each of the status categories to do, in progress, done, and unmapped. The unmapped property contains a count of issues with a status other than to do, in progress, and done.
@Schema(description = "If the expand option `issuesstatus` is used, returns the count of issues in this version for each of the status categories *to do*, *in progress*, *done*, and *unmapped*. The *unmapped* property contains a count of issues with a status other than *to do*, *in progress*, and *done*.") public All...
[ "public java.util.Map<String, Integer> getStatusCounts() {\n return statusCounts;\n }", "public int countByStatus(int status);", "public int getStatuscount() {\n return statuscount;\n }", "int getIndividualBatchDeleteStatusesCount();", "public Map<String, Long> findIssues() {\n Se...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Unsets the "gradFill" element
public void unsetGradFill() { synchronized (monitor()) { check_orphaned(); get_store().remove_element(GRADFILL$4, 0); } }
[ "public void unsetSolidFill()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(SOLIDFILL$2, 0);\n }\n }", "void unsetCantGradient();", "public void unsetGrpFill()\n {\n synchronized (monitor())\n {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Geter de la hora
public String getHora() { return hora; }
[ "public String dar_hora(){\n Date date = new Date();\n DateFormat dateFormat = new SimpleDateFormat(\"HH:mm:ss\");\n return dateFormat.format(date).toString();\n }", "private int getHoraAtual()\r\n\t{\n\t\tGregorianCalendar momento = new GregorianCalendar();\r\n\t\t//pega a hora atual\r\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This is called when the view activate, either manually or automatically The Developer may hide their application UI in in this callback, and take other appropriate actions to allow `ARCoachingOverlayView` to take over the full screen.
@Generated @IsOptional @Selector("coachingOverlayViewWillActivate:") default void coachingOverlayViewWillActivate(@NotNull ARCoachingOverlayView coachingOverlayView) { throw new java.lang.UnsupportedOperationException(); }
[ "protected void onScreenActivate() {\r\n }", "public void onViewActivated();", "public void activateView(){\r\n\t\tif(SwingUtilities.isEventDispatchThread()){\r\n\t\t\tgetActiveWindow().getPage().showView(getId());\r\n\t\t}\r\n\t\telse{\r\n\t\t\tSwingUtilities.invokeLater(new Runnable(){\r\n\t\t\t\t@Over...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Listing RequestDiet with status PENDING ====================================================================================
@RequestMapping(value = "/myListPending", method = RequestMethod.GET) public ModelAndView listRequestDietsPending() { ModelAndView result; Collection<RequestDiet> requestDiets; Customer customer; Boolean owner; Boolean owner2; customer = this.customerService.findByPrincipal(); requestDiets = this.reques...
[ "public List getPendingRequests(PendingRequest pendingRequest);", "public List<String> getAllPendingRequests() {\r\n requestList = userRequest.getPendingList(reqStatus.PENDING);\r\n List<String> reqDetailsList = new ArrayList<>();\r\n if (requestList.size() > 0) {\r\n for (ENTReque...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Resets the value of this MyDouble to val.
public void setValue(double val) { this.val = val; }
[ "public void setValue(MyDouble val) {\n this.val = val.getValue();\n }", "public MyDouble(double val) {\n this.setValue(val);\n }", "public void setDouble1(double val) {\n\tx = val;\n }", "void setDouble(double val);", "public void setDouble2(double val) {\n\ty = val;\n }", "publ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Factory method for creating a new instance of ShoppingFilterFragment
public static ShoppingFilterFragment newInstance(TicketType type, String serviceIdentifier, boolean loadDefault) { ShoppingFilterFragment filterFragment = new ShoppingFilterFragment(); Bundle b = new Bundle(); b.putSerializable(ARG_TICKET_TYPE, type); b.putString(ARG_SERVICE_IDENTIFIER, ...
[ "public static CategoryFragment newInstance() {\n CategoryFragment categoryFragment = new CategoryFragment();\n return categoryFragment;\n\n }", "private static SearchFragmentBuilder getFragmentBuilder(Filter filter) {\n SearchFragmentBuilder builder = (SearchFragmentBuilder) FRAGMENTBUILD...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sends a message to a Jabber contact.
void sendMessage (JabberName name, String message, ResultListener listener);
[ "void sendMessage(User gcn, User contactGCN, String message);", "public void sendMsgToPlayer ( ABSMessage m );", "void sendMessage(@Nonnull Component component, @Nonnull MessagePosition position);", "void sendChatMessage(@NonNull Component message, @Nullable String permission);", "public void sendSimpleMess...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add a value to property timeRequired.
Builder addTimeRequired(Duration value);
[ "Builder addTimeRequired(String value);", "public void addTime(java.lang.String value) {\r\n\t\tBase.add(this.model, this.getResource(), TIME, value);\r\n\t}", "void timeField(String name, boolean isDefined, Date value);", "public void addTime( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.add(this...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Finds the distance between the two celestial bodies provided. Solution is not perfect as it measures distance relative to the center object.
public double getDistance(String body1, String body2) { double[] distance1 = distanceToRoot(rootCelestialBody, body1); double[] distance2 = distanceToRoot(rootCelestialBody, body2); double[] totalDistance = new double[2]; totalDistance[0] = distance1[0] + distance2[0]; totalDistance[1] = distance1[...
[ "public double distanceBetween(CelestialBody celestialbody) {\n\t\tdouble d;\n\t\td=MyMath.distance(this.getPosition().getX(), celestialbody.getPosition().getX(), this.getPosition().getY(),\n\t\t\t\tcelestialbody.getPosition().getY());\n\t\treturn d;\n\t\t\n\t}", "private double calculateDistance(Celestial c) {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return the property postalCodes.houseHolds.select of the queries.properties file
String postalCodesHouseHoldsSelect();
[ "String postalCodesOnlySelect();", "public String getCodePostal(){\n\t\treturn code_postal; \n\t}", "String postalCodesDistanceSelect();", "String getCodePostal();", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getPostalCodeInternal() {\n return (java.lang.String)__getInterna...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get one ujob by id.
@Transactional(readOnly = true) public Optional<UjobDTO> findOne(Long id) { log.debug("Request to get Ujob : {}", id); return ujobRepository.findById(id).map(ujobMapper::toDto); }
[ "MJob findJob(long id);", "public Job getJob(int id) {\n Job job = new Job();\n \n Connection conn = null;\n Statement db = null;\n \n try {\n // Register JDBC driver\n Class.forName(JDBC_DRIVER);\n \n // Open a connection\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column books.b
public String getB() { return b; }
[ "public BookBean retrieveBook(String bid) throws SQLException {\r\n\t\tString query = \"select * from BOOK where bid='\" + bid + \"'\";\t\t\r\n\t\tBookBean book = null;\r\n\t\tPreparedStatement p = con.prepareStatement(query);\t\t\r\n\t\tResultSet r = p.executeQuery();\r\n\t\t\r\n\t\twhile(r.next()){\r\n\t\t\tStrin...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by Apache iBATIS ibator. This method returns the value of the database column KMORDER.INVOICE_DICTIONARY.INVOICE_DICTIONARY_ID
public long getInvoice_dictionary_id() { return invoice_dictionary_id; }
[ "public void setInvoice_dictionary_id(long invoice_dictionary_id) {\r\n this.invoice_dictionary_id = invoice_dictionary_id;\r\n }", "public Long getInvoiceDictionaryKey() {\r\n return invoiceDictionaryKey;\r\n }", "public String getInvoiceDictionaryCode() {\r\n return invoiceDictionaryCode;\r\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the 'verified' field.
public void setVerified(boolean value) { this.verified = value; }
[ "public void setVerified(boolean value) {\n this.verified = value;\n }", "public org.acalio.dm.model.avro.YChannel.Builder setVerified(boolean value) {\n validate(fields()[4], value);\n this.verified = value;\n fieldSetFlags()[4] = true;\n return this;\n }", "public void setIsVe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the siac d soggetto statos.
public void setSiacDSoggettoStatos(List<SiacDSoggettoStato> siacDSoggettoStatos) { this.siacDSoggettoStatos = siacDSoggettoStatos; }
[ "public void setStato(String stato) {\n this.stato = stato; }", "public void setStato(java.lang.String stato) {\n\t\t_myLibrary.setStato(stato);\n\t}", "public void setStat(Integer stat) {\r\n this.stat = stat;\r\n }", "public void setStat(Integer stat) {\n this.stat = stat;\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column PMSTRADE.DEALER
public BigDecimal getDEALER() { return DEALER; }
[ "public java.lang.Long getDEALID() {\n return DEAL_ID;\n }", "public java.lang.Long getDEALID() {\n return DEAL_ID;\n }", "public BigDecimal getDEPT() {\r\n return DEPT;\r\n }", "public BigDecimal getDEPT_CODE() {\r\n return DEPT_CODE;\r\n }", "public Date getDEAL_DATE()\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
String inputWRL = "c:\\__vrml\\2006_01_16\\problem1\\problem1.wrl";
public void run(){ String s = inputWRL; //s = "C:\\__vrml\\test.wrl"; //s = "C:/__vrml/IT_orig.wrl"; s = "C:/__vrml/7.wrl"; //s = "C:/__vrml/default.wrl"; //s = "C:/new/colors.wrl"; //s = "C:\\__vrml\\3.wrl"; //outputWRL = "C:\\__vrml\\2006_01_16\\CT_res_2.wrl"; if (s != nul...
[ "public abstract String read_wstring();", "java.lang.String getInputPath();", "private static String getUserFileInput() {\n System.out.print(\"Enter File Path(e.g \\\"words.txt\\\"): \");\n return TextIO.getln().strip();\n }", "private String getPath(String theInput) {\r\n\t\tString[] fi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Override of PostFormRequest's toString that adds output of the encryption method
@Override public String toString() { System.out.print(super.toString()); System.out.print("This form was encrypted using: " + encryption); return ""; }
[ "@Override\n\tpublic String toString() {\n\t\tString ivString = Base64.ENCODER.encodeToString(this.iv);\n\t\tString cipherTextString = Base64.ENCODER.encodeToString(this.cipherText);\n\t\tString macString = Base64.ENCODER.encodeToString(this.mac);\n\t\treturn ivString + \":\" + macString + \":\" + cipherTextString;...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the create date of this changeset entry.
@Override public void setCreateDate(Date createDate) { _changesetEntry.setCreateDate(createDate); }
[ "void setCreatedDate(D creationDate);", "@Override\n public void setCreateDate(Date createDate);", "void setCreateDate(final Date creationDate);", "public void setCreateDate(String value) {\n this.createDate = value;\n }", "@Override\n\tpublic void setCreateDate(java.util.Date createDate) {\n\t\t_rul...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Assign dashboard viewers and editors.
@Test(groups = "wso2.ds.dashboard", description = "Assigning dashboard view and edit permission", dependsOnMethods = "testAddUserAssignRoles") public void testAddDashboardAndAssignRolesBySetting() throws XPathExpressionException, MalformedURLException, InterruptedException { addLoginRole(USERNAM...
[ "private void manageAssignees()\n\t{\n\t\tint id = DatabaseManager.getInstance().getIssueID(currentTitle);\n\t\t@SuppressWarnings(\"unused\")\n\t\tManageAssigneesController manageAssigneesController = new ManageAssigneesController(id);\n\t}", "private void createViewers() {\n\t\tMenuItem elementViewer = new MenuI...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a SwengflixProvider using the default databases.
public SwengflixProvider() { // the EU database is geographically closer so its delay is lower this.dbs = Arrays.asList( new Database(VideoDataEU.allVideoData(), 3_000), new Database(VideoDataUS.allVideoData(), 5_000) ); }
[ "public SwengflixProvider(Database... dbs) {\n this.dbs = Arrays.asList(dbs);\n }", "@BeforeClass\n public static void createProvider() {\n provider = new StoreProvider();\n }", "Provider createProvider();", "public IDatabaseProvider getDatabaseProvider();", "DatabaseClient newStaging...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the HTMLformatted text of the message.
public String getMessageTextAsHTML();
[ "public String getMessageText();", "public String getMessageText() {\r\n\t\treturn txtAreaWriteMessage.getText();\r\n\t}", "String getFormattedMessage();", "String getMsgText();", "public String getMessageText()\r\n {\r\n return messageText;\r\n }", "public String getFormattedMessage();", "...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the line to start.
public int getLineToStart() { return this.lineToStart; }
[ "public String getLineStart() {\n return lineStart;\n }", "public int getStartLine() {\r\n return this.startLine;\r\n }", "public int getStartLine() {\r\n \r\n return startLine;\r\n }", "public int getStartLine() {\n\t\treturn startLine;\n\t}", "int getStartLineNumber();", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ This can be solved in three ways 1.Use hashMap with extra space complexity of O(n) 2.Use Math to do it in O(n) time and O(1) space, but difficult to find more than one missing numbers and duplicates 3.Use swap sort(only when you are allowed to modify input array),time:O(n), sapce:O(1) swap sort algo: >modify the arra...
private static void findMissingAndDuplicateNumberFrom1toN(int[] input) { int len = input.length; int i = 0; while (i < len) { //if its already in correct place if (input[i] == i + 1) { i++; continue; } else if (input[i] == input[input[i] - 1]) { //if the elment to be swapped with are same i+...
[ "public int removeDuplicatesInSortedArray(int[] a) {\n\n int j = 0;\n for (int i = 1 ; i < a.length ; i++) {\n if (a[j] != a[i]) {\n a[++j] = a[i];\n }\n }\n\n return j+1;\n }", "private static int findDuplicateNumber(int[] arr) {\n int du...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Purpose: If the user clicks the upload button, open the file explorer and let them search for the file to upload to the script table
@FXML void ClickUploadBtn(ActionEvent event) throws IOException { FileChooser fileExplorer = new FileChooser(); File file = fileExplorer.showOpenDialog(null); //Open a file explorer and ask user to select a file if(file != null && file.exists()) { UploadScr...
[ "public void pressOnUploadBtn() throws IOException {\n FileChooser fileChooser = new FileChooser();\n fileChooser.setTitle(\"Open File\");\n File file = fileChooser.showOpenDialog(this);\n uploadFile(file);\n }", "public void openFileDialog() {\n\tswitch(buttonAction) {\n\t case SE...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieves a random dog. The random dog may be a static image, gif or video.
Optional<Media> getRandomDog();
[ "@Override\n public void getDogImg() {\n RestApiAdapter restApiAdapter = new RestApiAdapter();\n Gson gson = restApiAdapter.breedsImg();\n EndPointsApi endPointsApi = restApiAdapter.setApiConnection(gson);\n\n Call<DogImgResponse> call = endPointsApi.getRandomImgByBreed( breed.getBree...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Construct a new Cipher using a given codingSystem.
public VigenereCipher(final CodingSystem inCodingSystem) { this.codingSystem = (BaseUtils) inCodingSystem; }
[ "public void CreateCipher() {\n String key = \"IWantToPassTAP12\"; // 128 bit key\n aesKey = new javax.crypto.spec.SecretKeySpec(key.getBytes(), \"AES\");\n try {\n this.cipher = Cipher.getInstance(\"AES\");\n } catch (Exception e) {\n e.printStackTrace();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Cancels a scheduled SMS message
@Test public void messagesScheduleMessageidDeleteTest() throws ApiException { String messageid = null; CancelledMessageResponse response = api.messagesScheduleMessageidDelete(messageid); // TODO: test validations }
[ "public void cancelMessage(MessageEdit edit);", "void cancel(String sendId);", "@Override\n public void cancelMsg() {\n System.out.println(\"Transaction has been cancelled !!\");\n }", "@Override\r\n public void cancelMsg() {\n System.out.println(\"Transaction has been cancelled for gas...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Use LogionRewardInfo.newBuilder() to construct.
private LogionRewardInfo(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); }
[ "private C_GetReward(Builder builder) {\n super(builder);\n }", "private InstanceGetStarRewardRt(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private C_GetRewardList(Builder builder) {\n super(builder);\n }", "private C_GetFristPayReward(Builder bui...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the number of content stale storages.
void setNumStaleStorages(int numStaleStorages) { this.numStaleStorages = numStaleStorages; }
[ "public int getNumStaleStorages() {\n return numStaleStorages;\n }", "void setNumStaleNodes(int numStaleNodes) {\n this.numStaleNodes = numStaleNodes;\n }", "public int getNumStaleDatanodes() {\n return this.staleDatanodes;\n }", "public void incrMetaCacheNumClearServer() {\n metaCacheNumClearS...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the domain of the current NetworkModelToCsvMapper.
public String getDomain() { if (this.domainCluster==null || this.domainCluster.getDomain()==null || this.domainCluster.getDomain().isEmpty()) { return null; } return this.domainCluster.getDomain(); }
[ "@Override\r\n\tpublic double[] getDomain() {\r\n\t\treturn domain;\r\n\t}", "public List<String> domain() {\n return this.innerProperties() == null ? null : this.innerProperties().domain();\n }", "public String getDomain() {\n return getProperty(DOMAIN);\n }", "public Property rdfsDomain(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Delete all values in the given prefix row key which satisfies the predicate
public void deleteAll(MDSKey id, @Nullable Predicate<MDSKey> filter) { byte[] prefix = id.getKey(); byte[] stopKey = Bytes.stopKeyForPrefix(prefix); try { try (Scanner scan = table.scan(prefix, stopKey)) { Row next; while ((next = scan.next()) != null) { String columnValue =...
[ "public static final void removeKeysWithPrefix(String prefix) throws Exception {\n final Scanner scanner = client.newScanner(METADATA_TABLE_BYTES);\n scanner.setFamily(DEFAULT_CF_BYTES);\n scanner.setQualifier(DEFAULT_COL_BYTES);\n scanner.setKeyRegexp(\"^\" + prefix);\n\n ArrayLi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generalpurpose preprocessing hook that can be overridden as required by subclasses. Return true if you want standard processing to continue, or false if the response has already been completed. The default implementation does nothing.
protected boolean processPreprocess(HttpServletRequest request, HttpServletResponse response) { return (true); }
[ "public boolean preExecute() throws Exception{\n if (!parseHeaderPhase.getAndSet(true)){\n processorTask = asyncProcessorTask.getProcessorTask();\n if ( processorTask == null ){\n throw new IllegalStateException(\"Null ProcessorTask\");\n }\n process...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Represents a capability of the system. There's no limit to what a capability can be. It may represent a single plugin, a collection of plugins, OSGI bundles, Jars, Samples, anything which can be managed and installed into the system atomically. Capabilities are supplied by ICapabilityProvider instances. TODO: There's p...
public interface ICapability { /** * ID Representing this capability. This must be unique by provider * @return */ String getId(); /** * Provides a description of the capability. * * @param locale * @return */ String getDescription( Locale locale ); /** * Checks whether or not th...
[ "public interface ICapabilityProvider {\n\n /**\n * Unique ID for this Provider\n *\n * @return\n */\n String getId();\n\n /**\n * Get a list of Capability IDs found by the provider\n *\n * @return\n */\n Set<String> listCapabilities();\n\n /**\n * Get a Capability by ID\n *\n * @param id...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the value of the 'field687' field. doc for field687
public java.lang.CharSequence getField687() { return field687; }
[ "public java.lang.CharSequence getField687() {\n return field687;\n }", "java.lang.String getField1371();", "java.lang.String getField1571();", "public java.lang.CharSequence getField697() {\n return field697;\n }", "public java.lang.CharSequence getField987() {\n return field987;\n }", "p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__Attribute__Group__2" $ANTLR start "rule__Attribute__Group__2__Impl" InternalMyDsl.g:6454:1: rule__Attribute__Group__2__Impl : ( ':' ) ;
public final void rule__Attribute__Group__2__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalMyDsl.g:6458:1: ( ( ':' ) ) // InternalMyDsl.g:6459:1: ( ':' ) { // InternalMyDsl.g:6459:1: ( ':' ) ...
[ "public final void rule__Attribute__Group__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalBSQL2Java.g:1113:1: ( rule__Attribute__Group__2__Impl )\n // InternalBSQL2Java.g:1114:2: rule__Attribute__Group__2__Impl\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method iterates over the archived artifact until it finds the plugin.xml and calls the method extractPluginXmlFile() if the plugin.xml is found for extraction
private HashMap<String, String> extractAndReadPluginXmlFromArtifact(PluginArtifact artifact) { FileInputStream fileInputStream = null; ZipInputStream zipInputStream; ZipEntry zipEntry; HashMap<String, String> pluginMap = null; try { fileInputStream = new ...
[ "private static boolean extractFromJar(PluginInfo info, String destination,\r\n\t\t\tComparable<String> comparer, String replace, boolean deleteOnExit) {\r\n\t\tif (logClass.isTraceEnabled( )) {\r\n\t\t\tlogClass.trace(Constants.LINE_SEPARATOR +\r\n\t\t\t\t\t\"Extracting for Plugin: \" + info.getDefaultName( ) + \"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Enable / disable showing of subtitles. Return the previous state.
public native static boolean showSubtitles(boolean oper1);
[ "void onSubtitleTrackStateChanged(boolean enabled) {\n mClosedCaptioningAction.setIndex(enabled ?\n ClosedCaptioningAction.ON : ClosedCaptioningAction.OFF);\n }", "@Override\r\n\tpublic boolean canShow() {\r\n\t\treturn super.canShow() &&\r\n\t\t\t\t(getSpeakControl().isSpeaking() || getS...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
uint32 tile_variant = 1;
@java.lang.Override public int getTileVariant() { return tileVariant_; }
[ "@java.lang.Override\n public int getTileVariant() {\n return tileVariant_;\n }", "public static int getTileBits() {\n return TILE_BITS;\n }", "public int getTileLevel()\n {\n return tileLevel;\n }", "public int tileType(){\n\t\treturn this.type;\n\t}", "int getTileSize();", "public in...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create the variables for the CP program, and apply the common interval constraints
void createVariables( AbstractConstraintProgram<IntVar, Constraint> constraintProgram, CPIntervalKeyToBoundariesVariablesMapper<IntVar> mIntervalsToBoundariesVars, List<SimpleIntervalKey> intervalKeys){ VarsCreatorVisitor<IntVar, Constraint> varsCreator = new VarsCreatorVisitor<>(constraintProgr...
[ "@Override\n protected void doAlgorithmA1() {\n int xP = 0;\n int yP = 0;\n\n\n //Taking the variable out of the list that are in the bounds\n //Testing that the bound has variables\n if (csp.getSimpleConstraints().get(cIndex).getSimpleBounds().get(bIndex).getX() != null) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This will return the V entry of the encryption dictionary. See PDF Reference 1.4 Table 3.13.
public int getVersion() { return encryptionDictionary.getInt( "V", 0 ); }
[ "com.google.protobuf.ByteString getEncryptionKey();", "String getEncryptedPsw();", "String getV();", "public Map getEncryptionDict()\n {\n return _encryptionDict;\n }", "public EncryptionInfo getEncryptionInfo() {\n return EncryptionInfo.fromProto(proto.getEncryptionInfo());\n }", "public...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }