query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
Download the actual images for each chapter. The image links are found in javascript content: data = '
private void downloadImages() { for (Path chapterHtml : Util.findHtmlFiles(ctx.chaptersDir)) { String chapterFileName = chapterHtml.getFileName().toString(); chapterFileName = Util.removeFileExtension(chapterFileName); Path chapterPath = ctx.imagesDir.resolve(chapterFileName); ...
[ "private void downloadChapters() {\n Document rootFile = ctx.chapterList.parseHtml(BASE_URI);\n Elements chapterAddresses = rootFile.select(\"div[class=chapter-list] a[href]\");\n for (Element chapterAddr : chapterAddresses) {\n Optional<URLResource> chapterUrl = URLResource.of(chapt...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column DEVELOP.T_CUST_PREFERENTIAL.FLASTUPDATETIME
public Date getFlastupdatetime() { return flastupdatetime; }
[ "@Generated(value = \"org.mybatis.generator.api.MyBatisGenerator\", date = \"2020-04-12T12:59:05.835+09:00\", comments = \"Source field: USER.updatedTime\")\r\n public String getUpdatedtime() {\r\n return updatedtime;\r\n }", "public Long getUpdateDatetime() {\n return updateDatetime;\n }",...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the fecha alta.
public Date getFechaAlta() { return fechaAlta; }
[ "public Date getFecha_alta() {\n\t\treturn fecha_alta;\n\t}", "public String getFecha_alta() {\n\t\treturn this.fecha_alta;\n\t}", "public java.util.Calendar getFechaAlta() {\r\n return fechaAlta;\r\n }", "@Override\n public java.util.Date getFecha() {\n return _partido.getFecha();\n }"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Modifica la data di ordinazione passando un oggetto "GregorianCalendar"
public void setDataOrdinazione(GregorianCalendar dataOrdinazione) { this.dataOrdinazione = dataOrdinazione; }
[ "public GregorianCalendar getDataOrdinazione() {\n\t\treturn dataOrdinazione;\n\t}", "XMLGregorianCalendar getDateFinEmploi();", "public void ordenaPorFecha() {\n ordenActualDias = DiarioContract.DiaDiarioEntries.FECHA;\n leeAdaptador();\n }", "@Test\n\tpublic void testGregorianCalendar() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructs a new Analyzer using the specified ImagePlus object and the systemwide measurement options and results table.
public Analyzer(ImagePlus imp) { this(); this.imp = imp; }
[ "public Analyzer(ImagePlus imp, int measurements, ResultsTable rt) {\n this.imp = imp;\n this.measurements = measurements;\n this.rt = rt;\n }", "public AliasAnalysis() {\n banner = new Banner(\"Alias Analysis\");\n }", "public ImageAnalysis(ImageAnalysisConfig config) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
sends a request to the backend for a list of coauthors of the passed authorName
protected List<String> getCoAuthorList(String authorName){ String centerNode = authorName; List<String> coAu = null; try{ coAu = backend.getCoauthors(centerNode); } catch (RemoteException e) { e.printStackTrace(); } return coAu; }
[ "protected void addCoAuthors(String authorName){\r\n\t\r\n\t\tList<String> moreAuthors = getCoAuthorList(authorName); \r\n\t\tsynchronized (this.colorLayoutVis){\r\n\t\t\t\r\n\t\tNode addTo = findAuthor(authorName);\r\n\t\tVisualItem addToVisItem = this.colorLayoutVis.getVisualItem(\"graph.nodes\", addTo);\r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Setter for the total count of the same gender in the year, calculates and store a percentage of counts. It will not update anything if the object is invalid.
public void setTotalCount(int total) { if(isValid) percentage = count / (float) total; }
[ "public void updateStudentCount() {\n int total = tutorialGroup.getStudents().size();\n long graded = assignment.getGradebook().stream().count();\n\n studentsGraded.setText(\"\" + graded + \" / \" + total + \" students graded\");\n }", "public void setGraduatesPerYear ( int GraduatesPerYea...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Do we want to do pretty printing?
public boolean getPrettyPrint() { return (pretty_print); }
[ "protected final boolean isPretty() {\n return pretty;\n }", "public void setPrettyPrint(boolean how);", "public boolean getPrettyPrint() {\n return prettyPrint;\n }", "public boolean shouldPrintOutput() {\n\t\treturn true;\n\t}", "public abstract String prettyPrint();", "@Test\n\t public vo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Recreates affinity cache if affinity topology version was changed and adds partition result to sql cache.
private void updateAffinityCache(JdbcQueryExecuteRequest qryReq, JdbcResponse res) { if (partitionAwareness) { AffinityTopologyVersion resAffVer = res.affinityVersion(); if (resAffVer != null && (affinityCache == null || affinityCache.version().compareTo(resAffVer) < 0)) { ...
[ "void refreshCache();", "private synchronized void refreshCache() {\n\t\tcachingManager.refreshCacheKey(queryCacheOnCommit);\n\t\t// clear the related caches\n\t\tcachingManager.clearRelatedCaches(updateStatementOnCommit);\n\t\tclearSessionData();\n\t}", "Cache mountNewCache();", "private void updateCache() ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
creates the PortSymbols that belong to a ViewPortArraySymbol
private void portCreationIntLiteralPresent(ASTPort node, ViewPortArraySymbol pas, String name, Optional<MCTypeReference<? extends MCTypeSymbol>> typeRef) { //int num = node.getIntLiteral().get().getValue(); Log.debug(node.toString(), "ASTPort"); int num = 0; if (node.getUnitNumberResolution().isPresent(...
[ "PortShape createPortShape();", "public void constructSymbolArray() throws InsufficientBitsLeftException, IOException {\n\t\tfor (int i = 0; i < symbols.length; i++) {\n\t\t\t// first parameter: length, second parameter: symbol\n\t\t\tsymbols[i] = new Cell(codeMap.get(i).length(), i);\n\t\t}\n\t}", "private voi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the first task in the ordered set where userId = &63;.
public static Task fetchByByUserId_First(long userId, OrderByComparator<Task> orderByComparator) { return getPersistence().fetchByByUserId_First(userId, orderByComparator); }
[ "@Override\n\tpublic Task fetchByUserId_First(long userId,\n\t\tOrderByComparator<Task> orderByComparator) {\n\t\tList<Task> list = findByUserId(userId, 0, 1, orderByComparator);\n\n\t\tif (!list.isEmpty()) {\n\t\t\treturn list.get(0);\n\t\t}\n\n\t\treturn null;\n\t}", "@Override\n\tpublic Task fetchByCompletedBy...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Merges the rows. This function uses a heuristical approach that guarantiess to merge all rows into one if there is no conflict at all. If there are conflicts the heuristic will be bestefford but with linear runtime (given a a number of rows).
private static void mergeAllRowsIfPossible(ArrayList<Row> rows) { // use fixed seed in order to get consistent results (with random properties) Random rand = new Random(5711l); int tries = 0; // this should be enough to be quite sure we don't miss any optimalization // possibility final int maxT...
[ "protected void mergeLastRow() {\n\n\t\tArrayList<Integer> positions = new ArrayList<>();\n\t\t\n\t\tfor (int c = 0; c < width - 1; c ++) {\n\t\t\tif (cR[c] != cR[c + 1]) {\n\t\t\t\t positions.add(c);\n\t\t\t}\n\t\t}\n\t\t\n\t\tmergeRightwards(height - 1, positions);\n\t}", "private List<T> mergeResults( final Ro...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
End of Gen_VerifyStartDate(String expectedStartDate, String observedStartDate) / 46 > Verify End date
public static void Gen_VerifyEndDate(String expectedEndDate, String observedEndDate) { try { /* Verify With two dates */ App_Log.debug("Verify Start Dates " + expectedEndDate+" and "+observedEndDate); Date expectedDate = new Date(); Date observedDate = new Date(); DateFormat sdf = new SimpleDat...
[ "@Test\r\n void testReduceVerificationEndDate();", "@Test\n\tpublic void testStringRVEndDate1YearAfterStartDate() {\n\t\tRV r = null;\n\t\ttry {\n\t\t\tr = new RV(\"Matt Kinoodle\", \n\t\t\t\t\t\"11/11/2017\", \"11/11/2018\", \n\t\t\t\t\t5, 30);\n\t\t} catch (Exception e) {\n\t\t\t;\n\t\t}\n\t\tassertEquals(r....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Converts Inches and returns pixels using the specified resolution.
protected final int inchAsPixel(double in, int dpi) { return (int) Math.round(dpi * in); }
[ "public float toInches() {\n\t\treturn (float) (this.feet * 12) + (this.inches) + ((float) this.eighths / 8f);\n\t}", "public static double convertCentimetersToInches(double cm)\n {\n return cm / 2.54;\n }", "static double convert_inches2meters(double inches) {\n\n double meters;\n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Clears the value of the 'videoCount' field.
public org.acalio.dm.model.avro.YChannel.Builder clearVideoCount() { fieldSetFlags()[9] = false; return this; }
[ "public void setVideoCount(long value) {\n this.videoCount = value;\n }", "public void clearSearchCount() {\n searchMovieDetails = 0;\n searchCastDetails = 0;\n searchTvDetails = 0;\n }", "public org.acalio.dm.model.avro.YChannel.Builder setVideoCount(long value) {\n validate(fi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__OperationCall__Group__2__Impl" $ANTLR start "rule__OperationCall__Group__3" InternalOCLlite.g:6173:1: rule__OperationCall__Group__3 : rule__OperationCall__Group__3__Impl rule__OperationCall__Group__4 ;
public final void rule__OperationCall__Group__3() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalOCLlite.g:6177:1: ( rule__OperationCall__Group__3__Impl rule__OperationCall__Group__4 ) // InternalOCLlite.g:6178:2: rule__OperationCall_...
[ "public final void rule__OperationCall__Group_3__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalOCLlite.g:6231:1: ( rule__OperationCall__Group_3__0__Impl rule__OperationCall__Group_3__1 )\n // InternalOCLlite.g:6232:2: ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructs a new client to invoke service methods on Amazon Chime SDK Messaging using the specified parameters. All service calls made using this new client object are blocking, and will not return until the service call completes.
AmazonChimeSDKMessagingClient(AwsSyncClientParams clientParams, boolean endpointDiscoveryEnabled) { super(clientParams); this.awsCredentialsProvider = clientParams.getCredentialsProvider(); this.advancedConfig = clientParams.getAdvancedConfig(); init(); }
[ "AmazonChimeSDKMessagingClient(AwsSyncClientParams clientParams) {\n this(clientParams, false);\n }", "@Override\n protected Client build(AwsSyncClientParams params) {\n return new ClientClient(params);\n }", "public TelemetryClientClient()\n {\n TelemetryClient tc = new Telemet...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets value as attribute value for CONTRACT_ID using the alias name ContractId.
public void setContractId(BigDecimal value) { setAttributeInternal(CONTRACTID, value); }
[ "public void setContractId(Number value) {\n setAttributeInternal(CONTRACTID, value);\n }", "public void setContractId(int value) {\n this.contractId = value;\n }", "public void setContractID(int value) {\n this.contractID = value;\n }", "public void setXpeContractId(String value...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Confirm final report and send corresponding emails
public void confirmCheckedRegistrations() { try { ReportDAO rdao = ReportDAO.getInstance(); LocaleDAO ldao = LocaleDAO.getInstance(); EntrantDAO edao = EntrantDAO.getInstance(); int localeId = ldao.read("en"); List<ReportEntry> rel = rdao.read(localeId); Set<Integer> rejectedIds = new HashSet<>(...
[ "private void confirmedSendReport() {\r\n\t\tmApplication.showProgressDialog(this, this,\r\n\t\t\t\tmApplication.getString(R.string.manually_service_running), 0);\r\n\t\tString message = getString(R.string.report_body);\r\n\t\tFile cahceDir = mApplication.getLogsFolder();\r\n\t\tFile logFile = mApplication.getLogFi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Testing will cover all fields in the header and will check for both required fields, missing fields and voices In addition we will test an invaild header
@Test public void validHeaderTest(){ //test for a complete header with some missing values Header h; SimpleReader sr = new SimpleReader(); String fileForLexer = sr.FileToString("sample_abc/piece1.abc"); abcLexer lex = new abcLexer(fileForLexer); abcParser parser = new abcParser(lex); h=p...
[ "@Test\n public void voicesAndvarMeterHeaderTest(){\n Header h;\n SimpleReader sr = new SimpleReader();\n String fileForLexer = sr.FileToString(\"sample_abc/invention.abc\");\n abcLexer lex = new abcLexer(fileForLexer);\n abcParser parser = new abcParser(lex);\n h=parser.parseHeader();\n ass...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
First attempt: We would like to filter out all green apples
public static List<Apple> filterGreenApples(List<Apple> inventory) { List<Apple> result = new ArrayList<>(); for (Apple apple: inventory){ if ("green".equals(apple.getColor())) { result.add(apple); } } return result; }
[ "public static List<Apple> filterGreenApples(List<Apple> inventory){\n List<Apple> result = new ArrayList<>();\n for (Apple apple: inventory){\n if (\"green\".equals(apple.getColor())) {\n result.add(apple);\n }\n }\n return result;\n }", "public...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Runs a ScheduledItem regardless of the timer or isRunNow status, will only refuse if the ScheduledItem is currently running or the machineId is set to not run schedules
void run(ScheduledItem schedule);
[ "public void runNow(PSScheduledTask schedule);", "public void scheduleRunner() {\n // Check if last scheduled thread is still running.\n if (running.get()) {\n LOG.info(\"Previous scheduler still running\");\n return;\n }\n \n LOG.info(\"Running scheduler\");\n try {\n running...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Standard getter method that returns the recommended recipe of the recommendation.
public Recipe getRecommendedRecipe() { return recommendedRecipe; }
[ "com.google.ads.googleads.v6.resources.Recommendation getRecommendation();", "com.google.ads.googleads.v1.resources.Recommendation getRecommendation();", "public String getRecommend() {\n return recommend;\n }", "public String getRecommend() {\r\n return recommend;\r\n }", "public void s...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return format by field
protected String getFormat(DSField field) { if (field == null) { return null; } String format = field.getFormat(); if (format == null) { format = getFormat(field.getDataType()); } return format; }
[ "public abstract DocValuesFormat getDocValuesFormatForField(String field);", "String getValueFormat();", "Format getFormat();", "public Object getFormat();", "public void formatFields() {\r\n\t}", "public Format getFormat();", "String getFormatter();", "int getFormat();", "public String getFormatNam...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The pool to update with the new Identity. This value can be either the PoolId or PoolArn, and you can find these values using DescribePools.
public void setPoolId(String poolId) { this.poolId = poolId; }
[ "public String getPoolId() {\n return this.poolId;\n }", "public Long getPoolId();", "public void setPoolId(Long poolId);", "public String getIdentityPoolId() {\n return this.identityPoolId;\n }", "java.lang.String getPoolId();", "public Pool<PoolType, Long> getPool() {\n return...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the current page of the pdf document.
public PDPage getCurrentPage() { return page; }
[ "PdfPage getPage();", "public int getCurrentPage();", "public int getRealCurrentPage();", "int getCurrentPage();", "public Integer getCurrentPage() {\r\n\t\treturn currentPage;\r\n\t}", "public CharSequence getCurrentPage() {\n return pages.get(currentIndex);\n }", "public Integer getCurrentPa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Strip off all the xml tags from the String and returns the result as a String. Tags will be between ''
public static String stripOffTags(String str) { while (true) { int start = str.indexOf("<"); if (start < 0) { break; } else { int end = str.indexOf(">", start); if ((start > 0) && (end < 0)) { break; } else { str = str.substring(0, start) + str.substring(end + 1); } } } r...
[ "public static String stripTags(String string) {\n\t\tif (string == null || string.isEmpty()) {\n\t\t\treturn string;\n\t\t}\n\n\t\tString withoutTags = PATTERN_XML_TAGS.matcher(string).replaceAll(\"\");\n\t\treturn PATTERN_MULTIPLE_SPACES.matcher(withoutTags).replaceAll(\" \").trim();\n\t}", "private String remo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
WHEN Provided VIN is null THEN Return false for validation.
@Test public void when_ProvidedVINIsNull_Then_ReturnFalse() { //when final var isValid = underTest.isValid(null, null); //then assertFalse(isValid); }
[ "public boolean isNotNullIsVat() {\n return genClient.cacheValueIsNotNull(CacheKey.isVat);\n }", "@Test\n public void when_ProvidedVINHasInvalidFormat_Then_ReturnFalse() {\n //when\n final var isValid = underTest.isValid(\"invalid\", null);\n //then\n assertFalse(isValid);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
///////////////////////////////////////////////////////////////////// SAVE ///////////////////////////////////////////////////////////////////// Saves the SampletypeBean pObject into the database.
public SampletypeBean save(SampletypeBean pObject) throws SQLException { Connection c = null; PreparedStatement ps = null; StringBuffer _sql = null; try { c = getConnection(); if (pObject.isNew()) { // SAVE if (!pObject.is...
[ "void afterInsert(SampletypeBean pObject) throws SQLException {\n if (listener != null)\n listener.afterInsert(pObject);\n }", "public SampletypeBean[] save(SampletypeBean[] pObjects) throws SQLException \n {\n for (int iIndex = 0; iIndex < pObjects.length; iIndex ++){\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Function to generate new Sudoku Puzzle by taking number of desired empty cells as argument. It first generates a completed sudoku puzzle using function 'brickFill' and then create empty spaces using function 'initialSpace'.
public int[][] newPuzzle(int spaces) { brickFill(0,0); // fill all bricks of the empty matrix starting from (0,0) i.e. from top left row by row initialSpace(spaces); // create desired number of spaces in filled matrix, i.e. generate desired number of empty bricks. return bigBox; }
[ "private static void fillGrid()\n\t{\n\t\tfor ( int i=0; i < numRows; i++ ){\n\t\t\tfor ( int j = 0; j < numCols; j++ ){\n\t\t\t\tgrid[i][j] = FULL;\n\t\t\t}\n\t\t}\n\t\tgrid[numRows - 1][0] = POISON;\n \n\t}", "public void makeNewBoard() {\n createFields();\n cellsToZero();\n\n for (int i = ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests whether setting and getting a shape's bounding box works properly.
@Test public void testBoundingBox() { for (ToolFactory factory : toolFactories) { DummyEditor editor = new DummyEditor(new DummyView( new DefaultSheet())); Tool tool = factory.getTool(editor); createShape(tool); Shape s = editor.getRecentlyAddedShape(); // This test applies for shape creation too...
[ "Rectangle getBoundingBox();", "public boolean hasBoundingBox() {\n return fieldSetFlags()[7];\n }", "public boolean verifyGeometry() {\n boolean status = false;\n WebElement element;\n element = ui.getWebElement(By.id(getId()));\n if (element != null) {\n status =...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the details of a specific unsubscribed contact (asynchronously)
public com.squareup.okhttp.Call getUnsubscribedContactAsync(Integer id, final ApiCallback<UnsubscribedContact> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback...
[ "public Result<List<SuppressedContact>> listUnsubscribedContacts(Long addressBookId, Date since) {\n return listUnsubscribedContacts(addressBookId, since, 0);\n }", "public Result<List<SuppressedContact>> listUnsubscribedContacts(Long addressBookId, Date since, int limit) {\n String path = pathWi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Private class that returns the Comparator for the Priority Queue
private Comparator<Node> getComparator() { class QueueCompare implements Comparator<Node> { @Override public int compare(Node o1, Node o2) { if (o1.manPrior > o2.manPrior) return 1; else if (o1.manPrior < o2.manPrior) return -1; else if (o1...
[ "public Comparator<? super P> comparator();", "public static Comparator<Application> getComparator() {\n return new Comparator<>() {\n //Solution below adapted from AY2122S1-CS2103T-T15-3\n @Override\n public int compare(Application application, Application otherApplication...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructs a new GUI.DesktopController. Defaults state to active.
public DesktopController(Stage stage){ FXThread = Thread.currentThread(); window = new GuiWindow(1200,750); window.show(stage); state = STATE.ACTIVE; initBackgroundTasks(); programNames = new HashMap<>(); //manage preferences preferences = new Preference...
[ "public void setDesktop(Component desktop);", "public Desktop() { \n initComponents();\n }", "public Desktop() {\n initComponents();\n }", "public Component(Desktop desktop) {\r\n this.desktop = desktop;\r\n }", "public MainDesktopPane getDesktop() {\n\t\treturn desktop;...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This is the setter method to the attribute. Placeholder for description of property rollback of obj type controllerupgradestate field type str type boolean. Default value when not specified in API or module is interpreted by Avi Controller as null.
public void setRollback(Boolean rollback) { this.rollback = rollback; }
[ "public Boolean getRollback() {\n return rollback;\n }", "public void setRollbackStatus(Byte rollbackStatus) {\r\n this.rollbackStatus = rollbackStatus;\r\n }", "void setRollbackOnly();", "public Byte getRollbackStatus() {\r\n return rollbackStatus;\r\n }", "@VTID(188)\r\n voi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieves the asynchronous interval time (in milliseconds).
public int getAsyncTime() { return asyncTime; }
[ "public long getSyncReceiveIntervalMillis()\n {\n return syncReceiveIntervalMillis;\n }", "long getTimeoutInterval();", "long getIntervalGuideCodeMillisecond();", "long getIntervalDataCodeMillisecond();", "public int getPollIntervalMs() {\n return pollIntervalMs;\n }", "int getMilli...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
returns the tile at distance 'd' away from the center of this mob, in the direction it is facing
public Tile tileAtDistance(double d) { Map map = this.server.getState().getMapByID(this.mapID); double xComp = d*Math.cos(movementVector.dirRadians); double yComp = d*Math.sin(movementVector.dirRadians); return map.getTileAt(new PairDouble(bounds.getCenterX() + xComp, bounds.getCenterY() + yComp).floor()); }
[ "public PairInt tileCoordsAtDistance(double d) {\n\t\tdouble xComp = d*Math.cos(movementVector.dirRadians);\n\t\tdouble yComp = d*Math.sin(movementVector.dirRadians);\n\t\t\n\t\tPairInt ret = new PairDouble(\n\t\t\tbounds.getCenterX() + xComp,\n\t\t\tbounds.getCenterY() + yComp\n\t\t).toInt();\n\t\t\n\t\treturn ret...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ stores the value in Millimeters per Second
public void millimetersPerSecond(Double val) { setValue(val, VelocityUnit.MILLIMETERS_PER_SECOND); }
[ "public Double millimetersPerSecond()\n\t{\n\t\treturn getValue(VelocityUnit.MILLIMETERS_PER_SECOND);\n\t}", "public void megabytesPerSecond(Double val)\n\t{\n\t\tsetValue(val, DataRateUnit.MEGABYTES_PER_SEC);\n\t}", "public void micrometersPerSecond(Double val)\n\t{\n\t\tsetValue(val, VelocityUnit.MICROMETERS_...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the protocol response textual description, if available. SIP: Response codes and descriptive text for SIP are defined in [SIP 3261, sec 21]. XMPP: For XMPP implementations, textual description consists of two parts: (see XMPP Core, sec 4.6.3]. Note that [XMPP Core sec 4.6.2] states that the optional text SHOULD NOT...
java.lang.String getProtocolResultText();
[ "public String getProtocolDescription()\n {\n return Resources.getString(\"plugin.dictaccregwizz.PROTOCOL_DESCRIPTION\");\n }", "private SpeechletResponse getHelpResponse() {\n\t\tString speechText = \"Please ask Flight Check the status of a flight by providing the airline name followed by the flight...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Obtiene fecha inicio operacion.
public java.util.Date getFechaInicioOperacion() { return fechaInicioOperacion; }
[ "public Date getFechaIniDate(){\n Date date=new Date(fechaInicio.getTime());\n return date;\n }", "public Date getFechaInicioContrato() {\r\n\t\t\r\n\t\treturn (this.fechaInicioContrato);\r\n\t}", "public Date getDatanascita_intestatario();", "public Date getFechaInicioSesion() {\n ret...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Triggered when the activity receives a launch intent. This is always called on the UI thread.
protected void onLaunchIntentReceived(Intent in_intent) {}
[ "private void launchActivity()\n {\n }", "private void launchActivity() {\n Intent intent = new Intent(this, MainActivity.class);\n startActivity(intent);\n }", "@Override protected void onNewIntent(Intent intent)\n {\n setIntent(intent);\n }", "@Override\n protected voi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test for inserting stuff into a heap, then just making sure that it contains the specified values that we inserted. We do many, many more checks to ensure the integrity of the heap along the way.
@Test public final void testInsert() { // get a new heap. Heap<Integer, Integer> heap = this.newHeap(); // load it! KeyValueTriple<Integer, Integer, Heap.Entry<Integer, Integer>>[] loadedValues = this .loadHeap(heap, this.getInsertSize()); // make sure that everything is equal. assertHeapIsEqualTo(h...
[ "@Test public void testInsert() {\r\n\t\tmy_heap.insert(my_nodes[0]);\r\n\t\tassertEquals(\"First insert did not go to top of heap\", \r\n\t\t\t\t1, my_nodes[0].getLocation());\r\n\t\tmy_heap.insert(my_nodes[1]);\r\n\t\tassertEquals(\"New insert did not update correctly\", \r\n\t\t\t\t1, my_nodes[1].getLocation());...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method is used to update the label that displays the current penalty.
public void updatePenaltyLabel(int currPenalty) { penaltyLabel.setText("Stacked Penalty: " + currPenalty); }
[ "private void updateLabel() {\n\t\tString translation = lp.getString(key);\n\t\tsetText(translation);\n\n\t}", "public void updateLabels() {\n\t\tfinal PlayerInfo player = ControllerImpl.getController().getCurrentPlayer();\n\t\tplayerLabel.setText(\"Player:\\n\" + player.getName());\n\t\tcashLabel.setText(\"Cash:...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
perform moveArm() and moveRobot() routines for first level. If no ring was detected, move back and repeat same process for second level.
public void captureRing() { // create new ring detection object ringColours = new RingColour(); // change place in code depending on when you want to activate light sensor. moveArm(BOTTOMTOFIRST); boolean firstLevelDetected = moveRobot(); // need to move arm to second level if first level has no ...
[ "private boolean moveRobot() {\r\n\r\n\t\tboolean firstLevelDetected = false;\r\n\t\tleftMotor.setSpeed(FORWARD_SPEED);\r\n\t\trightMotor.setSpeed(FORWARD_SPEED);\r\n\r\n\t\t// advance robot to insert arm in ring hole\r\n\t\tleftMotor.rotate(convertDistance(WHEELRADIUS, 10), true);\r\n\t\trightMotor.rotate(convertD...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Applies the supplied values to the template and inserts the new node(s) before el.
public ExtElement insertBefore(String element, BaseModel... values) { return insertBefore(element, Arrays.asList(values)); }
[ "public ExtElement insertBefore(String element, List<BaseModel> values) {\r\n\t\treturn insertBefore(element, BaseModel.fromList(values));\r\n\t}", "public ExtElement insertBefore(ExtElement element, BaseModel... values) {\r\n\t\treturn insertBefore(element, Arrays.asList(values));\r\n\t}", "private void insert...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
get user input for DNA sequence
private static String getSequence(Scanner sc){ String msg; System.out.print("Enter a Sequence\n>"); msg = sc.nextLine().toUpperCase(); // if the input is invalid, ask for the input again while(!isValid(msg)) { System.out.print("Invalid sequence, Try again\n>"); ...
[ "java.lang.String getInput();", "Sequence findByDna(@Valid String[] dna);", "public String translateDNA(String dnaseq) throws AnnotationException {\n\tStringBuilder aminoAcidSeq = new StringBuilder();\n\tint len = dnaseq.length();\n\tif (! (len%3 == 0) ) {\n\t len = len - (len%3);\n\t /* this forces len t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
return String.format("%.1f%% (%d/%d)", (100f (float) count / (float) total), count, total);
public String toString() { return String.format("%.1f%%", getPercentage()); }
[ "double getPercent(double percentOf, double total);", "java.lang.String getPercentage();", "public static float percentageF(float n, float total) {\r\n return n * 100f / total;\r\n }", "private float getPercentage(int n, int total) {\n float proportion = ((float) n) / ((float) total);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
recursive method to find LCM
int findLcm(int numberOne,int numberTwo){ return (numberOne / gcd(numberOne, numberTwo)) * numberTwo; }
[ "public int findLCM(int x, int y) {\n\t if(lcm % x == 0 && lcm % y == 0)\n\t {\n\t return lcm;\n\t }\n\t else\n\t {\n\t lcm++;\n\t findLCM(x, y);\n\t return lcm;\n\t }\n\t}", "public static int getLcm(int num1, int num2) {\r\n\t\tif (num1 == num2) {\r\n\t\t\treturn nu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Executes a notification operation. Retrieves all late deliverables that are explained, but not responded. Then sends email notifications to the project managers of these late deliverables. Changes in version 1.3: Added support of "LATE_DELIVERABLE_TYPE" email template field. Using "N/A" when deadline or delay property ...
public void execute() throws NotRespondedLateDeliverablesNotificationException { long start = System.currentTimeMillis(); final String method = CLASS_NAME + ".execute()"; Helper.logEntrance(log, method, null, null); try { // Get a mapping from user ID to the list of ...
[ "public NotRespondedLateDeliverablesNotifier(ConfigurationObject config) {\r\n ExceptionUtils.checkNull(config, null, null, \"The parameter 'config' should not be null.\");\r\n\r\n // Create log\r\n String loggerName = Helper.getPropertyValue(config, Helper.LOGGER_NAME_KEY, false, false);\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the result of interpreting the object as an instance of 'Os Artifact Guid Criteria'. This implementation returns null; returning a nonnull result will terminate the switch.
public T caseOsArtifactGuidCriteria(OsArtifactGuidCriteria object) { return null; }
[ "public T caseOsArtifactIdCriteria(OsArtifactIdCriteria object) {\n return null;\n }", "public T caseOsArtifactCriteria(OsArtifactCriteria object) {\n return null;\n }", "public T caseOsArtifactQuery(OsArtifactQuery object) {\n return null;\n }", "public T caseOsArtifactQueryByPredicate(O...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
get single coffee shop
public CoffeeShop getCoffeeShop(int coffee_shop_id) { SQLiteDatabase db = this.getReadableDatabase(); String sqlSelectQuery = "SELECT * FROM " + CoffeeShopDatabase.CoffeeShopTable.TABLE_NAME + " WHERE " + CoffeeShopDatabase.CoffeeShopTable._ID + " = " + coffee_shop_id; Cursor cur...
[ "Shop getShopByCode(String shopCode);", "Shop findById(long shopId);", "@Override\n @Transactional(readOnly = true)\n public ShopInfoDTO findOne(Long id) {\n log.debug(\"Request to get ShopInfo : {}\", id);\n ShopInfo shopInfo = shopInfoRepository.findOne(id);\n return shopInfoMapper....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
launch the page switch to 3rd frame click a link then after get text of all links come back to top window go to 2nd and 3rd frames and perform the same operations as above
public static void main(String[] args) throws InterruptedException { // TODO Auto-generated method stub WebDriver driver=new FirefoxDriver(); driver.get("https://seleniumhq.github.io/selenium/docs/api/java/index.html?overview-summary.html"); driver.manage().window().maximize(); driver.switchTo().frame(...
[ "public void switchFrameToAngelContent()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\tdriver.switchTo().defaultContent();\r\n\t\tSync.waitForFrame(driver, \"AngelContent Frame\", \"AngelContent\", 6);\r\n\t\t}\r\n\t\tcatch(Exception e){}\r\n\t}", "public void switchToMainPageFrame() {\n driver.switchTo().defaultConte...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Composes this with another checker using OR.
default SqlOperandTypeChecker or(SqlOperandTypeChecker checker) { return OperandTypes.or(this, checker); }
[ "@Override\n\tpublic synchronized IConstraint or(IConstraint other) {\t\t\n\t\t\n\t\t// Z3 based implementation\n\t\t// new Context, import both boolExpr, combine with or\n//\t\tContext ctxResult = null;\n//\t\tSolver solverResult = null;\n//\t\ttry {\n//\t\t\tctxResult = new Context();\n//\t\t\tsolverResult = ctxR...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds an entry to the archive. The current version of the concerning file will be copied immediately. Thus, upcoming modifications of the source file won't affect the version in our archive. The path of this file in the archive will be the path of file relative to baseDir. If there is already a file in the archive havin...
public ArchiveEntry addEntry (File baseDir, File file, URI format) throws IOException { if (!file.exists ()) throw new IOException ("file does not exist."); if (!file.getAbsolutePath ().contains (baseDir.getAbsolutePath ())) throw new IOException ("file must be in basedir."); String localName = fil...
[ "protected void addFile(File newEntry, String name) {\n if (newEntry.isDirectory()) {\n return;\n }\n try {\n ZipEntry ze = new ZipEntry(name);\n mZos.putNextEntry(ze);\n FileInputStream fis = new FileInputStream(newEntry);\n byte fdata[] =...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return this content item's "authors" property as a string, or null if the property is not defined.
public String getAuthors() { return getProperty(Property.AUTHORS); }
[ "public String author() {\n return this.innerProperties() == null ? null : this.innerProperties().author();\n }", "public String getAuthor() {\n return (String)getAttributeInternal(AUTHOR);\n }", "public String getAuthor() {\n return getMetaData(\"author\", \"?\");\n }", "public ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the reclamationClosed value for this TradeHistoryEntryVo.
public void setReclamationClosed(java.lang.Boolean reclamationClosed) { this.reclamationClosed = reclamationClosed; }
[ "public void setReclamationCloseComment(java.lang.String reclamationCloseComment) {\n this.reclamationCloseComment = reclamationCloseComment;\n }", "public java.lang.Boolean getReclamationClosed() {\n return reclamationClosed;\n }", "public void setClosed(boolean closed) {\r\n this.cl...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
adds a Flux Connection to the network, this could be a PLUG, POINT or STORAGE
public void addFluxConnection(IFlux flux);
[ "public void addConnection( Connection connection ){ connections.add(connection); }", "public void addConnection() {\n synchronized(activeConnections) {\n activeConnections.incrementAndGet();\n }\n }", "public void addConnection(IConnection connessione);", "final void addConnection...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
sets the new nickname for the user and reloads the page so new information is shown.
@FXML private void changeNickName(ActionEvent event) throws RemoteException { user.setNickName(txtNickname.getText()); fillProfileData(); }
[ "void changeNickname(String nickname);", "public abstract void setNickname (String newNick);", "public void updateName(){\n DigitalChemistUser digitalChemistUser = this.userRepository.loadDefaultUser(\"admin\");\n // show who the user is. Only show the first name of the user.\n loggedInAsLa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Converts a CML molecule to an InChI string.
public static String cmlToInChI(Element cmlMol) throws Exception { return ConverterToInChI.getInChI(cmlToMolecule(cmlMol)); }
[ "private static void enhanceCMLMolecule(IMolecule mol, Element cmlMolElem, String name) {\n\t\tString inchi = ConverterToInChI.getInChI(mol);\n\t\tif(inchi != null) {\n\t\t\tElement identifier = new Element(\"identifier\");\n\t\t\tidentifier.addAttribute(new Attribute(\"convention\", \"iupac:inchi\"));\n\t\t\tident...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=DECLARATIONS This function is run when the robot is first started up and should be used for any initialization code.
public void robotInit() { RobotMap.init(); autoChooser = new SendableChooser(); autoChooser.addDefault("Simple Autonomous", new SimpleAutonomous()); //autoChooser.addObject("name", ); //autoChooser.addObject("name", ); SmartDashboard.putData("Autonomous Chooser", autoCh...
[ "@Override\n public void robotInit() {\n \n RobotMap.init();\n // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS\n driveTrain = new DriveTrain();\n SmartDashboard.putData(driveTrain);\n intake = new Intake();\n SmartDashboard.putData(intake);\n l...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a service unavailable exception object
public ServiceUnavailableException() { }
[ "public ServiceUnavailableException(String msg)\n {\n\tsuper(msg);\n }", "public UnavailableException(String msg) {\n super(msg);\n seconds = 0;\n permanent = true;\n }", "public ServiceUnavailableException(String msg, Throwable e)\n {\n\tsuper(msg, e);\n }", "Exception cre...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
query a cooker from server.
@GET("/user/{userId}/cookers/{cookerId}") Observable<HttpResult<List<CookerBean>>> queryCooker(@Path("userId") long userId, @Path("cookerId") long cookerId);
[ "void queryCookersFromServer();", "void queryCookerFromServer(int position, long cookerId);", "void queryCookerFromDB(long cookerId);", "void queryCookersFromDB();", "@Override\n\tpublic QueryClient getClient()\n\t{\n\t\treturn new ServletClient(\"http://localhost:8080/cardioSHARE/query\");\n\t\t\n\t}", "...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets probe mode of this entry.
ProbeMode probeMode() { return probeMode; }
[ "MeasuringMode getMode();", "public String getMode() {\n if (_avTable.get(ATTR_MODE) == null\n || _avTable.get(ATTR_MODE).equals(\"\")) {\n _avTable.noNotifySet(ATTR_MODE, \"ssb\", 0);\n }\n\n return _avTable.get(ATTR_MODE);\n }", "public AttributeMode getMode()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets value as the attribute value for the calculated attribute RFF_TAG.
public void setRFF_TAG(String value) { setAttributeInternal(RFF_TAG, value); }
[ "public void setAttrVal(String attrVal) {\n this.attrVal = attrVal;\n }", "void setValue(Attribute att, double value);", "public void setAttr(String name, byte val)\n{\n\tsetAttr(name,new Byte(val));\n}", "public void setRXmlValue(RXmlValue rXmlValue);", "public void setTagAnnotationValue(\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
State Transitions for KILL_BLOB_UPDATE state. PRECONDITION: container.kill() was called PRECONDITION: container != null && currentAssignment != null
private static DynamicState handleKillBlobUpdate(DynamicState dynamicState, StaticState staticState) throws Exception { assert (dynamicState.container != null); assert (dynamicState.currentAssignment != null); assert dynamicState.pendingChangingBlobs.isEmpty(); assert dynamicState.pendin...
[ "public void killed() \n {\n this.state = CcdpTaskState.KILLED;\n }", "public void killed() {\n updateState( Status.IN_PROGRESS, \"Attempted to fail job not in progress\", Status.DEAD );\n }", "void instanceKilled(String pid, IKilledResult result);", "public void killIt() {\n isRunning = fal...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Utility method to convert a metric value to text.
static String valueToText(MetricValue metricValue) { String textValue = ""; if (metricValue != null && metricValue.isUsed()) { if (metricValue.value() instanceof Number) textValue = MathUtil.format(((Number)metricValue.value()).doubleValue()); else textValue = metricValue.toString(); } return text...
[ "private String toMetric() {\n String outputMetric = this.metricParts.stream().\n filter(s -> s != null).\n filter(s -> !s.isEmpty()).\n collect(Collectors.joining(\"_\"));\n //reset value to null if not forund\n if (value == null) {\n val...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Construct a new instance of Kinetic exception with the specified message and root cause exception.
public KineticException(String message, Throwable cause) { super(message, cause); }
[ "public KineticException(Throwable cause) {\n\t\tsuper(cause);\n\t}", "public KineticException(String message) {\n\t\tsuper(message);\n\t}", "public EIMCreateException(Throwable cause) {\n\t\tsuper();\n\t\tinitCause( cause );\n\t}", "public EventConstructionException(String message, Throwable cause) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sends a message to accessible clients that the text caret has moved within a custom control.
public void textCaretMoved (int index) { checkWidget(); OS.NSAccessibilityPostNotification(control.view.id, OS.NSAccessibilitySelectedTextChangedNotification.id); }
[ "public void caretStatusChanged(JCaret caret);", "public interface ICaretListener\n{\n\t/**\n\t * Invoked after the caret status changed.\n\t * \n\t * @param caret The caret whose status changed.\n\t */\n\tpublic void caretStatusChanged(JCaret caret);\n}", "void moveCaretRelatively(long offsetShift, boolean wit...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
finds the appropriate radius for the given board based on the distance of the farthest piece from the power station, to its farthest piece
int findRadius() { GraphUtils u = new GraphUtils(); int diameter = u.furthestDist( u.furthestPiece(u.furthestPiece(this.board.get(powerRow).get(powerCol), this.nodes), this.nodes), this.nodes); return diameter / 2 + 1; }
[ "public int computeRadius() {\n //run breadth-first search\n ArrayList<GamePiece> first = new BFS().start(this.nodes.get(0));\n //take last found node\n GamePiece lastFound = first.get(first.size() - 1);\n //run breadth-fist search again from last found node\n ArrayList<GamePiece> second = new BFS...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set a virtual machine running on a computer. The computer is set online whatever his previous state was. If the virtual machine is already in a other location or state in the configuration, it is updated
boolean setHost(VM vm, VMLocation hoster);
[ "void setComputer(Computer computer);", "private void changeMachine() {\n\t\tboolean checkAll = false;\n\t\t\n\t\touter:for (int i = 0 ; i < this.lobby.getMachines().size(); i++) {\n\t\t\tif (this.lobby.getMachines().get(i).isOn()) {\n\t\t\t\tcheckAll = true;\n\t\t\t\tbreak outer;\n\t\t\t}\n\t\t}\n\n\t\t\n\t\tif ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column t_system_msg_push_task.RESEND_INTERVALS
public void setResendIntervals(Integer resendIntervals) { this.resendIntervals = resendIntervals; }
[ "public Integer getResendIntervals() {\n return resendIntervals;\n }", "com.google.cloud.compute.v1.Duration getResendInterval();", "com.google.cloud.compute.v1.DurationOrBuilder getResendIntervalOrBuilder();", "void setIntervalEnd(java.util.Calendar intervalEnd);", "public void setResendNum(Integ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
returns the mLightIntensitiveValue's values which was updated by onSensorChanged method
public float getSensordata() { return mLightIntensitiveValue; }
[ "@Override\n public void onSensorChanged(final SensorEvent event) {\n mLightIntensitiveValue = event.values[0];\n Log.d(\"edge:intensity\", String.valueOf(mLightIntensitiveValue));\n }", "public double[] getLight()\n {\n assert scribblerConnected() : \"Scribbler not connected\";\n\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests an android_binary with one dependent android_library rule that contains an assets directory.
@Test public void testCreateAllAssetsDirectoryWithOneAssetsDirectory() { BuildRuleResolver ruleResolver = new BuildRuleResolver(); // Two android_library deps, one of which has an assets directory. JavaLibraryRule libraryOne = createAndroidLibraryRule( "//java/src/com/facebook/base:libraryOne", ...
[ "@Test\n public void testCreateAllAssetsDirectoryWithZeroAssetsDirectories() {\n BuildRuleResolver ruleResolver = new BuildRuleResolver();\n\n // Two android_library deps, neither with an assets directory.\n JavaLibraryRule libraryOne = createAndroidLibraryRule(\n \"//java/src/com/facebook/base:lib...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The interface Gift certificate service.
public interface GiftCertificateService { /** * Save. * * @param giftCertificate the gift certificate */ void save(GiftCertificate giftCertificate); /** * Update. * * @param giftCertificate the gift certificate */ void update(GiftCertificate giftCertificate); ...
[ "public interface CertService {\n\n /**\n * Retrieves the root certificate.\n * \n * @return\n * @throws CertException\n */\n public X509Certificate getRootCertificate() throws CertException;\n\n /**\n * Sets up a root service to be used for CA-related services like certificate requ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns true if field set_file_format_params is set (has been assigned a value) and false otherwise
public boolean isSetSet_file_format_params() { return this.set_file_format_params != null; }
[ "public boolean isSetParcelFormat()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().find_attribute_user(PARCELFORMAT$46) != null;\r\n }\r\n }", "boolean isSetFormat();", "public boolean isSetFileTy...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Substance Concentrations ___________________________________________________ Return the array holding substance concentrations.
public float[][] getSubstances() { return S; }
[ "public ArrayList<ArrayList<String>> getActiveSubstanceInformation(){\n // Declare and Initialize variables\n ArrayList<ArrayList<String>> activeSubstances = new ArrayList<>();\n // If there is no composite medication information\n if (indiceCompositeMedication == -1){\n retur...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the current global skin. If the current lookandfeel is not Radiance, this method returns null.
public static RadianceSkin getCurrentSkin() { LookAndFeel current = UIManager.getLookAndFeel(); if (current instanceof RadianceLookAndFeel) { return currentSkin; } return null; }
[ "public String getSkin()\n {\n // get skin from definition or inherit from parent menu\n String skin = definition.getSkin();\n if (skin == null)\n {\n skin = super.getSkin();\n }\n return skin;\n }", "public String getSkin()\n {\n return this.xw...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
CommunityPool queries the community pool coins.
public cosmos.distribution.v1beta1.QueryOuterClass.QueryCommunityPoolResponse communityPool(cosmos.distribution.v1beta1.QueryOuterClass.QueryCommunityPoolRequest request) { return blockingUnaryCall( getChannel(), getCommunityPoolMethod(), getCallOptions(), request); }
[ "public void communityPool(cosmos.distribution.v1beta1.QueryOuterClass.QueryCommunityPoolRequest request,\n io.grpc.stub.StreamObserver<cosmos.distribution.v1beta1.QueryOuterClass.QueryCommunityPoolResponse> responseObserver) {\n asyncUnimplementedUnaryCall(getCommunityPoolMethod(), responseObserver);\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
save a Blog into DB.
Blog saveBlog(Blog blog);
[ "public void storeBlog() {\r\n // notify user\r\n activityScreen.setString(Locale.get(\"blogManager.alert.storing\"));\r\n controller.show(activityScreen);\r\n // schedule process\r\n this.storageTerminationNotifier.schedule(new BlogStoreTerminator(), STORAGE_TIMEOUT);\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Setup events for Pacman when he hit something (pac, ghost ...) Playing music or modify variable regarding of the event.
public void setEvents () { physicEngine().onCollision(PACMAN, GHOST, this::pacmanWithGhost); physicEngine().onCollision(PACMAN, GREATWALL, (e1, e2) -> pacmanLogic.stop()); physicEngine().onCollision(PACMAN, WALL, this::pacmanWithWall); physicEngine().onCollision(PACMAN, GHOST_BASE, (e...
[ "void askWantToPlay(AskWantToPlayEvent askWantToPlay);", "public void playSoundEffect(GameActionEvent event);", "public void controlEvent(ControlEvent theEvent) {\n\n\n\n if (theEvent.isGroup()) {\n // an event from a group e.g. scrollList\n println(theEvent.group().value()+\" from \"+theEvent.grou...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the boolNode in the class so cyclic constructors are prevented
public void setnBoolNode(NBoolNode boolNode) { this.nBoolNode = boolNode; }
[ "public Tree set(boolean value) {\r\n\t\treturn setObjectInternal(value);\r\n\t}", "public MutableBoolean() {\r\n super();\r\n }", "public void setTrue() {\n state = true;\n }", "public void setCanGoNorth(boolean b) {canGoNorth = b;}", "public Node ( boolean standardObserver ) {\n\t\tthis ( nu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests the invariant epcDbtradrLine.
@Test public void testEpcDbtradrLine03() throws Throwable { List<IInterpretationResult> results; results = super.interpretConstraintsForInstance(CONSTRAINT_DIRECTORY + "/epcDbtradrLine", MODELINSTANCE_NAME_03, Arrays .asList(new String[] { "DirectDebitTransactionInformation1" })); assertNotNull...
[ "@Test\r\n\tpublic void testEpcDbtradrLine01() throws Throwable {\r\n\r\n\t\tList<IInterpretationResult> results;\r\n\t\tresults = super.interpretConstraintsForInstance(CONSTRAINT_DIRECTORY\r\n\t\t\t\t+ \"/epcDbtradrLine\", MODELINSTANCE_NAME_01, Arrays\r\n\t\t\t\t.asList(new String[] { \"DirectDebitTransactionInfo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Validates this SwitchPeriodCommand with the current model, before execution.
@Override protected void validate(Model model) throws CommandException { Budget currentPeriod = model.getPrimaryBudget().deepCopy().normalize(Timestamp.getCurrentTimestamp()); if (pastDate.dateIsAfter(currentPeriod.getWindowEndDate())) { throw new CommandException(MESSAGE_PERIOD_IS_FUTU...
[ "public void rateSheetPeriodValidation() \n\t{\n\t\t// Checking There is currently a period with no end date notification displaying or not\n\n\t\tclick_button(\"RateSheet Period DropDown\", rateSheetPeriodDropDown);\n\t\toParameters.SetParameters(\"RateSheetPeriodCountBeforeAdding\",String.valueOf(get_table_row_co...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Builds a new JWS header.
public JWSHeader build() { return new JWSHeader( alg, typ, cty, crit, jku, jwk, x5u, x5t256, x5c, kid, b64, parameters, parsedBase64URL); }
[ "public JWKHeader() {}", "Header createHeader();", "Headers createHeaders();", "abstract protected byte[] buildHeaders() throws IOException, RequestException;", "public static void buildHeader(DataBuffer buffer, OutMessage sendMessage, int noOfMessages) {\n if (buffer.getCapacity() < HEADER_SIZE) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Toggles expand icon rotation based on whether parent is expanded or not.
@Override public void onExpansionToggled(boolean expanded) { super.onExpansionToggled(expanded); ObjectAnimator animator; if (expanded) { animator = ObjectAnimator.ofFloat(expandIcon, "rotation", 180, 0); } else { animator = ObjectAnimator.ofFloat(expandIcon,...
[ "public void toggle() {\n if (isExpanded()) {\n collapse();\n } else {\n expand();\n }\n }", "@Expand\n private void onExpand() {\n uparrow.setImageResource(R.drawable.arrow_up);\n }", "public void expand() {\n getSection().setExpanded(true);\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
getSelectedKeys; Get (first) selected Key
public Object getSelectedKey() { if ( m_results.size() == 0) return null; return m_results.get(0); }
[ "public Object getSelectedKey()\n \t{\n \t\tif (!m_ok || m_results.size() == 0)\n \t\t\treturn null;\n \t\treturn m_results.get(0);\n \t}", "public Collection getSelectedKeys()\n \t{\n \t\tif (!m_ok || m_results.size() == 0)\n \t\t\treturn null;\t\n \t\treturn m_results;\n \t}", "public\n LabelKeys\n getSelec...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Bind data unit for to given field.
private void bindPort( Map<String, DataUnit> dataUnits, Field field, String id) throws LpException { DataUnit dataUnit = null; for (DataUnit item : dataUnits.values()) { if (id.equals(item.getBinding())) { dataUnit = item; break; ...
[ "public void setUnit(String unit);", "public void setUnit(Unit unit) {}", "public void setUnit(Length units) {\n unit = units;\n }", "public void setQuantityUnit(String quantityUnit);", "public interface DataField extends DataBinding, Helpable, Field {\r\n\r\n /**\r\n * Defaults the prope...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A class which may be irreversibly frozen. Any attempt to change the state of this class after freezing throws an IllegalStateException.
public interface Freezable { /** * Freezes this component to prevent further changes. Override this to freeze internal data * structures and dependent objects. Overrides must call super. * Calling freeze on an already frozen class must have no effect. */ void freeze(); /** * Insp...
[ "public final boolean isFrozen() { return frozen; }", "public void freeze() {\n\t\tthis.__freezed = true;\n\t}", "public boolean isFrozen() {\n\n return frozen;\n\n }", "public void toggleFrozen() {\r\n setFrozen(!frozenFlag);\r\n }", "public boolean isFrozen() {\r\n return this.frozen;...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Hashtable is a class and can take any values for below case in key value pair form
public static void main(String[] args) { Hashtable h = new Hashtable(); h.put("A", "Test");//h.put(key, value); h.put("B", "Hello"); h.put("C", "World"); System.out.println(h.size()); h.put(1, 100);//put to insert data h.put(2, 200); h.put(3, 300); h.put(4, 400); System.out.println(h.size()); ...
[ "public BVHashtable(Hashtable hashtable)\n {\n super(hashtable);\n }", "public static void main( String[] args )\n {Hashtable ht =new Hashtable();\n//\t\tht.put(\"A\",101);\n//\t\t\n//\t\tHashMap hm = new HashMap();\n//\t\thm.put(\"A\",101);\n//\t\t\n\n HashMap<String, Integer> hm = new Has...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column jc_painted_egg.purchased
public void setPurchased(Integer purchased) { this.purchased = purchased; }
[ "public void setPurchased(Boolean purchased) {\n this.isPurchased = purchased;\n }", "void setPurchasedProductId(java.lang.String purchasedProductId);", "public void setWasPurchased(int wasPurchased) {\n this.wasPurchased = wasPurchased;\n }", "void xsetPurchasedProductId(org.apache.xmlbea...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Fill the canvas with blue as a "sky"
void drawSky() { Paint color = canvas.getFill(); canvas.setFill(Color.DEEPSKYBLUE); canvas.fillRect(0, 0, mainCanvas.getWidth(), mainCanvas.getHeight()); canvas.setFill(color); }
[ "@Override\n public void fill() {\n graphicsEnvironmentImpl.fill(canvas);\n }", "void drawGrass()\n {\n \tPaint color = canvas.getFill();\n \tcanvas.setFill(Color.GREEN);\n \tcanvas.fillRect(0, mainCanvas.getHeight()-30, mainCanvas.getWidth(), 30);\n \tcanvas.setFill(color);\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
add stored cookies to new URLConnection
private void setCookies(URLConnection conn) { if (cookies.isEmpty()) {conn.setRequestProperty("Cookie", ""); return;} conn.setRequestProperty("Cookie", cookies); processor.printSys("Cookies Set: " + cookies); }
[ "private void storeCookiesFromResponse(HttpURLConnection connection) {\n try {\n logger.finest(\"Storing cookie.\");\n cookieManager.put(connection.getURL().toURI(), connection.getHeaderFields());\n } catch (IOException e) {\n throw wrapIOException(\"Failed to read coo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets ith "CPixSize" element
org.apache.xmlbeans.XmlObject getCPixSizeArray(int i);
[ "org.apache.xmlbeans.XmlObject[] getCPixSizeArray();", "org.apache.xmlbeans.XmlObject getCSizeArray(int i);", "org.apache.xmlbeans.XmlObject[] getCSizeArray();", "public int getQixSize() {\n return qixSize;\n }", "org.apache.xmlbeans.XmlObject addNewCPixSize();", "void setCPixSizeArray(int i, or...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
returns table full of sponsors(persons)
public TableView sponsorsTable(ArrayList<Person> list) { TableColumn<Person, String> addColumn = new TableColumn<>("Address"); addColumn.setMinWidth(200); addColumn.setCellValueFactory(new PropertyValueFactory<>("address")); TableColumn<Person, String> emailColumn = new TableColumn<>("Email"); emailColumn.s...
[ "public Hashtable<String,Person> getAllPerson();", "public List<Person> getAllPersons();", "List<Person> getAllPersons();", "void makeSponsorTable(Table table, String organizationName);", "public List<Person> allPersons() {\r\n\t return pRepo.findAll();\r\n\t }", "protected void createTablePersons() {...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the student_prizes of this primary school student.
public void setStudent_prizes(java.lang.String student_prizes) { _primarySchoolStudent.setStudent_prizes(student_prizes); }
[ "public void setPrizes(double prizes) {\r\n this.prizes = prizes;\r\n }", "public java.lang.String getStudent_prizes() {\n\t\treturn _primarySchoolStudent.getStudent_prizes();\n\t}", "public void setNumberOfPrize(Integer numberOfPrize) {\n this.numberOfPrize = numberOfPrize;\n }", "@Overri...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the holdPaymentFlag value for this Account.
public void setHoldPaymentFlag(java.lang.String holdPaymentFlag) { this.holdPaymentFlag = holdPaymentFlag; }
[ "public java.lang.String getHoldPaymentFlag() {\n return holdPaymentFlag;\n }", "protected final void setIsBillPaid(boolean isBillPaid) {\r\n\r\n\t\tthis.isBillPaid = isBillPaid;\r\n\t}", "@ServiceMethod(returns = ReturnType.SINGLE)\n public BlobLegalHoldResult setLegalHold(boolean legalHold) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the nth reply
public String getNthReply(int n) { return (String)replies.get(n); }
[ "private synchronized void increReply(){\n numberOfReply ++;\n }", "public E waitAndGetTheNth(int n) {\n E o = this.memberList.get(n);\n PAFuture.waitFor(o);\n return o;\n }", "public int getReplyCount()\n {\n return reply.size();\n }", "public int getReplyCount(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__XAnnotationValueFieldReference__Group__1__Impl" $ANTLR start "rule__XAssignment__Group_0__0" ../org.xtext.guicemodules.ui/srcgen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:5102:1: rule__XAssignment__Group_0__0 : rule__XAssignment__Group_0__0__Impl rule__XAssignment__...
public final void rule__XAssignment__Group_0__0() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:5106:1: ( rule__XAssignment__Group_0__0...
[ "public final void rule__XAssignment__Group_1_1_0__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:5364:1: ( ( ( rul...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
validate if the roomBooking Object is valid or not
@CrossOrigin(origins = "http://localhost:3000") boolean isValidNewBooking(Booking roomBooking) { //if(this.roomRepository.findOne(roomBooking.getRoomId()) ==null) //return false; int duration = roomBooking.getTo() - roomBooking.getFrom() +1; List<Pair> allSlotsAvailable = getPossibleList(duration,roomB...
[ "void validateBooking(TaxiBooking booking) throws ConstraintViolationException, ValidationException {\n // Create a bean validator and check for issues.\n Set<ConstraintViolation<TaxiBooking>> violations = validator.validate(booking);\n\n if (!violations.isEmpty()) {\n throw new Cons...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method taking two file names as strings and processing them to look for common words
public void determineCommonWord(String file1, String file2) throws FileNotFoundException{ this.file1Name=file1; this.file2Name=file2; this.file1CountMap=getCountMap(new File(file1)); this.file2CountMap=getCountMap(new File(file2)); this.commonWordSet = file1CountMap.keySet(); commonWordSet.retainAll(file2C...
[ "public static void main(String[] args) {\r\n String dir = System.getProperty(\"user.dir\");\r\n String wordsDir = dir + \"\\\\words.txt\";\r\n String textDir = dir + \"\\\\text.txt\";\r\n String resultDir = dir + \"\\\\words with occurances.txt\";\r\n\r\n Path wordsPath = Paths.g...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }