query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
Gets the title of the agreement.
public String getAgreementTitle() { return lookupValue(Param.AGREEMENT_TITLE); }
[ "public String getAgreementCheckTitle() \r\n\t{\r\n\t\treturn lookupValue(Param.AGREEMENT_CHECK_TITLE);\r\n\t}", "public String getTitle() {\r\n return insertMode ? \"\" : stringValue(CONTACTS_TITLE);\r\n }", "@Override\n\tpublic java.lang.String getTitle() {\n\t\treturn _announcement.getTitle();\n\t}...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generates the following test fixtures: Substances (children of SUBSTANCE): INGREDIENT1 (ingredient with three inbound from PANADOL and ABACAVIR TABLET) INGREDIENT2 (ingredient with five inbound from TRIPHASIL AND PANADOL AND ABACAVIR TABLET) Drugs (children of DRUG_ROOT): ABACAVIR_TABLET (drug with two outgoing inferre...
private void generateHierarchy() { index().write(MAIN, currentTime(), writer -> { // substances writer.put(nextStorageKey(), concept(INGREDIENT1) .parents(SUBSTANCEL) .statedParents(SUBSTANCEL) .build()); writer.put(nextStorageKey(), concept(INGREDIENT2) .parents(SUBSTANCEL) .statedP...
[ "private void generateDrugHierarchy() {\n\t\tindex().write(MAIN, currentTime(), writer -> {\n\t\t\t// substances\n\t\t\twriter.put(nextStorageKey(), concept(INGREDIENT1)\n\t\t\t\t\t.parents(SUBSTANCEL)\n\t\t\t\t\t.statedParents(SUBSTANCEL)\n\t\t\t\t\t.build());\n\t\t\twriter.put(nextStorageKey(), concept(INGREDIENT...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the sim pro science app link persistence.
public void setSimProScienceAppLinkPersistence( SimProScienceAppLinkPersistence simProScienceAppLinkPersistence) { this.simProScienceAppLinkPersistence = simProScienceAppLinkPersistence; }
[ "public SimProScienceAppLinkPersistence getSimProScienceAppLinkPersistence() {\n\t\treturn simProScienceAppLinkPersistence;\n\t}", "public void setSimProScienceAppLinkFinder(\n\t\tSimProScienceAppLinkFinder simProScienceAppLinkFinder) {\n\t\tthis.simProScienceAppLinkFinder = simProScienceAppLinkFinder;\n\t}", "...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
repeated string invitee_ids = 1;
public com.google.protobuf.ProtocolStringList getInviteeIdsList() { return inviteeIds_; }
[ "public Builder addInviteeIds(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInviteeIdsIsMutable();\n inviteeIds_.add(value);\n onChanged();\n return this;\n }", "public java.lang.String getInviteeIds(int index) {\n return ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
encodes a tool card one event
public ArrayList<String> encodeToolCardOneEvent(ToolCardOneEvent toolCardOneEvent) { ArrayList<String> temp = new ArrayList<String>(); temp.add(transformer.simpleEncode("id",Integer.toString(toolCardOneEvent.getId()))); temp.add(transformer.simpleEncode("index",Integer.toString(toolCardOneE...
[ "byte[] encode(E event);", "public ArrayList<String> encodeToolCardTwelveEvent(ToolCardTwelveEvent toolCardTwelveEvent)\n {\n ArrayList<String> temp = new ArrayList<String>();\n\n temp.add(transformer.simpleEncode(\"id\",Integer.toString(toolCardTwelveEvent.getId())));\n temp.add(transform...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Use this API to unset the properties of policyexpression resources. Properties that need to be unset are specified in args array.
public static base_responses unset(nitro_service client, String name[], String args[]) throws Exception { base_responses result = null; if (name != null && name.length > 0) { policyexpression unsetresources[] = new policyexpression[name.length]; for (int i=0;i<name.length;i++){ unsetresources[i] = new pol...
[ "public static base_responses unset(nitro_service client, policyexpression resources[], String[] args) throws Exception {\n\t\tbase_responses result = null;\n\t\tif (resources != null && resources.length > 0) {\n\t\t\tpolicyexpression unsetresources[] = new policyexpression[resources.length];\n\t\t\tfor (int i=0;i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Original signature : void OpenMM_AmoebaGeneralizedKirkwoodForce_getParticleParameters(const OpenMM_AmoebaGeneralizedKirkwoodForce, int, double, double, double)
public static native void OpenMM_AmoebaGeneralizedKirkwoodForce_getParticleParameters(PointerByReference target, int index, DoubleBuffer charge, DoubleBuffer radius, DoubleBuffer scalingFactor);
[ "public static native void OpenMM_AmoebaGeneralizedKirkwoodForce_getParticleParameters(PointerByReference target, int index, DoubleByReference charge, DoubleByReference radius, DoubleByReference scalingFactor);", "public static native void OpenMM_AmoebaVdwForce_getParticleParameters(PointerByReference target, int...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the number of working units associated with the job pos.
@Override public int getWorkingUnitsSize(long pk) throws SystemException { long[] pks = jobPosToWorkingUnitTableMapper.getRightPrimaryKeys(pk); return pks.length; }
[ "public static int getWorkingUnitsCount()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException {\n\t\treturn getService().getWorkingUnitsCount();\n\t}", "long getConsumedWorkUnits();", "public int getNumberOfUnits() {\n return (numberOfUnits);\n }", "public int getNbOfUnits(){\r\n\t\tretu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new PdfData RecordBuilder by copying an existing Builder.
public static com.bdcor.util.temp2pdf.proto.PdfData.Builder newBuilder(com.bdcor.util.temp2pdf.proto.PdfData.Builder other) { return new com.bdcor.util.temp2pdf.proto.PdfData.Builder(other); }
[ "private Builder(com.bdcor.util.temp2pdf.proto.PdfData other) {\n super(SCHEMA$);\n if (isValidValue(fields()[0], other.pdfData)) {\n this.pdfData = data().deepCopy(fields()[0].schema(), other.pdfData);\n fieldSetFlags()[0] = true;\n }\n }", "public static iodine.avro.TapReco...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Decodes string x1, y1, r, g, b[, alpha], x2, y2, r, g, b[, alpha] into a Gradient object
Gradient decodeGradient(String p) { StringTokenizer st = new StringTokenizer(p, ","); int cnt = st.countTokens(); if (cnt < 10) { return null; } int[] d = new int[cnt]; int tokens = 0; while (st.hasMoreTokens()) { d[tokens] = Integer.parseI...
[ "Gradient gradientAt(Point point);", "public static PointState decode(String value) throws Exception {\n if(value.length() == 3) {\n String color = value.substring(0, 1);\n int quantity = Integer.parseInt(value.substring(1, 3));\n return valueOf(Color.decode(color), quantit...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return an object representing the DTE at the specified row.
public Object getRowObject(int row) { if (row < 0 || row >= dataTypes.size()) return null; return dataTypes.elementAt(row); }
[ "public Object getObject(int row);", "public Object getObject(int row) {\n return objectMap.get(row);\n }", "public Entity getEntityAtRow( int row )\r\n {\r\n return (Entity) getValueAt( row, LINK_VALUE );\r\n }", "public Object getObjectAt(int row)\n {\n return ((IteratorTableMo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieve TSalesPosAttr based on given search criteria using Dynamic JPAQL.
public List<TSalesPosAttr> findTSalesPosAttrs(final SearchFilter<TSalesPosAttr> searchFilter) { LOGGER.info("=========== Find TSalesPosAttrs ==========="); final PaginationInfo paginationInfo = searchFilter.getPaginationInfo(); final OperatorInfo operatorInfo = searchFilter.getOperatorInfo(); final TSalesPosA...
[ "public List<TSalesPosAttr> getTSalesPosAttrsByTSalesPos(final SearchFilter<TSalesPos> searchFilter) {\n\n\t\tfinal PaginationInfo paginationInfo = searchFilter.getPaginationInfo();\n\t\tList<Object> queryParam=new ArrayList<Object> ();\n\t\tqueryParam.add(searchFilter.getEntityClass());\n\t\tfinal int maxresult = ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end rule__NamespaceDeclaration__UriAssignment_1_1 $ANTLR start rule__SignatureDeclaration__SigNameAssignment_1 ../info.kwarc.elf.ui/srcgen/info/kwarc/ui/contentassist/antlr/internal/InternalElf.g:928:1: rule__SignatureDeclaration__SigNameAssignment_1 : ( RULE_ID ) ;
public final void rule__SignatureDeclaration__SigNameAssignment_1() throws RecognitionException { int stackSize = keepStackSize(); try { // ../info.kwarc.elf.ui/src-gen/info/kwarc/ui/contentassist/antlr/internal/InternalElf.g:932:1: ( ( RULE_ID ) ) // ../info.kwar...
[ "public final void rule__SignatureDeclaration__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../info.kwarc.elf.ui/src-gen/info/kwarc/ui/contentassist/antlr/internal/InternalElf.g:459:1: ( ( ( rule__SignatureDeclaration__Si...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set game list sort choice.
public static void setGamelistSort(int selection) { prefs.putInt(GAMELIST_SORT_KEY, selection); }
[ "public void changeSortOrder();", "public void setSort(int v) \r\n {\r\n\r\n if (this.sort != v)\r\n {\r\n this.sort = v;\r\n setModified(true);\r\n }\r\n\r\n\r\n }", "void setSortingPreference(String newSortingPreference);", "public void setSongListSortBy(Stri...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates new form MainFrame
public MainFrame() { initFrame(); }
[ "protected MainFrame newFrame() {\n return new MainFrame(\"New Window\");\n }", "public MainFrame() {\r\n\t\tinitCode();\r\n\t\tinitComponents();\r\n\t}", "public MainFrame() {\n initComponents();\n initializeAfterFrame();\n }", "public MainFrame() {\n initComponents();\n \n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
To get Query builder dGrid header cell number
public static int queryBuilderdGridHeaderCellNumber(String dGridHeaderName, int lastRowInExcel, String sheetName) throws Exception{ int dGridheaderCellNum = 0; try { Thread.sleep(1000); WebElement dGridHeader = driver.findElement(By.className("compareHeaderTable")); if(dGridHeader.isDisplayed()){ ...
[ "public static int dGridHeaderCellNumber(String dGridHeaderName, int lastRowInExcel, String sheetName) throws Exception{\r\n\t\tint dGridheaderCellNum = 0;\r\n\t\ttry {\r\n\t\t\tSystem.out.println(\"into grid header cell number method\");\r\n\t\t\tWebElement dGridHeader = driver.findElement(By.className(\"dgrid-hea...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Equivalent to ec_decode() with _ft == 1<<_bits.
final int ec_decode_bin(final int _bits) { this.ext = this.rng >>> _bits; long s = (this.val / this.ext); // return (int)((1L << _bits) - EC_MINI( s + 1L, 1L << _bits )); s++; long b = 1L << _bits; b -= s; if( b > 0 ) { b = 0; } s += b; return (int)((1L << _bits) - s); }
[ "byte decodeByte();", "T decode() throws IOException;", "private float decodeTemperature(byte msb, byte lsb) {\n return ((msb << 8) | (lsb & 0xff)) / 256f;\n }", "final void ec_dec_update(final int _fl, final int _fh, final int _ft) {// FIXME calling with int\r\n\t\t// java: if ft > fh > fl, than & ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Lookup the anchorTrace to find the branch hanging off it. If there isn't one, then install branch as that branch. Otherwise walk a balanced walk down the binary tree of branches to find a place to hang the new branch.
public void installBranchAfter(BranchDescription branch, TracePosition anchorTrace) { BranchDescription prevBranch; Position pos; prevBranch = (BranchDescription) (myTrunk.fetch((pos = HeaperAsPosition.make(anchorTrace)))); if (prevBranch == null) { myTrunk.introduce(pos, branch); } else { prevBranch.installB...
[ "HibBranch getInitialBranch();", "public void installBranch(BranchDescription branch) {\n\tif (branch.isEqual(this)) {\n\t\treturn ;\n\t}\n\tdiskUpdate();\n\tif (myLeft == null) {\n\t\tmyLeft = branch;\n\t}\n\telse {\n\t\tBranchDescription tmpBr;\n\t\tmyLeft.installBranch(branch);\n\t\ttmpBr = myLeft;\n\t\tmyLeft...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A DIME request is really a SOAP request that we are dealing with, and so its authentication is the SOAP authentication approach. Since Axis2 does not handle DIME messages we deal with them here.
private void processDimeRequest(HttpServletRequest request, HttpServletResponse response) { S3PutObjectRequest putRequest = null; S3PutObjectResponse putResponse = null; int bytesRead = 0; S3Engine engine = new S3Engine(); try { logRequest(request); Mul...
[ "private AuthnRequestType parseBaseAttributes(StartElement startElement) throws ParsingException {\n super.parseRequiredAttributes(startElement);\n AuthnRequestType authnRequest = new AuthnRequestType(id, issueInstant);\n // Let us get the attributes\n super.parseBaseAttributes(startElem...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
calculates average based on given sum and count
private void calculateAverage() { average = ((double)(sum))/((double)(count)); }
[ "double AverageAllPrimeNumInRange(int sumOfPrimeNum, int countOfPrimeNum) {\n\t\treturn (double)sumOfPrimeNum/countOfPrimeNum;\n\t}", "double average() {\n\t\tdouble total = this.sum();\n\t\tdouble count = this.count();\n\t\tdouble average = total / count;\n\t\treturn average;\n\t}", "private float calcAvg() {\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a new solution from the neighbourhood of the current solution by randomly taking or leaving one item
private Solution getNeighbourSolution(int size) { Solution solution = new Solution(currentSol); // Choose a random item to take/leave int index = generator.nextInt(size); solution.set(index, Math.abs(currentSol.get(index) - 1)); return solution; }
[ "@Override\n\tpublic Solution getRandomNeighbor(Solution solution){\n\t\tSolution n = solution.duplicate();\n\t\tObject[] values = n.getValues();\n\t\tint[] idxs = choiceDimensionsForPerturb();\n\t\tfor (int i = 0; i < idxs.length; ++i){\n\t\t\tint idx = idxs[i];\n\t\t\tvalues[idx] = perturb(idx, (Double) values[id...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get IoT Defender Settings.
IotDefenderSettingsModel get();
[ "@java.lang.Override\n public google.maps.fleetengine.v1.DeviceSettings getDeviceSettings() {\n return deviceSettings_ == null ? google.maps.fleetengine.v1.DeviceSettings.getDefaultInstance() : deviceSettings_;\n }", "IotDefenderSettingsList list();", "public google.maps.fleetengine.v1.DeviceSettings getDe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds all player instances from the provided list to the playerList. Values: A player in this game.
public Builder addAllPlayer(List<String> playerList) { checkListForNull(playerList); game.playerList.addAll(playerList); return this; }
[ "public void setPlayersList(ArrayList<Player> playersList) {\n this.playersList = playersList;\n }", "public void addToPlayerlist(ServerPlayer player) {\r\n players.add(player);\r\n }", "public void setPlayers(List<Player> players) {\n this.players = players;\n }", "public void a...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test Case ID: TC2788_GenerateMobileEQReportUsingCopyFunctionalityWithAssessmentSurveys Test Description: Generate Mobile EQ reports using copy functionality with Assessment surveys Script: Customer has Mobile EQ and Assessment licenses; Mobile EQ and Assessment surveys exist for customer; Customer has at least one EQ r...
@Ignore /*SUR-293 to track the issue in this test*/ @UseDataProvider(value = EQReportDataProvider.EQ_REPORT_PAGE_ACTION_DATA_PROVIDER_TC2788, location = EQReportDataProvider.class) public void TC2788_GenerateMobileEQReportUsingCopyFunctionalityWithAssessmentSurveys( String testCaseID, Integer userDataRowID, Intege...
[ "@Test\n\t@UseDataProvider(value = EQReportDataProvider.EQ_REPORT_PAGE_ACTION_DATA_PROVIDER_TC2419, location = EQReportDataProvider.class)\n\tpublic void TC2419_MobileEQReportsWithAnalyticsSurveys(\n\t\t\tString testCaseID, Integer userDataRowID, Integer reportDataRowID1, Integer reportDataRowID2) throws Exception ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
a method to zero the current login attempts
public void zeroConsecutiveLoginAttempts(){ consecutiveLoginAttempts = 0; }
[ "void resetLoginAttempts(String username);", "public void resetAttempts() {\r\n\t\tif (attempts != null && attempts.intValue() > 0) {\r\n\t\t\tattempts = 0;\r\n\t\t}\r\n\t}", "int getNumberOfLoginAttempts()\r\n\t{\r\n\t\treturn 0;\r\n\t}", "User resetLoginAttempts(Long id);", "public void resetAttackAttempt...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
if user add name Arabic 30 char
@Test(priority = 7) public void IfUseAddNameArabicThirty() { addNewOfferPage.AddTextInOfferNameArabic("TeeeeeeeeeTeeeeeeeeeTeeeeeeeee"); addNewOfferPage.ClickToSave(); driver.navigate().refresh(); }
[ "@Test(priority = 3)\n public void IfUseAddNameArabicSpaces() {\n addNewOfferPage.AddTextInOfferNameArabic(\" \");\n addNewOfferPage.ClickToSave();\n Assert.assertTrue(addNewOfferPage.errorMsgNameAr.getText().contains(\"This field is required\"));\n driver.navigate().refresh();...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the categoryLevel value for this CategoryT.
public void setCategoryLevel(int categoryLevel) { this.categoryLevel = categoryLevel; }
[ "public void setCatLevel(int value) {\n this.catLevel = value;\n }", "public void setLvlCategory(Short lvlCategory) {\r\n this.lvlCategory = lvlCategory;\r\n }", "public static synchronized void setLoggingLevel(String category, Level level) {\r\n String prefix = getLoggingPrefix(cate...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add dependency between requests
public void addDependency(ExtractedRequest r) { this.dependencies.add(r.id); }
[ "protected void addDependencies(MRSubmissionRequest request) {\n // Guava\n request.addJarForClass(ThreadFactoryBuilder.class);\n }", "private void addRequest(InstanceRequest request) {\r\n\t\t\r\n\t}", "void addDependency(T dependency);", "void addDependsOnMe(DependencyItem dependency);", "public vo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Notify loadcomments result to UI for updating UI
@Override protected void notifyDataLoadResult( LoadDataParams loadDataParams, LoadDataResult<PostComment> result) { EventBus.getDefault().post( new LoadCommentsResultEvent(loadDataParams, result)); }
[ "private void loadComments(ArrayList<Comment> comments) {\r\n\t\t\tif (comments == null) {\r\n\t\t\t\tLog.d(\"help\", \"Comments returned null!\");\r\n\t\t\t\tcommentsView.addView(CommentView.noResultsView(getActivity().getApplicationContext()));\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tfor (Comment comment...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Redo the last n undone commands. Do nothing if n is zero or negative.
public void redoUndoneCommands(int n) { // TODO: Also three lines of code for(int i=0;i<n;i++) redoUndoneCommand(); }
[ "public void redoUndoneCommands(int n) {\r\n for(int i = 0; i < n; i++) redoUndoneCommand();\r\n }", "public void undoCommands(int n) {\r\n \tfor(int i = 0; i < n; i++) undoCommand();\r\n }", "public void undoCommands(int n) {\r\n \t// TODO: Three lines of code, if you use undoCommand\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new HoverCamera3D object.
public HoverCamera3D(int zoom, int focus, Object3D target, int panAngle) { super(zoom, focus); // TODO Auto-generated constructor stub }
[ "public HoverCamera3D() {\r\n\t\tsuper(1, 1, null);\r\n\t\t// TODO Auto-generated constructor stub\r\n\t}", "public HoverCamera3D(int zoom) {\r\n\t\tsuper(1, 1, null);\r\n\t\t// TODO Auto-generated constructor stub\r\n\t}", "public HoverCamera3D(int zoom, int focus, Object3D target) {\r\n\t\tsuper(1, 1, null);\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Whether the controller service persists state.
@ApiModelProperty(example = "null", value = "Whether the controller service persists state.") public Boolean getPersistsState() { return persistsState; }
[ "public boolean isPersisted() {\n return systemId!=NOT_PERSISTED;\n }", "public boolean isPersisted() {\n return (buffer == null || buffer.isPersisted());\n }", "public boolean saveInStore() {\n return this.saveInStore(false);\n }", "@Override\n public boolean isPersistent() {...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Writes row list to file.
private void writeRowListToFile(List<String> rowList, String filePath) { try (BufferedWriter fileWriter = new BufferedWriter(new FileWriter(filePath))) { for (String row : rowList) { fileWriter.write(row); } } catch (IOException e) { LOGGER.error(e.get...
[ "public static void writeTsv(List<List<String>> rows, String filename) throws IOException \n\t{ \n\t FileWriter fileWriter = new FileWriter(filename);\n\t PrintWriter printWriter = new PrintWriter(fileWriter);\n\t \n\t\t// print row and columns\n\t\tfor (List<String> r : rows) {\n\t\t\tfor (String s : r) ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the dxaColWidthWwd field for the TAP record.
public int getDxaColWidthWwd() { return field_30_dxaColWidthWwd; }
[ "public void setDxaColWidthWwd( int field_30_dxaColWidthWwd )\n {\n this.field_30_dxaColWidthWwd = field_30_dxaColWidthWwd;\n }", "public short getWWidth()\n {\n return field_9_wWidth;\n }", "public short getWWidthAfter()\n {\n return field_12_wWidthAfter;\n }", "public ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the installation base directory. Currently used by info command only.
public Path getInstallBase() { return installBase; }
[ "String getInstallRoot();", "public String getInstallRoot() {\n return installRoot != null ? installRoot.getAbsolutePath() : \".\";\n }", "public static String getDefaultInstallDir() {\r\n\t\treturn defaultInstallDir;\r\n\t}", "public static String getBaseDirectory() {\n\t\tString base = isLabComput...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the DirectoryLookupService to do the lookup. It is thread safe.
public DirectoryLookupService getLookupService(){ return lookupService; }
[ "public static LdapApiService getSingleton()\n {\n if ( ldapCodecService == null )\n {\n initialize( null );\n }\n\n return ldapCodecService;\n }", "public static SearchServiceManager getInstance() {\n\t\tif (instance == null) {\n\t\t\tinstance = new SearchServiceManag...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the information about all the parsed classes.
public ClassInfo[] getClasses() { return classes.toArray(new ClassInfo[classes.size()]); }
[ "@NotNull\n List<? extends ClassInfo> getAllClasses();", "@NotNull\n List<? extends ClassInfo> getClasses();", "public Cursor getAllClasses() {\n\t\treturn myDataBase.rawQuery(\"SELECT * FROM class_info\", null);\n\t}", "private ArrayList<String> getAllClasses() {\n ArrayList<String> classesNames...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
namedFitler xxx = :_0 and yyy = :_1
public SimplePlaceholderFilterImpl(String namedFitler, Object ...params) { Map<String,Object> namedParams = new HashMap<String, Object>(); int index = 0; for(Object param : params ) { namedParams.put("_"+index, param); index++; } _init(namedFitler,namedParams,null,null,null); }
[ "public interface ILocalFitParams {\n \n public void setY(double[] y);\n \n public double[] getY();\n \n public void setSig(double[] sig);\n \n public double[] getSig();\n \n public void setParams(double[] params);\n \n public double[] getParams();\n \n public void setYFitt...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ getMaxScore : int Returns the player's maximum score as an integer.
public int getMaxScore() { return maxScore; }
[ "public Integer getMaxScore() {\n return maxScore;\n }", "public double getMaxScore(){\n\t\treturn this.maxScore;\n\t}", "public int getHighestScore() {\n\t\treturn highestScore;\n\t}", "public int getMaxScore() {\n\n\t\tint max = 0;\n\t\tfor (Player p : players) {\n\t\t\tif (p.hasPlayed) {\n\t\t\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Make sure the equals contract is obeyed
@Test public void equalsContract() { EqualsVerifier.forClass(ExperienceChangedReport.class).verify(); }
[ "public void testEquals() {\n // TODO: implement test\n }", "public void testEquals() {\n assertTrue(cone1.equals(cone1));\n assertFalse(cone1.equals(not));\n assertFalse(cone1.equals(addFlavor));\n assertTrue(cone1.equals(same));\n assertFalse(cone1.equals(diff));\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets (as xml) the "parts" attribute
public void xsetParts(org.apache.xmlbeans.XmlNMTOKENS parts) { synchronized (monitor()) { check_orphaned(); org.apache.xmlbeans.XmlNMTOKENS target = null; target = (org.apache.xmlbeans.XmlNMTOKENS)get_store().find_attribute_user(PARTS$0); if (target ==...
[ "public void setParts(java.util.List parts)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(PARTS$0);\n if (target == null)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
calculate bands calls all methods involved in updating the bands
public void updateBands() { if (this.isFull()) { calcInboundBand(); calcOutboudBand(); calcVisible(); } }
[ "private void calculateStatistics() {\n minMaxVals = new MinMaxVals(nrSubbands);\n for (int time = 0; time < nrTimes; time++) {\n for (int sb = 0; sb < nrSubbands; sb++) {\n for (int ch = 0; ch < nrChannels; ch++) {\n if (initialFlagged[time][sb][ch]) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates an lookup for given lookup. This class just returns the object passed in, but subclasses can be different.
public Lookup createLookup (Lookup lookup);
[ "public static Lookup createLookup(ObjectDefinition objectDefinition) {\r\n\t\tLookup l = new Lookup(objectDefinition);\r\n\t\treturn l;\r\n\r\n\t}", "protected Lookup createLookup() {\n return null;\n }", "public static Lookup createLookup(InputStream objectDefinition) {\r\n\r\n\t\tLookup l = new Loo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
end file constructor / Checks if a provider status assigned is valid and return true or false accordingly
@Override public boolean isValidStatus(Status status) { return status.isProvider()&& super.isValidStatus(status); }
[ "boolean isSetCryptProvider();", "public StatusProvider() {\n System.out.println(\"StatusProvider initialized\");\n }", "private boolean initIsEligible() {\n if (!ProviderEligibilityChecker.isEligible(mContext, mId, mResolveInfo)) {\n return false;\n }\n if (!Connectivi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column ehr_contract.positive_salary
public BigDecimal getPositiveSalary() { return positiveSalary; }
[ "public BigDecimal getSalaryLower() {\n return salaryLower;\n }", "public void setPositiveSalary(BigDecimal positiveSalary) {\n this.positiveSalary = positiveSalary;\n }", "public String getSalary() {\n return salary;\n }", "int getSalary();", "@Override\n public double sala...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the cscl appointee master with the primary key or returns null if it could not be found.
@Override public CsclAppointeeMaster fetchByPrimaryKey(long id_) { return fetchByPrimaryKey((Serializable)id_); }
[ "public CsclAppointeeMaster fetchByPrimaryKey(long id_);", "@Override\n\tpublic CsclAppointeeMaster findByPrimaryKey(Serializable primaryKey)\n\t\tthrows NoSuchCsclAppointeeMasterException {\n\n\t\tCsclAppointeeMaster csclAppointeeMaster = fetchByPrimaryKey(primaryKey);\n\n\t\tif (csclAppointeeMaster == null) {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Clears the value of the 'accountID' field
public Builder clearAccountID() { fieldSetFlags()[2] = false; return this; }
[ "public Builder clearAccountID() {\n fieldSetFlags()[0] = false;\n return this;\n }", "public void clearAccount(){\n this.account = null;\n }", "void unsetAccountNumber();", "public Builder clearAccountNumber() {\n fieldSetFlags()[0] = false;\n return this;\n }", "public ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a JSON string with the given error message.
private String getJSONError(String exception, String message) { return "{\"error\":\""+exception+"\",\"message\":\""+message+"\"}"; }
[ "public String generateJsonErrorResponse(String message) {\n return String.format(\"{ \\\"errorMessage\\\" : \\\"%s\\\" }\", message);\n }", "public String toJsonString() {\n JSONObject json = toJson();\n String jsonString;\n if (json == null)\n jsonString = \"{\\\"message\\\":...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructor. Sets the (x,y) position and the deadband
public AutonPoint(double ax, double ay, double aDb) { x = ax; y = ay; deadband = aDb; }
[ "public CarrierShip(int x, int y)\n {\n super(x,y);\n offset = 0;\n isSpawning = false;\n adjustPosition();\n }", "public Position()\r\t{\r\t\txPosition = 0;\r\t\tyPosition = 0;\r\t}", "public Dragon(int x, int y){\n\t\tsuper(x,y,'D');\n\t\tstate = State.AWAKE;\n\t}", "publi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Roundout Double to 3decimals return String
public String roundoutNumberToThree(double number) { DecimalFormat f = new DecimalFormat("#.###"); return f.format(number); // this is String }
[ "public static String formatDecimal3Places(double x) {\n double scaleFactor = 1000.0;\n return String.format(\"%.3f\", round(x * scaleFactor) / scaleFactor);\n }", "public String roundoutRatioToThree(double numerator, double denominator ) {\n\t\t\tDecimalFormat f = new DecimalFormat(\"#.###\");\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Disconnects from the XenServer host.
public void disconnect() throws MonitorException { LOGGER.trace("Disconnecting from XenServer [{}]", connection.getSessionReference()); try { // Logout from hypervisor and end connection Session.logout(connection); connection.dispose(); connec...
[ "public void disconnect()\n\t{\n\t\tif (isConnected)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tvimPort.logout(serviceContent.getSessionManager());\n\t\t\t}\n\t\t\tcatch (Exception e)\n\t\t\t{\n\t\t\t\tlogger.trace(\"Failed to logout esx: \" + host, e);\n\t\t\t}\n\t\t}\n\t\tisConnected = false;\n\t}", "private void disc...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
=========================================================== Prints the maze grid. ===========================================================
public void print_maze () { System.out.println(); for (int row=0; row < grid.length; row++) { for (int column=0; column < grid[row].length; column++) System.out.print (grid[row][column]); System.out.println(); } System.out.println(); }
[ "public void print_maze () {\r\n \r\n System.out.println();\r\n\r\n for (int row=0; row < grid.length; row++) {\r\n for (int column=0; column < grid[row].length; column++)\r\n System.out.print (grid[row][column]);\r\n System.out.println();\r\n }\r\n\r\n System.out.pr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the products corresponding to the given identifier
Product getProduct(String identifier) throws ProductNotFoundException;
[ "public Product getProductByID(int id);", "Product getProduct(long id);", "Product get(final String id);", "@RequestMapping(value = \"/products/{id}\", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)\n public Product getProductById(@PathVariable(\"id\") String productId) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Receives game window controller object
public void getGameWindow(GameWindowController gwc) { gameWindowController = gwc; }
[ "public MainWndController getController()\n {\n return controller;\n }", "GameController makeGameController(LobbyController lobbyController);", "public GameController getController() {\n return controller;\n }", "void passController(GUIHandler controller){\n this.controller = con...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sends a request to Location Services to start sending location of the Android device periodically.
private void startPeriodicUpdates() { mDeviceLocationClient.requestLocationUpdates(mDeviceLocationRequest, this); }
[ "private void startPeriodicUpdates() {\n\t \t\tmLocationClient.requestLocationUpdates(mLocationRequest, this);\r\n\t \t \r\n\t \t }", "private void requestLocation(){\n Log.d(TAG, \"requestLocation: -----------\");\n request = TencentLocationRequest.create()\n .setInterva...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
GENFIRST:event_btnclearActionPerformed TODO add your handling code here:
private void btnclearActionPerformed(java.awt.event.ActionEvent evt) { try { clearForm(); } catch(Exception e) { e.printStackTrace(); } }
[ "private void btnClearActionPerformed(java.awt.event.ActionEvent evt) {\n clear();\n }", "private void btn_clearActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_clearActionPerformed\n clearValues();\n }", "private void btnClearActionPerformed(java.awt.event.ActionEvent ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return a single vendor user based on id
@GetMapping("/get/vendor/{id}") public ResponseEntity getSingleUserVendor(@PathVariable(value="id") Integer id, @RequestHeader(value="User-Data") String userData) {if (!hasAccess(userData)) return buildResponse(new ApiError(HttpStatus.FORBIDDEN, "You do not have access.", "You do not have the proper clearan...
[ "PlatformUser getPlatformUser(UUID id);", "public static Vendor getVendorByCustomId(User p_userQuerying, String id)\n throws EnvoyServletException\n {\n try\n {\n return ServerProxy.getVendorManagement().getVendorByCustomId(\n p_userQuerying, id);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the declared access rights for the specified Node for the given principalId.
AccessRights getDeclaredAccessRightsForPrincipal(Node node, String principalId) throws InternalException;
[ "AccessRights getEffectiveAccessRightsForPrincipal(Node node, String principalId) throws InternalException;", "Map<Principal, AccessRights> getDeclaredAccessRights(Node node) throws InternalException;", "AccessRights getDeclaredAccessRightsForPrincipal(Session session, String absPath, String principalId) throws...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks if Library Parse run Subscriber return book correctly throws a parse exception if an invalid bookId or catches an InstantiationException if a new subscriber cannot be created.
public static boolean testLibraryParseRunSubscriberReturnBookCommand() { boolean test = false;// boolean test set to false because must throw a ParseException to be // true try { // creates an new ExceptionalLibrary and a new Subscriber ExceptionalLib...
[ "public static boolean testparseRunSubscriberCheckoutBookCommand() {\n boolean test = false; // test set to false because must throw a ParseException to be\n // true\n try {\n // creates a new ExceptionalLibary and subscriber to be able to test method\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of verificaPossibilidade method, of class UsucapiaoJudicialFamiliar.
@Test public void testVerificaPossibilidade0() { String result = usucapiao.verificaRequisitos(); assertEquals("false", result); }
[ "@Test\r\n public void testVerificaPossibilidade8() {\r\n usucapiao.setAnimusDomini(true);\r\n usucapiao.setPosseMansa(true);\r\n usucapiao.setPossePassifica(true);\r\n usucapiao.setPosseIninterrupta(true);\r\n usucapiao.setBemComumCasal(true);\r\n usucapiao.setCompanhei...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get realms configuration file (either based on yanel configuration or based on environment variable)
private File getRealmsConfigFile(String yanelConfigurationFilename) throws ConfigurationException { // 1.) Getting realms.xml from environment variable YANEL_REALMS_HOME java.util.Map<String, String> env = System.getenv(); for (java.util.Map.Entry envEntry : env.entrySet()) { if (((...
[ "public String getRealmsConfigurationFile() {\n if (_realmsConfigFile != null && _realmsConfigFile.exists()) {\n return _realmsConfigFile.getAbsolutePath();\n } else {\n log.error(\"Either no realms configuration file was set or it does not exist: \" + _realmsConfigFile);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Copying routines (advance both srcPos and destPos)
private void copy(int numBytes) { for (int i = 0; i < numBytes; i++) { dest[destPos + i] = src[srcPos + i]; } srcPos += numBytes; destPos += numBytes; }
[ "public static void copy(IIntsReader src, int srcPos, IIntsMutable dest, \n\t\t\tint destPos, int len, int mem) {\n\t\tassert srcPos + len <= src.size();\n\t\tassert destPos + len <= dest.size();\n\t\t\n\t\tfinal int capacity = mem >>> 3;\n\t\tif (capacity == 0) {\n\t\t\tfor (int i = 0; i < len; ++i) {\n\t\t\t\tdes...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new primary school student with the primary key. Does not add the primary school student to the database.
public com.fsoft.bn.model.PrimarySchoolStudent createPrimarySchoolStudent( java.lang.String primaryStudent_id) { return _primarySchoolStudentLocalService.createPrimarySchoolStudent(primaryStudent_id); }
[ "@Override\n\tpublic Student create(long studentId) {\n\t\tStudent student = new StudentImpl();\n\n\t\tstudent.setNew(true);\n\t\tstudent.setPrimaryKey(studentId);\n\n\t\treturn student;\n\t}", "@Override\n public Student create(String key) {\n Student obj = new Student();\n obj.setId(key);\n return gen...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set value of LinkVisit_ToNodeVisit
public final void setLinkVisit_ToNodeVisit(com.mendix.systemwideinterfaces.core.IContext context, workflowexecution.proxies.NodeVisit linkvisit_tonodevisit) { if (linkvisit_tonodevisit == null) getMendixObject().setValue(context, MemberNames.LinkVisit_ToNodeVisit.toString(), null); else getMendixObject(...
[ "public final void setLinkVisit_ToNodeVisit(workflowexecution.proxies.NodeVisit linkvisit_tonodevisit)\r\n\t{\r\n\t\tsetLinkVisit_ToNodeVisit(getContext(), linkvisit_tonodevisit);\r\n\t}", "public final void setLinkVisit_FromNodeVisit(workflowexecution.proxies.NodeVisit linkvisit_fromnodevisit)\r\n\t{\r\n\t\tsetL...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Searches example comparisons from an evaluation. The return format is a list of example comparisons that show ground truth and prediction(s) for a single input. Search by providing an evaluation ID.
public com.google.common.util.concurrent.ListenableFuture< com.google.cloud.datalabeling.v1beta1.SearchExampleComparisonsResponse> searchExampleComparisons( com.google.cloud.datalabeling.v1beta1.SearchExampleComparisonsRequest request) { return io.grpc.stub.ClientCalls.futureUnaryC...
[ "public com.google.cloud.datalabeling.v1beta1.SearchExampleComparisonsResponse\n searchExampleComparisons(\n com.google.cloud.datalabeling.v1beta1.SearchExampleComparisonsRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getSearchExampleCompariso...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get all registered DiscordChatReceivers.
@SuppressWarnings("unused") public static List<DiscordChatReceiver> getReceiversList() { return DiscordListener.receivers; }
[ "Iterable<MessageReceiver> getReceivers();", "public List<PerunNotifReceiver> getAllPerunNotifReceivers();", "public ArrayList<IReceiver> getReceivers() {\n\t\treturn this.receivers;\n\t}", "public ArrayList<Receiver> getReceivers() {\r\n \t\treturn receivers;\r\n \t}", "public Map getReceivers();", "publ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
calculates deposit using age and gender only returns the percentage to be deducted from the total price
public static double CalculateDiscount(int age, String gender) { // for age between 0 - 17, return 75% if(age > 0 && age < 18) { return 0.75; } // for age greater than 40, return 50% else if(age > 40) { return 0.5; } // for female between 18 - 40, return 25% else if(gender.equalsIgnoreCase("fem...
[ "double getEmployerPaidPercentage();", "public static double discount(int age) {\n\t\t// 25% discount for children\n\t\tif(age <= CHILD_AGE) {\n\t\t\treturn 0.25;\n\t\t// 35% discount for senior citizens\n\t\t} else if(age >= SENIOR_AGE) {\n\t\t\treturn 0.35;\n\t\t// no discount for \"adults\"\n\t\t} else {\n\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Mutator method to set m_yearsUntilRetirement to yearsUntilRetirement.
public void setYearsUntilRetirement(int yearsUntilRetirement) { m_yearsUntilRetirement = yearsUntilRetirement; }
[ "public int getYearsUntilRetirement() {\n return m_yearsUntilRetirement;\n }", "public int getYearsInRetirement() {\n\t\treturn yearsInRetirement;\n\t}", "public void setYears(double years){\r\n\t\tthis.years = years;\r\n\t}", "void setYears(int x) {\n\t\tyearsWorked = x;\r\n\t}", "void setMaxYears(int ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a validating method visitor.
protected ValidatingMethodVisitor(MethodVisitor methodVisitor, String name) { super(OpenedClassReader.ASM_API, methodVisitor); this.name = name; }
[ "public MethodExpressionValidator()\n {\n }", "Validator createValidator();", "protected ValidatingFieldVisitor(FieldVisitor fieldVisitor) {\n super(OpenedClassReader.ASM_API, fieldVisitor);\n }", "protected ValidatingClassVisitor(ClassVisitor classVisitor) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the value of the 'Randomizer' containment reference. If the meaning of the 'Randomizer' containment reference isn't clear, there really should be more of a description here...
Randomizer getRandomizer();
[ "protected static Random getRandomizer() {\n return randomizer;\n }", "public static final Randomizer getRandomizer() {return instance;}", "protected Random get_rand_value()\n {\n return rand;\n }", "public int getRand() {\n return rand;\n }", "public Object randomMember() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return a parser that recognizes the grammar: axiom = structure (ruleDef | Empty);
public Parser axiom() { Sequence s = new Sequence("axiom"); s.add(structure()); Alternation a = new Alternation(); a.add(ruleDef()); a.add(new Empty()); s.add(a); s.setAssembler(new AxiomAssembler()); return s; }
[ "abstract protected Parser createSACParser();", "public CGrammar getGrammarStructure();", "AxiomDeclRule createAxiomDeclRule();", "static Grammar parse(Scanner scanner) {\n //First line\n String first = scanner.nextLine();\n if (!first.equals(\"Grammar\")) {\n throw new Illegal...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__BooleanBinaryExpression__Group__0" $ANTLR start "rule__BooleanBinaryExpression__Group__0__Impl" InternalActivityDiagram.g:6203:1: rule__BooleanBinaryExpression__Group__0__Impl : ( ( rule__BooleanBinaryExpression__AssigneeAssignment_0 ) ) ;
public final void rule__BooleanBinaryExpression__Group__0__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalActivityDiagram.g:6207:1: ( ( ( rule__BooleanBinaryExpression__AssigneeAssignment_0 ) ) ) // InternalActivityDiagram.g...
[ "public final void rule__BooleanUnaryExpression__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // InternalActivityDiagram.g:6082:1: ( ( ( rule__BooleanUnaryExpression__AssigneeAssignment_0 ) ) )\n // InternalActivi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This demo will show products from a text based data source to the console implementing MVC. Two different ways of setting the same type of attribute.
public static void main(String[] args) { DataStore dataStore = new DataStore(); dataStore.setDataSource(Settings.DATASOURCE); // Method 1: Setting the attribute in it's own method after the object has been initialized. IUserView display = Display.CreateDisplay(Settings.DISPLAY); // Method 2: Set...
[ "private void setProductMarkup(double productMarkup) \n {\n\n this.productMarkup = productMarkup;\n }", "public static void main(String[] args) {\n AbstractApplicationContext context = new AnnotationConfigApplicationContext(\"com.ravindra\");\n Product p =(Product)context.getBean(\"prod...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns true if automation can extract the given item in the given slot from the given side. Args: Slot, item, side
public boolean canExtractItem(int slot, ItemStack item, int side) { return this.getAccessibleSlotsFromSide(side)[0] == slot && item.getItem() == waterjetStacks[slot].getItem(); }
[ "public boolean canExtractItem(int slot, ItemStack item, int side)\n {\n return true;\n }", "@Override\n\tpublic boolean canExtractItem(int slot, ItemStack par2ItemStack, int side) {\n\t\t\n\t\tif((side == BlockRegistry.sideTop || side == BlockRegistry.sideBottom) && slot >= 0 && slot <= 8)\n\t\t\tre...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A MetOfficeInterface object represents data from the MetOffice . The MetOffice holds a list of weather stations. You should include a constructor which takes no parameters.
public interface MetOfficeInterface{ List<StationInterface> getWeatherStations(); void addStation(StationInterface station); /** * @return The most recent year in which observations are recorded. If no stations or no observations then return 0. **/ int getLatestYear(); /** ...
[ "public interface WeatherStation {\n\n\tpublic void connect() throws WeatherStationException;\n\t\n\tpublic void disconnect() throws WeatherStationException;\n\t\n\tpublic WeatherReading getWeatherReading() throws WeatherStationException;\n\t\n}", "public interface Weather {\n int getPlaceId();\n\n String g...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set value of ShowTrace
public final void setShowTrace(java.lang.Boolean showtrace) { setShowTrace(getContext(), showtrace); }
[ "public final void setShowTrace(com.mendix.systemwideinterfaces.core.IContext context, java.lang.Boolean showtrace)\r\n\t{\r\n\t\tgetMendixObject().setValue(context, MemberNames.ShowTrace.toString(), showtrace);\r\n\t}", "public void setTrace(boolean trace) {\n this.trace = trace;\n }", "public void...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/3. Bonus is not given if promotional code is invalid
@Test(groups = {"regression"}) public static void bonusIsNotGivenToPlayerIfPromotionalCodeIsInvalid() { PromotionalCodeReplacerPage promotionalCodeReplacerPage = (PromotionalCodeReplacerPage) NavigationUtils.navigateToPage(PlayerCondition.player, ConfiguredPages.promotional_code_replacer); Float bal...
[ "@Test(groups = {\"regression\"})\n public static void bonusIsGivenToPlayerIfPromotionalCodeIsValid() {\n UserData userData = DataContainer.getUserData().getRandomUserData();\n userData.setCurrency(\"USD\");\n PortalUtils.registerUser(userData);\n PromotionalCodeReplacerPage promotion...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
return null if !isCooldownable
public Cooldown getCooldownObject() { return cooldown; }
[ "@Override\n public int getCooldown() {\n return cooldown;\n }", "public int getCooldown() {\n return cooldown;\n }", "public float getCooldown() {\r\n\t\treturn cooldown;\r\n\t}", "boolean hasCooldown(Player player, String interalName);", "int getMaxCooldown();", "public abstract float get...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
routeBuilder(Route route, Node warehouse) shuffles a given route in order to randomize the routes.
private Route routeBuilder(Route route, Node warehouse) throws MaxWeightException { long seed = System.nanoTime(); Collections.shuffle(route.getNodeList(), new Random(seed)); for (int nodeIndex = 0; nodeIndex < route.getNodeList().size(); nodeIndex++) { if (route.getNode(nodeIndex)...
[ "private void createBurgdorfRoutes(Scenario scenario, LeastCostPathCalculator router, int numOrigins) {\n\t\t// create to Burgdorf routes\n\t\tfor (int i = 0; i < numOrigins; i++) {\n\t\t\tRoute route;\n\t\t\tId<Link> fromLinkId = Id.create(startLinkIds[i], Link.class);\n\t\t\tId<Link> toLinkId = Id.create(endLinkI...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates new form Unidad_Medida
public MUnidad_Medida() { try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException e) { } initComponents(); obtener...
[ "private void populaUnidadeMedida()\n {\n UnidadeMedida u = new UnidadeMedida(\"Gramas\", \"g\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Quilo\", \"kg\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Quilo\", \"kg\");\n unidadeMedidaDAO.insert...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Attempts to empty a PM Inbox of all messages before the given date. folderid 0 is the primary inbox.
public boolean messageEmptyInbox(int folderid, long dateToDelete) throws InvalidId, NoPermissionLoggedout, NoPermissionLoggedin, VBulletinAPIException{ return messageEmptyInbox(""+folderid, ""+dateToDelete, 0); }
[ "private boolean messageEmptyInbox(String folderid, String dateToDelete, int loop) throws InvalidId, NoPermissionLoggedout, NoPermissionLoggedin, VBulletinAPIException{\n\t\tif(isConnected()){\n\t\t\tString errorMsg = null;\n\t\t\tloop++;\n\t\t\tHashMap<String, String> params = new HashMap<String, String>();//15088...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removes all the entries added into LabelMapper.
public LabelSchema clearLabelMapperEntries() { this.labelMapper = null; return this; }
[ "private void removeContents() {\n\t\tfor (String labelName : contents.keySet()) {\n\t\t\tremove(contents.get(labelName));\n\t\t}\n\t\tcontents.clear();\t\t// Clear all entries in the hashmap\n\t}", "public void clear() { \r\n\t\tmap.clear();\r\n\t}", "public void clear() {\n\t\tmap.clear();\n\t}", "public v...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the current date time.
public static Date getCurrentDateTime() { Calendar calendar = Calendar.getInstance(); return calendar.getTime(); }
[ "public String getCurrentDateAndTime(){\n return dateTimeFormatter.format(current);\n }", "public String Get_current_date() {\n\n // set date format\n SimpleDateFormat convert_default_format = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n // convert date format into string\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generate a time horizon coordinate from the supplied cell intersection
public static String buildTimeHorizonCoord(Intersection cellIs, MdbDef mdbDef) { String timeDim = mdbDef.getTimeDim(), yearDim = mdbDef.getYearDim(); String timeCoord = cellIs.getCoordinate(timeDim), yearCoord = cellIs.getCoordinate(yearDim); return buildTimeHorizonCoord(timeCoord, yearCoord); }
[ "public static void applyTimeHorizonCoord(Intersection cellIs, String timeHorizonCoord, MdbDef mdbDef) {\r\n\t\t\r\n\t\tString timeDim = mdbDef.getTimeDim(), yearDim = mdbDef.getYearDim();\r\n\t\t\r\n\t\t// Look for period/year delimiter. Throw an error if the delimiter is not found\r\n\t\t// or if it is the last c...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This is very important to override for . By default, any update that does not have a message will not pass through abilities. To customize that, you can just override this global flag and make it return true at every update. This way, the ability flags will be the only ones responsible for checking the update's validit...
@Override public boolean checkGlobalFlags(Update update) { return true; }
[ "public void checkAndUpdate(){\n\t\tif(!canMove() && !canAttack())\n\t\t\tsetEnabled(false);\n\t}", "public abstract boolean allowedToUpdate();", "@Override\r\n public boolean allowedToUpdate() {\r\n return false;\r\n }", "@Override\r\n public boolean allowedToUpdate() {\r\n return true;\r\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
END calculate_bmi_score() NEXT FUNCTION RETURNS A STRING DESCRIBING THE BMI CATEGORY BASED ON HEIGHT AND WEIGHT
public String calculate_bmi_category() { double bmi_score = this.calculate_bmi_score(); if( bmi_score < (18.5) ) { return "Underweight"; } // END if /************************************************/ if( bmi_score >= (18.5) && bmi_score <= (24.9) ) { return "Normal weight";...
[ "static double computeBMI(double weight, double height){\n\t\treturn Math.round((weight*703*10)/(height*height))*(1/10.0);\n\t}", "public double getBMI(){\n bmi = weight * KG_PER_POUND / (height * METERS_PER_INCH *height * METERS_PER_INCH);\n return (bmi);\n}", "private static String bmiClassification (Do...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Imports all the services from the specified injector and makes available. Wirelets can be used to transform and filter the services from the specified injector.
public void importAll(Injector injector, Wirelet... wirelets) { InjectorImporter pfi = new InjectorImporter(configuration, builder, injector, WireletList.of(wirelets)); // Validates arguments checkConfigurable(); pfi.importAll(); // Will create the necessary nodes. }
[ "public void boot()\n {\n injector = Guice.createInjector( modules );\n }", "private Injector setupEarlyInjector() throws Exception {\n final List<Module> modules = Lists.newArrayList();\n\n modules.add(new AbstractModule() {\n @Singleton\n @Provides\n public Map<String, FilterDe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the 'COMMENT_TXT' field.
public void setCOMMENTTXT(java.lang.CharSequence value) { this.COMMENT_TXT = value; }
[ "public org.LNDCDC_ADS_PRPSL.PROPOSAL_LINE.apache.nifi.LNDCDC_ADS_PRPSL_PROPOSAL_LINE.Builder setCOMMENTTXT(java.lang.CharSequence value) {\n validate(fields()[7], value);\n this.COMMENT_TXT = value;\n fieldSetFlags()[7] = true;\n return this;\n }", "public org.LNDCDC_ADS_PRPSL.PROPOSAL_LIN...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Samples one observable state from the current belief.
public GameSample sampleObservableState(Game currentGame, GameFactory factory) { //sample resource hands ThreadLocalRandom rnd = ThreadLocalRandom.current(); CatanFactoredBelief belief = ((CatanWithBelief)currentGame).getBelief(); ResourcesModel rssModel = belief.getResourceModel(); ResourceSet[] playerHands...
[ "public void sample(boolean value) {\n sample(value ? 1 : 0);\n }", "public void sample() {\n getFunctionEstimator().sample();\n }", "public double sample() {\n return rb.peek();\n }", "public double sample(){\n return rb.peek();\n }", "public S getRan...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
An EndorsementRating is a rating that expresses some level of endorsement, for example inclusion in a "critic's pick" blog, a "Like" or "+1" on a social network. It can be considered the [[result]] of an [[EndorseAction]] in which the [[object]] of the action is rated positively by some [[agent]]. As is common elsewher...
@NotNull public static EndorsementRating.Builder endorsementRating() { return new EndorsementRating.Builder(new HashMap<String,Object>()); }
[ "public void setEndorsement(boolean endorsement) {\n isEndorsement = endorsement;\n }", "@WebMethod(action=\"http://xmlns.oracle.com/apps/hcm/hwr/coreService/EndorseUser\",\n operationName=\"EndorseUser\")\n @RequestWrapper(targetNamespace=\"http://xmlns.oracle.com/apps/hcm/hwr/coreService/types/\",...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
When looping, the loop begin sample may not lie on the beginning of a new frame. This returns how many samples it is away from the beginning of the frame.
public long getLoopBeginFrameOffset() { return getLoopBeginSampleIndex() - getLoopBeginFrameIndex() * getSamplesInBlock(); }
[ "public int sampleFrameCount()\n\t{\n\t\treturn -1;\n\t}", "public int getExpectedNumberOfSamples() {\n return 1 + Math.round((_stop - _start) / _step);\n }", "protected int getFramesPased() {\r\n\t\treturn framesPassed;\r\n\t}", "public static int offset_sampleCnt() {\n return (24 / 8);\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Docket method to execute swagger.
@Bean public Docket postApi() { return new Docket(DocumentationType.SWAGGER_2) .apiInfo(metadata()).select().paths(regex("/api.*")).build(); }
[ "Swagger createSwagger();", "Map<String, Object> swagger();", "@Bean\r\n public Docket api() {\n\r\n return new Docket(DocumentationType.SWAGGER_2)\r\n .select()\r\n .apis(RequestHandlerSelectors.basePackage(\"com.varun.swaggerapp\"))\r\n .paths(PathSelecto...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
getArtikelAnzahl liefert die Anzahl der Artikel im Lager Array
public int getArtikelAnzahl () { return letzterBesetzterIndex + 1; }
[ "int getNumberOfArtillery();", "public int getArtikelNummer() {\r\n\t\treturn artikelNummer;\r\n\t}", "public void entferneArtikel ( int loeschArtikelNr )\n {\n int fundstelle, schieber;\n\n //suche Artikel \n fundstelle = sucheArtikel( loeschArtikelNr );\n\n checkArgument( ( fun...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the unit_excess value for this Order_item_select_responseOrder_item.
public int getUnit_excess() { return unit_excess; }
[ "public void setUnit_excess(int unit_excess) {\n this.unit_excess = unit_excess;\n }", "public String getQuantityUnit() {\r\n return quantityUnit;\r\n }", "public MMDecimal getUnitPrice() {\r\n return this.unitPrice;\r\n }", "public String getUnit() {\r\n\r\n return data.g...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column ecs_ego_post.useragent
public String getUseragent() { return useragent; }
[ "public com.iot.data.schema.UserAgentActionData getUSERAGENTACTION() {\n return USER_AGENT_ACTION;\n }", "public String getUserAgent() {\n return userAgent;\n }", "public static String getUserAgent()\n {\n return USER_AGENT;\n }", "public com.iot.data.schema.UserAgentActionData getU...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Goal: To test that you cannot clear a tile from a square that is not occupied. Testing Method: Instantiate a square. Try removing a tile when it is not occupied and check the exception thrown.
@Test public void testClearTileNotOccupied() { try { Square s = new Square(); s.clearTile(); fail("Should not be able to remove a tile from a Square that is not occupied."); } catch(Exception ex) { assertEquals("Cannot clear...
[ "@Test\n public void testClearTileOccupied()\n {\n try\n {\n Square s = new Square();\n s.setTile(Tile.A);\n s.clearTile();\n assertNull(s.getTile());\n assertFalse(s.isOccupied());\n }\n catch(Exception ex)\n {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Private constructor for exact image aspect ratio
private ImageAspectRatio(int a, int b) { this(a, b, a + ":" + b); }
[ "private ImageAspectRatio(float a, float b) {\n this(a, b, a + \":\" + b);\n }", "@Override\n protected double getAspectRatio(MediaEntity photoEntity) {\n final double ratio = super.getAspectRatio(photoEntity);\n if (ratio <= SQUARE_ASPECT_RATIO) {\n // portrait (tall) photos...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Output only. User list which are similar to users from another UserList. These lists are readonly and automatically created by google. .google.ads.googleads.v14.common.SimilarUserListInfo similar_user_list = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];
public Builder mergeSimilarUserList(com.google.ads.googleads.v14.common.SimilarUserListInfo value) { if (similarUserListBuilder_ == null) { if (userListCase_ == 20 && userList_ != com.google.ads.googleads.v14.common.SimilarUserListInfo.getDefaultInstance()) { userList_ = com.google.a...
[ "@java.lang.Override\n public com.google.ads.googleads.v14.common.SimilarUserListInfo getSimilarUserList() {\n if (userListCase_ == 20) {\n return (com.google.ads.googleads.v14.common.SimilarUserListInfo) userList_;\n }\n return com.google.ads.googleads.v14.common.SimilarUserListInfo.getDefaultInsta...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Calculates the resolution for the current grism and wavelength. The image quality is not taken into account; for NIRI the resolution in the files assumes that the target fills the slit (IQ>slit width).
public double resolution(final Slit slit, final double imgQuality) { return resolution(slit); }
[ "public double resolution(final Slit slit) {\n return getEffectiveWavelength() / resolution.get(getGrismNumber());\n }", "double getResolution();", "public Dimension getResolution()\n {\n return resolution;\n }", "public String getResolution() {\n return resolution;\n }", "p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the vmotionAcrossNetworkSupported value for this HostCapability.
public void setVmotionAcrossNetworkSupported(java.lang.Boolean vmotionAcrossNetworkSupported) { this.vmotionAcrossNetworkSupported = vmotionAcrossNetworkSupported; }
[ "public java.lang.Boolean getVmotionAcrossNetworkSupported() {\r\n return vmotionAcrossNetworkSupported;\r\n }", "public void setVmotionWithStorageVMotionSupported(java.lang.Boolean vmotionWithStorageVMotionSupported) {\r\n this.vmotionWithStorageVMotionSupported = vmotionWithStorageVMotionSuppor...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }