query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
Determines if the dataStatus has been modified.
public boolean isDataStatusModified() { return dataStatus_is_modified; }
[ "public boolean isDataModified() {\r\n\t\tint stat = getPageDataStoresStatus();\r\n\r\n\t\tif (stat == DataStoreBuffer.STATUS_MODIFIED)\r\n\t\t\treturn true;\r\n\t\telse if (stat == DataStoreBuffer.STATUS_NEW_MODIFIED)\r\n\t\t\treturn true;\r\n\t\telse if (stat == DataStoreBuffer.STATUS_NEW)\r\n\t\t\treturn true;\r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get column of mysql type: unsigned bigint
public BigInteger getBigInteger(String column) { // return (java.math.BigInteger)getColumns().get(column); Object n = getColumns().get(column); if (n instanceof BigInteger) { return (BigInteger)n; } // 数据类型 id(19 number)在 Oracle Jdbc 下对应的是 BigDecimal, // 但是在 MySql 下对应的是 BigInteger,这会导致在 MySql 下生成的代码无法在 ...
[ "public java.lang.Long getColumnLong() {\n return columnLong;\n }", "public java.lang.Long getColumnLong() {\n\t throw new java.lang.UnsupportedOperationException(\"Get is not supported on tombstones\");\n\t }", "public java.lang.Long getColumnLong() {\n return columnLong;\n }", "public static...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Iterates over shop items and depending on currentResources, updates what you can or cannot purchase
public void updateShop(double currentResources) { for (ShopItem item : myItems) { if (item.getItemValue() <= currentResources) { item.setCanBuy(true); } } }
[ "public void updateAvailableAndSoldQuantities(Set<CartItem> items) {\n for (CartItem item : items) {\n Inventory inventoryByProduct = findInventoryByProduct(item.getProduct());\n if (inventoryByProduct != null) {\n inventoryByProduct.setQuantityAvailable(inventoryByProduc...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get all recurring schedule elements of groups of last started semester.
@Transactional(readOnly = true) public List<RecurringScheduleElementDTO> findAllRecurringScheduleElementsOfLastSemesterForUser(User user) { log.debug("Request to get all recurring schedule elements of last started semester for user: {} ", user.getLogin()); Map<LocalDate, List<ClassSchedule>> groupe...
[ "List<Schedule> findSchedulesToRun ();", "public List<Semester> listOfCurrentAndFutureSemesters();", "List<Schedule> findLastXSchedules (Integer resultsToReturn);", "List<WorkingSchedule> getAll();", "private void getPhSchedules() {\n List<PHSchedule> phSchedules = new ArrayList<>();\n\n List<...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks whether the 'field556' field has been set
public boolean hasField556() { return fieldSetFlags()[556]; }
[ "public boolean hasField553() {\n return fieldSetFlags()[553];\n }", "public boolean hasField543() {\n return fieldSetFlags()[543];\n }", "public boolean hasField558() {\n return fieldSetFlags()[558];\n }", "public boolean hasField545() {\n return fieldSetFlags()[545];\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
set the icon offset for Y
public IconicsDrawable iconOffsetYPx(int iconOffsetY) { this.mIconOffsetY = iconOffsetY; return this; }
[ "public int getYOffset();", "public int getYCenter() {\n return y + image.getIconHeight()/2;\n }", "private int getIconDisplayYLocation(int ySquare) {\n // TODO\n return ySquare * squareWidth + ((squareWidth - CIRCLE_WIDTH) / 2);\n }", "Integer getYOFFSET();", "protected Actionbar...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Opens the file in the Eclipse workspace in the default editor.
private void openFile(String fileName) { IEditorRegistry editorRegistry = PlatformUI.getWorkbench() .getEditorRegistry(); IEditorDescriptor editorDescriptor = editorRegistry .getDefaultEditor(fileName); String editorID; if (editorDescriptor == null) { if (editorRegistry.isSystemExternalEditorAvailabl...
[ "public void openFile() {\n\t\tJFileChooser choose = new JFileChooser();\n\t\t if(choose.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) {\n\t\t\t\ttry {\n\t\t\t\t\tFile selectedFile = choose.getSelectedFile();\n\t\t\t\t\tdir=choose.getCurrentDirectory().toString();\n\t\t\t\t\tScanner readFile = new Scanner(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Verifica que hay Torretas entre los dos valores de x pasados por parametro
private boolean hayTorretas(int x1,int x2){ boolean ret = false; int i = 0; while(!ret && i < torretas.size()){ Torreta aux = (Torreta) torretas.get(i); ret = aux.getX() > x1 && aux.getX() < x2; i++; } return ret; }
[ "@Test\n public void checkGetX() {\n assertEquals(true, p.getX() - 5 < .001);\n }", "public boolean testPropExc(int x,int y) {return x+y>1000;}", "private boolean verificaRotacaoSZesq(){\n if ((this.bloco.get(0).x == 20 && this.bloco.get(1).x == 20)) {\n return false;\n } else {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Construct an SetT from an AnyM that wraps a monad containing Sets
public static <A> SetTSeq<A> of(AnyMSeq<? extends Set<A>> monads){ return new SetTSeq<>(monads); }
[ "public static <A> SetTSeq<A> fromAnyM(AnyMSeq<A> anyM){\n\t return of(anyM.map(SetTSeq::asSet));\n }", "public static <A> SetTSeq<A> fromStream(AnyMSeq<Stream<A>> monads) {\n\t\treturn of(monads.map(s -> s.collect(Collectors.toSet())));\n\t}", "Set createSet();", "@SafeVarargs\n private static <T> Set...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the parsed data reference.
public ExprRootNode<DataRefNode> getDataRef() { return parentForeachNode.getDataRef(); }
[ "private Reference parseReference() {\r\n\t\tReference r;\r\n\t\tif(verbose)\r\n\t\t\tSystem.out.println(\"parseReference\");\r\n\t\t// BaseRef\r\n\t\tr = parseBaseRef();\r\n\t\tif(inRefTailStarterSet(currentToken.type)) {\r\n\t\t\treturn parseRefTail(r);\r\n\t\t} else {\r\n\t\t\treturn r;\r\n\t\t}\r\n\t}", "publ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests if book throws an IllegalDateExcpetion if startDate is in the past.
@Test(expected = IllegalDateException.class) public void testBookStartDateInPast() throws Exception { Calendar cal = Calendar.getInstance(); cal.add(Calendar.HOUR, -2); // start is current date - 2 Date invalidStartDate = cal.getTime(); bookingManagement.book(USER_ID, Arrays.asList(room1.getId()), invalidSta...
[ "@Test(expected = IllegalDateException.class)\n\tpublic void testBookStartDateAfterEndDate() throws Exception {\n\t\t// switched end and start\n\t\tbookingManagement.book(USER_ID, Arrays.asList(room1.getId()), validEndDate, validStartDate);\n\t}", "public static void verifyValidStartDate(Date startDate) {\n\t\tin...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds healthListener as a listener for all heroes.
public void addHealthListenerAllHeroes(HealthListener healthListener) { for (AbstractHero hero : heros) { hero.addHealthListener(healthListener); } }
[ "public void addDeathListenerAllHeroes(DeathListener deathListener) {\n for (AbstractHero hero : heros) {\n hero.addDeathListener(deathListener);\n }\n }", "public void addActionPointListenerAllHeroes(ActionPointListener actionPointListener) {\n for (AbstractHero hero : heros) {...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A ComponentAction identifies any kind of portlet component action by integer
public interface ComponentAction { public int getID(); }
[ "public String getAction(int actionNum) {\n // replace with your own code\n return \"\";\n }", "public void executeAction( String actionInfo );", "public void setActionId(java.lang.Integer value) {\n this.action_id = value;\n }", "com.whiuk.philip.mmorpg.shared.Messages.ClientMessage.Game...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the filter for attributes exported on nodes of the graph. The resulting attribute set does not affect point merging.
public void setNodeAttributeFilter( AttributeFilter filter ) { nodeAttributeFilter = filter; }
[ "public void setEdgeAttributeFilter( AttributeFilter filter )\n \t{\n \t\tedgeAttributeFilter = filter;\n \t}", "public void setPointAttributeFilter( AttributeFilter filter )\n \t{\n \t\tpointAttributeFilter = filter;\n \t}", "public void addFilterToAttributes(ViewerFilter filter);", "public void addFilterToI...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Frequency of the billing cycle (monthly for instance)
@ApiModelProperty(value = "Frequency of the billing cycle (monthly for instance)") public String getFrequency() { return frequency; }
[ "public BillingFrequency billingFrequency() {\n return this.innerProperties() == null ? null : this.innerProperties().billingFrequency();\n }", "double getFrequency();", "int getFrequency();", "java.lang.String getFrequency();", "public void incrementFrequency() {\n\t\tfrequency++;\n\t}", "publi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the variable value for bvRoleId.
public Number getbvRoleId() { return (Number)ensureVariableManager().getVariableValue("bvRoleId"); }
[ "long getRoleId();", "public String getpRoleId() {\n return pRoleId;\n }", "public Integer getRoleId() {\r\n return roleId;\r\n }", "public Integer getRoleId() {\n return roleId;\n }", "public void setbvRoleId(Number value) {\n ensureVariableManager().setVariableValue(\"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the current line position.
public int getLinePosition() { return linePosition; }
[ "private int getPos() {\n if (currentLine == null) {\n throw new IllegalStateException(\"Cannot return position - end of file reached\");\n }\n return currentLine.getPos() + 1; // we want to display positions from 1\n }", "public int getLinePos() {\n return linePos;\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method searches for the pattern into an array and return the index of the first char that matches. If no match is found 1 is returned array = abcadef zef pattern = def > 4
public int firstMatch(char[] array, char[] pattern){ for(int a = 0; a <= array.length-pattern.length; a++) { for (int p = 0; p < pattern.length; p++) { if (array[a+p] != pattern[p]) break; if (p == pattern.length-1) return a; } } return -1; }
[ "public int firstMatch(char[] arr, char[] pattern)\n {\n if (arr.length < pattern.length) return -1;\n\n for (int i = 0; i <= arr.length - pattern.length; i++)\n {\n for (int j = 0; j < pattern.length; j++)\n {\n if (arr[i + j] != pattern[j]) break;\n\n if (j == pattern.length - 1)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Finds elements in array, values of which are unique.
public Map findUniqueElements(int arr[]) { int length = arr.length; boolean unique = true; Map uniqueElements = new HashMap<Integer, Integer>(); for (int i = 0; i < length; i++) { unique = true; for (int j = 0; j < length; j++) { if ((arr[i] == a...
[ "public static int[] uniqueElements(int[] arr) {\n boolean[] duplicateMap = new boolean[arr.length];\n int duplicate = 0;\n int index=0;\n int[]result;\n\n for (int x = 0; x < arr.length; x++) {\n for (int j = 0; j < arr.length; j++) {\n if (x == j) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The profile's attribute name which represents a Boolean object containing the information on whether the profile allows for partial shipments or not.
public String getPartialShipPropertyName() { return mPartialShipPropertyName; }
[ "public boolean isProfileContainsShippingAddress() {\r\n return profileContainsShippingAddress;\r\n }", "public boolean isProfileContainsPaymentInfo() {\r\n return profileContainsPaymentInfo;\r\n }", "public String getProfileAttribute() {\r\r\n\t\treturn _profileAttribute;\r\r\n\t}", "public java.lang...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generate default TextInfo Resource Union for suitable customer list
private ResourceUnionVo generateTextInfoResourceForLeadCustomerList( C4CUserActionVo request, int displayIndex) { ResourceUnionVo infoUnion = new ResourceUnionVo(); ResourceUnion resourceUnion = new ResourceUnion(); infoUnion.setResourceUnion(resourceUnion); resourceUnion.setType(ResourceUnionConstants.TYPE_...
[ "private ResourceUnionVo generateDefaultTextInfoResourceForLead(\n\t\t\tC4CUserActionVo request, int successRate, int displayIndex) {\n\t\tResourceUnionVo infoUnion = new ResourceUnionVo();\n\t\tResourceUnion resourceUnion = new ResourceUnion();\n\t\tinfoUnion.setResourceUnion(resourceUnion);\n\t\tresourceUnion.set...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__PrimitiveProperties__Group_0__0__Impl" $ANTLR start "rule__PrimitiveProperties__Group_0__1" InternalJSchema.g:1946:1: rule__PrimitiveProperties__Group_0__1 : rule__PrimitiveProperties__Group_0__1__Impl ;
public final void rule__PrimitiveProperties__Group_0__1() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalJSchema.g:1950:1: ( rule__PrimitiveProperties__Group_0__1__Impl ) // InternalJSchema.g:1951:2: rule__PrimitiveProperties__Group_0...
[ "public final void rule__PrimitiveProperties__Group_1__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalJSchema.g:1977:1: ( rule__PrimitiveProperties__Group_1__0__Impl rule__PrimitiveProperties__Group_1__1 )\n // Internal...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Evaluates a resource given by URL.
public static Object eval(Object t, URL url) throws Exception { return IpmemsScriptEngines.eval(url); }
[ "public void load(String url);", "public String evaluate(String request) throws PEPException;", "protected abstract URL resolve(String resource) throws IOException;", "public void loadURL(String url);", "public boolean locate(String url);", "public void willRequestUrl(String url){\n\n }", "String eva...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Bind the Id values including EmbeddedId and multiple Id
public void addBindValues(SpiExpressionRequest request) { DefaultExpressionRequest r = (DefaultExpressionRequest) request; BeanDescriptor<?> descriptor = r.getBeanDescriptor(); IdBinder idBinder = descriptor.getIdBinder(); for (int i = 0; i < idList.size(); i++) { idBinder.addIdInBindValue(reque...
[ "public void updateIds()\n {\n this.id = Id.create();\n }", "public static Mapper<String> ids() {\r\n return attrs(\"id\");\r\n }", "interface WithId {\n /**\n * Specifies id.\n * @param id Resource ID\n * @return the next update stage\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Converts encoder clicks to inches.
public double toInches(int clicks) { return clicks / CLICKS_PER_INCH; }
[ "public static double toInches(int clicks){\n\t\treturn (clicks * 0.0552);\n\t}", "public double encoderInches(double encoderValue){\n\t\treturn encoderValue / 12.9;\n\t}", "public static final double clicksToInches(int clicks) {\n\t\treturn clicks * INCHES_DRIVEN_PER_CLICK;\n\t}", "public int toClicks(double...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The default implementation increments the corresponding property, AutoStopBackwardItemCount or AutoStopForwardItemCount, by the specified count.
@Override public void adjustItemCount(int direction, int count) throws JposException { if (direction == BeltConst.BELT_AIC_BACKWARD) AutoStopBackwardItemCount += count; else AutoStopForwardItemCount += count; }
[ "public void adjustItemCount(int direction, int count) throws JposException;", "@Override\n public void resetItemCount(int direction) throws JposException {\n if (direction == BeltConst.BELT_AIC_BACKWARD)\n AutoStopBackwardItemCount = 0;\n else\n AutoStopForwardItemCount = 0...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Determines if price is valid for an order.
boolean isValidPriceForOrder(Price premiumPrice);
[ "boolean isValidPriceForQuote(Price premiumPrice);", "private boolean checkPrice(Order otherOrder) {\n\t\tif (getDirection() == Direction.ASK && otherOrder.getDirection() == Direction.BID\n\t\t\t\t&& getPrice() <= otherOrder.getPrice()) {\n\t\t\treturn true;\n\t\t}\n\t\tif (getDirection() == Direction.BID && othe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Records event if it's recordable.
private void record0(Event evt, Object... params) { assert evt != null; if (ctx.recoveryMode()) return; if (!enterBusy()) return; try { int type = evt.type(); if (!isRecordable(type)) { LT.warn(log, "Trying to record eve...
[ "public boolean isRecordable(int type) {\n assert type > 0 : \"Invalid event type: \" + type;\n\n return type < len ? recordableEvts[type] : isUserRecordable0(type);\n }", "public void record(Event evt) {\n record0(evt);\n }", "private void recordEvent(MouseEvent event) {\r\n i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Calls the function publicViewStudents to make it easier for the user to pick an ID Then calls the remove function in FinalStudent to remove the student at the same index as the ID
@SuppressWarnings("Duplicates") private static void removeStudents() { if (FinalStudent.size() == 0) { System.out.println("\nYou don't have any students in your roster. Let's add some.\n"); ManageStudents.addStudents(); } StringPrompt stringPrompt = new StringPrompt(...
[ "private void deleteSelectedStudents() {\n // prevent calling refresh() for each record\n facade.removeObserver(this);\n\n for (var student : studentsPane.getSelected()) {\n try {\n facade.deleteStudent(student.getID());\n } catch (Exception ex) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the "ref" element
java.lang.String getRef();
[ "com.reprezen.rapidml.ReferenceElement getReferenceElement();", "public Ref getRef() {\n\t\treturn ref;\n\t}", "public String getRef() {\r\n return this.ref;\r\n }", "public String getReference(){\r\n\t\t\r\n\t\treturn McsElement.getElementByXpath(driver,REFERENCE_INPUT).getAttribute(\"value\");\r\n\t}...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Determine if current messaging role is that of requestor.
public static boolean isRequestor(Message message) { Boolean requestor = (Boolean)message.get(REQUESTOR_ROLE); return requestor != null && requestor.booleanValue(); }
[ "boolean hasMatchRoleRequest();", "public boolean isCallerInRole(String role) {\r\n if (roles == null) {\r\n return false;\r\n }\r\n return Arrays.asList(roles).contains(role);\r\n }", "public boolean isActor() {\r\n \t\treturn (actor != null);\r\n \t}", "public boolean isAc...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Prints out bookings for a given room
public void printBookings(int room){ Room r = rooms.get(room); r.printBookings(); }
[ "public void printRooms() {\n\t\tSystem.out.println(\"__________________________________ROOMS______________________________________\");\n\t\tSystem.out.println(\"-----------------------------------------------------------------------------\");\n\t\tSystem.out.println(\"-kitchen-------------------------ballRoom-----...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
int32 oneof_1252 = 1252;
public int getOneof1252() { if (hugeOneofCase_ == 1252) { return (java.lang.Integer) hugeOneof_; } return 0; }
[ "java.lang.String getField1252();", "public int getOneof1252() {\n if (hugeOneofCase_ == 1252) {\n return (java.lang.Integer) hugeOneof_;\n }\n return 0;\n }", "int getOneof1252();", "String getIntegerEncoding();", "public java.lang.CharSequence getVar252() {\n return v...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
state when highest index reached methods: state stack push,pop,drop,peek
final void state_push(int state) { try { stateptr++; statestk[stateptr]=state; } catch (ArrayIndexOutOfBoundsException e) { int oldsize = statestk.length; int newsize = oldsize * 2; int[] newstack = new int[newsize]; System.arraycopy(statestk,0,newstack,0,oldsize); statestk...
[ "@Override\n public void backtrack() {\n if (!stack.isEmpty()) {\n int index = (Integer) stack.pop();\n\n if (index > arr.length) {//popping the insert function unneeded push\n insert((Integer) stack.pop());\n stack.pop();\n }\n if ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method initializes the matrix representation by reading its values from the matrix file.
public void initializeValuesMatrix(){ matrixValues = new ArrayList<Double>(); matrixValuesPerRow = new ArrayList<ArrayList<Double>>(); File file; Scanner s; try{ file = new File(matrixFile); s = new Scanner(file); matrixValuesPerRow.add(new ArrayList<Double>()); while(s.hasNextLine()){ ArrayL...
[ "public Matrix(String fileName) throws Exception {\n loadMatrix(fileName); // Load the text file into the matrix object\n }", "private void createMatrix() {\n if (fileContents == null) {\n return;\n }\n String[] lines = fileContents.split(\"\\n\");\n String[] header = li...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__RootElementType__Group__0__Impl" $ANTLR start "rule__RootElementType__Group__1" ../org.xtext.example.mydsl.group.unchanged.ui/srcgen/org/xtext/example/mydsl/group/unchanged/ui/contentassist/antlr/internal/InternalMyDsl.g:235:1: rule__RootElementType__Group__1 : rule__RootElementType__Group__1__Impl ru...
public final void rule__RootElementType__Group__1() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.xtext.example.mydsl.group.unchanged.ui/src-gen/org/xtext/example/mydsl/group/unchanged/ui/contentassist/antlr/internal/InternalMyDsl.g:239:1: ( r...
[ "public final void rule__RootElementType__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.mydsl.extensions.ui/src-gen/org/xtext/example/mydsl/extensions/ui/contentassist/antlr/internal/InternalMyDsl.g:343:1: (...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creating the GraphRequest to fetch user details 1st Param AccessToken 2nd Param Callback (which will be invoked once the request is successful)
public void useLoginInformation(final AccessToken accessToken) { Bundle params = new Bundle(); params.putString("fields", "id,email,gender,cover,picture.type(large)"); GraphRequest request = GraphRequest.newMeRequest(accessToken, new GraphRequest.GraphJSONObjectCallback() { //OnCompl...
[ "void getUserDetailFromFB() {\n GraphRequest request = GraphRequest.newMeRequest(AccessToken.getCurrentAccessToken(),\n (object, response) -> {\n ParseUser user = ParseUser.getCurrentUser();\n try{\n // TODO store needed user data and route to main page for...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get Push NotificationNotification Status
public static boolean getPush_Noti_Notify_Status(Context context) { final SharedPreferences prefs = getMyPreferences(context); boolean value = prefs.getBoolean("Switch_Controller_Push_Noti_Notify", true); return value; }
[ "public static void getOppoPushStatus() {\n HeytapPushManager.getPushStatus();\n }", "public static void getOppoNotificationStatus() {\n cn.leancloud.oppo.LCMixPushManager.getOppoNotificationStatus();\n }", "public String getPushStatus() {\n return pushStatus;\n }", "public static void getOp...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the base URI.
@Override public void setBaseURI(String baseURI) { this.baseURI = baseURI; }
[ "void setBaseUri(String baseUri);", "public URI setBase(final URI uri) {\r\n\t\tif (uri != null && !uri.isAbsolute()) {\r\n\t\t\tthrow new RuntimeException(\"Base URI must be absolute \" + uri); //$NON-NLS-1$\r\n\t\t}\r\n\t\tURI temp = this.baseURL;\r\n\t\tthis.baseURL = uri;\r\n\t\treturn temp;\r\n\t}", "publi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__Data__Group__10" $ANTLR start "rule__Data__Group__10__Impl" InternalMyDsl.g:11114:1: rule__Data__Group__10__Impl : ( 'data' ) ;
public final void rule__Data__Group__10__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalMyDsl.g:11118:1: ( ( 'data' ) ) // InternalMyDsl.g:11119:1: ( 'data' ) { // InternalMyDsl.g:11119:1: ( 'data' ) ...
[ "public final void rule__Data__Group__10() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:11106:1: ( rule__Data__Group__10__Impl rule__Data__Group__11 )\n // InternalMyDsl.g:11107:2: rule__Data__Group__10__Impl rule...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Shows the form where administrators can create new toppings.
private void showCreateForm(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { request.getRequestDispatcher("/WEB-INF/administration/create_topping.jsp").forward(request, response); }
[ "void displayAddAdminAccountForm(int type);", "@RequestMapping(value = \"/create\", method = RequestMethod.GET, params = \"new\")\n public String showServiceForm() {\n return \"service/edit\";\n }", "@PreAuthorize(\"hasRole('ADMIN')\")\n @RequestMapping(value = \"/new\", method = RequestMethod.GET)\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets (as xml) the "issuingDate" element
org.apache.xmlbeans.XmlString xgetIssuingDate();
[ "org.apache.xmlbeans.XmlDate xgetDateIssued();", "java.lang.String getIssuingDate();", "org.apache.xmlbeans.XmlString xgetFoundingDate();", "org.apache.xmlbeans.XmlString xgetDateOfClaim();", "org.apache.xmlbeans.XmlString xgetArrivedondate();", "org.apache.xmlbeans.XmlString xgetExpirationDate();", "vo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the density at a specific bin
default double getDensity(int bin) { return getDensity()[bin]; }
[ "public double getCumulativeDensity(int bin) {\n\t\tdouble sum = (double)lessThanMin / (double)count;\n\t\tfor(int i=0; i<=bin; i++) {\n\t\t\tsum += getFreq(i);\n\t\t}\n\t\treturn sum;\n\t}", "public int getBin(double val) {\n\t\treturn (int)Math.floor( (val-minValue)/(maxValue-minValue)*(double)hist.length );\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Run the AbstractPatriciaTrie.TrieEntry lowerEntry(K) method test.
@Test public void testLowerEntry_2() throws Exception { PatriciaTrie fixture = new PatriciaTrie(); fixture.incrementSize(); fixture.modCount = 1; AbstractPatriciaTrie.TrieEntry<Object, Object> result = fixture.lowerEntry(null); // add additional test code here assertEquals(null, result); }
[ "@Test\n\tpublic void testLowerEntry_1()\n\t\tthrows Exception {\n\t\tPatriciaTrie fixture = new PatriciaTrie();\n\t\tfixture.incrementSize();\n\t\tfixture.modCount = 1;\n\n\t\tAbstractPatriciaTrie.TrieEntry<Object, Object> result = fixture.lowerEntry(null);\n\n\t\t// add additional test code here\n\t\tassertEquals...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This checks if this Chauffeur is available with this startDate and this durationInHours
public boolean isAvailable(java.util.Date startDate, int durationInHours) { if(this.listOfStartEndDates.isEmpty()) { datePointer = 0; return true; } if (startDate.before(listOfStartEndDates.get(0)[0])) { datePointer = 0; return (listOfStartEndDates.get(0)[0].getTime() - startDate.getTime()) / 3600000 ...
[ "public boolean checkRoomAvailabilty(String date,String startTime,String endTime ,String confID);", "public boolean checkIfAvailable(String day, String start, String end) {\n SimpleDateFormat parser = new SimpleDateFormat(\"hh:mm\");\n\n try {\n Date starttime = parser.parse(start);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add the image that says "Jeopardy!"
public void addImage() { ImageIcon image = new ImageIcon("jeopardy.png"); // Align the image in the center of its containing JLabel without any text. JLabel jeopardyImage = new JLabel("", image, JLabel.CENTER); // Arrange the image / JLabel on the HomePanel c.gridx = 0; c.gridy = 2; this.add(jeopar...
[ "public void Antietam() {\n image1 = new GreenfootImage(\"antietam.jpg\");\n setImage(image1);\n }", "private void imageInitiation() {\n ImageIcon doggyImage = new ImageIcon(\"./data/dog1.jpg\");\n JLabel dogImage = new JLabel(doggyImage);\n dogImage.setSize(700,500);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Metodo che setta il campo Descrizione
public void setDescrizione(String descrizione) { this.descrizione = descrizione; }
[ "public void setDescrizione(String descrizione) {\r\n\t\tthis.descrizione = descrizione;\r\n\t}", "public void setDescrizione(String descrizione) {\n this.descrizione = descrizione;\n }", "java.lang.String getDesc();", "public void setDescrizione(java.lang.String descrizione) {\r\n this.descr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Validates the nih grants.
void validateNihGrants(StudyProtocolDTO studyProtocolDTO, OrganizationDTO leadOrgDTO, List<StudyResourcingDTO> studyResourcingDTOs, StringBuilder errorMsg) { if (isGridSubmission) { // checks already made for UI and BATCH String spId = ISOUtil.isIiNull(studyProtocolDTO.getIdentifier()) ...
[ "private void validateGranularityPresent(DataApiRequestBuilder builder) {\n if (!builder.isGranularityInitialized()) {\n throw new UnsatisfiedApiRequestConstraintsException(\n INTERVALS.getResourceName(),\n Collections.singleton(GRANULARITY.getResourceName())\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__Parameter__Group_0__2" $ANTLR start "rule__Parameter__Group_0__2__Impl" ../ufscar.Compiladores2.ui/srcgen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:1295:1: rule__Parameter__Group_0__2__Impl : ( ( rule__Parameter__TypeAssignment_0_2 ) ) ;
public final void rule__Parameter__Group_0__2__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:1299:1: ( ( ( rule__Parameter__TypeAssignment_0...
[ "public final void rule__Parameter__Group_0__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:1288:1: ( rule__Parameter__Group_0__2__Im...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Information that input status has been changed for particular player
public void on_input_status_changed(com.sparkfighters.shard.network.bridge.net.InputStatusChanged base, com.sparkfighters.shared.physics.objects.Vector character_location) { // f_angle will be in range [pi; -pi] radians double f_angle = -Math.atan2(base.mouse_y - character_location.y, base.mouse_x - chara...
[ "com.polytech.spik.protocol.SpikMessages.StatusChanged getStatusChanged();", "private void updatePlayerStatus() {\n\n int MAX_PLAYERS =\n NoPlayerValues.getIndex(ChainReactionPreferences.getPlayerNoReference(getContext()));\n\n for (int i = 0; i < playerReferenceHolders.size(); i++) {\n if (i < ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/Step2: Validate Blog and Discussions section
public void validateBlogDiscussions(WebDriver driver) { String actBlog = driver.findElement(By.cssSelector("h2")).getText(); System.out.println(actBlog); Assert.assertEquals("Blog", actBlog); //Validate Discussions Section String actDiscussions = driver.findElement(By.cssSelector("#di...
[ "private void validateContent() {\r\n\r\n\t\tvalidateVisibility();\r\n\t\tvalidateOwn();\r\n\t\tvalidatePromotions();\r\n\r\n\t\tvalidateStart();\r\n\t\tvalidateContextualRelations();\r\n\t}", "@Test\n\tpublic void draft_invalid_body(){\n\t\tfill_in_post(\"title\", \"\", \"15260\");\n\t\t\n\t\tWebElement cont = d...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Spring Data JPA repository for the TipoEquipe entity.
@Repository public interface TipoEquipeRepository extends JpaRepository<TipoEquipe, Long> { /** * Get list of systems by organizations * * @param idOrganizacao * @return */ @Query("select t from TipoEquipe t join t.organizacoes o where o.id=:idOrganizacao") List<TipoEquipe> findAll...
[ "@Repository\npublic interface ItemPedidoRepository extends JpaRepository<ItemPedido, Long> {\n\n}", "public interface TipoTelaRepository extends JpaRepository<TipoTela,Long> {\n\n}", "@SuppressWarnings(\"unused\")\n@Repository\npublic interface TipoContagemRepository extends JpaRepository<TipoContagem, Long> {...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of getListAssociatedClient method, of class DecidePeriodServiceController.
@Test public void testGetListAssociatedClient() throws FileNotFoundException { System.out.println("getListAssociatedClient"); DecidePeriodServiceController instance = new DecidePeriodServiceController(); AssociationProviderRequestRecords rapr = AppGPSD.getInstance().getCompany().getAssociati...
[ "@Test\n public void testGetDescList() throws FileNotFoundException {\n System.out.println(\"getDescList\");\n int i = 0;\n DecidePeriodServiceController instance = new DecidePeriodServiceController();\n AssociationProviderRequestRecords aprr = AppGPSD.getInstance().getCompany().getAs...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Getter for property Amount.
public double getAmount() { return Amount; }
[ "public SimpleIntegerProperty getAmountProperty() {\n return amount;\n }", "@java.lang.Override\n public float getAmount() {\n return amount_;\n }", "public Number getAmount() {\n return (Number)getAttributeInternal(AMOUNT);\n }", "public Number getAmount() {\r\n return...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
<stores a particular state of colors in the graph as a vector of colors \fn Graph_chromosome(Graph_GA obj)
Graph_chromosome(int size, int colors) { chromosome_size = size; num_colors = colors; chromosome = new int[size]; }
[ "int[] getPossibleColors();", "public Chromosome[] getChromosomes()\n {\n return chromosomes;\n }", "public Color[] getColors();", "public int[] getColorIndexes()\n {\n return this.colorIndexes;\n }", "public int[] getExperimentColorIndices();", "@Override\n public Map<String,String> ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new Monster with the given name and the two given types.
public Monster(String name, String type1, String type2) { this(name, new String[] { type1, type2 }); }
[ "public Monster(String name, String type) {\r\n\t\tthis(name, new String[] { type });\r\n\t}", "private Monster(String name, String[] types) {\r\n\t\tthis.name = name;\r\n\t\tthis.types = types;\r\n\t\tthis.validateTypes();\r\n\t\tthis.moves = new Move[4];\r\n\t}", "private void addAndCreateMonster() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get a string code corresponding to a given state.
String getCode(int state);
[ "@Override\n\tpublic java.lang.String getStateCode() {\n\t\treturn _state.getStateCode();\n\t}", "public java.lang.String getStateCode() {\n return stateCode;\n }", "public String stateCode() {\n return state;\n }", "public String getStateCode() {\n return (String)getAttributeIntern...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub process the document! return a processing status!
@Override public ProcessingStatus onDocument(Document doc) { WorkflowMessage msg = new WorkflowMessage(); msg.setDoc(doc); // for now only default workflow supported (1 workflow per DocumentPipeline // service i guess?) msg.setWorkflow(workflowName); // TODO: the type message should be...
[ "public int numOfDocsProcessed(){return docNumber;}", "public manageDoc() {\r\r\r\n\r\r\r\n }", "@javax.annotation.Nullable\n @ApiModelProperty(value = \"The processing status of the document. `PROCESSING_COMPLETE`: The document was successfully processed. `DOCUMENT_ERROR`: The document could not be proc...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the value of the 'Path Ocl' attribute. If the meaning of the 'Path Ocl' attribute isn't clear, there really should be more of a description here...
String getPathOcl();
[ "public String getPath() { \n\t\treturn getPathElement().getValue();\n\t}", "public String getAssociatedPathophysiology() {\n\t\treturn this.associatedPathophysiology;\n\t}", "public String getPathLiteral() {\n return pathLiteral;\n }", "public String getPath()\n\t{\n\t\treturn f_pathField....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns first node after the comment node with working set name
private static Node getFirstExtensionNodeFromWorkingSet(Node extensionsNode, String workingSetName) { final String extensionTag = EXT_NAME; final String commentTag = "#comment"; Node child; NodeList nodes = extensionsNode.getChildNodes(); for (int i = 0; i < nodes.getLength(); i++) { child = nodes.item(i);...
[ "String getEndingNode();", "String getStartingNode();", "private String findComment(Tree t, IRNode result) {\r\n final String src = getSource(t);\r\n int lastParen = src.lastIndexOf(')');\r\n if (lastParen >= 0) {\r\n int endComment = src.lastIndexOf(\"*/\", lastParen);\r\n if (endComment >= ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method should wait for the data to reach a particular point during the upload process. This involves polling the status URL. The status URL returns an XML document showing the progress through the ingest process. Look in the XML for the step that we pass in and make sure that the status attribute matches the strin...
public void status_wait(UploadHandle h) throws Exception { StatusHandler sturl = (StatusHandler) h; String status = "NA"; Integer time_check = 0; while(time_check < sturl.timeout && !status.equals("SUCCESS")) { HttpResponse response = client.get(new URI(sturl.status_url)...
[ "public void checkPMDataForUpload() {\n /*\n TODO: 16/2/9\n TODO 1.Size of states should have a range. Ex. just query last week data for upload\n TODO 2.The largest size of a week data should be 7 * 24 * 3600, is it decent to upload at one time?\n TODO 3.Is is necessary for se...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
obtain a unit matrix
public static Matrix3D createUnitMatrix() { Matrix3D matrix = new Matrix3D(); matrix.matrix[0][0] = 1.0; matrix.matrix[0][1] = 1.0; matrix.matrix[0][2] = 1.0; matrix.matrix[0][3] = 1.0; matrix.matrix[1][0] = 1.0; matrix.matrix[1][1] = 1.0; matrix.matrix[1][2] = 1.0; matrix.matrix[1]...
[ "public static SquareMatrix unitMatrix(int size) throws Exception{\r\n\t\tdouble[][] ia = new double [size][size];\r\n\t\tfor (int t=0; t < size; t++) {\r\n\t\t\tia [t][t]=1;\r\n\t\t}\r\n\t\tSquareMatrix i = new SquareMatrix(ia);\r\n\t\treturn i;\r\n\t}", "public static RMatrix getUnitMatrix(int size) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generates the report, according to the requested parameters.
public void generate(ReportRequest _request) throws ReportException;
[ "public void GenerateReport() {\n \n \n }", "public static void generateReport() {\n PrintImpl printer = new PrintImpl(realtorLogImpl, propertyLogImpl);\n printer.generateReport(REQUESTS_FILE);\n }", "public GenerateReport() {\n initComponents();\n display...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
because granted info remain there so this will trigger an infnite loop pf notifications sendNotification(notificationDetail.user.name, "granted " + notificationDetail.provider.name + " information");
@Override public void addGrantedNotification(NotificationDetail notificationDetail) { }
[ "private void note(Notification n){\r\n\t\tusers.get(n.userID).addNotification(n);\r\n\t\tif (loggedInUsers.contains(n.userID))\r\n\t\t\tcomms.sendMessage(n);\r\n\t}", "private void updateNotification() {\n Notification notification = getNotification(activeProfileName);\n mNotificationManager = (Not...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new FL_Frequency RecordBuilder by copying an existing FL_Frequency instance
public static influent.idl.FL_Frequency.Builder newBuilder(influent.idl.FL_Frequency other) { return new influent.idl.FL_Frequency.Builder(other); }
[ "public static influent.idl.FL_Frequency.Builder newBuilder(influent.idl.FL_Frequency.Builder other) {\n return new influent.idl.FL_Frequency.Builder(other);\n }", "public static influent.idl.FL_Frequency.Builder newBuilder() {\n return new influent.idl.FL_Frequency.Builder();\n }", "private Frequency(c...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Convert list of flightTicketDtos to list of flightTickets
public static List<FlightTicket> flightTicketDtoToEntityList(List<FlightTicketDto> flightTicketDtoList) { List<FlightTicket> flightTicketList = new ArrayList<>(); for (FlightTicketDto flightTicketDto : flightTicketDtoList) { flightTicketList.add(FlightTicketConverter.flightTicketDtoToEntity(...
[ "public static List<FlightTicketDto> flightTicketEntityToDtoList(List<FlightTicket> flightTicketList) {\n List<FlightTicketDto> flightTicketDtoList = new ArrayList<>();\n for (FlightTicket flightTicket : flightTicketList) {\n flightTicketDtoList.add(FlightTicketConverter.flightTicketEntityT...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Construct an occupant for a known position & name.
public Occupant(Position position, String name, String description) { this.position = position; this.name = name; this.description = description; }
[ "Position createPosition();", "Coordinate createCoordinate();", "public Location()\n {\n x = 0;\n y = 0;\n name = \"\";\n }", "public AntCell(int x, int y, String name, int pheromone, String mission, int food) {\n super(x, y, name);\n this.pheromone = pheromone;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Compute the Basis Pair Penalty Coefficient for the Best Fit and the Curvature Penalties
public double basisPairConstraintCoefficient ( final int iBasisIndexI, final int iBasisIndexR) throws java.lang.Exception { return basisPairCurvaturePenalty (iBasisIndexI, iBasisIndexR) + basisPairLengthPenalty (iBasisIndexI, iBasisIndexR) + basisBestFitPenalty (iBasisIndexI, iBasisIndexR); }
[ "public double basisPairPenaltyConstraint (\n\t\tfinal int iBasisIndexR)\n\t\tthrows java.lang.Exception\n\t{\n\t\tif (null == _sbfr) return 0.;\n\n\t\tint iNumPoint = _sbfr.numPoint();\n\n\t\tif (0 == iNumPoint) return 0.;\n\n\t\tdouble dblBasisPairPenaltyConstraint = 0.;\n\n\t\tfor (int i = 0; i < iNumPoint; ++i)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the text indexer path name.
public void setTextIndexerPathName(String txtPath){ txtIndexerPath.setText(txtPath); }
[ "public void setName(String name){\n\t\tthis.name=name;\n\t\tinPath=rootPath+name+File.separator;\n\t\tbuildPaths();\n\t}", "public void setTextDataPathName(String txtPath){\n\t\ttxtDataPath.setText(txtPath);\n\t}", "public void setTextBox(Text text){\n\t\tthis.txtPath=text;\n\t}", "void setPathname(String pa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Performs a dynamic query on the database and returns an ordered range of the matching rows. Useful when paginating results. Returns a maximum of end start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to com.l...
@Override public <T> List<T> dynamicQuery( DynamicQuery dynamicQuery, int start, int end, OrderByComparator<T> orderByComparator) { return csclPollsChoicePersistence.findWithDynamicQuery( dynamicQuery, start, end, orderByComparator); }
[ "@Override\n\tpublic <T> java.util.List<T> dynamicQuery(\n\t\tcom.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,\n\t\tint end,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {\n\n\t\treturn _positionLocalService.dynamicQuery(\n\t\t\tdynamicQuery, start, end, orderBy...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
a more direct brute force homophone search using all combinations of n symbols on the given alphabet. returns sum of rarest odds for each distinct symbol if contig is true, then track max of contiguous sequences instead of simply the of repetitions
public static double[] homophoneSearch(int n, char[] alphabet, String cipher, boolean similarity, boolean print, boolean progress, boolean bestRepsOnly, boolean contig, Map<Character, Integer> countsMap, Map<Character, Double> best) { Map<Character, String> bestOut = new HashMap<Character, String>(); // compute all...
[ "public static List<Object[]> homophoneSearch(int n, String[] alphabet, String cipher, boolean contig) {\n\t\t// maps n-symbol combination to its corresponding ciphertext sequence \n\t\tMap<String, StringBuffer> sequences = new HashMap<String, StringBuffer>();\n\t\t// maps each symbol to each key in which it appear...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Assign description for column in runtime.
void setColumnDescription(String columnId, String description);
[ "void setColumnDescription(Table.Column column, String description);", "protected String getColumnDescription(int id) {\r\n\t\treturn null;\r\n\t}", "private static String getColumnDescription(AffCell cell) {\n StringBuilder sb = new StringBuilder();\n Iterator<AffCategory> itr = cell.getCategorie...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional string buseo_name = 5;
public Builder setBuseoNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000010; buseoName_ = value; onChanged(); return this; }
[ "java.lang.String getBuseoName1();", "java.lang.String getBuseoName();", "java.lang.String getBuseoName2();", "public Builder setBuseoName(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000010;\n buseoName_ = value;\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Grasshopper has eaten the current leaf and hopped left.
public void eatAndHopLeft() throws Exception { leaves[position] = EATEN; position -= 2; if (position < 0) { position = 0; return; } int cnt = position; while (cnt >= 0) { if (leaves[cnt] == EATEN) { cnt -= 1; ...
[ "boolean goalState() {\n\t\treturn (numbersLeft == 0);\n\t}", "public void leveledUp() {\n\t\tremainingPoints += Stats.STATS_PER_LEVEL;\n\t}", "public void renewLeafGoals() {\r\n\t\tif (JAM.getShowGoalList()) {\r\n\t\t\tSystem.out.println(\"JAM: renewing leaf goals.\");\r\n\t\t}\r\n\r\n\t\tIterator<Goal> iter =...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
serializes the cart contents.
public void saveCart() throws IOException { String fileName = userid + "cart.txt"; File file=new File(fileName); if(file.exists()) { FileOutputStream fos = new FileOutputStream(fileName); ObjectOutputStream oos = new ObjectOutputStream(fos); oos.writeObject(this.c...
[ "public ArrayList<Product> getCartContents() throws IOException, ClassNotFoundException {\n try {\n String fileName=userid+\"cart.txt\";\n File file=new File(fileName);\n if(file.exists()) {\n FileInputStream fis = new FileInputStream(fileName);//fileName);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
len(Q)enqueue to return the number of elements in the Q
public int lenQenq(){ return size; }
[ "public int size(){\n\n return q.length;\n }", "public abstract int computeQueueLength();", "public abstract int getQueueLength();", "int size() {\n return queue.size();\n }", "public int size(){\n return quad.size();\n }", "int getQueryItemsCount();", "public int size() {\n r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
GENLAST:event_systrayCheckBoxStateChanged Create a new map marker when a new tweet with Geolocation comes in.
@Override public void newTweet(double lat, double lon, String title) { GoogleMaps.setMarker(browser, lat, lon, title, "tweet"); }
[ "private void setupMapMarkers(Double Lat, Double Long, String StallName) {\n //mMap.clear();\n try {\n // Add a marker in Westy\n MarkerOptions opt = new MarkerOptions();\n /*LatLng l = new LatLng(-1.2640135, 36.8043942);\n opt.position(l).title(\"Pirates Movie Shop...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates new form MainJFrameView
public MainJFrameView() { initComponents(); initWindow(); //addKeyListener(this); setFocusable(true); setFocusTraversalKeysEnabled(false); }
[ "public ViewMain() {\n initComponents();\n this.setVisible(true);\n }", "protected MainFrame newFrame() {\n return new MainFrame(\"New Window\");\n }", "protected JFrame createMainFrame(){\n JFrame mainframe = new JFrame(\"Main\");\n mainframe.setMinimumSize(new Dimension(1000...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
create builder for ProductTypeChangeLabelAction instance
public static ProductTypeChangeLabelActionBuilder of(final ProductTypeChangeLabelAction template) { ProductTypeChangeLabelActionBuilder builder = new ProductTypeChangeLabelActionBuilder(); builder.attributeName = template.getAttributeName(); builder.label = template.getLabel(); return bu...
[ "public static ProductTypeChangeLabelActionBuilder of() {\n return new ProductTypeChangeLabelActionBuilder();\n }", "public ProductTypeChangeLabelAction build() {\n Objects.requireNonNull(attributeName, ProductTypeChangeLabelAction.class + \": attributeName is missing\");\n Objects.require...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
To get all assessment for each stage
public Cursor getallsessment(String stageid) { try { String sql="SELECT * FROM assessment where stageId='"+stageid+"'"; Cursor mCur=mDb.rawQuery(sql, null); if(mCur!=null) { mCur.moveToNext(); } return mCur; } catch(SQLException mSQLException) ...
[ "List<Assessment> getContextAssessments(String context, AssessmentsSort sort, Boolean publishedOnly);", "public ArrayList<Assessment> getAssessments();", "public List<Stage> getAllStage () {\n return new ArrayList<>(stageIdToStage.values());\n }", "public ArrayList<Stage> getAllStages() {\n r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
bool value_id_null = 1001;
public boolean getValueIdNull() { return valueIdNull_; }
[ "boolean getValueIdNull();", "boolean getValueNull();", "boolean getValueLanguageIdNull();", "boolean getValueCharacteristicIdNull();", "boolean getDefaultValueNull();", "boolean getOutputIntoOneIdNull();", "boolean getConditionIdNull();", "public boolean hasValue() { return false; }", "boolean getV...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
repeated .CEconItem_Tag tags = 26;
java.util.List<? extends SteammessagesEconSteamclient.CEconItem_TagOrBuilder> getTagsOrBuilderList();
[ "SteammessagesEconSteamclient.CEconItem_Tag getTags(int index);", "java.util.List<SteammessagesEconSteamclient.CEconItem_Tag> \n getTagsList();", "public int getTagCount();", "@Override\n public Iterable<Entry<String, Integer>> enumerateTags() {\n\treturn this.tags.entrySet();\n }", "int getTag...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the result of interpreting the object as an instance of 'JV Application'. This implementation returns null; returning a nonnull result will terminate the switch.
public T caseJVApplication(JVApplication object) { return null; }
[ "@DISPID(1) //= 0x1. The runtime will prefer the VTID if present\n @VTID(8)\n @ReturnValue(type=NativeType.Dispatch)\n com4j.Com4jObject getApplication();", "@VTID(15)\n @ReturnValue(type=NativeType.Dispatch)\n com4j.Com4jObject getApplication();", "public T caseapplication(application object) {\n\t\tretur...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Verifies that this runtime is not Android.
@Test public void notAndroid() { assertThat(new ModernJavaRuntime().isAndroid()).isFalse(); }
[ "static boolean isAndroid() {\n return System.getProperties().getProperty(\"java.runtime.name\").contains(\"Android\");\n }", "boolean hasAndroidversion();", "public boolean isAndroidInternal(){\n return false;\n }", "protected abstract boolean isAndroidAttribute();", "public boolean isImaAndr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create and return a file node with given name under parent directory.
public File createFileWithParent(String fileName, Directory parent) { File newFile = new File(fileName, parent); parent.components.add(newFile); return newFile; }
[ "public static File createFile(String parentPath, String fileName) {\n\t\tString currentDirectory = System.getProperty(\"user.dir\");\n\n\t\tStringBuffer sb = new StringBuffer(currentDirectory);\n\t\tsb.append(GetFileSeparator());\n\n\t\t// For some reason, replaceAll crashes... \\\n\t\tint i = 0;\n\t\tfor (i = 0; ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns reference date to use for question set availability lookup based on question set type.
public java.util.Date getQuestionSetLookupReferenceDate(typekey.QuestionSetType questionSetType) { return ((gw.api.domain.AnswerContainerAdapter)__getDelegateManager().getImplementation("gw.api.domain.AnswerContainerAdapter")).getQuestionSetLookupReferenceDate(questionSetType); }
[ "@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getReferenceDateInternal();", "public void getREFDT()//get reference date\n\t{\n\t\ttry\n\t\t{\n\t\t\tDate L_strTEMP=null;\n\t\t\tM_strSQLQRY = \"Select CMT_CCSVL,CMT_CHP01,CMT_CHP02 from CO_CDTRN where CMT_CGMTP='S\"+cl_dat.M_strCMPCD_pbst+\"' a...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Learning rate that will be used in training
double getLearningRate();
[ "public void setLearningRate(double rate);", "public double getLearningRate() {\r\n\t\treturn learningRate;\r\n\t}", "public LearningRate getLearningRate() {\n return this.learningRate;\n }", "double getLearningFactor();", "public void SetLearnRate (double alpha) { this.alpha = alpha; }", "publi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method setCodFundsCode is used to set codFundsCode.
public void setCodFundsCode(String codFundsCode) { this.codFundsCode = codFundsCode; }
[ "public void setFundCode(String fundCode) {\r\n this.fundCode = fundCode == null ? null : fundCode.trim();\r\n }", "public String getCodFundsCode() {\n return codFundsCode;\n }", "public void setSufficientFundsCode(SufficientFundsCode sufficientFundsCode) {\n this.sufficientFundsCode ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of getType method, of class BBDParameterMetaData.
@Test public void getType() { System.out.println("getType"); BBDParameterMetaData instance = new BBDParameterMetaData(1,"test",2); int expResult = 2; int result = instance.getType(); assertEquals(expResult, result); }
[ "ParameterType getType();", "public ParameterType getType();", "public ParamType getType();", "public String getParameterType() { return parameterType; }", "public void test_getType() {\n assertEquals(\"'type' value should be properly retrieved.\", type, instance.getType());\n }", "public String...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Instantiates a new authorization token invalid exception.
public AuthorizationTokenInvalidException(UUID token, URI uri) { super(buildExceptionMessage(token, uri)); }
[ "public InvalidCredentialsException() {\n }", "public LoginUnauthorizedException() {\r\n }", "public AuthenticationException() {\n }", "public void testFailedAuthWithInvalidToken() {\n start();\n\n assertNotNull(mListener.lastMessage);\n mChannel.receiveMessage(\"auth:{\\\"msg\\\":...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Create a new AtdfDevice uing the given Node. The Node must be the root element of an ATDF document. This is handled in the AtdfDoc class, so use methods in there to get an AtdfDevice object instead of calling this directly.
public AtdfDevice(Node atdfRootNode) throws SAXException { Node devicesNode = Utils.filterFirstChildNode(atdfRootNode, "devices", null, null); deviceNode_ = Utils.filterFirstChildNode(devicesNode, "device", null, null); name_ = Utils.getNodeAttribute(deviceNode_, "name", ""); if(nu...
[ "Device createDevice();", "private VmDevice readVmDevice(XmlNode node, Guid deviceId) {\n VmDevice vmDevice = new VmDevice();\n vmDevice.setId(new VmDeviceId(deviceId, vmBase.getId()));\n if (node.SelectSingleNode(OvfProperties.VMD_ADDRESS, _xmlNS) != null\n && !StringUtils.isE...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Searches for own player in playermap. Own player could be found by unique device id.
private PlayerSimulation getOwnPlayer(HashMap<Integer, PlayerSimulation> playerMap){ for (PlayerSimulation p : playerMap.values()){ if (p.deviceId.equals(ownPlayer.deviceId)){ return p; } } throw new RuntimeException("own player could not found in playerMap"); }
[ "CachedPlayer getPlayer(UUID playerUUID, boolean queryMojangIfUnknown);", "protected void searchPlayer()\n\t{\n\n\t\tint boundryY = Environment.HEIGHT;\n\t\tint boundryX = Environment.WIDTH;\n\t\t\n\t\tint mY = monster.getyLocation();\n\t\tint mX = monster.getxLocation();\n\n\t\t// Checks for out of bounds except...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__UpdateAddition__RightAssignment_1_2" $ANTLR start "rule__UpdateMultiplication__RightAssignment_1_2" ../eu.quanticol.caspa.ui/srcgen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:10456:1: rule__UpdateMultiplication__RightAssignment_1_2 : ( ruleUpdateDivision ) ;
public final void rule__UpdateMultiplication__RightAssignment_1_2() throws RecognitionException { int stackSize = keepStackSize(); try { // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:10460:1: ( ( ruleUpdateDivision ) ) ...
[ "public final void rule__UpdateMultiplication__Group_1__2__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:7657:1: ( ( ( rule__UpdateMultipl...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
get bundle... check cache try up hierarchy if at top of hierarchy, use (link to) context.getParentBundle()
private static synchronized ProjectResourceBundle getBundle( Context context, String packageName ) throws MissingResourceException { String cacheKey = context.getCacheKey( packageName ); ProjectResourceBundle prb = ...
[ "Bundle getBundle();", "protected Bundle getBundle(long id)\n {\n synchronized (m_installedBundleLock_Priority2)\n {\n BundleImpl bundle = null;\n \n for (Iterator i = m_installedBundleMap.values().iterator(); i.hasNext(); )\n {\n bundle = (B...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional .SSIT.proto.SwarpMemberInfo swarpInfo = 1;
SSIT.proto.Unetmgr.SwarpMemberInfo getSwarpInfo();
[ "SSIT.proto.Unetmgr.SwarpMemberInfoOrBuilder getSwarpInfoOrBuilder();", "public SSIT.proto.Unetmgr.SwarpMemberInfoOrBuilder getSwarpInfoOrBuilder() {\n return swarpInfo_;\n }", "public SSIT.proto.Unetmgr.SwarpMemberInfoOrBuilder getSwarpInfoOrBuilder() {\n if (swarpInfoBuilder_ != null) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
repeated .cfwf.client_conn.common.UserInfo list = 3;
java.util.List<? extends com.cfwf.cb.business_proto.ClientConnCommon.UserInfoOrBuilder> getListOrBuilderList();
[ "com.cfwf.cb.business_proto.ClientConnCommon.UserInfo getList(int index);", "java.util.List<com.cfwf.cb.business_proto.ClientConnCommon.UserInfo> \n getListList();", "com.cfwf.cb.business_proto.ClientConnCommon.UserInfo getUserInfo();", "com.cfwf.cb.business_proto.ClientConnCommon.UserInfoOrBuilder get...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the values in the MapVS as a ListVS
public ListVS<V> getValues() { ListVS<V> result = new ListVS<V>(getUniverse()); for (V value : this.entries.values()) { result = result.add(value); } return result; }
[ "public Collection<Collection<V>> values() {\n return map.values();\n }", "public ArrayList<V> values() {\n\t\t// TODO\n\t\tArrayList<V> toRetVal = new ArrayList<V>();\n\t\tIterator<Entry> itr = this.entrySet.iterator();\n\t\t\n\t\twhile(itr.hasNext()){\n\t\t\tEntry Value = itr.next();\n\t\t\ttoRetVal.add(Val...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns whether this level is in progress, i.e. whether moves can be made on the board.
public boolean isInProgress() { return inProgress; }
[ "public boolean isProgress()\n {\n return ((getProgress() != SUCCESS_STATE_PROGRESS && getProgress() != ERROR_STATE_PROGRESS && getProgress() != IDLE_STATE_PROGRESS && getProgress() != CANCEL_STATE_PROGRESS));\n }", "public boolean isInProgress()\r\n\t{\r\n\t\treturn this.inProgress;\r\n\t}", "publ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the optional pay leg of the product. These periodic payments are not made for typical cap/floor products. Instead the premium is paid upfront.
public Optional<SwapLeg> getPayLeg() { return Optional.ofNullable(payLeg); }
[ "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getProductWithdrawalPremiumBasis();", "public Period getFixedLegPeriod() {\n return _index.getFixedLegPaymentTenor().getPeriod();\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getProdsCompldOpsPremiumBasis();...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns an array of the generic type V values that this map contains at the current moment
V[] values();
[ "protected abstract Object[] getValues(T t);", "public Collection<Collection<V>> values() {\n return map.values();\n }", "com.sun.java.xml.ns.j2Ee.VariableMappingType[] getVariableMappingArray();", "@Override\n public Type[] getTypes()\n {\n return valueDomain_.getTypes();\n }", "public ArrayL...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }