query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
Inserts a note into the datastore using the provided body content. ID should be autogenerated upon insertion.
public Note insertNote(Note note);
[ "public long createNote(String title, String body, Long catId) {\n if (title==null || title.trim().equals(\"\") || body==null){\n return -1;\n }\n else {\n ContentValues initialValues = new ContentValues();\n initialValues.put(KEY_NOTES_TITLE, title);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Author:Piyush Singh Description:This is used to search product and reading product name from excel sheet
public void searchProduct() throws IOException { String prodName=flib.getExcelData("Sheet1", 1, 2); amzSearchEdtBox.sendKeys(prodName,Keys.ENTER); }
[ "private void findProductByName() { \n System.out.println(\"Enter search: \");\n String search = reader.next();\n System.out.println(bookRegister.searchByName(search));\n }", "public void ReadDataFromExcel () throws IOException {\n\n\t\tString SheetPath = path + \"\\\\src\\\\test\\\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return java type for SQL type.
public abstract String toJavaType(int sqlType);
[ "Integer getSqlType();", "int getSqlType();", "String getSQLTypeName() throws SQLException;", "Class<?> getSqlType(Class<?> dataType) throws DataFrameException {\n final Class<?> sqlType = sqlTypeMap.get(dataType);\n if (sqlType != null) {\n return sqlType;\n } ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the paymentstatus value for this ReservationBean.
public java.lang.String getPaymentstatus() { return paymentstatus; }
[ "public io.opencannabis.schema.commerce.Payments.PaymentStatus getStatus() {\n @SuppressWarnings(\"deprecation\")\n io.opencannabis.schema.commerce.Payments.PaymentStatus result = io.opencannabis.schema.commerce.Payments.PaymentStatus.valueOf(status_);\n return result == null ? io.opencannabis....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a new object of class 'Matrix'.
Matrix createMatrix();
[ "public static Matrix makeIdentity() {\n return new Matrix();\n }", "public Matrix( )\n {\n matrix = new Object[DEFAULT_SIZE][DEFAULT_SIZE];\n }", "public Matrix() {\n\tmatrix = new Object[DEFAULT_SIZE][DEFAULT_SIZE];\n }", "public T createLike() {\n return createMatrix(numRows(), num...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
3 3apnay8wumntfkvud64ov7fcf static char arrow_match_name_frag(char name, arrowname_t arrownames, int flag)
@Unused @Original(version="2.38.0", path="lib/common/arrows.c", name="", key="3apnay8wumntfkvud64ov7fcf", definition="static char *arrow_match_name_frag(char *name, arrowname_t * arrownames, int *flag)") public static CString arrow_match_name_frag(CString name, ST_arrowname_t[] arrownames, int flag[]) { ENTERING("3apna...
[ "@Unused\n@Doc(\"update flags for arrow. Warning: implementation changed in Java\")\n@Todo(what = \"Check why C is strange\")\n@Original(version=\"2.38.0\", path=\"lib/common/arrows.c\", name=\"arrow_match_name\", key=\"2pveqb5qcgfxcqp410ub942eg\", definition=\"static void arrow_match_name(char *name, int *flag)\")...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return a List of Dependencies which need to be satisfied for the given instance
public abstract List<Dependency> selectDependencies( Class<?> clazz );
[ "List<Dependency> getRequestedDependencies();", "Set<Dependency> getEffectiveDependencies(Scope scope);", "List<IClassifier> getClientDependencies();", "EDependencies getDependencies();", "java.util.List<org.roylance.yaorm.TestingModel.TaskDependency>\n getDependenciesList();", "List<? extends Task...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Closes the auction and prints information on the lots. A blank line is printed at first . Then for each lot, its number and description are printed. If it did sell, the high bidder and bid value are also printed. If it didn't sell, that information is printed. Returns false if the auction is already closed, true otherw...
public boolean close() { if (!(isAuctionClosed ())) { System.out.println ( "") ; for ( Lot lot:lots) { System.out.println ( "The lot number : " + lot.getNumber() + ".") ; System.out.println ( " The description of the lot : " + lot.getDescription () ...
[ "public void close()\n {\n Bid bid;\n Person person;\n for(Lot lot : lots)\n {\n bid = lot.getHighestBid();\n if(bid != null){// for sold items\n person= bid.getBidder();\n System.out.println(lot.getNumber()+\"- \"+lot.getDescription...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Scrolls view pager when view reached it's bounds. Returns distance (<= dX) at which view can be scrolled. Here we will split given distance (dX) into movement of ViewPager and movement of view itself.
private float scrollBy(MotionEvent e, float dX, float dY) { if (mIsSkipViewPager) return dX; float dViewX, dPagerX; final State state = getState(); final RectF movementBounds = getStateController().getMovementBounds(state).getExternalBounds(); // Splitting x scroll between vie...
[ "private int performViewPagerScroll(MotionEvent e, float dPagerX, float dY) {\n int scrollBegin = mViewPager.getScrollX();\n mLastViewPagerEventX += dPagerX;\n if (mIsAllowViewPagerScrollY) mLastViewPagerEventY += dY;\n passEventToViewPager(e);\n return scrollBegin - mViewPager.ge...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the circuit name.
public String getCircuitName() { return mCircuitName; }
[ "public String getCompackname() {\n\t\treturn DataUtil.toString(super.getByIndex(INDEX_COMPACKNAME, true));\n\t}", "public String getCompName() {\n return (String) getAttributeInternal(COMPNAME);\n }", "public String getConsignorName()\n\t{\n\t\treturn getValue(StoragePlan.CONSIGNORNAME).toString();\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates new form menu_admin_tablespaces
public menu_admin_tablespaces() { initComponents(); this.setResizable(false); this.setLocationRelativeTo(null); }
[ "public void createMenu() {\n deleteMenuGroupError = false;\n createMenuGroupError = true;\n if (menu.createMenu()) {\n updateMenuError = false;\n deleteMenuError = false;\n createMenuError = true;\n } else {\n createMenuError = false;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Limits the number of geohash boxes to be queried. At maxSteps==20, (202+1)^2 = 2601 boxes are queried. This variable will be removed when more resolutions are supported in future implementations. Calculates and constructs the set of geohash strings needed for the query. The geohash strings are the boxes within a squa...
public static String[] geosNeeded(double lat, double lon, int rad, int res) { /* First we would determine the dimensions of a geohash box and use them to determine the * number of boxes to we should query. Currently the number of geohash boxes we query is * fixed for the purpose of consistent latency. */ /...
[ "public static String sBoxes(String input) {\n\n assert input.length() == 48;\n\n StringBuilder result = new StringBuilder();\n\n int tempIndex = 0;\n String[] blocks = new String[8];\n\n for (int i = 0; i < 48; i+=6) {\n String tempBlock = input.substring(i, i+6);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Container's getter for Rep_PhysicalBook_FarsiLabelVO1.
public ViewObjectImpl getRep_PhysicalBook_FarsiLabelVO1() { return (ViewObjectImpl)findViewObject("Rep_PhysicalBook_FarsiLabelVO1"); }
[ "public Rep_VirtualBookVOImpl getRep_VirtualBook_FarsiLabelVO1() {\n return (Rep_VirtualBookVOImpl)findViewObject(\"Rep_VirtualBook_FarsiLabelVO1\");\n }", "public ViewObjectImpl getVirtualBookList_FarsiLabelVO1() {\n return (ViewObjectImpl)findViewObject(\"VirtualBookList_FarsiLabelVO1\");\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
check if a webpage(forwardURL) exists in the statistic datastore
public static boolean exists(String forwardURL) { if (_cache == null || _cache.isEmpty()) { load(); } return _cache.containsKey(forwardURL); }
[ "public boolean hasURL();", "boolean hasHadithBookUrl();", "public boolean urlExists(String url) throws Exception {\n URL u = new URL ( url);\n HttpURLConnection huc = ( HttpURLConnection ) u.openConnection (); \n huc.setRequestMethod (\"GET\"); //OR huc.setRequestMethod (\"HEAD\"); \n huc.conne...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Metodo set que comprueba si el ISBN es nulo o menor a 5 Si lo es, manda una excepcion Si no, guarda el ISBN
public void setIsbn(String isbn) throws Exception { if(isbn != null && isbn.trim().length() >= ISBN_MIN_LENGTH) { this.isbn = isbn; }else { throw new Exception(ISBN_MIN_EXCEPTION); } }
[ "public void setIsbn(int isbn)\n {\n this.isbn = isbn;\n }", "public void setISBN(String isbn) {\n if (isbn.length()== 10 || isbn.length()== 13){\n this.isbn = isbn;\n }else {\n System.out.println(\"Invalid ISBN!\");\n }\n }", "public ISBN() { countryN...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
getLagerGroesse liefert die Groesse des Lager Array Hilfsmethode fuer die Testklasse LagerTest
public int getLagerGroesse () { return lager.length; }
[ "@Test\n public void testGetRotaEnergia() {\n System.out.println(\"getRotaEnergia\");\n\n mapa.adicionarLigacoes(ligacoes);\n mapa.criarGrafoTipo(TipoPesoEnum.ENERGIA, veiculos.get(0));\n List<LigacaoLocais> result = mapa.getRota(locais.get(3), locais.get(0));\n\n assertTrue(re...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
query to get all viewers
@Query("MATCH (v:Viewer) RETURN v") Collection<User> getAllViewers();
[ "protected ResultSet GetViewers() throws SQLException {\n String ViewersSelectorString = \"SELECT viewer_id, socket\\n\" +\n \"FROM Viewers;\\n\";\n PreparedStatement ViewersSelector = dbconn.prepareStatement(ViewersSelectorString);\n return ViewersSelector.executeQuery();\n }...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
inquire method return true if the two given points are equal
private static boolean equals (Point a, Point b) { return a.x == b.x && a.y == b.y; }
[ "boolean compareCoordinates();", "private boolean checkPolysPointShare(Polygon arg1, Polygon arg2) {\r\n for(int i=0; i<arg1.npoints; i++) {\r\n for(int j=0; j<arg2.npoints; j++) {\r\n if((arg1.xpoints[i]==arg2.xpoints[j]) & (arg1.ypoints[i]==arg2.ypoints[j]))\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A convenience method that assumes there is a Boolean or String value at the given index.
public Boolean getBoolean(final int index) { Object returnable = this.get(index); if (returnable instanceof String) { returnable = Boolean.valueOf((String) returnable); } return (Boolean) returnable; }
[ "boolean isBoolean(int index);", "boolean checkBoolean(int index);", "@Override\n public final boolean isBooleanElement(int index) {\n String propertyType = this.invokeFunction(\"getPropertyType\", this.jsObject, index);\n \n return propertyType.equals(\"boolean\");\n }", "@Override\n public final...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the "Occurrences" element
public int getOccurrences() { synchronized (monitor()) { check_orphaned(); org.apache.xmlbeans.SimpleValue target = null; target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(OCCURRENCES$14, 0); if (target == null) { ...
[ "public org.apache.xmlbeans.XmlInt xgetOccurrences()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlInt target = null;\n target = (org.apache.xmlbeans.XmlInt)get_store().find_element_user(OCCURRENCES$14, 0);\n return targe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Alpha transparency to apply to the fill under the line. Use this to adjust alpha separate from fill color.
public Double getFillAlpha() { return fillAlpha; }
[ "public void setFillAlpha(Double fillAlpha) {\r\n\t\tthis.fillAlpha = fillAlpha;\r\n\t}", "public void setFillAlpha(float fillAlpha) {\n this.fillColor = fillColor.setA(fillAlpha);\n }", "public void setStrokeAlpha(float strokeAlpha) {\n this.strokeColor = fillColor.setA(strokeAlpha);\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
You don't need to redefine the KafkaTemplate, if you define a ProducerFactory it will be used in the autoconfigured KafkaTemplate (see KafkaAutoConfiguration). In this example the whole ProducerFactory can be removed, by adding the following property in application.yml spring.kafka.producer.valueserializer=org.springfr...
@Bean public ProducerFactory<String, User> producerFactory() { Map<String, Object> config = new HashMap<>(); config.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, "127.0.0.1:9092"); config.put(ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG, StringSerializer.class); //JSON Serializer shoul...
[ "@Bean\r\n public KafkaTemplate<String, Object> kafkaTemplate() {\r\n return new KafkaTemplate<>(producerFactory());\r\n }", "@Bean\n public KafkaTemplate<String, String> kafkaTemplate() {\n return new KafkaTemplate<>(producerFactory()); // The KafkaTemplate object loads with the Producer o...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the scale z.
public final float getScaleZ() { return this.scaleZ; }
[ "public float getScaleZ() {\r\n\t\treturn scale_z;\r\n\t}", "public double getZ() \n\t{\n\t\treturn z.coord;\n\t}", "double getZ() { return this.point.z; }", "public double getZ() {\n return zCoord;\n }", "public double getScaledAndOffsetZ() {\n return scaledAndOffsetZ;\n }", "float getZ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates two Tvectors of insulin delivery history for the last 8 hours: state_data.Tvec_ins_hist_IOB_with_meal_insulin_seconds state_data.Tvec_ins_hist_IOB_no_meal_insulin_seconds
private void insulin_history_builder( int cycle_duration_mins, Tvector Tvec_rate_hist_seconds, Tvector Tvec_bolus_hist_seconds, Tvector Tvec_basal_bolus_hist_seconds, Tvector Tvec_meal_bolus_hist_seconds, Tvector Tvec_corr_bolus_hist_seconds, Tvector T...
[ "public void backloadRecentHistoData() throws APIUnavailableException {\n\n //gets a list of the coins in the top_30 coins table\n ArrayList<TopCoins> topCoins = topCoinsMapper.getTopCoins();\n\n\n //gets the coin symbols from the top 30 coins table and backloads the histo\n //data for e...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds an image to the DB from a raw input
private void addImage(String rawData) { String[] items = rawData.split(","); if(items.length < 7) return; ContentValues values = new ContentValues(); values.put(COLUMN_NAME_ID, Integer.parseInt(items[0])); values.put(COLUMN_NAME_FILE, items[1]); values.put(COLUMN_NAME_TYPE, items[2]); values.put(CO...
[ "Person addImage(String name, String imagePath);", "void insert(Image image) throws DAOException;", "Builder addImage(String value);", "Builder addImage(ImageObject value);", "public synchronized void addNewImage(BufferedImage img, File file) {\r\n\t\tint image_pk = db.insertImage(file.getName(), file.getAb...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Replaces all occurrences of a String within another String, ignoring case.
public static String replaceIgnoreCase(final String text, final String searchString, final String replacement) { return text.replaceAll("(?i)" + Pattern.quote(searchString), replacement); }
[ "public void replaceIgnoreCase(String oldString, String newString) {\n if (content == null) return;\n //Lowercase \"search content\" and oldString and call \"replace\" method\n searchContent = content.toLowerCase();\n if (oldString != null) oldString = oldString.toLowerCase();\n replace(oldString, ne...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the value of the 'Bound Property' reference. If the meaning of the 'Bound Property' reference isn't clear, there really should be more of a description here...
EStructuralFeature getBoundProperty();
[ "public PropertyDefinition getBoundProperty() {\n\t\t\treturn property;\n\t\t}", "BoundCellReference getReference();", "public int getBound() {\n return bound;\n }", "@java.lang.Deprecated\n public io.kubernetes.client.openapi.models.V1BoundObjectReference getBoundObjectRef() {\n return this.bou...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Finds the total difference between two colors
private static double dif(Color one, Color two) { return Math.abs(one.getRed() - two.getRed()) + Math.abs(one.getGreen() - two.getGreen()) + Math.abs(one.getBlue() - two.getBlue()); }
[ "public static float colorDiff(int c0, int c1) {\n\t\t// Compute the rgba differences between c0 and c1\n\t\tint[] diffs = rgbaDiffs(c0, c1);\n\t\t// Compute the square root of the sum of the rgba differences\n\t\treturn (float) Math.sqrt(diffs[0] + diffs[1] + diffs[2] + diffs[3]);\n\t}", "public Color colorDif(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
wipe out all temp variables
private void nullTemps() { tempCost = null; tempName = null; }
[ "private void resetTemporary(){\n temporaryConstants = null;\n temporaryVariables = null;\n }", "public void cleanUpVariables(){\r\n\t\tphisum= null;\r\n\t\tthetasum= null;\r\n\t\tz= null;\r\n\t\tdocuments= null;\r\n\t\tinitialZs= null;\r\n\t\tz_bar= null;\r\n\t}", "public static void clearTemp...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////// Con una lista de palabras de un tempora...
public int conseguirFuerza (ArrayList<String> temporal){ int fuerza = 0; for (String palabra: temporal){ } return fuerza; }
[ "public ArrayList<ArrayList<String>> listaTemporalesSeparados (ArrayList<String> listaDePalabrasDeTemporal){\n\t\t\n\t\t//Lista, de listas de palabras de los temporales por separado....\n\t\tArrayList<ArrayList<String>> listaTemporalesSeparados = new ArrayList<ArrayList<String>>();\n\t\t\n\t\t\n\t\t//Lista de indi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Description: return true if printer exist
public boolean existPrinter(String printerName) { return getPrinterMap().containsKey(printerName); }
[ "public boolean isPrinted();", "public boolean canBuildPrinter() {\r\n return isPrinter(getFormatter());\r\n }", "public static boolean usePrinting() {\n\t\treturn (isWindows() || isSolaris() || isMac());\n\t}", "public boolean isPrint() {\n return print;\n }", "private static TreeMap<String, ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This test case will login in opus application Verify RM Dashboard for top and bottom 5 drivers
@Test(groups = "Opus") public void VerifyTopAndBottom5Drivers() throws Exception { if (!Util.isTestCaseExecutable("Verify the Top and Bottom 5 driver of Commercial, Residential and Roll Off",GlobalVariables.sdoTestCase)) { test = Report.testCreate(extent, test, "Verify the Top and Bottom 5 driver of Commercial...
[ "@Test\n public void positiveLoginTest(){\n //EVET SON GUNLERDE OLAYLAR KARISTI. CROSS BROWSER HERSEYI BIRBIRINE GIRDIRDI.\n\n // ACIKLAMA : CROSS BROWSER TESTTE TESTBASE CLASSINA GERI DONUYORUZ. BUNUN SEBEBI PARAMETERS ANOTATION I DIR.\n // DOLAYISI ILE Driver.getDriver() ve pages sayfalar...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The tail will be empty, pull one out of the tree
private E removeLastItemFromTailAndPullTailFromTree() { @SuppressWarnings("unchecked") E removed = (E) tail[0]; size--; pullTailFromTree(new Box<>()); return removed; }
[ "public MyTreeNode<T> dequeue() {\n\t\tif ( this.head == null) {\n\t\t\tthrow new IllegalStateException(\"Can't perform a retrieve operation on an empty queue\");\n\t\t}\n\t\tMyTreeNode<T> treeNode = this.head.item;\n\t\t// The previous second item is now first item in the collection.\n\t\tthis.head = this.head.nex...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the remember me.
public RememberMe getRememberMe() { return rememberMe; }
[ "public java.lang.String getRemember () {\n\t\treturn remember;\n\t}", "public boolean getRemember() {\n return sp.getBoolean(USER_REMEMBER_ME, false);\n }", "public String getRememberMeId() {\n return rememberMeId;\n }", "public boolean getRememberMe() {\n return getSharedPreferenc...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a URL pointing to a documentation page, at a given named anchor.
default Optional<String> getDocUrl(String page, String anchor) { return getWebUrl().map(url -> url + "Documentation/" + page + "#" + anchor); }
[ "String getDocAnchor();", "default Optional<String> getPluginDocUrl(String pluginName, String page, String anchor) {\n return getWebUrl()\n .map(url -> url + \"plugins/\" + pluginName + \"/Documentation/\" + page + \"#\" + anchor);\n }", "java.lang.String getDocumentationUrl();", "private String ge...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Call this method instead of getMaxLocals if this code is likely to be changed. This will avoid the creation of stackmaps and other items in the process of calculating max locals, and will get max locals only.
public int getMaxLocalsQuickly() throws BT_CodeException { return codeInfo.getMaxLocalsQuickly(); }
[ "public int maxLocals();", "public void setMaxLocals(int maxLocals);", "public void setMaxLocals(int max) {\n gen.setMaxLocals(max);\n }", "void resetMaxLocals();", "@Override\n public void visitMaxs(int maxStack, int maxLocals) {\n int maxElementsAddedOnStackFrame = 4;\n super.vi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A clone of the Mesh.
public Object clone() { Mesh res = new Mesh(); if (vertices != null) { res.vertices = new Vertex[vertices.length]; for (int i = 0; i < vertices.length; i++) res.vertices[i] = (Vertex) vertices[i].clone(); } if (triangles != null) { re...
[ "public Mesh clone(ModelNode modelNode) {\r\n\t\tMesh clone = new Mesh();\r\n\t\tclone.modelNode = modelNode;\r\n\t\tclone.texture = new String(this.texture.toCharArray());\r\n\t\tclone.vertices = new Vertex[this.vertices.length];\r\n\t\tfor(int i = 0; i < clone.vertices.length; i++) {\r\n\t\t\tclone.vertices[i] = ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the duration in MS.
public long getDurationInMS(){ long end = System.currentTimeMillis(); return (end-start); }
[ "long getDurationUs();", "long getDurationUsec();", "java.lang.String getDuration();", "public long getDurationInSec(){\n\t\tlong end = System.currentTimeMillis();\n\t\treturn (end-start)/1000;\n\t}", "String getDuration();", "public long toDurationMillis() {\r\n return FieldUtils.safeAdd(getEndMi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
"unloads" the passengers (clears the list)
public void unloadPassengers() { details.clear(); }
[ "public void unload()\n {\n Iterator i = passengers.iterator();\n Passenger person = null;\n while(i.hasNext())\n {\n person = (Passenger) i.next();\n if (person.getStop() == stop)\n {\n i.remove();\n System.out.println(person.getName() + \" has dropped off.\")\n }\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the names from any KeyNames.
public void setKeyNames(List<String> keyNames) { this.names = keyNames; }
[ "public void setNameKey(String nameKey) {\n this.nameKey = nameKey;\n }", "public void setKeySet(Set<String> keys) {\r\n\t\tthis.keySet = keys;\r\n\t}", "public void setKeyAttr(ArrayList<String> keys) {\n //key.clear();\n boolean in;\n for (String a : keys) {\n in = fal...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Remove file with output data
public void deleteOutputData() { if (outputData != null) { File file = outputData; outputData = null; save(); file.delete(); } }
[ "private void removeContentsFromFile() {\n Log.d(\"debugMode\", \"deleting entire file contents...\");\n try {\n FileOutputStream openFileInput = openFileOutput(\"Locations.txt\", MODE_PRIVATE);\n PrintWriter printWriter = new PrintWriter(openFileInput);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get directory for this session.
public String getDirectory() { return sessionDir; }
[ "java.lang.String getDirectory();", "private String retrieveSessionDir( ITestContext testContext ) {\n File outputDir = new File( testContext.getOutputDirectory() );\n return outputDir.getPath();\n }", "public File getDirectory()\n {\n return getComponent().getCurrentDirectory();\n }", "...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Instantiates a new destiny.
public Destiny(Config config) { this.config = config; this.setShadowLight((config.getYearSky().getIndex() % 2 == 0) ? ShadowLight.LIGHT : ShadowLight.SHADOW); setupDestiny(); }
[ "Destination createDestination();", "public Teleporter()\n\t{\n\t\tsuper();\n\t\tdestination = new Location();\n\t}", "public War()\n {\n \n \n }", "private void setupDist2DestCharacteristic() {\n dist2DestCharacteristic =\n new BluetoothGattCharacteristic(CHARACT_D...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Parses a collection of CsvCovariateInfluence entries from a csv string (header row expected).
public static List<CsvCovariateInfluence> readFromCSV(String csv) throws IOException { CsvSchema schema = CsvSchema.builder() .setSkipFirstDataRow(true) .addColumn("covariateName") .addColumn("meanInfluence", CsvSchema.ColumnType.NUMBER) .addColumn...
[ "public static List<CustomerRecommendationSet> fromCSV(String csv) throws InvalidCSVException {\n ArrayList<String> lines = new ArrayList<String>(Arrays.asList(csv.split(\"\\n\")));\n\n validateFileHeader(lines.get(0));\n\n lines.remove(0);\n\n List<CustomerRecommendationSet> customerRec...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
System.out.println("Clusters "+cl1+" and "+cl2+" nextId "+nextId);
private static int getClusterCorrespondance(Integer cl1, Integer cl2, HashMap<Integer, HashMap<Integer, Integer>> clusterCorresp, int nextId) { HashMap<Integer, Integer> map = clusterCorresp.get(cl1); if (map == null) { map = new HashMap<Integer, Integer>(); map.put(cl2, nextId); clusterCorresp.put(...
[ "void printLK(){\r\n System.out.print(nodename+\" link costs: \");\r\n for (int i = 0; i < this.lkcost.length; i++ ) {\r\n System.out.print(\" \" +this.lkcost[i]);\r\n }\r\n System.out.print(\"\\n\");\r\n System.out.print(nodename+\" minimum link costs: \");\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a set of all encounter types associated with the MDRTB Program
public static Set<EncounterType> getMdrtbEncounterTypes() { Set<EncounterType> types = new HashSet<EncounterType>(); types.add(Context.getEncounterService().getEncounterType(Context.getAdministrationService().getGlobalProperty("mdrtb.intake_encounter_type"))); types.add(Context.getEncounterService().getEn...
[ "public String getExperimentTypes() {\n return experimentTypes;\n }", "public List<IdentifierType> getAll();", "public abstract Collection<Material> getToolTypes();", "public Set<Roomtype> loadRoomtypes();", "public List<EducationTypeRes> getEducationTypes() {\r\n\r\n\t\tList<EducationType> educat...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create new SpringRobotLibrary object using the given configuration.
public SpringRobotLibrary(String springConfigPath) { ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(springConfigPath); context.registerShutdownHook(); this.context = context; this.keywordToBeanMap = KeywordUtils.getKeywordMap(context); }
[ "SpringImplementation createSpringImplementation();", "Configuration createConfiguration();", "abstract public Core createCoreWithConfig(Config config, Object systemContext);", "public TwilioWrapperLibrary buildLibrary()\n {\n return new TwilioWrapperLibrary( this.twilio_account_sid, this.twilio_acc...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets all of the names of the semesters in the database
public static ArrayList<String> getAllSemesters(SQLiteDatabase db) { Cursor c = db.rawQuery("SELECT " + S_KEY_NAME + " FROM " + SEMESTERS_TABLE, null); ArrayList<String> types = new ArrayList<>(); c.moveToFirst(); while (!c.isAfterLast()) { types.add(c.getString(0)); ...
[ "public static ListOfSemesters getSemestersFromDB() {\n\t\treturn DatabaseCache.getSemestersCache();\n\t}", "public Result allSemesters(){\n\t\tUser user = Application.getLoggedUser();\n\t\tif (user == null || user.userType != UserType.ADMIN) {\n\t\t\treturn unauthorized(message.render(\"Please log in to the syst...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
set the date column of the task to tomorrows date, and update the database
public void moveTaskTomorrow(int id) { ContentValues cv = new ContentValues(); String[] dateProjection = new String[]{TaskContract.TaskEntry.COL_TASK_DATE}; String dateSelection = TaskContract.TaskEntry._ID + " = ?"; String[] dateSelectionArgs = new String[]{String.valueOf(id)}; ...
[ "void updateTaskDueDate();", "void updateTaskDueDate(int id, LocalDateTime dueDate);", "@Override\n protected void incrementDate() {\n currentDate = dateSource.getNextDate(currentDate);\n\n }", "Date getNextTodo();", "@Override\n\tprotected void setNextSiegeDate()\n\t{\n\t\tif(_siegeDate.getTim...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Getter for relation 'MessageFlow>SourcePartition' Metamodel description: null
@objid ("3d49eddb-b75c-4f09-bae7-ee3888660687") ActivityPartition getSourcePartition();
[ "public Set<V> getNodesInSourcePartition() {\n return mSourcePartitionNodes;\n }", "@objid (\"2caad4f0-28f5-4d7e-af25-7e5c1426225c\")\n void setSourcePartition(ActivityPartition value);", "public void setSourcePartitions(int part) {\r\n sourcePartitions = part;\r\n }", "SourceRecord get...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by Apache iBATIS ibator. This method returns the value of the database column MONITOR_KPI_3G_MAIL.HOUR_12
public Integer getHour12() { return hour12; }
[ "public Integer getHour3() {\r\n return hour3;\r\n }", "public Integer getHourmbin3() {\r\n return hourmbin3;\r\n }", "public int getHour(){\n\t\tif(hour > 12){\n\t\t\treturn hour-12;\n\t\t}\n\t\treturn hour;\n\t\t\n\t}", "public Integer getHourmb3() {\r\n return hourmb3;\r\n }",...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the target platform for the dependencies.
public void setPlatform(String platform) { this.platform = JavaFXPlatform.fromString(platform); updateJavaFXDependencies(); }
[ "public void setPlatform(java.lang.String platform) {\n this.platform = platform;\n }", "public void setPlatform(Integer platform) {\n this.platform = platform;\n }", "public void setPlatform(Long platform) {\n\t\tthis.platform = platform;\n\t}", "public void setPlatforms(String platforms)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ This function is used by the user to post their own data The parameter "String noise" contain a json with all the value of the sensor (userName, latitude, longitude, noiseLevel, noiseType) It return the body in case of success
@Path("/userNoiseLevel") @Consumes(MediaType.APPLICATION_JSON) @POST public Response userData(String noise) throws ClassNotFoundException, SQLException{ //Open the connection with the db ConnectionManager cm; JSONObject sensorPost = new JSONObject(); try { cm = new ConnectionManager(conn); sensor...
[ "@Path(\"/sendNoiseLevel\")\n\t@Consumes(MediaType.APPLICATION_JSON)\n\t@POST\n\tpublic Response postSoundLevel(String noise) throws ClassNotFoundException, SQLException{\n\t\t//Open the connection with the db\n\t\tConnectionManager cm;\n\t JSONObject sensorPost = new JSONObject();\n\t try {\n\t\t\tcm = new C...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the loop, and sets up the model for the first iteration.
@Override public boolean preProcess(B block, TemplateOutput<B> output, TemplateModel model) throws IOException, TemplateException { super.preProcess(block, output, model); this.loop = getLoop(model); this.index = 0; boolean hasNext = this.loop != null && this.loop.hasNext(); if (hasNext) { ...
[ "protected void prepareModel() {\n model();\n }", "public void next() {\n grid.next(); // trigger groundtruth on model side\n\n gui.setGeneration(grid.getGenerations());\n refreshGridDimension();\n }", "public void preIteration() {\n\n\t\tfinal BasicNetwork network = this.train.getNetwork();...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Pregunta al usuario si desea continuar pidiendole un caracter (s/n)
static boolean deseaContinuar(){ char continuar; continuar=Teclado.leerCaracter("\nDesea continuar? (s/n)"); if(continuar=='s' || continuar=='S') return true; else return false; }
[ "static boolean continuar(){\n\t\tchar respuesta;\n\t\trespuesta=Teclado.leerCaracter(\"\\nDesea continuar? (s/n) : \");\n\n\t\tif(respuesta=='s' || respuesta=='S')\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "static boolean continuar(){\r\n\t\tchar respuesta = Teclado.leerCaracter(\"¿Desea continua...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
calculates the density of a gas rg is the gas constant, and rv is the vapor constant
public double gasDensity (Double t, Double pres, Double humid,Double rg,Double rv) { double d,h,es,p,pv,pd,da,dv; //convert to pascals pres=pres*100; double c0=0.99999683; double c1=-0.90826951E-02; double c2=0.78736169E-04; double c3=-0.61117958E-06; double c4=0.43884187E-08; d...
[ "public abstract double computeValue(Density density);", "public abstract double getRV();", "double getFuvr();", "public abstract double density(double x);", "double getVstall();", "double getVrst();", "protected final double fr(double x, double rc, double re) {return rc*(K*K)/Math.pow(x, re);}", "pub...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a matcher for output that matches when the size of the output satisfies the specified matcher.
public static <E> OutputMatcher<E> outputWithSize(org.hamcrest.Matcher<? super java.lang.Integer> sizeMatcher) { return OutputMatcherFactory.create(OutputWithSize.<E>outputWithSize(sizeMatcher)); }
[ "public static <E> OutputMatcher<E> outputWithSize(int size) {\n return OutputMatcherFactory.create(OutputWithSize.<E>outputWithSize(size));\n }", "public static Matcher<View> withListSize (final int size) {\n return new TypeSafeMatcher<View>() {\n @Override public boolean matchesSafel...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
makes the opendap url for the entry
public String getOpendapUrl(Entry entry) { return getOpendapPrefix(entry) + getOpendapSuffix(entry); }
[ "public void createURL(){\n\t\t//Concatenate separate portions\n\t\tthis.url = new String(this.base_url + this.query_url + this.keyword);\n\t}", "@Override\n protected String buildUrl(ImportedPatent objToBuildUrl) {\n StringBuilder strBuilder = new StringBuilder(opsUriRoot);\n if (!opsUriRoot.end...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removes the given listener from all end points.
public void removeListener(EndPointChangeListener listener) { for (List<EndPointChangeListener> listeners : listenerMap.values()) { listeners.remove(listener); } }
[ "@Override\n public void removeListener() {\n this.listener = null;\n }", "void removeListener(SwoopServerListener listener);", "public void removeListener();", "@Override\n public void removeListener() {\n this.mListener = null;\n }", "public void removeNPTListener(NPTListener l) ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
getter of value from key in a Dictionary it uses getValueRec method
public String getValue(String key);
[ "public V getValue(K key);", "public final Value getValue(String key) {\n\t\treturn valueMap.get(key);\n\t}", "private V getValueOfParticularKey(K itemKey) {\r\n int hashCode = getHashCode(itemKey);\r\n int index = getIndex(hashCode);\r\n HashMapNode<K, V> currentNode = table[index];\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of first method, of class KSubsetGenerator.
@Test public void testFirst() { for(int i=0; i<100; i++){ int n = rg.nextInt(20)+1; // n in {1,20} int k = rg.nextInt(n)+1; // k in {1,n} KSubsetGenerator ksub = new KSubsetGenerator(k, n); // check first k-subset int[] first = ksub.first(); ...
[ "@Test\n public void testSuccessor() {\n \n System.out.println(\"\");\n System.out.println(\"###\");\n System.out.println(\"TESTING KSUBSET GENERATOR\");\n System.out.println(\"###\");\n System.out.println(\"\");\n \n // START TEST\n \n // 3 o...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Reports the failure and rejection of a job task to the Job Database.
void reportJobTaskRejected(final String jobTaskId, final JobTrackingWorkerFailure rejectionDetails) throws JobReportingException;
[ "@Override\n public void reportJobTaskRejected(final String jobTaskId, final JobTrackingWorkerFailure rejectionDetails)\n throws JobReportingException\n {\n LOG.info(Thread.currentThread() + \": Reporting failure of job task {} ...\", jobTaskId);\n\n final JobTaskId jobTaskIdObj = JobTask...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Dumps debugging information about this connection, in the case where the caller might not actually own the connection. This function is written so that it may be called by a thread that does not own the connection. We need to be very careful because the connection state is not synchronized. At worst, the method may ret...
void dumpUnsafe(Printer printer, boolean verbose) { printer.println("Connection #" + mConnectionId + ":"); if (verbose) { printer.println(" connectionPtr: 0x" + Long.toHexString(mConnectionPtr)); } printer.println(" isPrimaryConnection: " + mIsPrimaryConnection); pr...
[ "public boolean getConnDebug() {\n return connDebug;\n }", "java.lang.String getDebugInformation();", "public void debugDump() {\n if (logger.isDebugEnabled()) {\n logger.debug(\"Command : {}\", getCommandString());\n logger.debug(\"System Return Code: {}\", getRc());\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "ruleAddition" $ANTLR start "entryRuleMultiplication" ../de.hs_rm.cs.vs.dsm.flow/srcgen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4161:1: entryRuleMultiplication returns [EObject current=null] : iv_ruleMultiplication= ruleMultiplication EOF ;
public final EObject entryRuleMultiplication() throws RecognitionException { EObject current = null; EObject iv_ruleMultiplication = null; try { // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4162:2: (iv_ruleMultiplication= ruleMultip...
[ "public final EObject entryRuleMultiplication() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleMultiplication = null;\n\n\n try {\n // InternalMyDsl.g:1501:55: (iv_ruleMultiplication= ruleMultiplication EOF )\n // InternalMyDsl.g:1502:2: iv_rule...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Creates a cross polygon with its reference point at the center
private GPolygon createCross(double edge) { GPolygon poly = new GPolygon(); double x0 = -2.5 * edge; double y0 = edge / 2; poly.addVertex(x0, y0); poly.addEdge(edge, 0); poly.addEdge(0, edge); poly.addEdge(edge, 0); poly.addEdge(0, edge); poly.addEdge(edge,...
[ "Polygon createPolygon();", "private PolygonShape createTriangleShape() {\n\tVector2[] vertices = com.spiddekauga.utils.Collections.fillNew(new Vector2[3], Vector2.class);\n\n\t// It will look something like this:\n\t// | \\\n\t// | >\n\t// | /\n\n\t// Lower left corner\n\tvertices[0].x = -mWidth * 0.5f;\n\tverti...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Accept a list of queries and filters and return a list of DocFile that matches
private DocFile[] search (String[] queries, String[] filters, BooleanClause.Occur filterOccur) throws ParseException { // create a master query builder BooleanQuery.Builder masterQueryBuilder = new BooleanQuery.Builder(); // loop through all queries for (String query : queries) { ...
[ "public DocFile[] search(String query, int permissionLevel, String[] fileTypes) throws ParseException, IOException {\n if (indexDir.listAll().length < 2) return new DocFile[0];\n // create a master query builder\n BooleanQuery.Builder masterQueryBuilder = new BooleanQuery.Builder();\n //...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Lists all [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources on a given [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster].
public void listAzureNodePools( com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest request, io.grpc.stub.StreamObserver<com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse> responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(get...
[ "public com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse listAzureNodePools(\n com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getListAzureNodePoolsMethod(), getCallOptions(), request);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Agrega un mensaje al texto.
private void enviarMensaje(String mensaje) { if (!TextUtils.isEmpty(mensaje)) { // Se obtiene la hora actual. String hora = formateadorFechas.format(new Date()); // Se agrega el mensaje. lblTexto.append(getString(R.string.mensaje_hora, hora, mensaje)); ...
[ "public static void mensaje(String mensaje){\n JOptionPane.showMessageDialog(null, mensaje, titulo,JOptionPane.NO_OPTION);\n }", "public void setMessage(String text) {\n this.text = text;\n }", "public void setMessage(CharSequence text) {\n setMessage(text.toString());\n }", "publ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Asynchronous login callback function [out] lUserID NET_DVR_Login_V40 return value [out] dwResult asynchronous login status, 0:failed,1:success [out] NET_DVR_DEVICEINFO_V30 device informations [out] pUser user input data public delegate void LoginResultCallBack(int lUserID, int dwResult, ref NET_DVR_DEVICEINFO_V30 lpD...
public static interface FLoginResultCallBack extends StdCallCallback { public int invoke(NativeLong lUserID, int dwResult, NET_DVR_DEVICEINFO_V30 lpDeviceinfo, Pointer pUser); }
[ "public int NET_DVR_Login_V40(NET_DVR_USER_LOGIN_INFO pLoginInfo, NET_DVR_DEVICEINFO_V40 lpDeviceInfo);", "public void receiveResultuserLogin(\r\n org.tempuri.UserWcfStub.UserLoginResponse result) {\r\n }", "public interface LoginCallback {\n\t\tpublic void success ();\n\n\t\tpublic void error (NSErro...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
get all Domains based on IP Address List in data.json
public void getJSONDomains() throws IOException, ParseException { // loop array JSON jsonCon = new JSON(); JSONObject jsonObject = jsonCon.getJSONObject("/data/data.json"); JSONArray domains = (JSONArray) jsonObject.get("ipaddress"); Connection conn = new Connection(); I...
[ "public List<String> getAllDomains();", "public void getJSONIPAddress() throws IOException, ParseException {\n // loop array\n JSON jsonCon = new JSON();\n JSONObject jsonObject = jsonCon.getJSONObject(\"/data/data.json\");\n JSONArray domains = (JSONArray) jsonObject.get(\"domains\");...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the receiverZipCode value for this ReferenceNumberResponse.
public void setReceiverZipCode(java.lang.String receiverZipCode) { this.receiverZipCode = receiverZipCode; }
[ "public void setReceiverZip(String receiverZip) {\n this.receiverZip = receiverZip;\n }", "public void setReceiverZip(String receiverZip) {\n this.receiverZip = receiverZip == null ? null : receiverZip.trim();\n }", "public void setZipCode(int value) {\n this.zipCode = value;\n }",...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
method used to go for later booking activity
private void goForLaterBooking() { Intent intent = new Intent(getActivity(), RideLaterActivity.class); intent.putExtra("PICKUP_ADDRESS", mPICKUP_ADDRESS); intent.putExtra("DROPOFF_ADDRESS", mDROPOFF_ADDRESS); intent.putExtra("FromLatitude", from_latitude); intent.putExtra("FromLo...
[ "private void bookAppointmentProcess() {\n if (user_id == 0) {\n showMsg(\"Please login to make appointment!\");\n } else {\n }\n }", "public void showReservation() {\n Intent intent = new Intent(this, Activity_View_Booking.class);\n startActivity(intent);\n }",...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column DOWNSYSFUNDTRANS.CLEARDATE
public void setCleardate(Date cleardate) { this.cleardate = cleardate; }
[ "public void setDATE_CLEAR_AUTH(Date DATE_CLEAR_AUTH) {\r\n this.DATE_CLEAR_AUTH = DATE_CLEAR_AUTH;\r\n }", "public void setClearDate(DateSearchCriteria aClearDate)\n {\n clearDate = aClearDate;\n }", "public Date getCleardate() {\n return cleardate;\n }", "public io.confluent...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Cast an IBinder object into an com.example.remoteservice.IRemoteServiceCallback interface, generating a proxy if needed.
public static IRemoteServiceCallback asInterface(android.os.IBinder obj) { if ((obj==null)) { return null; } android.os.IInterface iin = obj.queryLocalInterface(DESCRIPTOR); if (((iin!=null)&&(iin instanceof IRemoteServiceCallback))) { return ((IRemoteServiceCallback)iin); ...
[ "public static com.example.oscarchang.ocandroidtwo.IRemoteCallBack asInterface(android.os.IBinder obj) {\n if ((obj == null)) {\n return null;\n }\n android.os.IInterface iin = obj.queryLocalInterface(DESCRIPTOR);\n if (((iin != null) && (iin instanceof com...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method allows press the in progress state for a story
public void clickInProgressState(){ inProgressStateOption.click(); }
[ "public void setInProgress(Boolean inProgress) {\n this.inProgress = inProgress;\n }", "public void setStateToInProgress() {\n progressBar.setIndeterminate(true);\n progressBarLabel.setText(\"Simulation is in progress...\");\n openFolderButton.setVisible(false);\n }", "public ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Load a game based on whether or not loadFile is true, otherwise create new business object
public Business loadGame(boolean loadFile) throws IOException{ if (loadFile){ try{ // try to create input stream ObjectInputStream objectInputStream = new ObjectInputStream(openFileInput(FILENAME)); try { // get business object ...
[ "Game load(File file) throws IOException;", "void loadGame(File file);", "public boolean loadFromFile(IGameFile gameFile) throws IOException;", "public void loadGame(File fileLocation, boolean replay);", "public static Game loadGame(String fileName){\n Game game = null;\n try {\n Fi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
System.out.println(new MatrixChainMultiplication().doMatrixchainMultiple(1, p.length 1));
public static void main(String[] args) { System.out.println(new MatrixChainMultiplication().doDPMatrixChainMultiple(1, p.length)); }
[ "public interface MatrixChainMultiplier {\n \n /**\n * Computes the product of the matrix chain.\n * \n * @param matrices an array of matrices to multiply.\n * @return the matrix chain product.\n */\n public Matrix multiply(Matrix... matrices);\n}", "@Test\n public void test...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the extraTooltipInformation that will be rendered as part of the tooltip. This should be something useful in some way.
protected ActionbarItem setExtraTooltipInformation(String info) { this.extraTooltipInformation = info; return this; }
[ "public String getExtraTooltipInformation()\n\t{\n\t\treturn extraTooltipInformation;\n\t}", "public void setTooltipText() { tooltip.setText(name); }", "public abstract void setTooltipData(ITooltipData data);", "public void setExtraInfo(ExtraInfoT extraInfo) {\n this.extraInfo = extraInfo;\n }", "...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This override is to make the calendar use the Custom CaldroidGridAdapter.
@Override public CaldroidGridAdapter getNewDatesGridAdapter(int month, int year) { return new LyonsAdapter(getActivity(), month, year, getCaldroidData(), extraData); }
[ "public CustomCalendarView(Context context, AttributeSet attrs,\n int year, int month, Calendar todayCal,\n Calendar selectedCal, Calendar minCal, Calendar maxCal)\n {\n super(context, attrs);\n\n LayoutInflater inflater = (LayoutInflater) c...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new ellipticalAreaType from encoded stream.
public static ellipticalAreaType fromPerAligned(byte[] encodedBytes) { ellipticalAreaType result = new ellipticalAreaType(); result.decodePerAligned(new BitStreamReader(encodedBytes)); return result; }
[ "public static ellipticalAreaType fromPerUnaligned(byte[] encodedBytes) {\n ellipticalAreaType result = new ellipticalAreaType();\n result.decodePerUnaligned(new BitStreamReader(encodedBytes));\n return result;\n }", "public static polygonAreaType fromPerUnaligned(byte[] encodedBytes) {\n polygonArea...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generates a list of the center of all pixels in the picture pane based on stated finals.
private void generatePixelRays() { double pixelWidth = PP_WIDTH/PIX_WIDTH; double pixelHeight = PP_HEIGHT/PIX_HEIGHT; double startX = PP_WIDTH/(-2f) + pixelWidth/(2f); double startY = PP_HEIGHT/(2f) - pixelHeight/(2f); for(int xIndex = 0;xIndex < PIX_WIDTH;xIndex++) { for(int yIndex = 0;yIndex < PIX_H...
[ "public void printCenter(){\n for(Double val : center){\n System.out.print(val + \" \");\n }\n System.out.println();\n }", "private void recalculateCenter() {\n\t\tint xc = 0, yc = 0;\n\t\tfor (Point p : points) {\n\t\t\txc += p.x;\n\t\t\tyc += p.y;\n\t\t}\n\t\t\t\n\t\tcenter =...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Cancels the passed alarm object for occurring removing alarm from the scheduled time.
public void cancelAlarm(Context context, Alarm alarm) { // instantiate the system alarm service manager alarmMgr = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE); // instantiate an intent for the AlarmReciever Intent intent = new Intent(context, AlarmReceiver.class); ...
[ "void removeAlarm(Alarm alarm);", "public void cancelAlarm() {\n AlarmManager manager = (AlarmManager) getSystemService(Context.ALARM_SERVICE);\n try {\n manager.cancel(pendingIntent);\n } catch (Exception e){\n Log.d(TAG, e.getMessage());\n }\n// Toast.mak...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check if there are any listeners for a specific address. (Generic listeners count as well)
public boolean hasRequestListeners(TransportAddress localAddr) { if (!messageListeners.isEmpty()) { // there is a generic listener return true; } if (!children.isEmpty()) { EventDispatcher child = children.get(localAddr); if (child != null) { ...
[ "public int getListenerCount();", "long getListenerCount();", "public boolean hasListener(int type) {\n assert type > 0 : \"Invalid event type: \" + type;\n\n Listeners listeners = lsnrs.get(type);\n\n return (listeners != null) && (!F.isEmpty(listeners.highPriorityLsnrs) || !F.isEmpty(list...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns true iff this is a win due to a repeated position.
boolean repeatedPosition() { for (Board board: positionstack) { if (this.piecetosquare.equals(board.piecetosquare)) { if (this.turn() == board.turn()) { return true; } } } return _repeated; }
[ "boolean repeatedPosition() {\r\n if (_repeated && _winner == BLACK) {\r\n System.out.println(\"* Black wins\");\r\n } else if (_repeated && _winner == WHITE) {\r\n System.out.println(\"* White wins\");\r\n }\r\n return _repeated;\r\n }", "private void checkRep...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the iv last update date.
public void setIV_LAST_UPDATE_DATE(Calendar iV_LAST_UPDATE_DATE) { IV_LAST_UPDATE_DATE = iV_LAST_UPDATE_DATE; }
[ "public void setLastUpdate() {\n java.util.Date today = new java.util.Date();\n java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat(\"yyyy-MM-dd\");\n this.lastUpdate = sdf.format(today.getTime());\n }", "public void setLastUpdate(Date lastUpdate) { this.lastUpdate = lastUpdate...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Helper method Registers players from .yml to active server instance
private void registerPlayers(SantaConfig sc) { // Second try. Set<String> keys = sc.getBaseKeys("registered"); for(String key : keys) { String name = sc.getBaseString("registered." + key); UUID id = UUID.fromString(key); playerRegistry.put(id, name); }...
[ "private void registrateByServer() throws IOException {\r\n\t\tthis.sendMessage(new PacketRegistratePlayerByServer(DominionController.getInstance().getUsername(),\r\n\t\t\t\tDominionController.getInstance().getSessionID()));\r\n\t}", "public void register(PlayerData player) {\n\t\tplayers.put(player.getName(), pl...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__ObjectPermission__Group__7" $ANTLR start "rule__ObjectPermission__Group__7__Impl" ../org.xtext.example.rmodp.ui/srcgen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:13281:1: rule__ObjectPermission__Group__7__Impl : ( ( rule__ObjectPermission__Object_permissionAssignment_7 ) )...
public final void rule__ObjectPermission__Group__7__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:13285:1: ( ( ( rule__ObjectPer...
[ "public final void rule__ObjectPermission__Group__7() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:13274:1: ( rule__Ob...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set whether the matching (by name and by type) fields between input and output should be copied as is. This is an optional property, default is true.
public void setCopyMatchingFields(boolean copyMatchingFields) { this.copyMatchingFields = copyMatchingFields; }
[ "public boolean isCopyMatchingFields()\n {\n return copyMatchingFields;\n }", "static void setNotCopying(){isCopying=false;}", "private static boolean shouldCopyValues(RDFProperty property) {\n if (property == null) {\n return false;\n }\n for (String propertyName : EXCLUDED...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieving all the wine participant assignment
public ResultSet getAllWineParticipantAssignment () throws Exception { String sql = "SELECT * FROM wineparticipantassignment;"; return stmt.executeQuery(sql); }
[ "@Override\n public List<ConnectathonParticipant> getPeopleAttendingOnMonday() {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"getPeopleAttendingOnMonday\");\n }\n\n renderAddPanel = false;\n\n if (Role.isLoggedUserAdmin() || Role.isLoggedUserProjectManager() || Role.isLogged...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Caches the righe richieste in the entity cache if it is enabled.
@Override public void cacheResult(RigheRichieste righeRichieste) { entityCache.putResult(RigheRichiesteModelImpl.ENTITY_CACHE_ENABLED, RigheRichiesteImpl.class, righeRichieste.getPrimaryKey(), righeRichieste); righeRichieste.resetOriginalValues(); }
[ "@Override\n\tpublic void cacheResult(List<RigheRichieste> righeRichiestes) {\n\t\tfor (RigheRichieste righeRichieste : righeRichiestes) {\n\t\t\tif (entityCache.getResult(\n\t\t\t\t\t\tRigheRichiesteModelImpl.ENTITY_CACHE_ENABLED,\n\t\t\t\t\t\tRigheRichiesteImpl.class, righeRichieste.getPrimaryKey()) == null) {\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates an empty temporary file with the given name
public static TemporaryFile createTempFile(String name) throws IOException { return new TemporaryFile(name, null, null); }
[ "protected File createTmpFile() {\n final long rand = (new Random(System.currentTimeMillis())).nextLong();\n File file = new File(\"jpcoverage\" + rand + \".tmp\");\n return file;\n }", "public void createFile() {\n\n\t\tString fileName = this.randomFileName();\n\t\tfile = new File(fileNam...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return all Events Not from Users's state
public List<Event> eventsNotInYourState(Long user_id){ String myState = thisUsersState(user_id); return eventRepo.findByStateIsNot(myState); }
[ "public List<EventEntry> getNonExcludedEvents() { \n List events = new ArrayList<EventEntry>(datedEvents);\n events.addAll(undatedEvents);\n return events;\n }", "@Transactional(readOnly = true)\n public List<Event> findAllNotificationsNotOpened() {\n log.debug(\"Request to get a...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a RateLimiterRegistry with a Map of shared RateLimiter configurations and a RateLimiter registry event consumer.
static RateLimiterRegistry of(Map<String, RateLimiterConfig> configs, RegistryEventConsumer<RateLimiter> registryEventConsumer, Map<String, String> tags) { return new InMemoryRateLimiterRegistry(configs, registryEventConsumer, tags); }
[ "static RateLimiterRegistry of(Map<String, RateLimiterConfig> configs,\n RegistryEventConsumer<RateLimiter> registryEventConsumer) {\n return new InMemoryRateLimiterRegistry(configs, registryEventConsumer);\n }", "static RateLimiterRegistry of(Map<String, RateLimiterConfig> configs,\n List...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the discovery implementation type. Defaults to TcpDiscoveryMulticastIpFinder
public IgniteDiscoveryOptions setType(String type) { this.type = type; return this; }
[ "private DiscoverySpi discoverySpi() {\n\t\tTcpDiscoverySpi tcpDiscoverySpi = new TcpDiscoverySpi();\n\t\tif (igniteProperties.isEnableMulticastGroup()) {\n\t\t\tTcpDiscoveryMulticastIpFinder tcpDiscoveryMulticastIpFinder = new TcpDiscoveryMulticastIpFinder();\n\t\t\ttcpDiscoveryMulticastIpFinder.setMulticastGroup(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the "fileStrc" element
public edu.umich.icpsr.ddi.FileStrcType getFileStrc() { synchronized (monitor()) { check_orphaned(); edu.umich.icpsr.ddi.FileStrcType target = null; target = (edu.umich.icpsr.ddi.FileStrcType)get_store().find_element_user(FILESTRC$4, 0); if (target == ...
[ "public static String getFileString() {\n return fileString;\n }", "public edu.umich.icpsr.ddi.FileStrcType addNewFileStrc()\n {\n synchronized (monitor())\n {\n check_orphaned();\n edu.umich.icpsr.ddi.FileStrcType target = null;\n target = (edu.umich.ic...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Cleans up old cache files in the directory, migrating everything previously loaded in them to the current cache file. Normally, only newly compiled units are written to the current log, but when it is time to cleanup, valid units from older log files need to be rewritten.
@Override public void cleanup(TreeLogger logger) { awaitUnitCacheMapLoad(); if (backgroundService.isShutdown()) { return; } boolean shouldRotate = addedSinceLastCleanup > 0; logger.log(TreeLogger.TRACE, "Added " + addedSinceLastCleanup + " units to cache since last cleanup."); a...
[ "public void cleanCache() {\n\t\tFileSystemUtil.cleanDir(mFileCacheDir);\n\t\tFileSystemUtil.cleanDir(mImageCacheDir);\n\t}", "private void cleanupLocal() throws IOException {\n FileSystem lfs = FileSystem.getLocal(new Configuration());\n lfs.delete(new Path(\"build\"), true);\n System.setPro...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column TB_NOMS_GV_INTERFACE_TEMP.CREATION_DATE
public void setCREATION_DATE(Date CREATION_DATE) { this.CREATION_DATE = CREATION_DATE; }
[ "public void setCREATION_DATE(Date CREATION_DATE) {\r\n this.CREATION_DATE = CREATION_DATE;\r\n }", "public void setCREATED_DATE(Date CREATED_DATE) {\r\n this.CREATED_DATE = CREATED_DATE;\r\n }", "public void setDate_creation(Date date_creation) {\r\n this.date_creation = date_creatio...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Use l1, r1, l2, r2...
private List<Integer> helper(int[] arr1, int l1, int r1, int[] arr2, int l2, int r2) { if (l1 == r1 || l2 == r2) { if ( l1 == r1 && l2 == r2) { if (arr1[l1] != arr2[l2]) { return Arrays.asList(arr1[l1], arr2[l2]); } return null; } else if (l1 == r1) { // Need to specify return Arrays.as...
[ "static <T> List<T> riffle(List<T> L1, List<T> L2, Random R) {\n // REPLACE WITH ANSWER\n return null;\n }", "public void initializeLR() {\n // Initializing L[1], L[2], R[1], and R[2] as 0x00000000\n for(int i = 1; i < L.length; i++) {\n L[i] = R[i] = 0x00000000;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
check the max reach for given shapes
@Test public void getMaxReach() { assertEquals("Max reach for G should be 3", 3, Shape.G.getMaxReach()); assertEquals("Max reach for J should be 4", 4, Shape.J.getMaxReach()); assertEquals("Max reach for I should be 2", ...
[ "protected abstract boolean nbrToursMax();", "int getMaxHitPoints();", "public boolean checkTriangleMax(long max, long x, long y)\n {\n \n \n return x + y > 0 && x + y <= max;\n \n }", "protected final boolean checkMaxDistances(\n\t\t\tfinal OpenLREncoderProperties proper...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Remove the identifier type sub field mapper from the list of mappers.
public boolean remove(IdentifierTypeSubFieldMapper mapper) { return identifierTypeSubFieldMappings.remove(mapper); }
[ "public void removeMapper(Mapper mapper);", "public void removeMappingFields(int i)\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(MAPPINGFIELDS$28, i);\n }\n }", "public boolean remove(ExtentTypeSubFieldMapper mapper)\r\n\t{\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }