query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
Removes the block at the given coords for this blob
public void removeBlock(int x, int y, int z) { BlockPosition blockPos = new BlockPosition(x, y, z); graph.remove(blockPos); for(ForgeDirection direction : ForgeDirection.VALID_DIRECTIONS) { BlockPosition newBlock = blockPos.getPositionAtOffset(direction.offsetX, direction.offsetY, direction.offsetZ); if...
[ "void onRemoveBlock(long blockId, BlockStoreLocation location);", "void removeBlock(Block block);", "void onRemoveBlockByClient(long blockId);", "public void removeSign(Block block) {\n dirty = true;\n ListIterator<SignLocation> iterator = signLocations.listIterator();\n while (iterator.h...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column pay_user_info.cert_no
public String getCertNo() { return certNo; }
[ "public String getCertNo() {\r\n return certNo;\r\n }", "public BigDecimal getCERTIFICATE_NO() {\r\n return CERTIFICATE_NO;\r\n }", "public String getCertno() {\n return certno;\n }", "public Integer getCertificateNo() {\n return certificateNo;\n }", "public java.lang...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method copies all of the generated classes from the distributed cache to a local directory, and then seeks to resolve them and cache their respective SchemaTupleFactories.
private void copyAndResolve() throws IOException { if (abort) { LOG.debug("Nothing to resolve on the backend."); return; } // Step one is to see if there are any classes in the distributed cache if (!jConf.getBoolean(PIG_SCHEMA_TUPLE_ENABLED, SCHEMA_TUPLE_ON_BY_DE...
[ "GenClassCache get_genClassCache();", "public static void initCache() {\r\n\r\n Map<String, SoftReference<XmlSchema>> threadResolvedSchemas = resolvedSchemas.get();\r\n\r\n // If there is no entry yet for this thread ID, then create one\r\n if (threadResolvedSchemas == null) {\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A plaintext token approve transaction .PlainApprove plain_approve = 4;
public org.hyperledger.fabric.protos.token.Transaction.PlainApproveOrBuilder getPlainApproveOrBuilder() { if (dataCase_ == 4) { return (org.hyperledger.fabric.protos.token.Transaction.PlainApprove) data_; } return org.hyperledger.fabric.protos.token.Transaction.PlainApprove.getDefaultInstance...
[ "org.hyperledger.fabric.protos.token.Transaction.PlainApprove getPlainApprove();", "org.hyperledger.fabric.protos.token.Transaction.PlainApproveOrBuilder getPlainApproveOrBuilder();", "public org.hyperledger.fabric.protos.token.Transaction.PlainApprove getPlainApprove() {\n if (plainApproveBuilder_ == nu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Registers a handler when the client receives trailers.
public void onTrailers(final CompletionHandler<Map<String, List<String>>, Void> handler) { assert handler != null; onTrailers.add(handler); }
[ "void addHandlerListener(HandlerListener listener);", "public void addHandler(ClientHandler handler) {\n threads.add(handler);\n }", "public void addHandler(MessageHandler handler)\n\t{\n\t\tchain.addHandler(handler);\n\t}", "public void registerHandler( Handler handler ) {\r\n this.dispatche...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column usercheck.ifstay
public String getIfstay() { return ifstay; }
[ "public void setIfstay(String ifstay) {\n this.ifstay = ifstay;\n }", "public String getCheckUser() {\r\n return checkUser;\r\n }", "public String getCheckUser() {\n return checkUser;\n }", "public String getUserExists(){\n\t\treturn userExists;\n\t}", "public Integer getIfAuto...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add a PCM ResourceContainer
public void addResourceContainer(final SimulatedResourceContainer container) { assert (!this.resourceContainerHash.containsKey(container.getResourceContainerID())); this.resourceContainerHash.put(container.getResourceContainerID(), container); }
[ "public void addResource(Resource resource);", "StorageAsset addAsset(String path, boolean container);", "public void add(final ResourceCollection rc) {\n resources.add(rc);\n }", "public ResourceDeck(JComponent container){\n super(container);\n deck = new ArrayList<ResourceCard>();\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
methods ===================================================================== Configures the object based upon a node loaded from a schema configuration XML. The super.configure method should be invoked prior to any subclass configuration. The following attributes are configured: key maxlength cols rows delimiter
@Override public void configure(CfgContext context, Node node, NamedNodeMap attributes) { super.configure(context,node,attributes); setDelimiter(DomUtil.getAttributeValue(attributes,"delimiter")); }
[ "public void configure(Element node) throws Exception;", "public void parse(Element elCol) throws ConfigException{\n\t\tinitializeMembers();\n\t\t\n\t\t// get name\n\t\t_name = elCol.getAttribute(\"name\");\n\t\t//_logger.debug(\"Found column \" + _name);\n\t\tif(_name == null || _name.length() <= 0){\n\t\t\tthro...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method to send Delivery confirmation
public void sendMessageDeliveryConfirmation(Message message) { Stanza delStanza = new Message(); delStanza.addExtension(new DeliveryReceipt(message.getStanzaId())); delStanza.setTo(message.getFrom()); try { mXMPPTCPConnection.sendStanza(delStanza); } catch (SmackExce...
[ "private void sendConfirmation(Reservation reservation) {\n producerTemplate.sendBody(\"activemq:queue:reservationDoneQueue\", \"Confirmation of successful reservation with reservation id: \"+reservation.getId());\n }", "boolean sendOrderShippedEmail(final Properties properties) throws EmailException;",...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This API is used to set the default alarm threshold of an IP.
public CreateDefaultAlarmThresholdResponse CreateDefaultAlarmThreshold(CreateDefaultAlarmThresholdRequest req) throws TencentCloudSDKException{ JsonResponseModel<CreateDefaultAlarmThresholdResponse> rsp = null; String rspStr = ""; req.setSkipSign(false); try { Type type =...
[ "public DescribeDefaultAlarmThresholdResponse DescribeDefaultAlarmThreshold(DescribeDefaultAlarmThresholdRequest req) throws TencentCloudSDKException{\n JsonResponseModel<DescribeDefaultAlarmThresholdResponse> rsp = null;\n String rspStr = \"\";\n req.setSkipSign(false);\n try {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the optionsPanel attribute of the AntelopePanel object
protected Component getOptionsPanel() { return _options; }
[ "@Override\n public OptionsPanel getOptionsPanel() {\n return this.optionsPanel;\n }", "public ActivePanel GetOptionsPanel(){return null;}", "public static final OptionsPanel getOptionsPanel() { //{{{\n optionDlg = new AppOptionsPanel();\n return optionDlg;\n }", "public JOpti...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Load the list of all stored expressions.
public static synchronized List getStoredExpressions() { List storedExpressions = new ArrayList(); Preferences prefs = getUserNode("/equations"); try { String[] keys = prefs.keys(); for(int i = 0; i < keys.length; i++) storedExpressions.add(new StoredExpression(keys[i], prefs.get(keys[i], ""))); } cat...
[ "public void load() {\n\t\tfor (Event e : eList) {\n\t\t\tadd(e);\n\t\t}\n\t}", "public static synchronized void putStoredExpressions(List storedExpressions) {\n\ttry {\n\t // Remove old expressions\n\t Preferences prefs = getUserNode(\"/equations\");\n\t prefs.removeNode();\n\t prefs = getUserNode(\"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
reset status and start a new level
public void startNewLevel() { lastGameResult.set(true); pacMan.hide(); pacMan.dotEatenCount = 0; for (Ghost g : ghosts) { g.hide(); } flashingCount = 0; flashingTimeline.playFromStart(); }
[ "void startLevel();", "public void createLevel() {\n room = 1;\n currentLevelFinish = false;\n createRoom();\n }", "public void resetLevel() {\n \tLevel currentLevel = GetCurrentLevel();\n \tint index = currentLevel.GetIndex();\n m_InputStream = getClass().getClassLoader().g...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the visualizer data from the underlying Ds audio processing library. The retrieved visualizer data array starts with custom visualizer band gains, and followed by band excitations. Band gains and excitations are concatenated, not interleaved.
public int[] getVisualizerData() { DsLog.log3(LOG_TAG, "getVisualizerData"); int count = 0; // // Send EFFECT_CMD_GET_PARAM // EFFECT_PARAM_VISUALIZER_DATA // int numVisualizerData = DsAkSettings.getParamArrayLength("vcbg") + DsAkSettings.getParamArrayLength(...
[ "public java.util.List<java.lang.CharSequence> getBands() {\n return bands;\n }", "public java.util.List<java.lang.CharSequence> getBands() {\n return bands;\n }", "List<Band> bands() throws IOException;", "public BandList getBands();", "private void getDataSeries()\r\n\t{\r\n\t\t// Variables to...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__ERelationshipTypeBody__Group_1_5__1" $ANTLR start "rule__ERelationshipTypeBody__Group_1_5__1__Impl" InternalAADMParser.g:13316:1: rule__ERelationshipTypeBody__Group_1_5__1__Impl : ( LeftSquareBracket ) ;
public final void rule__ERelationshipTypeBody__Group_1_5__1__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalAADMParser.g:13320:1: ( ( LeftSquareBracket ) ) // InternalAADMParser.g:13321:1: ( LeftSquareBracket ) { ...
[ "public final void rule__ERelationshipTypeBody__Group_1_0__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAADMParser.g:12876:1: ( rule__ERelationshipTypeBody__Group_1_0__1__Impl )\n // InternalAADMParser.g:12877:2: rule...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Shows the custom edit summary input fragment, where the user may enter a summary that's different from the standard summary tags.
public void showCustomSummary() { editSummaryFragment.show(); }
[ "void setSummary(java.lang.String summary);", "public void setSummary(java.lang.String value) {\n this.summary = value;\n }", "public void setSummary(Content summary) {\n _summary = summary;\n }", "@Override\n public CharSequence getSummary() {\n final CharSequence baseSummary = super....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks if is right visited.
public boolean isRightVisited() { return rightVisited; }
[ "protected boolean visited(T node) {\n\t\treturn false;\n\t}", "public boolean allVisited() {\r\n\t\tif(rightVisited == true && leftVisited == true && downVisited == true && upVisited == true && aboveVisited == true && belowVisited == true)\r\n\t\t\treturn true;\r\n\t\telse\r\n\t\t\treturn false;\r\n\t}", "publ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a new ClanBossDao with an attached configuration
public ClanBossDao(Configuration configuration) { super(ClanBoss.CLAN_BOSS, ClanBossPojo.class, configuration); }
[ "public ClanBossDao() {\n\t\tsuper(ClanBoss.CLAN_BOSS, ClanBossPojo.class);\n\t}", "public ClanEventPersistentConfigDao(Configuration configuration) {\n\t\tsuper(ClanEventPersistentConfig.CLAN_EVENT_PERSISTENT_CONFIG, ClanEventPersistentConfigPojo.class, configuration);\n\t}", "public HibernateDAOFactory() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
method to save diagnosis and ID to a file
public String saveDiagnosisToFile(String diagnosis, String diagnosisFileName) { // creates a StringBuilder object StringBuilder sb = new StringBuilder(); // save the ID and diagnosis to a file sb.append( getIDnumber() + "|" ); sb.append( diagnosis + "|\n" ); // write t...
[ "private void writeIDToFile(RandomAccessFile file){\r\n\t\ttry{\r\n\t\t\tfile.getFilePointer();\r\n\t\t\tfile.writeInt(getID());\r\n\t\t} catch (Exception e) {\r\n\r\n\t\t}\r\n\r\n\t}", "@Override\r\n public void saveToFile(RandomAccessFile raf) {\r\n \r\n try {\r\n raf.writeInt(id);\r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
add car to database
public static void addCar (int cID ,Car c){ }
[ "public void add(Car car) {\n\t\tObjects.requireNonNull(car);\n\t\tstorage.put(car.getId(), new StoredCar(car, true));\n\t}", "public void addCarManufacturer (CarManufacturer carManufacturer){\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns all settings of the given parent module.
public List<Setting> getSettings(Module parent) { final List<Setting> filteredSettings = new ArrayList<>(); for (Setting setting : this.settings) { if (setting.getParent() == parent) filteredSettings.add(setting); } return filteredSettings; }
[ "public Setting getSetting(Module parent, String name) {\r\n for (Setting setting : this.settings) {\r\n if (setting.getParent() == parent && setting.getName().equalsIgnoreCase(name))\r\n return setting;\r\n }\r\n\r\n return null;\r\n }", "public List<Settings> ge...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates or finds a CreateMode from its string representation.
@JsonCreator public static CreateMode fromString(String name) { return fromString(name, CreateMode.class); }
[ "public static ModeType matchModeFromString(String modeString) {\r\n\t\tif(modeString.equalsIgnoreCase(\"octet\")){\r\n\t\t\treturn ModeType.OCTET;\r\n\t\t} \r\n\t\tif(modeString.equalsIgnoreCase(\"netascii\")) {\r\n\t\t\treturn ModeType.NETASCII;\r\n\t\t}\r\n\t\treturn Configurations.DEFAULT_RW_MODE;\r\n\t}", "M...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return a list of all contained Propertys with the given name.
public List<Property> getProperties( String name) { if ( name == null || name.isEmpty() || this.propertiesList == null || ! this.containsProperty( name ) ) { return Collections.emptyList(); } List<Property> matchingProps = new ArrayList<Property>(); for ( Property curProp : this.propertie...
[ "public List<Property> properties(String name)\n\t{\n\t\treturn filter(p -> p.getName().equals(name) && p instanceof Property)\n\t\t\t\t.stream()\n\t\t\t\t\t.map(e -> (Property) e)\n\t\t\t\t\t.collect(Collectors.toList());\n\t}", "public List<RawProperty> getExtendedProperties(String name) {\n\t\tList<RawProperty...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the label of the Z coordinate when the data is displayed in a table
public void setZLabel(String _label);
[ "public void setZLabel(final String str) {\n this.ZLabel.setText(str);\n this.ZLabel.setToolTipText(this.ZLabel.getText());\n }", "public void setZ(String s)\n\t{\n\t\tz.setText(s);\n\t}", "private static void drawTableCompenents() {\n\t\ttopColumn = new JLabel(\"location\");\r\n\t\ttopColumn.s...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get type of test environment.
private EnvironmentType getEnvironmentType() { String type = this.properties.getProperty("environmentType", "LOCAL"); return EnvironmentType.valueOf(type); }
[ "public EnvironmentType getEnvironmentType();", "@java.lang.Override public com.google.devtools.testing.v1.GetTestEnvironmentCatalogRequest.EnvironmentType getEnvironmentType() {\n @SuppressWarnings(\"deprecation\")\n com.google.devtools.testing.v1.GetTestEnvironmentCatalogRequest.EnvironmentType result = c...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Original author Pieter Pauwels This method writes the model to a turtle file (additional code K. McGlinn to output to an output directory
private Model writeModel(Model m){ try { String s1 = outputfile; javaCreateDirectory(); OutputStreamWriter char_output = new OutputStreamWriter( new FileOutputStream("output\\"+s1), Charset.forName( ...
[ "public void saveToFile(File file, Model model) throws IOException;", "public void saveFile() {\n\t\tString s = \"GoePhysical\\n\";\n\t\tVector v = geophysical;\n\t\tfor (int a = 0; a < v.size(); a++) {\n\t\t\ts += v.elementAt(a) + \"\\n\";\n\t\t}\n\t\ts += \"END\\n\\nThermal\\n\";\n\t\tv = thermal;\n\t\tfor (int...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
sets turtle orientation to new orientation Calls method to update view's turtle image
public void setTurtleOrientation(double newAngle){ System.out.println("in set turtle orientation"); myTurtle.setOrientation(newAngle); updateTurtleOnView(); }
[ "public void setOrientation(Direction orientation);", "public void updateTurtleOnView()\n\t{\n\t\t// update turtle info to View\n\t\tsetInfoParamsOfTurtleAndLine();\n\t\t\n\t\tif (this.isVisible() == 1)\n\t\t{\n\t\t\t// make turtle visible, then update turtle movement\n\t\t\tthis.myTurtleView.showTurtle(true);\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Test method for 'uk.co.neo9.apps.accounts.WIPTrackerTotalsComparator.initialiseFieldToUse()'
public void test_InitialiseFieldToUse() { int expectedFieldToUse = WIPTrackerTotalsModel.FID_CATEGORY; comparator.initialiseFieldToUse(); int fieldToUse = comparator.getFieldToUseId(); assertEquals("fieldToUse - initialised",expectedFieldToUse,fieldToUse); int testFeidlToUse = 666; comparator.se...
[ "void populateFields();", "protected void initDataFields() {\r\n //this module doesn't require any data fields\r\n }", "private void initFields() {\n\t\tthis.initResource();\n\t\tthis.initNumbers();\t\t\n\t}", "public void testGetSortField() {\r\n String sortField = \"test\";\r\n actio...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Parks a vehicle at a given level and returns parking slot number.
Optional<Integer> park(int level, Vehicle vehicle) throws ParkingException;
[ "Optional<Vehicle> seek(int level, int slotNumber) throws ParkingException;", "void createParkingLot(int level, int capacity) throws ParkingException;", "private boolean parkStartingAtSpot(int num, Vehicle v) { ... }", "public boolean parkVehicle(Vehicle vehicle) \r\n\t{\r\n\t\tfor (int i = 0; i < levels.leng...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column geo.accurate
public void setAccurate(Double accurate) { this.accurate = accurate; }
[ "public void setBottomRightLatitude(java.math.BigDecimal value);", "public void setLng(double lng);", "void setGeoCoordinate(org.datacontract.schemas._2004._07.system_device_location.GeoCoordinate geoCoordinate);", "@IcalProperty(pindex = PropertyInfoIndex.GEO,\n eventProperty = true,\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set a date value for the cell. Excel treats dates as numeric so you will need to format the cell as a date. This will set the cell value based on the Calendar's timezone. As Excel does not support timezones this means that both 20:00+03:00 and 20:0003:00 will be reported as the same value (20:00) even that there are 6 ...
void setCellValue(Calendar value);
[ "public void setDateValue(String cellName, Date date) {\n Cell cell = getCell(cellName);\n cell.setCellValue(date);\n }", "public void setHSSFCell(Object cellObject, Object value, Class<?> objectType, ISheetSession<?, ?> session) {\n\t\tHSSFCell cell = (HSSFCell) cellObject;\n\t\tcell.setCellValu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the threshold (inclusive) to use to consider an assignment random. E.g. PhosphoRS with one modifications in two sites, a score of 50% is considered random. Returns Double.NaN if the number of modifications equals zero or the number of sites.
public double getRandomThreshold( int nModifications, int nSites ) { if (nModifications == 0 || nModifications == nSites) { return Double.NaN; } switch (this) { case PhosphoRS: return BasicMathFunctions.getOneOverCombinatio...
[ "public static double getChance() {\n return Math.random();\n }", "public java.lang.String getBiasedRandomThreshold() {\r\n return biasedRandomThreshold;\r\n }", "int getThreshold();", "public double chanceToMiss(){\n double threeFourthsHealth = (double)originalHealth * 0.75;\r\n dou...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Compares, if int[] arrays are equal in length and elements
public static boolean compareArrays(int[] a, int[] b) { if (a.length != b.length) { return false; } else { int size = a.length; while (--size > 0) { if(a[size] != b[size]) { return false; } } } return false; }
[ "private boolean equal(int[] array1, int[] array2) {\n if (array1.length != array2.length) {\n return false;\n }\n for (int i = 0; i < array1.length; i++) {\n if (array1[i] != array2[i]) {\n return false;\n }\n }\n return true;\n }", "private boolean compareArr(BigInteger[] a...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Make all the confusion matrices with the following format: yesGivYes > Count(votedYes & goldYes) noGivYes > Count(votedNo & goldYes) yesGivNo > Count(votedYes & goldNo ) noGivNo > Count(votedNo & goldNo ) Put all initialized workers in a list
public static Map<String, Map> makeWorkers(ArrayList<String[]> data) { Map<String, Map> workersMap = new HashMap<String, Map>(); // Put all the matrices in a list int addIndex = 0, index, currentValue; for (String[] dataPoint : data) { String workerIDString = dataPoint[1]; // workerMatrix doesn't alrea...
[ "protected abstract List<ConfusionMatrix> calcConfusions();", "void confusionMatrix() throws MetricException.EmptyDataset {\n if(datasetSize == 0)\n throw new MetricException.EmptyDataset(\"Cannot calculate confusion matrix on any empty data set.\");\n Set<String> keys = new HashSet<>(gro...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Internal query to resolve the "customValues" tomany relationship of Note.
public List<CustomValue> _queryNote_CustomValues(long customValuesNoteId) { synchronized (this) { if (note_CustomValuesQuery == null) { QueryBuilder<CustomValue> queryBuilder = queryBuilder(); queryBuilder.where(Properties.CustomValuesNoteId.eq(null)); ...
[ "public List<CustomValue> _queryPersonalRelationship_CustomValues(long customValuesPersonalRelationshipId) {\n synchronized (this) {\n if (personalRelationship_CustomValuesQuery == null) {\n QueryBuilder<CustomValue> queryBuilder = queryBuilder();\n queryBuilder.where...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Withdraw money from account.
public void withdraw(double amountToWithdraw) { this.accountBalance = accountBalance - amountToWithdraw; }
[ "public void withdrawMoney(double money) {\n this.balance -= money;\n }", "void withdraw(double withdraw) {\n\t\t\n // Same as deposit but functions with subtraction from balance\n\t\tbalance -= withdraw;\n\t}", "public void withdrawCash(Money amount) {\n money.subtract(amount);\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Handles Files to restore
private void handleFiles() { try { RPG_Project rpgProject = new RPG_Project(pathToProject, verifyDir); Decrypter decrypter = new Decrypter(); rpgProject.setOutputPath(outputDir); decrypter.setIgnoreFakeHeader(ignoreFakeHeader); decrypter.setHeaderLen(headerLen); rpgProject.decryptFilesCmd(decrypter...
[ "void restore(String pathname) throws RemoteException;", "void restoreState(java.io.File file);", "private void restoreHandler(String[] argv){\n\t\tif (!isLoaded){\n \t\t\tSystem.out.println(\"BAD INPUT\");\n \t\t\treturn;\n \t\t}\n \t\tif (length == 1){\n\t\t\tcurrentImageRec.image.restoreOrigi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__Expression__Group__4__Impl" $ANTLR start "rule__Expression__Group__5" ../emfviews.dsl.ui/srcgen/emfviews/dsl/ui/contentassist/antlr/internal/InternalSqlview.g:1073:1: rule__Expression__Group__5 : rule__Expression__Group__5__Impl ;
public final void rule__Expression__Group__5() throws RecognitionException { int stackSize = keepStackSize(); try { // ../emfviews.dsl.ui/src-gen/emfviews/dsl/ui/contentassist/antlr/internal/InternalSqlview.g:1077:1: ( rule__Expression__Group__5__Impl ) // ../emfv...
[ "public final void rule__Expression__Group__4() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../emfviews.dsl.ui/src-gen/emfviews/dsl/ui/contentassist/antlr/internal/InternalSqlview.g:1046:1: ( rule__Expression__Group__4__Impl rule__Expres...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets an attribute from a style entry
public static String getStyleAttribute(String style, String attribute) { if (style == null) return null; String test1 = style.toUpperCase(); String test2 = attribute.toUpperCase(); int pos1 = test1.indexOf(test2 + ":"); if (pos1 == -1) return null...
[ "public StyleAttribute getAttributeFrom(ItemStyle itemStyle);", "String getCssValue(String attribute);", "private String getStyleAttribute() {\n StringBuilder sb = new StringBuilder();\n\n styleAttribute.forEach((key, value) -> {\n sb.append(key).append(\":\").append(value).append(\";\"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Unsets the "LocalNumbers" element
public void unsetLocalNumbers() { synchronized (monitor()) { check_orphaned(); get_store().remove_element(LOCALNUMBERS$6, 0); } }
[ "public void unsetLocalAccountNr()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(LOCALACCOUNTNR$4, 0);\n }\n }", "public void unsetLocal()\r\n {\r\n synchronized (monitor())\r\n {\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/System.out.println(new Code70().climbStairs(2)); System.out.println(new Code70().climbStairs(3)); System.out.println(new Code70().climbStairs2(2));
public static void main(String[] args) { System.out.println(new Code70().climbStairs2(4)); }
[ "public static void main(String[] args) {\r\n\t\tFish fish = new Fish();\r\n\t\tSalmon salmon = new Salmon();\r\n\t\tFish bob = new Salmon();\r\n\t\t\r\n\t\t/*fish.swim();\r\n\t\tsalmon.swim();\r\n\t\tbob.swim();\r\n\t\tfish.swim(5);*/\r\n\t\tsalmon.swim(5);\r\n }", "public static void main(String[] args) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
create tick direction according to path direction
private Shape creatTickDirection(Shape shape, float length, int size) { GeometryPath geom = new GeometryPath(shape); int div = size; if (length - div > 0 && length + 2 * div < geom.lengthOfPath()) { GeneralPath path = new GeneralPath(); Point2D p1 = geom.pointAtLength(length + 2 * div); Point2D pl = geom...
[ "public void setTickDirection (int ival)\n {\n tickDirection = ival;\n }", "public int getTickDirection ()\n {\n return tickDirection;\n }", "public void setTickDirection(TickDir v) {\n ticks.setDir(v);\n }", "Direction(int xDel, int yDel) {\n this.xDel = xDel;\n this...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns whether this position overlaps with position.
public boolean overlapsWith(LinkedPosition position) { return position.getDocument() == fDocument && overlapsWith(position.getOffset(), position.getLength()); }
[ "public final boolean isOverlaps()\r\n {\r\n return myOverlaps;\r\n }", "public boolean overlaps() {\n\t\tfor(int i = 0; i < getCircleCount(); i++)\n\t\t\tfor(int j = i + 1; j < getCircleCount(); j++)\n\t\t\t\tif(getCircle(i).overlapsWith(getCircle(j)))\n\t\t\t\t\treturn true;\n\t\treturn...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return either the first online player or the server itself through which we send the bungee message as
private static PluginMessageRecipient getThroughWhomSendMessage() { return Remain.getOnlinePlayers().isEmpty() ? Bukkit.getServer() : Remain.getOnlinePlayers().iterator().next(); }
[ "private static Player getThroughWhomSendMessage() {\n\t\treturn Remain.getOnlinePlayers().isEmpty() ? null : Remain.getOnlinePlayers().iterator().next();\n\t}", "Player getCurrentPlayer();", "com.huya.ig.jump.protocol.Player getPlayer();", "public boolean isFirstPlayer()\r\n\t{\r\n\t\tgetStartGameDataFromSer...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Setter for the field headFlag.
protected void setHeadFlag(boolean headFlag) { this.headFlag = headFlag; }
[ "protected void setHeadFlag( boolean headFlag )\n {\n this.headFlag = headFlag;\n }", "public void setHead(boolean head) {\n this.head = head;\n }", "public void setHead () {\n\t \t\n\t \tkind = HEAD;\n\t \t\n\t}", "public void setHead(String head) {\n _head = head;\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Title: ExtendedThreadManagerMXBean Description: Company: Helios Development Group LLC
@MXBean(true) public interface ExtendedThreadManagerMBean extends ThreadMXBean { /** * Returns the max depth used for getting thread infos * @return the max depth used for getting thread infos */ public int getMaxDepth(); /** * Sets the max depth used for getting thread infos * @param maxDepth ...
[ "public interface JMXManagedSchedulerMBean {\n\t/** The number of processors available to this JVM */\n\tpublic static final int CORES = ManagementFactory.getOperatingSystemMXBean().getAvailableProcessors();\n\t\n\t/** The Config property name suffix to specify the pool's core pool size */\n\tpublic static final S...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the batch time interval (in milliseconds) for a AsyncEventQueue. Default is 5 ms.
AsyncEventQueueFactory setBatchTimeInterval(int interval);
[ "AsyncEventQueueFactory setBatchSize(int size);", "void setBatchDelay(long value);", "void setSamplingTaskRunIntervalMs(long ms);", "void setSamplingIntervalMs(long ms);", "void setMilliseconds(int milliseconds);", "void setThreadDuration(int value);", "public void setBatchSize(Integer batchSize)\n {...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Determine if the given app orientation is compatible with the provided rotation choice
public boolean isValidRotationChoice(int orientation, final int preferredRotation) { switch (orientation) { case ActivityInfo.SCREEN_ORIENTATION_FULL_USER: // Works with any of the 4 rotations return preferredRotation >= 0; case ActivityInfo.SCREEN_ORIENT...
[ "public boolean isRotationChoicePossible(int orientation) {\n if (mUserRotationMode != WindowManagerPolicy.USER_ROTATION_LOCKED) return false;\n\n // We should only enable rotation choice if the rotation isn't forced by the lid, dock,\n // demo, hdmi, vr, etc mode\n\n // Determine if the...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get Employee Hierarchy 5
public java.lang.String HR_GetEmployeeHierarchy5(java.lang.String accessToken, java.lang.String hie3, java.lang.String hie4) throws java.rmi.RemoteException;
[ "public java.lang.String HR_GetEmployeeHierarchy6(java.lang.String accessToken, java.lang.String hie3, java.lang.String hie4, java.lang.String hie5) throws java.rmi.RemoteException;", "public java.lang.String HR_GetEmployeeHierarchy4(java.lang.String accessToken, java.lang.String hie3) throws java.rmi.RemoteExcep...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ This method is called each second. Do not put inside blocking operations
protected void runEachSecond() { }
[ "@Override\n\tpublic void run() {\n for(int i = 0; i < 2000; i++){\n buffer.add(Reading.createObject());\n }\n\t}", "@Override\n public void run() {\n try {\n long seconds = Calendar.getInstance().get(Calendar.SECOND);\n Thread.sleep(1000 * (6...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__AstConnectionAttribute__Group__3" $ANTLR start "rule__AstConnectionAttribute__Group__3__Impl" ../org.caltoopia.frontend.ui/srcgen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:6444:1: rule__AstConnectionAttribute__Group__3__Impl : ( ';' ) ;
public final void rule__AstConnectionAttribute__Group__3__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:6448:1: ( ( ';' ) ) /...
[ "public final void rule__AstConnectionAttribute__Group__3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:6437:1: ( rule__AstConnecti...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the point the vehicle will drive to next.
public void setNextPoint(PointModel point) { fNextPoint = point; }
[ "@Override\n public void setNextPoint(Point thePoint) {\n myNextPoint = thePoint;\n }", "public void setDistanceSetpoint(double distanceToTravel) {\r\n\t\tfor(int i = 0; i < 4; i++) {\r\n\t\t\tmotor[i].setDistanceSetPoint(distanceToTravel);\r\n\t\t}\r\n\t}", "public void setNext(ListPoint next) {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get any other information recorded for event i in the history.
public String getOtherInfo(int i) { return this.history.get(i).otherInfo; }
[ "public Event getEvent(int i) {\n\t\treturn EventTracking.get(i);\n\t}", "public java.lang.String getOtherHistory () {\n\t\treturn otherHistory;\n\t}", "public java.util.List<InvocationMetric> getHistory() {\n return (Collections.unmodifiableList(_history));\n }", "public pb4server.ActivityHistoryVo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test the inventory manager does not vend items when out of stock
@Test public void testDoesNotVendWhenOutOfInventory() { System.out.println("testDoesVend"); assertTrue( manager.vendInventory( cola ) ); assertTrue( manager.vendInventory( cola ) ); assertTrue( manager.vendInventory( cola ) ); // Reset vender stub state v...
[ "@Test\n\tpublic void testWrongItemInventory() {\n\t\tint ret_val;\n\t\tArrayList<String> wrong_inv = new ArrayList<String>();\n\t\twrong_inv.add(\"Fishsticks\");\n\t\tret_val = CoffeeMaker2.display_inventory(wrong_inv);\n\t\tassertEquals(0, ret_val);\n\t}", "@Test(expected=UnavailableItemException.class)\n\tpubl...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Methods for Recoded variables
public boolean hasRecodedVariables(){ boolean rv = false; if ((recodeSchema != null) && (recodeSchema.size()> 0)){ rv = true; } return rv; }
[ "public String resolve(String varname) {\n try {\n String resolved = cvResolver.translate(varname);\n return resolved;\n } catch (MappingNotAvailableException mnae) {\n log.warn(\"Could not map variable: \" + varname, mnae);\n return varname;\n }\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__XImportDeclaration__Group__1" $ANTLR start "rule__XImportDeclaration__Group__1__Impl" ../org.xtext.example.helloxcore.ui/srcgen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:14846:1: rule__XImportDeclaration__Group__1__Impl : ( ( rule__XImportDeclaration__Alternativ...
public final void rule__XImportDeclaration__Group__1__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:14850:1: ( ( ( rul...
[ "public final void rule__XImportDeclaration__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:16455:1: ( ( ( r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Access methods for optional leaf child: "gprssessactsuccessrate". Gets the value for child leaf "gprssessactsuccessrate".
public YangUInt32 getGprsSessActSuccessRateValue() throws JNCException { return (YangUInt32)getValue("gprs-sess-act-success-rate"); }
[ "public void addGprsSessActSuccessRate() throws JNCException {\n setLeafValue(Epc.NAMESPACE,\n \"gprs-sess-act-success-rate\",\n null,\n childrenNames());\n }", "public YangUInt32 getGprsAttachSuccessRateValue() throws JNCException {\n return (YangUInt32)getValue(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Criteria supported in hardware are specific of each model.
protected abstract void initHardwareCriteria();
[ "boolean modelSupports(Object modelID, int modelConstant) throws Exception;", "java.lang.String getDeviceModel();", "public void resetCriteria() {\n \n if (inputConfig==null || inputConfig.getInput()==null) return;\n \n differentialPrivacyModel = new ModelDifferentialPrivacyCriterion...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
public void prepareAsync(StarObjectClass self)
public void prepareAsync(StarObjectClass self){ StarCLEMediaPlayer mediaplayer = (StarCLEMediaPlayer)WrapAndroidClass.GetAndroidObject(self,"AndroidObject"); if( mediaplayer == null ) return; mediaplayer.prepareAsync(); }
[ "public void prepare(StarObjectClass self){ \r\n \t\tStarCLEMediaPlayer mediaplayer = (StarCLEMediaPlayer)WrapAndroidClass.GetAndroidObject(self,\"AndroidObject\");\r\n \t\tif( mediaplayer == null )\r\n \t\t\treturn;\r\n \t\ttry{\r\n \t\t\tmediaplayer.prepare();\r\n \t\t}c...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a new XmlTransformer that validates using the given schemas, but uses the given classes (rather than generated ones) for marshaling and unmarshaling.
public XmlTransformer(List<String> schemaFilenames, Class<?>... recognizedClasses) { try { this.jaxbContext = JAXBContext.newInstance(recognizedClasses); this.schema = loadXmlSchemas(schemaFilenames); } catch (JAXBException e) { throw new RuntimeException(e); } }
[ "public XmlTransformer(Package pakkage, ImmutableMap<String, String> schemaNamesToFilenames) {\n try {\n this.jaxbContext = initJaxbContext(pakkage, schemaNamesToFilenames.keySet());\n this.schema = loadXmlSchemas(ImmutableList.copyOf(schemaNamesToFilenames.values()));\n } catch (JAXBException e) {\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check the trajectories timestamp and calculate the distance between every trajectory in the list to the query trajectory, return a sorted list of NN by distance. Calculate the NN object only for the new trajectories (i.e. trajectories not contained in current list).
private List<NearNeighbor> getCandidatesNN( final JavaRDD<Trajectory> candidateRDD, final List<NearNeighbor> currentList, final Trajectory q, final long t0, final long t1){ if(candidateRDD != null){ List<NearNeighbor> nnCandidatesList = // filter out new trajectories, and refine time candidat...
[ "private List<NearNeighbor> getCandidatesNN(\n\t\t\tfinal JavaRDD<Trajectory> candidateRDD, \n\t\t\tfinal List<NearNeighbor> currentList,\n\t\t\tfinal Trajectory q,\n\t\t\tfinal long t0, final long t1){\n\t\tif(candidateRDD != null){\n\t\t\tList<NearNeighbor> nnCandidatesList = \n\t\t\t\t// filter out new trajector...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
0xFX65 fill V0 > VX with values from memory point index
public void memFill() { int X = (opcode & 0x0F00) >> 8; //System.out.println("X: " + X); //System.out.println("Index: " + index); for (int i = 0; i <= X; i++) { V[i] = (memory[index + i]) & 0xFF; } //index += X + 1; pc += 2; }
[ "public void fillVector(){\n int n = min.length;\n for (int i = 0; i < n; i++) {\n this.x[i] = min.x[i] + (max.x[i] - min.x[i])*rn.uniformDeviate();\n }\n }", "public void setV() {\r\n V[(opcode & 0x0F00) >> 8] = V[(opcode & 0x00F0) >> 4];\r\n pc += 2;\r\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Recursively find the effective ACL as a URI along with the FedoraResource that points to it. This way, if the effective ACL is pointed to from a parent resource, the child will inherit any permissions that correspond to access to that parent. This ACL resource may or may not exist, and it may be external to the fedora ...
Optional<ACLHandle> getEffectiveAcl(final FedoraResource resource, final boolean ancestorAcl) { try { final FedoraResource aclResource = resource.getAcl(); if (aclResource != null) { final List<WebACAuthorization> authorizations = getAuthorizations(a...
[ "AccessRights getEffectiveAccessRightsForPrincipal(Session session, String absPath, String principalId) throws InternalException;", "Map<Principal, AccessRights> getEffectiveAccessRights(Session session, String absPath) throws InternalException;", "private List<WebACAuthorization> getAuthorizations(final Fedora...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
m to the power n where n>=0
static int power(int m, int n) { if (n==0) return 1; else return m*power(n-1); // recursion! }
[ "public int powerN(int base, int n) {\n\n if (n == 0) {\n return 1;\n }\n\n return base * powerN(base, n - 1);\n }", "private static double power(double n, int rootNumber) {\r\n\t\tdouble result = n;\r\n\t\tfor (int i = 1; i < rootNumber; i++) {\r\n\t\t\tresult *= n;\r\n\t\t}\r\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the correct display string for the unread count of a folder.
public static String getUnreadCountString(Context context, int unreadCount) { final String unreadCountString; final Resources resources = context.getResources(); if (sMaxUnreadCount == -1) { sMaxUnreadCount = resources.getInteger(R.integer.maxUnreadCount); } if (unrea...
[ "public static int getFolderUnreadDisplayCount(final Folder folder) {\n if (folder != null) {\n if (folder.isUnreadCountHidden()) {\n return folder.totalCount;\n } else {\n return folder.unreadCount;\n }\n }\n return 0;\n }", "...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Deploy application completely using the given application package
public void deployCompletely(Application application, ApplicationPackage applicationPackage) { deployCompletely(application, applicationPackage, BuildJob.defaultBuildNumber); }
[ "public static void deployApplication() throws BundleException {\n File application = new File(APPLICATION_BUNDLE);\n File base = new File(\".\");\n if (!application.isFile()) {\n try {\n BundlePackager.bundle(base, application, new Reporter() {\n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
functie care pune un consumator in lista de contracte a celui mai bun distribuitor, pune idul distribuitorului cu care consumatorul are contract in variabila contractTo si lunile de durata a contractului in remainedContractMonths. Functia populeaza hashmapul mapClientBills astfel in cat sa stim cat trebuie sa plateasca...
public void makeContracts(final List<Consumer> consumerList, final Distributor bestDistributor, final HashMap<Long, Long> mapContractPrices, final HashMap<Long, Long> mapClientBills) { for (Consumer consumer : consumerList...
[ "public static void main(String[] args) {\n Client client1 = new Client(\"tchuenkam\",\"ulrich\",21);\n\n // Add the created accounts to client 1\n// client1.ajouterCompte(compte1);\n// client1.ajouterCompte(compte2);\n// client1.ajouterCompte(compte3);\n// client1.ajouterCo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new stream updater for this accessor.
public StreamUpdater() { }
[ "default void update(StreamElement element) {}", "default void refreshStream() {}", "protected AbstractPullBufferStream createStream(int streamIndex, FormatControl formatControl)\n\t{\n\t\treturn new OpenSLESStream(this, formatControl);\n\t}", "private void upgradeStream() throws IOException {\n LOG.info(\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new animal of animal type. At this point the returned animal is not persisted and does not have an id. It should be persisted using updateOrSave
public Animal create(AnimalType animalType);
[ "public static com.liferay.model.PersistedAnimal createPersistedAnimal(\n\t\tlong animalId) {\n\n\t\treturn getService().createPersistedAnimal(animalId);\n\t}", "public TipoAnimalEntity createTipoAnimal(TipoAnimalEntity entity){\n persistence.insert(entity);\n return entity;\n }", "@PostMapping...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create the transform controls panel. The transform controls are: switching between the "move" (move the complete viewpoint/graph) and "pick" (drag and drop one object or a set of objects), checkbox for instant saving the new position and zooming.
protected JPanel getTransformActionsPanel() { final boolean isMac = SystemTools.isMac(); // Get all translation texts final String controlsTitle = Internationalization.getText("application.graph.sidebar.controls.transform.title"); final String controlsMove = Internationalization.getText("application.graph...
[ "private void buildGUI() {\n\n FXMLLoader loader = new FXMLLoader(getClass().getResource(EXERCISE_CONTROLS_PATH));\n try {\n loader.setController(this);\n GridPane exerciseLayout;\n exerciseLayout = loader.load();\n container.setBottom(exerciseLayout);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Quick helper to search customer based on the customerid/name and return quick html
public static Result customerSearch(String query) { Page<models.Customer> customers = models.Customer.findByQuickSearch(query); return ok(customer_search.render(customers)); }
[ "List<Customer> searchCustomers(String name);", "Customer search(String login);", "void searchingCustomer (String name, String surname);", "ISearchResults<? extends ICustomer> listCustomers(ICustomerSearchCriteria criteria) throws SiteWhereException;", "public Customer getCustomerByName(String customerName)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
point server address to test index
public void setTestSettings(String testServerAddress) { INDEX_NAME = testServerAddress; }
[ "public void testServerFound()\n {\n }", "public void testSetHost() {\n }", "boolean useAddressServer();", "public TestServer getServer(int port) {\n return testServerMap.get(\"test:\" + port);\n }", "protected LookupLocator getRemoteTestLocator(int indx) {\n /* Locator for lookup se...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructs a type&47; media type.
public MediaType(String type) { this(type, WILDCARD_TYPE, Collections.emptyMap()); }
[ "public MediaTypeBuilder () {\n this.parameters = new HashMap<String, String>();\n this.type = \"application\";\n this.subtype = \"octet-stream\";\n }", "MediaType createMediaType();", "public MediaTypeBuilder (String type, String subtype) {\n this.parameters = new HashMap<String, String>...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieve all fields from object.
private static Field[] retrieveAllFields(final Object object) { Field[] fieldsArray = null; // - Retrieve fields array from cache if exists. if (KerAnnotation.fieldsCache.containsKey(object.getClass())) { fieldsArray = KerAnnotation.fieldsCache.get(object.getClass()); } // - Else get fields and cac...
[ "private static <T> Field[] getFieldsObject(T object) {\n\t\treturn object.getClass().getDeclaredFields();\n\t}", "public static Set<Field> getAllInstanceFields(Object object) {\n return findAllFieldsUsingStrategy(new AllFieldsMatcherStrategy(), object, true, true,\n getUnproxyType(object));...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Queues a STROKE message for the specified stroke to be sent to the client without priority. This is called by the server on all editors of a board to notify them that a new line has been drawn on the board.
public void notifyStroke(WhiteLine stroke) { /* * Note that this method is only called for a WhiteLine that is on the * current board. When selecting a board, this User dissociates itself * from the previous board -- thus not receiving any updates from it -- * before adding itself to the new board. Since ...
[ "public void selectBoard(int boardID) {\n\t\t// remove from previous board\n\t\tif (board != null) {\n\t\t\t// notifyStroke no longer called from prev board\n\t\t\tboard.removeUser(this);\n\t\t}\n\t\t// clear STROKE notification queue\n\t\toutgoingStrokeQueue.clear();\n\t\t// wait until queue is empty (send old boa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the value of the lastModified property.
public String getLastModified() { return lastModified; }
[ "public Date getLastModified() {\r\n return lastModified;\r\n }", "public String getLastModifiedTime()\n\t{\n\t\treturn lastModifiedTime;\n\t}", "public long getLastModified();", "public java.util.Calendar getLastModifiedDate() {\n return lastModifiedDate;\n }", "public Date getLastmodif...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the serializer which shall be used for the specified response receiver id.
ISerializer invoke(String responseReceiverId);
[ "Serializer<T> getSerializer();", "public interface GetSerializerCallback\r\n{\r\n /**\r\n * Returns the serializer which shall be used for the specified response receiver id.\r\n * @param responseReceiverId response receiver id for which the implementation shall return the serializer.\r\n * @retur...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
XXX Cancel current purchase
public void cancelCurrentPurchase() throws VerificationFailedException { }
[ "private void cancel() {\n recoTransaction.cancel();\n }", "public void cancelTransaction() {\n calculateChange(true);\n this.currentBalance = 0.0;\n this.collectedCash = 0.0;\n }", "public void cancelTrade() {\n tradeManager.rejectTrade(sessionManager.getWorkingTrade())...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the value of a property for a given name as a short. If for any reason the property cannot be looked up as a short, returns the supplied default value. This error handling makes this method a good choice for static initializer calls.
public static short getPropertyAsShort(String name, short defaultValue) { if (PropertiesManager.props == null) loadProps(); short returnValue = defaultValue; try { returnValue = getPropertyAsShort(name); } catch (Throwable t) { log.error( "Coul...
[ "public static short getPropertyAsShort(String name)\n throws MissingPropertyException, BadPropertyException {\n if (PropertiesManager.props == null) loadProps();\n try {\n return Short.parseShort(getProperty(name));\n } catch (NumberFormatException nfe) {\n thr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Play a single MDO (Media Data Object) named by streamID. Equivalent to play() with a String[] of length one, containing the given streamID.
PlayerEvent play(String streamID, int offset, RTC[] rtc , Dictionary optargs) throws MediaResourceException;
[ "static void play(Song[] songs, int songID) {\n\t\tif (songID > 0 && songID <= songs.length) {\n\t\t\tSystem.out.println(\"Loading Song: \" + songs[songID - 1]);\n\t\t\tPlayer.play(songs[songID - 1].getMidiFile());\n\t\t\tSystem.out.println(\"Now playing: \" + songs[songID - 1]);\n\n\t\t} else {\n\t\t\tSystem.out.p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Handles timeout case. Used if the command identifier is unknown, so FSM is identified by the flow Id.
public void handleTimeoutByFlowId(@NonNull String flowId) throws UnknownKeyException { String commandKey = fsmRegister.getKeyByFlowId(flowId) .orElseThrow(() -> new UnknownKeyException(flowId)); handleTimeout(commandKey); }
[ "private synchronized void proccessTimeoutTransition(\n\t\t\tTransition timeoutTransition, Object stateEnterId,\n\t\t\tObject stateEnterIdNonLoop) {\n\t\t// Different state before timeout occurred -> ignore the timeout\n\t\tif (stateEnterIdNonLoop != lastStateEnterIdNonLoop) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Still ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the value of the 'start' field. Required. The beginning of the window (0based, inclusive) for which variants with overlapping reference alleles should be returned. Genomic positions are nonnegative integers less than reference length. Requests spanning the join of circular genomes are represented as two requests o...
public java.lang.Long getStart() { return start; }
[ "Position getStart();", "public Point getStart() {\n\t\treturn start;\n\t}", "public long getRangeStart() {\n return this.rangeStart;\n }", "public int getStartRange() {\r\n\t\treturn lookupValue(Params.START_RANGE);\r\n\t}", "public String getStart()\r\n\t{\r\n\t\treturn start;\r\n\t}", "public...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column ypxx.SPMC
public String getSpmc() { return spmc; }
[ "public void setSpmc(String spmc) {\n this.spmc = spmc;\n }", "public BigDecimal getMpsQuerySeq() {\r\n return mpsQuerySeq;\r\n }", "public java.lang.String getMpCustom() {\r\n return mpCustom;\r\n }", "public String getMscid() {\r\n return mscid;\r\n }", "public Long...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
..COMPUTE FITNESS OF A PARTICULAR CHROMOSOME ..THIS METHOD IS OVERLOADED (SEE BELOW)
public void computeFitness(chromosome chromo) { int numVerticies = adjList.getNumVerticies(); aLstVertex v1,v2; BitSet totalBad = new BitSet(numVerticies); BitSet tempBits = new BitSet(numVerticies); //..CHECK ALL 1-VALUED GENES FOR EDGES TO OTHER //..1-VALUED GENES int ba...
[ "protected abstract float _getGrowthChance();", "@Test\n public void shouldWorkAsExpected_WhenOneCourtIsFullyAllocatedToSpecificFacts() {\n String fact = \"unreasonable-behaviour\";\n Map<String, Map<String, BigDecimal>> specificCourtsAllocationPerFact = singletonMap(fact,\n singletonM...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column migration_investment_view.not_received_increase_interest
public BigDecimal getNotReceivedIncreaseInterest() { return notReceivedIncreaseInterest; }
[ "public void setNotReceivedIncreaseInterest(BigDecimal notReceivedIncreaseInterest) {\n this.notReceivedIncreaseInterest = notReceivedIncreaseInterest;\n }", "public BigDecimal getNotReceivedInterest() {\n return notReceivedInterest;\n }", "public void setNotReceivedInterest(BigDecimal notRe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the first tai khoan doi ung in the ordered set where hoatDong = &63;.
@Override public TaiKhoanDoiUng fetchByHoatDong_First( Boolean hoatDong, OrderByComparator<TaiKhoanDoiUng> orderByComparator) { List<TaiKhoanDoiUng> list = findByHoatDong( hoatDong, 0, 1, orderByComparator); if (!list.isEmpty()) { return list.get(0); } return null; }
[ "@Override\n\tpublic TaiKhoanDoiUng fetchByLoaiTaiKhoan_HoatDong_First(\n\t\tint loaiTaiKhoan, Boolean hoatDong,\n\t\tOrderByComparator<TaiKhoanDoiUng> orderByComparator) {\n\n\t\tList<TaiKhoanDoiUng> list = findByLoaiTaiKhoan_HoatDong(\n\t\t\tloaiTaiKhoan, hoatDong, 0, 1, orderByComparator);\n\n\t\tif (!list.isEmp...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
comptes the log base 10 of a number
public static double log10(double num){ return (Math.log(num)/Math.log(10)); }
[ "public static long log_int(long input, long base){\n long exp = 0;\n while (input/base > 0){\n input /= base;\n exp ++;\n }\n return exp;\n }", "static int logbase2(int n) {\n\t\t\r\n\t\tint count = 0;//sets counter to 0\r\n\t\t\r\n\t\twhile (n != 0) {// divide n by 2, increase counter unt...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get all categories that belong to given user
List<Category> getCategoriesByUserId(String userId);
[ "public List<Category> listAllCategory(String userid);", "public List<Category> getAllCategoryByUserId(String userId) {\r\n\t\tQuery query = getSession().createQuery(\"from Category where categoryCreatedBy=?1\");\r\n\t\tquery.setParameter(1, userId);\r\n\t\treturn (List<Category>) query.getResultList();\r\n\r\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method converts the row character to its equivalent row int (08)
public int convertRowToInt(char c) { return c - 65; }
[ "public static int convertRow(String s) {\n\t\t// The following is to convert from cell to element of array\n\t\tchar[] rowLetters = { 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i' };\n\t\tint[] correspNum = { 1, 2, 3, 4, 5, 6, 7, 8, 9 };\n\t\tint rowNumber = 0;\n\n\t\tif (s.length() != 2) {\n\t\t\tthrow new IllegalA...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Dla fragmentu: InputMethodManager inputManager = (InputMethodManager)getActivity().getSystemService(Context.INPUT_METHOD_SERVICE); inputManager.hideSoftInputFromWindow(getActivity().getCurrentFocus().getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);
private void schowajKlawiature() { View view = this.getActivity().getCurrentFocus(); //inside a fragment you should use getActivity() if (view != null) { InputMethodManager imm = (InputMethodManager) getActivity().getSystemService(context.INPUT_METHOD_SERVICE); imm.hideSoftInputF...
[ "protected void hideInputMethod() { \n InputMethodManager imm = (InputMethodManager)mCtx.getSystemService(Context.INPUT_METHOD_SERVICE); \n if (imm != null) { \n imm.hideSoftInputFromWindow(edtQuery.getWindowToken(), 0);\n } \n }", "private void dismissKeyboard() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns an ordered range of all the product specification mappings where uuid = &63;. Useful when paginating results. Returns a maximum of end start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtilAL...
public java.util.List<ProductSpecificationMapping> findByUuid( String uuid, int start, int end, com.liferay.portal.kernel.util.OrderByComparator <ProductSpecificationMapping> orderByComparator);
[ "public java.util.List<ProductSpecificationMapping> findByUuid(\n\t\tString uuid, int start, int end,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator\n\t\t\t<ProductSpecificationMapping> orderByComparator,\n\t\tboolean useFinderCache);", "public java.util.List<ProductSpecificationMapping> findAll(\n\t\tint ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Verify result object Xml Opening virtual investmen.
public static Question<Boolean> verificaElResultadoDeLaAperturaDeInversionVirtualPorXml() { return new VerificarLaAperturaDeInversionVirtualXml(); }
[ "public void checkOutputXML (IInternalContest contest) {\n \n try {\n DefaultScoringAlgorithm defaultScoringAlgorithm = new DefaultScoringAlgorithm();\n String xmlString = defaultScoringAlgorithm.getStandings(contest, new Properties(), log);\n \n // getStandi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Runs through every hand and calculates the ratio of the amount of times that rank appears compared to the total number of possible of hands.
static double[] percentage_per_hand_category_exhaustive(int hand_size) { Deck deck = new Deck(); double[] ranks = new double[10]; Hand hand = null; // Go thorugh each possible hand combination. for (int index1 = 0; index1 < 52; index1++) { for (int index2 = index1 + 1; index2 < 52; index2++) { for (in...
[ "public void PokerStats(int handSize, int numTrials)\n {\n double startTime = System.currentTimeMillis();\n System.out.println(\"\\f\");\n Deck d=new Deck();\n d.shuffle();\n double royalFlushCount=0.0;\n double straightFlushCount=0.0;\n double fourOfAKindCount=0....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
send intent to an SMSBroadcastReceiver that a new message has been received
public void broadcastIntent(View view) { String SMS_RECEIVED = "android.provider.Telephony.SMS_RECEIVED"; SMSBroadcastReceiver smsReceiver = new SMSBroadcastReceiver(); registerReceiver(smsReceiver, new IntentFilter(SMS_RECEIVED)); }
[ "public static void registerSMSRecieveBroadcast(Activity activity){\n SMSHandler smsListener = new SMSHandler();\n receiverMap.put(SMS_RECEIVED, smsListener);\n\n registerBroadcastReciever(activity, SMS_RECEIVED, smsListener);\n }", "@Override\n\t public void onReceive(Context context, ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Reads a link and returns the data.
public static String readLink(String link) { String data = ""; URL obj = null; try { obj = new URL(link); } catch (MalformedURLException e1) { e1.printStackTrace(); } HttpURLConnection con; try { con = (HttpURLConnection) obj.openConnection(); con.setRequestMethod("GET"); con.setRequestProp...
[ "public static native String readlink(String path) throws IOException;", "@Path(\"/link\")\n @GET\n @Produces(MediaType.APPLICATION_JSON)\n public Response linkRead() {\n HashMap<String, String> schema = new HashMap<>();\n schema.put(\"key_url\",\"string\");\n schema.put(\"timestamp\", \"int\");\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Paint the whole snake on the board
private void paintSnake() { board.paintPath(snake.getParts(), GridCell.SNAKE.getColor()); }
[ "@Override\r\n\tprotected void paintComponent(Graphics g)\r\n\t{\r\n\t\tsuper.paintComponent(g);\r\n\t\t\r\n\t\tSnake1 snake = Snake1.snake;\r\n //background color\r\n\t\tg.setColor(Color.BLACK);//sets background color\r\n\t\tg.fillRect(0, 0, 800, 700);//fills the rectangle with black\r\n \r\n\t\t//se...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get all values of property LeadArtist as an Iterator over RDF2Go nodes
public ClosableIterator<org.ontoware.rdf2go.model.node.Node> getAllLeadArtist_asNode() { return Base.getAll_asNode(this.model, this.getResource(), LEADARTIST); }
[ "public static ClosableIterator<org.ontoware.rdf2go.model.node.Node> getAllLeadArtist_asNode(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource) {\r\n\t\treturn Base.getAll_asNode(model, instanceResource, LEADARTIST);\r\n\t}", "Iterator listRDFProperties();", "public ReactorResult<org.ontowar...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Label for the integration.
@Schema(description = "Label for the integration.") public String getLabel() { return label; }
[ "public String label();", "public String label() {\n\t\treturn \"LABEL_\" + (labelCount++);\n\t}", "java.lang.String getLabel();", "java.lang.String getLabelName();", "public String getLabel() {\r\n if (label == null)\r\n label = \"flow_\"+blockNr+\"_\"+(serialno++)+\"_\";\r\n retur...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the file pattern used when rolling over.
public String getFilePattern() { return filePattern; }
[ "Pattern getFileNamePattern();", "public String getDefaultFilePattern();", "public FilePattern\n getFilePattern() \n {\n return pPattern; \n }", "public static String getTransactionLogPattern() {\n return ConfigurationHolder.getString(\"ocsp.trx-log-pattern\");\n }", "public void datePattern...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column transit_warehouse.registered_address3
public void setRegisteredAddress3(String registeredAddress3) { this.registeredAddress3 = registeredAddress3 == null ? null : registeredAddress3.trim(); }
[ "public String getRegisteredAddress3() {\n return registeredAddress3;\n }", "public String getADDRESS3()\r\n {\r\n\treturn ADDRESS3;\r\n }", "public String getADDRESS_3() {\r\n return ADDRESS_3;\r\n }", "public void setAddress3(java.lang.String address3) {\r\n this.address3 = ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }