query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
Forms a forbidden form
public String formForbidden() { return formError("403 Forbidden","You need permission for this service"); }
[ "public String formNotAllowed()\r\n {\r\n return formError(\"403 Access Denied\",\"Access is not allowed\");\r\n }", "public String formUnauthorized()\r\n {\r\n return formError(\"401 Unauthorized\",\"Unauthorized use of this service\");\r\n }", "NotAllowed createNotAllowed();", "@Override\n\tpubl...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
void ChainParameters_set_network(struct LDKChainParameters NONNULL_PTR this_ptr, enum LDKNetwork val);
public static native void ChainParameters_set_network(long this_ptr, Network val);
[ "public void setNetwork(Network network);", "public static native Network ChainParameters_get_network(long this_ptr);", "public void setNetwork(Network network) {\n\t\tthis.network = network;\n\t}", "public void setNetwork(byte network) {\n\t\tif(this.network == ChainId.MAINNET && network == ChainId.ROPSTEN &...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a new object of class 'Ressource'.
Ressource createRessource();
[ "Resource createResource();", "ObjectResource createObjectResource();", "ResourceAdapter createResourceAdapter();", "protected ResourceAccessor createResourceOpener() {\n return new ClassLoaderResourceAccessor(getClass().getClassLoader());\n }", "public RequerimientoResource() {\r\n }", "Network_Re...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Changes the rightmost (least significant) bound of the specified safe array.
HRESULT SafeArrayRedim(SAFEARRAY psa, SAFEARRAYBOUND psaboundNew);
[ "public void replaceWithGreatestOnRight(int arr[]){\n int n = arr.length-1;\n int temp ;\n int max = arr[n];\n arr[n] = -1;\n for(int i = n-1;i>=0;i--){\n temp = arr[i];\n arr[i] = max;\n if(max<temp)\n max = temp;\n\n }\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Static configuration data for UDP transport configuration.
public interface TCPConfiguration { /** * Get the network address to bind listeners to. * * @param defaultValue a default value if no special configuration value is set * @return network address to bind listeners to */ String networkAddress(String defaultValue); /** * Get the network port to bind liste...
[ "protected String buildConfigString() {\n if (multicastAddress == null) {\n throw new IllegalStateException(\"'multcastAddress' is not set\");\n }\n\n if (multicastPort == null) {\n throw new IllegalStateException(\"'multcastPort' is not set\");\n }\n\n retur...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of startSimulationSession method, of class SessionManager.
@Test @SuppressWarnings("SleepWhileInLoop") public void testStartSimulationSession() { System.out.println("startSimulationSession"); assertNotNull(sm); assertEquals(SimulationState.READY, sm.getSimulationSessionState("test3")); sm.addSimulatorToSession("test3", Si...
[ "@Test\r\n public void testAddSimulatorToSession() {\r\n System.out.println(\"addSimulatorToSession\");\r\n assertNotNull(sm);\r\n sm.initSession(\"test4\", programsHome, programsHome + \"files4/\", requester);\r\n \r\n boolean result = sm.addSimulatorToSession(\"test4\", Simul...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ \brief Determine whether the given variable has been captured.
@Converted(kind = Converted.Kind.AUTO, source = "${LLVM_SRC}/llvm/tools/clang/include/clang/Sema/ScopeInfo.h", line = 569, FQN="clang::sema::CapturingScopeInfo::isCaptured", NM="_ZNK5clang4sema18CapturingScopeInfo10isCapturedEPNS_7VarDeclE", cmd="jclank.sh -java-options=${SPUTNIK}/modules/org.clang.sema/llvmTo...
[ "boolean isVariable();", "public boolean hasCaptured(Piece p) {\n return captured.contains(p);\n }", "int isVar(String name);", "public boolean isVariable() ;", "boolean isSpecificVariable();", "public boolean hasCaptured() {\n //YOUR CODE HERE\n\t return pieceCaptured;\n }", "public bool...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
metodo encargado de validar fecha de ingreso
public Boolean validarFecha(LocalDate fechaIngresada);
[ "private void validarFechaVencimiento(){\r\n \r\n Calendar fecSis = Calendar.getInstance();\r\n int dia = fecSis.get(Calendar.DATE);\r\n int mes = fecSis.get(Calendar.MONTH);\r\n int año = fecSis.get(Calendar.YEAR);\r\n int añoV = año-1900; \r\n Date date_ini = new D...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the last candidate in the ordered set where emailAddress = &63;.
@Override public Candidate fetchByEmailAddress_Last(String emailAddress, OrderByComparator orderByComparator) throws SystemException { int count = countByEmailAddress(emailAddress); if (count == 0) { return null; } List<Candidate> list = findByEmailAddress(emailAddress, count - 1, count, orderByComp...
[ "@Override\n\tpublic Candidate findByEmailAddress_Last(String emailAddress,\n\t\tOrderByComparator orderByComparator)\n\t\tthrows NoSuchCandidateException, SystemException {\n\t\tCandidate candidate = fetchByEmailAddress_Last(emailAddress,\n\t\t\t\torderByComparator);\n\n\t\tif (candidate != null) {\n\t\t\treturn c...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
acceptFriendRequest() allows a user to accept a friend request and updates the db accordingly
public static void acceptRequest(String userId, String userEmail, String userName, String friendId, String friendEmail, String friendName) { // add user data to a map Map<String, Object> thisMap = new HashMap<>(); thisMap.put(Const.FRIEND_ID_KEY, userId); ...
[ "public void acceptFriendRequest(String input) {\n if (noOfRequests == 0) {\n System.out.println(\"You have no Friend Requests to accept.\");\n return;\n }\n \n if (!checkValidFriendRequestRange(input) ) {\n System.out.println(\"Invalid choice for Friend ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
An OpenGL drawable is being initialized. This method will be called at least once per listener. I.e., if you register a listener with a viewer that is already being displayed (and thus, has already initialized its GL canvasses), this method will still be called once, right after listener registration.
void glDrawableInitialized(ViewerClass sv, Map<String, Object> sharedData);
[ "@Override\n public void init(GLAutoDrawable gLDrawable) {\n\n GL2 gl = gLDrawable.getGL().getGL2();\n gLDrawable.setGL(new DebugGL2(gl));\n\n // Global settings.\n gl.glEnable(GL2.GL_DEPTH_TEST);\n\n /*\n gl.glDepthFunc(GL2.GL_LEQUAL);\n gl.glShadeModel(GL2.GL_...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__RadarChart__Group_6__3__Impl" $ANTLR start "rule__RadarChart__Group_7__0" InternalMyDsl.g:8375:1: rule__RadarChart__Group_7__0 : rule__RadarChart__Group_7__0__Impl rule__RadarChart__Group_7__1 ;
public final void rule__RadarChart__Group_7__0() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalMyDsl.g:8379:1: ( rule__RadarChart__Group_7__0__Impl rule__RadarChart__Group_7__1 ) // InternalMyDsl.g:8380:2: rule__RadarChart__Group_7__...
[ "public final void rule__RadarChart__Group_7__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:8406:1: ( rule__RadarChart__Group_7__1__Impl )\n // InternalMyDsl.g:8407:2: rule__RadarChart__Group_7__1__Impl\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
returns the summary rating for the review.
public int getSummaryRating() { return my_summary_rating; }
[ "String getReviewrate();", "public com.commercetools.api.models.review.ReviewRatingStatistics getReviewRatingStatistics() {\n return this.reviewRatingStatistics;\n }", "public double getRating() {\n return rating.getRating();\n }", "public double getTotalRating() {\n return totalRat...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Convert a character at a specified position to an integer value. Note: this implementation only handlers numeric values For nonnumeric characters, override this method to provide character>integer conversion.
protected int toInt(char character, int leftPos, int rightPos) { if (isDigit(character)) { return getNumericValue(character); } throw new IllegalArgumentException("Invalid Character[" + leftPos + "] = '" + character + "'"); }
[ "private static int characterToIntegerDigit(char c) {\n\t\t// since all characters are integers in UTF-16\n\t\tif (c >= 48 && c <= 57) {\n\t\t\treturn (c - 48);\n\t\t}\n\t\treturn -1;\n\t}", "private int charToInt(char c) {\r\n\t\treturn c - 'A';\r\n\t}", "private static int convertCharToInt(char c) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieve the statistics fopr this factory.
public Statistics getStatistics();
[ "Statistics getStatistics();", "public BasicStatistics getStatistics() {\r\n \treturn stats;\r\n }", "Statistics getStatistics() {\n // cache result\n if (statistics == null) {\n statistics = new Statistics(locations);\n }\n return statistics;\n }", "public org....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieve the localisation text for success for the new operation.
public String getNewSuccessText() { return newSuccessText; }
[ "public String getAddedSuccessText() {\n\t\treturn addedSuccessText;\n\t}", "int getLocalizedText();", "public String getLoadFileSuccessText() {\n\t\treturn loadFileSuccessText;\n\t}", "public String getSaveFileSuccessText() {\n\t\treturn saveFileSuccessText;\n\t}", "String getLocalization();", "public St...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
El municipio al que pertence el colegio.
public String getMunicipio() { return municipio; }
[ "public String getMunicipio() {\n return municipio;\n }", "public String getMunicipio(){\n return municipio;\n }", "public void setMunicipio(String municipio) {\n this.municipio = municipio;\n }", "public Municipio(){\n\n\t\tthis.ID = this.codigoUF = this.populacao = this.numeroF...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Unwatch a directory from the watch service.
private void unWatchDir(Path path) { watcher_service.deRegisterAll(path); }
[ "private void removeFromListen(Path root) {\n try {\n Files.walkFileTree(root, new SimpleFileVisitor<Path>() {\n @Override\n public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {\n db.processDeletedFile(file);\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the commission multiplier.
public String getCommissionMultiplier() { return commissionMultiplier; }
[ "public int getMultiplier() {\n\t\treturn multiplier;\n\t}", "public double getMultiplier() {\r\n return multiplier;\r\n }", "public BigDecimal getMULTIPLIER()\r\n {\r\n\treturn MULTIPLIER;\r\n }", "public String getMultiplier()\n\t{\n\t\treturn unit == null ? multiplier : (multiplier == null ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates the sort combobox
private void createSort() { sortLabel = new JLabel(sortText); sort = new JComboBox<>(searchTypeList); sort.addActionListener(createSortAction()); }
[ "private JComboBox getInpSortType() {\r\n\t\tif (inpSortType == null) {\r\n\t\t\tinpSortType = new JComboBox();\r\n//\t\t\tinpSortType.setBorder(new TitledBorder(\"sort\"));\r\n\t\t}\r\n\t\treturn inpSortType;\r\n\t}", "private JMenu createSortSubMenu() {\n JMenu sortSubMenu = new JMenu(I18n.tr(\"Sort by\"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Query NetworkElement by Esn.
public NetworkElementMO queryNeByEsn(String esn) throws ServiceException { Map<String, String> conditionMap = new HashMap<>(); conditionMap.put("serialNumber", esn); List<NetworkElementMO> neList = neInvDao.query(conditionMap); if(neList.isEmpty()) { return null; ...
[ "private List query(EVSQuery evsQuery) throws Exception{\n\t\tList results = new ArrayList();\n\t\ttry{\n\t\t\t\n\t\t\tRequest request = new Request(evsQuery);\n\t\t\trequest.setDomainObjectName(evsQuery.getClass().getName());\n\t\t\tLocalProxy server = new LocalProxy(); \t \t \t\n\t\t\tresults = (List)((Respon...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column user.id_card_no
public String getIdCardNo() { return idCardNo; }
[ "public String getUserIdcardNum() {\n return userIdcardNum;\n }", "public Long getCardId() {\r\n return cardId;\r\n }", "public String getUserCardno() {\r\n return userCardno;\r\n }", "int getCardId();", "public String getCardNumber() {\n SQLiteDatabase db = this.getReadableDa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Lingering Actions Check Performs Lingering Actions Until they're turned off as well as the lingering effect of the Speed Modifier Control
public void lingeringActionsCheck(Actor p, Enemy e, int delta){ if(lingerA){ aAction.lingeringEffect(p, e, delta); } if(lingerB){ bAction.lingeringEffect(p, e, delta); } if(lSpellA){ spell.lingeringEffect(p, e, delta); } }
[ "public void constantLingeringActionsCheck(Actor p, Enemy e, int delta){\n\t \tif(lingerConstant){\n\t \t\tconstantEffect.lingeringEffect(p, e, delta);\n\t \t}\n\t }", "public void action() {\r\n\t\tLCD.drawString(\"Avoid Behavior!\", 0, 7);\r\n\r\n\t\tMapUpdate.updateWithoutObject(0);\r\n\t\tMapUpdat...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the ws075RetrievalDetails value for this Ws075.
public void setWs075RetrievalDetails(mastercom.app.claimsretrieve.Ws075RetrievalDetails ws075RetrievalDetails) { this.ws075RetrievalDetails = ws075RetrievalDetails; }
[ "public mastercom.app.claimsretrieve.Ws075RetrievalDetails getWs075RetrievalDetails() {\n return ws075RetrievalDetails;\n }", "public void setWs075CaseFilingDetails(mastercom.app.claimsretrieve.Ws075CaseFilingDetails ws075CaseFilingDetails) {\n this.ws075CaseFilingDetails = ws075CaseFilingDetails...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column TRS_SYN_SETLMT_ACC.MT579_CERTIFICATE_NO_20
public String getMT579_CERTIFICATE_NO_20() { return MT579_CERTIFICATE_NO_20; }
[ "public BigDecimal getCERTIFICATE_NO() {\r\n return CERTIFICATE_NO;\r\n }", "public String getMT579_CERTIFICATE_NO_11() {\r\n return MT579_CERTIFICATE_NO_11;\r\n }", "public String getMT579_CERTIFICATE_NO_33() {\r\n return MT579_CERTIFICATE_NO_33;\r\n }", "public String getMT579_...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Agregado 12.05.2014 jchavez valida la existencia de requisito liquidacion en giro
public boolean validarNoExisteRequisitoAdjuntoGiroLiquidacion(){ log.info("----- validarNoExisteRequisitoAdjuntoGiroLiquidacion()"); blnNoExisteRequisito = true; deshabilitarNuevo = false; ExpedienteLiquidacion expedienteLiquidacion = null; lstRequisitoLiquidacion.clear(); lstRequisitoLiquidacionComp....
[ "public boolean validarNoExisteRequisitoAdjuntoGiroPrevision(){\r\n\t\tlog.info(\"----- validarNoExisteRequisitoAdjuntoGiroPrevision()\");\r\n\t\tblnNoExisteRequisito = true;\r\n\t\tdeshabilitarNuevo = false;\r\n\t\tExpedientePrevision expedientePrevision = null;\r\n\t\tlstRequisitoPrevision.clear();\r\n\t\tlstRequ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
idempotence Nonidempotent indexes can only be built from a source if the store format version supports it Prior to this format version, record updates to nonidempotent indexes would check to see if the record had been built already by looking for its primary key in the range set, which is incorrect for most source inde...
private void validateIdempotenceIfNecessary(@Nonnull FDBRecordStore store, @Nonnull IndexMaintainer maintainer) { if (store.getFormatVersion() < FDBRecordStore.CHECK_INDEX_BUILD_TYPE_DURING_UPDATE_FORMAT_VERSION) { validateOrThrowEx(maintainer.isIdempotent(), "target index is not idempotent"); ...
[ "private void validateSourceAndTargetIndexes(FDBRecordStore store) {\n final RecordMetaData metaData = store.getRecordMetaData();\n final Index srcIndex = getSourceIndex(metaData);\n final Collection<RecordType> srcRecordTypes = metaData.recordTypesForIndex(srcIndex);\n\n validateOrThrow...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Optional. Configuration related to vm config encryption. .google.cloud.gkemulticloud.v1.AzureConfigEncryption config_encryption = 12 [(.google.api.field_behavior) = OPTIONAL];
public com.google.cloud.gkemulticloud.v1.AzureConfigEncryption getConfigEncryption() { if (configEncryptionBuilder_ == null) { return configEncryption_ == null ? com.google.cloud.gkemulticloud.v1.AzureConfigEncryption.getDefaultInstance() : configEncryption_; } else { ...
[ "@java.lang.Override\n public com.google.cloud.gkemulticloud.v1.AzureConfigEncryption getConfigEncryption() {\n return configEncryption_ == null\n ? com.google.cloud.gkemulticloud.v1.AzureConfigEncryption.getDefaultInstance()\n : configEncryption_;\n }", "@java.lang.Override\n public com.googl...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Optionally gets an entity resolver for the supplied context.
private static EntityResolver optEntityResolver(int contextId) { CalendarUtilities calendarUtilities = Services.getOptionalService(CalendarUtilities.class); if (null != calendarUtilities) { try { return calendarUtilities.getEntityResolver(contextId); } catch (OXEx...
[ "@Override\n public EntityResolver getEntityResolver() {\n return entityResolver;\n }", "protected EntityResolver getEntityResolver()\n {\n return null;\n }", "public void setEntityResolver(EntityResolver resolver);", "public void setEntityResolver(EntityResolver resolver)\n {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Manage parking type turtles creation
public static void manageParkingTypeTurtles(Model model, Set<String> setOfParkingTypes) { for(String parkingType : setOfParkingTypes) { // Create resources Resource resourceParkingTypeData = model.createResource(Constants.parkData + "/parkingtype#" + parkingType); Resource reso...
[ "private void setupTurtles() {\n int max_wealth = 0;\n turtles = new Turtle[Params.NUM_PEOPLE];\n for (int i = 0; i < Params.NUM_PEOPLE; i++)\n turtles[i] = new Turtle();\n for (Turtle t: turtles) {\n int x = t.location.getX();\n int y = t.location.getY()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
DOMUIEventListener() Set the MapRenderer
public void setMapRenderer(MapRenderer2 mr) { this.mapRenderer = mr; }
[ "public void onNewRenderer(MapPaneEvent ev) {}", "public void onRenderingStarted(MapPaneEvent ev) {}", "void setMapChanged();", "private void renderMap()\n {\n setUpMapIfNeeded();\n map.setMyLocationEnabled(true);\n }", "public void onRenderingStopped(MapPaneEvent ev) {}", "public void...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Interrupt current audio output. This is not yet supported. Instead audio output will be completely halted. Continuation is not possible.
public void interruptSpeaking() { apl.get(0).cancel(); log.info("Canceled MaryTTS audio output. Pausing is not supported."); }
[ "public void interruptAllAlexaOutput() {\n Log.d(\"Interrupt Alexa\", \"Interrupting all Alexa output\");\n if (isSpeaking()) {\n // Then we are interrupting some speech\n interruptCurrentlyPlaying();\n }\n speakQueue.clear();\n\n interruptAlertsAndContent();...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
if the reference to product is null
@Test(expected = NullReferenceException.class) public void setProductIsNull() throws NullReferenceException { cartItem.setProduct(null); }
[ "boolean isNilSellerProductReference();", "public boolean isNilProduct()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.cdiscount.www.Product target = null;\n target = (com.cdiscount.www.Product)get_store().find_element_user(PRODUCT$0, 0);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Try to replace monitoring exporter configuration with configuration file with NameSnakeCase=false.
private void replaceMetricsNameSnakeCaseFalseConfiguration() throws Exception { HtmlPage page = submitConfigureForm(exporterUrl, "replace", RESOURCE_DIR + "/exporter/rest_snakecasefalse.yaml"); assertNotNull(page); assertFalse(page.asNormalizedText().contains("metricsNameSnakeCase")); if (!O...
[ "protected boolean removeDoubleSlashesFromConfigNames() {\n return true;\n }", "static String toConfigKey(String name) {\n StringBuilder result = new StringBuilder(name.length() + 5);\n\n char[] chars = name.toCharArray();\n for (char aChar : chars) {\n if (Character.isUp...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Does this browse index represent one of the internal item indexes?
public boolean isInternalIndex() { return (this == itemIndex || this == withdrawnIndex || this == privateIndex); }
[ "boolean isIndexed();", "public boolean isIndexed();", "public abstract boolean isIndexable();", "boolean isIndex();", "boolean isMemberOfUniqueIndex();", "boolean getIsIndexOnKeys();", "boolean isSiteIndexable(Site site);", "boolean isIndexingSupport();", "boolean hasIndexLabel();", "private bool...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
//Query for listing parent(root) categories
@Query("SELECT c FROM Category c WHERE c.parent.id is NULL ") public List<Category> findRootCategories(Sort sort);
[ "@Query(\"SELECT c FROM Category c WHERE c.parent.id is NULL \")\n\tpublic Page<Category> findRootCategories(Pageable pageable);", "public List<ReportCategory> findAll(Long parentCategory) throws ReportCategoryDaoException;", "@SuppressWarnings(\"unchecked\")\r\n public List<BOCategory> findChildren(String pa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
From the clusters themes, returns the same data with a structure compatible with the matrix frequency builder algorithm
private static List<HashMap<String, String>> getMatrixFrequencyCompatibleThemes(HashMap<Integer, String> themes) throws FileNotFoundException, IOException { System.out.println("Transforming cluster themes to matrix frequency compatibles..."); List<HashMap<String, String>> clustersThemes = new Arr...
[ "private static HashMap<Integer, HashMap<String, Long>> getClustersFrequencyMatrix(HashMap<Integer, List<String>> clustering, HashMap<String, HashMap<String, Long>> tweetsFrequencyMatrix)\r\n {\r\n System.out.println(\"Building cluster frequency matrix...\");\r\n HashMap<Integer, HashMap<String, Lo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Refers to album name in string property form
public StringProperty albumNameProperty(){ return albumNameProp; }
[ "public String getName(){\r\n\t\treturn albumName;\r\n\t}", "public SimpleStringProperty albumProperty(){\r\n\t\treturn album;\r\n\t}", "public String getalbumName() {\n\t\treturn albumName;\n\t}", "public String toString() {\n\t\treturn this.albumName;\n\t}", "private String getAlbumName() {\n retur...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Populate the text fields of the interactive view to the parameters of the given shape. Used to generate the tweening keyframe when adding a new keyframe, which can then be edited in the view.
void populateTextFields(IShape s);
[ "private void drawModelToView(){\r\n\t\tfor(ModelTextFieldLink m : ModelTextFieldLink.values()){\r\n\t\t\tm.getStateAndSetText();\r\n\t\t}\r\n\t\t//TODO\r\n\t\t//Add something For Worm Drives\r\n\t\t//Add gear Train Elements here\r\n\t}", "private void initializeTextFields() {\n\t\tinputs[0] = \"Name\";\n\t\tinpu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Closes the connection. A custom unavailable presence is sent to the server, followed by closing the stream. The Connection can still be used for connecting to the server again. A custom unavilable presence is useful for communicating offline presence information such as "On vacation". Typically, just the status text of...
public abstract void disconnect(Presence unavailablePresence);
[ "public void disconnect() {\n\t\tdisconnect(new Presence(Presence.Type.unavailable));\n\t}", "void close()\n {\n DisconnectInfo disconnectInfo = connection.getDisconnectInfo();\n if (disconnectInfo == null)\n {\n disconnectInfo = connection.setDisconnectInfo(\n new DisconnectInfo(connecti...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
find user with Most Likes key: UserId ; Value: sum of likes from all comments
public void userWithMostLikes() { Map<Integer, Integer> userLikesCount = new HashMap<>(); Map<Integer, User> users = DataStore.getInstance().getUsers(); for (User user : users.values()) { for (Comment c : user.getComments()) { int likes = 0; if (u...
[ "public void getFiveMostLikedComment() {\n Map<Integer, Comment> comments = DataStore.getInstance().getComments();\n List<Comment> commentList = new ArrayList<>(comments.values());\n \n Collections.sort(commentList, new Comparator<Comment>() {\n @Override \n public ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Permette di modificare l'orientamento della freccia e di cambiarne la forma in funzione del tipo di messaggio.
public void updateFreccia(int TipoMessaggio, boolean flusso) { boolean bo = update.getStato(); if(bo){ update.informPreUpdate(); update.disable(); } flex = new Freccia(Math.round((float)(xstart+3*semiw/2+posCollegamento*DEFAULT_LINK_DISTANCE/2)), Math.round((float)(ystart-semih-DEFAULT_LINK_DIST...
[ "private void moverFondo() {\n ActualizaPosicionesFondos();\n noAleatorio = MathUtils.random(1, 5); // crea los numeros para cambiar los mapas de manera aleatoria\n if (xFondo == -texturaFondoBase.getWidth()){\n //Cambio de fondo base\n texturaFondoBase= mapaAleatorio(no...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Finds the vertex set for the subgraph of all cycles.
public Set<V> findCycles() { // ProbeIterator can't be used to handle this case, // so use StrongConnectivityAlgorithm instead. StrongConnectivityAlgorithm<V, E> inspector = new KosarajuStrongConnectivityInspector<>(graph); List<Set<V>> components = inspector.stronglyConn...
[ "ImmutableSet<TopologyVertex> vertexes();", "public static Set<List<Vertex>> depthFirstSearch(Graph graph) {\n Set<List<Vertex>> arrayListHashSet=new HashSet<>();\n\n for(int i=0;i<graph.getVertices().size();i++){\n ArrayList<Vertex> visitedArrayList=new ArrayList<>();\n for(in...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Read a parking lot from given file into this object. NOTE: assumes infile is correctly formatted
public boolean readParkingLot(File inFile) { try { Scanner sc = new Scanner(inFile); // empty/init zones zones = new ArrayList<>(); // read zones from file try { // read size width = sc.nextInt(); heigh...
[ "public void readInventory() throws IOException {\n\n try {\n BufferedReader reader = new BufferedReader(new FileReader(file_in));\n String inputLine;\n \n while ((inputLine = reader.readLine()) != null) {\n \n Book nb = new Book();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Runs the cycle detection algorithm on the waits for graph and returns a list of all the cycles
List<List<String>> getDeadLockCycles() { Set<String> whiteSet = new HashSet<>(); Set<String> graySet = new HashSet<>(); Set<String> blackSet = new HashSet<>(); Map<String, String> parentMap = new HashMap<>(); cycles.clear(); for (String vertex : vertices) { w...
[ "@SuppressWarnings(\"unchecked\")\r\n private static void cycleTests() throws CALExecutorException {\r\n \r\n final ImmutableDirectedGraph<Integer> noCycles = ImmutableDirectedGraph\r\n .makeGraph(\r\n Collections.<Integer>emptyList(),\r\n Arrays.asList(Pair...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generate a client certificate signed by a Cluster CA. The sole purpose of this endpoint is to support AlloyDB connectors and the Auth Proxy client. The endpoint's behavior is subject to change without notice, so do not rely on its behavior remaining constant. Future changes will not break AlloyDB connectors or the Auth...
public com.google.common.util.concurrent.ListenableFuture< com.google.cloud.alloydb.v1alpha.GenerateClientCertificateResponse> generateClientCertificate( com.google.cloud.alloydb.v1alpha.GenerateClientCertificateRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( ...
[ "public com.google.cloud.alloydb.v1alpha.GenerateClientCertificateResponse\n generateClientCertificate(\n com.google.cloud.alloydb.v1alpha.GenerateClientCertificateRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getGenerateClientCertificateMeth...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
auto generated Axis2 call back method for getPositions method override this method for handling normal response from getPositions operation
public void receiveResultgetPositions( ws.GeoTrackerServiceStub.GetPositionsResponse result ) { }
[ "protocol.Position getPositions(int index);", "java.util.List<ru.chuprikov.search.datatypes.Datatypes.Posting.Position> \n getPositionsList();", "@Override\n\tpublic java.util.List<company.model.Position> getPositions(\n\t\tint start, int end) {\n\n\t\treturn _positionLocalService.getPositions(start, end...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
auto generated Axis2 call back method for listRevisionDocuments method override this method for handling normal response from listRevisionDocuments operation
public void receiveResultlistRevisionDocuments( com.solusoft.jpa.IDocServiceStub.ListRevisionDocumentsResponse result ) { }
[ "public void receiveResultgetRevisionDoc(\r\n com.solusoft.jpa.IDocServiceStub.GetRevisionDocResponse result\r\n ) {\r\n }", "public void receiveResultlistRevisions(\r\n com.solusoft.jpa.IDocServiceStub.ListRevisionsResponse result\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
For each date, summarizedHR16val = (0 + 4 + 8) = 12
@Test void historicalPrecipitationDataSummarizerTestsForSummarizedHR16val() throws Exception { assertEquals(12.0, main.HistoricalPrecipitationDataSummarizer.summarizeHistoricalPrecipitationData("src/example/Example Station 1.csv").get("02-26").get(1 + 6 * 16)); assertEquals(12.0, main.HistoricalPrecipitationDataSu...
[ "@Test\n\tvoid historicalPrecipitationDataSummarizerTestsForTotalCountOfValuesInSummarizedHR16val() throws Exception {\n\t\tassertEquals(3.0, main.HistoricalPrecipitationDataSummarizer.summarizeHistoricalPrecipitationData(\"src/example/Example Station 1.csv\").get(\"02-26\").get(4 + 6 * 16));\n\t\tassertEquals(3.0,...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__Greeting__NameAssignment_1" $ANTLR start "rule__Greeting__ExpressionAssignment_2" ../org.xtext.example.helloxcore.ui/srcgen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:15133:1: rule__Greeting__ExpressionAssignment_2 : ( ruleXExpression ) ;
public final void rule__Greeting__ExpressionAssignment_2() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:15137:1: ( ( ruleXEx...
[ "public final void rule__Greeting__Group__2__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:3477:1: ( ( ( ru...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Increase the level of the game
public void increaseLevel() { this.currentLevel += 1; }
[ "public void increasePower(){\n // Se obtiene el nivel actual del jugador y, en base a esto, \n // se define la experiencia necesaria para subir de nivel\n switch(this.getPower())\n {\n // Nivel 1 -> Nivel 2\n case 1: if(this.getScore() >= 1200)\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Calculate the feature averages for each class
private Map<String, List<Double>> calcClassAverageFeatures( Map<String, List<List<IStroke>>> trainingData) { Map<String, List<Double>> classFeatureAverages = new HashMap<String, List<Double>>(); for (String classLabel : trainingData.keySet()) { List<List<IStroke>> classData = trainingData.get(...
[ "@Override\n public void evaluateFeatures() {\n featureValues = new double[numFeatures];\n double[] meanFeatures = new double[numFeatures]; // the mean values of each feature\n double[][] meanFeatureClass = new double[numClass][numFeatures]; // the mean values of each feature on each class\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the disableNameValidation attribute of the Message object
public void setDisableNameValidation(boolean tmp) { this.disableNameValidation = tmp; }
[ "public boolean getDisableNameValidation() {\n return disableNameValidation;\n }", "public void setInvalidName(String invalidName) {\n this.invalidName = invalidName;\n }", "public void setValidatorName(String name) {\r\n\t\t_validatorName = name;\r\n\t}", "public boolean isDisableNameChecking()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
On snack bar action clicked.
void onSnackBarActionClicked(int uniqueId, View view);
[ "void showSnackbar() {}", "private void snackBar(String msg) {\n MySnackBar.createSnackBar(Objects.requireNonNull(getContext()), Objects.requireNonNull(getView()), msg);\n }", "public void DisplaySnackBarAboveBar(String message, Boolean setAction) {\n int marginSide = 0;\n int marginBott...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The max Y value of the 2D point projected to 3D
public float max3DY() { return Math.max(stop3D.y, start3D.y); }
[ "public double getMaxCoordinateValue() {\n if (this.max_x > this.max_y)\n return this.max_x;\n else\n return this.max_y;\n }", "private double findMaxY() {\n\t\tif (pointList.size()==0) {\n\t\t\treturn Double.NaN;\n\t\t}\n\t\tdouble max = pointList.get(0).getY();\n\t\tfor(in...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The value you provided for the MaxItems request parameter.
public void setMaxItems(Integer maxItems) { this.maxItems = maxItems; }
[ "public void setMaxItems(String maxItems) {\n this.maxItems = maxItems;\n }", "public int getMaxItems() {\n return maxItems;\n }", "public Integer getMaxItems() {\n return maxItems;\n }", "public int getMaxItems()\n {\n return maxItems;\n }", "public void setMaxItems(int...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
add an on before send handler
public ServerRequest<R, S> onBeforeSend(BeforeSendHandler handler) { handler.onBeforeSend(); return this; }
[ "public void setOnSend(Runnable onSend);", "public void doSend(){\n\t}", "void setServerSend();", "void handleMessageSent();", "private void send_msg()\n\t{\n\t}", "public Runnable getOnSend();", "@Override\n\tprotected void dispatch(final LdvSentEventHandler handler) \n\t{ When activated, will get inte...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Registering with GCM and obtaining the gcm registration id
private void registerGCM () { SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences (this); String token = null; int appVersion = Utils.getAppVersion (this); try { InstanceID instanceID = InstanceID.getInstance (this); token = instanc...
[ "public void registerGCM(final Context context) {\n new AsyncTask<Void, Void, Void>() {\n @Override\n protected Void doInBackground(Void... params) {\n try {\n // Register device with Google Cloud Messaging\n gcm = GoogleCloudMessagin...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the default javadoc token types a check is interested in.
public abstract int[] getDefaultJavadocTokens();
[ "public int[] getAcceptableJavadocTokens() {\n final int[] defaultJavadocTokens = getDefaultJavadocTokens();\n final int[] copy = new int[defaultJavadocTokens.length];\n System.arraycopy(defaultJavadocTokens, 0, copy, 0, defaultJavadocTokens.length);\n return copy;\n }", "public int...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Exception1 test case for method searchVisitor request=null
@Test public void testSearchVisitor_Exception1() { try { request = new MockHttpServletRequest("GET", "/searchVistor.htm"); request.setParameter("USERNAME", "justin1"); request.setParameter("PASSWORD", "password"); modelAndView = controller.searchVisitor(null, response); } catch (Excep...
[ "@Test\n\tpublic void testSearchVisitor_Negative() {\n\t\ttry {\n\t\t\trequest = new MockHttpServletRequest(\"GET\", \"/searchVistor.htm\");\n\t\t\t\n\t\t\trequest.setParameter(\"USERNAME\", \"justin1\");\n\t\t\trequest.setParameter(\"PASSWORD\", \"password\");\n\t\t\tmodelAndView = controller.searchVisitor(request...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the AccessPoint key for a WifiConfiguration. This will return a special Passpoint key if the config is for Passpoint.
public static String getKey(WifiConfiguration config) { if (config.isPasspoint()) { return getKey(config.FQDN); } else { return getKey(removeDoubleQuotes(config.SSID), config.BSSID, getSecurity(config)); } }
[ "PortletKey getPortletKey(String portletInstanceKey);", "ConfigKey<?> getConfigKey();", "java.lang.String getEncryptKey();", "@Override\n public WifiConfiguration getConfig() {\n WifiConfiguration config = new WifiConfiguration();\n config.SSID = getSSID();\n config.hiddenSSID = isShow...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Calculate the monthly premium.
public void calculateMonthlyPremium() { monthlyPremium = premium / 12; }
[ "private float calculateMonthlyPayment(){\n return (float)((this.principal*this.rate) / (1-Math.pow(1+this.rate, -this.term)));\n }", "public double getTotalPremium() {\r\n\t\t\tdouble totalPremium = 0.0;\r\n\t\t\tfor (AgentMonthlyLifeSaleReport report : reportList) {\r\n\t\t\t\ttotalPremium += report.g...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new KeyValue RecordBuilder by copying an existing Builder.
public static com.appanddata.alsme.model.avro.KeyValue.Builder newBuilder(com.appanddata.alsme.model.avro.KeyValue.Builder other) { if (other == null) { return new com.appanddata.alsme.model.avro.KeyValue.Builder(); } else { return new com.appanddata.alsme.model.avro.KeyValue.Builder(other); } ...
[ "private KeyValue(Builder builder) {\n super(builder);\n }", "public static iodine.avro.TapRecord.Builder newBuilder(iodine.avro.TapRecord.Builder other) {\n return new iodine.avro.TapRecord.Builder(other);\n }", "public static com.appanddata.alsme.model.avro.KeyValue.Builder newBuilder(com.appa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Supprime tous les cours de cet etudiant, donnes dans la session specifiee. Note: ne pas faire de modification a la liste des cours d'un etudiant sans faire l'equivalent dans la liste des etudiants d'un cours!
public void removeAllCours(DetailSessionsMapEntry session) { Iterator<DetailCoursMapEntry> coursIterator = getCours(); DetailCoursMapEntry cours; while (coursIterator.hasNext()) { cours = (DetailCoursMapEntry) coursIterator.next(); if (cours.isInSession(session)) { // Attention il ne faut pas faire getCo...
[ "public void finTour() {\n doubleAssechement = false;\n tirerCartesTresor();\n\n tirerCartesInondation();\n if (gameOver()) {\n afficherInformation(\"Partie perdue : \" + pktnul);\n vueAventurier.fermerFenetre();\n } else {\n if (victoire()) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test the property 'maxRenderRgnPixels'
@Test public void maxRenderRgnPixelsTest() { // TODO: test maxRenderRgnPixels }
[ "int maxPixelValue();", "RecordBuilder setMaxPixels(long maxPixels);", "public int getMaximumVisibleIllumination();", "private long countPanPixels(int maxRes) {\n\t\tlong numPixels = 0;\n\t\tfor (int n=0; n<panImageList.length; n++) {\n\t\t\tPanImageEntry panEntry = panImageList[n];\n\t\t\tif (panEntry.imageL...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Sets value as the attribute value for Attribute12
public void setAttribute12(String value) { setAttributeInternal(ATTRIBUTE12, value); }
[ "public void setAttribute12(String value) {\n setAttributeInternal(ATTRIBUTE12, value);\n }", "public void setAttribute12(Number value) {\n setAttributeInternal(ATTRIBUTE12, value);\n }", "void setValue(Attribute att, double value);", "void setInt(int attributeValue);", "public void set_...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Abandons the existing provisional selection so that all items provisionally selected are now deselected.
@VisibleForTesting void cancelProvisionalSelection() { mProvisionalSelection.clear(); }
[ "public void deselect() {\n selected = false;\n }", "public void deselected();", "@Override\n\tpublic void deselect() {\n\t\tselected = false;\n\t}", "public void deSelect();", "private void resetSelections() {\r\n if (currentlySelectedEnemyProvince != null) {\r\n featureLayer_pr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieves the average number of draws in a game from the database.
public double getAverageDraws() { Statement stmt; String query = "SELECT\r\n" + " to_char(\r\n" + " AVG (draws),\r\n" + " '99999999999999999D99'\r\n" + " ) AS average_draws\r\n" + "FROM\r\n" + " toptrumps.game;"; double averageDraws = 0; try { stmt = connecti...
[ "public double getAvgDraws() {\n\t\tdouble result = -1.0, sum = 0.0;\n\t\tint count = 0;\n\t\ttry {\n\t\t\tthis.rs = smt.executeQuery(\"SELECT SUM(drawCnt) FROM tp.gamerecord\");\n\t\t\tif(this.rs.next()) {\n\t\t\t\tsum = this.rs.getDouble(1) ;\n\t\t\t}\n\t\t\tthis.rs = smt.executeQuery(\"SELECT COUNT(id) FROM tp....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__Robot__InstancesAssignment_6_1" $ANTLR start "rule__IDevice__TypeofAssignment_0" ../esir.lsi.imtql.ui/srcgen/robot/ui/contentassist/antlr/internal/InternalDsl.g:1543:1: rule__IDevice__TypeofAssignment_0 : ( RULE_ID ) ;
public final void rule__IDevice__TypeofAssignment_0() throws RecognitionException { int stackSize = keepStackSize(); try { // ../esir.lsi.imtql.ui/src-gen/robot/ui/contentassist/antlr/internal/InternalDsl.g:1547:1: ( ( RULE_ID ) ) // ../esir.lsi.imtql.ui/src-gen/r...
[ "public final void rule__IDevice__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../esir.lsi.imtql.ui/src-gen/robot/ui/contentassist/antlr/internal/InternalDsl.g:658:1: ( ( ( rule__IDevice__TypeofAssignment_0 ) ) )\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of treat method, of class Treater.
@Test public void testTreat_Exception() { Exception e = null; Treater.treat(e); }
[ "@Test\n public void treatmentsTest() {\n // TODO: test treatments\n }", "@Test\n public void testTreatment() {\n // TODO: test Treatment\n }", "TrafficTreatment treatment();", "public void setTreatment (java.lang.String treatment) {\n\t\tthis.treatment = treatment;\n\t}", "public ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
links every GamePiece to their neighboring GamePiece EFFECT: Makes every GamePiece know who their neighbors are
public void linkGamePieces() { for (int i = 0; i < this.width; i++) { for (int j = 0; j < this.height; j++) { this.board.get(i).get(j).linkGamePieceHelp(i, j, this.board); } } }
[ "public void linkGamePieceHelp(int i, int j, ArrayList<ArrayList<GamePiece>> board) {\n if (coordOnBoard(i + 1, j, board)) {\n this.neighbors.put(\"right\", board.get(i + 1).get(j));\n }\n if (coordOnBoard(i - 1, j, board)) {\n this.neighbors.put(\"left\", board.get(i - 1).get(j));\n }\n if...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets value as the attribute value for CropId.
public void setCropId(Number value) { setAttributeInternal(CROPID, value); }
[ "public void setTblCrop(TblCropImpl value) {\r\n setAttributeInternal(TBLCROP, value);\r\n }", "public Number getCropId() {\r\n return (Number) getAttributeInternal(CROPID);\r\n }", "public void setCropId(Integer cropId) {\n this.cropId = cropId;\n }", "public Integer getCropId()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This methods triggers joining a server, if a valid server IP and port have been set on initialization.
public void connectIfPresetAndFirstTime() { if (!presetServerIp.isEmpty() && presetServerPort != 0 && firstTime) { try { joinServer( new ServerInfo(InetAddress.getByName(presetServerIp), presetServerPort), ClientRole.PLAYER); } catch (UnknownHostException e) { L.log(Level.WARNING, "Cannot ...
[ "public void join(String host, int port);", "private void establishServerConnection() {\n int lb_port = Integer.parseInt(gui.getLBPort_Text().getText());\n gui.getLBPort_Text().setEnabled(false);\n String lb_ip = gui.getLBIP_Text().getText();\n gui.getLBIP_Text().setEnabled(false);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the factory that creates the instances of the model.
ModelFactory getModelFactory();
[ "ModelFactory createModelFactory();", "ModelsFactory getModelsFactory();", "public ObjectifyFactory factory() {\n return ofy().factory();\n }", "public static final ModelFactory getInstance() {\r\n if (instance == null) {\r\n instance = prepareInstance(new ModelFactory());\r\n }\r\n return i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Find the building that those cell is true, and has minimal area among all other building whose cell value is true in arr.
private int findBuildingWithMinArea(boolean[] arr) { int areaSoFar = Integer.MAX_VALUE; int building = -1; for (int i = 0; i < arr.length; i++) { if (arr[i] && area[i] < areaSoFar) { building = i; areaSoFar = area[i]; } } ...
[ "private int findBuildingWithMinDist(boolean[] arr, int row, int col)\n {\n int minDistSoFar = Integer.MAX_VALUE;\n int building = -1;\n for (int i = 0; i < arr.length; i++) {\n int dist = Compute.dist(row, col, centroids[i][0], centroids[i][1]);\n if (arr[i] && dist < ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Subscribe to the controller to become a spectator of the game. This will allow all spectators to receive all notifications about the state of the game, such as start and end of the game, and movements of the players.
public void subscribe(Player spectator) { spectators.add(spectator); }
[ "private void\r\n\tnotifySpectatorsRoundStarted()\r\n\t{\r\n\t\tfor (Spectator spectator : spectators)\r\n\t\t{\r\n\t\t\tspectator.onRoundStarted(this,\r\n\t\t\t\t\t\t\t\t\t currentRound);\r\n\t\t}\r\n\t}", "private void notifyStartGame(int width, int height) {\r\n\t\tfor (Player e : spectators)\r\n\t\t\te.startN...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
int32 season = 1;
@java.lang.Override public int getSeason() { return season_; }
[ "public int getSeasonNum()\n {\n return seasonNumber;\n }", "public Integer getSeason() {\n return season;\n }", "int getSeasonCaptureScore();", "@java.lang.Override\n public int getSeason() {\n return season_;\n }", "public int getSeasonId() {\n return seasonId;\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Rebuild the evaluation folder. Setting a new output directory for the evaluation data.
@JMXBeanOperation(name = "RebuildEvaluationFolder", description = "rebuild the evaluation folder") public void rebuildEvaluationFolder(){ FileManager.rebuildEvaluationFolder(this.testName); }
[ "public void build() {\n\tFile f = new File(dirname);\n\tmdir = build(f);\n }", "public void resetOutputDataDirectory();", "private void prepareOutputDirectory() {\n if (!experimentDirectoryExist()) {\n createExperimentDirectory();\n }\n Path experimentDirectory = FileSystems.ge...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the background image displayed when the text component is disabled.
public FillImage getDisabledBackgroundImage() { return (FillImage) get(PROPERTY_DISABLED_BACKGROUND_IMAGE); }
[ "public native String getBackgroundDisabledImage() /*-{\n\t\treturn this.@com.pmt.wrap.titanium.ui.WebView::handler.backgroundDisabledImage;\n\t}-*/;", "public Image getDisabledImage () {\n\tcheckWidget();\n\terror(SWT.ERROR_NOT_IMPLEMENTED);\n\treturn null;\n}", "public Image getDisabledImage () {\r\n\tcheckWi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the frame colour.
public void setFrameColour(Color colour) { splitPane.setBackground(colour); }
[ "public void setFrameColor(Color frameColor)\r\n\t{\r\n\t\tthis.frameColor = frameColor;\r\n\t}", "public void setFrameColor(Color c) {\n setValue(c, PROP_FRAME_COLOR);\n }", "public void setColour(Colour colour);", "public void setColor(Color c) { color.set(c); }", "public void setColor(int color);", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional int32 minAge = 10;
int getMinAge();
[ "public void setDesiredMinAge(int age)\n {\n m_desiredMinAge = age;\n }", "int getAgeLow();", "public int getDesiredMinAge()\n {\n return m_desiredMinAge;\n }", "public void setMinAge(int minAge)\r\n {\r\n this.minAge = minAge;\r\n }", "public Integer getMinAge() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the start time as a j2k.
public double getStartTimeJ2K() { return Util.ewToJ2K(getStartTime()); }
[ "public java.lang.String getTime_start() {\r\n return time_start;\r\n }", "public double getEndTimeJ2K() {\n\t\treturn Util.ewToJ2K(getEndTime());\n\t}", "long getStartTimestampMs();", "long getTmStart();", "public String getStartTime() throws ParseException {\n\t\treturn starttime;\r\n\t}", "pu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
new GetAlephExtendedDataImpl().getBibliographicDataByBarCode("1001317024", GetAlephDataImpl.LIBRARY_NK, GetAlephDataImpl.ALEPH_BASE_NK_MAIN);
public static void main(String[] args) throws AlephUnaccessibleException, ItemNotFoundException, Exception { new GetAlephRecordExtendedDataImpl().getBibliographicData("1001317024", "nkc20112252836", GetAlephDataImpl.LIBRARY_NK, GetAlephDataImpl.ALEPH_BASE_NK_MAIN); // new GetAlephExtendedDataImpl().getBibliograp...
[ "public static void main(String[] args) throws AlephUnaccessibleException, ItemNotFoundException, Exception {\n new GetAlephExtendedDataImpl().getBibliographicDataByBarCode(\"1001317024\", \"nkc20112252836\", GetAlephDataImpl.LIBRARY_NK, GetAlephDataImpl.ALEPH_BASE_NK_MAIN);\n// new GetAlephExtendedDataImpl()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method populates the search data required for generating the Insight Data.
private ScoreCardSearchDTO populateSearchDataForInsightDB(String orgId, String toolId, String projectId) { // Insight Data MetricSearchDTO mData = null; ArrayList<MetricSearchDTO> mList = new ArrayList<MetricSearchDTO>(); ScoreCardSearchDTO srchData = new ScoreCardSearchDTO(); srchData.setToolId(toolId); s...
[ "private ScoreCardSearchDTO populateSearchDataForInsightDB(String orgId, String toolId, String projectId) {\n\t\t// Insight Data\n\t\tMetricSearchDTO mData = null;\n\t\tArrayList<MetricSearchDTO> mList = new ArrayList<MetricSearchDTO>();\n\t\tScoreCardSearchDTO srchData = new ScoreCardSearchDTO();\n\n\t\tsrchData.s...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO: Autogenerated Javadoc The Interface ExamPackageService.
public interface ExamPackageService { /** * Gets the list. * * @param username the username * @return the list */ List<ExamPackage> getList(String username); /** * Gets the list. * * @return the list */ List<ExamPackage> getList(); /** * Gets the page by username. * * @param username ...
[ "ExamPackage getExamPackage(int examPackageID);", "public interface ExamService {\n\n\t/**\n\t * Get the exam for given id\n\t *\n\t * @param id Given id\n\t * @return Exam Details\n\t */\n\tpublic Exam getById(Long id);\n}", "public interface Package extends Container {\n\n /**\n * Returns all top-level--no...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
def __tiles50ByTile250(tile250k): minXTile = tile250k[0] 4 minYTile = tile250k[1] 4 outList = [] for tileX in range(minXTile, minXTile+4): for tileY in range(minYTile, minYTile+4): outList.append((tileX, tileY)) return outList
private static List<int[]> tiles50ByTile250(int[] tile250k) { int minYTile = tile250k[1] * 4 ; int minXTile = tile250k[0] * 4 ; List<int[]> outlist = new ArrayList<int[]>() ; for(int tileX=minXTile; tileX<minXTile+4; tileX++) { for(int tileY=minYTile; tileY<minYTile+4; tileY++) { outlist.add(new int[]{ti...
[ "private static int[] tile250FromTile50(int[] tile50k) {\n\t\tint tileX = tile50k[0]/4 ;\n\t\tint tileY = tile50k[1]/4 ;\n\t\treturn new int[] {tileX, tileY} ;\n\t}", "private static List<int[]> tiles250ByTileSeries(int[] tileSeries) {\n\t\tint minYTile = tileSeries[1] * 4 ;\n\t\tint mapsPerSeries = mapsPerSeries...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a calculated penalty fee for the users current owing balance and the configured penalty item.
public BigDecimal calculatePenaltyFee(InvoiceDTO invoice, ItemBL item) { // use the user's current balance as the base for our fee calculations BigDecimal base = new UserBL().getBalance(invoice.getUserId()); // if the item price is a percentage of the balance if (item.getEntity().g...
[ "public double calcCost(int it){\n int lastIndex=this.bids.size()-ONEI;\n double cost=ZEROI;\n double insertionFee= this.minStart*ONE_PERCENT;\n double finalValFee= this.bids.get(lastIndex).getBidAmount()*TEN_PERCERNT;//fee if item is sold\n \n if(this.qtySold==ONEI){//fee for 1 item sold\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests if number of elements in iterator is same as (rowhouses + stores)
@Test public void Board_creteHouseAndStoreArray_shouldCreateArrayList() { int actual = 0; Iterator<Integer> iterator = sut.getHousesAndStores(); int expected = sut.getBoardRows()*sut.getBoardHousesPerSide() + sut.getStoreSize(); while(iterator.hasNext()) { ite...
[ "public abstract boolean isWithinSameStore();", "public static <E> boolean iterableSizeEq(Iterable<E> itrbl, int k) {\n\t// 1) try to iterate k times over itrbl;\n\tIterator<E> it = itrbl.iterator();\n\tfor(int i = 0; i < k; i++) {\n\t if(!it.hasNext()) return false;\n\t it.next();\n\t}\n\t// 2) next check th...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Setting the spinner listener in the onCreate causes the graph to draw strangely To avoid this, we set the listener in the onCreate
@Override public void onStart(){ super.onStart(); exercisePicker.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { @Override public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { String exercise = (String) exe...
[ "public void setupSpinner()\n {\n if (spinnerAdapter == null)\n {\n spinnerAdapter = new StringSpinnerAdapter(spinner, R.array.graph_period_spinner_values);\n }\n\n spinner.setOnItemSelectedListener(this);\n spinner.setAdapter(spinnerAdapter);\n }", "private voi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
change current opertion mode,normal or menu edit
public void changeMode(int mode);
[ "void editMode();", "private void switchToChangeableMode(){\n\t\tif (mode != DISPLAY_MODE.SEARCH_LIST){\n\t\t\tmode = DISPLAY_MODE.TODO_TASKLIST;\n\t\t}\n\t}", "protected void gotoModifyMode(MouseEvent me) {\r\n FigModifyingModeImpl nextMode = new ModeModify(editor);\r\n editor.pushMode(nextMode);...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns true if the given value belongs to this domain.
@Override public boolean contains( Integer value) { return valueDomain_.contains( value); }
[ "public boolean domainHasValue(CycVariable cycVariable, Object value) {\n ArrayList domainValues = (ArrayList) varsDictionary.get(cycVariable);\n return domainValues.contains(value);\n }", "public boolean containsValue(CompositeData value) {\n\n return dataMap.containsValue(value);\n }"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of calculCirculation method, of class Circuit.
@Test public void testCalculCirculation() { }
[ "@org.junit.jupiter.api.Test\n public void ensembleCalculCotisation() {\n StrategyCotisation c = new CotisationPleinPot();\n StrategyCotisation demi = new CotisationMoitierPrix();\n EnsembleCotisation ensemble = new EnsembleCotisation();\n ensemble.ajouterSTrategyCotisation(demi);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Reads a `Signer` for this `KeysInterface` from the given input stream. This is only called during deserialization of other objects which contain `Sign`implementing objects (ie `ChannelMonitor`s and `ChannelManager`s). The bytes are exactly those which `::write()` writes, and contain no versioning scheme. You may wish t...
Result_SignDecodeErrorZ read_chan_signer(byte[] reader);
[ "ReleaseFile parseWithSignature( InputStream is, InputStream signStream, InputStream keyStream ) throws IOException;", "ReleaseFile parseClearSigned( InputStream is, InputStream keyStream ) throws IOException;", "@Override\n\tpublic StringKey deserialize(final InputStream in) throws IOException, URISyntaxExcept...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column tb_shifen_customer.fcontactorname
public void setFcontactorname(String fcontactorname) { fcontactorname = fcontactorname == null ? null : fcontactorname.trim(); setField("fcontactorname", fcontactorname); }
[ "public void setCustomerName(String c) {\n customerName = c;\n }", "public void setCustomerName(String value)\n {\n customerName = value;\n }", "public void setName(String name) {\n this.currentCustomer.setName(name);\n }", "public void setCustomerName(String customerName) {\n\t\tth...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates the method type for the static stub.
private Type createMethodTypeForStaticStub() { ArrayList<Type> args = new ArrayList<>(); if (getKindInfo().isClassMember()) { args.add(Type.LONG_TYPE); } args.addAll(getParams() .stream() .map(param -> param.getType().getJNIType()) ...
[ "public final Type getJavaStaticStubMethodType() {\n if (javaStaticStubMethodType == null) {\n synchronized (this) {\n if (javaStaticStubMethodType == null) {\n javaStaticStubMethodType = createMethodTypeForStaticStub();\n }\n }\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
MUST_USE_RES struct LDKCVec_ChannelDetailsZ ChannelManager_list_usable_channels(const struct LDKChannelManager NONNULL_PTR this_arg);
public static native long[] ChannelManager_list_usable_channels(long this_arg);
[ "public static native long[] ChannelManager_list_channels(long this_arg);", "public List getChannels();", "java.util.List<main.java.io.grpc.chatservice.Channel> \n getChannelsList();", "public List<String> getChannelNames();", "public lnrpc.Rpc.ListChannelsResponse listChannels(lnrpc.Rpc.ListChannelsRe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Provides option to choose image from Gallery
private void showGalleryChooser() { Intent intent = new Intent(); intent.setType("image/*"); intent.setAction(Intent.ACTION_GET_CONTENT); startActivityForResult(Intent.createChooser(intent, "Select Picture"), PICK_IMAGE_REQUEST); }
[ "private void selectImageFromGallery() {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, getString(R.string.select_picture)),\n REQUEST_IMAGE_OPEN);\n }",...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__XCatchClause__DeclaredParamAssignment_2" $ANTLR start "rule__XCatchClause__ExpressionAssignment_4" InternalDroneScript.g:19206:1: rule__XCatchClause__ExpressionAssignment_4 : ( ruleXExpression ) ;
public final void rule__XCatchClause__ExpressionAssignment_4() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalDroneScript.g:19210:1: ( ( ruleXExpression ) ) // InternalDroneScript.g:19211:2: ( ruleXExpression ) { ...
[ "public final void rule__XCatchClause__ExpressionAssignment_4() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:31949:1: ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add failed set to the exception.
public void addFailedSet(String setName) { _failedSets.add(setName); }
[ "void markFailed(Execution execution, Throwable cause);", "public void markAsFailed() {\n execution.setErrorReported();\n }", "void addException(int count);", "public void addFailedFilePath(String path){failedFilepaths.add(path);}", "public void setFailed() {\n \t\tfailed = true;\n \t}", "public...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the linkage for the file during parsing.
public void setLinkage( LINKAGE link ){ mLink = link; }
[ "public void setLink(FileNode target){\n\t\t/*link = target;\n\t\tsuper.setOffset(0);\n\t\tsuper.setLength(link.getLength());\n\t\tsuper.setSourcePath(link.getSourcePath());*/\n\t\tsuper.setVirtualSourceNode(target);\n\t\tsuper.setOffset(0);\n\t\tif(target != null){\n\t\t\tsuper.setLength(target.getLength());\n\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }