query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
Provides the field panel renderer (drawer).
protected abstract IFieldRenderer<FlowPanel> getRenderer();
[ "public abstract FieldPanel getRightFieldPanel();", "public abstract FieldPanel getLeftFieldPanel();", "private org.gwtbootstrap3.client.ui.Panel get_f_Panel4() {\n return build_f_Panel4();\n }", "protected abstract T createFieldPanelCoordinator();", "Drawer getDrawer();", "public FractalPanel get...
{ "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.CONTRIB_RECEIVABLE_SL
public BigDecimal getCONTRIB_RECEIVABLE_SL() { return CONTRIB_RECEIVABLE_SL; }
[ "public void setCONTRIB_RECEIVABLE_SL(BigDecimal CONTRIB_RECEIVABLE_SL) {\r\n this.CONTRIB_RECEIVABLE_SL = CONTRIB_RECEIVABLE_SL;\r\n }", "public BigDecimal getCONTRIB_PAYABLE_SL() {\r\n return CONTRIB_PAYABLE_SL;\r\n }", "public BigDecimal getCONTRIB_RECEIVABLE_GL() {\r\n return CONT...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Click on Docsall Your Documents In One Place. Link.
public zoho clickDocsallYourDocumentsInOnePlaceLink() { docsallYourDocumentsInOnePlace.click(); return this; }
[ "public zoho clickDocsLink() {\n docs.click();\n return this;\n }", "public zoho clickOfficeIntegratorgiveYourAppsBuiltinDocument1Link() {\n officeIntegratorgiveYourAppsBuiltinDocument1.click();\n return this;\n }", "HtmlPage clickSiteLink();", "public void showDocument(Strin...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
GET All Employees. Returns JSON.
@GET @Path("/all") @Produces(MediaType.APPLICATION_JSON) public String getAllEmployees() { List<Employee> employeesList = employeeDao.getAllEmployees(); JSONObject json = new JSONObject(); for (Employee emp : employeesList) { JSONObject content = new JSONObject(); content.put("Id", Integer.toString(em...
[ "@GetMapping(\"/getEmployees\")\n\t@ResponseBody\n\tpublic List<Employee> getAllEmployees(){\n\t\treturn employeeService.getEmployees();\n\t}", "static ArrayList<Employee> showAllEmployees() throws IOException, JSONException\n\t{\n\t\tString address = getServerURL() + \"/all\";\n\t\tURL url = new URL(address);\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the order weight of this course image.
public double getOrderWeight() { return _courseImage.getOrderWeight(); }
[ "public int weight() {\n return weight;\n }", "public int weight(){\n\t\treturn this.weight;\n\t}", "public double getWeight() {\n\t\tif(weightConfiguration == null) {\n\t\t\treturn 1.0;\n\t\t}\n\t\treturn weightConfiguration.weightForIdentifier(this.getIdentifier());\n\t}", "public int getW...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the localized title of this science app in the language, and sets the default locale.
@Override public void setTitle(java.lang.String title, java.util.Locale locale, java.util.Locale defaultLocale) { _scienceApp.setTitle(title, locale, defaultLocale); }
[ "@Override\n\tpublic void setTitle(java.lang.String title, java.util.Locale locale) {\n\t\t_scienceApp.setTitle(title, locale);\n\t}", "public void setTitle(String title, Locale locale, Locale defaultLocale);", "public void setTitle(String title, Locale locale);", "public void setEditorialTitle(String editori...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method to evaluate assessments after submission
public String evaluateAssessment() { netid = session.getAttribute("login").toString(); actual_score = 0; String sql = ""; conn = DbConnection.getConnection(); try { statement = (Statement) conn.createStatement(); int j = 0; for (int i = 0; i < actual_answers.size(); i++) { j = i + 1; ...
[ "public void evaluateQuiz(){\n\t\t\n\t\tscore = 0; // defaulted\n\t\t\n\t\tListIterator<Question> questions = questionsList.listIterator();\n\t\tif(questions.hasNext())\n\t\t{\n\t\t\tdo{\n\t\t\t\t\n\t\t\t\tQuestion quest = new Question( );\t\t\t\n\t\t\t\tquest = questions.next();\n\t\t\t\tif(quest.evaluateQuestion(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
gets list of contacts for a user with a given id
public List<Contact> getContacts(Long id){ contacts.clear(); return contactsAndChildrenParser.getContacts(id); }
[ "List<Contact> getContactsByUser(Long userId);", "@Override\n public List<Contacts> getContactsByUserId(Integer userId) {\n\n return contactsDao.findAllByUserId(userId);\n }", "public List<Contact> findUserContact(Integer userId, String text);", "public List<Contact> findByUser(User user) {\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of Volatility method, of class IndicatorCalculator.
@Test public void testVolatility() { System.out.println("Volatility"); double[] values = { 1052.25, 1026.75, 1023.75, 1007.5, 1002.25, 999.5, 993.5, 1022, 999, 1021, ...
[ "@Test\n public void volatilitySensitivity() {\n final PresentValueForexBlackVolatilitySensitivity sensi = METHOD_BARRIER.presentValueBlackVolatilitySensitivity(OPTION_BARRIER,\n SMILE_MULTICURVES);\n final Pair<Currency, Currency> currencyPair = Pairs.of(EUR, USD);\n final DoublesPair point = Doub...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get a user's information
public User getUserInfo(User user) throws AyningException;
[ "private void getUserInfo() {\n fRef.collection(HabitConstants.USER_PATH).document(currentUser.getUid()).get().addOnCompleteListener(new OnCompleteListener<DocumentSnapshot>() {\n @Override\n public void onComplete(@NonNull Task<DocumentSnapshot> task) {\n if (task.isSucc...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
verify if the user has already the BadgeType passed in parameter
public boolean hasAlreadyBadgeAffected(BadgeType badgeType, User user) { for (Badge badge : user.getBadges()) { if (badge.getBadgeType().equals(badgeType)) { return true; } } return false; }
[ "boolean hasAchievementType();", "@Test\n public void addBadgeTest() throws ApiException {\n Badge body = null;\n api.addBadge(body);\n\n // TODO: test validations\n }", "boolean hasAwardedGymBadge();", "POGOProtos.Rpc.GymBadgeType getGymBadgeType();", "public void checkBloodnameA...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column CTSTELLER.TEMPL_CODE
public BigDecimal getTEMPL_CODE() { return TEMPL_CODE; }
[ "public void setTEMPL_CODE(BigDecimal TEMPL_CODE) {\r\n this.TEMPL_CODE = TEMPL_CODE;\r\n }", "public String getTemplateCode() {\n return templateCode;\n }", "public BigDecimal getTEMPLATE_CODE()\r\n {\r\n\treturn TEMPLATE_CODE;\r\n }", "public BigDecimal getTEMPLATE_CODE() {\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create and initialize nodes in the JTree of the left pane. buildInitialTree is called by MediaLibraryGui to initialize the JTree. Classes that extend MediaLibraryGui should override this method to perform initialization actions specific to the extended class. The default functionality is to set base as the label of roo...
public void buildInitialTree(DefaultMutableTreeNode root, String base) { //set up the context and base name try { root.setUserObject(base); } catch (Exception ex) { JOptionPane.showMessageDialog(this, "exception initial tree:" + ex); ex.printStackTrace()...
[ "private void initializeTree(){\r\n RepositoryData metaData=GitFXGsonUtil.getRepositoryMetaData();\r\n \r\n if(metaData!=null){\r\n TreeItem<String> treeRoot= new TreeItem<String>(metaData.getServerName());\r\n treeRoot.setExpanded(true);\r\n List<ProjectData> p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The root interface in min finder hierarchy. A MinFinder represent method to find minimum on unimodal function.
public interface MinFinder { /** * @return function on which to search */ Function<Double, Double> getFunction(); /** * @return left border of function definition */ double getLeftBorder(); /** * @return right border of function definition */ double getRightBorder...
[ "public int\ngetNodeIndexMin();", "public T findMin() {\n if (isEmpty())\n throw new UnderflowException(\"Attempted to find the minimum of an empty tree\");\n return findMin(root).element;\n }", "public T findMin()\n {\n if ( isEmpty() )\n return null;\n \...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
ReturnType ::= TypeSignature | "V".
Type parseReturnType() { if (symbol != 'V') { return parseTypeSignature(); } else { scanSymbol(); return void.class; } }
[ "Type getReturnType();", "public Type getReturnType();", "TypeUse getReturnType();", "Type getReturnType () { return return_type; }", "Return getReturnType ();", "@DSComment(\"Package priviledge\")\n @DSBan(DSCat.DEFAULT_MODIFIER)\n @DSSource({DSSourceKind.SENSITIVE_UNCATEGORIZED})\n @DSGenerator...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the result of interpreting the object as an instance of 'Parenthesized Expression'. This implementation returns null; returning a nonnull result will terminate the switch.
public T caseParenthesizedExpression(ParenthesizedExpression object) { return null; }
[ "ParenthesizedExpression createParenthesizedExpression();", "public T caseParens(Parens object)\n {\n return null;\n }", "public T casePostfixExpression(PostfixExpression object) {\n\t\treturn null;\n\t}", "ParenthesisExpr createParenthesisExpr();", "public T caseExpr(Expr object)\n {\n return null...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
for adding a generic request
@Override public Request addRequest(Request request) { return generalInfo.addRequest(request); }
[ "public void addRequest(Request req) {\n\n }", "private void addRequest(InstanceRequest request) {\r\n\t\t\r\n\t}", "public void createRequest(Request request);", "public Request createRequest();", "public void addRequest(T request) {\n\t\tinputQueue.add(request);\n\t}", "@Override\n public void add...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Deletes a loyalty reward by doing the following: Returns the loyalty points back to the loyalty account. If an order ID was specified when the reward was created (see [CreateLoyaltyReward]($e/Loyalty/CreateLoyaltyReward)), it updates the order by removing the reward and related discounts. You cannot delete a reward tha...
public CompletableFuture<DeleteLoyaltyRewardResponse> deleteLoyaltyRewardAsync( final String rewardId) { return makeHttpCallAsync(() -> buildDeleteLoyaltyRewardRequest(rewardId), req -> authManagers.get("global").applyAsync(req) .thenCompose(request -> getClientInstan...
[ "public DeleteLoyaltyRewardResponse deleteLoyaltyReward(\r\n final String rewardId) throws ApiException, IOException {\r\n HttpRequest request = buildDeleteLoyaltyRewardRequest(rewardId);\r\n authManagers.get(\"global\").apply(request);\r\n\r\n HttpResponse response = getClientInstan...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create unregistered app. The `user_data` parameter corresponds to the first parameter of the `o_cb` and `o_disconnect_notifier_cb` callbacks. Callback parameters: user data, error code, app
public static native void appUnregistered(byte[] bootstrapConfig, CallbackVoid oDisconnectNotifierCb, CallbackResultApp oCb);
[ "public static native void appRegistered(String appId, AuthGranted authGranted, CallbackVoid oDisconnectNotifierCb, CallbackResultApp oCb);", "public static AppResponse createApp(String userAuthKey, App app) {\n return oneSignal().createApp(userAuthKey, app);\n }", "@Override\n public OAuthApplicat...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check if there are Services without corresponding Deployments, and clean them up from the launcher list.
public void cleanOrphanServices() { log.info("Cleaning orphan Services..."); List<String> serviceNames = getServices(); for (String serviceName : serviceNames) { if (serviceName.startsWith(Constants.BPG_APP_TYPE_LAUNCHER + "-") && !deploymentExists(serviceName)) { log...
[ "private void addAllDeploymentsAsFreeLaunchers() {\n List<String> deployments = getDeployments();\n log.info(\"Found \" + deployments.size() + \" deployments to be added\");\n for (String deployment : deployments) {\n if (runtimeClient.serviceExists(deployment)) {\n ad...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get our trigger list
public ArrayList getTrigger() { return alTrigger; }
[ "public List<Trigger> getTriggers();", "Collection<ITrigger> getTriggers();", "public ArrayList<Trigger> getAllTriggers() {\n\t\tArrayList<Trigger> result = new ArrayList<Trigger>();\n\t\t\n\t\tfor (Trigger t : col) {\n\t\t\tresult.add(t);\n\t\t}\n\t\t\n\t\treturn result;\n\t}", "public List<Trigger> getActiv...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method used to convert pairs to a string
public String pairsToString(){ String output = ""; for(int i = 0; i < pairs.size(); i++){ output = output + pairs.get(i).getVertex1() + " " + pairs.get(i).getVertex2(); output = output + "\n"; } return output; }
[ "private String pairsToWord(List<Pair> pairs){\n String result=\"\";\n for(Pair pair : pairs){\n result=result+pair.getLetter();\n }\n return result;\n }", "@Override\n public String toString() {\n Gson gson = new Gson();\n String s = gson.toJson(this);\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Copied the grantedAuthorities to a Set of strings for a faster searching in it.
private Set<String> getGrantedAuthoritySet() { //TODO nie uzywane // if (this.grantedAuthoritySet == null) { // // final Collection<GrantedAuthority> list = getAuthentication().getAuthorities(); // this.grantedAuthoritySet = new HashSet<String>(list.size()); // // for (final GrantedAuthority granted...
[ "HashSet getGrantedClassNamesDirect() throws HsqlException {\n\n IntValueHashMap rights;\n HashSet out;\n Object key;\n int right;\n Iterator i;\n\n rights = rightsMap;\n out = new HashSet();\n i = rightsMap.keySet()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
required int32 leaderPort = 2;
public int getLeaderPort() { return leaderPort_; }
[ "int getLeaderPort();", "public int getLeaderPort() {\n return leaderPort_;\n }", "public int getPortToUse();", "int getMasterPort();", "public abstract int getPeerPort();", "int getS1Port();", "int getSnPort();", "int getRpcPort();", "int getPort(int port);", "int getTransportPort();", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieve the description of the reason header.
public Optional<String> getReasonHeaderText() { return mReasonHeaderText; }
[ "public String getReasonDesc() {\n return reasonDesc;\n }", "public String getREASON_DESC() {\r\n return REASON_DESC;\r\n }", "public String getReasonDescTxt()\n {\n return reasonDescTxt;\n }", "public String getDescription() {\n\t\tif (iDescription == null) {\n\n\t\t\tif (iEx...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets a value of property OfficialFileWebpage from an RDF2Go node. First, all existing values are removed, then this value is added. Cardinality constraints are not checked, but this method exists only for properties with no minCardinality or minCardinality == 1.
public void setOfficialFileWebpage( org.ontoware.rdf2go.model.node.Node value) { Base.set(this.model, this.getResource(), OFFICIALFILEWEBPAGE, value); }
[ "public void setOfficialFileWebpage(org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.set(this.model, this.getResource(), OFFICIALFILEWEBPAGE, value);\r\n\t}", "public void addOfficialFileWebpage( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.add(this.model, this.getResource(), OFFICIAL...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
required string exClazz = 1;
public com.google.protobuf.ByteString getExClazzBytes() { java.lang.Object ref = exClazz_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); exClazz_ = b; ...
[ "java.lang.String getExClazz();", "public Builder setExClazz(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n exClazz_ = value;\n onChanged();\n return this;\n }", "public java.lang.String get...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Instantiates a new groupable table header.
public GroupableTableHeader(TableColumnModel model) { super(model); setUI(new GroupableTableHeaderUI()); setReorderingAllowed(false); // setDefaultRenderer(new MultiLineHeaderRenderer()); }
[ "protected JTableHeader createDefaultTableHeader() {\n tableHeader = new TextTableHeader(columnModel);\n return tableHeader;\n /*\n new JTableHeader(columnModel) {\n public String getToolTipText(MouseEvent e) {\n String tip = null...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests, if the preference's value is increased correctly, when the minimal value is set to a value greater than the current persisted value.
public final void testSetMinValueIncreasesValue() { SeekBarPreference seekBarPreference = new SeekBarPreference(getContext()); seekBarPreference.setMinValue(60); assertEquals(60.0f, seekBarPreference.getValue()); }
[ "protected boolean shouldIncrease() {\n return this.getCurrentLoadFactor() > this.getUpperLoadFactor();\n }", "boolean updateValue() {\n boolean ret;\n\n if (Math.abs(curUtilityValue - nextUtilityValue) < Math.abs(curUtilityValue) * MAX_ERR_PERCENT / 100)\n ret = true;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
If two predicates are to be considered as part of a bidirectional relationshinp then they should registered with this method. Example: generator.addBidirectional(ApplicationConstants.SOURCE_TERM, ApplicationConstants.TARGET_TERM);
public void addBidirectional(URI predicateA, URI predicateB) { URI[] bundle = new URI[2]; bundle[0] = predicateA; bundle[1] = predicateB; bidirBundles.add(bundle); }
[ "void addIsEquivalent(Noun newIsEquivalent);", "public void dyn_addCoupling_Util(String src, String p1, String dest, String p2){\n if(!cp.contains(new GenCol.Pair(src,p1),new GenCol.Pair(dest,p2))){\n addPair(new GenCol.Pair(src, p1), new GenCol.Pair(dest, p2));\n coordinator c = getC...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new ReadAlignment RecordBuilder
public static org.ga4gh.models.ReadAlignment.Builder newBuilder() { return new org.ga4gh.models.ReadAlignment.Builder(); }
[ "public static org.ga4gh.models.ReadAlignment.Builder newBuilder(org.ga4gh.models.ReadAlignment other) {\n return new org.ga4gh.models.ReadAlignment.Builder(other);\n }", "public static org.ga4gh.models.ReadAlignment.Builder newBuilder(org.ga4gh.models.ReadAlignment.Builder other) {\n return new org.ga4gh....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
check availability for book which is available
@Test public void checkIsBookAvailableWhenBooksIsAvailable() throws Exception { mvc.perform(get("/library/isAvailable").param("book", "Microservices")) .andExpect(status().isOk()) .andExpect(jsonPath("$.isAvailable", is(true))); }
[ "public void getBookAvailability() {\n getBookReservationEligibility();\n }", "public void isAvailable(int bookId) {\n\n boolean isFound = false;\n Book tempBook = null;\n\n // ======== Finding Book ===============\n for (int i = 0; i < currentBookIndex; i++) {\n i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Prints all UUIDs of Services, Characteristics and Descriptors to System.out maintaining their respective hierarchy
private void getAllUUID() { List<BluetoothGattService> serviceList = _btGatt.getServices(); // get list of services on HM-10 for (BluetoothGattService btgs : serviceList) { // for each service in list... System.out.println("Service UUID: " + btgs.getUuid()); System.out.printl...
[ "public void testShowUUIDs() {\n System.out.println(\"\\n-----< Demonstration of UUID generation >------\");\n System.out.println(\"Those are 128 bits UUID Version 1:\");\n for (int i = 0; i < 5; i++) {\n System.out.println(UUIDUtility.getNextUUID(UUIDType.TYPE1));\n }\n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns all the data entries where groupId = &63;.
public java.util.List<DataEntry> findByGroupId(long groupId);
[ "public java.util.List<DataEntry> filterFindByGroupId(long groupId);", "public java.util.List<DataEntry> findByGroupId(\n\t\tlong groupId, int start, int end);", "public java.util.List<DataEntry> filterFindByGroupId(\n\t\tlong groupId, int start, int end);", "public DataEntry fetchByUUID_G(String uuid, long g...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return a valid RLGLUEV3 task spec for this object.
public String toTaskSpec() { StringBuilder TS = new StringBuilder(); TS.append("VERSION "); TS.append(ourVersion); TS.append(" PROBLEMTYPE "); TS.append(this.thisProblemType); TS.append(" DISCOUNTFACTOR "); TS.append(this.discountFactor); TS.append(" OB...
[ "public TaskSpecVRLGLUE3(String taskSpecString) {\n String tmpToken;\n //Default token is space, works for me.\n StringTokenizer T = new StringTokenizer(taskSpecString);\n\n tmpToken = T.nextToken();\n if (!tmpToken.equals(\"VERSION\")) {\n throw new IllegalArgumentExce...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__XRelationalExpression__RightOperandAssignment_1_1_1" $ANTLR start "rule__XOtherOperatorExpression__FeatureAssignment_1_0_0_1" ../org.xtext.mongobeans.ui/srcgen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:16219:1: rule__XOtherOperatorExpression__FeatureAssignment_1_0_0_1 :...
public final void rule__XOtherOperatorExpression__FeatureAssignment_1_0_0_1() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:16223:1: ( ( ( ru...
[ "public final void rule__XOtherOperatorExpression__FeatureAssignment_1_0_0_1() 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/InternalRm...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the sheet number
public int getSheetNumber(){ return sheetNumber; }
[ "protected int getSheetNumber(){\r\n\t\treturn 0;\r\n\t}", "public int getSheetIndex() {\r\n return sheetIndex;\r\n }", "public long getSheetId() {\r\n return sheetId;\r\n }", "public void setSheetNumber(int number){\n this.sheetNumber = number;\n }", "int getSheetCount();", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the value of the 'subjectArea' field.
public java.lang.CharSequence getSubjectArea() { return subjectArea; }
[ "public java.lang.CharSequence getSubjectArea() {\n return subjectArea;\n }", "public void setSubjectArea(java.lang.CharSequence value) {\n this.subjectArea = value;\n }", "public String getCourseArea() {\n return courseArea;\n }", "public String getArea() {\n return area;\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method is allows user to call commands to add expenses, find expenses on a certain date, delete a chosen expense, see the expense list and exit the expense page.
@Override public void execute(ArrayList<Task> list, Ui ui, Storage storage, Stack<String> commandStack, ArrayList<Task> deletedTask, TriviaManager triviaManager) throws IOException { HashMap<LocalDate, ArrayList<String>> map = storage.Expenses(); //Read the file Map<LocalDate, ArrayList<String>> exp...
[ "public void testCreateExpense() {\t\t\n\t\t// Sets 1.00 as amount\n\t\tamountET.performClick();\n\t\tinstrumentation.waitForIdleSync();\n\t\tinstrumentation.sendStringSync(\"1.00\");\n\t\tinstrumentation.waitForIdleSync();\n\t\t\n\t\tinstrumentation.runOnMainSync(new Runnable() {\n\t\t\t@Override\n\t\t\tpublic voi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
sets the tile to not walkable
public void notWalkable() { walkable = false; }
[ "@Override\r\n public boolean isTileOccupied() {\r\n return false;\r\n }", "public void notMovable() {\n\t\tthis.canMove = false;\n\t}", "public void setPuzzleUneditable() {\n for (int i = 0; i < tiles.length; i++) {\n for (int j = 0; j < tiles[i].length; j++) {\n t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Draw the vertex in a Graphics context.
@Override public void draw(Graphics g) { if (this.state == ViewableItem.ItemState.DELETED) return; Graphics2D g2 = (Graphics2D) g; int d = 2 * CircleVertex.RADIUS; if (this.state == ViewableItem.ItemState.SELECTED || this.isSynchronized()) g2.setColor(Color.red); else g2.setColor(Color.black); // out...
[ "void draw(GraphicsContext context);", "void draw(DrawingContext drawingContext);", "private void addVertex(Vertex vertex) {\n \t\tmVertices.put((float) vertex.mPosX);\n \t\tmVertices.put((float) vertex.mPosY);\n \t\tmVertices.put((float) vertex.mPosZ);\n \t\tmColors.put((float) vertex.mColor);\n \t\tmColors.pu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Determines if this cell has question mark.
boolean hasQuestionMark() { return questionMark; }
[ "public static boolean questionMark(WebElement element) {\n\t\t boolean qMark= false; \n\t\t String question= null; \n\t\t question=element.getText();\n\t\t if(question.charAt(question.length()-1)=='?') {\n\t\t\t qMark=true; \n\t\t }\n\t\t \n\t\t return qMark;\n\t }", "void setQuestionMark(boolean hasQuestionMark...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column a_double_topic_apply.target_uid
public void setTargetUid(Long targetUid) { this.targetUid = targetUid; }
[ "public void setApplyUserId(Integer applyUserId) {\n this.applyUserId = applyUserId;\n }", "public Long getTargetUid() {\n return targetUid;\n }", "public void setTargetId(long targetId);", "public void setTargetTopic(String targetTopic) {\n this.targetTopic = targetTopic == null ? ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get modifier and tag from the parent tag
public List<String> getMTFromParentTag(String tag) { String modifier = ""; String newTag = ""; Pattern p = Pattern.compile("^\\[(\\w+)\\s+(\\w+)\\]$"); Matcher m = p.matcher(tag); if (m.lookingAt()) { modifier = m.group(1); newTag = m.group(2); } else { p = Pattern.compile("^(\\w+)\\s+(\\w+)$"); ...
[ "NbtTagContainer getParent();", "java.lang.String getTag();", "public Tag getParent() {\n\t\treturn this.parent;\t\n\t}", "public String getSubtag()\n {\n return this.subtag;\n }", "String getParentElementName();", "public Modifiers getModifiers() {\n return (Modifiers)getChild(0);\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Deletes rows using a PreferenceBean template.
public int deleteUsingTemplate(PreferenceBean pObject) throws SQLException { if (pObject.isPreferenceidInitialized()) return deleteByPrimaryKey(pObject.getPreferenceid()); Connection c = null; PreparedStatement ps = null; StringBuffer sql = null; try ...
[ "public int deleteUsingTemplate(ActBean pObject) throws SQLException\n {\n if (pObject.isActidInitialized())\n return deleteByPrimaryKey(pObject.getActid());\n \n Connection c = null;\n PreparedStatement ps = null;\n StringBuffer sql = null;\n \n try \n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns true if both faces have the same value.
@Override public boolean equals(Object other) { if (other == this) { return true; } if (!(other instanceof Face)) { return false; } Face otherFace = (Face) other; return otherFace.getValue().equals(getValue()); }
[ "public boolean getPair()\n {\n return die1.getFacevalue() == die2.getFacevalue();\n }", "public boolean AdjacentFace(Face other){\n\t\treturn sharedVertice(other) == 2;\n\t}", "public boolean isFace(){\n\t\tboolean rtn = false;\n\n\t\t/*\n\t\t * This 'switch' will compare the 'face' value to every...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Methode starkVerletzen Verschlechtert den Zustand als Folge eines Kampfes
public void starkVerletzen(){ aktuellerZustand = aktuellerZustand.starkVerletzen(); }
[ "public void kaufen(BesitzrechtFeld feld) {\n try {\n System.out.println(\"Dein aktueller Kontostand beträgt: \" + getKontostand());\n System.out.println(\"Die kosten für: \" + feld.getFeldname() + \" (\" + feld.getFarbe() + \") betragen :\" + feld.getGrundstueckswert());\n S...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructs a new ExternalHyperLink
public ExternalHyperLink(String text, String url) { this(text, false, url, null); }
[ "Link createLink();", "LINK createLINK();", "SimpleLink createSimpleLink();", "public Hyperlink(){\n this.href = \"\";\n this.text = new TextSpan(\"\");\n }", "public void addHyperlink() {\n logger.debug(\"addHyperlink#start\");\n\n //Add the link as External relationship\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Process the remove_peer server notifications
private void onPeerRemoved(Pdu pdu) { String pid = pdu.getString("pid"); for (PeerListener listener : getListeners()) { listener.onPeerRemoved(pid); } }
[ "void accountPeerRemoved(String peerId);", "public void callPeerRemoved(CallPeerEvent evt)\n {\n }", "private void handlePeerChanged(MeshManager.RightMeshEvent e) {\n // Update peer list.\n MeshManager.PeerChangedEvent event = (MeshManager.PeerChangedEvent) e;\n if (event.state != REM...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adding new Trainee information.
@PostMapping("/add-new-trainee-info") public Iterable<Trainee> addNewTraineeInfo(@Valid TraineeDTO newTainee, BindingResult bindingResult) throws BadRequestException { logger.log(Level.INFO, "Adding new Trainee details"); boolean flag = false; ErrorMessage errorMessage = new ErrorMessage(); if (bindingResul...
[ "@PostMapping\n\tpublic ResponseEntity<TraineeModel> addTrainee(@RequestBody TraineeModel Trainee) throws TraineeException {\n\t\tTrainee = traineeService.addTrainee(Trainee);\n\t\treturn new ResponseEntity<>(Trainee, HttpStatus.CREATED);\n\t}", "public void addTrainee(Person t) {\n\t\tthis.trainees[traineesCount...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__ActionEquality__Group_1__2__Impl" $ANTLR start "rule__ActionComparison__Group__0" ../com.blasedef.onpa.ONPA.ui/srcgen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:5516:1: rule__ActionComparison__Group__0 : rule__ActionComparison__Group__0__Impl rule__ActionComparison__Group__1 ;
public final void rule__ActionComparison__Group__0() throws RecognitionException { int stackSize = keepStackSize(); try { // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:5520:1: ( rule__ActionComparison__Group__0__Impl ...
[ "public final void rule__ActionComparison__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:5560:1: ( ( ( rule__ActionCompa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
check if path has cells that appear more than once. That would mean that if the knight follows this path he would walk in a circle at least once
private boolean pathHasCircles(ArrayList<BoardCell> cellsPath){ for(int i=0; i<cellsPath.size(); i++){ for(int j = i; j<cellsPath.size(); j++){ if(i!=j){ if(cellsPath.get(i).equals(cellsPath.get(j))){ return true; } ...
[ "private void checkPathing() {\n if(pathing == null) {\n while(pathing == null) {\n map.destroyRandomTower();\n pathing = findPath(74, 17, xDest, yDest);\n }\n }\n }", "private boolean allRevealed() {\n int cellsRevealed = 0;\n for (int row = 0; row < grid.length; row++) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the result of interpreting the object as an instance of 'Column Alias'. This implementation returns null; returning a nonnull result will terminate the switch.
public T caseColumnAlias(ColumnAlias object) { return null; }
[ "public T caseColumn(Column object) {\n\t\treturn null;\n\t}", "@Override\n public Column as(String alias){\n if(this.name.equals(\"*\")){\n return this;\n }\n return super.as( alias );\n }", "public Object caseColumn(Column object) {\r\n\t\treturn null;\r\n\t}", "ColumnO...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Getter method for the COM property "PictureType"
@DISPID(161) @PropGet com.exceljava.com4j.excel.XlChartPictureType getPictureType();
[ "public Integer getPicType() {\n return picType;\n }", "private int getPictureType()\n {\n return pictureType;\n }", "public String getTypePhoto() {\r\n return typePhoto;\r\n }", "public String getImageType() ;", "public static String getType() {\n type = getProperty(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new pdf document based on the given ViewObjectTimeSheetTableModel
public void createPdf(String filePath) throws DocumentException, FileNotFoundException, BadElementException, IOException, SQLException { Calendar date = Calendar.getInstance(); String dato; dato = ""+date.get(Calendar.YEAR)+"-"+MyUtil.p0(date.get(Calendar.MONTH)+1)+"-"+MyUtil.p0((date.get(Cal...
[ "@SuppressWarnings(\"unchecked\")\n @Override\n protected void buildPdfDocument(Map<String, Object> model, Document document, PdfWriter writer,\n HttpServletRequest request, HttpServletResponse response) throws Exception {\n createNewPdfByTemplate(model,document,write...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the default DataProcessing description of applied processing to spectra in the list.
public void setDefaultDataProcessingRef(DataProcessing dp) { this.defaultDataProcessingRef = dp; ensureValidReferences(); }
[ "protected void setDataProcessingList(ReferenceList<DataProcessing> dataProcessingList) {\n this.dataProcessingList = dataProcessingList;\n \n for(Spectrum spectrum : this)\n spectrum.setDataProcessingList(dataProcessingList);\n }", "public void setSampleProcessing(String sample...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
adding score to individual player in scoreBoard
public void addScore(Player player, int score) { for(int i = 0; i < this.scoreBoard.size(); i++) if(player == this.scoreBoard.get(i)) { this.scoreBoard.get(i).scored += score; } }
[ "public void addPlayer(Player player) {\r\n\t\t\tthis.scoreBoard.add(player);\r\n\t\t\r\n\t}", "private void incrementScore(int player) {\n this.score[player] += 1;\n }", "public void addScore(int score);", "public void addScore(Player aPlayer, int score) {\n aPlayer.setScore(score);\n }", "pu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get a area type by alias token.
IAreaType getAreaTypeByToken(String token) throws SiteWhereException;
[ "IArea getAreaByToken(String token) throws SiteWhereException;", "public static AccountType get(String alias) {\n\t\tfor (String key : types.keySet()) {\n\t\t\tif (key.equalsIgnoreCase(alias))\n\t\t\t\treturn types.get(key);\n\t\t}\n\t\treturn null;\n\t}", "IAreaType getAreaType(UUID id) throws SiteWhereExcepti...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Updates the subscription events for the given user within the specified base namespace.
public void updateNamespaceSubscriptions(String baseNS, String userId, List<SubscriptionEventType> eventTypes) throws RepositoryException { updateSubscriptions( getNamespaceSubscriptions( baseNS ), userId, eventTypes ); }
[ "public List<SubscriptionEventType> getNamespaceSubscriptions(String baseNS, String userId)\n\t\t\tthrows RepositoryException {\n\t\tList<SubscriptionEventType> eventTypes = new ArrayList<>();\n\t\t\n\t\tif ((userId != null) && !userId.equals( UserPrincipal.ANONYMOUS_USER_ID )) {\n\t\t\tSubscriptionList subscriptio...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__PeriodicProcess__Group__10" $ANTLR start "rule__PeriodicProcess__Group__10__Impl" InternalDsl.g:16564:1: rule__PeriodicProcess__Group__10__Impl : ( ';' ) ;
public final void rule__PeriodicProcess__Group__10__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalDsl.g:16568:1: ( ( ';' ) ) // InternalDsl.g:16569:1: ( ';' ) { // InternalDsl.g:16569:1: ( ';' ) ...
[ "public final void rule__PeriodicProcess__Group__10() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:16557:1: ( rule__PeriodicProcess__Group__10__Impl )\n // InternalDsl.g:16558:2: rule__PeriodicProcess__Group__10__Im...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the number of times the character c appears immediately after the specified kgram.
public int getFrequency(String kgram, char c) { if (kgram.length() != order) { throw new IllegalArgumentException("length of kgram not the same as order"); } else if (! model.containsKey(kgram)) { return 0; } else { return model.get(kgram)[c]; } }
[ "public char nextCharacter(String kgram) {\n\t\t// See the problem set description for details\n\t\t// on how to make the random selection.\n\t\tif (kgram.length() != order) {\n\t\t\tthrow new IllegalArgumentException(\"length of kgram not the same as order\");\n\t\t} else if (! model.containsKey(kgram)) {\n\t\t\tr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests derivative of an equation that has positive numbers
@Test public void testDerivativePositive() { CalculatorModel test = new CalculatorModel(); assertEquals("+30x^9+28x^6+20x^3", test.calcDerivative(DERIVATIVE_POSITIVE)); }
[ "@Test\n public void testDerivativePositiveNegative()\n {\n\n CalculatorModel test = new CalculatorModel();\n\n assertEquals(\"+24x^11+15x^2+6x^-3+16x^-5\", test.calcDerivative(DERIVATIVE_POSITIVE_NEGATIVE));\n }", "@Test\n public void testDerivativeNegative()\n {\n CalculatorM...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__RolePermission__RolepAssignment_5" $ANTLR start "rule__RolePermission__Role_permissionAssignment_7" ../org.xtext.example.rmodp.ui/srcgen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:29438:1: rule__RolePermission__Role_permissionAssignment_7 : ( RULE_STRING ) ;
public final void rule__RolePermission__Role_permissionAssignment_7() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:29442:1: ( ( RULE_S...
[ "public final void rule__ObjectPermission__Object_permissionAssignment_7() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Starts the Factory by subscribing it to the EventBus.
public void startFactory() { if (!isStarted) { logger.info("Starting SessionListenerFactory."); APIEventBus.getInstance().subscribe(this); isStarted = true; } }
[ "public static synchronized void start() {\n if (factory != null) return;\n factory = new ChannelProviderFactoryImpl();\n ChannelProviderRegistryFactory.registerChannelProviderFactory(factory);\n }", "private void SetupBusInstance() {\n bus_ = new EventBus(this.getClass().getName() ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Metodo che setta l'idPreventivo.
public void setIdPreventivo(int idPreventivo) { this.idPreventivo = idPreventivo; }
[ "public int getIdPreventivo() {\n return idPreventivo;\n }", "public void setIdMotivo(int value) {\n this.idMotivo = value;\n }", "public void setIdacesso(int pIdacesso){\n this.idacesso = pIdacesso;\n }", "public void setIdComentario(int id) {\n this.id = id;\n }", "public...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method to put data from a stream at a stage location. The data will be uploaded as one file. No splitting is done in this method. Stream size must match the total size of data in the input stream unless compressData parameter is set to true. caller is responsible for passing the correct size for the data in the stream ...
@Deprecated public void uploadStream(String stageName, String destPrefix, InputStream inputStream, String destFileName, long streamSize) throws SQLException { uploadStreamInternal(stageName, destPre...
[ "private void uploadStreamInternal(String stageName,\n String destPrefix,\n InputStream inputStream,\n String destFileName,\n boolean compressData)\n throws SQLException\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates new form BilanComptable
public BilanComptable() { initComponents(); }
[ "Compleja createCompleja();", "public RegistrarCompra() {\n initComponents();\n tabelaFornecedor.setModel(modelFornecedor);\n\n }", "public Create_Table() {\n initComponents();\n this.setVisible(true);\n }", "public void createTableComplaintsData()\n\t\t{\n\t\t\ttry {\n\t\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieve the time for a specific song line
public double getTime(int line) throws FileNotFoundException{ this.parseLyrics(new Scanner(source)); return timeList.get(line-1); }
[ "java.lang.String getPlayTime();", "public String getLine(int line) throws FileNotFoundException{\r\n\t\tthis.parseLyrics(new Scanner(source));\r\n\t\tString lyricLine = \"\" + timeList.get(line-1) + \" seconds - \" + wordsList.get(line-1);\r\n\t\treturn lyricLine;\r\n\t}", "public Struct getTimeLine() {\n r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Verifies the number of messages received by a queue.
public void verifyNumberOfReceivedQueueMessages(String nameOfQueue, int numberOfMessages) { checkQueueByName(nameOfQueue); List list = getReceivedMessageListFromQueue(nameOfQueue); if(numberOfMessages != list.size()) { throw new VerifyFailedException("Expected " + numberO...
[ "public void verifyNumberOfCurrentQueueMessages(String nameOfQueue, int numberOfMessages)\n {\n checkQueueByName(nameOfQueue);\n List list = getCurrentMessageListFromQueue(nameOfQueue);\n if(numberOfMessages != list.size())\n {\n throw new VerifyFailedException(\"Expected \...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method to add consignor. This method throws exception if the consignor name already exists.
public void addConsignor(String name, String address) throws Exception { Contact consignor = getConsignorByName(name); if (null != consignor) { contactsList.remove(consignor); consignor = new Contact(); consignor.setName(name); consignor.setAddress(address); consignor.setConsignee(false); Random...
[ "public void setConsignorName(String arg)\n\t{\n\t\twConsignorName = arg;\n\t}", "public void addConcert() {\t\n\t\tif(checkAddConcert() == 1){\n\t\t\tconcert.setArtist(artistRepository.findOne(artistId));\n\t\t\trepository.add(this.concert);\n\t\t\tconcerts = repository.findAll();\n\t\t}else{\n\t\t\terrorConcert...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "entryRuleVariable" $ANTLR start "ruleVariable" ../org.xtext.example.browser/srcgen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:2248:1: ruleVariable returns [EObject current=null] : (otherlv_0= 'var' ( (lv_o_1_0= ruleWebPageObj ) ) ( (lv_name_2_0= RULE_ID ) ) ) ;
public final EObject ruleVariable() throws RecognitionException { EObject current = null; Token otherlv_0=null; Token lv_name_2_0=null; EObject lv_o_1_0 = null; enterRule(); try { // ../org.xtext.example.browser/src-gen/org/xtext/example/brow...
[ "public final EObject entryRuleVariable() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleVariable = null;\n\n\n try {\n // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:2240:2: (iv_ruleVariable= rule...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the broadcasted enemy archon ids.
static int[] getEnemyArchonIds() throws GameActionException { int[] ids = new int[MAX_ARCHONS]; for (int i = 1; i<= MAX_ARCHONS; i++){ ids[i-1] = rc.readBroadcast(ENEMY_ARCHON_ID_CHANNEL*3 + i); } return ids; }
[ "public List<ID> getEnemyIds() {\n\t\tList<ID> ret = new ArrayList<ID>();\n\t\tret.addAll(enemyIDs);\n\t\tCollections.sort(ret);\n\t\treturn ret;\n\t}", "private static Integer[] getEmoticonIds() {\n\t\treturn new Integer[] {\n\t\t\t\tR.drawable.emoticon_1,\n\t\t\t\tR.drawable.emoticon_2,\n\t\t\t\tR.drawable.emot...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Method that redraws the graph visualization when necessary recompute is used to determine when the vertices must be automatically repositioned even after user modification
protected void revisualize(boolean recompute) { //if the recompute flag is true, determine the default locations for //each of the vertices. If not, keep the user-defined locations if (recompute) { vertexLocations = new ArrayList<PositionedVertex>(); markedEdges....
[ "public void refresh() {\n \tgraphIsValid = false;\n \trepaint();\n }", "public void reDrawGraphs() {\n for (final Iterator i = this.iterator(); i.hasNext(); ) {\n final Vizualization vis = (Vizualization)i.next();\n vis.reDraw();\n }\n }", "public void redrawGUINow(){...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Convenience method for constructing a projection using the specified ellipsoid.
public Projection createProjection( final String name, final String classification, final Ellipsoid ellipsoid, final Point2D centre, final Point2D translation, final double scaleFactor ) { ParameterList param = createProjectionParamet...
[ "public Projection( final String name, final String classification, final Ellipsoid ellipsoid,\n final Point2D centre, final Point2D translation, final double scaleFactor ) {\n super( name );\n ensureNonNull( \"classification\", classification );\n this.classification = cla...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Initialize this new illegal position exception with given position and given worm.
public IllegalPositionException(Position position) { this.position = position; }
[ "public ExceptionMemory(int pos){\n\t\tthis.pos = pos;\n\t}", "InvalidPositionException(final String msg) {\n super(msg);\n }", "public Workshop(PositionVector position) throws IllegalArgumentException {\r\n\t\tsuper(position);\r\n\t}", "public IllegalPositionXException(double positionX) {\n\t\tthis.posit...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return the minimum daily production of each month for the farm and year specified.
public int[] getMinDaysForFarm(String farmID, int year) { Farm farm = factory.getFarm(farmID); int[] minDays = farm.getMinDays(year); for (int i = 0; i < 12; i++) if (minDays[i] == Integer.MAX_VALUE) minDays[i] = 0; return minDays; }
[ "public int getMonthlyMinForFarm(String farmID, int year) {\r\n double[] monthlySumForFarm = intToDouble(getMonthlySumForFarm(farmID, year));\r\n return (int) getArrayMinValue(monthlySumForFarm);\r\n }", "public double getMonthlyMin(int year) {\r\n double[] monthlyReport = getMonthlySumVec(year);\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Compute the probability density function (PDF) of a vector of observations x, given the means, and the covariance of the variables, given that the observations follow a multivariate normal distribution
public static double normalPdf(double[] x, double[] means, double[][] covariance) throws Exception { if (x.length != means.length) { throw new Exception("Length of observations must match means"); } return normalPdf(MatrixUtils.subtract(x, means), covariance); }
[ "public static double pdf(double x, double mu, double sigma) {\n return pdf((x - mu) / sigma) / sigma;\n }", "double gaussianPdf(double x, double mu, double sigma) {\n \t return pdf((x - mu) / sigma) / sigma;\n \t }", "public static double normalPdf(double[] deviationsFromMean,\r\n\t\t\tdoubl...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Use BtcXpubReq.newBuilder() to construct.
private BtcXpubReq(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); }
[ "private BtcXpubRes(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public Builder setXpub(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n xpub_ = value;\n onChanged();\n return...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of receiveBroadcast method, of class WorkspaceImpl.
@Test public void testReceiveBroadcast() { MockBroadcastQueueImpl broadcastQueue = new MockBroadcastQueueImpl(); broadcastQueue.setModuleName(ModuleName.BroadcastQueue); workspace.addSubModule(broadcastQueue); content.addDefaultNode(node2); Coalition c = new CoalitionImpl(content, null); workspace...
[ "@Test\n void sendBroadcast() {\n }", "public void testBroadcast(){\r\n\t\t\r\n\t\tString payloadXml = getPayloadForFile(\"SampleRegistration_1.xml\");\r\n //build metadata with operation name and the external Id and pass it to the broadcast method.\r\n Metadata mData = new Metadata(OperationN...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
An interface for objects that scan a sequence of elements for occurrences of a subpattern.
public interface SequenceSearcher<E> { /** * Finds the first occurrence of a pattern in a sequence. * * @param sequence The sequence to scan. * @param pattern The pattern to find. * @return The index of the first element of the pattern in the first occurrence of the pattern in the sequence, or a ne...
[ "public abstract Iterator getSubPatterns();", "public InSequenceFilter(@NotNull final ElementPattern<? extends PsiElement>... patterns) {\n myPatterns = patterns;\n }", "public interface PatternRecognizer {\n public boolean getData(Node n, Resource referenceList, String doi, NamespaceContext nsc);\n}", "...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Testing generateSignedGaussians(int n, double mean, double standardDeviation, int significantDigits, JsonObject userData, String ticketId)
@Test public void testPositiveGenerateSignedGaussians_3() { int i = 1; for (RandomOrgClient roc : rocs) { try { String ticketId = roc.createTickets(1, true)[0].get("ticketId").getAsString(); HashMap<String, Object> o = roc.generateSignedGaussians(10, 3.41d, 2.1d, 4, userData, ticketId); ...
[ "@Test\r\n\tpublic void testPositiveGenerateSignedGaussians_1() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tHashMap<String, Object> o = roc.generateSignedGaussians(10, 3.41d, 2.1d, 4);\r\n\t\t\t\t\r\n\t\t\t\tthis.signedValueTester(roc, i, o, double[].class);\r\n\t\t\t} catc...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates or finds a KnownSyslogDataSourceStreams from its string representation.
@JsonCreator public static KnownSyslogDataSourceStreams fromString(String name) { return fromString(name, KnownSyslogDataSourceStreams.class); }
[ "public static Collection<KnownSyslogDataSourceStreams> values() {\n return values(KnownSyslogDataSourceStreams.class);\n }", "private InputStream stringToInputStream (String string) {\n\n InputStream stream = null;\n try {\n stream = new ByteArrayInputStream(string.getBytes(\"U...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
To Perform Post Process Actions after Editing a Project Concept/Project Space. Added for Configurable Program Central This method is used to Perform Post Process Actions after Editing a Project Concept/Project Space
@com.matrixone.apps.framework.ui.PostProcessCallable public void performPostProcessActionsEdit(Context context, String[] args) throws Exception { try{ com.matrixone.apps.program.ProjectConcept projectConcept = (com.matrixone.apps.program.ProjectConcept) DomainObject...
[ "private void executePostActions(ScriptFile scriptFile){\n for(Map.Entry<String, List<IPreprocessor>> stringListEntry : preprocessorActionsPerFile.entrySet()) {\n for(IPreprocessor preprocessor : stringListEntry.getValue()) {\n preprocessor.executeActionOnFinish(scriptFile);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Plays the silence using the specified queueing mode and parameters.
public void playSilence(long duration, int queueMode, String[] params) { ArrayList<String> speakingParams = new ArrayList<String>(); if (params != null) { speakingParams = new ArrayList<String>(Arrays.asList(params)); } mSelf.playSilence(duration, que...
[ "private void speak(String text, int queueMode, ArrayList<String> params) {\n if (queueMode == 0) {\n stop();\n }\n mSpeechQueue.add(new SpeechItem(text, params, SpeechItem.TEXT));\n if (!mIsSpeaking) {\n processSpeechQueue();\n }\n }", "public v...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__CommunicationObject__Group__1__Impl" $ANTLR start "rule__CommunicationObject__Group__2" InternalCommunicationObject.g:1777:1: rule__CommunicationObject__Group__2 : rule__CommunicationObject__Group__2__Impl rule__CommunicationObject__Group__3 ;
public final void rule__CommunicationObject__Group__2() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalCommunicationObject.g:1781:1: ( rule__CommunicationObject__Group__2__Impl rule__CommunicationObject__Group__3 ) // InternalCommunic...
[ "public final void rule__CommunicationObject__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalCommunicationObject.g:1754:1: ( rule__CommunicationObject__Group__1__Impl rule__CommunicationObject__Group__2 )\n // In...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set products of ProductHeader (Note that the Objects in the List must be Strings)
public void setProducts(List products) throws IllegalArgumentException, SipParseException { UserAgent userAgent= (UserAgent) sipHeader; if ( products==null || products.isEmpty()) throw new IllegalArgumentException ("JAIN-SIP EXCEPTION: products is null"); e...
[ "public void setOrdersProductss(com.sybase.collections.GenericList<ru.terralink.mvideo.sap.Products> x)\n {\n __ordersProductss = x;\n }", "public void setProducts(List<Product> products) {\n this.products = products;\n }", "public void setOrderList(String products){\n\t\tStringBuilder st...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
repeated .rpc.LesenRPCResult reault = 5; repeated .rpc.LesenRPCResult reault = 5;
java.util.List<com.lesen.rpc.protobuf.LesenRPCProto.LesenRPCResult> getReaultList();
[ "com.lesen.rpc.protobuf.LesenRPCProto.LesenRPCResult getReault(int index);", "public void receiveResultadd3(\n loadbalance.LoadBalanceStub.Add3Response result\n ) {\n }", "public void receiveResultadd2(\n loadbalance.LoadBalanceStub.Add2Resp...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the SQL aggregation function to be used for a simple aggregation type. Note that all the compound aggregation types have already been broken down to a simple type for lower level aggregation within an organisation unit or higher level aggregation among organisation units.
private String aggregateFunctionFromType(AggregationType aggType) { return switch (aggType) { case AVERAGE -> "avg"; case MAX, MIN, COUNT, STDDEV, VARIANCE -> aggType.name().toLowerCase(); default -> "sum"; }; }
[ "private String getHighLevelAggregateFunction() {\n AggregationType subexAggType = subex.getAggregationType();\n\n AnalyticsAggregationType analyticsAggType = fromAggregationType(subexAggType);\n\n return aggregateFunctionFromType(analyticsAggType.getAggregationType());\n }", "public Type getAggregateFu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the number of todos where companyId = &63; and userId = &63; and status = any &63;.
public int countByC_U_S(long companyId, long userId, int[] statuses);
[ "public int countByC_U_S(long companyId, long userId, int status);", "public java.util.List<Todo> findByC_U_S(\n\t\tlong companyId, long userId, int status);", "public int countByTodoId(long todoId);", "public int countByC_NotS(long companyId, int status);", "public int countByC_S(long companyId, int status...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Schema in protocol buffer format. .google.cloud.datacatalog.v1.PhysicalSchema.ProtobufSchema protobuf = 3;
@java.lang.Override public com.google.cloud.datacatalog.v1.PhysicalSchema.ProtobufSchemaOrBuilder getProtobufOrBuilder() { if ((schemaCase_ == 3) && (protobufBuilder_ != null)) { return protobufBuilder_.getMessageOrBuilder(); } else { if (schemaCase_ == 3) { return (com...
[ "@java.lang.Override\n public com.google.cloud.datacatalog.v1.PhysicalSchema.ProtobufSchemaOrBuilder\n getProtobufOrBuilder() {\n if (schemaCase_ == 3) {\n return (com.google.cloud.datacatalog.v1.PhysicalSchema.ProtobufSchema) schema_;\n }\n return com.google.cloud.datacatalog.v1.PhysicalSchema....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the lastNm value for this AgentRecord.
public void setLastNm(java.lang.String lastNm) { this.lastNm = lastNm; }
[ "public void setLastNm(String aLastNm)\n {\n lastNm = aLastNm;\n setItDirty(true);\n }", "public void setLastNmSndx(String aLastNmSndx)\n {\n lastNmSndx = aLastNmSndx;\n setItDirty(true);\n }", "public void setLastNm2(String aLastNm2)\n {\n lastNm2 = aLastNm2;\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
It should not be possible to create an instance of RepositoryFactory
private RepositoryFactory() { throw new AssertionError("No RepositoryFactory instances for you!"); }
[ "Repository createRepository();", "private RepositoryFactories() {\n }", "public static RepositoryFactoryTest getRepositoryFactory() {\n return new RepositoryFactoryTest();\n }", "TRepo createRepo();", "public ClientRepositoryFactory() {\n this(new ClientAdapterFactory());\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns an SQL parenthesized list of literal values.
private String literal(Array list) { StringBuffer buffer = new StringBuffer(); buffer.append("("); for (int i = 0; i < list.size(); i++) { if (i > 0) { buffer.append(","); } buffer.append(literal(list.get(i...
[ "public static java.util.Collection literals()\n {\n final java.util.Collection<String> literals = new java.util.ArrayList<String>(values().length);\n for (int i = 0; i < values().length; i++)\n {\n literals.add(values()[i].name());\n }\n return literals;\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
changes visable piece array on checkered board according to piecetxt array
public void drawPieces() { for (int a = 0; a < 8; a++) { for (int b = 0; b < 8; b++) { if (piecetxt[a][b].substring(1).equals("w")) { piece[a][b].setForeground(new Color(255, 250, 240)); } else if (piecetxt[a][b].substring(1).equals("b")) { piece[a][b].setForeground(Color.BLACK); } ...
[ "private void updateBoard() {\r\n\t\tfor (int row = 0; row < 8; row++) {\r\n\t\t\tfor (int col = 0; col < 8; col++) {\r\n\t\t\t\tif (model.pieceAt(row, col) != null && model.pieceAt(row, col).team() == \"RED\") {\r\n\t\t\t\t\tboard[row][col].setIcon(pieceIconR);\r\n\t\t\t\t} else if (model.pieceAt(row, col) != null...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns intersection of two SetInterfaces, returned as an ArraySet
@Override public SetInterface<T> intersection(SetInterface<T> rhs) { //Declare return SetInterface SetInterface<T> result = new ArraySet(); //If the item is in both sets, add it to the result //Iterate through the calling Set for (int i = 0; i < numItems; i++){ //...
[ "public ZYSet<ElementType> intersection(ZYSet<ElementType> otherSet){\n ZYSet<ElementType> result = new ZYArraySet<ElementType>();\n for(ElementType e :this){\n if(otherSet.contains(e)){\n result.add(e);\n }\n }\n return result;\n }", "public Set intersection(Set anotherSet);", "@Override\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
When generating bytecode of some suspend function, we replace the original descriptor with one that reflects how it should look on JVM. But when we looking for receiver parameter in resolved call, it still references the initial function, so we unwrap it here before comparision.
@Nullable public StackValue generateReceiver(@NotNull CallableDescriptor descriptor, @NotNull GenerationState state, boolean ignoreNoOuter) { if (CoroutineCodegenUtilKt.unwrapInitialDescriptorForSuspendFunction(getCallableDescriptorWithReceiver()) == descriptor) { return getReceiverExpression(st...
[ "@Converted(kind = Converted.Kind.MANUAL_COMPILATION,\n source = \"${LLVM_SRC}/llvm/lib/IR/Function.cpp\", line = 1109,\n FQN=\"llvm::Intrinsic::remangleIntrinsicFunction\", NM=\"_ZN4llvm9Intrinsic25remangleIntrinsicFunctionEPNS_8FunctionE\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClan...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Deletes the events that are organised by a deleted user.
private void deleteEventsWithUser(Person userToDelete) { ArrayList<Event> deletedEvents = new ArrayList<>(); for (Event event : versionedAddressBook.getEventList()) { if (event.getOrganiser().equals(userToDelete)) { deletedEvents.add(event); } event.de...
[ "public abstract CalendarEvent removeEvent(User user, String id);", "public void deleteEvents(String userName)\n throws DatabaseException {\n\n PreparedStatement stmt = null;\n try {\n String sql =\n \"delete from Events \" +\n \"where Desc...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructs a Definition object. The letters String should be a string containing all the letters which appear in the input_text as variables, given in the correct order. This is a simpler way of constructing a definition object. For example,
public Definition(String letters, String input_text, String lang) { for (int i=0;i<letters.length();i++) { String letter = letters.substring(i,i+1); int start_pos = input_text.indexOf("@"+letter+"@",0); while (start_pos > -1) { String n...
[ "public Definition(String input_text, String lang)\n {\n text = input_text;\n language = lang;\n }", "public Alphabet(String alphabetString, Map<Character, Character> substitutes, String isoLanguageName) {\n this.chars = alphabetString.toLowerCase().toCharArray();\n this.isoLanguageName ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method is to display the no energy message.
private void messageNoEnergy() { Object[] obj = {"Restart", "Quit Game"}; int response = JOptionPane.showOptionDialog(null, showNoEnergyMessage(), "Cave Adventure", JOptionPane.YES_OPTION, JOptionPane.PLAIN_MESSAGE, null, obj, obj[0]); responseChoice(response); }
[ "private String showNoEnergyMessage() {\n String message = \"_________________________________________________\"\n + \"\\n\"\n + \"\\n Do not have enough energy\"\n + \"\\n\"\n + \"\\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
no arg constructor that creates default triangle
public Triangle(){ }
[ "public Triangle() {\n this(0,0,0,0,0);\n }", "public Triangle() {\n\t\tsuper.addPoint(new java.awt.Point(0,1));\n\t\tsuper.addPoint(new java.awt.Point(1,0));\n\t\tsuper.addPoint(new java.awt.Point(2,1));\n\t}", "public Triangle() { \n super(\"Triangle: \");\n this.setP1(new Point());\n this.set...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }