query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
Returns the expected JSON output for this unit test
private String getExpectedJSONOutput() throws InvalidDDMSException { StringBuffer json = new StringBuffer(); json.append("{\"requesterInfo\":["); json.append(RequesterInfoTest.getFixtureList().get(0).toJSON()).append("],"); json.append("\"addressee\":["); json.append(AddresseeTest.getFixtureList().get(0)...
[ "private String getExpectedJSONOutput() {\r\n\t\tStringBuffer json = new StringBuffer();\r\n\t\tjson.append(\"{\\\"id\\\":\\\"IDValue\\\",\\\"srsAttributes\\\":\");\r\n\t\tjson.append(SRSAttributesTest.getFixture().getJSONObject().toString());\r\n\t\tjson.append(\",\\\"pos\\\":[\");\r\n\t\tfor (Iterator iterator = ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
' Strip will escape all HTML tags and create an empty string for the null string
private String strip(String text) { if(text == null) return ""; text = text.replaceAll("&", "&amp;"); text = text.replaceAll("<", "&lt;"); text = text.replaceAll(">", "&gt;"); return text; }
[ "public static String removeAndEscapeHTML( String s ) {\n if ( s==null ) return \"\";\n else return Utilities.escapeHTML( Utilities.removeHTML(s) );\n }", "private String removeAllHtmlTags(String string) {\n return string.replaceAll(\"<[^>]*>\", \"\");\n }", "public static String stri...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieves the minimum size of the response payload to be compressed
public int minimumCompressionSize() { return m_minimumCompressionSize; }
[ "long getUncompressedSize();", "int getServerPayloadSizeBytes();", "public long compressedSize() { int o = __offset(8); return o != 0 ? bb.getLong(o + bb_pos) : 0L; }", "int getTruncatedByteCount();", "public int getUncompressedSizeKB() {\n return uncompressedSizeKB;\n }", "DataSize getRequestSi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
get the length of the active RF accelerating structure in this cavity (m)
public double getRFLength() { double sum = 0.; for ( final RfGap gap : _gaps ) { sum += gap.getGapLength(); } return sum; }
[ "int getAccelCount();", "public int getAccelCount() {\n return accelCount_;\n }", "public int getAccelCount() {\n return accelCount_;\n }", "public int getIntronLength() { \n\t\tfinal int start = getLast5SSPos(); \n\t\tfinal int end = getLast3SSPos();\n\t\treturn( Math.abs( end - start ) )...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource on a given Google Cloud project and region. `AzureClient` resources hold client authentication information needed by the Anthos Multicloud API to manage Azure resources on your Azure subscription on your behalf. If successful, the response ...
default void createAzureClient( com.google.cloud.gkemulticloud.v1.CreateAzureClientRequest request, io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( getCreateAzureClientMethod(), responseObserver); ...
[ "public com.google.longrunning.Operation createAzureClient(\n com.google.cloud.gkemulticloud.v1.CreateAzureClientRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getCreateAzureClientMethod(), getCallOptions(), request);\n }", "public com.google.common...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This function sets whether all curves are to drawn or only fractiles are to drawn
public void setPlotAllCurves(boolean drawAllCurves) { this.isAllCurves = drawAllCurves; }
[ "public void setUse_all_curves(byte use_all_curves) throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__io__block.writeByte(__io__address + 1, use_all_curves);\n\t\t} else {\n\t\t\t__io__block.writeByte(__io__address + 1, use_all_curves);\n\t\t}\n\t}", "public void set_as_bezier() {\n sur...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Obtener codigo de activacion de BD
public static String getCodigoActivacionFromDB(StatusSQLiteHelper dbH) { String cod = ""; SQLiteDatabase dbStatus = dbH.getWritableDatabase(); if (dbStatus != null) { Cursor c = dbStatus.rawQuery("SELECT " + dbH.codigoactiv + " FROM Status WHERE " + dbH.id + "=1", null); ...
[ "public abstract java.lang.Long getCod_actividad();", "public int getBd_code() {\r\n return Bd_code;\r\n }", "private GestionBD(){\r\n\t\tlineConnection=SingleDBConnection.getConexionBD().conectarBD();\r\n\t}", "public static String getCodigoActivacion(StatusSQLiteHelper dbH) {\n ArrayList<St...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Inapp purchase delegate protocol for custom purchase handling. The delegate must handle the product purchase flow then call the GADInAppPurchase object's reportPurchaseStatus: method.
public interface GADInAppPurchaseDelegate extends NSObjectProtocol { /** Called when the user clicks on the buy button of an in-app purchase ad. After the receiver handles the purchase, it must * call the {@link GADInAppPurchase#reportPurchaseStatus(GADInAppPurchaseStatus)} method. * @param purchase */ ...
[ "private void launchInAppPurchaseFlow() {\n String payload = \"\";\n\n if (mHelper == null) return;\n\n try {\n mHelper.launchPurchaseFlow(this, SKU_PREMIUM, PURCHASE_REQUEST, mPurchaseFinishedListener, payload);\n } catch (IabHelper.IabAsyncInProgressException ex) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds ConnectionEventListeners to a hash table to be used for notification of ConnectionEvents
public synchronized void addConnectionEventListener(ConnectionEventListener connectioneventlistener) { if(eventListeners != null) { eventListeners.put(connectioneventlistener, connectioneventlistener); } }
[ "public void addConnectionEventListener(ConnectionListener listener);", "public void addConnectionEventListener(ConnectionEventListener listener) {\n eventListener.addConnectorListener(listener);\n }", "public synchronized void addConnectionEventListener(ConnectionEventListener connectioneventlistener...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get an instance of the contact groups module.
public abstract ModuleContactGroups contactGroups();
[ "GroupsManager getGroupsManager();", "public List<ContactGroup> getContactGroups()\n {\n return this.contactGroups;\n }", "public JwmaContactGroup getContactGroup(String uid);", "public Group getGroupContacts(String grpID) {\n\t\tcr = ctx.getContentResolver();\n\t\tcur = cr.query(tunadatamodel.Tu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
this method checks if a given string has a balanced number of parenthesis
public static boolean isBalanced(String str) { int count = 0; for (int i = 0; i < str.length() && count >= 0; i++) { if (str.charAt(i) == '(') count++; else if (str.charAt(i) == ')') count--; } return count == 0; }
[ "public static boolean isBalancedParenthesis(String str){\r\n\t\tString OPEN =\"{[(\", CLOSE = \"}])\";\r\n\t\tStack<Character> stack = new Stack<>();\r\n\t\tfor(int i=0; i < str.length(); i++){\r\n\t\t\tCharacter ch = str.charAt(i);\r\n\t\t\tif (OPEN.indexOf(ch) >= 0)\r\n\t\t\t\tstack.push(ch);\r\n\t\t\tif (CLOSE....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
string screen_size = 15;
java.lang.String getScreenSize();
[ "public java.lang.String getScreenSize() {\n java.lang.Object ref = screenSize_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n screenSize_ = s...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
the area of the base of the parallelepiped
public double getAreaBase(){ LOGGER.info("PARALLELEPIPED_GET_BASE_AREA_INFO"); return this.lengthA * this.widthB; }
[ "public double getArea(){\n LOGGER.info(\"PARALLELEPIPED_GET_AREA_INFO\");\n return this.getAreaSideSurface() + 2 * this.getAreaBase();\n }", "@Override\n public double getArea ()\n {\n double area = 0.0;\n int length = pentX.length;\n \n area = Math.abs ( pentX[0] ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Permet de supprimer un topo de sa liste personnel
void supprimerTopo(String user, Integer topoId);
[ "public void eliminarTarefas() {\n lista.clearTarefas();\n }", "public void eliminaCircuitoRutero (){\n\t\n\tfor (OpeCircuito circuito: listaCircuitoSeleccionado){\n\t\t\n\t\tservicioRutero.eliminaCircuitoRutero(circuito.getIdCircuito(), tripulacion.getFechaOperacion() );\n\t\t\t\t\n\t\t}\n\t\n\t\n\t\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check if a shift over a terminal is possible.
public boolean canShiftOverTerminal() { return marker < getRhs().length && getRhs()[marker] instanceof Token; }
[ "TriStateBoolean isShiftKeyDown();", "public static boolean isShiftKeyDown() { return Keyboard.isKeyDown(42) || Keyboard.isKeyDown(54); }", "boolean hasIsTerminal();", "public boolean canShift() {\n\t\treturn marker < getRhs().length;\n\t}", "public boolean isShiftOnce()\r\n {\r\n if(shiftPressed ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds an atrezzo item reference to the list of atrezzo item references
public void addAtrezzoReference( ElementReference itemReference ) { atrezzoReferences.add( itemReference ); }
[ "public void addItemReference( ElementReference itemReference ) {\n\n itemReferences.add( itemReference );\n }", "public void addReference(Reference ref) {\n references.addElement(ref);\n }", "private void add(HudItem hudItem, HudItem ref) {\r\n\t\tArrayList<HudItem> reg = getRegistry(hudI...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removes words that are just spaces or blank lines
private void parseFile() { for (String word : mWords) { if (word.equals(" ") || word.equals("")) { mWords.remove(word); } } }
[ "public static String filter(String s) {\n\t\ts = s.trim();\n\t\tString[] words= s.split(\" \");\n\t\tList<String> l = Arrays\n\t\t\t\t.asList(words)\n\t\t\t\t.stream()\n\t\t\t\t.filter(word->!curseWords.contains(word))\n\t\t\t\t.collect(Collectors.toList());\n\t\treturn String.join(\" \", l);\n\t}", "public stat...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructor for the MultipleDirClassDiagramReloader object
public MultipleDirClassDiagramReloader() { super(); System.out.println("MultipleDirClassDiagramReloader()"); System.out.flush(); list = new LinkedList(); necessary = false; }
[ "protected MultiFileLoader (String representationClassName) {\n super (representationClassName);\n }", "public ReloadingClassLoader() {\r\n List<URL> delegationClassLoaderClassPath = new ArrayList<>();\r\n List<File> classPathItems = ReloadingContext.getInstance().getReloadingClassPaths();...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Read an unsigned integer from the given position without modifying the buffers position
public static long readUnsignedInt(ByteBuffer buffer, int index) { return buffer.getInt(index) & 0xffffffffL; }
[ "public abstract int readUnsignedByte() throws IOException;", "public long readUnsignedInt() throws IOException {\n\tbyte[] bytes = readBytes(4);\n\treturn byteConverter.toUnsignedInt(bytes);\n }", "private long getUInt(int pos) {\n return (getInt(pos) & 0xffffffffL);\n }", "@Override\n public...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the system table for this Kiji instance. The system table is owned by the Kiji instance : do not close it. .
KijiSystemTable getSystemTable() throws IOException;
[ "public final Table getSystemTable(Session session, String name) {\n\n Table t;\n int tableIndex;\n\n if (!isSystemTable(name)) {\n return null;\n }\n\n tableIndex = getSysTableID(name);\n t = sysTables[tableIndex];\n\n // fredt - any system tab...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "entryRuleDimensionRange" $ANTLR start "ruleDimensionRange" ../org.kermeta.language.sample.cellularautomata.rules.initialization.cs/srcgen/org/kermeta/language/sample/cellularautomata/rules/parser/antlr/internal/InternalInit.g:367:1: ruleDimensionRange returns [EObject current=null] : ( ( (lv_lower_0_0= rule...
public final EObject ruleDimensionRange() throws RecognitionException { EObject current = null; Token otherlv_1=null; AntlrDatatypeRuleToken lv_lower_0_0 = null; AntlrDatatypeRuleToken lv_upper_2_0 = null; enterRule(); try { // ....
[ "public final EObject entryRuleDimensionRange() throws RecognitionException {\r\n EObject current = null;\r\n\r\n EObject iv_ruleDimensionRange = null;\r\n\r\n\r\n try {\r\n // ../org.kermeta.language.sample.cellularautomata.rules.initialization.cs/src-gen/org/kermeta/language/sample...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Resets the nombre field.
public void resetNombre();
[ "public void resetNuevoNombre()\r\n {\r\n this.nuevoNombre = null;\r\n }", "private void actualizarNombre(Persona persona){\n \n String nombre=IO_ES.leerCadena(\"Inserte el nombre\");\n persona.setNombre(nombre);\n }", "@Override\n public void setNombre(java.lang.String n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Expect no balancing to occur in hot pool (2 containers overthreshold at 40). On addition of new container, expect hot containers to offload 10 each.
@Test public void testAddContainerWhenHot() { // Set-up containers and items. MockContainerEntity containerA = newContainer(app, "A", 10, 30); MockContainerEntity containerB = newContainer(app, "B", 10, 30); MockItemEntity item1 = newItem(app, containerA, "1", 10); MockItemEn...
[ "@Test\n public void\n initializeIterationShouldUpdateUnBalancedNodesWhenThresholdChanges() {\n List<DatanodeUsageInfo> expectedUnBalancedNodes;\n List<DatanodeUsageInfo> unBalancedNodesAccordingToBalancer;\n\n // check for random threshold values\n for (int i = 0; i < 50; i++) {\n double ran...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the number of unique country codes held by this country list.
public int countryCount(){ return this.countries.size(); }
[ "public int getNoOfCountries()\r\n {\r\n return this._noOfCountries;\r\n }", "int getCountriesCount();", "@Transactional\n\tpublic Integer countRcsCountryLists() {\n\t\treturn ((Long) rcsCountryListDAO.createQuerySingleResult(\"select count(o) from RcsCountryList o\").getSingleResult()).intValue();...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Make the first card visible.
public void showCard() { ArrayList<Card> superCards = super.removeCards(); super.addCard(hiddenCard); super.addCards(superCards.subList(1, superCards.size())); hidden = false; }
[ "public void showTopCard(){\n if(this.getComponentCount() == 0)\n return;\n Component[] c = this.getComponents();\n CardTexture card = (CardTexture)c[0];\n card.showCard();\n }", "private void setVisibility() {\n mEmptyRecentView.setVisibility((\n mC...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
ctor kelas Reptil, melakukan random pada arah gerak dan sumbu gerak. Makhluk yang merupakan turunan kelas Reptil.
Reptil() { Random randomGenerator = new Random(); int temp; //random arah hadap makhluk arah = randomGenerator.nextInt(2); //random arah gerak makhluk temp = randomGenerator.nextInt(2); if (temp == 0) { sumbu = 'X'; } else { sumbu = 'Y'; } }
[ "public static Ally getRandomRep () {\n return republican[(int) (Math.random() * republican.length)];\n }", "public void randomize() {\r\n\t\tif(randomizzatoreVariazione > 0.5)\r\n\t\t\tandamentoCurva.setVariazione(\r\n\t\t\t\t\tandamentoCurva.getVariazione() * randomizzatoreVariazione\r\n\t\t\t\t\t+ an...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__PredicatePrimary__ExpressionAssignment_1_2" $ANTLR start "rule__PredicateAtomic__ValueAssignment_0_1" ../eu.quanticol.caspa.ui/srcgen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:10036:1: rule__PredicateAtomic__ValueAssignment_0_1 : ( ruleNatural ) ;
public final void rule__PredicateAtomic__ValueAssignment_0_1() throws RecognitionException { int stackSize = keepStackSize(); try { // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:10040:1: ( ( ruleNatural ) ) // ../...
[ "public final void rule__UpdateAtomic__ValueAssignment_0_1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:10490:1: ( ( ruleNatural ) )\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ regEx for tagID
public static String getTagID(String str){ String tag = str.substring(0, 8); String regEx = "(\\d{1}|[A-F])+(\\d{1}|[A-F])+(\\d{1}|[A-F])+(\\d{1}|[A-F])+(\\d{1}|[A-F])+(\\d{1}|[A-F])+(\\d{1}|[A-F])+(\\d{1}|[A-F])"; Pattern pattern = Pattern.compile(regEx); Matcher matcher = pattern.matcher(tag); if(!match...
[ "public static boolean isIDTag(String tag){\n\t\treturn tag.equalsIgnoreCase(idField);\n\t}", "int invalidTagId();", "private boolean validId(String id) {\n Matcher matcher = pattern.matcher(id);\n return matcher.matches();\n }", "public void testStringID() {\n String testID = generator.generate...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the minimal value of free disk space accepted until an upload is aborted.
protected static long getMinUploadFreespace() { return minUploadFreespace; }
[ "long getMinFreeSpace();", "public long getMinFree() {\n return params.getMinimumFree() * 1024 * 1024;\n }", "long getDiskSizeGb();", "public long getSpaceRequired();", "int getDiskMb();", "long getAvailableSpace() throws IOException;", "public Long getSizeAvailable() { return this.sizeAvailab...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Start de thread die deze ClientHandlerinstantie bedient.
public void start() { assert (runner == null); runner = new Thread(this); runner.start(); System.out.println("Client handler voor " + toString() + " is gestart."); }
[ "public static void startClient(){\t\t\t \n\t try {\n\t\t\tclient = new Client();\n\t\t\tclient.start();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n }", "public void start() {\n clientThread.start();\n serverThread.start();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column TRSDEAL_PROMISSORY_FX.SOLD_RATE
public BigDecimal getSOLD_RATE() { return SOLD_RATE; }
[ "public void setSOLD_RATE(BigDecimal SOLD_RATE)\r\n {\r\n\tthis.SOLD_RATE = SOLD_RATE;\r\n }", "public Double getSaleRate() {\n\t\treturn saleRate;\n\t}", "public java.math.BigDecimal getSalesRate() {\n return salesRate;\n }", "public BigDecimal getPROFIT_RATE_OLD() {\r\n return PROFIT_...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
============================================================================================================================================= = HELPER METHODS ============================================================================================================================================= private method whic...
private String getLetter() { String input=""; boolean valid = false; while(!valid) { input = scnr.next(); // get input if(isValidInput(input)) { // check if its valid valid = true; // if yes, set valid to true to end while loop } } return input.toLowerCase(); // return the validated inp...
[ "public char askForLetter() {\n\t\tchar guessLetter;\n\t\tboolean validInput = false;\n\t\twhile (validInput == false) {\n\t\t\tSystem.out.println(\"Enter a letter: \");\n\t\t\tString guessLine = keyboard.nextLine();\n\t\t\tif (guessLine.length() == 0 || guessLine.length() >= 2) {\n\t\t\t\tSystem.out.println(\"Plea...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a titled border with a blue font
private TitledBorder _createTitledBorder(String title) { TitledBorder border = BorderFactory.createTitledBorder(" " + title + " "); border.setTitleColor(new Color(0, 10, 230)); return border; }
[ "private void drawBorder() {\n Border b = BorderFactory.createTitledBorder(BorderFactory.createMatteBorder(2, 0, 0, 0, accentCol), borderTitle,\n TitledBorder.CENTER, TitledBorder.DEFAULT_POSITION, new Font(\"Serif\", Font.BOLD, 18), accentCol);\n setBorder(b);\n setBackground(ba...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional string dependentLocality = 8;
boolean hasDependentLocality();
[ "void setLocality(java.lang.String locality);", "private void setLocality(\n String value) {\n value.getClass();\n \n locality_ = value;\n }", "String getLocality();", "float getDataLocality();", "boolean isSetLocality();", "@Test\n public void test8() throws Throwable {\n Tho...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Formats Belgian VAT numbers according to the new regulation.
public String formatOutputVat(String vat) { if (vat.length() == 10) { return "BE " + vat.substring(0, 4) + " " + vat.substring(4, 7) + " " + vat.substring(7); } else { return vat; } }
[ "public String getVATNumber() {\n if (isVATRegistered) {\n return \"BG\" + this.eik;\n }\n return \"\";\n }", "public String formatOutputVATRate(Double vatRate) {\n return String.format(\"%.2f\", vatRate) + \" %\";\n }", "private String fixBattery(double voltage) {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds the menu to browser.
void addMenuToBrowser() { // Menu menu = new Menu(mRightBrowser); // mRightBrowser.setMenu(menu); // MenuItem menuItem = new MenuItem(menu, SWT.NONE); // menuItem.setText("Refresh"); // MenuItem menuItem_1 = new MenuItem(menu, SWT.NONE); // menuItem_1.setText("Open"); // MenuItem menuItem_2 = new MenuItem...
[ "private void addMenu() {\r\n\t\tjJMenuBar = new JMenuBar();\r\n\t\tdashboardMenu = new DashboardMenu(this, editable);\r\n\t\tjJMenuBar.add(dashboardMenu);\r\n\t\tthis.setJMenuBar(jJMenuBar);\r\n\t}", "private void addMenu()\r\n {\r\n //Add menu bar to our frame\r\n MenuBar menuBar = new MenuBar();\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The dialog node ID.
@JsonProperty("dialog_node") @ApiModelProperty(required = true, value = "The dialog node ID.") @NotNull public String getDialogNode() { return dialogNode; }
[ "public String getDialogNode() {\n return dialogNode;\n }", "public long getDialogId();", "public String getDialogid() {\n return getAttribute(ATTRIBUTE_DIALOGID);\n }", "@Override\n\tpublic long getDialogMemberId() {\n\t\treturn _dialogMessage.getDialogMemberId();\n\t}", "public long getDialo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
//////////////////// methods /////////////////////////////////////// Method to return a string with information about this picture.
public String toString() { String output = "Picture, filename " + getFileName() + " height " + getHeight() + " width " + getWidth(); return output; }
[ "public String toString()\n {\n String output = \"Picture, filename \" + getFileName() +\n \" height \" + getHeight()\n + \" width \" + getWidth();\n return output;\n\n }", "public String toString()\n {\n String output = \"Picture, filename \" + getFileName() + \n \" height \" + getHeig...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Reify this state as a TimeKeeperRecord.
public TimeKeeperRecord toTimeKeeperRecord() { Builder builder = TimeKeeperRecord.newBuilder().setLastCalculatedTime(currentTime).addAllTimeHistory(history); if (!version.equals(TimeKeeperVersion.V_1_0)) { builder = builder.setVersion(this.version); if (maxDeviation != DEFAULT_MAX_DEVIATION) { ...
[ "public ParticipantTimeState(final TimeKeeperRecord tkRecord) {\n this.history = new ArrayList<>();\n this.currentTime = tkRecord.getLastCalculatedTime();\n history.addAll(tkRecord.getTimeHistoryList());\n this.version = tkRecord.getVersion();\n this.maxDeviation = DEFAULT_MAX_DEVIATION;\n this.ma...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Setter method for property resultInnercountFlg.
public void setResultInnercountFlg(Integer resultInnercountFlg) { this.resultInnercountFlg = resultInnercountFlg; }
[ "public Integer getResultInnercountFlg() {\n return resultInnercountFlg;\n }", "public void setResultInnererrorFlg(Integer resultInnererrorFlg) {\n this.resultInnererrorFlg = resultInnererrorFlg;\n }", "public void setResultInnermatFlg(Integer resultInnermatFlg) {\n this.resultInnerma...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test the pantry search function
@Test public void testPantrySearch() { // Add some ingredients p.addIngredient(new Ingredient("Flour", 42, "Pounds")); p.addIngredient(new Ingredient("Bacon", 13, "Crates")); p.addIngredient(new Ingredient("Toast", 200, "Slices")); // Search the pantry for items we a...
[ "public void testSearch() {\n doTestSearch();\n }", "@Test (priority = 0)\n\tpublic void searchTest(){\n\t\tHomePage homePage = new HomePage(driver);\n\t\thomePage.search_query.sendKeys(searchQuery+Keys.ENTER);\n\t\tResultsPage resultsPage =new ResultsPage(driver);\n\t\tassertTrue(resultsPage.result(searchQue...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
compute distance from c to segment between a and b
static double DistancePointSegment(PT a, PT b, PT c) { return Math.sqrt(dist2(c, ProjectPointSegment(a, b, c))); }
[ "static double distToLineSegment(PointDouble p, PointDouble a, PointDouble b, PointDouble c) {\n Vec ap = vector(a, p), ab = vector(a, b);\n double u = dot(ap, ab) / squaredNorm(ab);\n if (u < 0.0) { c = new PointDouble(a.x, a.y); // closer to a\n ret...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "ruleProperty" $ANTLR start "entryRuleComponent" InternalMyDsl.g:721:1: entryRuleComponent returns [EObject current=null] : iv_ruleComponent= ruleComponent EOF ;
public final EObject entryRuleComponent() throws RecognitionException { EObject current = null; EObject iv_ruleComponent = null; try { // InternalMyDsl.g:721:50: (iv_ruleComponent= ruleComponent EOF ) // InternalMyDsl.g:722:2: iv_ruleComponent= ruleComponent EOF ...
[ "public final EObject entryRuleComponent() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleComponent = null;\n\n\n try {\n // InternalDasl.g:610:50: (iv_ruleComponent= ruleComponent EOF )\n // InternalDasl.g:611:2: iv_ruleComponent= ruleComponent...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a list of all the cabin crew currently loaded
@Override public List<CabinCrew> getAllCabinCrew() { List<CabinCrew> cloned = new ArrayList<>(cabinCrew); return cloned; }
[ "@Override\r\n\tpublic List<Crew> getAllCrew() {\r\n\t\tList<Crew> crew = new ArrayList<>();\r\n\t\tcrew.addAll(pilots);\r\n\t\tcrew.addAll(cabinCrew);\r\n\t\treturn crew;\r\n\t}", "public Set<ShoppingList> getAllCabinets() {\n final Set<ShoppingList> availableCabinets = new HashSet<>();\n for (final Object...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Process 16 of the packets at a time TODO: SLOW, delegate to dedicated worker threads (keeping concurrency in mind)
@Override public void update() { for (int i = 0; i < 16 && !processQueue.isEmpty(); i++) { ProcessEntry entry = processQueue.remove(); processPacket(entry.packet, entry.sourceClient); } // Flush pending packets clientChannels.flush(); }
[ "public abstract void process(PacketHandler handler);", "void handlePacket(byte[] data){\n if((state == ConnectionState.STATE_DISCONNECTING || state == ConnectionState.STATE_DISCONNECTED) && data[0] != PacketType.RELY)\n return;\n\n lastPacketReceiveTime = System.currentTimeMillis(); //As...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create the sampler to sample the framebuffer texture within the fullscreen quad shader. We use NEAREST filtering since one texel on the framebuffer texture corresponds exactly to one pixel on the GLFW window framebuffer.
private void createSampler() { this.sampler = glGenSamplers(); glSamplerParameteri(this.sampler, GL_TEXTURE_MIN_FILTER, GL_NEAREST); glSamplerParameteri(this.sampler, GL_TEXTURE_MAG_FILTER, GL_NEAREST); }
[ "private void createFramebufferTexture() {\n this.tex = glGenTextures();\n glBindTexture(GL_TEXTURE_2D, tex);\n /*\n * glTexStorage2D only allocates space for the texture, but does not initialize\n * it with any values. This is fine, because we use the texture as output\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
configures a measured dataSet with the actual values
private void configureMeasDataSet(ListDataSet dataSet, Plane plane) { DispersionData dispersionData = getDispersionData(); if (dispersionData == null) { return; } dataSet.setValues(getModelOpticsData().getMonitorPhases(plane), dispersionData.getValues(plane), dispersionData.getRms(plane), dispersion...
[ "public void setMeasurementArray(){\n\t\tnResults = rt.size();\n\t\tData = new double[4][nResults];\n\t\tfor(int i =1; i<nResults; i++) {\n\t\t\tData[0][i]=i;\n\t\t\tData[1][i]=rt.getValueAsDouble(rt.getColumnIndex(\"Mean\"),i); \n\t\t\tData[2][i]=rt.getValueAsDouble(rt.getColumnIndex(\"StdDev\"),i);\n\t\t\tData[3]...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end ruleFeatureCallPart $ANTLR start entryRuleNameComponent ../org.eclipselabs.mscript.language/srcgen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:4991:1: entryRuleNameComponent returns [EObject current=null] : iv_ruleNameComponent= ruleNameComponent EOF ;
public final EObject entryRuleNameComponent() throws RecognitionException { EObject current = null; EObject iv_ruleNameComponent = null; try { // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:4992:2: (iv_ruleNa...
[ "public final void entryRuleName() throws RecognitionException {\n try {\n // ../br.com.levysiqueira.dsl.textualusecase.ui/src-gen/br/com/levysiqueira/dsl/textualusecase/ui/contentassist/antlr/internal/InternalTextualUseCase.g:435:1: ( ruleName EOF )\n // ../br.com.levysiqueira.dsl.text...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method Name : getNext Parameters : None Return value(s) : ListNode Partners : None Description : Returns the next node
public ListNode<E> getNext() { return nextNode; }
[ "public ListNode<T> getNext(){\n\t\treturn next;}", "public node getNext() {\n\t\t\treturn next;\n\t\t}", "protected Node<NodeDataType> getNextNode() {\r\n\t\t\treturn myNext;\r\n\t\t}", "public L2ListElem getNext() { \r\n return next;\r\n }", "public OrderListNode getNext() {\n return next...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns Batsman with maximum strike rate, sixes and fours
public Batsman getBatsmanWithMaximumStrikeRateSixesAndFours() throws IPLAnalyserException { checkEmptyList(batsmanList); Comparator<Batsman> batsmanComparator = Comparator.comparing(Batsman::getSixes, Comparator.reverseOrder()) .thenComparing(Batsman::getFours, Comparator.reverseOrder())...
[ "public Batsman getBatsmanWithHighestStrikingRate() throws IPLAnalyserException {\n checkEmptyList(batsmanList);\n Comparator<Batsman> batsmanComparator = Comparator.comparing(Batsman::getStrikeRate).reversed();\n return sortList(batsmanComparator, batsmanList).get(0);\n\n }", "public Bats...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
repeated .NewsIndResDetail newsindentifydetail = 4; NewsIndResDetail
public Builder addAllNewsindentifydetail( java.lang.Iterable<? extends com.gw.ps.pbbean.PbNewsRes.NewsIndResDetail> values) { ensureNewsindentifydetailIsMutable(); super.addAll(values, newsindentifydetail_); return this; }
[ "com.gw.ps.pbbean.PbNewsRes.NewsIndResDetail getNewsindentifydetail(int index);", "int getNewsindentifydetailCount();", "java.util.List<com.gw.ps.pbbean.PbNewsRes.NewsIndResDetail> \n getNewsindentifydetailList();", "public com.gw.ps.pbbean.PbNewsRes.NewsIndResDetail getNewsindentifydetail(int index) {...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates the lower panel of the GUI
private JPanel buildLowerPanel() { JPanel lowerPanel = new JPanel(); lowerPanel.setLayout(new FlowLayout(FlowLayout.CENTER)); clear = new JButton("Clear"); lowerPanel.add(clear, BorderLayout.CENTER); return lowerPanel; }
[ "private void buildTopPanel() {\n \t\tJPanel panel = new JPanel();\n \t\tpanel.setLayout(new BorderLayout(10, 10));\n \t\t\n \t\t// this does not need to be referenced else where, only for layout\n \t\tJPanel paneButtons = new JPanel();\n \t\tGridLayout bl = new GridLayout(2, 1);\n \t\tpaneButtons.setLayout(bl);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create and register a new list of component from the given component list.
<T> ComponentList<T> newComponentList(Class<T> componentClass, List<T> componentsList);
[ "<L extends List<T>, T> L newComponentList(Class<L> listClass, Class<T> componentClass, T... componentsList);", "<L extends List<T>, T> L newComponentList(Class<L> listClass, Class<T> componentClass, List<T> componentsList);", "public List init(List list) {\n Iterator it = components.iterator();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ this read in the calendar object serialization.
private static void readCaledar() { try { FileInputStream fileIn = new FileInputStream(fileCaledar); ObjectInputStream in = new ObjectInputStream(fileIn); myCalender = (Calendar) in.readObject(); in.close(); fileIn.close(); }catch(IOException i) ...
[ "public void readFromFile() throws ClassNotFoundException {\n try {\n InputStream file = new FileInputStream(filePath);\n InputStream buffer = new BufferedInputStream(file);\n ObjectInput input = new ObjectInputStream(buffer);\n\n // deserialize\n calend...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
private Constructor for CabsDAO
private CabsDAO( String dbName ) { this.fuberDB = dbName; this.collection = MongoConnector.getDB( this.fuberDB ).getCollection( FuberConstants.CABS_COLLECTION ); }
[ "protected AbstractDAO() {\n }", "ComputerDAO() {\n }", "private ForRentDAO() {\r\n }", "public HomeInfoDAO() {\r\n super();\r\n }", "public CouponDBDAO() {\r\n\r\n\t}", "public PacienteDAO(){ \n }", "public ApppicDAOImpl() {\n\t\tsuper();\n\t}", "private AdminWorkspaceDAO( )...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the data types for a batch.
public static DataType[] extractTypes(ColumnarBatch batch) { DataType[] ret = new DataType[batch.numCols()]; for (int i = 0; i < batch.numCols(); i++) { ret[i] = batch.column(i).dataType(); } return ret; }
[ "public int[] getDatatypes(){\n\t\tint[] types = new int[datatypes.size()];\n\t\tfor(int i = 0; i < datatypes.size(); i++){\n\t\t\ttypes[i] = datatypes.get(0).intValue();\n\t\t}\n\t\treturn types;\n\t}", "@Override\n\tpublic DataTypeDefinitions getColumnType() throws IOException {\n\n\t\tString row;\n\t\tString[]...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the new agent's ComponentDescription.
public ComponentDescription getComponentDescription() { return desc; }
[ "public ComponentTypeDescription getComponentDescription() {\n return m_type;\n }", "public java.lang.String getDESCRIPTION() {\n return DESCRIPTION;\n }", "public String getComponentName() {\n return descriptor.getIdentification().getName();\n }", "public String getDescription...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
MODIFIES: this EFFECTS: modifies the endMessage given the victor
public void setEndMessage() { Role victor = panelController.getWordWolfGame().getVictor(); if (victor.equals(Role.MAJORITY)) { endMessage.setText("The Majority has won!!!"); } else if (victor.equals(Role.MINORITY)) { endMessage.setText("The Wolfs have won!!!"); ...
[ "private void endMessage() {\r\n\t\tsetChanged();\r\n\t\t// Boolean is a flag for messages start or end: false=start; true=end\r\n\t\tnotifyObservers(true);\r\n\t}", "private void endMessage() {\n System.out.println(\"( ⚆_⚆) \" + mMovieName);\n }", "void endMessages();", "public void endGameMessage(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return the value associated with the column: referral_header_id
public jkt.hms.masters.business.ReferralPatientHeader getReferralHeader () { return referralHeader; }
[ "public Number getHeaderId() {\n return (Number) getAttributeInternal(HEADERID);\n }", "public Number getRfrtHeaderIdPk() {\r\n return (Number) getAttributeInternal(RFRTHEADERIDPK);\r\n }", "public Number getHeaderId() {\n return (Number)getAttributeInternal(HEADERID);\n }", "public vo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Extract marker parameter values from the ;? comment line
protected String[] getMarkerValues(String scriptLine) { // Extract parameters separated by semicolon from the line, markerValues = scriptLine.substring(PARAM_PREFIX.length()).split(PARAM_SEPARATOR, 0); // Spaces on both sides of parameters are trimmed for (int i = 0; i < markerValues.len...
[ "private void findParameters() {\r\n\t\tString parameters = rawline.substring(index);\r\n\t\tparseParameters(parameters);\r\n\t}", "protected byte[] processComment() throws IOException, JpegException {\n // Get the marker parameter length count\n int length = readLength(in);\n // Copy comment...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This listener method to be invoked on scrolling.
void onScrolling();
[ "@Override\n public void onScrolling() {\n\n\n }", "void onScrollingStarted(AbWheelView wheel);", "public interface OnScrollListener {\n\n /**\n * The view is not scrolling. Note navigating the list using the trackball counts as\n * being in the idle state si...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Deactivates VuForia. Run once at the end of the OpMode
public void deactivateVuforia() { targetsSkyStone.deactivate(); }
[ "public void detener(){\n\t\tthis.vivo=false;\n\t\t//metodo desaconsejado\n\t\t//this.miHilo.stop();\n\t}", "public void deactivateTfod() {\n tfod.deactivate();\n }", "public void setEngineOff();", "public void deactivate() {\n this.active = false;\n }", "private void activationOFF() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the attribute value for LINK_CS_CSI_IDSEQ using the alias name LinkCsCsiIdseq
public String getLinkCsCsiIdseq() { return (String)getAttributeInternal(LINKCSCSIIDSEQ); }
[ "public String getCsCsiIdseq()\n {\n return (String)getAttributeInternal(CSCSIIDSEQ);\n }", "public String getCsiIdseq()\n {\n return (String)getAttributeInternal(CSIIDSEQ);\n }", "public String getCsIdseq()\n {\n return (String)getAttributeInternal(CSIDSEQ);\n }", "public String getPCsCsiIdseq...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Clicks a menu item asynchronously and waits till the given condition is fulfilled.
public static void asyncClick( final SWTWorkbenchBot bot, final SWTBotMenu menu, final ICondition waitCondition ) throws TimeoutException { UIThreadRunnable.asyncExec( bot.getDisplay(), new VoidResult() { public void run() { menu.click(); }...
[ "public static void asyncClick( final SWTWorkbenchBot bot, final SWTBotTreeItem item, final ICondition waitCondition )\n throws TimeoutException\n {\n UIThreadRunnable.asyncExec( bot.getDisplay(), new VoidResult()\n {\n public void run()\n {\n item.click(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tranfer string to number
private double tranferStringToNum(String num){ double number = 0; try{ number = Double.parseDouble(num); }catch(Exception ex){ number = 0; } return number; }
[ "java.lang.String getToNumber();", "public static Number toNumber(String string){\r\n\t\tNumber number = null;\r\n\t\tif(INTEGER_PATTERN.matcher(string).matches())\r\n\t\t\tnumber = new Long(string);\r\n\t\telse if (FIXED_DECIMAL_PATTERN.matcher(string).matches())\r\n\t\t\tnumber = new BigDecimal(string);\r\n\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Remove the specified parent prefix from all FieldKeys
public FieldKeyStringExpression dropParent(String parentName) { FieldKeyStringExpression clone = this.clone(); StringBuilder source = new StringBuilder(); for (StringPart stringPart : clone.getParsedExpression()) { if (stringPart instanceof...
[ "Eid getParentPrefix(Eid key);", "public static final void removeKeysWithPrefix(String prefix) throws Exception {\n final Scanner scanner = client.newScanner(METADATA_TABLE_BYTES);\n scanner.setFamily(DEFAULT_CF_BYTES);\n scanner.setQualifier(DEFAULT_COL_BYTES);\n scanner.setKeyRegexp(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the bY of bullets[a].
public int getbY(int a) { if(a < numbullets) return bullets[a].getbY(); else return -1000; }
[ "public int getbX(int a)\n {\n if(a < numbullets)\n return bullets[a].getbX();\n else\n return -1000;\n }", "public int getBulletHeight() {\n return bulletHeight;\n }", "public int getbX()\n {\n return bulletX;\n }", "@Override\n p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Use Recommendation.newBuilder() to construct.
private Recommendation(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); }
[ "private Recommendation(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public Builder setRecommendation(CryptoCurrencyPriceInfo.Recommendation value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n recommendation_ = va...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Compute the threshold below which an user is correctly authenticated.
public static Float computeThreshold(User user) { StatisticsUnit sdUnit = user.getSd(); StatisticsUnit meansUnit = user.getMeans(); if (sdUnit != null && meansUnit != null) { List<KDPassword> kdPassword = DataTransmissionServiceImpl.getUserKDData(user); int size = kdPassword.size(); Float[] d...
[ "public double calculateIdentityThreshold() {\n return calculateIdentityThreshold(0.05);\n }", "double getUpperThreshold();", "protected double getHigherUtilizationThreshold() {\n return utilizationThreshold;\n }", "public long voteThreshold() \r\n\t{\r\n\t\treturn this.voteThreshold;\r\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__Visualizer__Group__4" $ANTLR start "rule__Visualizer__Group__4__Impl" InternalMyDsl.g:9432:1: rule__Visualizer__Group__4__Impl : ( ( rule__Visualizer__TypeAssignment_4 ) ) ;
public final void rule__Visualizer__Group__4__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalMyDsl.g:9436:1: ( ( ( rule__Visualizer__TypeAssignment_4 ) ) ) // InternalMyDsl.g:9437:1: ( ( rule__Visualizer__TypeAssignment_4 ) ) ...
[ "public final void rule__Visualizer__Group_5__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:9584:1: ( ( ( rule__Visualizer__TypeAssignment_5_1 ) ) )\n // InternalMyDsl.g:9585:1: ( ( rule__Visualizer__Type...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the color C1 anchored by the point P1.
public Color getColor1() { return color1; }
[ "public Point getP1(){\n return this.p1;\n }", "public Point getPoint1() {\r\n return p1;\r\n }", "public Color colourP(int lvl, Color c1, Color c2) {\n\t\tif (lvl == 0) {\n\t\t\treturn c1;\n\t\t}\n\t\telse if (lvl == 10) {\n\t\t\treturn c2;\n\t\t}\n\t\telse {\n\t\t\tdouble perc = lvl /10;\n\t\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
union() unites two disjoint sets into a single set. A unionbyrank heuristic is used to choose the new root. This method will corrupt the data structure if root1 and root2 are not roots of their respective sets, or if they're identical.
public void union(int root1, int root2) { if (array[root2] < array[root1]) { array[root1] = root2; // root2 is taller; make root2 new root } else { if (array[root1] == array[root2]) { array[root1]--; // Both trees same height; new one is taller } array[root...
[ "@Override\n public void union(int root1, int root2) {\n // TODO: Implement the union-by-rank algorithm for disjoint set\n if (s[root1]>-1 || s[root2]>-1 ) throw new IllegalArgumentException(\"Impossible to union because one of the roots is already dependant\");\n if( s[root2] < s[root1]){ /...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method is useful to determine the bitmap position within the Image View. It's not needed for anything else Modified from:
private static Rect getBitmapPositionInsideImageView(ImageView imageView){ Rect rect = new Rect(); if (imageView == null || imageView.getDrawable() == null) { return rect; } // Get image dimensions // Get image matrix values and place them in an array ...
[ "private int[] clickImagePixelLocation(int x, int y, ImageView imageView) {\n int[] pixelLocation = new int[2];\n\n //ImageView imageViewer = (ImageView) findViewById(R.id.imageView);\n //Bitmap bitmap = null;\n //Drawable displayedDrawable = null;\n\n int bitmapWidth;\n in...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the FacCombo attribute of the MaterialMatrix object
public void setFacCombo(FacilityCombo fc) { /* facC.setUseAllFacilities(true); facC.setUseFacilityWide(true); facC.setUseAllWorkAreas(true); facC = fc.loadAnotherOne(facC); facC.setSelectedItem(cmis.getPrefFac());*/ }
[ "public void setMaterial(String mat){\r\n material = mat;\r\n }", "public void setMaterialFace(int materialFace) {\n this.materialFace = materialFace;\n setNeedsRefresh(true);\n }", "private void initCmbMaterialObject(ComboBox comboBox, List<MaterialObjectDTO> list) {\n\t\tfor(Materia...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates an access condition that only allows an operation if the resource has not been modified since the specified time. Setting this access condition modifies the request to include the HTTP IfUnmodifiedSince conditional header. If this access condition is set, the operation is performed only if the resource has not ...
public static AccessConditionHeader ifNotModifiedSince(Date lastMotified) { return new AccessConditionHeader( AccessConditionHeaderType.IF_UNMODIFIED_SINCE, new RFC1123DateConverter().format(lastMotified)); }
[ "public static AccessConditionHeader ifModifiedSince(Date lastMotified) {\n return new AccessConditionHeader(\n AccessConditionHeaderType.IF_MODIFIED_SINCE,\n new RFC1123DateConverter().format(lastMotified));\n }", "Update withLastAccessTimeTrackingPolicy(LastAccessTimeTrac...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Main method to start an OpenGamma JVM process.
public static void main(String[] args) { // CSIGNORE if (!new OpenGammaComponentServer().run(args)) { System.exit(0); } }
[ "public static void main(String[] args) {\n\t\tSystem.out.println(\"Starting\");\n\t\tProcessEngineConfiguration cfg = new StandaloneProcessEngineConfiguration()\n\t\t\t\t.setJdbcUrl(\"jdbc:h2:mem:activiti;DB_CLOSE_DELAY=1000\")\n\t\t\t\t.setJdbcUsername(\"sa\")\n\t\t\t\t.setJdbcPassword(\"\")\n\t\t\t\t.setJdbcDriv...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the tool toolbar.
public ToolToolBar getToolToolBar() { return toolToolbar; }
[ "public String getToolbar() {\n\t\treturn toolbar;\n\t}", "public Toolbar getToolbar() {\n return toolbar;\n }", "public JToolBar getToolBar(){\r\n return toolbar;\r\n }", "JToolBar getToolBar();", "public @Nullable Toolbar getToolbar() {\n return mToolbar;\n }", "public IToo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return object at given position.
public Object objectAt(Position position){ return mapElement.get(position); }
[ "public Object getObjectAtLocation(Point p);", "public Object retrieve(int position){\n\t\t\n\t\tif(position < 1 || position > _count) return null;\n\t\tObject returnObj = null;\n\t\tLink current = _head;\n\t\tint i = 1;\n\t\tif (position <= _count){\n\t\t\twhile(current != null && i < position){\n\t\t\t\tcurrent...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check whether the character corresponding to ASCII can be shown in screen or not
public static boolean isVisibleCh(int ASCII) { return ASCII >= 32 && ASCII <= 126; }
[ "private boolean isDisplayable(int c) {\n return 20 <= c && c <= 126 && c != '\"';\n }", "boolean hasHasCharacter();", "boolean hasCharmeffect();", "boolean getHasCharacter();", "public boolean unicodeEntered(final char character);", "public boolean isSpecialCharacter(String enteredCmd) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Prefix all img tag srcs with given prefix.
private native void prefixImgSrcs(Element e, String srcPrefix) /*-{ try { var divs = e.getElementsByTagName("img"); for (var i = 0; i < divs.length; i++) { var div = divs[i]; var src = div.getAttribute("src"); if (src.indexOf("http") != 0) div.setAttribute("src",srcPrefix + src); } } catch (e) ...
[ "private static native void prefixImgSrcs(Element e, String srcPrefix)\n /*-{\n try {\n var divs = e.getElementsByTagName(\"img\"); \n var base = \"\" + $doc.location;\n var l = base.length-1;\n while (l >= 0 && base.charAt(l) != \"/\") l--;\n base = base....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
CM8961 Set a value for Allocatable Piece Qty.
public void setAllocationPieceQty(long arg) { setValue(ALLOCATION_PIECE_QTY, new Long(arg)); }
[ "public void setAllocatePieceQty(int arg)\n\t{\n\t\twAllocatePieceQty = arg;\n\t}", "public void setStockPieceQty(int arg)\n\t{\n\t\twStockPieceQty = arg;\n\t}", "void setAllocatedQuantity(int quantity);", "public void setTotalAllocatePieceQty(long arg)\n\t{\n\t\twTotalAllocatePieceQty = arg;\n\t}", "public...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Updates the newPH level of the pool.
public void setPH(final double newPH) { if (newPH >= 0.0 && newPH <= MAXIMUM_PH) { this.pH = newPH; } }
[ "@Override\n\tpublic void updateLevel() {\n\t\tthis.algorithm();\n\t\t\n\t}", "Double getPHLevel();", "private void updateLeveling() {\n\t\tthis.player.setCurrentLevel(this.board.getLevelNumber());\n\n\t\tif (this.player.getMaxLevel() < this.player.getCurrentLevel()) {\n\t\t\tthis.player.setMaxLevel(this.player...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
String that will be rendered between each rendered link e.g. '|'
@BeanTagAttribute public String getLinkSeparator() { return linkSeparator; }
[ "private String linkString()\n {\n Iterator<DSAGraphNode<E>> iter = links.iterator();\n String outputString = \"\";\n DSAGraphNode<E> node = null;\n while (iter.hasNext())\n {\n node = iter.next();\n outputString = (outputString + node.getLabel() + \", \")...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Unicast send the message to all group members
private void multicast(int groupId, BasicMulticastMessage data ){ MemberIndexer memberIndexer = MemberIndexer.getInstance(); Map<Integer, Member> groupMembers = memberIndexer.getByGroupId(groupId); Profile profile = Profile.getInstance(); for(Entry<Integer, Member> entry: groupMembers.entrySet()){ Mes...
[ "private static void multicast(String msg) {\n \tfor(int id : IPs.keySet()) {\n \t\ttry {\n \t\t\tunicast_send(id, msg);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n \t}\n }", "private static void sendGroupMembers(int groupID) throws Exception {\n\t\tSystem.out.println(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructs empty DocumentReceipt message
public EsoedDocumentReceiptImpl(){ }
[ "public final String buildReceipt(){\r\n return buildReceiptHeader() + buildReceiptBody();\r\n }", "@Override\n public Print_Receipt CreatePrintReceipt(){\n return new Print_Receipt1();\n }", "public Receipt()\r\n\t{\r\n\t\ttotal = 0;\r\n\t\tsalesTaxes = 0;\r\n\t}", "ReceiptCreator crea...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets (as xml) the "cuarto" element
void xsetCuarto(org.apache.xmlbeans.XmlInt cuarto);
[ "public void setCuarto(com.hotel.rooms.Room cuarto)\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.hotel.rooms.Room target = null;\n target = (com.hotel.rooms.Room)get_store().find_element_user(CUARTO$0, 0);\n if ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This test ensures that entrySet works with an empty map
@Test public void testEntrySetOnEmptyMap() { Map originalMap = createEmptyMap(); Set set = originalMap.entrySet(); assertTrue(set.isEmpty()); }
[ "public void testNormalEntrySet()\r\n throws Exception\r\n {\r\n try\r\n {\r\n SCOMapTests.checkEntrySet(pmf,\r\n HashMap1.class,\r\n ContainerItem.class,\r\n String.class);\r\n }\r\n finally\r\n {\r\n clean(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieve the 3M Carry PnL
public double carry3MPnL() { return _dbl3MCarryPnL; }
[ "@ApiModelProperty(required = true, value = \"L3 cache hits per second.\")\n public BigDecimal getL3() {\n return l3;\n }", "Integer getNLNDskp();", "public long getP99OfGetRequest(){\n ArrayList<Long> getLatencies=getSortedArrayofLatencyOfType(\"GET\");\n int targetIndex=getLatencies.size()-(int)(ge...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method creates a new table "products" in our database if it doesn't already exist Set up query
@Override public void onCreate(SQLiteDatabase db) { String CREATE_PRODUCTS_TABLE = "CREATE TABLE IF NOT EXISTS " + TABLE_PRODUCTS + "(" + ROW_ID + " INTEGER PRIMARY KEY," + ROW_MANUFACTURER + " TEXT," + ROW_PRODUCTNAME + " TEXT," ...
[ "public static void createProductsTable() {\n\n try {\n connection = DBConnection.getDBConnection();\n myStmt = connection.createStatement();\n\n // Create new products table as per SQL query available in\n myStmt.executeUpdate(QueryUtil.queryByID(Constants.QUERY_I...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Subclasses should override to adjust the launch options passed to AndroidRunningState.
@NotNull protected LaunchOptions.Builder getLaunchOptions() { return LaunchOptions.builder() .setClearLogcatBeforeStart(CLEAR_LOGCAT) .setSkipNoopApkInstallations(SKIP_NOOP_APK_INSTALLATIONS) .setForceStopRunningApp(FORCE_STOP_RUNNING_APP); }
[ "private void initializeStateFromLaunchData() {\n if (getIntent() != null) {\n mLaunchedFromChromeIcon =\n getIntent().getBooleanExtra(EXTRA_COMING_FROM_CHROME_ICON, false);\n mLaunchedFromCCT =\n getIntent().getBooleanExtra(EXTRA_CHROME_LAUNCH_INTE...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
search flight by providing the depature city and destination city
public ReservePage searchFlights(String departureCity, String destinationCity) { this.selectDepartureCity(departureCity); this.selectDestinationCity(destinationCity); return this.clickOnFindFlights(); }
[ "public void searchFlights();", "List<DestinationDTO> findCityDestinations(String city);", "@Override\n\tpublic void searchDestination(String input) {\n\t\tquery =\"SELECT * FROM schulichairline.flights WHERE dest LIKE \" \n\t\t\t\t+ \"'%\"+input+\"%'\"; // search for \n\t\ttry{\n\t\t\tpreparedStmt = this.myCon...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add a new member by given po.
public boolean addMember(final MemberPo po);
[ "private void addMember()\r\n\t{\r\n\t\tui.message(\"\\tAdd a Member\\n\");\r\n\t\t//Create a new default member. \r\n\t\t//Status is set by the constructor to Active\r\n\t\tMember newMember = new Member();\r\n\t\t//Get values for attributes\r\n\t\t//false for last parameter means required attributes must be provi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the value of the 'field378' field. doc for field378
public java.lang.CharSequence getField378() { return field378; }
[ "public java.lang.CharSequence getField378() {\n return field378;\n }", "public java.lang.CharSequence getField376() {\n return field376;\n }", "public java.lang.CharSequence getField373() {\n return field373;\n }", "public java.lang.CharSequence getField376() {\n return field376;\n }"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Query created to retrieve Project Location
@Query("Select project_street_location from ProjectEntity where project_name = :projectName") List<String> getProjectLocation(String projectName);
[ "String locationsQueryLocationCode();", "public String getProjectLocation() {\n if (isNewProject() && useDefaultLocation()) {\n return Platform.getLocation().toString();\n } else {\n return getLocationPathFieldValue();\n }\n }", "String locationsDefaultQuery()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method determines if the last mouse click was on the region defined by the polygon.
public boolean regionClick(Polygon regionBounds){ if (prevClick==null){ return false; } return regionBounds.contains(prevClick.getPoint()); }
[ "public boolean mouseInBounds()\r\n {\r\n return Draw.LAYER_MANAGER.contains(Mode.getFloatMouseX(), \r\n Mode.getFloatMouseY());\r\n }", "public boolean isPointInRegion();", "private boolean pointInCurrentPolygon(final Point p) {\n if (current == null) {\n return false;\n }\n f...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Converts an 8bit paletted frame into a frame with a color depth of 24 bits. With the palette format "ABCD", the destination frame ends up with the format "ABC".
@Mangling({"_Z29sws_convertPalette8ToPacked24PK7uint8_tP7uint8_tlPK7uint8_t", "?sws_convertPalette8ToPacked24@@YAXPA7uint8_tPA7uint8_tJPA7uint8_t@Z"}) void sws_convertPalette8ToPacked24(byte src[], ByteBuffer dst, NativeLong num_pixels, byte palette[]);
[ "@Mangling({\"_Z29sws_convertPalette8ToPacked32PK7uint8_tP7uint8_tlPK7uint8_t\", \"?sws_convertPalette8ToPacked32@@YAXPA7uint8_tPA7uint8_tJPA7uint8_t@Z\"}) \n\tvoid sws_convertPalette8ToPacked32(byte src[], ByteBuffer dst, NativeLong num_pixels, byte palette[]);", "private void generateFrame(int frameIndex, int c...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
bool compute_sum_null = 1001;
boolean getComputeSumNull();
[ "io.dstore.values.BooleanValue getComputeSum();", "public Builder setComputeSumNull(boolean value) {\n \n computeSumNull_ = value;\n onChanged();\n return this;\n }", "public boolean getComputeSumNull() {\n return computeSumNull_;\n }", "boolean getGetSumOfAllPages...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Change the message rate/size according to the given configuration.
public void change(final TradeConfiguration tradeConf) { rateLimiter.setRate(tradeConf.rate); this.payload.set(payloadCache.computeIfAbsent(tradeConf.size, byte[]::new)); }
[ "public void setMaxMsgRate(int rate) {\n maxMsgRate = rate;\n }", "public void setSizeMessage(String sizeMessage) {\n\t\tthis.sizeMessage = sizeMessage;\n\t}", "public void updateActualQueueSizeMetric(int queueSizeChange, String apiName, String statusCode) {\n actualQueueSize += queueSizeChange;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The getCompanyType returns a Type of the company. The getCompanyType returns a Type of the company.
public Type getCompanyType() { return companyType; }
[ "public java.lang.String getCompanyType() {\n return companyType;\n }", "public String getCompanyType() {\r\n return companyType;\r\n }", "public Integer getCompanyType() {\r\n\t\treturn companyType;\r\n\t}", "public void setCompanyType(String companyType) {\r\n this.companyType = c...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the "explanation" element
public void setExplanation(org.hl7.fhir.ImmunizationExplanation explanation) { generatedSetterHelperImpl(explanation, EXPLANATION$30, 0, org.apache.xmlbeans.impl.values.XmlObjectBase.KIND_SETTERHELPER_SINGLETON); }
[ "public void setExplanation(String explanation) {\n this.explanation = explanation;\n }", "public void showExplanation(String explanation);", "private void setExplanationTexts(){\n\n // Thinking Explanation\n thinkingT.setText(\"THINKING\");\n thinkingT.setSize(100,25);\n t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }