query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
Determines if this document should hold its encumbrances because the trip end date belongs to a fiscal year which does not yet exist
protected boolean shouldHoldEncumbrance() { if (getTripEnd() == null) { return false; // we won't hold encumbrances if we don't know when the trip is ending } final java.sql.Date tripEnd = new java.sql.Date(getTripEnd().getTime()); return getTravelEncumbranceService().shouldH...
[ "protected boolean shouldHoldAdvance() {\n if (shouldProcessAdvanceForDocument() && getTravelAdvance().getDueDate() != null) {\n return getTravelEncumbranceService().shouldHoldEntries(getTravelAdvance().getDueDate());\n }\n return false;\n }", "private static Boolean checkYear(){\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the documentTypeCode value for this ScanDocumentValueObject.
public void setDocumentTypeCode(java.lang.String documentTypeCode) { this.documentTypeCode = documentTypeCode; }
[ "void setTypeCode(java.lang.String typeCode);", "public void setTypeCode(String typeCode) {\n this.typeCode = typeCode;\n }", "public void setTypeCode(String typeCode) {\r\n\t\tthis.typeCode = typeCode == null ? null : typeCode.trim();\r\n\t}", "public void setTypeCode(String typeCode) {\n th...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column TRS_SYN_SETLMT_ACC.MT579_CONTINUATION_CHAR
public void setMT579_CONTINUATION_CHAR(String MT579_CONTINUATION_CHAR) { this.MT579_CONTINUATION_CHAR = MT579_CONTINUATION_CHAR == null ? null : MT579_CONTINUATION_CHAR.trim(); }
[ "public String getMT579_CONTINUATION_CHAR() {\r\n return MT579_CONTINUATION_CHAR;\r\n }", "public void setINTERM_BANK_ACC(String INTERM_BANK_ACC) {\r\n this.INTERM_BANK_ACC = INTERM_BANK_ACC == null ? null : INTERM_BANK_ACC.trim();\r\n }", "public static void setEncapCharDelimiter(String enc...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
call the tooLow() method
public static void tooLow() { System.out.println("Amount tendered is too low. "); }
[ "public boolean includesLow() {\n return includeLow;\n }", "public void setLow(double low) {\n\t\tthis.low = low;\n\t}", "public boolean checkIfLow(){\n \t\treturn partsLow;\n \t}", "public void low() {\n\t\tprevLevel = level;\n\t\tlevel = LOW;\n\t\tSystem.out.println(location + \" ceiling fan is on l...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets QR codes for stop ids specified in csv file. This method retrieves QR codes in a batch as a zip file from remote server
public InputStream getQRCodesInBatch(File stopIdFile, int dimensions) throws IOException;
[ "public interface BarcodeService {\n\n\t/**\n\t * Gets QR codes for stop ids specified in csv file. This method retrieves QR codes in a batch as\n\t * a zip file from remote server\n\t * @param dimensions dimensions of the images\n\t * @return input stream of zip file containing qr code images\n\t */\n\tpublic Inpu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Unwraps wrapped certificates in a collection.
public static List<Certificate> unwrapCertCollection(final Collection<CertificateWrapper> wrappedCerts) { if (wrappedCerts == null) { return null; } else { final List<Certificate> list = new ArrayList<Certificate>(wrappedCerts.size()); for (final CertificateWrapper wr...
[ "public static List<CertificateWrapper> wrapCertCollection(final Collection<Certificate> certs) {\n if (certs == null) {\n return null;\n } else {\n final List<CertificateWrapper> list = new ArrayList<CertificateWrapper>(certs.size());\n for (final Certificate cert : c...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
carrega a tabela de Fornecedors ordenando pelo nome
private void carregaTabelaFornecedors(String valor, int teste){ String sql = "from Fornecedor order by razaoSocial "; if(valor != null && teste == 1){ sql = " from Fornecedor where razaoSocial like '%"+valor+"%' order by razaoSocial"; }else if(valor != null && teste == 2){ ...
[ "public void carregarTabela() {\n\t\ttry {\n\t\t\tcontrole.buscaClientesNome(tfPesquisa.getText());\n\t\t} catch (ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\ttbvPesqCliente.setItems(controle.getLista());\n\t}", "public void setTab...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
string buildingName1 = 18;
java.lang.String getBuildingName1();
[ "java.lang.String getBuildingName2();", "java.lang.String getHouseNo1();", "java.lang.String getHouseNo2();", "public void setBuildingNumber(String buildingNumber);", "java.lang.String getBuildingName();", "public String getBuilding() {\n return building;\n }", "public int getBuilding() {\n retur...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method sets the user's character as the heroPlayer.
public void setHeroPlayer(Player heroPlayer) { this.heroPlayer = heroPlayer; startGame(); }
[ "public void setPlayerhero(String playerhero) {\n this.playerhero = playerhero;\n }", "public void setPlayer(Player myPlayer){\n battlePlayer=myPlayer;\n }", "public String getPlayerhero() {\n return playerhero;\n }", "public void setHero(String name){\n if (currentHero !=...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Compare this Trip object with the specific object. The result is true if and only if the argument is a Trip object and has the same trip ID as this Trip object.
public boolean equals(Object obj) { if (obj instanceof Trip) { return getTripID().equalsIgnoreCase( ((Trip) obj).getTripID()); } return false; }
[ "@Override\n public boolean equals(Object o) {\n if (this == o) return true;\n if (o == null || getClass() != o.getClass()) return false;\n Flight flight = (Flight) o;\n return Id == flight.Id;\n }", "@Override\n public boolean equals(Object obj)\n { \n \tif(this == obj)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
CM707952 Set value to Batch no (Schedule no)
public void setBatchNo(String arg) { setValue(BATCHNO, arg); }
[ "public void setbatchNo(String value) {\n ensureVariableManager().setVariableValue(\"batchNo\", value);\n }", "public void setBATCH_NO(Date BATCH_NO) {\r\n this.BATCH_NO = BATCH_NO;\r\n }", "public void setScheduleBatch(java.lang.Boolean value);", "public void setBatchNo(String batchNo) {\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the queued date of this job.
@Override public void setQueuedDate(Date queuedDate) { model.setQueuedDate(queuedDate); }
[ "@Override\n\tpublic Date getQueuedDate() {\n\t\treturn model.getQueuedDate();\n\t}", "public synchronized final void setQueued(boolean qd) {\n\t\tsetFlag(RequestQueued, qd);\n\t}", "public void setCompletedDate(Date p_completedDate);", "@Override\n\tpublic void setRequestedDate(java.util.Date requestedDate) ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the entity keys.
public String[] getEntityKeys() { if (null == entityKeys) { entityKeys = EngineTools.getInstanceKeys(entityURI); } return entityKeys; }
[ "public List<String> getEntityKeys() {\n return this.entityKeys;\n }", "public List getEntityKeys() {\n return resultKeys;\n }", "List<String> getKeys() throws PersistenceException;", "public Iterable<Key> keys();", "java.util.List<com.icare.eai.schema.om.evSORequest.EvSORequestDocument.EvSORe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This static method constructs and returns a Flashcard object of Multiple Select type question.
public static Flashcard buildMultipleSelectCard(String subject, String question, List<String> selections, List<String> correctAnswers) { List<Answer<String>> ansSelections = new ArrayList<>(selections.size()), correctAns = new ...
[ "MultipleChoice createMultipleChoice();", "public static Flashcard buildMultipleChoiceCard(String subject, String question,\n List<String> choices, String correctAnswer)\n {\n List<Answer<String>> ansChoices = new ArrayList<>();\n Answer<String> ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
BA.debugLineNum = 66;BA.debugLine="Public Sub IsObject(obj As Object) As Boolean"; BA.debugLineNum = 68;BA.debugLine="Return IsTypeOf(obj, \"object\")";
public static boolean _isobject(Object _obj) throws Exception{ if (true) return _istypeof(_obj,"object"); //BA.debugLineNum = 70;BA.debugLine="End Sub"; return false; }
[ "public static boolean _istypeof(Object _obj,String _typeof) throws Exception{\nif (true) return (_stripjavatype(anywheresoftware.b4a.keywords.Common.GetType(_obj))).equals(_typeof.toLowerCase());\n //BA.debugLineNum = 55;BA.debugLine=\"End Sub\";\nreturn false;\n}", "public static boolean _isscalar(Object _mix...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Converts the painting to XML and returns the XML string
private String toXML(){ return "<paint>\n"+"\t<background_color>" + this.backgroundColor + "</background_color>\n" + touchArea.toXML() + "</paint>\n"; }
[ "public String exportAsXML() {\n\n StringBuffer sb = new StringBuffer( 1000 );\n sb.append( \"<GraphicFill>\" );\n sb.append( ( (Marshallable) graphic ).exportAsXML() );\n sb.append( \"</GraphicFill>\" );\n\n return sb.toString();\n }", "public String getXMLRepresentation(Str...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Consider the trace source "connected" if it's running and at least 1 measurement was parsed successfully from the file. This will catch errors e.g. if the trace is totally corrupted, but it won't give you any indication if it is partially corrupted.
@Override public boolean isConnected() { return mRunning && mTraceValid; }
[ "@Override\r\n\tpublic boolean hasErrorTrace() {\r\n\t\treturn (cs.getErrorTrace() != null);\r\n\t}", "boolean checkLiveTraces();", "boolean hasIfInL2ChanErrors();", "public static boolean CheckFrom() throws IOException {\r\n\t\tint count = 0;\r\n\t\tboolean toReturn = false;\r\n\t\tBufferedReader csvReader =...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Increments in 1 the number of records coming from the dataset (if any) parameter. Record the license.
public void collectDatasetUsage(String datasetKey, String license) { incrementDatasetUsage(datasetKey); if(license != null && !datasetLicensesString.contains(license)) { Optional<License> l = License.fromString(license); if(l.isPresent()) { datasetLicensesString.add(license); datase...
[ "public void incrementArcadoidDataVersionNumber() {\n\t\tthis.arcadoidDataVersionNumber += 1;\n\t}", "public void nextCatalogRecord() {\n\t\tcatalogRecordIndex.incrementAndGet();\n\t}", "public void setLicenseNumber( int license ) {\n\n licenseNumber = license;\n }", "public int getLicenseNumber() {...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A valid index into the bootstrap methods array of the bootstrap method table.
public abstract int getBootstrapMethodAttrIndex();
[ "public int getBootstrapMethodAttrIndex() {\n\t\treturn bootstrapMethodAttrIndex & 0xffff;\n\t}", "private int shrinkBootstrapMethodArray(BootstrapMethodInfo[] bootstrapMethods, int length)\n {\n if (bootstrapMethodIndexMap.length < length)\n {\n bootstrapMethodIndexMap = new int[lengt...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Caches the campuses in the entity cache if it is enabled.
public void cacheResult(java.util.List<Campus> campuses);
[ "@Override\n\tpublic void cacheResult(List<Campus> campuses) {\n\t\tfor (Campus campus : campuses) {\n\t\t\tif (entityCache.getResult(CampusModelImpl.ENTITY_CACHE_ENABLED,\n\t\t\t\t\t\tCampusImpl.class, campus.getPrimaryKey()) == null) {\n\t\t\t\tcacheResult(campus);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tcampus.resetOrig...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Interface for a generic binner.
public interface Binner<T> { /** * Adds the data to the binner. * * @param data the data * * @return The bin the data was added to. */ Bin<T> add(T data); /** * Adds the data to the binner. * * @param dataItems the data items */ void add...
[ "public interface Bike\r\n{\r\n /**\r\n * An enumeration defining the possible Colour classifications for\r\n * the Bike.\r\n */\r\n public enum Colour {RED, ORANGE, YELLOW, GREEN, BLUE, INDIGO, VIOLET, WHITE, BLACK};\r\n\r\n /**\r\n * Returns the Colour of this Bike\r\n * \r\n * @return the...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column t_capital_account.USABLE_CASH
public BigDecimal getUsableCash() { return usableCash; }
[ "public BigDecimal getCashAccount() {\r\n return cashAccount;\r\n }", "String getCashCollateralCurrency();", "public BigDecimal getCashoutAmount() {\r\n return cashoutAmount;\r\n }", "public BigDecimal getCashMoney() {\n return cashMoney;\n }", "public Long getShortCash() {\r\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get WETRN.APP_LNM_MCA_BL.IS_REUSABLE_OFFR as a field.
public static Field<BigDecimal> isReusableOffr(Field<? extends Number> pOffrId) { IsReusableOffr f = new IsReusableOffr(); f.setPOffrId(pOffrId); return f.asField(); }
[ "public static Field<BigDecimal> isReusableOffr(Number pOffrId) {\n\t\tIsReusableOffr f = new IsReusableOffr();\n\t\tf.setPOffrId(pOffrId);\n\n\t\treturn f.asField();\n\t}", "public boolean hasField772() {\n return fieldSetFlags()[772];\n }", "public String getLBR_NotaFiscalDocRef_UU();", "public java...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test method for 'com.elasticpath.domain.search.impl.CategorySearchCriteriaImpl.setActive(boolean)'.
@Test public void testSetActiveOnly() { this.categorySearchCriteria.setActiveOnly(true); assertTrue(this.categorySearchCriteria.isActiveOnly()); }
[ "@Test\n\tpublic void testSetInActiveOnly() {\n\t\tthis.categorySearchCriteria.setInActiveOnly(true);\n\t\tassertTrue(this.categorySearchCriteria.isInActiveOnly());\n\t}", "@Test\n\tpublic void testIsActiveOnly() {\n\t\tassertFalse(this.categorySearchCriteria.isActiveOnly());\n\t}", "@Test\n\tpublic void testIs...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the Geocode timeout
protected int getGeocodeTimeout() { return TIMEOUT_Geocode; }
[ "protected int getReverseGeocodeTimeout()\n {\n return TIMEOUT_ReverseGeocode;\n }", "public final int getLookupTimeout() {\n return m_lookupTmo;\n }", "long getTimeout();", "public final int getLookupTimeout() {\n return m_lookupTmo;\n }", "int getTimeout();", "int getRawTimeout(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets suppressed bounding boxes.
public List<BoundingBox> getSuppressedBoundingBoxes() { return suppressedBoundingBoxes; }
[ "public Rectangle boundingBox() {\n // corners of the descriptor window\n Point[] corners = new Point[4];\n corners[0] = new Point(center.x-size/2,center.y+size/2).rotate(theta,center);\n corners[1] = new Point(center.x+size/2,center.y+size/2).rotate(theta,center);;\n corners[2] =...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Interface for REST service handling upload of zipped Bagit containers.
public interface IBagItUploadController { /** * Handle upload of file (zipped BagIt container) * * @param file Instance holding content of file and attributes of the file. * @param redirectAttributes Attributes storing internal information. * * @return Website displaying information about uploaded ...
[ "ServiceResponse<UploadPackageArchive> uploadPackageArchive(InputStream stream);", "public interface UploadZipI {\n void uploadZipFile( String prjId, String sessionId, String errId,\n int fps, File file, Context context, LAErrorVideoAsset eva\n );\n}", "public interface ContainerSer...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get a StreamSource object representing the source of a query, given its URI. If the encoding can be determined, it returns a StreamSource containing a Reader that performs the required decoding. Otherwise, it returns a StreamSource containing an InputSource, leaving the caller to sort out encoding problems.
private StreamSource getQuerySource(Uri abs) throws XPathException { try { Object obj = resolver.GetEntity(abs, "application/xquery", Type.GetType("System.IO.Stream")); // expect cli.System.IO.FileNotFoundException if this fails if (obj instanceof Stream) { ...
[ "public Source resolve(String uri, String baseUri)\r\n \t\t\tthrows TransformerException {\r\n// \t\tLOG.debug(\"Resolve document URI: '\" + uri + \"'\");\r\n \t\tSource source = null;\r\n \t\ttry {\r\n\t \t\tDocument doc = database.getDocument(uri);\r\n\t \t\ttry {\r\n\t \t\t source = new S...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Private constructor of BlobFromFile.
private BlobFromFile() { }
[ "public BlobRef(String file, long offset, long length) {\n super(file, offset, length);\n }", "public Blob(String pathname) {\n super(pathname);\n _fileName = pathname;\n _contents = Utils.readContents(new File(_fileName));\n _id = Utils.sha1(_contents);\n }", "Blob(String fil...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
If the desired value for score calculation is 3 calculaLowSelected is run else calculateNotLowSelected is run
public void calculateScore(int selectedValue, String selectedName) { setSum(0); if (selectedValue == 3) { calculateLowSelected(selectedName); } else { calculateNotLowSelected(selectedValue,selectedName); } }
[ "private synchronized void evaluate(int indexOfInterest) {\r\n\r\n switch (indexOfInterest) {\r\n case 0: //evaluating values on the X axis\r\n if ((Math.abs(peakValue) >= 1.3) && (Math.abs(peakValue) <= 3.2) && !goodScoreUpdated && !mediumScoreUpdated && !badScoreUpdated) {\r\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Find the minimum cost tour when using one of the route as the root in a tree
public void FindMinTour(TreeNode<LinkedList<Node>> Route, LinkedList<Node> customers) { if (System.nanoTime() > end) { return; } if (Route.isLeaf()) { if (TreeTourCost(Route) < MinCost && AllCustomersAssigned(Route, customers)) { MinCost = TreeTourCost(Rou...
[ "private void findPath(){\n ArrayList<Tile> openTiles = new ArrayList<>();\n ArrayList<Tile> closedTiles = new ArrayList<>();\n\n currentTile.setParent(null); // In case there already was a parent before\n openTiles.add(currentTile);\n\n while(openTiles.size() > 0){ // Keep going\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column pataPerro.tm_elemento.fecha_modifico
public Date getFechaModifico() { return fechaModifico; }
[ "public Date getFechaModificacion() {\r\n\t\treturn fechaModificacion;\r\n\t}", "public java.lang.String getFechaModificado() {\n return fechaModificado;\n }", "public void setFechaModifico(Date fechaModifico) {\r\n this.fechaModifico = fechaModifico;\r\n }", "public Date getData_modifica(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
While the point is locked, we wait.
public synchronized void waitPoint() { try { while (isLocked) { wait(); } } catch (InterruptedException e) { e.printStackTrace(); } }
[ "public void pleaseWait() {\n while (!lock) {\n try {\n //sleep untill the common line become free\n sleep(10);\n } catch (InterruptedException ex) {\n Logger.getLogger(TrainStation.class.getName()).log(Level.SEVERE, null, ex);\n }...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the NamenodeProtocol RPC proxy for the NN associated with this DFSClient object
@VisibleForTesting public static NamenodeProtocol getNamenodeProtocolProxy(Configuration conf, URI nameNodeUri, UserGroupInformation ugi) throws IOException { return NameNodeProxies.createNonHAProxy(conf, DFSUtilClient.getNNAddress(nameNodeUri), NamenodeProtocol.class, ugi, false).getP...
[ "int getRpcPort();", "public NetworkProtocol getProtocol() {\n return _protocol;\n }", "public String getProtocol() {\n String protocol = getPropertyAsString(PROTOCOL);\n if (protocol == null || protocol.length() == 0) {\n return DEFAULT_PROTOCOL;\n }\n retu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the index of given guest view.
public int indexOfGuest(View aView) { for(int i=0,iMax=getGuestCount();i<iMax;i++) if(getGuest(i)==aView) return i; return -1; }
[ "public static int getIndexFromView(View view) {\n int[] position = getPositionFromId(view);\n int row = position[0];\n int col = position[1];\n return 9 * (row - 1) + col - 1;\n }", "public View getGuest(int anIndex) { return getChild(anIndex); }", "public int getViewPageNumber(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Additional Methods not mention in the Class Diagram Returns List of CartItem
public Vector<CartItem> getAllItem(){ return listCart; }
[ "public List<CartItem> getLiveCartItems();", "java.util.List<hipstershop.Demo.OrderItem> \n getItemsList();", "public List<ShopItem> getItemList();", "public List<Cart> retrieveAllCarts() throws UserApplicationException;", "java.util.List<Googleplay.LineItem> \n getSubItemList();", "hipste...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Register a ICodeSelectorTarget. This is informed when an alement is chosen in a CodeSelector.
public void setCodeSelectorTarget(final ICodeSelectorTarget target){ if (codeSelectorTarget != null) { codeSelectorTarget.registered(false); } codeSelectorTarget = target; codeSelectorTarget.registered(true); }
[ "public ICodeSelectorTarget getCodeSelectorTarget(){\n\t\treturn codeSelectorTarget;\n\t}", "public void removeCodeSelectorTarget(){\n\t\tif (codeSelectorTarget != null) {\n\t\t\tcodeSelectorTarget.registered(false);\n\t\t}\n\t\t\n\t\tcodeSelectorTarget = null;\n\t}", "void registerObserver(ISelectionObserver o...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Instantiates a new reimbursement request.
public ReimbursementRequest( Integer REIMBURSE_ID , Integer EMP_ID , Double REIMBURSE_COST , String REIMBURSE_EVENT_TYPE , String REIMBURSE_STATUS , String REIMBURSE_TIMESTAMP , LocalDate REIMBURSE_DATE , String REIMBURSE_LOCATION , String DEPT_NAME , LocalDate TIMEOFF_START , LocalDate TIMEOFF_END ) { th...
[ "public ReimbursementRequest( Integer rEIMBURSE_ID , Integer eMP_ID ,\n\t\t\tDouble rEIMBURSE_COST , String rEIMBURSE_EVENT_TYPE , LocalDate rEIMBURSE_DATE ,\n\t\t\tString rEIMBURSE_LOCATION , String reimburse_status ,\n\t\t\tString reimburse_timestamp , Double pending , String dEPT_NAME ,\n\t\t\tLocalDate tIMEOFF_...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removes all trade items of the same class as the given argument.
public void removeType(TradeItem someItem) { Iterator<TradeItem> itemIterator = items.iterator(); while (itemIterator.hasNext()) { if (itemIterator.next().getClass() == someItem.getClass()) { itemIterator.remove(); } } }
[ "void unsetItemtype();", "void hardRemoveAllBotsOfType( String className, String initiator ) {\n String rawClassName = className.toLowerCase();\n Integer numBots = m_botTypes.get( rawClassName );\n LinkedList<String> names = new LinkedList<String>();\n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
scaling the coordinate by a number
public Coordinate scale(double num) { return new Coordinate(uscale(_coord, num)); }
[ "public void scale(Point P, int scaleFactor) {\n\n\n }", "public abstract void setScale(float x, float y);", "@Override\n public void scale(double x, double y, double z) {\n GL11.glScaled(x, y, z);\n }", "void scale(Shape s, float width, float height, int start, int end);", "public int scale...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method will check if the Queue can handle another customer, if yes, it will add the customer If Queue is empty and no customer is being served, customer will be set to being_served
public boolean arrival() { if(q.isFull()) { return false; } else if(q.isEmpty() && (being_served == null)) { being_served = new Customer (clock); nowait++; // System.out.println(currCustomer().toString()); return true; } else ...
[ "public boolean hasCustomers()\n {\n\tif(queue.length > 0)\n\t {\n\t\treturn true;\n\t }\n\telse\n\t {\n\t\treturn false;\n\t }\n }", "public void addCustomer(SimClock sc, Customer c, PriorityQueue<StoreEvent> pq){\r\n customersServed++;\r\n this.custQueue.add(c);\r\n \r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Intent intent= new Intent(this, Notificaciones1.class); intent.putExtra("user", user); startActivity(intent);
private void GoToReclamosActivos () { Intent intent = new Intent(this, ReclamoActivo1.class); intent.putExtra("user",user); startActivity(intent); }
[ "@Override\n public void onClick(View v) {\n Bundle bundle = new Bundle();\n// bundle.putString(\"NowUserID\", getuserid);\n Intent intent = new Intent(C1_FriendsIndex.this, E1_WealthIndex.class);\n intent.putExtras(bundle);\n sta...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Run the SortedMap headMap(K) method test.
@Test public void testHeadMap_1() throws Exception { PatriciaTrie fixture = new PatriciaTrie(); fixture.incrementSize(); fixture.modCount = 1; SortedMap<Object, Object> result = fixture.headMap(null); // add additional test code here // An unexpected exception was thrown in user code while executing th...
[ "public static void main(String[] args) {\n\n // testLinkedHashMap();\n // System.out.println(\"---\");\n\n testTreeMap();\n }", "@Test\n\tpublic void testPrefixMap_1()\n\t\tthrows Exception {\n\t\tPatriciaTrie fixture = new PatriciaTrie();\n\t\tfixture.incrementSize();\n\t\tfixture.modCou...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
ReadIndex request a read state. The read state will be set in the ready. Read state has a read index. Once the application advances further than the read index, any linearizable read requests issued before the read request can be processed safely. The read state will have the same rctx attached.
void ReadIndex(context.Context ctx, byte[] rctx);
[ "public int get_read_index()\r\n { return read_index; }", "public synchronized int readIndex() {\n\t\treturn curIndex;\n\t}", "public IndexReader getIndexReader() throws IOException\n {\n return getIndexReader(true);\n }", "public void setReadInterest() {\n setInterestOperations(Selection...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
__________________________________________________________________________ Allow the user to double reveal once game has finished. __________________________________________________________________________
public void doubleRevealLose() { AlertDialog.Builder builder = new AlertDialog.Builder(game_activity_fb.this); builder.setCancelable(true); builder.setTitle("You Lost..."); builder.setMessage(UserName + " can now double reveal you.. "); builder.setPositiveButton("Leave Game", ...
[ "public void reveal() {\n revealed = true;\n }", "public void youHaveBeenExcommunicated(){\n youHaveBeenExcommunicatedPane.setVisible(true);\n PauseTransition delay = new PauseTransition(Duration.seconds(3));\n delay.setOnFinished( event -> youHaveBeenExcommunicatedPane.setVisible(f...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Subscribes the motor speed of the tank at the given interval. Can be called again with the same listener to change interval.
public void subscribeMotorSpeed(int interval, IntReceivedListener listener) throws UAClientException { subscribeInt(UAIdentifiers.MOTOR_RPM, interval, listener); }
[ "private void setIntervalSpeed(double lastSpeed) {\n DecimalFormat df = new DecimalFormat(\"#0.00\");\n tvLastSpeed.setText(df.format(lastSpeed) + \" KM/H\");\n }", "private synchronized void updateSpeed() {\n\t\tpos2D.setSpeed(fSpeed, tRate);\n\t}", "public void updateSpeed(int speed) {\n realTi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method to check if the element can be added to the queue.
@Override public boolean checkIfElementCanBeEnqueued(T element){ try{ this.enqueue(element); }catch(IndexOutOfBoundsException exception){ return false; } return true; }
[ "private boolean needToGrow() {\n if(QUEUE[WRITE_PTR] != null) {\n return true;\n }\n else {\n return false;\n }\n }", "public boolean isEnqueued() { throw new RuntimeException(\"Stub!\"); }", "public boolean canAddElements( ) {\r\n\r\n int[] addableEl...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[Deprecated: Use RelayEnbPnpConfigCreate] Create a RelayeNodeB Plug and play Config on the NMS. Requires NBIF Extensions Licence.
@WebResult(name = "UnityPnpConfigCreateResult", targetNamespace = "http://Airspan.Netspan.WebServices") @RequestWrapper(localName = "UnityPnpConfigCreate", targetNamespace = "http://Airspan.Netspan.WebServices", className = "Netspan.NBI_15_5.Lte.UnityPnpConfigCreate") @WebMethod(operationName = "UnityPnpConfigC...
[ "@WebResult(name = \"RelayEnbPnpConfigGetResult\", targetNamespace = \"http://Airspan.Netspan.WebServices\")\n @RequestWrapper(localName = \"RelayEnbPnpConfigGet\", targetNamespace = \"http://Airspan.Netspan.WebServices\", className = \"Netspan.NBI_15_5.Lte.RelayEnbPnpConfigGet\")\n @WebMethod(operationName =...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Loop through each slide and add elements to every slide and every slide to the presentation: Instantiate an array to add the slides to
private void parseSlidesAndSlideElements() { ArrayList<Slide> slideArray = new ArrayList<>(); //Find all elements named "slide" NodeList slideNodeList = xmlDocument.getElementsByTagName("slide"); if (slideNodeList.getLength() != 0) { //For all slides: for (int i...
[ "public void addSlides(List<Slide> s)\n\t{\n\t\tslides.addAll(s);\n\t}", "private static void createSlideTransitions() {\n\t\tif (slideList.size() < SLIDES_REGIONS_LIMIT) {\n\t\t\tint length = (slideList.size() / 2) - 1;\n\t\t\t\n\t\t\tif (slideList.size() % 2 == 0) {\n\t\t\t\tlength++;\n\t\t\t}\n\t\t\t\n\t\t\tfo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks if the provided quantity is under the medical limits. In case of error a message error is shown and a false value is returned.
public boolean alertCriticalQuantity(Medical medicalSelected, int specifiedQuantity) { try { Medical medical = ioOperationsMedicals.getMedical(medicalSelected.getCode()); double totalQuantity = medical.getTotalQuantity(); double residual = totalQuantity - specifiedQuantity; return residual < medic...
[ "private boolean checkValidQuantity (int quantity){\n if (quantity >= 0){\n return true;\n }\n return false;\n }", "public static boolean isValidQuantity(int quantity) {\n return quantity >= 0 && quantity <= 2000000000;\n }", "public boolean validateQuantity(String q...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the value of the 'RELRES' attribute. mandatoryfixed length
Integer getRELRES();
[ "public java.lang.String getResid() {\n java.lang.Object ref = resid_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toString...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
"Quit" was entered. Check the rest of the command to see whether we really quit the game.
private boolean quit(Command command) { if(command.hasSecondWord()) { Logger.Log("Quit what?"); return false; } else { return true; // signal that we want to quit } }
[ "private boolean quit(Command command) \n {\n if(command.hasSecondWord()) {\n System.out.println(\"Quit what?\");\n return false;\n }\n else {\n return true; // these shows that we want to quit\n }\n }", "private boolean quit(Command command) \n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Two buffered images are supplied, we'll extract each row of pixels from two images & apply division operator on each pixel, resulting image to be stored in different buffered image, which can be further processed / exported into file. Each row will be processed concurrently, leveraging power of modern multicore CPU.
public BufferedImage operate(BufferedImage operandOne, BufferedImage operandTwo) { if (!this.isEligible(operandOne, operandTwo)) { return null; } ExecutorService eService = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors()); BufferedImage sink = new BufferedIm...
[ "public static FloatProcessor divide (ImageProcessor op1, ImageProcessor op2){\n if ( (op1.getWidth()!=op2.getWidth()) || (op1.getHeight()!=op2.getHeight() ) ) \n throw new IndexOutOfBoundsException(\"divide: sizes must be equal.\");\n int size = op1.getWidth()*op2.getHeight();\n flo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub UIHomeSesion.animationHelper.goTo(new UIMenuImpl(),Animations.DISSOLVE);
public void goToUIMenu() { UIHomeSesion.uiHomeSesion.getUiMenuImpl(); }
[ "void clickFmFromMenu();", "IMenuView getMenuView();", "default public void clickMenu() {\n\t\tremoteControlAction(RemoteControlKeyword.MENU);\n\t}", "@Override\n public void onMenuOpen(int position) {\n }", "public static String _otb_navigationitemclick() throws Exception{\nmostCurre...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get a course's TA's info
public Student getTAInfo(String courseId) { for(Course cour : cour_Map.values()) { if(cour.getCourseId().equals(courseId)) { return cour.getStudentTA(); } } return new Student(); }
[ "public List<Course> getCourseByTA(String ta){\n\t\tArrayList<Course> list = new ArrayList<>();\n\t\tfor(Course cour : cour_Map.values()) {\n\t\t\tif(cour.getStudentTA().getName().equals(ta)) {\n\t\t\t\tlist.add(cour);\n\t\t\t}\n\t\t}\n\t\treturn list;\t\n\t}", "public String getTtac() {\n\t\treturn ttac;\n\t}", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks whether a resource is a collection based on its URI. If the resource name has an extention, the resource is assumed to be a NOT collection. NOTE: This means that collection names must not contain any dots!
private static boolean isCollection(String uri) { return (getResourceName(uri).indexOf('.') == -1); }
[ "@Override\n public boolean isCollectionURI(final AtomRequest areq) {\n LOG.debug(\"isCollectionURI\");\n // workspace/collection-plural\n // if length is 2 and points to a valid collection then YES\n final String[] pathInfo = StringUtils.split(areq.getPathInfo(), \"/\");\n if ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method prepares model with parameters to show in view with alcohols view
private void prepareModelWithParametersToView(Model model, AlcoholToSearch alcoholToSearch, HttpServletRequest request, String sortBy, String numberAlcoholInOnePage, int page){ model.addAttribute("listAlcoholsToC...
[ "protected void prepareModel() {\n model();\n }", "@Override\n protected void initModel() {\n bannerModel = new BannerModel();\n// homeSousuoModel = new Home\n\n// bannerModel = new BannerModel();\n// homeSousuoModel = new HomeSousuoModel();\n// izxListModelBack = n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Normalize data in selected column. TODO: Use bounds.
public void normalizeColumn(final int columnIndex) { double max = Double.NEGATIVE_INFINITY; double min = Double.POSITIVE_INFINITY; for (int i = 0; i < this.getRowCount(); i++) { double val = getLogicalValueAt(i, columnIndex); if (val > max) { max = v...
[ "public void deNormalise() {\n if ( minValues == null | maxValues == null ) return;\n\n // Minimum and maximum values calculated per column. DeNormalise it all...\n if ( trainingDataSet != null ) {\n for( int row = 0; row < trainingDataSet.length; row++ ) {\n for(int c...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Calculate and display the results such as average number of packets in queue, average delay in queue and idle time for the server.
private static void compute_performances(Server server) { System.out.println("E[N]: Average number of packets in the buffer/queue: " + round((double) runningBufferSizeCount / totalTicks)); System.out.println("E[T]: Average sojourn time: " + round((double) server.getTotalPacketDelay() / totalPackets + (double) s...
[ "private void aggregateStats() {\n\t\tfor (Map.Entry<Integer, ProcStats> entry : procStats.entrySet()) {\n\t\t\tfor (Map.Entry<Instant, Instant> startEndPair : entry.getValue().csStartAndEndTime)\n\t\t\t\taggStats.add(new HashMap.SimpleEntry(entry.getKey(), startEndPair));\n\t\t\ttotalWaitTime += entry.getValue().w...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Determines if there are any strings in the set.
public boolean isEmpty() { return this.strings != null ? this.strings.isEmpty() : true; }
[ "public boolean isEmpty() {\n return strings.isEmpty();\n }", "public boolean isEmpty(){\n if(set.length == 0)\n return true;\n return false;\n }", "public void testIsEmpty() {\r\n assertTrue( set(\"\").isEmpty() );\r\n assertFalse(set(\"aa\").isEmpty() );\r\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests that a moving tile can capture
public void testMoveWithCapture() { // Place a fox face-up int foxX = 0; int foxY = 0; board.addTile(fox, foxX, foxY); board.flipTile(Team.PREDATORS, foxX, foxY); // Place a face-up duck on the same X-axis as the fox int duckX = foxX; int duckY = maxBoardIndex; board.addTile(duc...
[ "boolean canMove(Tile t);", "@Test\r\n\tpublic void testCanShootThrough() {\r\n\t\tTile o = new OpenTile();\r\n\t\tTile b = new BlockedTile();\r\n\t\tTile s = new BlockedSeeThroughTile();\r\n\t\t\r\n\t\tassertTrue(o.canShootThrough());\r\n\t\tassertFalse(b.canShootThrough());\r\n\t\tassertTrue(s.canShootThrough()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets simple attribute by name.
SimpleAttribute<?> getSimpleAttribute(String name);
[ "public String getAttribute(String name)\n {\n return getValue(name);\n }", "public String getAttribute(String name);", "Object getAttribute(String name);", "public String getAttribute (String name) {\n return this.attributeMap.get( name );\n }", "public String getAttribute(String name) {\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set data with data from another register. WARNING: This will cast, not error.
public abstract void setData(Register<?> register);
[ "void setRegister(int ref, Register reg) throws IllegalAddressException;", "public void setData(T data) {\n\t this.data = data;\n\t }", "public void setData(Object data){\n \t this.data = data;\n }", "public void setData(V newData){\n\t\tdata = newData;\n\t}", "public void setData(Object...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test that the LayoutServer correctly rejects a PROPOSE_LAYOUT_REQUEST when there is not corresponding PREPARE_LAYOUT_REQUEST.
@Test public void testProposeRejectNoPrepare() throws IOException { Layout l = getDefaultLayout(); long payloadEpoch = 0L; long phase1Rank = 5L; // when there were no proposed rank before long defaultRank = -1L; RequestMsg request = getRequestMsg( get...
[ "@Test\n public void testForceLayoutReject() throws IOException {\n Layout l = getDefaultLayout();\n long payloadEpoch = 0L;\n long serverEpoch = 5L;\n RequestMsg request = getRequestMsg(\n getBasicHeader(ClusterIdCheck.CHECK, EpochCheck.IGNORE),\n getCom...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
control if the player has to use powerup to pay a specific price or it isn't necessary
public boolean mustUsePowerUpsToPay(List<Color> price) { if (!price.isEmpty() && price != null) { if (ammo != null && !ammo.isEmpty()) { if (price.get(0) == Color.ANY) return false; else { for (int i = 0; i < ammo.size(); i++) ...
[ "public void buyDamagePotion() {\n if (controller.getPlayer().getGold() > 5 && damagePotionLimit == 0) {\n controller.getMusicPlayer().playSoundEffects(\"resources/soundtracks/itemBoughtSound.wav\");\n controller.getMainFrame().getBtnDamagePotion().setVisible(true);\n control...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__AddExpr__Group__0" $ANTLR start "rule__AddExpr__Group__0__Impl" InternalMGPL.g:3832:1: rule__AddExpr__Group__0__Impl : ( ruleMulExpr ) ;
public final void rule__AddExpr__Group__0__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalMGPL.g:3836:1: ( ( ruleMulExpr ) ) // InternalMGPL.g:3837:1: ( ruleMulExpr ) { // InternalMGPL.g:3837:1: ( ruleMu...
[ "public final void ruleMulExpr() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMGPL.g:692:2: ( ( ( rule__MulExpr__Group__0 ) ) )\n // InternalMGPL.g:693:2: ( ( rule__MulExpr__Group__0 ) )\n {\n // Int...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
resolve the given variable name, and check accessability from the given class
public MemberVariable resolveMemberVariable (CompilerEnvironment env, String name) throws CompilerError, IOException { return null; }
[ "private Class<? extends VariableDescriptor> getClassByName(String className) {\n try {\n Class<?> loadClass = this.getClass().getClassLoader().loadClass(className);\n if (VariableDescriptor.class.isAssignableFrom(loadClass)) {\n return (Class<? extends VariableDescriptor...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Determine suitable implementation of gcd algorithms, case ModLong.
public static GreatestCommonDivisorAbstract<ModLong> getImplementation(ModLongRing fac) { GreatestCommonDivisorAbstract<ModLong> ufd; if (fac.isField()) { ufd = new GreatestCommonDivisorSimple<ModLong>(fac); return ufd; } ufd = new GreatestCommonDivisorPrimitive<M...
[ "static long gcd(long a, long b) { return (b == 0) ? a : gcd(b, a % b); }", "static long getGCD(long x, long y) {\n long a = Math.max(x, y);\n long b = Math.min(x, y);\n\n while (b != 0) {\n long r = a % b;\n a = b;\n b = r;\n }\n\n return a;\n }", "@Test\r\n\tpublic void test4() ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
importCompleted Imports from completed txt file to the completedQueue
public static void importCompleted() { Scanner scan; Task temp; File file = new File(completedFile); // file pointer if (file.length() != 0) { // if the file is not empty try { scan = new Scanner(file); // scan pointer temp = new Task(); String line; while (scan.hasNextLine()) { // while ther...
[ "public void onImportEnd(){}", "public void processNextImport() {\n //check if there are any more imports to process\n if (available.size() > 0) {\n //use first come first served\n process(available.firstElement(), 1);\n }\n }", "public void execute() {\n if (foundImportFile()) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO: Autogenerated Javadoc The Interface ScrapConsumer.
@FunctionalInterface public interface ScrapConsumer<K,V> extends Consumer<ScrapBin<K,V>>{ /** * And then. * * @param other the other * @return the scrap consumer */ default ScrapConsumer<K,V> andThen(ScrapConsumer<K,V> other) { Objects.requireNonNull(other); return bin -> { accept(b...
[ "public void consume() {\n\t\tconsumed = true;\n\t}", "Consumer getConsumer();", "private void consume()\r\n\t{\r\n\t\twhile (true)\r\n\t\t{\r\n\t\t\tSubscriberMessage sifMsg = queue.blockingPull();\t\t\t\t\r\n\t\t\tif (sifMsg != null)\r\n\t\t\t{\r\n\t\t\t\tlogger.debug(consumerID+\" has receive a message from ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Dao interface for TalentShow.
public interface TalentShowDao extends GenericDao<TalentShow> { }
[ "public interface CinemaShowsDao extends GenericDao<CinemaShows, Long> {\n\n}", "public interface TitlesDao {\r\n\r\n /**\r\n * Get a list of Titles\r\n *\r\n * @return a list of Title\r\n */\r\n List<Title> view();\r\n\r\n /**\r\n * A count of the Title table\r\n *\r\n * @ret...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method to retrieve the Lane via a supplied LanePrimaryKey.
@ApiOperation(value = "Gets a Lane", notes = "Gets the Lane associated with the provided primary key", response = Lane.class) @GET @Path("/find") @Produces(MediaType.APPLICATION_JSON) public static Lane getLane( @ApiParam(value = "Lane primary key", required = true) LanePrimaryKey key, ...
[ "public Lane getLane()\r\n\t{\r\n\t\treturn owner;\r\n\t}", "PanoPanorama selectByPrimaryKey(String panoramaId);", "AgentLevel selectByPrimaryKey(Long id);", "public Lane getLane(int lane) {\r\n\t\tif (lane < 0 || lane >= lanes.length) {\r\n\t\t\tString event = getClass().getSimpleName();\r\n\t\t\tSystem.out....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new activity with the primary key. Does not add the activity to the database.
public static Activity create(long activityId) { return getPersistence().create(activityId); }
[ "private void createActivityData() {\n\t\tActivity dtoActivity = new Activity();\r\n\t\tdtoActivity.setActivityCode(1L);\r\n\t\tdtoActivity.setData(\"someString\", \"string value\");\r\n\t\tdtoActivity.setData(\"someLong\", 1000L);\r\n\t\tdtoActivity.setOwner(new Principal(\"parvezshah\"));\r\n\r\n\t\tatrs.createAc...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
One method to calculate and set the min, max, mean, standard deviation, median, and then send the results to toString
public String computeStats(){ Collections.sort(data); this.min = Collections.min(data); this.max = Collections.max(data); // Calculates mean double sum = 0; for (int i = 0; i < data.size(); i++) { sum = sum + data.get(i); } mean ...
[ "public abstract void setMeanAndStdDeviation(double m, double s);", "public abstract void setStdDeviation(double s);", "@Override public String toString() {\n double stdDouble = getStandardDeviation();\n double meanDouble = getMean();\n SplitNumber std = new SplitNumber(stdDouble);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Called when the creep disappears from the game.
public void onDisappear(Entity creep, Room room) {}
[ "public abstract void disappear();", "public void onAppear(Entity creep, Room room) {\n\t\t\n\t\tGridPositionComponent gridPositionComponent = Mappers.gridPositionComponent.get(creep);\n\t\tSet<Entity> entitiesWithComponentOnTile = TileUtil.getEntitiesWithComponentOnTile(gridPositionComponent.coord(), CreepCompon...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return the user preferences property file ("~/ChAsE/prefs.properties").
public static synchronized File getPreferencesFile() { File applicationDirectoy = getApplicationDirectory(); File applicationPropertyFile = new File(applicationDirectoy, "prefs.properties"); if (!applicationPropertyFile.exists()) { try { applicationPropertyFile.crea...
[ "private static File getPrefsFile() {\r\n\t\treturn new File(RTextUtilities.getPreferencesDirectory(),\r\n\t\t\t\t\"projects.properties\");\r\n\t}", "public static String getUserPropertiesPath() {\n return self.get(\"usrFile\");\n }", "public final File getUserPropertiesFile() {\n\t\treturn userProper...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the end date in yyyyMMdd format.
public String getEndDateString() { SimpleDateFormat format = new SimpleDateFormat(DpdInputForm.DATA_FORMAT, Locale.ENGLISH); return format.format(new Date(this.endDate)); }
[ "public String getEndString() {\n SimpleDateFormat date = new SimpleDateFormat(\"MM/dd/yyyy\");\n return date.format(end.getTime());\n }", "Date getEndDate();", "String getDtend();", "long getEndDate();", "Date getEndDay();", "public Date getDtEnd() {\r\n return dtEnd;\r\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Instantiates a new unique array list. A unique array list is an array list that preserves the order of items as they are added, but discards subsequent duplicates.
public UniqueArrayList() { super(new ArrayList<T>()); }
[ "public static <TT> List<TT> create() {\r\n return new UniqueArrayList<TT>();\r\n }", "public static void main(String[] args) {\n List<String> aList=new ArrayList<>();//this is my arrayList we do not need to write a logic for removing we have collection framework !\n aList.add(\"John\");\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Same as `CGColorSpaceGetName' but with ownership released to the caller. APISince: 10.0
@Nullable @Generated @CFunction public static native CFStringRef CGColorSpaceCopyName(@Nullable CGColorSpaceRef space);
[ "@NotNull\n @Generated\n @CVariable()\n public static native CFStringRef kCGColorSpaceAdobeRGB1998();", "@NotNull\n @Generated\n @CVariable()\n public static native CFStringRef kCGColorSpaceSRGB();", "@NotNull\n @Generated\n @CVariable()\n public static native CFStringRef kCGColorSpac...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a DatabaseService for the accesskey management module.
@Produces @ApplicationScoped @AccessKeys public DatabaseService identityManagementDatabaseService() { return new DatabaseService(ds); }
[ "public static DatabaseService getDatabaseService() throws MambuApiException {\n\n\t\tvalidateFactorySetUp();\n\t\treturn injector.getInstance(DatabaseService.class);\n\t}", "java.lang.String getDatabaseService();", "public static synchronized DatabaseService getInstance() {\n\t\tif (service == null) {\n\t\t\ts...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Extract LinkedInUser from the response XML file.
public static LinkedInUser extractLoginUserInfo(String response) { Document responseXML; try { responseXML = loadXMLFromString(response); String firstname = responseXML.getElementsByTagName("first-name").item(0).getTextContent(); String lastname = responseXML.getElementsByTagName("last-name").item(0).getTe...
[ "String getLinkedInUserId();", "public abstract String extractLinkingId(User ldapUser);", "public JsonNode extractUserJson(final Document document) throws Exception {\n final String userData = getUserData(document);\n return mapper.readTree(userData.substring(userData.indexOf(\"{\"))...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
One of the SocketFamily values described above. optional .dnstap.SocketFamily socket_family = 2;
boolean hasSocketFamily();
[ "org.graylog.plugins.dnstap.protos.DnstapOuterClass.SocketFamily getSocketFamily();", "public org.graylog.plugins.dnstap.protos.DnstapOuterClass.SocketFamily getSocketFamily() {\n org.graylog.plugins.dnstap.protos.DnstapOuterClass.SocketFamily result = org.graylog.plugins.dnstap.protos.DnstapOuterClass.Socke...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__EParameterDefinitionBody__Group_1_1__1__Impl" $ANTLR start "rule__EParameterDefinitionBody__Group_1_2__0" InternalAADMParser.g:16571:1: rule__EParameterDefinitionBody__Group_1_2__0 : rule__EParameterDefinitionBody__Group_1_2__0__Impl rule__EParameterDefinitionBody__Group_1_2__1 ;
public final void rule__EParameterDefinitionBody__Group_1_2__0() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalAADMParser.g:16575:1: ( rule__EParameterDefinitionBody__Group_1_2__0__Impl rule__EParameterDefinitionBody__Group_1_2__1 ) ...
[ "public final void rule__EParameterDefinitionBody__Group_1_0__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAADMParser.g:16494:1: ( rule__EParameterDefinitionBody__Group_1_0__1__Impl )\n // InternalAADMParser.g:16495:2...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns true if field gid is set (has been assigned a value) and false otherwise
public boolean isSetGid() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __GID_ISSET_ID); }
[ "public boolean isSetGrpFill()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(GRPFILL$10) != 0;\n }\n }", "public boolean isSetGroupId()\n {\n synchronized (monitor())\n {\n check_orphaned();\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
escrita vendas metodo altera arquivo de vendas
public void alteraVendas(double[]vendas) throws IOException { File arquivo = new File("Reg/RegistroVendas/vendas.txt"); FileWriter escritor = new FileWriter(arquivo,false); BufferedWriter buffer = new BufferedWriter(escritor); String conteudo = ""; Locale.setDefault(Locale.US); for (...
[ "public void arquivoSaida() {\r\n\r\n try {\r\n File file = new File(\"arquivoSaida.txt\");\r\n try (FileWriter arquivoSaida = new FileWriter(file, true)) {\r\n arquivoSaida.write(\"Rota do menor caminho entre as cidades escolhidas: \\n\\n\");\r\n Vertice v...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
to build the NotFoundException for: get type by code not found
public static NotFoundException getTypeByCodeNotFound(final DataType type1, final String code1, final DataType type2, final String code2, final Throwable cause) { if (type1 != null && type2 != null) { NotFoundException e; final String message = "查找不到" + type1.getTypeName() + "编号为" + code1 + "且" + type2.getTy...
[ "public static NotFoundException getTypeByCodeNotFound(final DataType type, final String code) {\n\t\treturn getTypeByCodeNotFound(type, code, null);\n\t}", "public static NotFoundException getTypeByCodeNotFound(final DataType type, final String code, final Throwable cause) {\n\t\tif (type != null) {\n\t\t\tNotFo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Substract teopdn with 1.
public void substractTeopdn(int teavd);
[ "public void subtract()\n { \n operation = \"subtract\";\n previousValue = currentValue;\n currentValue = 0;\n afterD = false;\n value = 1;\n }", "public void sub_1_from_0() {\n x_0 -= x_1;\n y_0 -= y_1;\n }", "@Override\n public Scalar decrement() {\n r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__MethodBack__Group_4__0__Impl" $ANTLR start "rule__MethodBack__Group_4__1" InternalMyDsl.g:6874:1: rule__MethodBack__Group_4__1 : rule__MethodBack__Group_4__1__Impl ;
public final void rule__MethodBack__Group_4__1() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalMyDsl.g:6878:1: ( rule__MethodBack__Group_4__1__Impl ) // InternalMyDsl.g:6879:2: rule__MethodBack__Group_4__1__Impl { ...
[ "public final void rule__MethodBack__Group__4__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:6755:1: ( ( ( rule__MethodBack__Group_4__0 )? ) )\n // InternalMyDsl.g:6756:1: ( ( rule__MethodBack__Group_4__0 )?...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
bidirectional manytomany association to TblUsuario
@ManyToMany @JoinTable( name="tbl_usuario_nivel" , joinColumns={ @JoinColumn(name="cve_nivel", nullable=false) } , inverseJoinColumns={ @JoinColumn(name="cve_usuario", nullable=false) } ) public List<TblUsuario> getTblUsuarios() { return this.tblUsuarios; }
[ "@Test\n\tpublic void manyToManyTest() {\n\t\tSystem.out.println(\"============manyToManyTest=========\");\n\t\tUser u = new User();\n\t\tRole r = new Role();\n\t\tPrivilege p = new Privilege();\n\t\tUserRole ur = new UserRole();\n\t\tRolePrivilege rp = new RolePrivilege();\n\t\tDao.getDefaultContext().setShowSql(t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Compute the first day of the date quarter
private static LocalDateTime getFirstDayOfQuarter(final LocalDateTime localDate) { return localDate.with(temporal -> { int currentQuarter = YearMonth.from(temporal).get(QUARTER_OF_YEAR); switch (currentQuarter) { case 1: return LocalDate.from(temporal).atStart...
[ "public static Date getFirstDateOfQuarter() {\n Calendar q1= Calendar.getInstance();\n q1.set(Calendar.MONTH, 0);\t\n q1.set(Calendar.DAY_OF_MONTH,1);\n q1.set(Calendar.HOUR_OF_DAY, 0);\n q1.set(Calendar.MINUTE, 0);\n q1.set(Calendar.SECOND, 0);\n q1.set(Calendar.MIL...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the auto scale.
public void setAutoScale(boolean autoScale) { final boolean oldValue = this.autoScale; this.autoScale = autoScale; firePropertyChange("autoScale", oldValue, autoScale); }
[ "public static void setScale() {\n setXscale();\n setYscale();\n }", "void setScale(double scale);", "public void setScale(float scale);", "public void setScale() { \r\n final double x = max(this.data, 0);\r\n final double y = max(this.data, 1); \r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the domain ID.
void setDomainID(T domainID);
[ "public void setIdDomain( Long idDomain ) {\n this.idDomain = idDomain;\n }", "public Target setDomainId(String domain) {\n if (Strings.isValid(domain)) {\n this.domain = domain;\n }\n logger.trace(\"target '{}' is under domain '{}'\", id, this.domain);\n return this;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
public join(IAVLNode x, AVLTree t) joins t and x with the tree. Returns the complexity of the operation (|tree.rank t.rank| + 1). precondition: keys(x,t) keys(). t/tree might be empty (rank = 1). postcondition: none
public int join(IAVLNode x, AVLTree t) { int result = -1; if (this.empty() || t.empty()) { // join when t/tree is empty if (this.empty()) { if(!t.empty()) { result = t.getRoot().getRank(); } t.insert(x.getKey(), x.getValue()); this.root = t.getRoot(); this.min = t.min; th...
[ "public int join(IAVLNode x, AVLTree t)\r\n\t{\r\n\t\r\n\t\tint heighDiff = 0;\r\n\t\tif(this.empty()) {\r\n\t\t\tthis.root.setParent(x);\r\n\t\t\tthis.minimum = x;\r\n\t\t\tthis.maximum = x;\r\n\t\t\tif(t.empty()) {// both trees are empty\r\n\t\t\t\tthis.setRoot(x);\r\n\t\t\t\treturn 1;\r\n\t\t\t}\r\n\t\t\t }\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the amount of TNT this faction has stored in their virtual vault
public int getTNT() { return 0; }
[ "public int getAmountOfNutrients() {\n return amountOfNutrients;\n }", "public int getPassengerCount(){\r\n // go into \"private vault\" and retrieve\r\n // the value of a single member variable\r\n return passengerCount;\r\n }", "public double getTauxNicotineTotale() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Initialized with the teleport name.
public EnteringTeleportTrigger(String teleportName) { this.teleportName = teleportName; }
[ "protected Trainer(String tName, ArrayList<Pokemon> pTeam) {\n name = tName;\n team = pTeam;\n }", "public Teleporter()\n\t{\n\t\tsuper();\n\t\tdestination = new Location();\n\t}", "public BasicTunnel(String name) {\n\t\tsuper(name);\n\t}", "public void setTeleport(Vertex teleport) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Liefert eine Liste aller adjazenter Knoten zu v. Genauer: g.getAdjacentVertexList(v) liefert eine Liste aller Knoten w, wobei (v, w) eine Kante des Graphen g ist.
List<V> getAdjacentVertexList(V v);
[ "public Collection<Vertex> adjacentVertices(Vertex v) {\n Vertex parameterVertex = new Vertex(v.getLabel());\n if(!myGraph.containsKey(parameterVertex)){\n throw new IllegalArgumentException(\"Vertex is not valid\");\n }\n\n //create a copy of the passed in vertex to restrict ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
search Patients by lastname, firstname or svn, detailed search
public Collection<IPatient> searchPatients(String svn, String fname, String lname){ _model = Model.getInstance(); Collection<IPatient> searchresults = null; try { searchresults = _model.getSearchPatientController().searchPatients(svn, fname, lname); } catch (BadConnectionEx...
[ "@Override\n\tpublic void searchByName() {\n\t\tcount = 0;\n\t\tif (UtilityClinic.patFile == null) {\n\t\t\ttry {\n\t\t\t\tutil.accessExistingPatJson();\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.readFromPatJson(UtilityClini...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets pre evaluated value set.
public void setPreEvaluatedValueSet(boolean preEvaluatedValueSet) { this.preEvaluatedValueSet = preEvaluatedValueSet; }
[ "public void setPreEvaluatedValue(Object preEvaluatedValue) {\n this.preEvaluatedValue = preEvaluatedValue;\n }", "public void setIndivEvaluated (boolean val) {\r\n evaluado = val;\r\n }", "public void mutate() {\n \t//POEY comment: for initialise() -> jasmine.gp.nodes.ercs\n //suc...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Function responsible for sending requests into the MulticastDataBackup ("PUTCHUNK")
public void sendRequest(byte[] request) { // send request try { //get file id and chunk number String[] req = new String(request).split(" ",5); String fileID = req[3] , chunkNo = req[4]; //create socket MulticastSocket socket = new MulticastSo...
[ "protected void sendChunk() \n\tthrows IOException\n {\n\tif ( bufptr == 0 )\n\t return;\n\tsendChunk(buffer, 0, bufptr);\n\tbufptr = 0;\n }", "private void case_is_putchunk() {\n String hashmap_key;\n Random random;\n int wait_time;\n if (header.length != 6) {\n System.out.println(\"[\"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
If a Window/Frame/Dialog was made nonfocusable, then it is always nonfocusable.
public final boolean isFocusableWindow() { if (!getFocusableWindowState()) { return false; } // All other tests apply only to Windows. if (this instanceof Frame || this instanceof Dialog) { return true; } // A Window must have at least one Componen...
[ "boolean accessibilityFocusOnlyInActiveWindowLocked() {\n return !isTrackingWindowsLocked();\n }", "public boolean isFocusAvailable() {\r\n if (!isEnabled() || !isRequestFocusEnabled() || !isFocusable() || !isShowing())\r\n return false;\r\n else {\r\n Window modal = ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }