query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
Answer to the first receiveObjectsAnswer mocked call, expecting a footprint geometry.
@SuppressWarnings("unchecked") private Void receiveObjectsAnswerFootprint() { List<Geometry> adds = (List<Geometry>)EasyMock.getCurrentArguments()[1]; List<Geometry> removes = (List<Geometry>)EasyMock.getCurrentArguments()[2]; assertTrue(removes.isEmpty()); assertEquals(1...
[ "@SuppressWarnings(\"unchecked\")\r\n private Void receiveObjectsAnswerVehicle()\r\n {\r\n List<Geometry> adds = (List<Geometry>)EasyMock.getCurrentArguments()[1];\r\n List<Geometry> removes = (List<Geometry>)EasyMock.getCurrentArguments()[2];\r\n\r\n assertTrue(removes.isEmpty());\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
convert a playerClass String (fake ENUM) into the actual class ID for that class
public static String getClass(String playerClass) { return playerClassStringMap.get(playerClass); }
[ "@SuppressWarnings(\"rawtypes\")\r\n\tpublic static Class getPlayerClass(String playerClass) {\r\n\t\treturn playerClassMap.get(playerClass);\r\n\t}", "public static String getColor(String playerClass) {\r\n\t\treturn playerColorMap.get(playerClass);\r\n\t}", "public String getPlayerClass() {\n return pl...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
factory method for an instance of CustomLineItemStateTransitionMessageBuilder
public static CustomLineItemStateTransitionMessageBuilder of() { return new CustomLineItemStateTransitionMessageBuilder(); }
[ "public static CustomLineItemStateTransitionMessageBuilder of(final CustomLineItemStateTransitionMessage template) {\n CustomLineItemStateTransitionMessageBuilder builder = new CustomLineItemStateTransitionMessageBuilder();\n builder.id = template.getId();\n builder.version = template.getVersio...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The menu for our music library. It has several options. This menu is recursive: once we carry out an option, the menu is prompted again. This is my favorite method.
public void promptMenu() { Object[] options = {"Display by Albums-First", "Display by Artists-First", "Search by Album Title", "Search by Artist Name", "Add Album to Catalog"}; String action = (String) JOptionPane.showInputDialog(null, ...
[ "public static void choiceMenu(){\n System.out.print(\n \"0.Exit\\n1.Song \\n2.Album \\n3.Artist\\n>>>Enter Choice: \");\n }", "public void menu(){\n menuMusic.loop(pitch, volume);\n }", "public static void startMenu() {\n\t\tObject[] options = { \"Start\", \"Instructions\", \"Lea...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Disconnect vpn connections of virtual network gateway in the specified resource group.
public Observable<ServiceResponse<Void>> disconnectVirtualNetworkGatewayVpnConnectionsWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is requi...
[ "private void disconnectWithGroup(final UMTCallback callback){\n manager.removeGroup(channel, new WifiP2pManager.ActionListener() {\n @Override\n public void onSuccess() {\n callback.response(true,0);\n\n }\n\n @Override\n public void onFa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Delete an existing RegistrySubject.
public void test_delete_ok() throws GrouperException, InsufficientPrivilegeException { rSubjX.delete(s); assertTrue("deleted registry subject", true); }
[ "@Test\n public void deleteSubjectGroupTest() throws Exception {\n createSubjectGroupTest();\n \n IPSubject ip = new IPSubject();\n Map<Long, SubjectGroup> result = ip.getSubjectGroupInfoByName(\"network\");\n Long groupId = result.keySet().toArray(new Long[1])[0];\n ass...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Unsets the "resolutiondesc" element
void unsetResolutiondesc();
[ "void unsetDesc();", "void unsetDescription();", "void unsetResolutionstatus();", "public void unsetDesc()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_attribute(DESC$22);\r\n }\r\n }", "pub...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the ProdsCompldOpsPDDeductibleFactorOverride field.
public void setProdsCompldOpsPDDeductibleFactorOverride(java.math.BigDecimal value);
[ "public void setProdsCompldOpsBIPDDeductibleFactorOverride(java.math.BigDecimal value);", "public void setProdsCompldOpsBIDeductibleFactorOverride(java.math.BigDecimal value);", "public void setPremOpsPDDeductibleFactorOverride(java.math.BigDecimal value);", "public void setPremOpsBIPDDeductibleFactorOverride...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Read through CSV and input movie data into array of Movie objects. Also checks for any gaps in CSV and handles missing data
public MoviesDB(String fileName) throws FileNotFoundException { File file = new File(fileName); int sizeOfArray = numOfEntries(file); db = new Movie[sizeOfArray]; Movie movie; int DBIndex = 0; Scanner dataScanner = new Scanner(file); dataScanner.nextLine(); ...
[ "public void loadData() {\n String movieData = \"IMDB-Movie-Data.csv\"; //CHANGE\n try(Scanner csvReader = new Scanner(new File(movieData))){\n String row = csvReader.nextLine();\n while (csvReader.hasNext()) {\n row = csvReader.nextLine();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add a card and shuffle the deck
public void reAddCard(Card card) { deck.add(card); reshuffle(); }
[ "public void shuffle(){\n Collections.shuffle(this.deckOfCards);\n }", "private void addCardToDeck(Card card) {\n\t\tdeck.add(card);\n\t}", "private void shuffleDeck() {\n Collections.shuffle(deck);\n }", "private void createShuffleAndAddCards() {\n //Creating all 108 cards and savin...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
insert first name in field.
public void insertFirstName(final String firstName) { txtFieldFirstName.sendKeys(firstName); }
[ "public void addFirstName(String first) {\n getSettings().setFirstName(first);\n Log.d(TAG, \"Added a first name to the account: \" + first);\n }", "public void setFirstName(String newFirst)\n {\n\t \n }", "protected void setFirstName(String first)\n {\n firstName = first;\n }",...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns if the Window should close. True if it should be closed otherwise False.
public boolean shouldClose() { return glfwWindowShouldClose(windowHandle); }
[ "public boolean shouldClose() {\r\n\t\treturn glfwWindowShouldClose(windowId);\r\n\t}", "public boolean closeWindow() {\r\n if (!setAnimation(new Animation())) {\r\n return false;\r\n }\r\n\r\n saveProperties();\r\n System.exit(0);\r\n\r\n return true;\r\n }", "public static boolean isClose...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
get the total number of day by month and year
public static int getTotalDay(int month, int year) { int totalDay = 0; switch (month) { case 1: case 3: case 5: case 7: case 8: case 10: case 12: totalDay = 31; break; case 4: case 6: case 9: case 11: totalDay = 30; break; case 2: if (...
[ "public static int getTotalNumberOfDays(int year, int month) { \n int total=0;\n for(int q = 1800; q < year; q++){\n if(isLeapYear(q)){\n total = total + 366; //leap year\n }\n else{\n total = total + 365;//not leap year or regular year\n } \n }\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the date format pattern for the calendar cell dates tooltip.
public void setTooltipDatePattern(String pattern) { calendarTable.setTooltipDatePattern(pattern); }
[ "public void setDatePattern(String datePattern)\r\n\t{\r\n\t\tthis.datePattern = datePattern;\r\n\t}", "public String getTooltipDatePattern() {\r\n return calendarTable.getTooltipDatePattern();\r\n }", "public DateGraphFormat(String pattern){\n\t((SimpleDateFormat) dateFormat).applyPattern(pattern);\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method inserts the input elements into the node list according to the digit
public void insertToNodeLists(long[] input) { for (int i = 0; i < input.length; i++) { // calculate the index according to the digit at specified position unsigned int index = (unsigned int) getIndex(input[i]); // calls insert method of that nodelist myArray[index].insert(input[i]); } }
[ "void insertDigit(int digit);", "public void addInputNode(Node node) {\n\t\tinNodes.addElement(node);\n\t}", "public void add(int location, int digit)\n\t{\n\t\tthis.theLists[location].add(digit);\n\t}", "DigitNode(int digit, DigitNode next) {\n this.digit = digit;\n this.next = next;\n }", "pri...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test if the decryption of a byte array throws an exception if decrypted as a string.
@Test public void TestDecryptionToStringWithInvalidByteArray() { final byte[] testByteArray = new byte[256]; for (int i = 0; i < testByteArray.length; i++) testByteArray[i] = (byte) (0xff - i); try (final SplitKeyEncryption myEncryptor = new SplitKeyEncryption(COMPUTED_HMAC_KEY, SOURCE_B...
[ "@Test\n public void TestDecryptionToCharArrayWithInvalidByteArray() {\n final byte[] testByteArray = new byte[256];\n\n for (int i = 0; i < testByteArray.length; i++)\n testByteArray[i] = (byte) (0xff - i);\n\n try (final SplitKeyEncryption myEncryptor = new SplitKeyEncryption(COMPUTED_HMA...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return true if the outline of the given shape intersects with the given rectangle.
public static boolean intersectsOutline(Rectangle2D r, Shape s) { PathIterator i = s.getPathIterator(null, .01); double points[] = new double[6]; double lastX = 0, lastY = 0; double firstX = 0, firstY = 0; while (!i.isDone()) { int type = i.currentSegment(points); ...
[ "public abstract boolean intersects(Rectangle rect);", "public boolean isCloseToRect(Rectangle rect){\n\t\t//+5 off set\n\t\tShape pad = affine.createTransformedShape(new Rectangle2D.Double(x,y,width+5,height+5));\n\t\treturn pad.intersects(rect.x,rect.y,rect.width,rect.height);\n\t}", "public boolean intersect...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Provides polymorphism so that listAllReview(String message) can be called without a specified message.
public void listAllReview() throws ServletException, IOException { listAllReview(null); }
[ "public void listAllReview(String message) throws ServletException, IOException {\r\n\t\tList<Review> listReviews = reviewDAO.listAll();\r\n\t\t\r\n\t\trequest.setAttribute(\"listReviews\", listReviews);\r\n\t\t\r\n\t\tif (message != null) {\r\n\t\t\trequest.setAttribute(\"message\", message);\r\n\t\t}\r\n\t\t\r\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Admin can check the status of leave applied
public String checkstatusleave(AdminBean admin) { // TODO Auto-generated method stub int status = crud2.checkLeavestatus(admin.getAdminid()); int result = crud3.checkapplied(admin.getAdminid()); if (result == 1) { if (status == 1) return "Accepted"; else { if (status == 2) return "Rejected"; ...
[ "public int applyleave(LeaveBean leave) {\n\t\t// TODO Auto-generated method stub\n\t\tleave.setStatus(\"Pending\");\n\t\tOptional<AdminBean> list = crud2.findById(leave.getEmpid());\n\t\tcrud2.applyleave(leave.getEmpid());\n\t\tleave.setManagerid(list.get().getReportingTo());\n\t\tcrud3.save(leave);\n\t\treturn 0;...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Setter whether the change has been expected or not.
final void setExpected (boolean expected) { this.expected = expected; }
[ "@Test\n public void setChanged() {\n System.out.println(\"setChanged\");\n assertEquals(false, model.isChanged()); \n model.setChanged(true);\n assertEquals(true, model.isChanged()); \n }", "@Test\r\n\tpublic void testSetChanged() {\r\n\t\tbbtp.setChanged(true);\r\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Interface for handling bubblespecific logging.
public interface BubbleLogger extends UiEventLogger { /** * Bubble UI event. */ @VisibleForTesting enum Event implements UiEventLogger.UiEventEnum { @UiEvent(doc = "User dismissed the bubble via gesture, add bubble to overflow.") BUBBLE_OVERFLOW_ADD_USER_GESTURE(483), @U...
[ "public interface Logging {\n\t/**\n * Output a message to the Debug logging channel.\n * Messages written to this channel are of interest to developers, and to\n * anyone trying to debug a system problem. The channel would generally\n * only be turned on when a problem is being investigated.\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Function to retrieve values of the saved dice list
public int[] getDiceValues() { int[] diceValues = new int[savedDiceList.size()]; for (int i = 1; i < diceValues.length; i++){ diceValues[i] = savedDiceList.get(i).getValue(); } return diceValues; }
[ "private void getDiceValues() {\n\t\tdiceValues = new int [N_DICE];\n\t\t\n\t\tfor (int i = 0; i < N_DICE-2; i++) {\n\t\t\tdiceValues[i] = 6; //rgen.nextInt(MIN_DICE_VAL, MAX_DICE_VAL);\n\t\t}\n\t\tdiceValues[3]=5;\n\t\tdiceValues[4] = 5;\n\t}", "public int[] getDice() {\n return dice;\n }", "public D...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets array of all "scans" element
void setScansArray(com.bagnet.nettracer.ws.core.pojo.xsd.WSScanPoints[] scansArray);
[ "void setNilScansArray(int i);", "public void set(int[] ai);", "public void set( RpLidarScan scan ) {\n\t\tSystem.arraycopy(scan.quality,0,quality,0,N);\n\t\tSystem.arraycopy(scan.distance,0,distance,0,N);\n\t\tSystem.arraycopy(scan.time,0,time,0,N);\n\t\tSystem.arraycopy(scan.pos_asserv,0,pos_asserv,0,N);\n\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a protocol buffer Get based on a client Get.
public static ClientProtos.Get toGet( final Get get) throws IOException { ClientProtos.Get.Builder builder = ClientProtos.Get.newBuilder(); builder.setRow(ByteStringer.wrap(get.getRow())); builder.setCacheBlocks(get.getCacheBlocks()); builder.setMaxVersions(get.getMaxVersions()); if (get...
[ "Get createGet();", "public static Get toGet(final ClientProtos.Get proto) throws IOException {\n if (proto == null) return null;\n byte[] row = proto.getRow().toByteArray();\n Get get = new Get(row);\n if (proto.hasCacheBlocks()) {\n get.setCacheBlocks(proto.getCacheBlocks());\n }\n if (pr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
If file is in project and not in black list folder > create variable visitor and get variables
@Override public boolean processFile(@NotNull VirtualFile fileInProject) { if (fileInProject.isDirectory()) { Arrays.stream(fileInProject.getChildren()) .filter(child -> BLACK_LIST .stream() .none...
[ "private static String generateVariables() {\n\t/* get raw file contents of the file containing our variables */\n\tString[] variablesContents = resourceRead(javautoFile).split(\"\\n\");\n\n\t/* variable to store our generated class vars */\n\tString classVars = \"\";\n\n\t/* add each line that has a class varaible...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Computes an error according to a cross validation set of points and a given model. The given error is the sum of the squared distance between the ideal mass function the model should have returned, and the actual function. The used distance is the Jousselme distance. The "ideal" mass function is a function with all the...
public static <T> double error(List<? extends LabelledPoint<T>> crossValidation, SensorBeliefModel<T> model) { return crossValidation.stream().mapToDouble(point -> { MassFunction actualMassFunction = model.toMass(point.getValue()); MutableMass idealMass...
[ "public double computeError(double expected, double predicted);", "public void calcularError()\n\t{\n\t\t/* Ahora obtengo el error de calculo, al despejar las incognitas matricialmente tengo que:\n\t\t * \t A * X = Berr (al realizar el calculo obtengo el vector solucion mas o menos un error de redondeo)\n\t\t * \...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
display a dialog at the end of the game showing who won and other relevant game specific information.
@Override public void showWinnerDialog() { String message = getGameOverMessage(); JOptionPane.showMessageDialog( this, message, GameContext.getLabel("GAME_OVER"), JOptionPane.INFORMATION_MESSAGE ); }
[ "public void showDialog() {\n List<Player> players = s.doFinalScoring();\n String message = generateGameOverMessage(players);\n gameScreen.update(announcer.announce(Announcement.GAME_OVER_MESSAGE));\n int response = JOptionPane.showConfirmDialog(frame, message, \"Game Over :-(\",\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
this is the code to display the aray using the for loop it is the function out of the main
public static void display(int [] a) { for (int i = 0; i < a.length; i++) { System.out.print(a[i] + " "); }System.out.println(); }
[ "static public void display(){\n\t\tfor(int i=0;i<size;i++){\n\t\t\tSystem.out.print(array[i] + \" \");\n\t\t}\n\t\tSystem.out.println();\n\t}", "public void showAll() {\n for(int i = 0; i < next; i++)\n System.out.println(array[i].toString());\n }", "public void DisplayAll (){\n\t\n\t\t//p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column vendor.registered_person
public String getRegisteredPerson() { return registeredPerson; }
[ "public Long getRegisterPersonId() {\n return registerPersonId;\n }", "public String getRegisterPersonMobile() {\n return registerPersonMobile;\n }", "public String getRegisteredBy() {\n return registeredBy;\n }", "public String getUser_person_uuid() {\n return user_person...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
update slice y the new position when y bounding checkbox isn't selected.
public void updateBoxSliceYPos() { switch ( getLabel( Y, false ) ) { case X: boxSliceY.setSlices( -xBox + 2 * ( (float) slicePanel.xSlice / ( xDim - 1 ) ) * xBox, yBox, zBox, ViewJComponentBoxSlice.X_SLICE ); break; case Y: boxSlic...
[ "public void showBoxSliceY() {\r\n if ( slicePanel.yVisible == true ) {\r\n if ( yChanged == true ) {\r\n updateBoxSliceY();\r\n yChanged = false;\r\n } else {\r\n if ( !objBoxSliceY_BG.isLive() ) {\r\n triPlanarViewBG.addC...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Performs qualifier selectivity based on a phase.
private void performQualifierSelectivity (Predicate p, QualifierPhase phase) throws StandardException { if(p.compareWithKnownConstant(baseTable, true) && p.getRelop().getColumnOperand(baseTable) != null) // Range Qualifier addRangeQualifier(p,phase); else // Predicate Cannot Be Transform...
[ "public void setPhase(Phase phaseOfSelection) {\n this.phase = phaseOfSelection;\n }", "public static double computePhaseSelectivity(List<SelectivityHolder>[] selectivityHolder,QualifierPhase... phases) throws StandardException {\n double totalSelectivity = 1.0d;\n List<SelectivityHolder> holder...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns all the cscl appointee masters where isActive = &63;.
@Override public List<CsclAppointeeMaster> findByisActive(Boolean isActive) { return findByisActive( isActive, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
[ "@Override\n\tpublic List<CsclAppointeeMaster> findByisActive(\n\t\tBoolean isActive, int start, int end) {\n\n\t\treturn findByisActive(isActive, start, end, null);\n\t}", "public java.util.List<CsclAppointeeMaster> findByisActive(\n\t\tBoolean isActive, int start, int end,\n\t\tcom.liferay.portal.kernel.util.Or...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Format a file's timestamp as a string. On windows systems, does it similarly to how (one version of) the windows file explorer formats times. On other systems formats the way bash does, with dates in the current year showing the time, while farther dates (in a different year) shows the year.
private String fileDateStr(Date date) { if (!OsUtils.MAC_OS) { // Windows style formatting Locale here = Locale.getDefault(); DateFormat df = DateFormat.getDateInstance(DateFormat.SHORT, here); DateFormat tf = DateFormat.getTimeInstance(DateFormat.SHORT, here); ...
[ "protected String getTimestampFilenameFriendly() {\n Date date = new Date();\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyyMMdd-HHmmss\", Locale.GERMANY);\n return sdf.format(date);\n }", "public static String formattedDate(long timestamp) {\n Calendar cal = Calendar.getInstan...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__Architecture__RelationArchAssignment_3" $ANTLR start "rule__Component__NameAssignment_1" InternalMyDsl.g:13276:1: rule__Component__NameAssignment_1 : ( ruleComponentName ) ;
public final void rule__Component__NameAssignment_1() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalMyDsl.g:13280:1: ( ( ruleComponentName ) ) // InternalMyDsl.g:13281:2: ( ruleComponentName ) { // InternalMyD...
[ "public final void rule__ComponentDefinition__NameAssignment_1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalComponentDefinition.g:7807:1: ( ( RULE_ID ) )\n // InternalComponentDefinition.g:7808:2: ( RULE_ID )\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ translate all bands by dx, dy
protected void translate(int dx, int dy) { // // Coverage.cover(105, "translate(dx,dy)"); for (YXBand yb = bandList.next; yb != bandList; yb = yb.next) { yb.y += dy; // // Coverage.cover(106, "bands processed"); XSpan xHead = yb.children; for (XSpan xs = x...
[ "void translate(double dx, double dy) {\n graphGroup.setTranslateX(graphGroup.getTranslateX() + dx);\n graphGroup.setTranslateY(graphGroup.getTranslateY() + dy);\n }", "public void transform_0_by_1_4() {\n final double t = x_1 * x_0 + x_4 * y_0;\n y_0 = y_1 * x_0 + y_4 * y_0;\n x_0 = t;\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This is the interface for the Dao for our Catalog Description tool, it handles the database access functionality of the tool
public interface CatalogDescriptionDao { public void init(); /** * Return a catalog description based on the database id * * @param id - the database id of the catalog description * @return - the CatalogDescription */ public CatalogDescription getCatalogDescription(Long...
[ "public interface IDbInfoDao { \n\n\t/**\n\t *Returns the total count of objects\n\t */\n\tint GetCount() throws SQLException;\n\n\t/**\n\t *Finds a DbInfo instance by the primary key value\n\t */\n\tDbInfo Find(Long diId) throws SQLException;\n\n\t/**\n\t *Finds a DbInfo instance by the primary key value wi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
compute Compute the mass absorption coefficient for the specified xray in the specified material. Use this method preferentially over compute(comp,energy) whenever the XRayTransition is known. This implementation can use tabulated MACs whereas the energy specific implementation can not.
final public double compute(Composition comp, XRayTransition xrt) throws EPQException { double mac = 0.0; for (final Element el : comp.getElementSet()) mac += compute(el, xrt) * comp.weightFraction(el, false); return mac; }
[ "final public double compute(Composition comp, Element elm, double energy) {\n return compute(elm, energy) * comp.weightFraction(elm, false);\n }", "@Override\r\n double computeAccelerations() {\r\n double potentialEnergy;\r\n \r\n potentialEnergy = computeWallForces();\r\n assignMoleculesToCe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO: 1729 refresh token
private String refreshToken() { return null; }
[ "public void refreshToken()\n {\n try\n {\n SignInDTO signInDTO = authenticatorHandler.signIn(account.name, accountManager.getPassword(account), AccountGeneral.AUTHTOKEN_TYPE_FULL_ACCESS);\n if (signInDTO.getAccessToken() != null)\n {\n setTokenAuth(s...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test for the basic functions for Http2BlockingChannel, sendAndReceive
@Test @Ignore public void testSendAndReceive() throws Exception { EmbeddedChannelPool channelPool = new EmbeddedChannelPool(); InetSocketAddress address = new InetSocketAddress("localhost", 2021); Http2BlockingChannel blockingChannel = new Http2BlockingChannel(channelPool, address, createHttp2ClientConf...
[ "public void testHttp2Get() throws Exception {\n // Create one CountDownLatch that will be reset in the callback function\n final CountDownLatch latch = new CountDownLatch(1);\n // Create an HTTP 2.0 connection to the server\n final ClientConnection connection = client.borrowConnection((...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column Employee.emp_nickname
public void setEmpNickname(String empNickname) { this.empNickname = empNickname == null ? null : empNickname.trim(); }
[ "public String getEmpNickname() {\n return empNickname;\n }", "public void setNickname(String nickname) {\r\n this.nickname = nickname == null ? null : nickname.trim();\r\n }", "public void setNickname(String nickname_) {\n nickname = nickname_;\n }", "public void setNickname(Str...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column subscription_dtl.edate
public Date getEdate() { return edate; }
[ "public static org.jooq.Field<java.sql.Timestamp> ufnGetAccountingEndDate() {\n\t\torg.jooq.examples.sqlserver.adventureworks.dbo.routines.ufnGetAccountingEndDate f = new org.jooq.examples.sqlserver.adventureworks.dbo.routines.ufnGetAccountingEndDate();\n\n\t\treturn f.asField();\n\t}", "public java.sql.Date getL...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
After this method called, all events in list in this organizer day are sorted by value.
public void sortEventsByValue() { for (OrgEvent event : events) { event.setCompareByTime(false); } Collections.sort(events); }
[ "public void sortEvents() {\n\t\tCollections.sort(events);\n\t}", "public void sortByDate() {\n Set<Message> sortedSet = new TreeSet<>(Message.youngestToEldestComparator);\n for (Message i : values) {\n sortedSet.add(i);\n }\n actualValues = new ArrayList<>(sortedSet);\n fireTableDataChanged()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Interface containing methods used for updating graphs made with progress bars Author: Shivam Sood Date: 20200620
public interface GraphUpdater { // Constant used to for the delay between progress bar updates (x% every 30ms). int PROGRESS_CYCLE_TIME = 30; // Method to get percentage double getPercent(double percentOf, double total); // Method to update progress bar graph void updateGraph(ProgressBar grap...
[ "void updateGraph(ProgressBar graph, int percentage);", "public void updateProgressBar(double value);", "protected abstract void notifyProgress();", "public interface IProgressBar {\n\t\n\t/**\n\t * intialize progress bar.\n\t */\n\tpublic void intializeProgressBar(Context context);\n\t/**\n\t * show progress...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Layout item name generator.
@SuppressWarnings("UnusedParameters") protected String nameGenerator(int position) { return ""; }
[ "public String GenerateName(int[] item) {\n String temp = \"\";\n for (int i : item) {\n temp += String.valueOf(i);\n }\n return temp;\n }", "@Override\n public String generateLayoutName(String objectName){\n Scanner in = new Scanner(objectName);\n String...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the default System input stream. Normally this stream is set to System.in. This inputStream is used when no task input redirection is being performed.
public void setDefaultInputStream(InputStream defaultInputStream) { this.defaultInputStream = defaultInputStream; }
[ "protected final void setScriptStandardInput(Reader stdin) {\r\n\t\tthis.scriptExecutor.setStandardInput(stdin);\r\n\t}", "public static Source stdin() {\n return stream(System.in);\n }", "public void setStdin(CWLFieldValue stdin) {\n this.stdin = stdin;\n }", "public OutputStream setStdIn...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
AHJ & PSAP By Address. Accepts addresses as input and Returns contact details for Authorities Having Jurisdiction (AHJ) onbehalfof local Public Safety Answering Points (PSAP). Geo911 accepts an address and returns PSAP contact data plus contact data for an AHJ to communicate directly with a PSAP. Details include agency...
public AHJPlusPSAPResponse getAHJPlusPSAPByAddress(String address) throws ApiException { ApiResponse<AHJPlusPSAPResponse> resp = getAHJPlusPSAPByAddressWithHttpInfo(address); return resp.getData(); }
[ "private com.squareup.okhttp.Call getAHJPlusPSAPByAddressCall(String address, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {\n Object localVarPostBody = null;\n \n // verify the requi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the reserved7 field for the TextObjectBase record.
public void setReserved7(int field_8_reserved7) { this.field_8_reserved7 = field_8_reserved7; }
[ "public void setField7(java.lang.CharSequence value) {\n this.field7 = value;\n }", "public com.maxpoint.cascading.avro.TestExtraLarge.Builder setField7(java.lang.CharSequence value) {\n validate(fields()[7], value);\n this.field7 = value;\n fieldSetFlags()[7] = true;\n return this; \n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates the sign up request to be approved by the admin.
@RequestMapping(value="/signUpRequest", method=RequestMethod.GET) public String createSignUpRequest(HttpServletRequest request, Model model, @ModelAttribute("newUser")IRUser user) { Map<String, ?> flashMap = RequestContextUtils.getInputFlashMap(request); long userId = (Long) flashMap.get("userId"); IRUser currUs...
[ "public void requestAccountCreation(Secretary sec) {\n \n System.out.println(this.iD + \": Requesting account creation from secretary \" + sec.iD);\n sec.addToWaitingListForApproval(this);\n }", "public void signUpUser(RegistrationRequest request) {\n String requestEmail = request.g...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
.com.huan.netty.protobuf.CreateTaskPack createTaskPack = 3;
TaskProtobufWrapper.CreateTaskPack getCreateTaskPack();
[ "TaskProtobufWrapper.CreateTaskPackOrBuilder getCreateTaskPackOrBuilder();", "private CreateTaskPack(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "TaskProtobufWrapper.LoginPack getLoginPack();", "TaskProtobufWrapper.DeleteTaskPack getDeleteTaskPack();", "priva...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Getter for panelBindingType called 1 times. Type: DEFAULT. Build precedence: 2.
private com.google.gwt.user.client.ui.HTMLPanel get_panelBindingType() { return build_panelBindingType(); }
[ "public Integer getPanelType() {\n return panelType;\n }", "protected abstract String getScalarPanelType();", "public String getBindingType();", "public void setPanelType(Integer panelType) {\n this.panelType = panelType;\n }", "private JPanel getTypeButtonsPanel() {\n if (typeBut...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the field of movie by the value of discrimination.
@Transient @Deprecated public MovieField getDiscriminatorValue(){ final DiscriminatorValue val = this.getClass().getAnnotation( DiscriminatorValue.class ); return val == null ? null : EnumUtils.getEnumFromString(MovieField.class, val.value()); }
[ "public Object getField(String value) { return fields != null ? fields.get(value) : null; }", "String getFlavour(String property);", "public Film getFilm();", "public String getNominalValue(Feature f);", "public String getNominalValue(int f);", "private CvParam getSpectrumType(String value) {\n CvP...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Cast an IBinder object into an android.net.pppoe.IPppoeManager interface, generating a proxy if needed.
public static android.net.pppoe.IPppoeManager asInterface(android.os.IBinder obj) { if ((obj==null)) { return null; } android.os.IInterface iin = obj.queryLocalInterface(DESCRIPTOR); if (((iin!=null)&&(iin instanceof android.net.pppoe.IPppoeManager))) { return ((android.net.pppoe.IPppoeManager)iin); } return new androi...
[ "public static IBookManager asInterface(IBinder obj) {\n if ((obj == null)) {\n return null;\n }\n android.os.IInterface iin = obj.queryLocalInterface(DESCRIPTOR);\n if (((iin != null) && (iin instanceof IBookManager))) {\n return ((IBookManager) iin);\n }\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the state of a column for either ascending or descending sorting.
public void setState(int col, boolean asc) { state.clear(); state.put(new Integer(col), new Integer(asc ? UP : DOWN)); }
[ "public void setColumn(int column) {\r\n\r\n if (column == columnToSort) {\r\n if (SORT_ASCENDING == direction) {\r\n direction = SORT_DESCENDING;\r\n } else {\r\n direction = SORT_ASCENDING;\r\n }\r\n } else {\r\n columnToSort ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The constructor of Message class builds the list that will be written to the file. The list consists of the message and the signature.
public MessageSigningService(String data, String keyFile) throws Exception { list = new ArrayList<>(); list.add(data.getBytes()); list.add(sign(data, keyFile)); }
[ "public MessageList()\r\n\t{\r\n\t\tmessageList = new ArrayList<Message>(1);\r\n\t}", "@Override\n public String toString() {\n return \"MessageList{\" + \"messages=\" + messages + '}';\n }", "public List<String> messages(String filename) throws IOException;", "public FileList() {\r\n\t\tfile = n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates an instance of KeyVaultProperties class.
public KeyVaultProperties() { }
[ "Properties createProperties();", "public KeyVaultProperties keyVaultProperties() {\n return this.keyVaultProperties;\n }", "public FileServicePropertiesProperties() {\n }", "public Properties() {\n }", "public TestProperties() {\n\t\tthis.testProperties = new Properties();\n\t}", "public ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Merge messages as they enter the send queue and the message enters the accept queue. User needs to inherit this class when using it, and rewrites the combine() function.
public interface Combiner<L> { /** * Merge the messages in List<L> messages. * * @param messages, the list of received or sent messages. * @return List<L>, the merged message queue */ public List<L> combine(List<L> messages); }
[ "private static void sendMultipleMessagesUsingOneResource() {\n\t\tMessageHandlerImpl messageHandler = new MessageHandlerImpl(1);\n\t\tList<Message> unprocessedMessages = new ArrayList<Message>();\n\t\t//groups arriving interleaved\n\t\tMessageImpl m1 = new MessageImpl(4);\n\t\tMessageImpl m2 = new MessageImpl(1);\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Show file preview popup panel.
public static void showPreviewPopup(final String path,String fileId){ //Download dataset from corresponding dataset module if(path.contains("null")) { Window.alert("No results have been produced yet!"); return; } final PreviewPopupPanel previewPopup = new PreviewPopupPanel(path); datasetSrv.loadFile(...
[ "public void previewPopup() {\n\t\tif (waitForAndGetElement(ELEMENT_CKEDITOR_BUTTON_PREVIEW,5000,0)!=null) {\n\t\t\tclick(ELEMENT_CKEDITOR_BUTTON_PREVIEW);\n\t\t}\n\t}", "public void ShowFilepicker()\n {\n // 1. Initialize dialog\n final StorageChooser chooser = new StorageChooser.Builder()\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
backgroundSelectedColor (string) the selected background color of the view. focusable must be true for normal views. (Android) Platforms: android iphone ipad, Since: 0.8
public native String getBackgroundSelectedColor() /*-{ return this.@com.pmt.wrap.titanium.ui.WebView::handler.backgroundSelectedColor; }-*/;
[ "public native void setBackgroundSelectedColor(String backgroundSelectedColor) /*-{\n\t\tthis.@com.pmt.wrap.titanium.ui.WebView::handler.backgroundSelectedColor = backgroundSelectedColor;\n\t}-*/;", "public void setBackgroundSelectionColor(Color color);", "public Color getSelectionBackground()\n\t{\n\t\treturn ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a mapping new subtask index to all old subtask indexes.
public Map<Integer, Set<Integer>> getNewToOldSubtasksMapping(int oldParallelism, int newParallelism) { return IntStream.range(0, newParallelism).boxed(). collect(Collectors.toMap( Function.identity(), channelIndex -> getOldSubtasks(channelIndex, oldParallelism, newParallelism))); }
[ "public abstract Set<Integer> getOldSubtasks(int newSubtaskIndex, int oldNumberOfSubtasks, int newNumberOfSubtasks);", "IntegerToObjectHashMap<ConstantIdentityKey> getTempMappingSnapshot(int neededTempEntityIndex);", "private void mapIndexes() {\n\t\tfastRecordGetter = new HashMap<>();\n\t\tfor(int i = 0, len =...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
double representing class of Iris species Default constructor for representing Iris data point
public IrisData(String[] attributes) { this.sepialLength = Double.parseDouble(attributes[0]); this.sepialWidth = Double.parseDouble(attributes[1]); this.petalLength = Double.parseDouble(attributes[2]); this.petalWidth = Double.parseDouble(attributes[3]); if (attributes.length == ...
[ "Ion(double x,double y){\r\n\t\tthis.x=x;\r\n\t\tthis.y=y;\r\n\t}", "public UnivariateStatsData() {\n super();\n }", "public Double getDoubleAttribute();", "public NumericDataType() {\n }", "RealType createRealType();", "public DenseInstanceData() {\n this(0);\n }", "public Scalar(double val)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Determines if the given node is "scoped". In HTML 5, &lt;style> tags can be scoped which means that they only apply to the element in which they exist and that element's children.
private boolean isScoped(final Node node) { return node.hasAttr("scoped"); }
[ "@Override\n public boolean isScoped() {\n \treturn getScope() != null && !getScope().isEmpty();\n }", "protected boolean hasStyle(HtmlDocSerializerSession session) {\n\t\treturn true;\n\t}", "boolean isInheritableStyle(QName eltName, QName styleName);", "boolean isScope();", "@Converted(kind = Con...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generate a snowflake ID for workflow TaskRun
public static Long nextTaskRunId() { return IdGenerator.getInstance().nextId(); }
[ "long generateTaskID(){\n\t\treturn Const.TaskPk.incrementAndGet();\r\n\t}", "public String createTaskKey() {\n return String.valueOf(ID_WORKER_UTILS.nextId());\n }", "FlowId id();", "protected String generateInstanceID() {\n \t\tString orgID = \"opennaas.org\";\n \t\t// String localID = this.getCla...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Find the widest width of nonnull array in the first dimension of your input 2D array.
private int getWidestLength(int[][] input, int initialY) { int ret = -1; if ( input != null ) { for (int i = initialY; i < input.length; i++){ if (input[i] != null && input[i].length > ret ) { ret = input[i].length; } } } return ret; }
[ "public double getBestWidth() { return getBestWidth(-1); }", "public int getMinWidth();", "public int getWidthOfBoard() {\r\n return board[0].length;\r\n }", "public double getBestWidth(double aValue) { return Math.max(getMinWidth(aValue), getPrefWidth(aValue)); }", "int getBestMaxWidth(int colu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column zmap_r_patient.sub_hospital_code
public String getSubHospitalCode() { return subHospitalCode; }
[ "public void setSubHospitalCode(String subHospitalCode) {\r\n this.subHospitalCode = subHospitalCode == null ? null : subHospitalCode.trim();\r\n }", "public String getSubCode() {\n\t\treturn subCode;\n\t}", "public int getSubcode() {\n return this.subcode;\n }", "public String getSubDepar...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Use linear interpolation if needed to create extra values on the both sides of plot bands' boundaries to allow changing the color of sparkline's line within the plot bands
private void interpolateIfNeeded(TimeSeries data, SparklineValues.SparklineValue value, SparklineValues.SparklineValue nextValue, List<SparkLinePlotBand> plotBands) { if (nextValue != null && value.getValue() != null && nextValue.getValue() != null) { long x1 = value.getInstant().toEpochMilli(); ...
[ "private static float linearInterpolate(float start, float end, int steps, int step) {\n float p = (float) step / steps;\n return (float) truncate((end * p) + (start * (1 - p)), ColorMath.ColorSpace.HSB);\n }", "private static final double interpolateLinear( final double fst, final double snd, fi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Overlays all non0 chars from boards onto base
public static String overlay(String base, String... boards) { char[] chars = base.toCharArray(); for(int c = 0; c < chars.length; c++) for(int b = 0; b < boards.length; b++) { char ch = boards[b].charAt(c); if(ch != '0') chars[c] = ch; } re...
[ "public void print1T0255(){\n StringBuilder out = new StringBuilder();\n for (int i = 1; i <= 255; i++){\n out.append( i + \" \");\n }\n System.out.println( out.toString());\n }", "private String encodedBoard() {\r\n char[] result = new char[Square.SQUARE_LIST.size...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Appends and returns a new empty "observationDataLink" attribute
public org.apache.xmlbeans.XmlAnySimpleType addNewObservationDataLink() { synchronized (monitor()) { check_orphaned(); org.apache.xmlbeans.XmlAnySimpleType target = null; target = (org.apache.xmlbeans.XmlAnySimpleType)get_store().add_...
[ "public void setObservationDataLink(org.apache.xmlbeans.XmlAnySimpleType observationDataLink)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.XmlAnySimpleType target = null;\r\n target = (org.apache.xmlb...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sign digital signature on file. Based on Elliptic Curve Digital Signature Algorithm (ECDSA).
public static Point Sign_Signature(String filePath, PrivateKeyECC key, String pwd) throws IOException { Function f = new Function(); // Read file byte[] file = UtilECC.ReadFile(filePath); // SHA-1 byte[] hash = UtilECC.ToSHA1(file); // e = HASH(M) BigInteger e = ...
[ "BigInteger getDigitalSignature();", "public static void sign(){\n HashEx.main(filePath);\n // b. \"decrypt\" this hash value using the private key stored in privkey.rsa\n // (i.e., raise it to the Dth power mod N)\n // - Program should exit and displ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of get method, of class DefaultSchedulerPriority.
@Test public void testGet() { SchedulerPriority sp = new AlternativeSchedulerPriority(); Assert.assertNull(sp.get()); sp.add(new SimpleMessage(1)); Assert.assertNotNull(sp.get()); }
[ "@Test\r\n public void testGet_priority() {\r\n System.out.println(\"get_priority\");\r\n Orderr instance = null;\r\n int expResult = 0;\r\n int result = instance.get_priority();\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method that delete the duplicates terms : merges query terms that have equal terms
private void merge(Vector<TermQuery> terms) { for ( int i = 0; i < terms.size(); i++ ) { TermQuery term = terms.elementAt( i ); //Itterate through terms and if term is equal then merge: add the boost; and delete the term for ( int j = i + 1; j < terms.size(); j++ ) { TermQuery tmpTerm = terms.elem...
[ "private List<Term> reduce() {\n List<Term> simplifyTerms = new ArrayList<>();\n\n Set<Integer> removeTerms = new HashSet<Integer>();\n for (int i = 0; i < terms.size(); i ++){\n Term t1 = terms.get(i);\n if (!removeTerms.contains(i)) {\n for (int j = i+1; j...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Allow HTMLformatted text in the specified column(s)
@Override protected boolean isColumnHTML(int column) { return column == FieldTableEditorColumnInfo.OWNER.ordinal() || column == FieldTableEditorColumnInfo.PATH.ordinal(); }
[ "@Override\n protected boolean isColumnMultiLine(int column)\n {\n return true;\n }", "private static final String formatTextAsHtml(String text) {\n StringBuffer html = new StringBuffer();\n html.append(\"<tt>\");\n for (int idx = 0; idx < text....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removes the given option from the items list.
public void removeOption(final T aOption) { mAdapter.remove(aOption); }
[ "public void removeOption(Option option)\r\n\t{\r\n\t\toptions.remove(option.getName());\r\n\t}", "public void removeOption(int index){\n\t\tGOption option = optGroup.removeOption(index);\n\t\tif(option != null)\n\t\t\tremove(option);\n\t}", "public void removeOption(Option o) {\n\t\tif (o.isEnabled()) {\n\t\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the userState value for this ManageCallHuntingRequest.
public void setUserState(java.lang.String userState) { this.userState = userState; }
[ "public void setUserState(String userState) {\n this.userState = userState;\n }", "public void setUserState(Byte userState) {\r\n this.userState = userState;\r\n }", "public void setUserCalltype(java.lang.Integer userCalltype) {\r\n this.userCalltype = userCalltype;\r\n }", "publ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates an empty BusinessObjectException.
public BusinessObjectException() { super(); }
[ "public BusinessException() {\n super();\n }", "public BusinessObjectException(Exception e) {\r\n super( \"\" + e );\r\n }", "public BBDDException() { super(); }", "Exception createException();", "public JavaModelException newNotPresentException() {\n return new JavaModel...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Deletes the submitted cipherIv object from the SharedPref submitted under spAlias.
protected void deleteCipherAndIVFromSharedPref(String spAlias, String cipherIvAlias) { super.deleteFromSharedPref(spAlias, cipherIvAlias + CIPHER_PART); super.deleteFromSharedPref(spAlias, cipherIvAlias+ IV_PART); }
[ "void deleteSecret(Long userId, Long secretId);", "void delete(SecretIdentifier secretIdentifier);", "void removeEncryption(UUID templateId);", "public void deleteKeySecretPair(String key) throws ClassicDatabaseException,ClassicNotFoundException;", "protected CipherIV getCipherAndIVFromSharedPref(String spA...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
so in the above problem we solved it O(c) time complexity c is the size of the string and the O(1) space complexity we can reduce space usage by a factor of eight by using a bit vector
private static boolean isUniqueByBitvector(String input){ int length = input.length(); if(length>128) return false; int dataset = 0; // 11000000 // abcdefgha for(int i = 0;i<length;i++){ int val = input.charAt(i)-'a'; if((dataset & (1 << val))>0) return false; dataset |= (1<< va...
[ "private static int createBitVector(String str) {\n\t\tint bitVector = 0;\n\t\tfor(char c : str.toCharArray()) {\n\t\t\tint x = getCharNum(c);\n\t\t\tbitVector = toggle(bitVector, x);\n\t\t}\n\t\treturn bitVector;\n\t}", "public static String decodeBitsAdvanced(String bitsInput) {\n \t \n \t \n \t Str...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates the variables for the bow weapon tests.
@BeforeEach void setUp() { testBow = new Bow(BOW_NAME, WEIGHT, DAMAGE); WeaponTestNot = new Sword(BOW_NAME, WEIGHT, DAMAGE); weakBow = new Bow(BOW_NAME, WEIGHT, 1); WeaponTestNotName = new Bow("notEquals", WEIGHT, DAMAGE); differentWeightWeapon = new Bow(BOW_NAME, 1, DAMAGE);...
[ "@Before\n\tpublic void setup() {\n\t\ttestWeapon = WeaponFactory.MakeWeapon();\n\t\tstrengths = IntStream.rangeClosed(1, 10).toArray();\n\t\treaches = IntStream.rangeClosed(1, 10).toArray();\n\t\tspeeds = IntStream.rangeClosed(1, 10).toArray();\n\t}", "public void createVariables() {\n\t\tgenVar(signature, 0);\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the primary key of this instance image.
public void setPrimaryKey(long primaryKey) { _instanceImage.setPrimaryKey(primaryKey); }
[ "public void setPrimaryKey(long primaryKey) {\n _courseImage.setPrimaryKey(primaryKey);\n }", "public void setIdkey(String pIdkey){\n this.idkey = pIdkey;\n }", "public void setPrimaryKey(ObjectKey key)\r\n \r\n {\r\n setId(((NumberKey) key).intValue());\r\n }", "@Overr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Transforms a point by this matrix
public void transformPoint(Point3D point) { double oldPoint[] = {point.x, point.y, point.z, point.a}; double newPoint[] = new double[4]; for (int i = 0; i < 4; i++) { newPoint[i] = 0.0; } for (int i = 0; i < 4; i++) { for (int j = 0; j < 4; j++) { newPoint[i] += this.matrix[i][j...
[ "public SpPoint2d transform(Matrix m);", "static private void translatePoint(Matrix matrix, float[] xy)\n {\n matrix.mapPoints(xy);\n }", "public Point transformToUserSpace(Point point) {\n return (Point)transform.transform(point, null);\n }", "private static Point3d transformPoint(Ma...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Simple method that will return a resource property value given a resource property key. If the resource property key or resource bundle is missing then an empty string is returned. This will make resource handling null pointer exception safe.
public static String getFromResourceBundle(String resourcePropertyKey) { if(logger.isDebugEnabled()) { logger.debug("Executing NivcgResourceUtils.getResourceBundle()"); } ResourceBundle vcgConfig = null; try { vcgConfig = ResourceBundle.getBundle(DEFAULT_RESOURCE_BUNDLE); return(vcgConfig.getString...
[ "public static String getProperty(String key) {\n return RESOURCE_BUNDLE.getString(key);\n }", "private static String getString(String key)\n {\n return RESOURCE_BUNDLE.getString(key);\n }", "public String getResourceString(String key) {\r\n\t\tResourceBundle bundle = getResourceBundle();\r\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Elimina todos los elementos actuales de la lista
public void eliminarTodosLosElementos(){ listModel.removeAllElements(); }
[ "public void removeAllProducto()\r\n {\r\n _productoList.removeAllElements();\r\n }", "public void eliminarObjetos()\n {\n ArrayList<Item> vacio = new ArrayList<>();\n objetos = vacio;\n }", "public void eliminarTarefas() {\n lista.clearTarefas();\n }", "private void...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return the editpart's associated Notation View.
public View getNotationView() { Object model = getModel(); if (model instanceof View) return (View)model; return null; }
[ "IViewPart getPart();", "protected XGraphicalEditPart getOwner() {\n\t\treturn editpart;\n\t}", "protected View getViewToDelete(IGraphicalEditPart editPart) {\n\t\tIGraphicalEditPart editPartToDelete = editPart;\n\n\t\t// Modified by gmerin\n\t\t// A NodeEditPart might be composed by more than one EditPart (lik...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add the FOOTER of the page.
public void addFooter(Content contentTree);
[ "protected Widget addFooter() {\n return null;\n }", "public void yieldFooter(PageContext pageContext) throws IOException\n {\n yield(\"footer\", pageContext);\n }", "private void generateFooter() {\n if (this.generated && !this.footer.isGenerated()) {\n final Element footerElem...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a topic id. It tries to read an article id out of the config of a (presumable existent) WebContentDisplay, it then tries to resolve the article id to a topic id.
public String findTopicIdFromNextWCD(RenderRequest renderRequest) { Layout layout = (Layout) renderRequest.getAttribute(WebKeys.LAYOUT); if(layout == null){ throw new OntopiaRuntimeException("Configurator: Unable to find layout for this page!"); } String typesettings = layout.getTypeSettings(); /...
[ "public String getTopicIdFromUrlByArticleId(RenderRequest renderRequest) {\n // FIXME FIXME FIXME\n // see above. Not very reusable I reckon. Again using the URL\n // \"official\" URL (see above) and not the renderURL of this portlet.\n String queryString = (String)renderRequest.getAttribute(\"javax.ser...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method that checks whether the specified URL is in the list of non proxy hosts.
public static boolean isHostURLInNonProxyList(String urlString) { try { URL url = new URL(urlString); String host = url.getHost(); if (UtilsStringChar.isNullOrEmptyTrim(dontUseProxyAddresses) || host == null) { return false; } StringTokenizer tokenizer = new StringTokenizer(dontUsePr...
[ "private static boolean findUrlInNonProxyHosts(String url)\n\t{\n\t\tgetProxyProperties();\n\t\t\n\t\tif (nonProxyPattern != null) \n\t\t{\n\t\t\tMatcher nonProxyMatcher = nonProxyPattern.matcher(url);\n\t\t\t\n\t\t\treturn nonProxyMatcher.find(); \n\t\t}\t\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\t\n\t}", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Append the given character to end of SQL query string.
public final QueryContext append(final char chr) { _builder.append(chr); return this; }
[ "void appendChar(char value);", "public final void appendLast(char c) {\n\t\tif (this.tail == this.content[this.cIdx].length) {\n\t\t\tif (this.head == 0) {\n\t\t\t\tgrowAndCopy();\n\t\t\t} else {\n\t\t\t\tthis.tail = 0;\n\t\t\t}\n\t\t}\n\t\tthis.content[this.cIdx][this.tail++] = c;\n\t}", "public JSONBuilder r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the image of the switched off threshold led with the currently active ledcolor.
protected java.awt.image.BufferedImage getLedImageOff() { return this.ledImageOff; }
[ "protected java.awt.image.BufferedImage getLedImageOn()\n {\n return this.ledImageOn;\n }", "protected java.awt.image.BufferedImage getCurrentLedImage()\n {\n return this.currentLedImage;\n }", "public ColorDef getOffColor() {\n return offColor;\n }", "public Paint getColor...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
PPIs from yeast (S288c, not baker's yeast) are extracted into a file.
@Test public void loadYeastPPIs() throws Exception { extractPPIs(FIConfiguration.getConfiguration().get("IREFINDEX_YEAST_FILE"), FIConfiguration.getConfiguration().get("IREFINDEX_YEAST_PPI_FILE"), false); // Only 63 PPIs can be extracted from the following fil...
[ "@Test\n public void loadMousePPIs() throws Exception {\n extractPPIs(FIConfiguration.getConfiguration().get(\"IREFINDEX_MOUSE_FILE\"),\n FIConfiguration.getConfiguration().get(\"IREFINDEX_MOUSE_PPI_FILE\"),\n false);\n }", "private byte[] PPMfile() {\n St...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Relay intent to WeatherAlertNotificationService
@Override public void onReceive(Context context, Intent intent) { intent.setClass(context, WeatherAlertNotificationService.class); WeatherAlertNotificationService.enqueueWork(context, intent); }
[ "public void CallWhosIntentservice()\n {\n try {\n Intent msgIntent = new Intent(this, ZapWhosIntentService.class);\n startService(msgIntent);\n }catch (Exception e){e.printStackTrace();}\n\n }", "private void sendAlarmBroadcast() {\n }", "private PendingIntent getPe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A Binder is responsible for creating a binding between a form model's property and a control that may be used to visualize and/or edit that property.
public interface Binder { /** * Returns a binding between a form model's property and a control that will be * created by this Binder. * @param formModel the form model that this binding is for * @param formModel the property that this binding is for * @param context additional context tha...
[ "Binding bind(JComponent control, FormModel formModel, String formPropertyPath, Map context);", "Binding bind(FormModel formModel, String formPropertyPath, Map context);", "public Binding createBinding(String propertyPath, String binderId, Map context)\n {\n Assert.notNull(context, \"Context must not ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets actions by application type
public Action[] getActionsByApplicationType(String appType) throws WSDataUnavailableException, GWPortalException { return EventMenuActionManager.getActionsByApplicationType(appType); }
[ "Collection<ACTION> getAvailableActions();", "public ActionList getActions();", "public int[] getTypes() {\n\t\treturn actionTypes;\n\t}", "private Action getActionByType(DirectedAcyclicGraph<Action, DefaultEdge> workflowGraph, final String type) {\n List<Action> actionList = Lists.newArrayList(Collect...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Writes all auxiliary triples that have been buffered recently. This includes OWL property restrictions but it also includes any auxiliary triples required by complex values that were used in snaks.
public void writeAuxiliaryTriples() throws RDFHandlerException { for (PropertyRestriction pr : this.someValuesQueue) { writeSomeValueRestriction(pr.propertyUri, pr.rangeUri, pr.subject); } this.someValuesQueue.clear(); this.valueRdfConverter.writeAuxiliaryTriples(); }
[ "protected void writeTriplets(OutputStream os) throws IOException {\n if (hasTriplets()) {\n writeObjects(triplets, os);\n triplets = null; // gc\n }\n }", "private void calculatePolygons() {\n PointSortable[][] points = output_.bufferPoints();\n DemoColor[][]...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The answer to the remove geometries mocked call during the close test.
@SuppressWarnings("unchecked") private Void removeGeometriesAnswer() { List<Geometry> adds = (List<Geometry>)EasyMock.getCurrentArguments()[1]; List<Geometry> removes = (List<Geometry>)EasyMock.getCurrentArguments()[2]; assertTrue(adds.isEmpty()); // 121 assertE...
[ "@SuppressWarnings(\"unchecked\")\r\n private Void receiveObjectsAnswerImageryRemoves()\r\n {\r\n List<Geometry> adds = (List<Geometry>)EasyMock.getCurrentArguments()[1];\r\n List<Geometry> removes = (List<Geometry>)EasyMock.getCurrentArguments()[2];\r\n\r\n assertEquals(1, removes.size()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Finds an Entity that has the given entity UUID and is of the type specified from a world
public static <T extends org.bukkit.entity.Entity> T getEntity(org.bukkit.World world, UUID uid, Class<T> type) { return CommonUtil.tryCast(getEntity(world, uid), type); }
[ "@Nullable\n public Entity getEntityFromUUID(UUID uuid) {\n for (WorldServer world : this.worlds) {\n if (world == null) continue;\n\n Entity entity = world.getEntity(uuid);\n if (entity != null) return entity;\n }\n\n return null;\n }", "TransferObject<...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method returns all the puzzles for the classic sudoku version.
public ArrayList[] getClassicPuzzles() { return classicPuzzles; }
[ "public ArrayList<Puzzle> getAllPuzzless() throws SQLException\n\t{\n\t\tPuzzleDB pdb = new PuzzleDB();\n\t\treturn pdb.getAllPuzzles();\n\t}", "public static ArrayList<Puzzle> getStoredPuzzles() {\n files = getFiles();\n ArrayList<Puzzle> storedPuzzles = new ArrayList<Puzzle>();\n System.out...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Do the actual action on 'node'. Your action will override this function. returns 'true' to continue action returns 'false' to terminate action
protected abstract boolean actionImplementation(iNamedObject node);
[ "protected boolean applyActionThisNode(iNamedObject node)\n\t{\n\t\treturn true;\n\t}", "public boolean processAdvance() {\n if ( AttackTreeModel.DEBUG > 0 ) System.out.println(\"Node \" + name + \" exited.\");\n \n return true;\n }", "public abstract Node executeAction (Node parent,Stri...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the groundsSQM property.
public void setGroundsSQM(double value) { this.groundsSQM = value; }
[ "public double getGroundsSQM() {\n return groundsSQM;\n }", "public void setSfyGqbg(Integer sfyGqbg) {\r\n this.sfyGqbg = sfyGqbg;\r\n }", "public void setGroundColor(int groundColor) {\n if (groundColor != this.groundColor) {\n int oldGroundColor = this.groundColor;\n this.g...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
clearing the highlight of the tile
public void clearHighlightTile() { for(int i = 0;i < 8;i++) { for(int j = 0;j < 8;j++) { Rectangle rect = Main.tile[i][j].rectangle; if(rect.getStrokeType() == StrokeType.INSIDE){ rect.setStrokeType(StrokeType.INSIDE); rect.setStroke(Color.TRANSPARENT); } } } }
[ "void clearHighlight();", "public void removeHighlight()\n\t{\n\t\t// Set the background colour to the original colour\n this.setBackground(color);\n \n // Set the square to not be occupied\n setCanOccupy(false);\n\t}", "public void clearAllHighlighted() {\n // TODO: fill me...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
string key_data = 3;
java.lang.String getKeyData();
[ "java.lang.String getKey3();", "void setKey3(java.lang.String key3);", "java.lang.String getStrkey();", "String setKey(String newKey);", "public String getKeyData()\n\t{\n\t\treturn keyData;\n\t}", "java.lang.String getClientKey();", "void setKeyNumber(int number)\r\n {\r\n number_of_key = number;\r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The default ProfileResponse constructor.
public ProfileResponse() {}
[ "public ProfileListResponse() {\n super();\n this.setProfiles(new LazyArrayList<Profile>());\n }", "private ProfileResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public Profile() {\n super();\n }", "public ProfileResource() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }