query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
repeated .ListObjectA lll = 39;
com.zfoo.protocol.packet.ProtobufObject.ListObjectA getLll(int index);
[ "java.util.List<com.zfoo.protocol.packet.ProtobufObject.ListObjectA> \n getLllList();", "com.zfoo.protocol.packet.ProtobufObject.ObjectA getLll(int index);", "com.zfoo.protocol.packet.ProtobufObject.ListObjectA getA(int index);", "public NumberedList()\n {\n _init=1;\n }", "com.zfoo.protocol.pac...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Do an https request.
private HttpsURLConnection doAHTTPSRequest(String method) { HttpsURLConnection httpsURLConnection = null; try { httpsURLConnection = (HttpsURLConnection) this.seedURL.openConnection(); httpsURLConnection.setRequestMethod(method); httpsURLConnection.setRequestProperty(...
[ "public RequestBuilder usingHTTPS() {\n throw new IllegalStateException(\"This handling is not implemented yet\");\n }", "public String GetHttps(String url){\n String https = url;\n StringBuffer sb = new StringBuffer();\n try{\n\n SSLContext sc = SSLContext.getInstance(\"TLS\")...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Called when an entity has been added to this list.
protected void onAdd( E entity, int index ) { }
[ "public void addEntity(Entity e)\n {\n entities.add(e); \n }", "public void add(Entity entity) {\n\n entities.add(entity);\n }", "public void addEntity(Entity e)\r\n\t{\r\n\t\tentities.add(e);\r\n\t}", "public void addEntity(Entity entity) {\n\t\tnewEntities.add(entity);\n\t}", "pub...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method computes seerbit transactions total sum at service level
@Override public BigDecimal computeStatistics() { BigDecimal total = BigDecimal.valueOf(0D); for(SeerbitTransaction transaction : seerbitTransactionRepository.getSeerbitTransactions()) { total = total.add(transaction.getTransactionAmount()); } return total; }
[ "public double totalSeaRevenue(){\n ArrayList<Safety> safeTransport = this.getSafeOperations();\n double r = 0;\n for(int i = 0; i < safeTransport.size(); i++){\n if(safeTransport.get(i) instanceof Sea){\n r += ((Transport)safeTransport.get(i)).revenue();\n }\n }\n return r;\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Replaces the Block child.
public void setBlock(Block node) { setChild(node, 0); }
[ "@Test\n public void testReplaceBlock()\n {\n Block word1 = new WordBlock(\"block1\");\n Block word2 = new WordBlock(\"block2\");\n Block word3 = new WordBlock(\"block3\");\n\n Block parentBlock = new ParagraphBlock(Arrays.asList(word1, word2));\n\n // replace by one\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
gets the url of the node service
String getNodeServiceUrl() throws IOException, SoapException;
[ "java.lang.String getEndpointUrl();", "public String getURL() {\r\n String url = ConfigContext.getCurrentContextConfig().getProperty(\"oleExposedWebService.url\");\r\n return url;\r\n }", "String getEndpointUri();", "String serviceEndpoint();", "public String getServiceUrl() {\n retu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test checkSeries() Given as string of numbers in series, the method should return true.
@Test public void givenInputShouldReturnTrue() { digitSeriesChecker.readDigits("54,53,52,51,50,49,48"); assertTrue("givenInputShouldReturnFalse: check checkForSeries(). Should return true.", digitSeriesChecker.checkSeries()); }
[ "@Test\n public void givenInputShouldReturnFalse() {\n digitSeriesChecker.readDigits(\"98, 96, 95, 94, 93\");\n assertFalse(\"givenInputShouldReturnTrue: check checkForSeries(). Should return false.\",\n digitSeriesChecker.checkSeries());\n digitSeriesChecker.readDigits(\"1,2,...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Divide the current result by the specified value
void div(double val) { result = result / val; }
[ "Value divide(Value value) throws TechnicalException;", "public void divide (int value) {\r\n\t\thistory = history + \" / \" + value;\r\n\t\tif (value == 0)\r\n\t\t\ttotal = 0;\r\n\t\telse\r\n\t\t\ttotal = total / value;\r\n\t}", "public void divide (int value) {\r\n\t\tif (value == 0)\r\n\t\t{\r\n\t\t\ttotal =...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ The purpose of this method is to store in a data structure the distinct users selected in random way
@Test (priority = 2) public void randomDistinctUsers() throws Exception { int counterRegisterUser = 0; int randomNum; int i; boolean sameUser; while(counterRegisterUser <= (registerDistinctUsers.length - 1)) { randomNum = randomNumberGenerator(); ...
[ "List<User> getRandomUsers(List<User> uList, int num);", "private static void hardCodeUsers() {\n\tallUsers.put(\"Daniel\", new User(\"Daniel\", \"Avetian\"));\n\tallUsers.put(\"Michael\", new User(\"Michael\", \"Carolin\"));\n\tallUsers.put(\"Jacob\", new User(\"Jacob\", \"Groh\"));\n\tallUsers.put(\"Filbert\", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a tokenizer from a set of lexemes (token type recognizers)
public GenericTokenizer( Lexeme[] lexemes ){ super(); for( int i=0; i<lexemes.length; i++ ) { this.lexeme.put(lexemes[i].type(), lexemes[i]); priority.put(lexemes[i].type(), i); } }
[ "public TokenizerFactory()\n\t{\n\t\ttry\n\t\t{\n\t\t\tParameters params = new Parameters();\n\t\t\tFileBasedConfigurationBuilder<XMLConfiguration> builder =\n\t\t\t new FileBasedConfigurationBuilder<XMLConfiguration>(XMLConfiguration.class)\n\t\t\t .configure(params.xml()\n\t\t\t .setFileName(Default_...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional int32 seq_num = 2;
int getSeqNum();
[ "long getSeqnum();", "long getSeqNo();", "public long getSequenceNo();", "long getSequenceNum();", "int getSeq();", "long getSequence();", "long getOriginseqnum();", "String getSequenceid();", "void setSequenceNumber(int sequenceNumber);", "void setSequence(int seq);", "Long getNextSequence(Stri...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Process a LOGOUT message.
public void process(Logout msg) throws IOException, Exception { usersConnected.get(msg.getSource()).close(); bradcast(new Logout(Destination.SERVER.name(), msg.getSource())); }
[ "public static void handleLogoutGUI()\n\t{\n\t\tOp logOp = new Op(Operations.LOGOUT,userLogin);\n\t\tclient.handleMessageFromClientUI(logOp);\n\t}", "default void onLoggedOut() {}", "public void handleLogout()\n\t{\n\t\t\t\t\t\t\t\t//\tDisable logout menu item.\n\n\t\tlogoutMenuItem.setText( getLogoutMenuItemTe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Handles a previously visited object.
Result onVisited(Object o);
[ "Result onUnvisited(Object o);", "public void setVisited() { visited = true; }", "public void setVisited()\r\n {\r\n visited = true;\r\n }", "protected void handleInitialVertex() {\r\n\t\tVertex v = nextUnvisited();\r\n\t\tif(v != null){\r\n\t\t\tsetHasBeenVisited(v);\r\n\t\t\tprocessVertex(v);\r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Container's getter for MainSeeAlsoProviderSeeAlsoProviderVL1.
public ViewLinkImpl getMainSeeAlsoProviderSeeAlsoProviderVL1() { return (ViewLinkImpl)findViewLink("MainSeeAlsoProviderSeeAlsoProviderVL1"); }
[ "public ViewObjectImpl getMainSeeAlsoProvider1() {\n return (ViewObjectImpl)findViewObject(\"MainSeeAlsoProvider1\");\n }", "public ViewLinkImpl getMainSeeAlsoProviderSeeAlsoProviderVL2() {\n return (ViewLinkImpl)findViewLink(\"MainSeeAlsoProviderSeeAlsoProviderVL2\");\n }", "public ViewObje...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
repeated string product_ids = 1;
public java.lang.String getProductIds(int index) { return productIds_.get(index); }
[ "java.lang.String getProductIds(int index);", "public Builder addAllProductIds(\n java.lang.Iterable<java.lang.String> values) {\n ensureProductIdsIsMutable();\n com.google.protobuf.AbstractMessageLite.Builder.addAll(\n values, productIds_);\n onChanged();\n return ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the enemy with the provided name
public static Enemy getEnemy(String name) { for (Enemy enemy : allEnemies) if (enemy.getName().equals(name)) return enemy; throw new IllegalArgumentException("That name does not exist as of now.... TIME TO CRASH!"); }
[ "public Enemy getEnemy(String name) {\n\n // For all enemies\n for (Entity curEnt : getEntityList()) {\n\n // If current enemy name matches given name\n if (curEnt.getName().equalsIgnoreCase(name)) {\n\n // Return enemy\n return (Enemy) curEnt;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removes all pieces from the board
public void removeAllPieces() { /* iterate over the rows and columns */ for (int i = 0; i < m_rows; i++) { for (int j = 0; j < m_cols; j++) { removePiece(i, j); } } }
[ "public void clearBoard() \n {\n\tfor(int i=0;i<rows;i++)\n\t {\n\t\tfor(int j=0;j<cols;j++)\n\t\t {\n\t\t\tfrontBoard[i][j] = \"00\";\n\t\t\tbackBoard[i][j] = \"00\";\n\t\t }\n\t }\n\tunused = new Piece[pieces.length];\n\tfor(int i=0;i<pieces.length;i++)\n\t {\n\t\t\tunused[i] = pieces[i];\n\t ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a PhpMap for a given value.
public static AbstractPhpMap getPhpMap (final Object value, final JavaBridge bridge) { if (bridge.logLevel > 3) bridge.logDebug ("returning map for " + value.getClass ()); if (value.getClass ().isArray ()) { return new AbstractPhpMap (bridge, value, false) { boolean valid; ...
[ "java.util.Map<String, MapValue>\n getS2MapMapMap();", "protected Metric getMap(String label, Map value) {\n\n return new Metric(getMonitorName(),\n label,\n value,\n Metric.MAP,\n Metric.DISCRETE,\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Unsets the "BusinessName" element
public void unsetBusinessName() { synchronized (monitor()) { check_orphaned(); get_store().remove_element(BUSINESSNAME$16, 0); } }
[ "public void unsetFirstName()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_attribute(FIRSTNAME$2);\n }\n }", "public void xsetBusinessName(org.apache.xmlbeans.XmlString businessName)\n {\n synchro...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Utility method for creating an InstalledInstrumentationsTest for testing. InstalledInstrumentationsTests need to create a MockInstrumentationTest, and we need to be able to keep track of all mocks created in this manner.
private InstalledInstrumentationsTest createInstalledInstrumentationsTest() { InstalledInstrumentationsTest test = new InstalledInstrumentationsTest() { @Override InstrumentationTest createInstrumentationTest() { MockInstrumentationTest test = new MockInstrumentationTest(...
[ "private Test createSuite()\n {\n //Let's discover what tests have been scheduled for execution.\n // (we expect a list of fully qualified test class names)\n String tests = System.getProperty(TEST_LIST_PROPERTY_NAME);\n if (tests == null || tests.trim().length() == 0)\n {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__XForLoopExpression__DeclaredParamAssignment_3" $ANTLR start "rule__XForLoopExpression__ForExpressionAssignment_5" ../de.nie.fin.ui/srcgen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:18278:1: rule__XForLoopExpression__ForExpressionAssignment_5 : ( ruleXExpression ) ;
public final void rule__XForLoopExpression__ForExpressionAssignment_5() throws RecognitionException { int stackSize = keepStackSize(); try { // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:18282:1: ( ( ruleXExpression ) ) ...
[ "public final void rule__XForLoopExpression__ForExpressionAssignment_5() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:18048...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
MDL tests convert to X
@Test public void convert_MDL_to_EUR_Test(){ long usd = converter.convertAtEUR(Currency.MDL, countMoney); long expected = (long) ((usd * provider.getCourse(Currency.EUR))); long actual = converter.convert(Currency.MDL,Currency.EUR,countMoney); assertEquals(expected,actual); }
[ "@Test\n public void convert_RUB_to_MDL_Test(){\n\n long usd = converter.convertAtEUR(Currency.RUB, countMoney);\n long expected = (long) ((usd * provider.getCourse(Currency.MDL)));\n long actual = converter.convert(Currency.RUB,Currency.MDL,countMoney);\n assertEquals(expected,actual...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructor for reading dataset in csv format for regression tasks (the regression value is assumed to be in the first column).
public CsvDatasetReader(String filename, String representationName, boolean skipFirstLine, LabelPosition labelPosition,StringLabel regressionPropertyName) throws IOException { super(filename); this.representationName = representationName; this.labelPosition = labelPosition; this.regressionProperty = regression...
[ "public Instances loadDataSet() {\n CSVLoader loader = new CSVLoader();\n try {\n loader.setSource(new File(CSVFilePath));\n return loader.getDataSet();\n } catch (IOException ex) {\n Logger.getLogger(ModelEvaluation.class.getName()).log(Level.SEVERE, null, ex);...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the compartment name.
public String getCompartmentName() { return compartmentName; }
[ "public String getCompName() {\n return (String) getAttributeInternal(COMPNAME);\n }", "public String getComponentName() {\n return this.componentName;\n }", "BaseComponent getComponentName();", "public String getName()\n {\n if (this.name == null)\n {\n this.name = this.sym_se...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a getter for the particleHandler variable.
public ParticleHandler getParticleHandler() { return particleHandler; }
[ "public JPanel getParticlePanel ()\r\n \t{\r\n \t\treturn (m_particlePanel);\r\n \t}", "Handler getHandler() {\n return getEcologyLooper().getHandler();\n }", "public Handler getHandler();", "public Handler getHandler() {\r\n return handler;\r\n }", "Particles_1_13 getParticles_1...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the AADHAAR_EKYC_IRIS_AUTHENTICATIONResult value for this AADHAAR_EKYC_IRIS_AUTHENTICATIONResponse.
public org.tempuri.AADHAAR_EKYC_IRIS_AUTHENTICATIONResponseAADHAAR_EKYC_IRIS_AUTHENTICATIONResult getAADHAAR_EKYC_IRIS_AUTHENTICATIONResult() { return AADHAAR_EKYC_IRIS_AUTHENTICATIONResult; }
[ "public void setAADHAAR_EKYC_IRIS_AUTHENTICATIONResult(org.tempuri.AADHAAR_EKYC_IRIS_AUTHENTICATIONResponseAADHAAR_EKYC_IRIS_AUTHENTICATIONResult AADHAAR_EKYC_IRIS_AUTHENTICATIONResult) {\n this.AADHAAR_EKYC_IRIS_AUTHENTICATIONResult = AADHAAR_EKYC_IRIS_AUTHENTICATIONResult;\n }", "public java.lang.Stri...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the value of the ERPExposuresOnSpecialUWBasisProdCompldOpsCurrent field. Products/Completed Operations Exposure
@gw.internal.gosu.parser.ExtendedProperty public java.lang.Long getERPExposuresOnSpecialUWBasisProdCompldOpsCurrent();
[ "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Long getERPExposuresOnSpecialUWBasisPremOpsCurrent();", "public void setERPExposuresOnSpecialUWBasisProdCompldOpsCurrent(java.lang.Long value);", "public void setERPExposuresOnSpecialUWBasisPremOpsCurrent(java.lang.Long value);", "@gw.internal.gos...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This is a lazy update, where the features in a particular example are regularized in a batch, applying the regularization as many times as since the last time that feature was updated. Override to proved a particular regularization function.
protected void lazyUpdate(SRWOptions c, MuParamVector<String> params, ParamVector<String,?> apply, String f, LossData loss, double learningRate) {}
[ "public void updateBatch() {\r\n\t\tthis.processVertex();\r\n\t\tthis.processNormal(false);\r\n\t\tthis.triangleBatch.updateModelBound();\r\n\t}", "@Override\n\tpublic void mutate() {\n\t\tthis.mutate.randomize(this.getGenes());\n\t}", "public void update(String feature, double value) {\n // update the w...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Format list of items. This formatter uses velocity and thus needs a template to work. The template to use is determined as follows: 1. if the RunnerContext contains a value for the property "template", this one is used; 2. else if the configuration given to init contains a key for "formatter.template", this one is used...
public void format(final Collection<Renderable> items, final OutputStream out, final RunnerContext pContext) throws FormatException { VelocityContext context = new VelocityContext(); try { Writer writer; writer = new OutputStreamWriter(out, this.cfg.getString( "formatter.encoding", "UTF-8")); ...
[ "public ArrayList<ItemListElement> formatOutputForList() {\n \t\n \tArrayList<ItemListElement> item = new ArrayList<ItemListElement>();\n \t\n \tfor (int i = 0;i < currentTaskItems.size(); i++) {\n \t\n \t\t//map for item\n \t\t//0 -> number of item\n \t\t//1 -> item type\n \t\t//2 -> des...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
An utility for parsing and formatting binary data.
public interface BinaryFormat { /** * Parses the given string as a {@link ByteBuffer}. * * @param s the string to parse, may be {@code null}. * @return a {@link ByteBuffer} or {@code null} if the string was {@code null}. */ @Nullable ByteBuffer parse(@Nullable String s); /** * Formats the gi...
[ "Binary createBinary();", "byte[] readVbin32();", "@ThreadSafe\npublic interface BinaryFormat<V> {\n\n /**\n * Serializes the {@code value} into the on-the-wire representation.\n *\n * @param value the value to serialize.\n * @return the on-the-wire representation of a {@code value}.\n * @since 0.1.0...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Dumps a zip entry into a string.
private String dumpZipEntry(ZipEntry ze) { StringBuffer sb = new StringBuffer(); if (ze.isDirectory()) { sb.append("d "); } else { sb.append("f "); } if (ze.getMethod() == ZipEntry.STORED) { sb.append("stored "); } else { ...
[ "public String toString()\n\t{\n\t\t// 1. Create a String variable, result, that will store the digits of the zip.\n\t\t// 2. Go through each of the numbers in the zip and append them to the result.\n\t\t// 3. Return the resulting string.\n\t\treturn \"\";\n\t}", "public static String unzipEntryAsString(final Fil...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns an ordered range of all the tai khoan doi ungs where hoatDong = &63;. Useful when paginating results. Returns a maximum of end start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtilALL_POS wi...
@Override public List<TaiKhoanDoiUng> findByHoatDong( Boolean hoatDong, int start, int end, OrderByComparator<TaiKhoanDoiUng> orderByComparator) { return findByHoatDong(hoatDong, start, end, orderByComparator, true); }
[ "@Override\n\tpublic List<TaiKhoanDoiUng> findByHoatDong(\n\t\tBoolean hoatDong, int start, int end,\n\t\tOrderByComparator<TaiKhoanDoiUng> orderByComparator,\n\t\tboolean retrieveFromCache) {\n\n\t\tboolean pagination = true;\n\t\tFinderPath finderPath = null;\n\t\tObject[] finderArgs = null;\n\n\t\tif ((start == ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__UpdateSubtraction__Group__1__Impl" $ANTLR start "rule__UpdateSubtraction__Group_1__0" ../eu.quanticol.caspa.ui/srcgen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:7266:1: rule__UpdateSubtraction__Group_1__0 : rule__UpdateSubtraction__Group_1__0__Impl rule__UpdateSubtraction__Group_1__1...
public final void rule__UpdateSubtraction__Group_1__0() throws RecognitionException { int stackSize = keepStackSize(); try { // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:7270:1: ( rule__UpdateSubtraction__Group_1__0__Impl ru...
[ "public final void rule__UpdateSubtraction__Group__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:7238:1: ( rule__UpdateSubtraction__Group__1_...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the fieldManageability value for this CustomField.
public com.sforce.soap._2006._04.metadata.FieldManageability getFieldManageability() { return fieldManageability; }
[ "public void setFieldManageability(com.sforce.soap._2006._04.metadata.FieldManageability fieldManageability) {\r\n this.fieldManageability = fieldManageability;\r\n }", "public boolean isAbilityValue() {\n return abilityValue;\n }", "public java.lang.Boolean getRestrictedAdminField() {\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
EXPLANATION Object[] data: input to sort / sorted Object[] aux: merged data (initially none) int left: data start (initially 0) int right: data end (initially input size 1) Comparator sorter: sorter/comparing function.
default void mergesortImpl(Object[] data, Object[] aux, int left, int right, Comparator<? super E> sorter) { if (left < right) { // else input data size is 1 (no sort) int i = left; // sorted left-half start ...
[ "@Test\n public void testMergeSort() {\n Integer[] copy = Arrays.copyOf(data, data.length);\n System.out.println(\"\\nUnsorted Data\");\n sorter.timedSort(SortAlgorithm.MERGE, copy, comp);\n assertTrue(\"Not sorted\", isSorted(copy, comp));\n System.out.println(\"\\nSorted Data\");\n sorter.timed...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__AbstractDirectDeclarator__ArraysAssignment_0_3" $ANTLR start "rule__AbstractDirectDeclarator__ArrayAssignment_1" ../org.ow2.mindEd.idt.editor.textual.ui/srcgen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:9106:1: rule__AbstractDirectDeclarator__ArrayAssignment...
public final void rule__AbstractDirectDeclarator__ArrayAssignment_1() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractal...
[ "public final void rule__AbstractDirectDeclarator__ArraysAssignment_0_3() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/inte...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks that there are no moves left for either the user player or the agent player. returns 0 if there are no more moves for either player returns 1 if there are no moves for player 1 returns 2 if there are no moves for player 2 returns 3 if there are still moves for both players
@Override public int checkNoMovesLeft(List<Integer> userStates, List<Integer> agentStates) { boolean noMovesForPlayer1 = checkEmptyMovesForPlayer(userStates); boolean noMovesForPlayer2 = checkEmptyMovesForPlayer(agentStates); if (noMovesForPlayer1 && noMovesForPlayer2) return 0; else...
[ "public void checkMoveOrPass(){\n if (this.xTokens.size() > 0) {\n this.diceRoller = false;} \n else { //if no tokens to move, pass and let player roll dice\n this.turn++;\n //System.out.println(\"next turn player \" + this.players[currentPlayer].getColor());\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the rangeLeft property: Address range on the left side of the street.
public String getRangeLeft() { return this.rangeLeft; }
[ "public int getXLeftBound(){\n\t\treturn this.xLeftBound;\n\t}", "public double getBoundingBoxLeft() {\n return boundingBoxLeft;\n }", "public Point getLowerLeft() {\r\n return this.lowerLeft;\r\n }", "public Coords getLowerLeft()\r\n {\r\n return new Coords(x, y + height);\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retourne la liste de toutes les reservations d'un utilisateur.
public List<Reservation> listerReservationParUtilisateur( Integer idUtilisateur) { List<Reservation> lesReservations = new ArrayList<Reservation>(); try { PreparedStatement st = con .prepareStatement("select idreservation,datereservation,datedebutreservation,datefinreservation,confirmation,idSalle,tarif ...
[ "public Reservation getReservations() {\n return reservations;\n }", "public ArrayList<Reservation> getReservations() {\n\t\treturn reservations;\n\t}", "public List<Reservation> selectionTousReservation();", "public List<Reservation> getReservations(String renter) {\n\t\tEntityManager em = EMF.get(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method overrides the Object equals() method. Cards are considered equal if their ranks and suits are both the same.
@Override public boolean equals(final Object o) { if (this == o) { return true; } if (o instanceof Card) { return ((suit == ((Card) o).suit) && (rank == ((Card) o).rank)); } else { return false; } }
[ "@Override\n public boolean equals(Object otherObject) {\n if (this == otherObject) return true;\n if (!(otherObject instanceof Card)) return false;\n Card card = (Card) otherObject;\n return suit == card.suit &&\n rank == card.rank;\n }", "public boolean equals(Ca...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
icon.render(sb, x, y, cx, cy, scale Settings.scale ShrinkLongDescription.Scale.descriptionScale.get(card), 0);
public static void renderSCVIcon(AbstractCard card, SpriteBatch sb, AbstractCustomIcon icon, float x, float y, float scale, float cx, float cy) { icon.renderOnSCV(sb, card, x, y, cx, cy, scale); //icon.render(sb, cx + x * Settings.scale * scale + icon.region.offsetX * Settings.scale - 4.0F * Settings.sc...
[ "public CardSprite drawCardDetail() {\n // kamus lokal\n CardSprite cs;\n String imagePath, front, back, attr, elmt, desc, type;\n elmt = \"\";\n if (this.element==Element.AIR) {\n elmt=\"Air\";\n }\n else if (this.element==Element.EARTH) {\n el...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Given CarSettlement.season = "jesien"; CarSettlement.nightTime = true;
@Test public void shouldHeadlightsTurnedOnWhenNightTime() { CarSettlement.getSeasonAndTime("jesien", true); ApplicationContext context = new AnnotationConfigApplicationContext("com.kodilla.spring"); Car car = (Car) context.getBean("seasonCar"); //When String whichCar = car.ge...
[ "@Test\n public void shouldHeadlightsTurnedOffWhenDayTime() {\n CarSettlement.getSeasonAndTime(\"lato\", false);\n ApplicationContext context = new AnnotationConfigApplicationContext(\"com.kodilla.spring\");\n Car car = (Car) context.getBean(\"seasonCar\");\n //When\n String wh...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the esf description of this e s f state.
@Override public java.lang.String getEsfDescription() { return _esfState.getEsfDescription(); }
[ "public String getStateDescription() {\n return (String)getAttributeInternal(STATEDESCRIPTION);\n }", "@Override\n\tpublic java.lang.String getEsfName() {\n\t\treturn _esfState.getEsfName();\n\t}", "public String getEventDescription() {\n\t\treturn description;\n\t}", "@Nullable\n public Stri...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
cuts a given employee.
public static void cut(Employee e) { e.setSalary(e.getSalary() / 2); }
[ "public void removeEmployee(EmployeeInfo theEmployee) {\n\t\tint empPlace = theEmployee.getEmpNumber() % bucketCount;\r\n\t\tint empNum = theEmployee.getEmpNumber();\r\n\t\tfor (int i = 0; i < buckets[empPlace].size(); i++) {\r\n\r\n\t\t\tif (buckets[empPlace].get(i).getEmpNumber() == theEmployee.getEmpNumber()) {\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method Name : renameFile Description : The Method "renameFile" is used for Date : May 28, 2016, 6:17:47 PM
@Override public boolean renameFile(String oldFileName, String newFileName) throws FileSystemUtilException { throw new FileSystemUtilException("000000",null,Level.ERROR,null); }
[ "boolean renameFile(File file, String newFileName);", "boolean renameFile(File f, File newName);", "private void renameFile() {\n ProjectFile file = (ProjectFile) viewer.getSelectedNode();\n String newName = (String)\n JOptionPane.showInputDialog(\n viewer,\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the default value to 1 if no (eq.user.sessionlimit) was defined in equationConfiguration.properties
private void setDefaultValue() { if (userExtensionLimit.size() == 0) { userExtensionLimit.put(SESSION_LIMIT, -1); } }
[ "public void setUserSessions(java.lang.Integer value);", "void setDefaultUserQuota(long val);", "@Description(\"The configured maximum number of sessions in memory. The number of persistent sessions may be larger\")\n public int getSessionMax();", "void overrideGlobalLimit(int lim)\n {\n globalLim...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new traccar user with the primary key. Does not add the traccar user to the database.
public TraccarUser create(long traccarUserId);
[ "public com.vanban.model.user create(long userId);", "public void createUser(User user);", "public void createUser() {\r\n /*\r\n need to add to the loader list.\r\n */\r\n User u = new User();\r\n UserAccManager accM = new UserAccManager(u.getId());\r\n u.setAccManage...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column t_shira_profit_detail.trade_core_id
public Integer getTradeCoreId() { return tradeCoreId; }
[ "public void setTradeCoreId(Integer tradeCoreId) {\n this.tradeCoreId = tradeCoreId;\n }", "public int getCoreId() {\n return this.coreId;\n }", "Integer getCoreId();", "public void setCoreTransId(String coreTransId) {\n\t\tthis.coreTransId = coreTransId;\n\t}", "public Long getCoreUserI...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Subclasses use this method to access a SchemaMetricsCalculator object for a specific schema
protected SchemaMetricsCalculator getSchemaMetricsCalculator(Schema schema) { SchemaMetricsCalculator calc = schemaMetricsCalculators.get(schema); assert calc != null; return calc; }
[ "private void findSchemaMetricsCalculators(SchemaMetricsCalculatorService schemaMetricsCalculatorService)\n\t{\n\t\tschemaMetricsCalculators.put(diachronicSchema, schemaMetricsCalculatorService.getSchemaMetricsCalculator(diachronicSchema));\n\t\t\n\t\tIterator<Schema> schemaIterator = schemaHistory.getSchemaVersion...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Click handler for the bottom nav component User history
public void onUserHistoryClick(View view){ Intent intent = new Intent(Deals_Display.this, user_history_activity.class); startActivity(intent); }
[ "public void clickHistoryTab(){\t\n\t\t\n\t\tHistory_Tab.click();\n\t}", "void onUserHeadClick();", "public void onHomeClicked() {\n\t\t\t//Grumble, grumble... OVERRIDE ME!\n\t\t}", "@UiHandler(\"history\")\n public void showHistory (ClickEvent event){\n \tshowHistory();\n }", "public void onBottom...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column SF_ENTRUST.MAJOR_CODE
public String getMajorCode() { if (getMajor() != null) return getMajor().getMajorCode(); return majorCode; }
[ "public String getMajorCode() {\r\n\t\treturn majorCode;\r\n\t}", "public Integer getMajorId() {\n return majorId;\n }", "public String getMajor() \r\n {\r\n return studentMajor;\r\n }", "public int major() {\n\t\treturn identifiers[MAJOR_INDEX];\n\t}", "public void setMajorCode(Strin...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Fin de setPlo( String pPlo).______________________________________________________ method getAbs() : Getter de l'abscisse curviligne de la localisation.
@Column(name = "ABSCISSE" , unique = false, nullable = true , updatable = true, insertable = true) @Override public Float getAbs() { return this.abs; }
[ "String getPlo();", "@Column(name = \"PLO\"\r\n\t\t, unique = false, nullable = true\r\n\t\t, updatable = true, insertable = true)\r\n\t@Override\r\n\tpublic String getPlo() {\r\n\t\treturn this.plo;\r\n\t}", "default void absolute()\n {\n getAxis().absolute();\n setAngle(Math.abs(getAngle()));\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the current OnPageChangeListsner
public OnPageChangedListener getOnPageChangedListener() { return mOnPageChangedListener; }
[ "void onPageSelected(long idPage);", "void onListChanged();", "public int updatePageList();", "public abstract void onPageChanged(int oldPage, int newPage);", "public List getCurrentList() {\n return mCurrentList; \n }", "protected ListPageInterface parentListPage() {\n return (ListPageInterfa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
DESTINATION: Prepare the updates. They will be committed in a separate request. Receive a batch transmission. This is a bunch of updates (new/change/delete), which may or may not be an entire transaction. For each update, an understudy file is created. If a commit is received, these are used to install the updates. If ...
public void destination_installBatchOfFiles(String destinationRoot, String txId, FipBatchOfUpdates updateBuffer, String ipaddr) throws FipException { log(destinationRoot, true, "installBatchOfFiles (txId: " + txId + ", ipaddr: " + ipaddr+")"); // Load the destination properties // if ( !destinationRoot.endsWith(...
[ "public void batchTransferUpdate(List<TransferAsset> transferAssets) {\n\t\tList<ProductionAsset> prodAsset = new ArrayList<ProductionAsset>();\t\t\n\t\tList<ProdMonitor> prodMonitors = new ArrayList<ProdMonitor>();\n\t\t\n\t\tfor(TransferAsset asset: transferAssets) {\n\t\t\tProductionAsset sourceAsset = new Produ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
////////////////////////////////////////////////////////////////////////// instance methods Check for the instance object if the current context user has the access defined in the list of access types.
public boolean checkAccess(final Instance _instance, final AccessType _accessType) throws EFapsException { boolean bHasAccess = false; Context context = Context.getThreadContext(); // create if ("c...
[ "private boolean isAccess() {\n\t\treturn (getAccount().getAccess().isAtLeast(Account.Access.PRIVILEGED)\n \t\t\t\t&& !context.getServer().isLanMode());\n \t}", "boolean getAccess();", "boolean hasAccessToResourceOfType(UserInfo user, ObjectType resourceType, ACCESS_TYPE permission);", "private Boolean hasAcc...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets ip net id.
public String getIpNetId( ) { return this.ipNetId; }
[ "java.lang.String getNetId();", "int getNetId();", "public int getNetId() {\n return netId_;\n }", "public int getNetId() {\n return netId_;\n }", "int getInIp();", "java.lang.String getSnIp();", "public java.lang.String getNetworkId() {\n return networkId;\n }", "public ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new DiskClusterNode with the given cluster number and data and appends it after the node in the list at the specified position. Assume that the first node in the list is position 1. If position is 0, insert the new node at the head of the list. If position is less than 0 or if position is greater than the num...
public void insertCluster(int cluster, String data, int position) throws IllegalArgumentException{ if( position<0 || position>_size){ throw new IllegalArgumentException(); } DiskClusterNode newNode = new DiskClusterNode(cluster, data); /*if(position==0){ //insert the new node at the head of...
[ "public void addClusterToTail(int cluster, String data){\r\n\t\tDiskClusterNode newNode = new DiskClusterNode(cluster, data);\r\n\t\t\r\n\t\tif(_head!=null){ //not a empty list\r\n\t\t\t_tail.setNextNode(newNode);\t\r\n\t\t\t_tail = newNode ;\r\n\t\t}\r\n\t\t\r\n\t\telse{ //empty list\r\n\t\t\t_tail = newNode ; \r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check if an itemstack is Soulbound. This function is designed for API usage.
public static boolean isSoulbound(ItemStack itemStack) { return ItemUtils.isSoulbound(itemStack); }
[ "public boolean hasSwordBlade(ItemStack stack) {\n if (!isValidManeuverGearHandleStack(stack)) {\n return false;\n }\n CompoundTag tag = stack.getTag();\n return tag != null && tag.getInt(Names.NBT.DAMAGE) > 0;\n }", "public boolean isSalvageable(ItemStack itemStack);", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
new connection item with textfield and keylistener
private void initNewConnect() { this.newConnect = new JMenu("Connect To"); // textfield for ip address with keylistener JTextField ipAddress = new JTextField("000.000.0.000"); ipAddress.setPreferredSize(new Dimension(100,18)); ipAddress.setMaximumSize(new Dimension(100,18)); ipAddress....
[ "public interface Connection\n {\n // CharSequence getSelectedText();\n CharSequence getTextAfterCursor( InputConnection ic, int n);\n CharSequence getTextBeforeCursor( InputConnection ic, int n);\n boolean isStoreTextEnabled();\n }", "private void addNewItem(){\n // create a new object i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Mapping from 'UomEntity' to 'Uom'
public Uom mapUomEntityToUom(UomEntity uomEntity) { if (uomEntity == null) { return null; } //--- Generic mapping Uom uom = map(uomEntity, Uom.class); //--- Link mapping ( link to Useraccess ) if (uomEntity.getUseraccess() != null) { uom.setUomU...
[ "public void mapUomToUomEntity(Uom uom, UomEntity uomEntity) {\n if (uom == null) {\n return;\n }\n\n //--- Generic mapping \n map(uom, uomEntity);\n\n //--- Link mapping ( link : uom )\n if (hasLinkToUseraccess(uom)) {\n UseraccessEntity useraccess1 =...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
has the car listing been starred Constructs a new CarListing
public CarListing (UUID uuid, String make, String model, String image, String description, int year, int askingPrice, int standardPrice, boolean isBestInYear, boolean isWorstInYear, boolean isStarred) { this(uuid.toString(), make, model, image, description, year, as...
[ "public CarListing (String uuid, String make, String model, String image, String description,\n int year, int askingPrice, int standardPrice, boolean isBestInYear,\n boolean isWorstInYear, boolean isStarred) {\n this.mUuid = uuid;\n this.mMake ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Extract the protocol or the scheme from the given URL. For example, in the URL the protocol is http. Neither checks for the validily of the scheme is made, nor the value is canonicalized.
public static String extractProtocol(String url) { if(AssertUtils.isEmpty(url)) { return null; } int index = url.indexOf("://"); if(index == -1) { return null; } return url.substring(0, index).toLowerCase(); }
[ "public static String getProtocolHostFromUrl(String url) {\n int i1 = url.indexOf(\"//\");\n if (i1 == -1)\n return null;\n int i2 = url.indexOf('/', i1 + 2);\n int i3 = url.indexOf(':', i1 + 2);\n if (i2 == -1)\n i2 = url.length();\n if (i3 == -1)\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Clear a buffer, with a given padding to allow for prepending later. clearAndPad(0) is the same as clear()
@NotNull B clearAndPad(long length) throws BufferOverflowException, IllegalStateException;
[ "private void clearBuffer() {\r\n\t\tfor (int i = 0; i < buffer.length; i++) {\r\n\t\t\tbuffer[i] = 0x0;\r\n\t\t}\r\n\t}", "public void clearBuffer(ZEBuffer buf, int offset, int count, ByteBuffer value);", "private void pad() {\n int newOffset = ((offset + 3) / 4) * 4;\n while (offset < newOffset) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
77.1: Implement also the toString method that returns a string of the form "The card has X euros".
public String toString() { return "The card has " + this.balance + " euros"; }
[ "public String toString() {\n if (this.errorFlag == true)\n return \"[INVALID CARD]\";\n else\n return this.value + \" of \" + suit.toString();\n }", "public static String cardToString(int card){\n StringBuffer sb = new StringBuffer(\"\");\n //add the suit of the card\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
END OF CREATE if message does not have pic_name field, then do nothing. us the pic_name to get the reference to the image in the database, then download the image, store it in the currentPic Bitmap and display it in imageview. Enable the save and disable buttons. Delete the incoming image from firebase.
public void update(JSONObject message) { if(!message.has("pic_name")) return; try { storageReference = firebaseStorage.getReference().child((String) message.get("pic_name")); } catch (JSONException e) { Log.e(LOG_TAG, "Unable to decode jsonobject for update on camera acti...
[ "private void deletePicture() {\n StorageReference storageReference=FirebaseStorage.getInstance().getReference();\n StorageReference delete = storageReference.child(getIntent().getExtras().getString(\"image\"));\n delete.delete().addOnCompleteListener(new OnCompleteListener<Void>() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Parses flat file containing the inverted index and reads it into the indexer datastructure in memory
private void loadInvertedIndexFromFile(String indexPath) { try { invIndex = new HashMap<String, HashMap<String, IndexEntry>>(); Scanner sc = new Scanner(new File(indexPath)); int lineNum = 0; while (sc.hasNextLine()) { String entry = sc.nextLine().trim(); if (!entry.isEmpty()...
[ "private boolean readFromIndex(){\n\t\tString file = \"./reverseIndex.txt\";\r\n\t\tFile reverseIndex = new File(file);\r\n\t\tif (reverseIndex.exists()){\r\n\t\t\ttry(\r\n\t\t\t\tBufferedReader reader = new BufferedReader(new FileReader(file));\r\n\t\t\t){\r\n\t\t\t\tString readSchema = \"(\\\\{[^\\\\}]+)\";\r\n\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
testCalcNewTheta() Test calcNewTheta() can update the new theta value after processing a list of ALL WRONG items.
@Test public void testMinExtremeCalcNewTheta() throws Exception{ int c = 0; int mark2 = 0; // response double alpha1 = -1; // difficulty double lambda1 = 1.0; // discrimination Item item2 = new Item(c, theta5, alpha1, lambda1, mark2); List<Item> itemList = ...
[ "@Test\n public void testCalcNewTheta() throws Exception{\n\n int c = 0;\n\n int mark1 = 1; // response\n int mark2 = 0;\n int mark3 = 1;\n\n double alpha1 = -1; // difficulty\n double alpha2 = 0;\n double alpha3 = 1;\n\n double lambda1 = 1.0; // discr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Inspects the input text for entities that contain personally identifiable information (PII) and returns information about them.
@Override public DetectPiiEntitiesResult detectPiiEntities(DetectPiiEntitiesRequest request) { request = beforeClientExecution(request); return executeDetectPiiEntities(request); }
[ "@Test\n\tpublic void testEntityExtractionAllTypes() {\n\t\tString testString = \"<html><head></head><body><p>Harvard University is an American private Ivy League research university located in Cambridge, Massachusetts, United States, established in 1636 by the Massachusetts legislature.Harvard is the oldest instit...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of setVer method, of class VM.
@Test public void testSetVer() { System.out.println("setVer"); String ver = ""; VM instance = null; instance.setVer(ver); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); }
[ "@Test\n public void testGetVer() {\n System.out.println(\"getVer\");\n VM instance = null;\n String expResult = \"\";\n String result = instance.getVer();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__MethodDefinition__Group_4_1__1__Impl" $ANTLR start "rule__MethodDefinition__Group_4_1__2" ../org.ow2.mindEd.idt.editor.textual.ui/srcgen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:5397:1: rule__MethodDefinition__Group_4_1__2 : rule__MethodDefinition__Group_4...
public final void rule__MethodDefinition__Group_4_1__2() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:5401:1:...
[ "public final void rule__MethodDefinition__Group_4_0__2() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFra...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
repeated .im.turms.proto.GroupJoinQuestion group_join_questions = 1;
public java.util.List<? extends im.turms.client.model.proto.model.group.GroupJoinQuestionOrBuilder> getGroupJoinQuestionsOrBuilderList() { return groupJoinQuestions_; }
[ "private void clearGroupJoinQuestions() {\n groupJoinQuestions_ = emptyProtobufList();\n }", "private void addGroupJoinQuestions(\n im.turms.client.model.proto.model.group.GroupJoinQuestion value) {\n value.getClass();\n ensureGroupJoinQuestionsIsMutable();\n groupJoinQue...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the value of the bonus property.
public double getBonus() { return bonus; }
[ "public int getBonus() {\r\n return bonus;\r\n }", "public int getValueOfBonus() {\n return valueOfBonus;\n }", "public double getBonus(){\r\n return bonus;\r\n }", "public int getPropertyBonus() {\r\n return propertyBonus;\r\n }", "public long getBonusAmount() {\r\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get lexical token from term token.
private Token token(final TermToken tt) { return tt.hasLexicalToken() ? tt.token().token() : null; }
[ "LexedToken createLexedToken();", "public static Tokenizer forWord(){\n return word;\n }", "java_cup.runtime.Symbol TOKEN(int code) { return TOKEN(code, yytext()); }", "private Token getReservedWordToken(String word) {\n return reservedWords.get(word);\n }", "protected abstract E createLexical...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column PMSTRADE.EXCH_RATE
public BigDecimal getEXCH_RATE() { return EXCH_RATE; }
[ "@gw.datatype.annotation.DataType(name = \"exchangerate\")\n public java.math.BigDecimal getTransToClaimExchangeRateRate() {\n return ((gw.cc.financials.entity.Transaction)__getDelegateManager().getImplementation(\"gw.cc.financials.entity.Transaction\")).getTransToClaimExchangeRateRate();\n }", "public...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
gets the current selected info
public String getSelectedInfo() { return selectedInfo; }
[ "private void getSelectedAndDisplayDetails() {\r\n\t\tSourceMappingSelModelData selected = grid.getSelectionModel().getSelectedItem();\r\n\t\tif (selected != null) {\r\n\t\t\ttryRetrieveAndDisplayDetails(selected);\r\n\t\t}\r\n\t}", "IProductInfo getM_piSelectedItem();", "@Override\n\tpublic String getSelection...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the scope delimiter.
public void setScopeDelimiter(@Nullable final String newScopeDelimiter) { ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this); scopeDelimiter = StringSupport.trimOrNull(newScopeDelimiter); }
[ "public void setDelimiter(String delimiter);", "public void setDelimiter(final Delimiter delimiter) {\n _delimiter = delimiter;\n }", "public void setDelimiter(char delimiter) {\n this.delimiter = delimiter;\n }", "public void setDelimiter(String delimiter) {\r\n this.delimiter = delimi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
CONSTRUCTORS create an empty CountryList
public CountryList() { this.totalCount = 0; this.nextAvailable = 0; }
[ "public Country(){}", "private List<Country_Capital> createList()\r\n {\r\n \tCountry_Capital c1=new Country_Capital(4454,\"India\",\"Delhi\");\r\n \tCountry_Capital c2=new Country_Capital(3465,\"Nepal\",\"Kathmandu\");\r\n \tCountry_Capital c3=new Country_Capital(35457,\"Thailand\",\"Bangkok\");\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Click on Next arrow for loadiTng more activities
public void clickOnNextArrowToLoadMoreActivities(){ SeleniumUtilModified.sleep(5); SeleniumUtilModified.waitForElementToBeVisible(nextArrowBtnForChangingActivity, driver); SeleniumUtilModified.element(nextArrowBtnForChangingActivity, driver).click(); Reporter.log("Clicked on Next arror button to load mo...
[ "public void clickOnNextArrowToLoadMoreActivities(){\n\t\tSeleniumUtil.sleep(5);\n\t\tSeleniumUtil.waitForElementToBeVisible(nextArrowBtnForChangingActivity, driver);\n\t\tSeleniumUtil.element(nextArrowBtnForChangingActivity, driver).click();\n\t\tReporter.log(\"Clicked on Next arror button to load more activities....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
From user builder type.
public BuilderType fromUser(String fromusername) { this.fromUserName = fromusername; return (BuilderType) this; }
[ "private UserType(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private UserInfo(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n }", "private UserData(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(bu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
If the GOOGLE_API_USE_MTLS_ENDPOINT environment variable value is "always", use mTLS endpoint. If the env variable is "auto", use mTLS endpoint if and only if the transport is mTLS. Use the regular endpoint for all other cases.
private static String chooseEndpoint(com.google.api.client.http.HttpTransport transport) { String useMtlsEndpoint = System.getenv("GOOGLE_API_USE_MTLS_ENDPOINT"); useMtlsEndpoint = useMtlsEndpoint == null ? "auto" : useMtlsEndpoint; if ("always".equals(useMtlsEndpoint) || ("auto".equals(useMtlsEndpoin...
[ "public static String getDefaultMtlsEndpoint() {\n return \"netapp.mtls.googleapis.com:443\";\n }", "public static String getDefaultMtlsEndpoint() {\n return \"storage.mtls.googleapis.com:443\";\n }", "public static String getDefaultMtlsEndpoint() {\n return \"dataform.mtls.googleapis.com:443\";\n }...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the value of the 'field283' field
public java.lang.CharSequence getField283() { return field283; }
[ "public java.lang.CharSequence getField283() {\n return field283;\n }", "public java.lang.CharSequence getField298() {\n return field298;\n }", "java.lang.String getField1371();", "public java.lang.CharSequence getField284() {\n return field284;\n }", "java.lang.String getField1571();", "publi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the post the endorsement is being made on
public Post getPost() { return post; }
[ "Post getPost();", "public PostEntity getLatestExpertPost() {\n\t\tif (posts == null || posts.isEmpty()) {\n\t\t\treturn null;\n\t\t}\n\t\treturn posts.stream()\n\t\t\t\t.filter(postEntity -> Objects.equals(postEntity.getStatus(), PostStatus.PUBLISHED))\n\t\t\t\t.max(Comparator.comparing(PostEntity::getCreatedAt)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
If the country is not supported for calculating release times in the countries time zone and falls back to US Pacific time (or country is the United States).
public static boolean isUnsupportedCountryOrUs(String releaseCountry) { return TIMEZONE_ID_US_PACIFIC.equals(getTimeZoneIdForCountry(releaseCountry)); }
[ "private String assignTimeslot(String country) {\n\n if(country.substring(0,5).equalsIgnoreCase(\"china\")) {\n return null;\n }\n\n else {\n if(cache.get(\"A1\") <=300) {\n return \"A1\";\n }\n\n else if(cache.get(\"A2\") <= 300) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns list of computer object(s) Loop through the list. If the instance variable matches, it is added to return list
public List<Computer> searchComputers(ComputerSpec searchSpec) { List<Computer> matchedComputers = new ArrayList<>(); for (Computer computer : inventory) { if (computer.getComputerSpec().matches(searchSpec)) { matchedComputers.add(computer); } } r...
[ "public abstract List<Computer> computers();", "List<Computer> getAll();", "List<Computer> findAll();", "List<ComputerDTO> getAllComputers();", "private static Computer[] loadComputers(ArrayList<String> OSList, int infect) {\n Computer[] computers = new Computer[OSList.size()];\n\n for (int i ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional .alluxio.proto.journal.SetAclEntry set_acl = 31;
public Builder setSetAcl(alluxio.proto.journal.File.SetAclEntry value) { if (setAclBuilder_ == null) { if (value == null) { throw new NullPointerException(); } setAcl_ = value; onChanged(); } else { setAclBuilder_.setMessage(value); }...
[ "alluxio.proto.journal.File.SetAclEntry getSetAcl();", "alluxio.proto.journal.File.SetAclEntryOrBuilder getSetAclOrBuilder();", "public alluxio.proto.journal.File.SetAclEntryOrBuilder getSetAclOrBuilder() {\n return setAcl_;\n }", "public alluxio.proto.journal.File.SetAclEntryOrBuilder getSetAclOrBuil...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Initializes the annotations for mimoentslot.
protected void createMimoentslotAnnotations() { String source = "mimo-ent-slot"; addAnnotation (getPartyQual_Party(), source, new String[] { "key", "true" }); addAnnotation (getPartyQual_PartyQualType(), source, new String[] { "key", "true" }); addAnnotation ...
[ "protected void createMimoentslotAnnotations() {\n\t\tString source = \"mimo-ent-slot\";\n\t\taddAnnotation\n\t\t (getInvoiceAttribute_Invoice(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceAttribute_AttrName(),\n\t\t source,\n\t\t new Str...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the 'field976' field.
public void setField976(java.lang.CharSequence value) { this.field976 = value; }
[ "public com.maxpoint.cascading.avro.TestExtraLarge.Builder setField976(java.lang.CharSequence value) {\n validate(fields()[976], value);\n this.field976 = value;\n fieldSetFlags()[976] = true;\n return this; \n }", "public void setField977(java.lang.CharSequence value) {\n this.field977 ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Use Resume.newBuilder() to construct.
private Resume(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); }
[ "public Resume() {\r\n }", "private ResumeProcessMessage(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public Resume(Integer id) {\r\n this.id = id;\r\n }", "private ResumeDB(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the context for the given installedAppId. Tokens included are good for at least 3 minutes. (If there is less than 3 minutes left, they will be refreshed before being returned.)
T get(String installedAppId);
[ "public interface InstalledAppContextStore<T extends InstalledAppContext> {\n /**\n * Record the given context and keep its tokens up-to-date. Call this when\n * the application is installed.\n */\n void add(T context);\n\n /**\n * Update the previously-recorded context and keep its tokens ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Indicates whether the box is minimized.
private boolean isMinimized() { return height != restoreHeight; }
[ "public boolean isMinimized() {\n return getImplementation().isMinimized();\n }", "public boolean getMinimizeVisible() {\n checkWidget();\n return showMin;\n }", "public boolean isMinimized(Window window) {\n return getWindowDescriptor(window).isMinimized();\n }", "public boolean isMax...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the ontology IRI and version IRI using strings.
public static void setOntologyIRI( OWLOntology ontology, String ontologyIRIString, String versionIRIString) { IRI ontologyIRI = null; if (ontologyIRIString != null) { ontologyIRI = IRI.create(ontologyIRIString); } IRI versionIRI = null; if (versionIRIString != null) { versionIRI =...
[ "public static void setOntologyIRI(OWLOntology ontology, IRI ontologyIRI, IRI versionIRI) {\n OWLOntologyID currentID = ontology.getOntologyID();\n\n if (ontologyIRI == null && versionIRI == null) {\n // don't change anything\n return;\n } else if (ontologyIRI == null) {\n ontologyIRI = curr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Function sets the tile type at the given coordinate.
public void setTile(String cord, Grid.Type type) { int x = cord.charAt(0) - 'A'; int y = Integer.parseInt(String.valueOf(cord.substring(1))) - 1; ArrayList<Grid.Type> newArr = grid.get(y); newArr.set(x, type); grid.set(y, newArr); }
[ "private static void SetTile(Tile.TileType type, int x, int y) { city.setTile(type, x, y); }", "private void updateTile(int x, int y, TileType tileType) {\n if (isOnMap(x, y)) {\n map[x][y] = tileType;\n }\n }", "protected abstract void setTile( int tile, int x, int y );", "p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
methods Return the list of RuleFinder objects. Under normal circumstances this method creates a default list of these objects when first called (ie "ondemand" or "lazy initialization"). However if setRuleFinders has been called first, then the list specified there is returned. It is explicitly permitted for the caller ...
public List getRuleFinders() { if (ruleFinders == null) { // when processing a plugin declaration, attempts are made to // find custom rules in the order in which the Finder objects // are added below. However this list can be modified ruleFinders = new Linke...
[ "public void setRuleFinders(List ruleFinders) {\n this.ruleFinders = ruleFinders;\n }", "public static List<String> getRuleList(){\n if(ruleList.isEmpty())\r\n createRuleList();\r\n return ruleList;\r\n }", "public NameFinderME[] getNameFinders() {\n return finders;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/get all orders that belongs to dish with Id pass as parameter and with status pass as 2nd parameter
@Override public List<Order> getByDishAndStatus(int dishId, String status) { return orderRepository.getByDishAndStatus(dishId,status); }
[ "@Override\n public List<Order> getByDish(int dishId) {\n return orderRepository.getByDish(dishId);\n }", "@Override\n public List<Order> getByDishAndStatusAndDate(int dishId, String status, LocalDateTime localDateTime) {\n return orderRepository.getByDishAndStatusAndDate(dishId,status,loca...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Clears the value of the 'var117' field.
public com.dj.model.avro.LargeObjectAvro.Builder clearVar117() { var117 = null; fieldSetFlags()[118] = false; return this; }
[ "public com.dj.model.avro.LargeObjectAvro.Builder clearVar121() {\n var121 = null;\n fieldSetFlags()[122] = false;\n return this;\n }", "public com.dj.model.avro.LargeObjectAvro.Builder clearVar116() {\n var116 = null;\n fieldSetFlags()[117] = false;\n return this;\n }", "pub...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the login of the current user.
public static Optional<String> getCurrentUserLogin() { SecurityContext securityContext = SecurityContextHolder.getContext(); return Optional.ofNullable(extractPrincipal(securityContext.getAuthentication())); }
[ "public String getLogin(){\r\n\t\treturn this.user.getLogin();\r\n\t}", "public String getUserLogin() {\r\n\r\n\t\treturn this.user_login;\r\n\r\n\t}", "public String getUserLogin() {\n return userLogin;\n }", "public String getCurrentLogin() {\n return sessionContext.getCallerPrincipal().get...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the fine for the loan as a double
public double getFineAmount() { return loanFine.getFine(); }
[ "public double getFine()\n\t{\n\t\treturn fine;\n\t}", "public float getFineAmount() {\n \n return fine;\n }", "public double getDeposited() {\n return (loan - deposit) * (4.0 / (double) loan);\n }", "public Fine getFine() {\r\n\t\treturn loanFine;\r\n\t}", "public double getFineA...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
DEPRECATED. renamed to getEDep()
public float getdEdx() { //return dEdx; return getEDep(); }
[ "EDependencies getDependencies();", "public Depend getDepend()\n throws Exception\n {\n try\n {\n if (depend == null)\n {\n String dependId = getIntakeTool()\n .get(\"Depend\", IntakeTool.DEFAULT_KEY).get(\"Id\").toString();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the average distance of the two encoders.
public double getAverageEncoderDistance() { return (m_leftEncoder.getPosition() + m_rightEncoder.getPosition()) / 2.0; }
[ "public double getAverageEncoderDistance() {\n return (leftEncoder.getDistance() + rightEncoder.getDistance()) / 2.0;\n }", "public double getAverageDistance() {\n return (leftEnc.getDistance() + rightEnc.getDistance()) / 2;\n }", "public double getAverageEncoderDistance() {\n return (get...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Find minimal cost matching between two node lists; Record the matching info back to the trees Do sampling.
private void matchList(int nodes1[], int nodes2[], int count1, int count2, boolean treeOrder, boolean matchFlag) { int[] matching1 = new int[count1]; int[] matching2 = new int[count2]; for (int i = 0; i < count1; i++) matching1[i] = XTree.NO_MATCH; for (int i = 0; i < count2; i++) matc...
[ "private int optimalMatching(int count1, int count2, int dist[][], int matching1[],\n int matching2[]) {\n // Initialize matching.\n // Initial guess will be pair-matching between two lists.\n // Others will be insertion or deletion\n for (int i = 0; i < count2; i++)\n matching1[i] = i;\n f...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }