query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
Gets xz cross coupling error.
public double getMxz() { return mCrossCouplingErrors.getElementAt(0, 2); }
[ "public double getMzx() {\n return mCrossCouplingErrors.getElementAt(2, 0);\n }", "public double getMyz() {\n return mCrossCouplingErrors.getElementAt(1, 2);\n }", "public double getMyx() {\n return mCrossCouplingErrors.getElementAt(1, 0);\n }", "public double getMxy() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the value of the 'field65' field
public java.lang.CharSequence getField65() { return field65; }
[ "public java.lang.CharSequence getField65() {\n return field65;\n }", "java.lang.String getField1065();", "java.lang.String getField1665();", "public java.lang.CharSequence getField1065() {\n return field1065;\n }", "public java.lang.CharSequence getField63() {\n return field63;\n }", "public ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Setter method for property levelName.
public void setLevelName(String levelName) { this.levelName = levelName; }
[ "public LevelName(String levelName) {\n this.levelName = levelName;\n }", "public void setName(String name) {\n myLevel.setName(name);\n }", "public void setLevelName(String _level_name)\r\n\t{\r\n\t\tthis._level_name = _level_name;\r\n\t}", "public void setLevelName(String name) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the sky quality meter value Might return null if no value was set at all.
public SurfaceBrightness getSkyQuality() { return sqmValue; }
[ "float getQualityValue(MediaQuality quality);", "float getQuality();", "public Integer getQuality() {\n return quality;\n }", "public int getQuality() {\n return this.quality;\n }", "java.lang.String getQuality();", "int getQuality();", "public String getQuality()\n\t{\n\t\treturn qual...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This is a simple version of _MBCSGetNextUChar() that is used by other converter implementations. It only returns an "assigned" result if it consumes the entire input. It does not use state from the converter, nor error codes. It does not handle the EBCDIC swaplfnl option (set in UConverter). It handles conversion exten...
int simpleGetNextUChar(ByteBuffer source, boolean useFallback, CharsetDecoderListener cdl) { // #if 0 // /* // * Code disabled 2002dec09 (ICU 2.4) because it is not currently used in ICU. markus // * TODO In future releases, verify that this function is never called for ...
[ "private int nextChar()\n {\n int result;\n\n // loop handles the next character whether it is in the buffer or not.\n if (m_bufferOffset_ < 0) {\n // we're working on the source and not normalizing. fast path.\n // note Thai pre-vowel reordering uses buffer too\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests change directory on a relative path that is one away.
@Test public void testCdRelativePathOneAway() { FileTree myTree = new FileTree(); String[] path1 = {"directory2"}; try { myTree.mkdir(path1); } catch (NotDirectoryException | AlreadyExistException e) { fail("The directories could not be made."); } try { myTree.cd("directory2"...
[ "@Test\r\n\tpublic void testRelativeDir() {\r\n\t\t// Expected return from Cd\r\n\t\texpectedCd = null;\r\n\t\t// Expected current working directory\r\n\t\texpectedPath = \"/users/skeshavaa\";\r\n\t\t// Actual return from Cd\r\n\t\tactualCd = cd.run(fs, \"users/skeshavaa\".split(\" \"), \"cd users/skeshavaa\", fals...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Strip all userids, userattributes and signatures from the given public key.
public static PGPPublicKey getStrippedDownPublicKey(PGPPublicKey bloatedKey) throws PGPException { return new PGPPublicKey(bloatedKey.getPublicKeyPacket(), ImplementationFactory.getInstance().getKeyFingerprintCalculator()); }
[ "public static PGPPublicKey removeCertification(\n PGPPublicKey key,\n String id)\n {\n PGPPublicKey returnKey = new PGPPublicKey(key);\n Iterator idIt = returnKey.getUserIDs();\n ArrayList sigList = null;\n boolean found = false;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column STORE_HONGZIXSCKD.DANJUBH
public String getDanjubh() { return danjubh; }
[ "public String getMA_DUONG_DUNG()\n {\n return this.MA_DUONG_DUNG;\n }", "public String getDUONG_DUNG()\n {\n return this.DUONG_DUNG;\n }", "public String getJP_BankDataCustomerCode2();", "public String getJP_BankDataCustomerCode1();", "public String getDanjia() {\n return d...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
select a random hazard in array
public Hazard selectRandom() { Random gen = new Random(); return hazards.get(gen.nextInt(hazards.size())); }
[ "protected Object selectRandom(Object[] array)\n {\n int randomIndex = GENERATOR.nextInt(array.length);\n int randomNumber = GENERATOR.nextInt(array.length / 2);\n int randomOperation = GENERATOR.nextInt(2);\n if (randomOperation == 1) {\n randomIndex = randomIndex + random...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Este metodo imprime todos los programas de la RAM
public void imprimirRAM(ArrayList<Bloque> RAM){ for (int i = 0; i < RAM.size(); i++){ Bloque block = RAM.get(i); if (block.getOcupado() == true){ Programa program = block.getPrograma(); System.out.println("---------------------------------"); ...
[ "private MainMemory() {\n\t\tPropertiesParser prop = PropertiesLoader.getPropertyInstance();\n\t\tnumOfbank = prop.getIntProperty(\"sim.mem.numberofbank\", 8);\n\t\tlogger.debug(\"numOfBank in main memory :\"+ numOfbank);\n\t\t\n\t\tinit();\n\t}", "void fillMem (){\n for (int i = memoria.minTextSection; i ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method simulate that the rain gauge sensor received date
protected void received(){ double max = 100; // this is the maximum value rain level range, the unit is mm/h. Random random = new Random(); // Start a constructor to create random value. // Create a random double value between (0 to 400) mm/h and store the value into rain level parameter with 2 decimal places. ...
[ "@Override\n public void perform(double current_time)\n {\n if (isEmitting())\n {\n scanRadar(current_time);\n }\n }", "public native static float nextWeatherChange();", "public void setRainTime(int time)\n {\n rainTime = time;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generate values for control variables
public java.util.List<Object> generateControlVars();
[ "public void setControlVars(java.util.List<Object> controlValues);", "ControlVariable createControlVariable();", "public abstract void generateValues();", "ControlVariable getControlVariable();", "public void generateRandomVaraibles() {\r\n\r\n\t\tfor (DataVariable var : dataTestModel) {\r\n\t\t\tif (!var.g...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates search bar to contains our query panels.
private SearchBar() { controller = FilterController.getInstance(); initComponents(); createNewQueryPanel(); }
[ "private void buildSearchPanel() {\n\t\t// create search panel\n\t\tsearchPanel = new JPanel();\n\t\t\n\t\t// set the layout to grid\n\t\tsearchPanel.setLayout(new GridLayout(2,2));\n\t\t\n\t\t// create the three JButtons and add them to the panel\n\t\tsearchButton = new JButton(\"Search by Venue Name\");\n\t\t\n\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Reads a relationship object.
public Promise<ResourceResponse, ResourceException> readInstance(Context context, String relationshipId, ReadRequest request) { try { final ReadRequest readRequest = Requests.newReadRequest(REPO_RESOURCE_PATH.child(relationshipId)); Promise<ResourceResponse, Res...
[ "ServiceResponse<Relationship> readRelationship(Long relationshipId);", "public String getRelationship() {\n return relationship;\n }", "public java.lang.String getRelationship() {\n return relationship;\n }", "E getRelationship(E source, E target, String relationshipName) throws ElementNo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the number of installed connectors having their input comming from network
public int getNumberOfConnectorsNetworkInputs() { return numberOfConnectorsNetworkInputs; }
[ "public int getNumberOfConnectors() { return numberOfConnectors; }", "public int getNumberOfConnectorsNetworkOutputs() { return numberOfConnectorsNetworkOutputs; }", "public int getNumConnects() {\n\t\treturn numConnects;\n\t}", "public int getTotalConnections();", "int getActivePeersCount();", "int getGr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the default for the installation directory to the given string.
public static void setDefaultInstallDir(String string) { defaultInstallDir = string; }
[ "@Override\n public void setDefaultInstallPath(String path)\n {\n setVariable(DEFAULT_INSTALL_PATH, path);\n }", "public void setDefaultDirectory(String defaultDirectory) {\n\t\tthis.defaultDirectory = defaultDirectory;\n\t}", "@Override\n public String getDefaultInstallPath()\n {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This function start job schedular for periodic update the widget Currently it will refresh widget after every 15 minutes
private void startJobSchedular() { if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP) { JobScheduler mJobScheduler = (JobScheduler) getSystemService(Context.JOB_SCHEDULER_SERVICE); JobInfo.Builder builder = null; builder = ne...
[ "void startUpdate() {\n\n // create a single threaded executor and pass our update runnable to it\n final ScheduledExecutorService scheduledUpdate = Executors.newScheduledThreadPool(1);\n\n // create new update thread every 10 seconds\n scheduledUpdate.scheduleAtFixedRate(new UpdateThrea...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Second Constructor for the House, thanks to which it is possible to specify the meters for the House
public House(Meter firstMeter, Meter secondMeter){ electricity = firstMeter; water = secondMeter; }
[ "public House(){\n electricity = new Meter(\"Electricity\", 0.013, 0);\n water = new Meter(\"Water\", 0.002, 0);\n }", "public House()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(480, 352, 1); \n addObject(new GravesHouse(),11...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Partially updates a ordPaymentRef.
Optional<OrdPaymentRefDTO> partialUpdate(OrdPaymentRefDTO ordPaymentRefDTO);
[ "public com.diviso.graeshoppe.order.avro.Order.Builder setPaymentRef(java.lang.String value) {\n validate(fields()[7], value);\n this.paymentRef = value;\n fieldSetFlags()[7] = true;\n return this;\n }", "Order updateOrder(Order order);", "public void updateOrder (Order order);", "publi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check if the left key was pressed on this frame
public boolean isLeftOnce() { if(leftPressed && !leftWasPressed) { return true; } return false; }
[ "public boolean isLeftPressed()\r\n {\r\n for(int key : Keys.keys.left)\r\n {\r\n if(Keyboard.isKeyDown(key))\r\n {\r\n leftPressed = true;\r\n return leftPressed;\r\n }\r\n }\r\n leftPressed = false;\r\n return lef...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get value for alt_loc
public String getAlt_loc() { return (String) get("alt_loc"); }
[ "com.google.privacy.dlp.v2.ImageLocation getImageLocation();", "public double getResultLocationAltitude() {\n return resultLocationAltitude;\n }", "public double getAltitude(){\r\n\t\tdouble alt = Math.sqrt(Math.pow(Location[0], 2) \r\n\t\t\t\t+ Math.pow(Location[1], 2) \r\n\t\t\t\t+ Math.pow(Location...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the value of the 'field582' field
public java.lang.CharSequence getField582() { return field582; }
[ "public java.lang.CharSequence getField582() {\n return field582;\n }", "java.lang.String getField1571();", "java.lang.String getField1371();", "java.lang.String getField1558();", "java.lang.String getField1372();", "java.lang.String getField1538();", "java.lang.String getField1366();", "java.lang...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TestLogger.debug("Inside method FrameworkBase.rightClickWebElement ");
protected void rightClickWebElement(String locator) throws Exception { String className=new Object(){}.getClass().getName(); String methodName = new Object(){}.getClass().getEnclosingMethod().getName(); String msg ="class " + className +" ;method =" +methodName; TestLogger.debug("started " +msg); WebEleme...
[ "IWebElementWrapper click();", "public Action RightClick(LocatorObject locator)\n{\n \n new org.openqa.selenium.interactions.Actions(driver).contextClick(FindElement(locator)).build().perform();\n \n\n return this;\n}", "@Test\n public void testClickElement() {\n LOG.entering(CLASS, \"testClic...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Use MsgRequestRedemption.newBuilder() to construct.
private MsgRequestRedemption(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); }
[ "private MsgRequestRedemptionResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private RequestMsg(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private GetQrcReqMsg(com.google.protobuf.GeneratedMessageV3.Builder...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieves Ingredient information based on search criteria. Populates the Ingredient's id, name & description.
private void getIngredientByCriteria(String criteria, String term) throws SQLException { connection = myDatabase.getDatabaseConn(); PreparedStatement statement = connection.prepareStatement( "SELECT id,name,description FROM ingredient " + "WHERE " + criteria + " = ?;"); if (criteria.contentEqua...
[ "public Ingredient getById(Long id) {\n return ingredientRepository.getOne(id);\n }", "public String getSearchResult(String query, List<Integer> ingredientID) {\n\t\tint success = 0, temp = 0;\n\t\tString result = \"\";\n\t\tDrink drink = new Drink();\n\t\tString[] splitArr = query.split(\",\");\n\n\t\t// ite...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the esf organization of this e s f shooter affiliation chrono.
@Override public java.lang.String getEsfOrganization() { return _esfShooterAffiliationChrono.getEsfOrganization(); }
[ "public String organizationName() {\n return this.innerProperties() == null ? null : this.innerProperties().organizationName();\n }", "public java.lang.String getOrganization()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the amf audit log persistence.
public AmfAuditLogPersistence getAmfAuditLogPersistence() { return amfAuditLogPersistence; }
[ "public WFMS_COS_AuditPersistence getWFMS_COS_AuditPersistence() {\n\t\treturn wfms_cos_AuditPersistence;\n\t}", "public WFMS_associate_skills_auditPersistence getWFMS_associate_skills_auditPersistence() {\n\t\treturn wfms_associate_skills_auditPersistence;\n\t}", "public void setAmfAuditLogPersistence(\n\t\tAm...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the tcYoneticiKodu property.
public void setTCYoneticiKodu(int value) { this.tcYoneticiKodu = value; }
[ "public int getTCYoneticiKodu() {\n return tcYoneticiKodu;\n }", "public void setYKienThamTra(String yKienThamTra);", "public void setYolKotuUstuYukseklik(Double yolKotuUstuYukseklik) {\r\n\t\tthis.yolKotuUstuYukseklik = yolKotuUstuYukseklik;\r\n\t}", "public void setYolKotuUstuKatSayisi(Integer yol...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
getPanelFinal : this method is a getter for the myRoomPanelFinal variable.
public JPanel getPanelFinal() { return myRoomPanelFinal; }
[ "public JPanel getPanelRoom()\n { \n return myRoomPanel;\n }", "final public PropertiesPanel getPanel()\r\n\t{\r\n\t\treturn _thePanel;\r\n\t}", "public final Panel getPanel()\r\n\t{\r\n\t\treturn panel;\r\n\t}", "protected DraggableImage getPanelEndImage() {\n\treturn endImage;\n }", "publi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The incident status. For realtime incidents, valid values are investigating, identified, monitoring, and resolved. For scheduled incidents, valid values are scheduled, in_progress, verifying, and completed.
@javax.annotation.Nullable @ApiModelProperty(example = "scheduled", value = "The incident status. For realtime incidents, valid values are investigating, identified, monitoring, and resolved. For scheduled incidents, valid values are scheduled, in_progress, verifying, and completed.") public StatusEnum getStatus()...
[ "public String getContestLikeStatus() {\r\n String statusName = getStatusName().trim().toLowerCase();\r\n\r\n if (statusName.equals(ISSUE_STATUS_RESOLVED.toLowerCase())) {\r\n if (getResolutionName().equals(ISSUE_RESOLUTION_FIXED)) {\r\n return \"Completed\";\r\n }...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the flag indicating if the notification is optional or mandatory.
public void setOptional(boolean optional) { this.optional = optional; }
[ "public void setOptional(boolean optional);", "public void setOptional(boolean optional) {\n this.optional = optional;\n }", "public void setOptional(Boolean optional);", "public void setMandatory(boolean mandatory) {\n ModelEvent<?> event = new ModelEventBuilder( ModelEventType.MAN...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test whether BoardManager always produce a solvable 3x3 BoardManager
@Test public void checkingBoardManagerAlwaysProduceASolvable3x3Board() { BoardManager boardManager1 = new BoardManager(3,3); List<Tile> flatTile = new ArrayList<>(); int z = 0; for (int i = 0; i < Board.NUM_ROWS; i++) { for (int j = 0; j < Board.NUM_COLS; j++) { ...
[ "public boolean isSolvable()\n\t{\n\t\tfor(int x1 = 1; x1 < GameSize - 1; x1++)\n\t\t\tfor(int y1 = 1; y1 < GameSize - 1; y1++)\n\t\t\t\tfor(int x2 = 1; x2 < GameSize - 1; x2++)\n\t\t\t\t\tfor(int y2 = 1; y2 < GameSize - 1; y2++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(GridMatcher.isCancellable(grids, new Point(x1, y1), new P...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
test listActivator command in project where bundles are inside src instead of being separated projects as usual
@Test public void shouldListActivatorsInSourceCode() throws Exception { initializeOSGiProjectWithBundlesInSourceCode(); resetOutput(); getShell().execute("osgi activators"); String mod1Expected = "/main/src/module1/br/ufrgs/rmpestano/activator/Activator.java"; String mod2Expe...
[ "@Test\n public void shouldListBundlesInSourceCode() throws Exception {\n initializeOSGiProjectWithBundlesInSourceCode();\n resetOutput();\n getShell().execute(\"osgi listBundles\");\n Assert.assertTrue(getOutput().startsWith(\"module1\" + TestUtils.getNewLine() + \"module2\" + TestUt...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional .com.cst14.im.protobuf.GroupMemberInfo myInfo = 14;
public Builder setMyInfo(com.cst14.im.protobuf.ProtoClass.GroupMemberInfo value) { if (myInfoBuilder_ == null) { if (value == null) { throw new NullPointerException(); } myInfo_ = value; onChanged(); } else { myInfoBuilder_.setMessage(value);...
[ "com.cst14.im.protobuf.ProtoClass.GroupMemberInfo getMyInfo();", "com.cst14.im.protobuf.ProtoClass.GroupMemberInfoOrBuilder getMyInfoOrBuilder();", "public com.cst14.im.protobuf.ProtoClass.GroupMemberInfoOrBuilder getMyInfoOrBuilder() {\n if (myInfoBuilder_ != null) {\n return myInfoBuilder_.get...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the keystore for the slot.
public KeyStore getKeyStore(PasswordProtection pwp) throws Exception { final KeyStore.Builder builder = KeyStore.Builder.newInstance("PKCS11", this.data.slot.getProvider(), ...
[ "private KeyStore getKeyStore() {\n KeyStore keystore = null;\n\n try {\n CertificateFactory cf = CertificateFactory.getInstance(\"X.509\");\n // get the public certificate\n InputStream in = this.mContext.getResources().openRawResource(R.raw.ssl);\n Certifi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Rebuild our vertices using a list
public void updateVertices(ArrayList<Float> _vertices) { this.vertices = new float[(int)(_vertices.size() * 1.5f)]; // Add z cord of 1 int set = 0; for(int i = 0; i < this.vertices.length; i += 3) { this.vertices[i] = _vertices.get(set); this.vertices[i + 1] = _vertices.get(set + 1...
[ "private void genVertices()\n {\n vertices = new Vertex[xTotal][yTotal];\n\n for(int col = 0; col < xTotal; col++)\n {\n for(int row = 0; row < yTotal; row++)\n {\n if(Graph.getLandType((col)*AIconstants.BLOCK_SIZE, (row)*AIconstants.BLOCK_SIZE) == LandType.GRASS)\n {\n ve...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
when human player clicks on roll again button, the buttons will disable and the remaining dices will be shuffled again to see if there is new
public void rollAgainClicked() { this.gui.setBtnDisable(true); rollAgainDices(); }
[ "private void rollAgainDices() {\n Random rand = new Random();\n int len = dices.size();\n dices.clear();\n for (int i = 0; i < len; i++) {\n dices.add((int) (Math.random() * ((6 - 1) + 1)) + 1);\n }\n\n Collections.sort(dices);\n \n io.rollLogger(d...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get a random element from the set.
public int getRandom() { // Generate a random index in range of size of LinkedList and return the element at that index Random random = new Random(); int randIndex = random.nextInt(this.set.size()); return this.set.get(randIndex); }
[ "static <E> E getRandomElement(Set<? extends E> set){\n Random random = new Random();\n int randomNumber = random.nextInt(set.size());\n Iterator<? extends E> iterator = set.iterator();\n\n int currentIndex = 0;\n E randomElement = null;\n while(iterator.hasNext()){\n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the linkerName value for this InsuredEhm.
public void setLinkerName(java.lang.String linkerName) { this.linkerName = linkerName; }
[ "public java.lang.String getLinkerName() {\n return linkerName;\n }", "public void setLinkName(final String linkName)\r\n {\r\n _linkName.set(linkName);\r\n }", "@Override\n public void setLinkName(String linkName) {\n ejbLink = linkName;\n }", "public void setLinkName(String l...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Metodo que dado un indice n, devuelva la respuesta correspondiente en la lista.
public respuesta getRespuestaN(int n) { //Si el n ingresado no supera el tamano total de archivos if (n > tamano || n < 0) { return null; }else{ nodoRespuesta puntero = getCabeza(); int i = 0 ; //Mientras el puntero no sea nulo while (i < ...
[ "private No<T> getNo(int index){\n validaIndice(index);\n No<T> noAuxiliar = referenciaEntrada;\n No<T> noRetorno = null;\n for(int i =0; i <= index ; i++){\n noRetorno = noAuxiliar;\n noAuxiliar = noAuxiliar.getProximoNo();\n }\n return noRetorno;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructs a new JavaSourceFromString.
public JavaSourceFromString(final String name, final String code) { super(URI.create("string:///" + name.replace('.', '/') + Kind.SOURCE.extension), Kind.SOURCE); this.code = code; }
[ "public JavaSourceFromString(String name, String code) {\n super(URI.create(\"string:///\" + name.replace('.', '/') + Kind.SOURCE.extension), Kind.SOURCE);\n this.code = code;\n this.className = name;\n this.identifier = 0;\n }", "public JavaSourceFromString(String name, String code...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Inline routes in restdsl which are linked using direct endpoints. By default, each service in Rest DSL is an individual route, meaning that you would have at least two routes per service (restdsl, and the route linked from restdsl). Enabling this allows Camel to optimize and inline this as a single route, however this ...
public RestConfigurationProperties withInlineRoutes(boolean inlineRoutes) { setInlineRoutes(inlineRoutes); return this; }
[ "RoutesClient getRoutes();", "private Route apiRoute(Supplier<Route> innerRoutes) {\n return mapResponse(this::nonSuccessToEmptyJsonEntity, innerRoutes);\n }", "@Host(\"{$host}\")\n @ServiceInterface(name = \"NetworkManagementClientRoutes\")\n private interface RoutesService {\n @Delete...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructor for a new Laptop.
public Laptop(String company, String type) { super(company); this.type = type; }
[ "public Laptop() {\n }", "public Lot() {\n\t\t// Start of user code constructor for Lot)\n\t\tsuper();\n\t\t// End of user code\n\t}", "public Lokalizacija() {\n }", "public Larvitar()\n {\n super(\"Larvitar\", \"Ground\", \"Rock\");\n }", "public Laptops(String make, int screensize, int ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
call back called when the lock is acquired
public void lockAcquired();
[ "public void lock() {\r\n super.lock();\r\n }", "@Override\n public void onLock(Myo myo, long timestamp) {\n }", "public void lock() {\n\t\tlocked = true;\n\t}", "public void lock() {\n mLock.lock();\n }", "void forceReleaseLock();", "private void acquireLock() {\n Lock lo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set Order Node ID
public void setMPC_Order_Node_ID(int MPC_Order_Node_ID) { if (MPC_Order_Node_ID <= 0) set_Value("MPC_Order_Node_ID", null); else set_Value("MPC_Order_Node_ID", new Integer(MPC_Order_Node_ID)); }
[ "public void setIdNode(String idNode) {\n\t\tthis.idNode = idNode;\n\t}", "public void xsetOrderID(org.apache.xmlbeans.XmlInt orderID)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlInt target = null;\n target = (org.apache.xmlbean...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional int32 data2 = 3;
int getData2();
[ "public int getData2() {\n return data2_;\n }", "IntegerData createIntegerData();", "public int getData1() {\n return data1_;\n }", "public int getData2() {\n return data2_;\n }", "public int getData1() {\n return data1_;\n }", "public int getData(){\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates and returns the Physician object from a given array of strings.
public Physician scan(String[] data) { return new Physician(data[0], data[1], data[2]); }
[ "public static Patient makePatient(String[] pt) {\n\n\t\tPatient output = new Patient(pt[1], pt[2], pt[0], 0);\n\t\tString[] staff = pt[4].split(\",\");\n\t\tfor (String member : staff)\n\t\t\toutput.addMedicalStaff(new MedicalStaff(member));\n\n\t\t@SuppressWarnings(\"unused\") // Medication currently disabled\n\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a new XML document using the generated incomingLobsFactory class
void createNewInstance(String filename) { iIncomingLobsFactory = new incomingLobsFactory(); iIncomingLobsFactory.setPackageName("com.loadSample"); // include schemaLocation hint for validation iIncomingLobsFactory.setXSDFileName("LoadSample.xsd"); // encoding for output document iInc...
[ "public XMLCreator() {\r\n\t\tbodyRoot = new ArrayList<Object[]>();\r\n\t}", "public XMLOutputFactoryImpl() {\n }", "private void createXML(){\n\t\ttry{\n\t\t\tTransformerFactory transformerFactory = TransformerFactory.newInstance();\t//creates a transformer factory instance\n\t\t\tTransformer transformer = ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieve the Toast view's gravity. If no changes, returns null.
default Integer getGravity() { return null; }
[ "public int getGravity() {\n return mTextView.getGravity();\n }", "private int getLayoutGravity(LayoutGravity gravity) {\n\t\tswitch (gravity) {\n\t\tcase Top:\n\t\t\treturn Gravity.TOP;\n\t\tcase Center:\n\t\t\treturn Gravity.CENTER;\n\t\tcase Bottom:\n\t\t\treturn Gravity.BOTTOM;\n\t\tdefault:\n\t\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
True if we are in the voting phase of any turn.
public boolean canVoteNow(NomicAgent agent) { return currentTurn.type == TurnType.VOTE; }
[ "public boolean voteIsDone() {\n if (votingPhaseHandlers == null)\n return true;\n for (VotingPhaseHandler handler : votingPhaseHandlers) {\n if (handler.isAlive())\n return false;\n }\n return true;\n }", "boolean hasIsVote();", "public synchr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "ruleXNumberLiteral" $ANTLR start "entryRuleXStringLiteral" ../org.xtext.mongobeans.ui/srcgen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:1635:1: entryRuleXStringLiteral : ruleXStringLiteral EOF ;
public final void entryRuleXStringLiteral() throws RecognitionException { try { // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:1636:1: ( ruleXStringLiteral EOF ) // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui...
[ "public final void entryRuleXStringLiteral() throws RecognitionException {\n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:1524:1: ( ruleXStringLiteral EOF )\n // ../org.xtext.example.helloxcore.ui...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A Sink Actor is an actor that is not processing any messages, though it can run code. In practice, this is an executor.
public interface SinkActor<S> extends SinkActorSingleTask<S>, Executor { public void execAsync(Runnable worker); @Override default public void execute(Runnable command) { execAsync(command); } public void execAsyncStateful(Consumer<Stateful<S>> worker); default public <E extends Excep...
[ "public interface Sink {\r\n\t\r\n\t/**\r\n\t * Check if the sink is still active\r\n\t * @return\r\n\t */\r\n\tboolean isActive();\r\n\t\r\n\t/**\r\n\t * Set the error flag\r\n\t */\r\n\tvoid setError();\r\n\t\r\n\t/**\r\n\t * Check if the sink has been object of an error\r\n\t * @return true if an error happened ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
comparator, nulls lower (uspsInternationalSkeletonRouteId) //
public JwComparator<AcUspsInternationalSkeletonRouteOffer> getUspsInternationalSkeletonRouteIdComparatorNullsLower() { return UspsInternationalSkeletonRouteIdComparatorNullsLower; }
[ "public JwComparator<AcUspsInternationalUnfleshedOutSkeletonRouteVo> getUspsInternationalSkeletonRouteIdComparatorNullsLower()\n {\n return UspsInternationalSkeletonRouteIdComparatorNullsLower;\n }", "public JwComparator<AcUspsInternationalUnfleshedOutSkeletonRouteVo> getUspsInternationalSkeletonRout...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return the value associated with the column: marital_history
public java.lang.String getMaritalHistory () { return maritalHistory; }
[ "public void setMaritalHistory (java.lang.String maritalHistory) {\n\t\tthis.maritalHistory = maritalHistory;\n\t}", "@Override\n\tpublic java.lang.String getMaritimeCode() {\n\t\treturn _dmHistoryMaritime.getMaritimeCode();\n\t}", "public java.lang.String getMaritimeCode() {\n\t\treturn _dmHistoryMaritime.getM...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[16] Field ::= FieldID? FieldReq? FieldType Identifier ('= ConstValue)? XsdFieldOptions ListSeparator?
Rule Field() { // Push 1 FieldNode onto the value stack return Sequence( Optional(FieldID()), Optional(FieldReq()), FieldType(), // pushes FieldType onto the value stack Identifier(), // pushes Identifier onto the value stack ...
[ "RecordFieldDeclaration createRecordFieldDeclaration();", "FieldDefinition createFieldDefinition();", "FieldDefinition getFieldDefinition();", "com.google.privacy.dlp.v2.FieldId getField();", "public static Field exampleField() {\r\n Field field = new Field();\r\n field.setContextId(\"contextId\");\r\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the game objects that are in this grid location.
public List<GameObject> getObjects(){ return gameObjects; }
[ "public Map<Point, GameObject> getObjects() {\n\t\tMap<Point, GameObject> map = new LinkedHashMap<Point, GameObject>();\n\t\tfor (int x = 0; x < width; x++) {\n\t\t\tfor (int y = 0; y < height; y++) {\n\t\t\t\tif (objects[x][y] != null) {\n\t\t\t\t\tmap.put(new Point(x, y), objects[x][y]);\n\t\t\t\t}\n\t\t\t}\n\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Verifies the results of a grep search for phrase queries.
@Test public void phraseGrepTest1() throws Exception { // phrase is "I am forced" HashSet<String> grepFound = loadGrepResults("i+am+forced"); Collection<Page> index = queryTest.query("\"I am Forced\""); HashSet<String> indexFound = new HashSet<String>(); for (Page p : index) indexFound.add(p.getURL().get...
[ "@Test\n\tpublic void notPhraseGrepTest() throws Exception {\n\t\t// phrase is \"I am forced\"\n\t\tHashSet<String> grepFound = loadGrepResults(\"!i+am+forced\");\n\t\tCollection<Page> index = queryTest.query(\"! \\\"I am Forced\\\"\");\n\t\tHashSet<String> indexFound = new HashSet<String>();\n\n\t\tfor (Page p : i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Y cannot be outside 0..100
@Test @Order(6) void testYmoreThanHundred() { robot.setY(1000); assertNotEquals(1000 , robot.getY() > 100 ,"Y coord test failed\nREASON: Values more than 100 not allowed!"); }
[ "boolean Y_Out_Of_Bounds(){\n \n if (Y_Position + Width + Y_Movement > Tilesize*15 || Y_Position + Y_Movement < 0)\n {\n \treturn true; // can't go out of bounds\n }\n return false;\n }", "@Test\n public void checkGetY() {\n assertEquals(true, p.getY() - 9 < .001);\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Difference this time series once at lag 1 and return the result as a new time series.
public final TimeSeries difference() { return difference(1); }
[ "public final TimeSeries difference(final int lag) {\n validate(this.series, lag);\n double[] diffed = differenceArray(this.asArray(), lag);\n final List<OffsetDateTime> obsTimes = this.observationTimes.subList(lag, n);\n return new TimeSeries(this.timePeriod, obsTimes, diffed);\n }",...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
and csmi_person is null
public M csmiPersonNull(){if(this.get("csmiPersonNot")==null)this.put("csmiPersonNot", "");this.put("csmiPerson", null);return this;}
[ "public M cssePersonNull(){if(this.get(\"cssePersonNot\")==null)this.put(\"cssePersonNot\", \"\");this.put(\"cssePerson\", null);return this;}", "boolean getPersonIdNull();", "boolean getPersonIdentificationValuesNull();", "boolean getPersonCharacteristicIdNull();", "boolean getOrderPersonIdNull();", "boo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the imports map of the given resource.
private Map getImportsMap(Resource resource) { return (Map) imports.get(resource); }
[ "public Map getImports();", "private Map getExportsMap(Resource resource) {\n \t\treturn (Map) exports.get(resource);\n \t}", "public final Map getImports() {\n return _imports;\n }", "private List<Resource> getImportedResources(final Resource resource)\n throws IOException {\n // it should be sorte...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Force the project source groups to refresh otherwise the source groups node may not show up until the first build, so it looks like nothing happened
void kickProjectSourceGroups() { AntlrConfiguration config = AntlrConfiguration.forProject(project); Path path = FileUtil.toFile(dir).toPath(); FoldersLookupStrategyImplementationFactory.evict(path); Sources src = ProjectUtils.getSources(project); if (src != null) { s...
[ "@Override\n public List<SourceGroup> moveSourceFolderAsFirst(List<SourceGroup> groups) {\n return moveAsFirst(groups, \"/main/groovy\"); //NOI18N\n }", "private void populateGroups() {\n groups.addAll(cfg.getEnv().getGroups());\n for (Project project : cfg.getEnv().getProjectList()) {\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
called when on button is pressed on given slot
public void onButtonWasPushed(int slot) { onCommands[slot].execute(); unDoCommand = onCommands[slot]; }
[ "public void emitClicked() {\n GtkButton.clicked(this);\n }", "public void onSlotChange() {}", "public void buttonPressed() {\n\t\t\n\t}", "void click(int slot, ClickType type);", "public void buttonClicked() {\n mSanitizorGame.buttonClicked();\n }", "@Override\n public void slotCli...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Search for the value in the array and return the index of the first occurrence from the end of the array
public static <E> int searchLast(E[] array, E value) { // Search for the first occurrence in the array from the end return LinearSearch.searchLast(array, value, 1); }
[ "int\nsearch(\nint\narr[], \nint\nstrt, \nint\nend, \nint\nvalue) \n\n{ \n\nint\ni; \n\nfor\n(i = strt; i <= end; i++) { \n\nif\n(arr[i] == value) \n\nbreak\n; \n\n} \n\nreturn\ni; \n\n}", "public static <E> int search(E[] array, E value) { \n // Search for the first occurrence in the array\n return...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__XConstructorCall__ArgumentsAssignment_5" $ANTLR start "rule__XBooleanLiteral__IsTrueAssignment_1_1" ../org.xtext.example.rmodp.ui/srcgen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:31768:1: rule__XBooleanLiteral__IsTrueAssignment_1_1 : ( ( 'true' ) ) ;
public final void rule__XBooleanLiteral__IsTrueAssignment_1_1() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:31772:1: ( ( ( 'true' ) )...
[ "public final void rule__XBooleanLiteral__IsTrueAssignment_1_1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:166...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The Boolean valued operation "contains" shall return TRUE if this Geometry contains another Geometry.
boolean contains( Geometry gmo );
[ "boolean intersects( Geometry gmo );", "public final boolean isContains()\r\n {\r\n return myContains;\r\n }", "public boolean containsEntity();", "protected abstract NativeSQLStatement createNativeContainsStatement(Geometry geom);", "public static boolean intersects(Geometry a, Geo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
sendln() sends a single line
public void sendln(BufferedWriter out, String s) { try { out.write(s + "\r\n"); out.flush(); System.out.println(s); } catch (Exception e) { e.printStackTrace(); } }
[ "public void sendRawLine(String line);", "public void sendln(BufferedReader in, BufferedWriter out, String s) {\n\t\ttry {\n\t\t\tout.write(s + \"\\r\\n\");\n\t\t\tout.flush();\n\t\t\tin.readLine();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void sendRaw(String line)\n\t{\n\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method sets the value for the postal code to the value of postalCode If a postal code is not entered it throws an exception
public void setPostalCode(String postalCode) { if (postalCode.isEmpty()) throw new IllegalArgumentException("Postal Code cannot be empty"); else this.postalCode = postalCode; }
[ "public void setPostalCode(String postalCode) {\n this.postalCode = postalCode;\n }", "public void setPostalCode(String postalCode){\r\n\t\tthis.postalCode = postalCode;\r\n\t}", "public void setPostalCode(java.lang.String postalCode)\n {\n synchronized (monitor())\n {\n check_or...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Extract the 4th root of a doubleprecision value. This method is faster than Math.pow(d, 0.25).
public static double fourthRoot(double dValue) { assert Validate.nonNegative(dValue, "dValue"); double sqrt = Math.sqrt(dValue); double result = Math.sqrt(sqrt); assert result >= 0.0 : result; return result; }
[ "public static double nextMidpointDouble( int n )\n {\n return getRandomGenerator().nextDouble() * n - n / 2;\n }", "public static Double roundTo4Decimal(Double val) {\n if (val != null) {\n return Math.round(val * 10000.0) / 10000.0;\n }\n return val;\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get end index of span
private int getSpanEnd(int i,List<Span> spans) { return (i + 1 == spans.size() ? mText.length() : spans.get(i + 1).startIndex); }
[ "public int getSpanEnd()\r\n\t{\r\n\t\treturn spanEnd;\r\n\t}", "int getEndIndex();", "public int getEndPosition();", "int getEndCharIndex();", "public int getEndOffset(){\n return _endPos.getOffset();\n }", "public static long calcEnd(final LongSpan span) {\n return (span.getOffset() + span.ge...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Clears existing backing model and replaces with the provided new data.
void resetData(ReadOnlyAddressBook newData);
[ "public void clearModel() {\r\n this.model.clear();\r\n resetValuesFromModel();\r\n }", "public void clearData() {\r\n mSharedPrefInstance.edit().clear().apply();\r\n }", "public void reset()\r\n\t{\r\n\t\tmodel.resetModel();\r\n\t}", "void resetData(ReadOnlyExpenseBook newData);", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create button panel with SetDescritpion and AddProperty buttons
private Component createButtonPanel() { updDescrBt = new JButton("Set description"); updDescrBt.setEnabled(false); updDescrBt.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { model.updatePropertyDescription(tree.getSelectionPa...
[ "private Component createAddButton() {\n\t\tJButton addButton = new JButton(\"Add Object\");\n\t\taddButton.setAlignmentX(CENTER_ALIGNMENT);\n\t\tcreateAddListener(addButton, this);\n\t\treturn addButton;\n\t}", "private void setUpButtonPanel() {\n\t\teditTemplate = new JButton(\"Edit\");\n\t\tcancel = new JButto...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Clears the value of the 'field715' field
public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField715() { field715 = null; fieldSetFlags()[715] = false; return this; }
[ "private void clearFields() {\r\n\t\tmCardNoValue1.setText(\"\");\r\n\t\tmCardNoValue1.setHint(\"-\");\r\n\t\tmCardNoValue2.setText(\"\");\r\n\t\tmCardNoValue2.setHint(\"-\");\r\n\t\tmCardNoValue3.setText(\"\");\r\n\t\tmCardNoValue3.setHint(\"-\");\r\n\t\tmCardNoValue4.setText(\"\");\r\n\t\tmCardNoValue4.setHint(\"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
listIncompleteQuiz that will only be returning an arraylist of the quizzes that have the completionStatus as "incomplete"
public ArrayList<QuizUtil> listCompletedQuiz(String username){ String completed = "completed"; SQLiteDatabase db = this.getReadableDatabase(); ArrayList<QuizUtil> storeContacts = new ArrayList<>(); ArrayList<Integer> quizIDList = new ArrayList<>(); Cursor cursor = db.rawQuery("Se...
[ "public ArrayList<QuizUtil> listIncompleteQuiz(String username){\n String incomplete = \"incomplete\";\n SQLiteDatabase db = this.getReadableDatabase();\n ArrayList<QuizUtil> storeContacts = new ArrayList<>();\n Cursor cursor = db.rawQuery(\"Select * from assignedQuiz where username=? an...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tracks the xposition of the mouse and sets the paddle to follow it.
public void mouseMoved(MouseEvent e){ //MOUSE_SENSITIVITY allows the player to fully control the paddle //without moving the mouse to the edge of the program double xTracker = e.getX()*MOUSE_SENSITIVITY - WIDTH/(MOUSE_SENSITIVITY); if((xTracker < (WIDTH - PADDLE_WIDTH)) && (xTracker > 0)){ paddle.setLocatio...
[ "public void mouseMoved (MouseEvent e){\n int mousePositionX = e.getX();\n int paddleX = mousePositionX - PADDLE_WIDTH / 2;\n int paddleY = (getHeight() - PADDLE_Y_OFFSET);\n movePaddle(paddleX, paddleY, mousePositionX);\n }", "@Override\n public void mouseMoved(MouseEvent e) {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the AATGetSubjectResult value for this AATGetSubjectResponse.
public edu.getty.vocabsservices.AATGetSubjectResponseAATGetSubjectResult getAATGetSubjectResult() { return AATGetSubjectResult; }
[ "public void setAATGetSubjectResult(edu.getty.vocabsservices.AATGetSubjectResponseAATGetSubjectResult AATGetSubjectResult) {\r\n this.AATGetSubjectResult = AATGetSubjectResult;\r\n }", "public SubjectInfo getSubject() {\n return this.subject;\n }", "public String getSubjecta() {\n ret...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by Apache iBATIS ibator. This method sets the value of the database column report_column_setting.col_type
public void setColType(String colType) { this.colType = colType == null ? null : colType.trim(); }
[ "public void setColumnType(int columnType);", "public void setColType(String colType) {\r\n\t\tthis.colType = colType == null ? null : colType.trim();\r\n\t}", "private void updateType(ReportColumn column, String field, ColumnType type) {\n if (field.equalsIgnoreCase(column.getField()) && column.getType() ==...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Convert a protocol buffer Result to a client Result
public static Result toResult(final ClientProtos.Result proto) { if (proto.hasExists()) { if (proto.getStale()) { return proto.getExists() ? EMPTY_RESULT_EXISTS_TRUE_STALE :EMPTY_RESULT_EXISTS_FALSE_STALE; } return proto.getExists() ? EMPTY_RESULT_EXISTS_TRUE : EMPTY_RESULT_EXISTS_FALSE; ...
[ "public static ClientProtos.Result toResult(final Result result) {\n if (result.getExists() != null) {\n return toResult(result.getExists(), result.isStale());\n }\n\n Cell[] cells = result.rawCells();\n if (cells == null || cells.length == 0) {\n return result.isStale() ? EMPTY_RESULT_PB_STAL...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the horizontal field of view in degree.
public double getHorizontalFieldOfView ( ) { double fov = Double.valueOf(text_fov_width.getText()).doubleValue(); if (((String)combo_unit.getSelectedItem()).equals("arcmin")) fov /= 60.0; if (((String)combo_unit.getSelectedItem()).equals("arcsec")) fov /= 3600.0; return fov; }
[ "public int horizontalFieldOfView() {\n return horizontalFieldOfView;\n }", "public float getBaseHorizontalViewAngle() {\n \treturn mCamera.getParameters().getHorizontalViewAngle();\n }", "public double getHorizAngle()\r\n {\r\n synchronized (monitor())\r\n {\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the priorityimportant part of the user style sheet, i.e. the style sheet with the declarations of important priority.
abstract protected AbstractCSSStyleSheet getUserImportantStyleSheet();
[ "public int getEffectivePriority() {\r\n\t\trefresh();\r\n\t return priorityCache;\r\n\t}", "public String getTODO_PRIORITY() {\r\n return TODO_PRIORITY;\r\n }", "String getSpecifiedPriority();", "public int priority() {\n\t\treturn 1;\n\t}", "public int getEffectivePriority() {\n\t return e...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
return true if x is even;
public boolean isEven(int x) { // int x is a paramenter return x % 2 == 0; // return value because method is not void(boolean) }
[ "boolean isEven(int x) {\r\n\t\t\tif((x%2)==0) return true; else return false;\r\n\t\t}", "private boolean isEven(){\n return num % 2 == 0;\n }", "private static boolean isEven(int number){\r\n return (number % 2) == 0;\r\n }", "public boolean isEven() \r\n\t{if (this.getValue() % 2 == 0) ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
NOTE: this is meant to test results of SecretClientConfigHoldergetAllowedSecretClientSupplierClasses, not the possibilities of SecretClientConfigallowed, which has its own tests in SecretClientConfigUnitTests
@Test public void testAllowed(){ SecretClientSupplierConfigHolder readWrite = new SecretClientSupplierConfigHolder(List.of( SecretClientSupplierConfig.readOnly("TEST", MemorySecretClientSupplier.class), SecretClientSupplierConfig.allOps("TEST", LocalStorageSecretClientSupplier.class))); assertConfigsConta...
[ "SecretsClient getSecrets();", "public abstract edu.utexas.tacc.tapis.security.client.model.SecretType getClientSecretType();", "@Override\n public boolean isSecretRequired() {\n return client.getClientSecret() != null;\n }", "@Override\n public boolean isSecretRequired() {\n\t return getCl...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The getColCount method Purpose: retuns the colCount
public int getColCount(){ return this.colCount; }
[ "int columnCount();", "public int numberOfColumns() {\n\t\treturn colCount;\n\t}", "int getNumOfColumns();", "public int getNumColumns() {\n\t\treturn field_4_last_col - field_2_first_col + 1;\n\t}", "public int getNumColumns();", "int getOracleColumnsCount();", "public static int getColumnCount() throw...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets array of all "Speeds" elements
org.landxml.schema.landXML11.SpeedsDocument.Speeds[] getSpeedsArray();
[ "org.landxml.schema.landXML11.SpeedsDocument.Speeds getSpeedsArray(int i);", "java.util.List<org.landxml.schema.landXML11.SpeedsDocument.Speeds> getSpeedsList();", "public List<Speed> getSpeeds()\n {\n return Collections.unmodifiableList(m_speeds);\n }", "public org.landxml.schema.landXML11.TurnSpeedDocu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generates a random 96 bit (12 byte) Initialisation Vector(IV) for use in AESGCM encryption. See RFC 7518 (JWA), section 5.3.
public static byte[] generateIV() { byte[] bytes = new byte[ByteUtils.byteLength(IV_BIT_LENGTH)]; JCASupportConfiguration.getInstance().getSecureRandom().nextBytes(bytes); return bytes; }
[ "private byte[] generateRandomIV() {\n\t\tSecureRandom rand = new SecureRandom();\n\t\tif (givingSecureRandomSeedText != null && !(givingSecureRandomSeedText.equals(\"\"))) {\n\t\t\trand.setSeed(Long.parseLong(givingSecureRandomSeedText));\n\t\t}\n\t\tbyte[] iv = new byte[16];\n\t\trand.nextBytes(iv);\n\t\treturn i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the 'field686' field.
public void setField686(java.lang.CharSequence value) { this.field686 = value; }
[ "public com.maxpoint.cascading.avro.TestExtraLarge.Builder setField686(java.lang.CharSequence value) {\n validate(fields()[686], value);\n this.field686 = value;\n fieldSetFlags()[686] = true;\n return this; \n }", "public void setField687(java.lang.CharSequence value) {\n this.field687 ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "ruleCompositeState" $ANTLR start "entryRuleConcernLevel" PsiInternalStateConstraintTransition.g:1423:1: entryRuleConcernLevel returns [Boolean current=false] : iv_ruleConcernLevel= ruleConcernLevel EOF ;
public final Boolean entryRuleConcernLevel() throws RecognitionException { Boolean current = false; Boolean iv_ruleConcernLevel = null; try { // PsiInternalStateConstraintTransition.g:1423:54: (iv_ruleConcernLevel= ruleConcernLevel EOF ) // PsiInternalStateConstraintTr...
[ "public final Boolean ruleConcernLevel() throws RecognitionException {\n Boolean current = false;\n\n Token otherlv_0=null;\n Token lv_name_1_0=null;\n Token otherlv_3=null;\n Token otherlv_4=null;\n Boolean lv_state_2_0 = null;\n\n\n try {\n // PsiInterna...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Count word characters in the regex. We use this to (gu)estimate how slow resolving the terms matching this regex will likely be.
public static int countRegexWordCharacters(String pattern) { String trimmed = pattern.replaceAll("^\\^(\\(\\?-?[ic]\\))?|\\$$", ""); // trim off ^, $ and (?-i), etc. // only retain word characters return trimmed.replaceAll("\\W", "").length(); //trimmed.replaceAll("^(\\w*)(\\W(|.*\\W))(\...
[ "int getWordCount();", "public int count(String word);", "private double countOccurrences(String document, String word){\n \tdouble occurrences = 0;\n \tPattern pattern = Pattern.compile(word);\n\t\tMatcher matcher = pattern.matcher(document);\n\t\twhile(matcher.find())\n\t\t\toccurrences++;\n \treturn...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
train a teacher on the database
public static void trainTeacherOnDB(Teacher teacher) { //database file final String dbFile = Database.dbDir + "employees.txt"; // string to contain contents of the new file String newDbString = ""; // initialize file reader and scanner FileReader fr = null; try { fr = new FileReader(dbFile); } ca...
[ "private void addTeacher() {\n\t\t\n\t\tString lastName = tLastNameTF.getText();\n\t\tString firstName = tFirstNameTF.getText();\n\t\tString schoolName = tSchoolNameTF.getText();\n\t\tString userName = tUsernameTF.getText();\n\t\tchar[] password = tPasswordPF1.getPassword();\n\t\tString sA1 = tSecurityQ1TF.getText(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the value related to the column: failed2sentemail
public void setFailed2sentemail(final Boolean failed2sentemail) { this.failed2sentemail = failed2sentemail; }
[ "void setSentByEmail(long saleId) throws SQLException;", "public Boolean isFailed2sentemail() {\n\t\treturn this.failed2sentemail;\n\t}", "void setEmailError(final String error);", "void setFailure(String message) \r\n { \r\n \tmFailureMessage = message; \r\n }", "void updateEmail(){\n Strin...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
function to show doctor data
public void showDoctor() { Scanner sc = new Scanner(System.in); System.out.println("Enter Doctor ID for viewing data: "); String docid = sc.nextLine(); Doctor doc = searchDoctor(docid); if (doc == null) { System.out.println("Invalid Doctor ID."); } else { ...
[ "@Override\n\tpublic void showDoctorDetails() {\n\t\tif (UtilityClinic.docFile == null) {\n\t\t\ttry {\n\t\t\t\tutil.accessExistingDocJson();\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\tSystem.out.println(\"File not found\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tutil.readFromDocJson(UtilityClinic.docFile);...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Write info in NED trace
private void traceInfo(String info) { if (trace) { worker.trace("-- " + info + "\n", "out", device_id); } }
[ "public void traceInfo(String aMsg) {\r\n \t\tif (INFO) {\r\n\t\t\tfTraceMessage.setLength(0);\r\n \t\t\t//Timestamp\r\n \t\t\twriteTimestamp(fTraceMessage);\r\n \t\t\tfTraceMessage.append(\" I\");\r\n \t\t\twriteThread(fTraceMessage);\r\n \t\t\twriteLocation(fTraceMessage);\r\n \t\t\tfTraceMessage.append(aMsg);\r\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column u_code.GPSX
public void setGpsx(BigDecimal gpsx) { this.gpsx = gpsx; }
[ "public BigDecimal getGpsx() {\n return gpsx;\n }", "public void setMppfcLoccod(String value) {\n \n String oldValue = getMppfcLoccod();\n try{\n getAM().getBlk3Approve4VOFieldEvents().MppfcLoccod_pot();\n if(null!=value)\n setAttributeInternal(MPP...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A driver may convert the JDBC sql grammar into its system's native SQL grammar prior to sending it; nativeSQL returns the native form of the statement that the driver would have sent.
String nativeSQL(String sql) throws SQLException;
[ "public String nativeSQL(String sql) throws SQLException\n\t{\n\t\treturn sql;\n\t}", "protected abstract NativeSQLStatement createNativeAsBinaryStatement();", "public static List<NativeQuery> parseJdbcSql(String query, boolean standardConformingStrings,\n boolean withParameters, boolean splitStatements,\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Remote interface for SystemAdministracionCajaChica.
@Remote public interface SystemAdministracionCajaChica { public static final String JNDI_NAME = "ejb/SystemAdministracionCajaChica/remote"; public void setLlave( long llave ) throws java.rmi.RemoteException; /** * Business method * @param pCajaChica * @return * @throws com.trascender.f...
[ "@Remote\npublic interface SystemAdministracionConciliacionBancaria\n{\n\t\n\tpublic static final String JNDI_NAME = \"ejb/SystemAdministracionConciliacionBancaria/remote\";\n\n public void setLlave( long llave )\n throws com.trascender.framework.exception.TrascenderException, java.rmi.RemoteException;\n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get method for struct member 'spring_damping_y'.
public float getSpring_damping_y() throws IOException { if ((__io__pointersize == 8)) { return __io__block.readFloat(__io__address + 108); } else { return __io__block.readFloat(__io__address + 100); } }
[ "public float getSpring_damping_ang_y() throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn __io__block.readFloat(__io__address + 120);\n\t\t} else {\n\t\t\treturn __io__block.readFloat(__io__address + 112);\n\t\t}\n\t}", "double getDamping();", "double getyVelocity();", "public void se...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a List of CssMetaData instances that is merged by the given parameters
public static List<CssMetaData<? extends Styleable, ?>> createCssMetaDataList(CssMetaData<? extends Styleable, ?>... metaData) { return createCssMetaDataList(new ArrayList<>(), metaData); }
[ "public static List<CssMetaData<? extends Styleable, ?>> createCssMetaDataList(List<CssMetaData<? extends Styleable, ?>> baseList, CssMetaData<? extends Styleable, ?>... metaData) {\n List<CssMetaData<? extends Styleable, ?>> styleables = new ArrayList<>(baseList);\n styleables.addAll(Arrays.asList(me...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Represents the ECUTEST specific COMTestEnvironment API.
public interface ComTestEnvironment { /** * Gets the current test execution info. * * @return the {@link ComTestExecutionInfo} dispatch * @throws ETComException in case of a COM exception */ ComTestExecutionInfo getTestExecutionInfo() throws ETComException; /** * Starts the e...
[ "TestEnvironmentInterface getTestEnvironment();", "private Map<String, String> getTestProcessEnvironment() {\n Map<String, String> env = new HashMap<>();\n env.put(\"TESTSERVICE_AUTH_TYPE\", \"noAuth\");\n return env;\n }", "public TestEnvironment getTestEnvironment()\r\n {\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
end method displayTHForCoord Add DisplaySettings appropriate for this display
protected void addDisplaySettings(DisplaySettingsDialog dsd) { super.addDisplaySettings(dsd); dsd.addPropertyValue(getTimeFormat(), "timeFormat", "Time Label Format", SETTINGS_GROUP_DISPLAY); dsd.addPropertyValue(new Boolean(getReverseTime()), "reverseTime", ...
[ "private void setDisplay() {\n\t\tDisplayOpt.add(\"-sd\");\n\t\tDisplayOpt.add(\"/sd\");\n\t\tDisplayOpt.add(\"showdetails\");\n\n\t}", "public void setDisplayParameters(\r\n DisplayParameters displayPreferences\r\n ) {\r\n\r\n this.displayParameters = displayPreferences;\r\n\r\n }", "pr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets period from X hours in the past to now.
public static PeriodDt getPastHoursToNow(Clock clock, int hours) { Instant now = Instant.now(clock); return new PeriodDt() .setStart(new DateTimeDt(Date.from(now.minus(hours, ChronoUnit.HOURS)))) .setEnd(new DateTimeDt(Date.from(now))); }
[ "Period getEffectivePeriod();", "long getPeriod();", "public int getHowManyInPeriod();", "protected long getPeriod()\n {\n return 0;\n }", "public LocalDateTime checkPeriod() {\n\t\tLocalDateTime beforeThisTime = DateTimeHelper.now();\n\t\tperiod = period.toLowerCase();\n\t\tswitch(period){\n\t\tca...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }