query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
System.out.println( "Hello World!" ); Initializes the Java object we need from the bitcoinJ library Fetch the network parameters for the TestNet Bitcoin network
public static void main( String[] args ) throws BlockStoreException { NetworkParameters params = NetworkParameters.testNet(); // Create a new, empty wallet that we’ll set up to receive our coins Wallet wallet = new Wallet(params); // Generates a new Private key (using EC encryp...
[ "public static void main(String[] args) {\n Sberbank sberbank = new Sberbank(\"Sberbank\", \"test desc\");\n sberbank.checkInfo(true);\n sberbank.checkInfo();\n sberbank.checkInfo();\n\n VTB vtb = new VTB(\"VTB\", \"test desc\");\n vtb.checkInfo();\n vtb.checkInfo();...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds an environmental declaration to the environment. Updates the environment of all sub external declarations after adding.
public void addEnvironmentalDeclaration(EnvironmentalDeclaration environmentalDeclaration) { environmentalDeclarations.add(environmentalDeclaration); updateEnvironment(Collections.singleton(environmentalDeclaration)); }
[ "public void addEnv(EnvironmentObjects object){\n\t\tenvObjects.add(object);\n\t}", "public void declareInTypeEnvironment(Environment env, TypeEnvironment typeEnv) throws AppendableException;", "public static it.vmt.gh.sb.model.Environment addEnvironment(\n\t\tit.vmt.gh.sb.model.Environment environment) {\n\n\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
this function get list of schedule from the bridge, and return schedules for this bulb
private void getPhSchedules() { List<PHSchedule> phSchedules = new ArrayList<>(); List<PHSchedule> recurringSchedules = bridge.getResourceCache().getAllSchedules(true); // get recurring schedules from Bridge that are for this bulb for (int i=0; i<recurringSchedules.size();i++) ...
[ "List<Schedule> findSchedulesToRun ();", "List<WorkingSchedule> getAll();", "@Override\r\n\tpublic List<Schedule> getAllSchedule() {\r\n\t\treturn scheduleDao.retrieveAllSchedule();\r\n\t}", "private void loadScheduleList() {\n\n if (listTbagendamentos != null && !listTbagendamentos.isEmpty()) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__RadarChart__Group__2__Impl" $ANTLR start "rule__RadarChart__Group__3" InternalMyDsl.g:7673:1: rule__RadarChart__Group__3 : rule__RadarChart__Group__3__Impl rule__RadarChart__Group__4 ;
public final void rule__RadarChart__Group__3() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalMyDsl.g:7677:1: ( rule__RadarChart__Group__3__Impl rule__RadarChart__Group__4 ) // InternalMyDsl.g:7678:2: rule__RadarChart__Group__3__Impl ...
[ "public final void rule__RadarChart__Group_6__3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:8352:1: ( rule__RadarChart__Group_6__3__Impl )\n // InternalMyDsl.g:8353:2: rule__RadarChart__Group_6__3__Impl\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Finds whether the zone contains a tree.
public boolean zoneContainsTree() { return numObstaclesInZone(Obstacle.TREE) > 0; }
[ "public boolean contains_tree (Tree cur_tree) {\n\t\t\tif (this == cur_tree) {\n\t\t\t\treturn true;\n\t\t\t} else {return false;}\n\t\t}", "private static boolean hasExistential(Tree root) {\n return root.getLeaves().stream().anyMatch(l -> l.parent(root).value().equals(\"DT\") && l.value().toLowerCase().e...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the 'var203' field.
public void setVar203(java.lang.Float value) { this.var203 = value; }
[ "public com.dj.model.avro.LargeObjectAvro.Builder setVar203(java.lang.Float value) {\n validate(fields()[204], value);\n this.var203 = value;\n fieldSetFlags()[204] = true;\n return this;\n }", "public void setField203(java.lang.CharSequence value) {\n this.field203 = value;\n }", "pu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
check if first bought the item and after sell it and calculate the sum
@Override public void sell(Product product) { boolean checkIfBought = productList.contains(product); if (!checkIfBought) buy(product); productList.remove(product); sum += product.getPriceWhenSell(); }
[ "private static void oneMeeting(Agent salesMan, Agent buyer, ItemName item) {\n int sellPrice = salesMan.items.get(item).sellPrice;\n int buyPrice;\n if (item == ItemName.FOOD) buyPrice = Math.min(foodPrice(buyer, salesMan), buyer.gold);\n else buyPrice = Math.min(buyer.items.get(item).b...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Load the whole content from the input stream into memory in order to release quickly resources. Can be used to load small files.
private static byte[] loadInputStreamToMemory( InputStream inputStream ) throws IOException { if (inputStream == null) { throw new IllegalArgumentException("Null parameter passed"); } ByteArrayOutputStream baos = new ByteArrayOutputStream(); byte[] buff = new byt...
[ "public abstract void loadFromStream( InputStream is );", "void load(InputStream inputStream) throws IOException;", "public void loadFromStream(InputStream is) throws IOException {\n\t\tfor (int i = 0; i <= mem.length; i++) {\n\t\t\tint data = is.read();\n\t\t\tif (data == -1) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Instantiates a new wrapper. default code=200
Wrapper() { this(ResponseType.SUCCESS,""); }
[ "private ResponseStatus(int code) {\n this.code = code;\n this.formatted = format(code, \"???\");\n this.symbolicName = String.format(\"0x%04x\", code);\n }", "private HttpResponseCode( final int code ) {\r\n\t\t\tthis.code = code;\r\n\t\t\tthis.message = ReplayConsts.convertConstNameToNormal( name()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
takeRandomCard() removes a random Card from the Hand and returns it
public Card takeRandomCard() { int p = random.nextInt(size()); Card c = cards.get(p); remove(c); return c; }
[ "public Card chooseCardFromHand() {\r\n \tint rand = (int)(Math.floor(Math.random()*hand.size()));\r\n \tCard CardFromHand = hand.get(rand);\r\n \t//hand.remove(rand);\r\n\t\treturn CardFromHand;\r\n\t}", "public static Card getRandomCard(){\n \n int max = cardDeck.size() - 1;\n int n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the SRBFileSystem object of this SRB Server
public SRBFileSystem getSRBFileSystem() { return this.srbFS; }
[ "public HoodieWrapperFileSystem getFs() {\n if (fs == null) {\n FileSystem fileSystem = FSUtils.getFs(metaPath.get(), hadoopConf.newCopy());\n\n if (fileSystemRetryConfig.isFileSystemActionRetryEnable()) {\n fileSystem = new HoodieRetryWrapperFileSystem(fileSystem,\n fileSystemRetryCo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column DOWNSYSFUNDTRANS.PAYERNAME
public String getPayername() { return payername; }
[ "public String getPayeename() {\n return payeename;\n }", "public String getPayName() {\n return payName;\n }", "public String getPayName() {\n return (String) getAttributeInternal(PAYNAME);\n }", "java.lang.String getPaidName();", "public String getPayPersonName() {\n r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return true if the definition is an instance variable.
public boolean isInstanceVariable() { return false; }
[ "public Boolean isInstanceVariable() {\n\t\treturn instancePosition != null;\n\t}", "public boolean isDeclaredWithVar() {\n return VAR_TYPE_DESC == rootNode.typedBindingPattern()\n .typeDescriptor().kind();\n }", "public IRubyObject instance_variable_defined_p(ThreadContext context, IRu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
DELETE /schoolyears/:id : delete the "id" schoolYear.
@DeleteMapping("/school-years/{id}") @Timed public ResponseEntity<Void> deleteSchoolYear(@PathVariable Long id) { log.debug("REST request to delete SchoolYear : {}", id); schoolYearService.delete(id); return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id...
[ "@RequestMapping(value = \"/schools/{id}\",\n method = RequestMethod.DELETE,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<Void> deleteSchool(@PathVariable Long id) {\n log.debug(\"REST request to delete School : {}\", id);\n schoolService.delete(i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
log.info("OBJECT BY NPID " + npid);
@Path("/npid/{npid:.*}") @GET @Produces(MediaType.APPLICATION_JSON) @ApiOperation(value="Get a list of provenance objects by their available non-provenance IDs, if any", notes="Returns a collection of objects", response=ProvenanceCollection.class) @ApiResponses(value = { @ApiResponse(code = 400, m...
[ "java.lang.String getObjectID();", "int getObjId();", "public int getObjid() {\n\treturn objid;\n}", "public long getPID() {return PID;}", "int getSimObjID();", "public Integer getParlogobjid() {\n return parlogobjid;\n }", "public Integer getLogobjid() {\n return logobjid;\n }", "...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructs an algorithm ID which will be initialized separately, for example by deserialization.
@Deprecated public AlgorithmId() { }
[ "public AlgorithmId(ObjectIdentifier oid) {\n algid = oid;\n }", "AlgorithmIdentifier getAlgorithmIdentifier();", "public AlgorithmId(ObjectIdentifier oid, AlgorithmParameters algparams) {\n algid = oid;\n algParams = algparams;\n constructedFromDer = false;\n }", "String get...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates an instance of a dummy unit with the given class name. Returns null if the class or correct constructor cannot be found.
public static Unit generateDummy(String className) { try { //find constructor requiring no parameters Class classToCreate = Class.forName("TowerDefense."+className); Class[] params = {}; Constructor constructor = classToCreate.getConstructor(par...
[ "Unit createUnit();", "NamedClass createNamedClass();", "@Test\n public void testNormalClassCreation() {\n NormalClass dummy = dummyCreator.create(NormalClass.class);\n assertEquals(NormalClass.class, dummy.getClass());\n\n testPrimitiveClass(dummy.getPrimitiveClass());\n assertEquals(111, dummy.ge...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
create new instance of BeatBoxFragment and sent it to SingleFragmentActivity as Fragment where it uses in onCreate by FragmentManager
@Override protected Fragment createFragment() { return BeatBoxFragment.newInstance(); }
[ "private void setupFragment() {\n // The fragment that need to be placed in the container\n BaseFragment fragment;\n\n switch (type) {\n case TIMELINE:\n fragment = new TimelineFragment();\n break;\n case PROJECTS:\n fragment = ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates an empty SortedList of Courses for the course catalog object
public void newCourseCatalog() { courseDirectory = new SortedList<Course>(); }
[ "public CourseCatalog() {\r\n\t\tcourseDirectory = new SortedList<Course>();\r\n\t}", "public CourseCatalogue () {\n\t\tcourseList = new ArrayList<Course>();\n\t}", "public CourseList() {\r\n\t\tmap = new HashMap< String,Set<String>>();\r\n\t\tcourses = new HashMap< String,Integer>();\r\n\t}", "public static ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets (as xml) the "pricingInd" element
org.apache.xmlbeans.XmlString xgetPricingInd();
[ "java.lang.String getPricingInd();", "void xsetPricingInd(org.apache.xmlbeans.XmlString pricingInd);", "org.apache.xmlbeans.XmlString xgetInventoryInd();", "org.apache.xmlbeans.XmlString xgetSupplyOrderNumber();", "org.apache.xmlbeans.XmlString xgetPurchasedProductId();", "void setPricingInd(java.lang.Str...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns true for any value such that myTable > min(subQuery) for the > operator (reversed for the < operator etc.)
public static Table anyOp(Table myTable, String op, String query) { Table subQueryTable=TableOps.select(query.substring(query.indexOf('(')+1, query.lastIndexOf(')'))); Table retTable; double minMaxVal; if(op.contains(">")) { minMaxVal=SingleValOps.min(subQueryTable, subQueryTable.getColName(0)); sub...
[ "public final boolean lessThan() {\n\n\t\tif (size > 1) {\n\n\t\t\tdouble topMostValue = pop();\n\t\t\tdouble secondTopMostValue = pop();\n\t\t\tif (secondTopMostValue < topMostValue) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "boolean gtExpr(InternalRow row, int ordinal);", "@Test\n p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the selected action. This method has no effect if the popupmenu is overridden.
public Action getSelectedAction() { return selectedAction; }
[ "public int getSelectedElementAction() {\n\t\treturn selectedElementAction;\n\t}", "public abstract Action selectedAction();", "public String getAction() {\n\t\treturn action.get();\n\t}", "public java.lang.String getAction() {\n return action;\n }", "public java.lang.String getAction() {\n return ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
calculate canFinish only on selected templateSections and the status of their pages
@Override public boolean canFinish() { ITemplateSection[] sections = fSelectionPage.getSelectedTemplates(); for (int i = 0; i < sections.length; i++) { int pageCount = sections[i].getPageCount(); for (int j = 0; j < pageCount; j++) { WizardPage page = sections...
[ "public boolean isPageComplete();", "boolean hasFinalTallyResult();", "public boolean checkConditions() {\n // logger.info(\"Checking Conditions\");\n return control.subTasks.size() > 0;\n }", "boolean isSetPages();", "boolean arePagesComplete() {\n Iterator<IScmUrlImportWizardPage> i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the RTCP compound packet buffer.
public byte[] getPacketBuffer() { return buffer; }
[ "public RTPSByteBuffer getBuffer() {\r\n return bb;\r\n }", "public byte[] getPacketBuffer() {\r\n\t\treturn this.mBuffer;\r\n\t}", "public ByteRingBuffer getByteRingBuffer() {\r\n return _byteRingBuffer;\r\n }", "public byte[] getPacket() {\r\n\t\tByteBuffer buf = ByteBuffer.allocate(4 + ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
given store listing fails
@Test public void storeIdMismatchOnListing() throws CatchUpClientException, StoreCopyFailedException { PrepareStoreCopyResponse prepareStoreCopyResponse = PrepareStoreCopyResponse.error( PrepareStoreCopyResponse.Status.E_STORE_ID_MISMATCH ); when( catchUpClient.makeBlockingRequest( any(), any(),...
[ "@Test\n public void errorOnListingStore() throws CatchUpClientException, StoreCopyFailedException\n {\n PrepareStoreCopyResponse prepareStoreCopyResponse = PrepareStoreCopyResponse.error( PrepareStoreCopyResponse.Status.E_LISTING_STORE );\n when( catchUpClient.makeBlockingRequest( any(), any(),...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a list of POJOs that are used to (de)serialise JSON for IGC asset types.
public List<Class> getIgcPOJOs() { ArrayList<Class> pojos = new ArrayList<>(); for (List<EntityMapping> mappings : mappingByIgcAssetType.values()) { for (EntityMapping mapping : mappings) { pojos.add(mapping.getIgcPOJO()); } } return pojos; }
[ "@GET\n @Produces(MediaType.APPLICATION_JSON)\n @Path(\"getAllPlatformTypes\")\n List<JsonType> types();", "public List<String> getAssetTypes() {\n return this.assetTypes;\n }", "public Set<String> getIgcAssetTypes() {\n HashSet<String> assetTypeNames = new HashSet<>();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return true if any of our Components is a running StationMonitor
public boolean monitorIsRunning() { for (Component c : getComponents()) { if (c instanceof StationMonitor) { if (((StationMonitor)c).isRunning()) { return true; } } } return false; }
[ "public boolean hasMonitors() {\n\n return this.aliasToActiveChildMonitorsMap != null;\n }", "public boolean isRunning() {\n return (service != null) && service.isMonitoring();\n }", "public boolean isMonitorEnabled();", "boolean isMonitoring();", "private boolean isAtStation(){\n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method to find the Function that corresponds to a contact on a given layer.
public static Function getContact(int level) { Function func = (Function)contactLayers.get(new Integer(level)); return func; }
[ "public Function getFunctionContaining(Address addr);", "public Function getFunctionAt(Address entryPoint);", "public Decl lookupFunction(String name) {\n for (String candidate : container.resolveCandidateNames(name)) {\n Decl fn = declarations.findFunction(candidate);\n if (fn != null) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column lt_google_adwords_report_ad.ad_type
public void setAdType(String adType) { this.adType = adType; }
[ "public String getAdType() {\r\n return adType;\r\n }", "public void setAdvert_type(String advert_type) {\n this.advert_type = advert_type;\n }", "public void setReportType(String aReportType);", "public void setAgencyType(java.lang.String agencyType) {\n this.agencyType = agencyTyp...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
public final boolean escaped_characterOption1; public final String escaped_characterOption2; public final int escaped_characterOption3;
public EscapedCharacterOptions(DataHolder options) { //this.escaped_characterOption1 = options.get(EscapedCharacterExtension.ESCAPED_CHARACTER_OPTION1); //this.escaped_characterOption2 = options.get(EscapedCharacterExtension.ESCAPED_CHARACTER_OPTION2); //this.escaped_characterOption3 = options.g...
[ "public boolean hasEscaped(){return escaped;}", "public void setLiteral(boolean aFlag) { _literal = aFlag; }", "java.util.Optional<Boolean> getShellQuote();", "public String getEscapeChar() {return escapeChar;}", "private static void setCharUse(String bool){\r\n\r\n if(bool.charAt(0)=='t' || bool.ch...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Code to send invoice
@Override public void sendInvoice(Invoice invoice, String email) { System.out.println("Invoice Sent email"); }
[ "private boolean emailInvoice() {\n\t\t\n\t\treturn true;\n\t\t\n\t}", "private String CreateInvoice() throws Exception {\n\n\t\tgetDriver().get(\"https://stg.autobrain.com/worker/retail_fulfillment/new_invoice\");\n\n\t\t// Add Quantity\n\t\tString s = prop.getProperty(\"no_of_devices\");\n\t\tint quantity = Int...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method corresponds to the database table t_organization_user
TOrganizationUser selectByPrimaryKey(Integer id);
[ "@Select({ \"select\", \"id, sign_user_id, user_name, address, chain_id, group_id, user_status, gmt_create, \", \"gmt_modified, description\", \"from tb_user\", \"where id = #{id,jdbcType=INTEGER}\" })\n @Results({ @Result(column = \"id\", property = \"id\", jdbcType = JdbcType.INTEGER, id = true), @Result(colum...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the device IDs on the platforms.
public cl_device_id[] getDeviceIds() { cl_platform_id[] platforms = getPlatforms(); platformMap = new HashMap<>(); int resultSize = 0; for (int i = 0; i < platforms.length; i++) { int[] size = new int[1]; CL.clGetDeviceIDs(platforms[i], CL.CL_DEVICE_TYPE_ALL, 0, null, size); resultSize += size[0...
[ "Collection<String> getDeviceIds();", "public List<Integer> deviceIds(){\n List<Integer> ids = new ArrayList<>();\n for(Device dev: mRegisteredDevices.values()){\n ids.add(dev.id());\n }\n return ids;\n }", "public static List<String> getDeviceList() {\n\t\tList<String>...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Override getXPos & getYPos
abstract public double getXPos();
[ "abstract int getXPos();", "public void calculateXYPosition();", "void setPosition(double xPos, double yPos);", "public void setX_pos(int x_pos);", "abstract int getYPos();", "double getPositionX();", "Position getPos();", "public Position(double xPos, double yPos)\n {\n\tthis.xPos = xPos;\n\tthis,...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Resets the estimated position of the robot.
public void resetPosition() { position.x = 0; position.y = 0; position.heading = 0; }
[ "protected void reset() {\n\t\tveryNearAgent = null;\n\t\tcollisionRadius = radius;\n\t\tcounter = 0;\n\t\tlifetime = 0;\n\t\todometer = 0;\n\t\tlinearVelocity.set(0, 0, 0);\n\t\tresetPosition();\n\t\tresetDevices();\n\t}", "public void reset() \r\n\t{\r\n\t\tthis.displacementX = 0.0;\r\n\t\tthis.displacementY = ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a localized, humanreadable description of the undoable form of this edit, suitable for use as an Undo menu item, for example. This is typically derived from getPresentationName.
public String getUndoPresentationName();
[ "@Override\n public String getUndoPresentationName() {\n if (canUndo()) {\n // UndoManager.getUndoPresentationName() follows\n if (inProgress) {\n if (canUndo()) {\n return editToBeUndone().getUndoPresentationName();\n } else {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the right_operand value for this EXPR_BINARY_OPERATOR.
public org.openehr.schemas.v1.EXPR_ITEM getRight_operand() { return right_operand; }
[ "public String getRightOperandString()\r\n {\r\n return rightOperand;\r\n }", "public String getRightOperand()\r\n {\r\n if (rightOperand == null)\r\n {\r\n return null;\r\n }\r\n if (rightOperand.contains(\"+1i\"))\r\n {\r\n return rightOperand.replace(\"+1i\", \"+i\");\r\n }\r\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Find out, whether all members of a set of strings are contained in the field of quoted strings.
public static boolean isSetContainedInQuotedStrings(String quotedStr, Set set) { if (quotedStr != null && set != null) { HashSet qsSet = new HashSet(Arrays.asList(getQuotedStrings(quotedStr))); for (Iterator it = set.iterator(); it.hasNext(); ) { if (!qsSet.contains(it.next())) return false; } ...
[ "public static boolean areQuotedStringsContainedInSet(String quotedStr, Set set) {\n if (quotedStr != null && set != null) {\n String[] strs = getQuotedStrings(quotedStr);\n\t for (int i = 0; i < strs.length; i++) {\n if (!set.contains(strs[i])) return false;\n }\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Disables a VLAN on a device.
default boolean disableVlan(VlanId vlanId) { return disableVlan(Arrays.asList(vlanId)); }
[ "boolean disableVlan(Collection<VlanId> vlanIds);", "void disableDevice(Device device, String token) throws AuthenticationException;", "public void setUnblockable(boolean blockable);", "void rs2_loopback_disable(Realsense2Library.rs2_device device, PointerByReference error);", "@Override\n\tpublic void disa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removes a subsection from a document. This method receives an index and a document and removes the subsection in the respective index.
public boolean removeSection(int idx, Document doc) { if (getSubsections().size() > idx && idx >= 0) { removeAllSubsections(this, doc); if (getSection(idx).isIndexed()) { doc.removeFromIndex(this.getSection(idx)); } } return this.getSubsections().remove(this.getSection(idx)); }
[ "public void removeAllSubsections(Section section, Document doc) {\n\n\t\tfor (Paragraph j : section.getParagraph()) {\n\n\t\t\tif(j.isIndexed()){\n\n\t\t\t\tdoc.removeFromIndex(j);\n\t\t\t}\n\t\t}\n\n\t\tfor (Section i : section.getSubsections()) {\n\t\t\t/*if (i.isIndexed()) {\n\t\t\t\tdoc.removeFromIndex(i);\n\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Validate the given file with the Twigcs component.
private void process(final IFile file) throws CoreException { try { // run final List<String> command = buildCommand(file); final IOExecutor executor = new IOExecutor(); final int exitCode = executor.run(command); // output? final String output = executor.getOutput(); if (!output.isEmpty()) { ...
[ "private void validateFile() {\n File f = new File(textFile.getText());\n\n if (this.openMode == OPEN && !f.exists()) {\n textFile.setForeground(Color.RED);\n textFile.setToolTipText(\"The specified file or directory does not exist.\");\n return;\n }\n if (this.getFileMode() == DIRECTORIE...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method that gets one specific ReplyMessage
@Override public ReplyMessage findOne(Long aLong) { try (Connection connection = DriverManager.getConnection(url, username, password)) { String command = "SELECT * FROM conversations WHERE id = " + aLong; PreparedStatement preparedStatement = connection.prepareStatement(command); ...
[ "public int replyID(int messageID){\n Message message = allmessage.get(messageID);\n return message.getReply();\n }", "public String getReplier(int messageID){\n Message message = allmessage.get(messageID);\n return message.getReplyer();\n }", "public String getFirstReply()\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Parse the string and populate instance variables
private void fromString(String strRep) throws InvalidStringRepresentationException { String[] rep = strRep.split(","); if(rep.length != 6) throw new InvalidStringRepresentationException(strRep); this.x = getFuzzyNumber(rep, 0); this.y = getFuzzyNumber(rep, 2); this.z = getFuzzyNumber(rep, 4); }
[ "public void parseString(String str) {\r\n\t\t\tint spaceAt = str.indexOf(' ');\r\n\r\n\t\t\tsrcService_ = str.substring(0, spaceAt);\r\n\t\t\tdestService_ = str.substring(spaceAt + 1);\r\n\t\t}", "private void parse(String str) {\n if (str == null) {\n throw new IllegalArgumentException(\"Empty job exe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set value of SFTPConfiguration_KnownHosts
public final void setSFTPConfiguration_KnownHosts(com.mendix.systemwideinterfaces.core.IContext context, sftpconnection.proxies.KnownHosts sftpconfiguration_knownhosts) { if (sftpconfiguration_knownhosts == null) getMendixObject().setValue(context, MemberNames.SFTPConfiguration_KnownHosts.toString(), null); els...
[ "public final void setSFTPConfiguration_KnownHosts(sftpconnection.proxies.KnownHosts sftpconfiguration_knownhosts)\n\t{\n\t\tsetSFTPConfiguration_KnownHosts(getContext(), sftpconfiguration_knownhosts);\n\t}", "protected final void setKnownHostsFileLocation(final String knownHostsFileLocation) {\n this.know...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
get the arguments passed to the module. arguments are what follow the module/pragma or version depenency declaration, i.e. what is used to construct the what gets passed to the module's import subroutine. the returned list will contain Token objects and can be cast as such.
public List<Element> getArguments() { List<Element> args = new ArrayList<>(getSigChildren()); // remove the "use", "no", or "require" args.remove(0); // remove the terminator - ha! - he'll be back! if (ElementUtils.isSemiColonToken(args.get(args.size() - 1))) { ...
[ "Object[] getArguments();", "public ArrayList<ASTParamsDeclarator> argList() {\n ArrayList<ASTParamsDeclarator> pdl = new ArrayList<ASTParamsDeclarator>();\n ASTParamsDeclarator pd = argument();\n pdl.add(pd);\n\n nextToken = tknList.get(tokenIndex);\n if (nextToken.type.equals(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column covidus_r_scheda_presc.prescrizione
public void setPrescrizione(String prescrizione) { this.prescrizione = prescrizione; }
[ "public void setPrecoProduto(String precoProduto) {\r\n\t\tthis.precoProduto = precoProduto;\r\n\t}", "public void setPrescTipoId(Integer prescTipoId) {\n\t\tthis.prescTipoId = prescTipoId;\n\t}", "public void setPrecoReparo(int novoPrecoReparo){\n this.precoReparo = novoPrecoReparo;\n }", "public v...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Enables purchase enables player to purchase a square if it is buyable
public void buy() { Square sq = currentPlayer.getPiece().getLocation(); System.out.println(sq.getName()); if (board.buyPlace(currentPlayer, sq)) { gameFlow.add("" + currentPlayer.getName() + " bought " + sq.getName()); notifyObservers("UpdatePlayerInfo", null, null); } else { System.out.println("Squar...
[ "private void purchase(Player currentPlayer) {\n\n boolean wishToPurchase; //flag for purchase choice\n\n if (!currentPlayer.isAiAgent()) {\n wishToPurchase = super.board.getPurchase(title, cost, currentPlayer);\n } else {\n wishToPurchase = currentPlayer.decide(this);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets a junction type by its name
public static Class getJunctionTypeByName(String name) { return namedJunctionClasses.get(name); }
[ "public String getRelationTypeName();", "java.lang.String getRelationType();", "String getRelationType();", "String getDerefTypeName();", "public Tower_Type getTowerTypeByName(String name){\n for(int i = 0; i < this.typeList.size(); i++){\n if(this.typeList.get(i).getName().equals(name)){\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Method Name : ClickClosepopupinShoppinginsight Purpose : Clicks the 'x' image in the pop up after clickign add to cart Parameter : Date Created: Created By : Chakri Modified By : Modified Date:
public void ClickClosepopupinShoppinginsight(){ class Local {}; Reporter.log("TestStepComponent"+Local.class.getEnclosingMethod().getName()); Reporter.log("TestStepInput:-"+"NA"); Reporter.log("TestStepOutput:-"+"NA"); Reporter.log("TestStepExpectedResult:- close 'x' image should be clicked for Add to Ca...
[ "public void clickCloseBtnOnPopup() {\r\n\r\n\t\treportStep(\"About to close the Cashback And Rewards Cashback Rate and Terms Popup\", \"INFO\");\r\n\r\n\t\tif (click(cashbackRewardsRateClosePopup)) {\r\n\t\t\t\r\n\t\t\treportStep(\"Successfully closed the Cashback And Rewards Popup \", \"PASS\");\r\n\r\n\t\t} else...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Setter method for the COM property "InvertColorIndex"
@DISPID(2917) @PropPut void setInvertColorIndex( int rhs);
[ "@DISPID(2916)\n @PropPut\n void setInvertColor(\n int rhs);", "@DISPID(2917)\n @PropGet\n int getInvertColorIndex();", "@DISPID(2916)\n @PropGet\n int getInvertColor();", "public Color getInvertedColor(){\r\n\t\t\tint neg = 0xFFFFFF - Integer.parseInt(hex, 16);\r\n\t\t\treturn (new Color(neg));\r\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/A method to handle duplicate markers being removed
public void removeDuplicateMarkers(Location castleSearch, List<LatLng> points) { for (int i = 0; i < 10; i++) { Location castleCoord = new Location("point A"); castleCoord.setLatitude(points.get(i).latitude); castleCoord.setLongitude(points.get(i).longitude); d...
[ "private boolean removeIrrelevantMarkers()\r\n\t{\n\t\t\r\n\t\tboolean ret_val = false;\r\n\t\tIterator e = fPreviouslyExistingMarkers.iterator();\r\n\t\twhile (e.hasNext())\r\n\t\t{\r\n\t\t\tActivityMarkerAnnotation annotation =\r\n\t\t\t\t(ActivityMarkerAnnotation) e.next();\r\n\t\t\tannotation.setRelevant(false)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Refresh the navigators' models and components
public void refresh() { for (BaseNavigatorView nav: getNavigators()) { nav.refresh(); } RequestContext adfContext = RequestContext.getCurrentInstance(); adfContext.addPartialTarget(_navigatorAccordion); }
[ "private void refresh() {\n if (vehiclesPane != null && teachersPane != null && studentsPane != null) {\n vehiclesPane.refresh();\n teachersPane.refresh();\n studentsPane.refresh();\n }\n }", "public void refresh() {\n if (getLogger().isDebugEnabled()) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Populates edge ports in the EdgePortService to return all port 1 as edge ports.
private void popluateEdgePortService() { Set<ConnectPoint> edgeConnectPoints = new HashSet<>(); for (int i = 1; i <= NUM_DEVICES; i++) { for (int j = 1; j <= NUM_PORTS_PER_DEVICE; j++) { ConnectPoint edgeConnectPoint = new ConnectPoint( getDeviceId(i)...
[ "public void setEdgePorts(Map<DeviceId, Set<ConnectPoint>> edgePorts) {\n this.edgePorts = edgePorts;\n }", "public Map<DeviceId, Set<ConnectPoint>> getEdgePorts() {\n return ImmutableMap.copyOf(edgePorts);\n }", "public void generateEdgeConnections() {\n for (Edge e : this.mst) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
string helixPersonaCode = 58;
com.google.protobuf.ByteString getHelixPersonaCodeBytes();
[ "java.lang.String getHelixPersonaCode();", "public java.lang.String getHelixPersonaCode() {\n java.lang.Object ref = helixPersonaCode_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add a new day to the schedule.
public boolean addDay(Day dayToAdd){ if(m_schedule.contains(dayToAdd)){ return(false); }else{ m_schedule.add(dayToAdd); return(true); } }
[ "public void addDay(int day) {\n addDay(new Day(day));\n }", "void addDay(final Day day) {\n days.add(day);\n }", "public void addDay(Day d) {\n\t\tthis.days.add(d);\n\t}", "private void add(DailyData day) {\n\t\t// FIXED: provide implementation\n\t\tstationMap.get(day.getStationId()).add(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
converting the string in lowecase, selecting the character at index i, checking if it's a vowel
public static boolean isVowel(String s, int i){ char c = s.charAt(i); if(c == 'a' || c == 'e' || c == 'i' || c == 'o' || c== 'u'){ } return false; }
[ "public static char getFirstVowel(String value) {\r\n char vowel = '\\0';\r\n for(int i = 0; i < value.length(); i++) {\r\n if(value.charAt(i) == 'a' ||value.charAt(i) == 'e' ||value.charAt(i) == 'i' ||value.charAt(i) == 'o' ||value.charAt(i) == 'u') {\r\n vowel = value.charA...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Determines if a character is a Unicode decimal digit. For example, '0' is a digit. A character is a Unicode digit if getType() returns DECIMAL_DIGIT_NUMBER. Unicode decimal digit = [Nd]
public static boolean isDigit(int codePoint) { return getType(codePoint) == DECIMAL_DIGIT_NUMBER; }
[ "private boolean isDecimalDigit() {\n return c == '0' || c == '1' || c == '2' || c == '3' || c == '4'\n || c == '5' || c == '6' || c == '7' || c == '8' || c == '9';\n }", "private boolean isDigit(final char c) {\n\t\treturn (c >= ZERO && c < NINE);\n\t}", "public static boolean isDigit(char ch)\n {...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a button which sets the items in the test view when clicked.
private Button createSetItemsButton() { final Button b = new Button(this); b.setText("Set items"); b.setAllCaps(false); b.setOnClickListener(new View.OnClickListener() { @Override public void onClick(final View v) { items.clear(); for (int i = 0; i < NUMBER_OF_ITEMS; i++) { if (n...
[ "public void clickNewTasksItem() {\n newTaskItem.click();\n }", "@Test\n public void viewButton() {\n // Type username and go to quirk list then event list of first quirk\n Intents.init();\n\n //Navigate to EventListActivity\n onView(withId(R.id.loginUser))\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Fades the opacity of all labels with the opposite progress of "animate" (i.e. from 1 to 0)
public void fadeOut(SharedTransition animate, boolean setInvisible) { for (Label l : words) { l.opacityProperty().bind(animate.getOppositeProgress()); } animate.addOnStopped(() -> { for (Label l : words) { l.opacityProperty().unbind...
[ "public void fadeIn(SharedTransition animate)\n {\n for (Label l : words)\n {\n l.setVisible(true);\n l.opacityProperty().bind(animate.getProgress());\n }\n animate.addOnStopped(() -> {\n for (Label l : words)\n {\n l.opacityP...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
public abstract void doUploadHeadPortraits(int type,Map map);
public abstract void doUploadHeadPortraits(Map<String, String> map);
[ "@Override\n public void upload(String name, Integer type, String path, Integer pid, String md5, Integer createUserId, String caseNo, MultipartFile file) throws IOException {\n }", "public synchronized void upload(){\n\t}", "public boolean processUpload(EmployeeUp employeeUp);", "private void updateSpec...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks whether the 'field877' field has been set
public boolean hasField877() { return fieldSetFlags()[877]; }
[ "public boolean hasField879() {\n return fieldSetFlags()[879];\n }", "public boolean hasField811() {\n return fieldSetFlags()[811];\n }", "public boolean hasField878() {\n return fieldSetFlags()[878];\n }", "public boolean hasField841() {\n return fieldSetFlags()[841];\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A void method which will set the values of r and i from mag and angle (in rad) of phasor
void setFromModulusAngle(double mag, double ang){ r = mag*Math.cos(ang); i = mag*Math.sin(ang); }
[ "public void setR(double r) {\r\n\t\tthis.r = r;\r\n\t\tif(!polar)\r\n\t\t\tphi = Math.atan2(b,a);\r\n\t\tpolar = true;\r\n\t\tcartesian = false;\r\n\t}", "public void setRadius(double r){radius = r;}", "public void setMag(double mag) {\n double angle = this.heading();\n this.x = Math.cos(angle) *...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
List findByLogin(); User findByLogin(String userLogin);
@Query("SELECT u FROM User u WHERE u.login = :login") User findByLogin(@Param("login") String login);
[ "public User findUserByLogin(final String login);", "User findUserByLogin(String login);", "User findUserWithTheAllInfoByLogin(String login) throws DaoException;", "User getUserByLogin(String login);", "@Override\n public User findUserByLogin(String login) {\n final String findUserByLogin = \"sele...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Prints the cells object states as grid
private String displayCells(Cell[][] arr) { String display = ""; int depth = 0; while (depth < sideLength) { for(int i = 0; i < sideLength; i++) { display += arr[i][depth].getState(); } depth++; display += "\n"; } r...
[ "private void printBoard(){\r\n\t\t//prints out the board of cells at their current state\r\n\t\tfor(int i = 0; i< cell.length; i++) {\r\n\t\t\tfor(int j = 0; j<cell[i].length; j++) {\r\n\t\t\t\tcell[i][j].printState();\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t\t\r\n\t}", "public void printGrid();"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method is responsible to implement logic for extracting header from text file Currently it is assumed to be first line if headerExtractionEnabled is set to true TODO: enhance to support more common header patterns
@SuppressWarnings("resource") private String [] extractHeader() throws SchemaChangeException, IOException, ExecutionSetupException{ assert (settings.isHeaderExtractionEnabled()); assert (oContext != null); // don't skip header in case skipFirstLine is set true settings.setSkipFirstLine(false); H...
[ "public void extractHeaders()\n\t{\n\t\tint currentPosition, nextPosition;\n\t\tboolean headersPresent, headersRemain;\n\t\tString headerField, headerValue;\n\t\tString dataString = \"\";\n\t\t\n\t\theadersPresent = headersRemain = true;\n\t\theaderHash = new Hashtable();\n\t\tcurrentPosition = nextPosition = 0;\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the value of the 'Accelerate' attribute. The default value is "0.0". If the meaning of the 'Accelerate' attribute isn't clear, there really should be more of a description here...
double getAccelerate();
[ "public double getAcceleration() {\r\n return acceleration;\r\n }", "public double getAcceleration() {\n return acceleration;\n }", "Acceleration getAcceleration();", "public Vector2D getAcceleration()\n\t{\n\t\treturn acceleration;\n\t}", "double getDecelerate();", "public int getAcce...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get a list of intents that meet the specified criteria.
java.util.concurrent.Future<ListIntentsResult> listIntentsAsync(ListIntentsRequest listIntentsRequest);
[ "List<IntentFilter> findFilters(Intent intent);", "public List<QName> getIntents() {\n return intents;\n }", "public List <Account> search(Predicate <Account> predicate) {\r\n\t\treturn allAccounts.values().stream().filter(predicate).collect(Collectors.toCollection(ArrayList::new));\r\n\t}", "List<S...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a new instance of the class FileGarbageCollector with the specifies maxAge and directories list.
public FileGarbageCollector(long maxAge, Vector<File> dirs){ this.maxAge = maxAge; this.dirs = dirs; }
[ "public FileGarbageCollector(){\n\t\tthis.maxAge = 0;\n\t\tthis.dirs = new Vector<File>();\n\t}", "public LRUFilesCache()\n {\n this(100);\n }", "public DiskBasedCache(File rootDirectory, int maxCacheSizeInBytes) {\n\t\tmRootDirectory = rootDirectory;\n\t\tmMaxCacheSizeInBytes = maxCacheSizeInBytes...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
COMMONSRDF51: Special test for Turkish issue where "i".toLowerCase() != "i" See also: This is similar to the test in AbstractRDFTest, but on a graph
@Test public void containsLanguageTagsCaseInsensitiveTurkish() { final Locale defaultLocale = Locale.getDefault(); try { Locale.setDefault(Locale.ROOT); final Literal lowerROOT = factory.createLiteral("moi", "fi"); final Literal upperROOT = factory.createLiteral("...
[ "@Test\n\tpublic final void testRussianMacronOverI() \n\t\t\tthrows ParserConfigurationException, IOException, SAXException \n\t{\n\t\tassertSingleResult(\"2099904\", fldName, \"istorīi\");\n\t\tassertSingleResult(\"2099904\", fldName, \"istorii\");\n\t\t// i have no idea if these should work, or how it should look...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TARGET RULE for tests below: (inbound,tcp,4438547,0.0.1.8255.127.61.44)
@Test public void rangeTest() { // Both IP and port ranges assertTrue(f.accept_packet("inbound", "tcp", 445, "255.126.67.1")); assertTrue(f.accept_packet("inbound", "tcp", 8000, "0.0.3.0")); assertFalse(f.accept_packet("inbound", "tcp", 40, "0.0.3.0")); assertFalse(f.accept_p...
[ "private void installRule(PacketContext context, PortNumber portNumber) {\n //\n // We don't support (yet) buffer IDs in the Flow Service so\n // packet out first.\n //\n Ethernet inPkt = context.inPacket().parsed();\n TrafficSelector.Builder selectorBuilder = DefaultTraffi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add the available themes to the ComboBox
private void build() { addItem(T.system("THEME_PLAIN_GREY")); setItemCaption(T.system("THEME_PLAIN_GREY"), T.system("THEME_PLAIN_GREY_NAME")); addItem(T.system("THEME_BLACK_LIME")); setItemCaption(T.system("THEME_BLACK_LIME"), T.system("THEME_BLACK_LIME_NAME")); addItem(T.system("THEME_CANDY_RED")); s...
[ "private void createThemeDialog() {\n\n\t\tAlertDialog.Builder alb = new AlertDialog.Builder(this);\n\t\talb.setTitle(getString(R.string.choose_theme));\n\t\talb.setCancelable(true);\n\n\t\tString[] items;\n\t\tif (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {\n\t\t\titems = new String[]{getString(R.string.ligh...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the autoPayDate value for this AutoPayChannelInfoPaymentPlanBillCycleSchema.
public void setAutoPayDate(java.lang.String autoPayDate) { this.autoPayDate = autoPayDate; }
[ "public void setAutoDate(Date autoDate) {\r\n this.autoDate = autoDate;\r\n }", "public void setAutoPay(java.lang.Boolean autoPay) {\n this.autoPay = autoPay;\n }", "public void setAuto_payment(int auto_payment) {\n this.auto_payment = auto_payment;\n }", "public void setPayDate(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a retail options based on FLC. If none exists, returns null.
private RetailOption getFlcRetailOption(ResultSet rs) { RetailOption opt = null; //TODO getFlcRetailOption return opt; }
[ "private RetailOption getRetailOption(ResultSet rs)\n\t{\n\t\tRetailOption opt = null;\n\t\tString item = null;\n\n\t\ttry {\n\t\t\titem = rs.getString(\"item_id\");\n\n\t\t\topt = getItemRetailOption(rs);\n\n\t\t\tif ( opt == null )\n\t\t\t\topt = getImageRetailOption(rs);\n\n\t\t\tif ( opt == null )\n\t\t\t\topt ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO processUploadedAssociatedFiles(files); get the Files and put them in a list...
@Override public void onReceivedFiles(Map<String, String> clientParams, String basePath, List<File> files) { getCombinedUpload().addAssociatedFiles(files); //addAssociatedFiles(List<File> files) // note: no cleanup, where to do that? //logger.debug("Associated files upload done!"); }
[ "public List getAssociatedFiles()\n {\n return m_files;\n }", "public List getAssociationFiles();", "List getFileUploads(HttpServletRequest request) throws ValidationException;", "@NonNull List<FileUpload> files();", "public Set<SupportingUploadedFileDTO> getUploadedFiles() {\r\n \tSet<Supportin...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the current control mode.
public ControlMode getCurrentControlMode() { return currentControlMode; }
[ "@Override\n public String getControlMode() {\n return this.controlMode.name();\n }", "public PowerTimeLine getControlMode() {\n\t\treturn controlMode;\n\t}", "public ControlMode getRotatorControlMode()\r\n\t{\r\n\t\treturn rotator.getControlMode();\r\n\t}", "public CurrentMode getCurrentMode();", "pub...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the imports declared by this Type System.
void setImports(Import[] aImports);
[ "public void setImports(List imports);", "void declareImports(String imports);", "public void setImports(org.globus.swift.language.ImportsDocument.Imports imports)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.globus.swift.language.ImportsDocument.Imports ta...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the value of the 'var142' field.
public java.lang.Integer getVar142() { return var142; }
[ "public java.lang.Integer getVar142() {\n return var142;\n }", "public java.lang.Integer getVar141() {\n return var141;\n }", "public java.lang.Integer getVar145() {\n return var145;\n }", "public java.lang.Integer getVar132() {\n return var132;\n }", "public java.lang.CharSequence getVar153...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
get businesSearchInfo:: get business search information based on parameters
public Set<LocalBusinessDTO> businesSearchInfo(String brands, String companyName, String store, String locationPhone, String locationAddress, String locationCity, String locationState, String locationZipCode) { Set<LocalBusinessDTO> setOfBusinessRecords = new HashSet<LocalBusinessDTO>(); Session ses...
[ "Object search(BusinessProcessSearchRequest businessProcessSearchRequest);", "@Transactional(readOnly = true)\n public static Result search() {\n // TODO(Rao): We need to make this more refined. We need to support\n // search criteria multiple filters\n String serviceName = request().getQ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Badges need to hash the same, regardless of level.
@Override // from Object public int hashCode () { return badgeCode; }
[ "public String getHashOfLevel(Integer level);", "protected int buildHashCode() {\n int h = 17;\n h = 37 * h + principal.getName().hashCode();\n h = 37 * h + privilegeBits.hashCode();\n h = 37 * h + Boolean.valueOf(allow).hashCode();\n h = 37 * h + restrictions.hashCode();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
deletes the currently active movie in the infopanel
public void deleteMovie(){ int response = JOptionPane.showConfirmDialog(mainFrame, "Are you sure you wish to delete " + currentMovie.getTitle() + "?", "****************Confirm Delete****************", JOptionPane.OK_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE); if (response == JOptionPane.OK_OPTION) { con...
[ "public void deleteMovie() {\n\n // Delete\n String folderPath = targetDirectory + \"/\" + activeMovie.getTitle() + \" \" + activeMovie.getYear();\n System.out.println(IOHelper.deleteFile(new File(folderPath)));\n\n // Reload\n loadMovieList();\n pickActiveMovie();\n\n }...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
An Entity can define different behaviors for different states, but it will always start with an initial behavior. This entity only has one behavior.
@Override public Behavior initialBehavior(Optional<HelloState> snapshotState) { /* * Behavior is defined using a behavior builder. The behavior builder * starts with a state, if this entity supports snapshots (an * optimization that allows the state itself to be persisted to combine m...
[ "public void loadStateBehaviors(MeasuredEntity entity)\n\t{\n\t\ttry \n\t\t{\n\t\t\tString sqlSelect = sqlSelect3 + String.valueOf(entity.getId()); \n\t\t\tResultSet rs3 = super.pst.executeQuery(sqlSelect);\n\n\t\t\twhile (rs3.next()) \n\t\t\t{\n\t\t\t\tInteger id \t\t = rs3.getInt(\"id\"); \n\t\t\t\tString...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the first value in this bucket.
Map.Entry<K, V> getFirstValue() { if (isEmpty()) { throw new IllegalStateException(); } return firstValue; }
[ "public Byte first() {\r\n if (size() == 0) {\r\n return null;\r\n }\r\n return get(0);\r\n }", "public T getFirstValue() {\n\t\treturn firstValue;\n\t}", "public int getFirstValue() {\r\n\t \tif (isEmpty()) throw new IllegalStateException(\"Map is empty.\");\r\n\t \treturn s...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test the property 'resMessage'
@Test public void resMessageTest() { // TODO: test resMessage }
[ "@Test\n public void resultMessageTest() {\n assertEquals(\"System: Accepted Transaction\", authResponse.getResultMessage());\n }", "public void test_getMessage() {\n assertEquals(\"'message' value should be properly retrieved.\", message, instance.getMessage());\n }", "public static void...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Copy "sz" bytes from position "pos" of the buffered storage to "space"
@Override public byte[] getBytes(byte[] space, int sz, int pos) { int blockPos = posToBlock(pos); int start = pos - (blockPos * blockSize); int result = findBlockForRead(blockPos); int leng = (pool[result].getBlock()[start] << 8); // check if length bytes span two b...
[ "@Override\r\n public int insert(byte[] space, int sz) {\r\n // Find next available block\r\n int pos = freeBlocks.getNextAvailable(sz + 2);\r\n\r\n while (pos == -1) {\r\n // keep expanding free block list until available block is found\r\n freeBlocks.expand(expandBy, ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
setter for count and sum
public void setCountAndSum(int count, int sum) { this.count = count; this.sum = sum; }
[ "public void setSum(int value) {\r\n this.sum = value;\r\n }", "public void setCount(int value) {\n this.count = value;\n }", "public void setCount(int value) {\n this.count = value;\n }", "public void setSum(long sum)\n {\n this.sum = sum;\n }", "public StatHelper(int s...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ gets the mating prob
public double getMatingProb() { return MATING_PROBABILITY; }
[ "String getProb();", "float getSpecialProb();", "public void CalculateProbabilities()\r\n\t{\r\n\t int i;\r\n\t double maxfit;\r\n\t maxfit=fitness[0];\r\n\t for (i=1;i<FoodNumber;i++)\r\n\t {\r\n\t if (fitness[i]>maxfit)\r\n\t maxfit=fitness[i];\r\n\t }\r\n\r\n\t ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
When I have an imported product, I want the word "imported" in the beginning of its name
public static String fixName(String name){ if(name.toLowerCase().indexOf("imported") == -1) return name; StringBuilder stringBuilder = new StringBuilder("imported"); Arrays.stream(name.split(" ")).filter(s -> !s.toLowerCase().equals("imported")) .forEach(s -> stringBu...
[ "private boolean getIsImported(String productName) {\n\t\treturn productName.contains(AppConstants.IMPORTED_TOKEN);\n\t}", "java.lang.String getPlannableProductName();", "String getProductName();", "private String getPackageName(String className, EObject context) {\n\t\tModel model = (Model) context.eResource...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Loads the pony's images into the game's ImageLibrary.
public static void loadImages() { PonySprite.loadImages(imgKey, "graphics/ponies/GrannySmith.png"); }
[ "@Override\n public void loadImages() {\n sprites = new PImage[1];\n sprites[0] = p.loadImage(\"src/main/resources/projectile_lg.png\");\n currentSpriteIndex = 0;\n\n }", "private void loadImages() {\n\t\ttry {\n\t\t\timage = ImageIO.read(Pillar.class.getResource(\"/Items/Pillar.png\"))...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a newly created TransformMatrix that translates thing according to vector [x,y]
public static TransformMatrix translationMatrix(float x, float y) { return new TransformMatrix(1,1,x,y); }
[ "public static <T> TransMatrix<T> fromVector(PVector<T> x, PVector<T> y) {\n// T[][] data = (T[][]) new Object[][]{\n// {x.x, x.y}, {y.x, y.y}\n// };\n return valueOf(x.x, y.y, y.x, y.y, x.getCalculator());\n }", "public Transform translate(final double x, final double y, fi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
args0 dst args1 out args2 split MB args3 hbase table name
public static void main(String[] args) throws Exception { if (args.length != 4) { System.exit(0); } String dst = args[0]; String out = args[1]; int SplitMB = Integer.valueOf(args[2]); String table_name = args[3]; // 设置属性对应参数 Configurati...
[ "@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\r\n\tpublic static void main(String[] args) throws Exception {\r\n\t\tSystem.out.println(Resources.toString(getResource(HfileBulkExporter.class, \"banner.txt\"), Charsets.UTF_8));\r\n\r\n\t\tBuilder builder = new Builder();\r\n\t\tbuilder.option(\"T\", \"tmpdir\",...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__XNullLiteral__Group__1__Impl" $ANTLR start "rule__XIntLiteral__Group__0" ../com.avaloq.tools.dslsdk.check.ui/srcgen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:15435:1: rule__XIntLiteral__Group__0 : rule__XIntLiteral__Group__0__Impl rule__XIntLiteral__Group__1 ;
public final void rule__XIntLiteral__Group__0() throws RecognitionException { int stackSize = keepStackSize(); try { // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:15439:1: ( rule__XIntLiteral_...
[ "public final void rule__XIntLiteral__Group_0__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:2689:1: ( rule__XIntLiteral_...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
calls the training protocol of the Node class if it's off the Node will be able to adjust it's weigths. This function requires an instance.
public void trainWithInstance(Instance inst) { for(int i = 0; i < numberOfNodes; i++) { Nodes.get(i).trainOnInstance(inst); } }
[ "public void trainNeuralNetworks() {\n\n\t\tview.showTrainingOverview();\n\n\t\tNNTrainer nullTrainer = new NNTrainer();\n\t\tnullTrainer.setGameType(GameType.NULL);\n\t\tnullTrainer.start();\n\t\tNNTrainer grandTrainer = new NNTrainer();\n\t\tgrandTrainer.setGameType(GameType.GRAND);\n\t\tgrandTrainer.start();\n\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the result of interpreting the object as an instance of 'Null Literal'. This implementation returns null; returning a nonnull result will terminate the switch.
public T caseNullLiteral(NullLiteral object) { return null; }
[ "public T caseOsNullLiteral(OsNullLiteral object) {\n return null;\n }", "public T caseNullLiteral(NullLiteral object) {\n\t\treturn null;\n\t}", "public T caseNull(Null object) {\n\t\treturn null;\n\t}", "public T caseNullLiteralExpCS(NullLiteralExpCS object) {\r\n return null;\r\n }", "public T...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
attemptMove boolean method which takes in Position2D "pos" parameter and return boolean setPosition method
public boolean attemptMove(Position2D pos) { return setPosition(pos); }
[ "public boolean allowMove(Point p, int pos);", "boolean canMoveTo(Vector2d position);", "boolean canMoveTo(Vector2D position);", "public abstract boolean canMove(int originX, int originY, int destX, int destY);", "public boolean attemptMove(int x, int y)\n {\n return setPosition(x, y);\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get member search result
@GET @Timed @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) @AllowAnonymous public ApiResponse searchMember( @APIQueryParam(repClass = MemberSearch.class) MemberSearchRequest request, @Context SecurityContext se...
[ "List<ImportedMember> search(ImportedMemberQuery params);", "public void getMemberInfo() {\n\t\tRequest.instance().setMemberName((getName(\"Enter name of member to get information on\")));\n\n\t\tIterator<Result> result = groceryStore.getMemberInfo(Request.instance());\n\n\t\twhile (result.hasNext()) {\n\t\t\tRes...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__AstFunction__Group__6__Impl" $ANTLR start "rule__AstFunction__Group__7" ../org.caltoopia.frontend.ui/srcgen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:8538:1: rule__AstFunction__Group__7 : rule__AstFunction__Group__7__Impl rule__AstFunction__Group__8 ;
public final void rule__AstFunction__Group__7() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:8542:1: ( rule__AstFunction__Group__7__Impl rule__...
[ "public final void rule__AstFunction__Group__6() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:8511:1: ( rule__AstFunction__Group__6_...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
write layer to file
@Override public void writeToFile(NetworkFileWriter nfw) throws IOException { // write the size of the layer nfw.writeInt(size); }
[ "public void writeTower() {\n\t\ttry {\n\t\t\tPrintWriter writer = new PrintWriter(\"tower.txt\");\n\t\t\tfor (Layer l : struct) {\n\t\t\t\twriter.println(l);\n\t\t\t}\n\t\t\twriter.close();\n\t\t} catch (IOException e) {\n\t \te.printStackTrace();\n\t }\n\t}", "@Override\n public void writeLayer(File...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method sets a list of times we want to departure our buses.
@Override public void setDepartureTimesList(List<String> times) { ArrayAdapter<String> arrayAdapter = new ArrayAdapter<>(this,android.R.layout.simple_spinner_item,times); arrayAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); ((Spinner) findViewById(R.id.departu...
[ "public void setDepartureTime (int departs)\n {\n departureTime = departs;\n }", "public void setDeparture(Time1 t)\r\n {\r\n _departure = t;\r\n }", "public void setTime() {\r\n\t\tArrayList<String> slots = new ArrayList<String>();\r\n\t\tString inSched = getWorkHours();\r\n\t\tswitch(inS...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__RelativeTransformation__Group__0" $ANTLR start "rule__RelativeTransformation__Group__0__Impl" ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/srcgen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:6108:1: rule__RelativeTransformation__Group__0__Impl : ( '(' ) ;
public final void rule__RelativeTransformation__Group__0__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:6112:1: ( ( ...
[ "public final void rule__RelativeTransformation__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:6100:1...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__AstAnnotationArgument__Group__0" $ANTLR start "rule__AstAnnotationArgument__Group__0__Impl" ../org.caltoopia.frontend.ui/srcgen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:22391:1: rule__AstAnnotationArgument__Group__0__Impl : ( ( rule__AstAnnotationArgument__NameAssignment_0 ...
public final void rule__AstAnnotationArgument__Group__0__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:22395:1: ( ( ( rule__AstAnnotation...
[ "public final void rule__AstAnnotationArgument__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:22383:1: ( rule__AstAnnotati...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }