query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
Returns whether to show line numbers.
public boolean isShowLineNumbers() { return _showLineNumbers; }
[ "public boolean isSetLineNumber() {\n return __isset_bit_vector.get(__LINENUMBER_ISSET_ID);\n }", "public boolean isLineAnnotationsVisible() {\r\n return showLineAnnotation || isAnnotationVisible();\r\n }", "public void setShowLineNumbers(boolean aValue)\n {\n if (aValue == isShowLineNum...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the time it will take before two ships collide.
public double getTimeToCollision(Ship ship1, Ship ship2) throws ModelException { try { return ship1.getTimeToCollision(ship2); } catch (NullPointerException e) { throw new ModelException(e); } }
[ "@Test\n\tpublic void getTimeToCollisionLegalCaseTrue() throws IllegalComponentException {\n\t\tmovingShip1.setPosition(-40,0);\n\t\tmovingShip2.setPosition(35,0);\n\t\tmovingShip1.setVelocity(10,0);\n\t\tmovingShip2.setVelocity(0,0);\n\t\tassertEquals(4, movingShip1.getTimeToCollision(movingShip2), Util.EPSILON);\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets all the items the given user bid on
public Set<Item> getItemsWithBidFromUser(User user);
[ "public List<BidBean> getBidByUser(Integer userId) throws CallingException {\n\t\ttry {\n\t\t\tList<Bid> l = bidDao.findByUser(userId);\n\t\t\tList<BidBean> result = new ArrayList<BidBean>();\n\t\t\tfor (int i = 0; i < l.size(); i++) {\n\t\t\t\tBid bid = l.get(i);\n\t\t\t\tBidBean bb = new BidBean();\n\t\t\t\tinitB...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieve all cache references for this name.
public Collection getAllCaches(String sCacheName) { Set setRef = new HashSet(); Map mapByLoader = (Map) m_mapByName.get(sCacheName); if (mapByLoader != null) { synchronized (mapByLoader) { Collection col = mapByLoader.values()...
[ "public Collection getAllCaches()\n {\n Set setRef = new HashSet();\n Collection<Map> colLoader = m_mapByName.values();\n\n for (Map mapByLoader : colLoader)\n {\n synchronized (mapByLoader)\n {\n for (Object oHolder : ma...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Assign the value in transExp into the location of transvar
public Exp assign(Level level, ExpTy transVar, ExpTy transExp) { return new Nx( new MOVE( transVar.exp.unEx(), transExp.exp.unEx() ) ); }
[ "private VVarRef.Local transform_variable(VMFunction func, String id, SourcePos soursePos)\n {\n // search params first\n if(func.param_to_index!=null)\n {\n Integer index = func.param_to_index.get(id);\n if(index != null)\n {\n return new VVar...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the ShortSubject field.
public void setShortSubject(java.lang.String value);
[ "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getShortSubject();", "public void setSubject(java.lang.String value);", "void setSubject(String subject);", "void setSubject(java.lang.String subject);", "void setShortTextValue(final String shortTextValue);", "public void setSubject(St...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
E0Fire(int id) Fires a bullet, creating a new Enbullet object with Enemy0 objects (referenced by id) x and y coordinates as a starting point via EnBullet.FireUFO() message
public static void E0Fire(Enemy0 e0) { EnBullet.FireEn(e0); }
[ "public void fire() {\r\n if (ammo > 0) {\r\n ammo--;\r\n int bulletX = x + 30;\r\n int bulletY = y + 17;\r\n Bullet b = new Bullet(bulletX, bulletY);\r\n bullets.add(b);\r\n }\r\n }", "private ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Getter for the set of clusters
public ArrayList<ArrayList<double[]>> getClusterSet(){ return clusterSet; }
[ "public int[][] getClusters() {\r\n return clusters;\r\n }", "public SME_Cluster[] getClusters();", "public int[] getCluster() {\r\n return clusters[this.clusterIndex];\r\n }", "public int[][] getClusters() {\r\n return null;\r\n }", "@JsonIgnore\n public Set<Long> getClusterI...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__Corr_spec__Group__0" $ANTLR start "rule__Corr_spec__Group__0__Impl" ../org.xtext.example.rmodp.ui/srcgen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:16603:1: rule__Corr_spec__Group__0__Impl : ( 'correspondence' ) ;
public final void rule__Corr_spec__Group__0__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:16607:1: ( ( 'correspondence' ) ) ...
[ "public final void rule__Corr_spec__Group__0() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:16595:1: ( rule__Corr_spec...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the 'Curve Char Kind' literal with the specified name.
public static CurveCharKind getByName(String name) { for (int i = 0; i < VALUES_ARRAY.length; ++i) { CurveCharKind result = VALUES_ARRAY[i]; if (result.getName().equals(name)) { return result; } } return null; }
[ "public static CurveCharKind get(String literal) {\n\t\tfor (int i = 0; i < VALUES_ARRAY.length; ++i) {\n\t\t\tCurveCharKind result = VALUES_ARRAY[i];\n\t\t\tif (result.toString().equals(literal)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "CurveFontType getCurveFont();", "CycSymbol getS...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Construct an instance of RobertKernel.
public RobertKernel() { initialize(new SingleKernel(2, 2, 1, 0, 0, -1), new SingleKernel(2, 2, 0, 1, -1, 0)); }
[ "public VMKernel() {\n super();\n }", "public VMKernel() {\n }", "public VMKernel() {\n\t\tsuper();\n\t}", "public IdentityKernel() {\n this(3, 3);\n }", "public KernelSGDBuilder() {\n\t\t\tsuper();\n\t\t}", "public LinearKernel() {\n\t\t\n\t}", "public LinearKernel()\n {\n su...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Calculates the first occurrence of the term in document Let dist be the relative distance of the first occurrence of the term to the beginning of the document, normalized by the size of the document. The value of the feature is defined as 1dist.
public double calculateFirstOccurrence(Token token, FileData file) { return 1 - ((double) token.getBeginIndex() / file.getQttyTerms()); }
[ "@Override\n public double tf(List<String> doc, String term){\n double result = 0;\n for(String word: doc){\n if(term.equalsIgnoreCase(word))\n result++;\n }\n\n return Math.log(1 + result);\n }", "@Override\n public double idf(List<List<String>> docs...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds a new empty item to the list.
public abstract int addEmptyItem();
[ "public abstract void addEmptyEntry();", "abstract public E addEmpty();", "public void addAtStart(Item item) { \t\n \tif(head.item == null) {\n \t\thead.item = item;\n\t \t\tif(isEmpty()) {\n\t \t\thead.next = tail;\n\t \t\ttail.next = head;\n\t \t\t} \t\t\n \t} else {\n \t\tNode old...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
if symptoms are not marked, do not move on
@OnClick(R.id.buttonConfirmSymptoms) public void buttonConfirmSymptoms() { if (sharedPreferences.getInt("symptomCounter", 0) == 0) { Toast.makeText(ExaminationActivity.this, getString(R.string.not_enough), Toast.LENGTH_SHORT).show(); } else { startActivity(new Intent(Examinat...
[ "public void setSymptomOfDisaster(String symptomOfDisaster) {\n\t\tSymptomOfDisaster = symptomOfDisaster;\n\t}", "private void skipIt()\n {\n shouldNotify_ = false;\n }", "private void takeMarksmanshipUnitExam() {\n Officer officer = chooseOfficer();\n new SoldiersMarksman...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Parses mobile locator string.
private static MobileLocator parseMobileLocator(String locator) { Pattern p = Pattern.compile("^([A-Za-z ]+)=([\\S\\s]+)"); Matcher m = p.matcher(locator); MobileLocator lc = new MobileLocator(); if (m.find()) { lc.setType(MobileLocatorType.fromStrategy(m.group(1).toLowerCase...
[ "private static By parseMobileBy(String locator, By parentBy) {\n MobileLocator lc = parseMobileLocator(locator);\n switch (lc.getType()) {\n case ACCESSIBILITY_ID:\n return MobileBy.AccessibilityId(lc.getValue());\n case CLASS:\n return MobileBy.cla...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sorts the sections, representations and resources alphabetically in the given RWADef definition
public static void sortDefinition(Definition definition) { Collections.sort(definition.getContract().getSections(), new Comparator<Section>() { @Override public int compare(Section o1, Section o2) { return o1.getName().compareTo(o2...
[ "void sortByName();", "public void sortLibrary() {\r\n bookList.sort(null);\r\n }", "public void sort(){\n\t\twordAndKeys=mergeSortByKeys(wordAndKeys);\n\t}", "protected void sortResources()\n {\n PriorityComparator priorityComparator = new PriorityComparator();\n List<Resource> res...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds a collection of documents, specifying max time before they become committed
public UpdateResponse add(Collection<SolrInputDocument> docs, int commitWithinMs) throws SolrServerException, IOException { UpdateRequest req = new UpdateRequest(); req.add(docs); req.setCommitWithin(commitWithinMs); return req.process(this); }
[ "int addDocumentToCollections(String uri, String[] collections);", "public UpdateResponse addBeans(Collection<?> beans, int commitWithinMs) throws SolrServerException, IOException {\n DocumentObjectBinder binder = this.getBinder();\n ArrayList<SolrInputDocument> docs = new ArrayList<>(beans.size());\n f...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the min breeding energy of the animal.
protected void setMinBreedingEnergy(int i) { this.minBreedingEnergy = i; }
[ "public void setMinEnergy(double minEnergy) {\n\t\tthis.minEnergy = minEnergy;\n\t}", "public void setMinMagnitude(double magnitude);", "public void setDiamateMin(Double diamateMin) {\n this.diamateMin = diamateMin;\n }", "public void setMinAttribute(double min) {\r\n\t\tminAttribute = min;\r\n\t}",...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column CTSTELLER.BRIEF_NAME_ENG
public void setBRIEF_NAME_ENG(String BRIEF_NAME_ENG) { this.BRIEF_NAME_ENG = BRIEF_NAME_ENG == null ? null : BRIEF_NAME_ENG.trim(); }
[ "public void setBRIEF_NAME_ENG(String BRIEF_NAME_ENG)\r\n {\r\n\tthis.BRIEF_NAME_ENG = BRIEF_NAME_ENG == null ? null : BRIEF_NAME_ENG.trim();\r\n }", "public String getBRIEF_NAME_ENG()\r\n {\r\n\treturn BRIEF_NAME_ENG;\r\n }", "public String getBRIEF_NAME_ENG() {\r\n return BRIEF_NAME_ENG;\r\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
No args constructor for use in serialization We use ignore because room does not need this constructor
@Ignore public Result() { }
[ "@SuppressWarnings(\"unused\")\n public NoConstructor() {\n // Empty\n }", "private BookingSerializedEntity (){\r\n }", "public Pojo1110110(){\r\n\t}", "public ClassRoomRecord() {\n super(ClassRoom.CLASS_ROOM);\n }", "public MoshiSerializer() {\n this(new Moshi.Build...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Displays and enables the buttons held in the capture button container.
public void enableCaptureButtonContainer() { captureButtonContainer.setVisibility(View.VISIBLE); selectionConfirmButton.setEnabled(true); selectionCancelButton.setEnabled(true); }
[ "private void enableButtons() {\n\t\tplaceButton.setEnabled(true);\n\t\tbuyButton.setEnabled(true);\n\t\tendTurn.setEnabled(true);\n\t}", "public static void enableButtons(){\n voltFrag.closeButton.setEnabled(true);\n voltFrag.openButton.setEnabled(true);\n //voltFrag.closeButton.setClickable...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
endregion region insert new pickup_task_parcel
private static void _createPickupTaskParcel(TransportationTask task, Parcel parcel, EbeanServer server, Transaction transaction) { if (task.getType().equals("PICKUP")) { if (task.getState().equals("NEW") || task.getState().equals("IN_PROCESS")) { ...
[ "public static void handleCreatePickupTaskParcel(PickupRequestOrder pickupRequestOrder, List<Parcel> parcelList,\n EbeanServer server, Transaction transaction) {\n List<TransportationTask> tasks = _getListTaskByPickupOrder(pickupRequestOrder);\n if (t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
An interface to handle business logics for manual excess premium. (C) 2009 Delphi Technology, inc. (dti) Date: Dec 01, 2009
public interface ExcessPremiumManager { /** * Load all manual excess premium. * * @param policyHeader * @param inputRecord * @return RecordSet */ public RecordSet loadAllExcessPremium(PolicyHeader policyHeader, Record inputRecord); /** * Load all manual excess ...
[ "public interface IBrokerageFeeSrv\n{\n\t/**\n\t * ------------------------------------------------------------------------------------\n\t * Get Brokerage and Fee incl. of Taxes\n\t * \n\t * @param dematAC\n\t * - Demat Account to Transact from\n\t * @param Amount\n\t * - Amount of Trade\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a context to associate with the passed in model and add it to the global map.
public OpenSimContext createContext(Model aModel, boolean force) { OpenSimContext context = mapModelsToContexts.get(aModel); if (context ==null || force){ OpenSimContext newContext; try { newContext = new OpenSimContext(aModel.initSystem(), aModel); } ...
[ "public static void addUserContext(Map<String, Object> model) {\r\n\t\tUser user = new User();\r\n\t\tuser.setUsername(SecurityContextHolder.getContext().getAuthentication().getName());\r\n\t\tmodel.put(\"user\", user);\r\n\t}", "public Context(SimuComModel myModel, IResourceTableManager resourceTableManager) {\r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ VkSubpassDescription vkObj = (VkSubpassDescription)(ptr); code for Buffer ptr to ptr const VkAttachmentReference p_pInputAttachments = ( VkAttachmentReference) _pInputAttachments; vkObj>pInputAttachments = p_pInputAttachments; Native GET method for field pInputAttachments[vkstruct_array] Prototype: const VkAttachment...
private static native long getPInputAttachments0(Buffer ptr);
[ "public VkSubpassDescription pInputAttachments(VkAttachmentReference[] pInputAttachments){\n\t\t this.pInputAttachments = pInputAttachments;\n\t\t this.pInputAttachmentsBUFFER = new BigBuffer<VkAttachmentReference>(pInputAttachments, VkAttachmentReference.getID());\n\t\t setPInputAttachments0(this.ptr, pInputAttach...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests whether the forecast per year is calculated correctly
@Test() public void testGetForecastPerYear() { Year year = Year.of(2016); double forecast = expenseManager.getForecastPerYear(year); assertEquals(11030.25, forecast, 0.01); }
[ "@Test()\n public void testGetForecastPerMonthWithYearly() {\n\tYearMonth yearMonth = YearMonth.of(2016, 8);\n\tdouble forecast = expenseManager.getForecastPerMonth(yearMonth);\n\tassertEquals(3795.75, forecast, 0.01);\n }", "@Test()\n public void testGetForecastPerMonth() {\n\tYearMonth yearMonth = Year...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
sets up the game.
public void setUpGame() { isRunning = true; createBufferStrategy(3); bs = getBufferStrategy(); g = (Graphics2D)bs.getDrawGraphics(); g.setRenderingHints(new RenderingHints(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON)); gameInput = new GameInput(this...
[ "public void setupGame() {\n\t\tfinal int worldWidth = 500;\n\t\tfinal int worldHeight = 700;\n\t\t\n\t\tcreateViewWithoutViewport(worldWidth, worldHeight);\n\t\t\n\t\tinitializePersistence();\n\t\t\n\t\tif (getStartGame()) {\n\t\t\tcreatePlateauSpawner();\n\t\t\tcreateDashboard(worldWidth, worldHeight);\n\t\t\tref...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
size of the job directory on disk
public Long getSize(Job job) { File dir = getFileDir(job); if (dir != null && dir.exists()) { return FileUtils.sizeOfDirectory(dir); } else { return 0L; } }
[ "long getSize(String path) throws IOException;", "public long getSize()\n\t{\n\t\treturn file.length() ;\n\t}", "long getFileSize();", "int getSizeInMB();", "public static long sizeTemp() {\n\t String tmpPath = Play.application().configuration().getString(\"media.tempPath\");\n\t File dir = new File(t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the 'account_number' field. CAN Customer account number
public void setAccountNumber(Integer value) { this.account_number = value; }
[ "public void setAccountNumber(final String value) {\n this.accountNumber = value;\n }", "public Builder setAccountNumber(int value) {\n validate(fields()[0], value);\n this.account_number = value;\n fieldSetFlags()[0] = true;\n return this;\n }", "public synchronized void setAccountNu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check if the System Input Model is ready. The System Input Model is the transition probability matrix that will be used to find the steady state with the Convergence Simulation.
public boolean isInputModelReady() { return inputModelReady; }
[ "public ConvergenceInputModelState()\n {\n this.inputModelReady = false;\n this.systemUpdated = false;\n }", "public boolean isReady() {\n return mPattern != null && mSamples != null &&\n mSamples.size() >= mIACEstimator.getMinNumberOfRequiredHomographies();\n }", "p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Reads a list of XML files and returns an instance of CAlphIO which knows about the alphabets found in these files. This class does it by the simple expedient of creating a new CAlphIO and passing these files, but some extensions may redirect the request in the case that the XML files have already been parsed.
public CAlphIO doAlphIO(ArrayList<String> vFiles) { Log.e("doAlphIO ", "GetStringParameter(Esp_parameters.SP_SYSTEM_LOC) " + GetStringParameter(Esp_parameters.SP_SYSTEM_LOC)); return new CAlphIO(GetStringParameter(Esp_parameters.SP_SYSTEM_LOC), GetStringParameter(Esp_parameters.SP_USER_LOC), vFiles,...
[ "public static void loadAlphabets(InputSource is)\n throws SAXException, IOException, BioException\n {\n try {\n SAXParserFactory spf = SAXParserFactory.newInstance();\n spf.setNamespaceAware(true);\n XMLReader parser = spf.newSAXParser().getXMLReader();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the context type registry.
public ContextTypeRegistry getContextTypeRegistry() { return fContextTypeRegistry; }
[ "public Iterator<TemplateContextType> contextTypes() {\n\t\treturn fContextTypes.values().iterator();\n\t}", "public static List<Context> getRegisteredContexts() {\n\t\treturn registeredContexts;\n\t}", "public Class getContextType();", "public List<Register> getContextRegisters();", "public int getContextT...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Clears previously drawn trails
void clearTrails() { trails.clear(); setPen(penDown); }
[ "public void clear()\n {\n drawCanvas.clear();\n }", "public void clearDrawing () {\n shapeCount = 0;\n }", "public void clear_strokes() {\n this.contours = new ArrayList<ContourClass>(); // Argument (if any) specifies initial capacity (default 10)\n }", "public void clear() {\n\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
function get worker by id from services and return JSON serialization it to client
@RequestMapping(value = "/worker") public Worker getWorker(@RequestParam(value = "id", required = true) int id) { LOG.info("Get by id: {}", id); return workerService.getById(id); }
[ "String getWorkerId();", "java.lang.String getWorkerId();", "String getWorkerID();", "public Optional<Worker> getWorker(Long id) {\n Optional<Worker> worker = workerRepository.findById(id);\n return worker;\n }", "Serialized<TaskWorker> getTaskWorker(UUID jobId)\n throws DelegationExce...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Send an event to all the remote partitions in the cluster. The caller is expected to also put the event in a local queue.
void sendToAllRemotePartitions(Event event);
[ "public <H extends EventHandler> void sendEventToAll(PushedEvent<H> event) {\r\n\t\tlogger.debug(\"[AtmosphereManager] send event \"+event+\" to all\");\r\n\t\tlogFuture(getBroadcaster().broadcast(event));\r\n\t}", "protected void sendToAll(Event event){\n for(String playerID: networkData.keySet())\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
repeated string sourcepath = 3;
int getSourcepathCount();
[ "java.lang.String getSourcepath(int index);", "public static String _getfilename(String _fullpath) throws Exception{\nif (true) return _fullpath.substring((int) (_fullpath.lastIndexOf(\"/\")+1));\n //BA.debugLineNum = 1608;BA.debugLine=\"End Sub\";\nreturn \"\";\n}", "java.lang.String getSrcPath();", "java.l...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method inserts the Expansion Threshold Label.
private JLabel getExpansionThresholdLabel () { if (expansionThreshold == null) { expansionThreshold = new JLabel (); expansionThreshold.setText (" " + stringDatabase.getString ("ExpansionThreshold.Label") ...
[ "public void appendLabel(int oldInstructionOffset)\n {\n if (DEBUG)\n {\n println(\"[\"+codeLength+\"] <- \", \"[\" + oldInstructionOffset + \"] (label)\");\n }\n\n // Make sure the code and offset arrays are large enough.\n ensureCodeLength(codeLength + 1);\n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return all literatures with a matching publisher. Searches through all the magazines stored in the register.
public List<Entry> getByPublisher(String publisher) { List<Entry> matches = new ArrayList<>(); for (Entry l : litRegister) { if (l.getPublisher().contains(publisher)) { matches.add(l); } } return matches; }
[ "public Iterator<Literature> getLiteratureByPublisherAsCollection(String publisher) {\n ArrayList<Literature> listOfFoundLiterature = new ArrayList<>();\n\n for (Literature literature : this.listOfLiterature) {\n if (publisher.equals(literature.getPublisher())) {\n listOfFoun...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Square the current fraction. This method modifies the current fraction and reduces it to lowest form.
public void sqr() { //numerator calculation this.numerator = this.numerator *this.numerator; //denominator calculation this.denominator = this.denominator *this.denominator; //reduces it to lowest form this.reduceToLowestForm(); }
[ "public void simplify() {\n int gcd;\n if (this.numerator > this.denominator) {\n gcd = gcd(this.numerator, this.denominator);\n } else {\n gcd = gcd(this.denominator, this.numerator);\n }\n this.numerator = numerator / gcd;\n this.denominator = denomi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
endregion region send giphy from keyboard
private boolean sendGiphyFromKeyboard(InputContentInfoCompat inputContentInfo, int flags, Bundle opts) { if (BuildCompat.isAtLeastQ() && (flags & InputConnectionCompat.INPUT_CONTENT_GRANT_READ_URI_PERMISSION) != 0) { try { inp...
[ "private void send(){\n\t\tString msg = input.getText();\n\t\ttry{\n\t\t\t//displayOutput(msg);\n\t\t\tstreamOut.writeUTF(msg);\n\t\t\tstreamOut.flush();\n\t\t\tif(msg.equalsIgnoreCase(\"bye\")){\n\t\t\t\tquit.setEnabled(false);\n\t\t\t\tconnect.setEnabled(true);\n\t\t\t\tsend.setEnabled(false);\n\t\t\t\tclose();\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns transfer queue instance by name.
<V> RTransferQueue<V> getTransferQueue(String name);
[ "<V> RTransferQueue<V> getTransferQueue(String name, Codec codec);", "<V> RQueue<V> getQueue(String name);", "public static Node getQueue(String name) {\n return CpuAdoc.INSTANCE.getQueue(name);\n }", "MessageQueue getServiceQueue(String name);", "public Queue<JobInProgress> findQueue(String name) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Spring Data repository for the HrmsActionDisciplinary entity.
@SuppressWarnings("unused") @Repository public interface HrmsActionDisciplinaryRepository extends JpaRepository<HrmsActionDisciplinary, Long> { }
[ "@Repository(\"pm5811Repository\")\npublic interface Pm5811Repository extends PagingAndSortingRepository<Pm5811, Long>, QueryDslPredicateExecutor<Pm5811> {\n\t/*\n\t * (non-Javadoc)\n\t *\n\t * @see org.springframework.data.repository.CrudRepository#findAll()\n\t */\n\tList<Pm5811> findAll();\n\t\n\t/**\n\t * Find ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns PSL23: "Product/Service Amount for Physician" creates it if necessary
public CP getPsl23_ProductServiceAmountForPhysician() { CP retVal = this.getTypedField(23, 0); return retVal; }
[ "public CP getProductServiceAmountForPhysician() { \r\n\t\tCP retVal = this.getTypedField(23, 0);\r\n\t\treturn retVal;\r\n }", "public double getUs_price_msrp();", "@Override\n public double getUs_price_msrp() {\n return _parts.getUs_price_msrp();\n }", "java.lang.String getServicePrice();", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Specifying the stream's source URL.
public Activity setStreamSourceUrl(String value) { setValue("streamSourceUrl", value); return this; }
[ "public String getStreamSourceUrl() {\n return getString(\"streamSourceUrl\");\n }", "public void setSourceUrl(final String name) {\n sourceUrl = name;\n }", "public void setSourceURL(WebURL aURL) { _surl = aURL; }", "public String sourceUri() {\n return this.sourceUri;\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
undo the last change to inMatrix
public void undoLastChange(){ columns = oldColumns; rows = oldRows; inMatrix = new double[rows][columns]; for(int i = 0; i<rows*columns; i++){ inMatrix[i/columns][i%columns] = oldInMatrix[i/columns][i%columns]; } }
[ "public void matrixMeltdown() {\n rebuild();\n for (int i = vertices - 1; i >= 0; i--) {\n vertex[i].pos = vertex[i].pos.transform(matrix);\n }\n regenerate();\n matrix.reset();\n normalmatrix.reset();\n }", "public void undo() {\n\t\tif(committed){\n\t\t\tr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Attempts to convert all player names to UUID where needed To be Called a single time on plugin startup
public static void convertToUuid(Plugin pPlugin) { if (!PlayerIdentifier.GetUUIDSupport()) return; // Legacy mode SSDatabase metadb = new SSDatabase(filename); Map<Integer, Object> params = new LinkedHashMap<>(); params.put(1, pPlugin.getName()); ToConvert lastAttempt...
[ "protected List<String> convertNameListToUUIDList(List<String> names) {\n // doesn't apply after schema has been updated to version 1\n if (this.getSchemaVersion() >= 1) {\n return names;\n }\n\n // list to build results\n List<String> resultNames = new ArrayList<String...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get patientLabRequest by Id.
public HashMap<String, Object> getPatientLabRequestById(HashMap<String, Object> patientLabRequestId);
[ "public PendingRequest getPendingRequest(final String id);", "@RequestMapping(method = RequestMethod.GET,\n path = \"/{labTestId}\",\n produces = MediaType.APPLICATION_JSON_VALUE)\n public Optional<LabTest> findById(@Valid @PathVariable Long labTestId) {\n return la...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the created On Behalf Of.
public DirectoryObject getCreatedOnBehalfOf() { return this.createdOnBehalfOf; }
[ "public void setCreatedOnBehalfOf(DirectoryObject value) { \r\n this.createdOnBehalfOf = value; \r\n valueChanged(\"createdOnBehalfOf\", value);\r\n\r\n }", "public String getOwnUser() {\n return ownUser;\n }", "public Membership getCreatedBy() {\n return createdBy;\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the 'field372' field.
public void setField372(java.lang.CharSequence value) { this.field372 = value; }
[ "public com.maxpoint.cascading.avro.TestExtraLarge.Builder setField372(java.lang.CharSequence value) {\n validate(fields()[372], value);\n this.field372 = value;\n fieldSetFlags()[372] = true;\n return this; \n }", "public void setField373(java.lang.CharSequence value) {\n this.field373 ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Helper method to set the text for a weeks table cell and apply the proper style.
private void setWeeksCell(int row, int col, String text, boolean isCurrentWeek) { weeksTable.setText(row, col, text); weeksTable.getCellFormatter().setAlignment(row, col, HasHorizontalAlignment.ALIGN_RIGHT, HasVerticalAlignment.ALIGN_MIDDLE); if (isCurrentWeek) { weeksTable.getCellFormatter().addStyleName(row,...
[ "public void setText(String text){\r\n\t\tweekText = text;\r\n\t}", "private void setUpWeeklyTable() {\n // Create table columns, set what they display, and add to the table\n TableColumn<ScheduleWrapper, String> timeCol = new TableColumn<>(\"Time\");\n TableColumn<ScheduleWrapper, String> su...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Testing tableChanged(tableModelEvent), a function that calls tableChangedHandler if tableModelEvent is valid. Otherwise, catches an exception and print its trace. This test checks if , given a valid tableModelEvent, no error is printed in console, and if given an invalid one (null value) the error is print.
@Test(expected = Test.None.class) public void testTableChanged() throws Exception{ TableModelEvent e = new TableModelEvent(tableModel,2,2,2); Model m = new Model(0, "trainName", "pathUnique", false, fileType); Model m1 = new Model(0, "trainName1", "pathUnique1", true, fileType); Model m2 = new Model(0, "t...
[ "@Test\r\n\tpublic final void testTableChangedHandler() throws Exception {\t\t\r\n\t\tlistener.setLock();\r\n\t\tassertFalse(listener.tableChangedHandler(e1));\r\n\t\tlistener.unsetLock();\r\n\t\tassertTrue(listener.tableChangedHandler(e1));\r\n\t}", "public void tableChanged(TableModelEvent e)\n {...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Print similarity string within targetLevel to System.out
public void printSimilarities(int level) { System.out.println(this.toSimilarityString()); if(level > 0) { if(this.classificationNumber == null || this.classificationNumber.getClassificationLevel() < level) { if(childNode != null) { for(int i=0; i<this.childNode.size(); i++) { ACMTree...
[ "public void print() {\n\t\tSystem.out.println(word0 + \" \" + word1 + \" \" + similarity);\n\t}", "public void debug(PrintWriter w)\n {\n align(w, \"word=\" + word + \"[\" + orig.wordDist(word) + \"]\", 22);\n align(w, \"mph=\" + metaphone + \"[\" + orig.mphDist(metaphone) + \"]\", 13);\n a...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a LatchedThreadGroup with threadCount threads each running runnable.
public LatchedThreadGroup(Runnable runnable, int threadCount) { mThreads = new Thread[threadCount]; for (int i = 0; i < threadCount; i++) { mThreads[i] = new Runner(runnable, "Latched_Thread_" + i); } }
[ "public LatchedThreadGroup(Runnable[] runnables) {\n\t\tint threadCount = runnables.length;\n\t\tmThreads = new Thread[threadCount];\n\t\tfor (int i = 0; i < threadCount; i++) {\n\t\t\tmThreads[i] = new Runner(runnables[i], \"Latched_Thread_\" + i);\n\t\t}\n\t}", "EventLoopGroup newEventLoopGroup(int threads, Thr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method that returns a nation's name by it's id
public String getNationNameByNationId(final int nationId) { for (final NationDTO nation : dataCollection.getNations()) { if (nation.getNationId() == nationId) { return nation.getName(); } } return "No nation"; }
[ "String getRegionTitle(Nation nation);", "public Name getGermplasmNameByID(Integer id) throws MiddlewareQueryException;", "java.lang.String getIndividualName();", "public String getPersonName(int id) throws SQLException {\n\t\tquery = \"SELECT name FROM person WHERE id=\" + id;\n\t\treturn stmt.executeQuery(q...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Write a Java program to associate the specified value with the specified key in a HashMap to create a new hashmap of some colors and their Hex Color Code and print out the map.
public static void main(String[] args) { HashMap<String, String> hashColours = new HashMap<>(); hashColours.put("#FF0000", "red"); hashColours.put("#FFD700","gold"); hashColours.put("#FFFF00","yellow"); hashColours.put("#008080","teal"); System.out.println("The hashmaps...
[ "public final void addColor(final String key, final String value) {\n this.map.put(key, value);\n }", "private static Map<Character, Color> createColorMap() {\n\n final Map<Character, Color> map = new HashMap<Character, Color>();\n map.put(' ', NO_COLOR);\n map.put(Block.I.getChar()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Setter of the property areaOfInterest
public void setAreaOfInterest(String areaOfInterest) { this.areaOfInterest = areaOfInterest; }
[ "public void setArea(int area);", "public void setLandArea(double landArea);", "public void setArea() {\n\t\tthis.area= height*width;\n\t}", "public void setArea(String area) {\r\n this.area = area;\r\n }", "public void setArea(double roomArea)\r\n {\r\n area = roomArea;\r\n }", "pu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Used to push a link to this channel
public void pushLink(String title, String body, String url) { push(new SendableLinkPush(title, body, url)); }
[ "public void addLink(Link link);", "private void subscribeShortLink() {\n mProductDetailsViewModel.getShortLink().observe(this, shortLink -> {\n Intent intent = new Intent(Intent.ACTION_SEND);\n intent.setType(TEXT_PLAIN);\n intent.putExtra(Intent.EXTRA_SUBJECT, getResources().getString(R.string...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a userfriendly string that identifies the underlying contact source.
public String getDisplayName() { return contactSource.getDisplayName(); }
[ "public String sourceFabricFriendlyName() {\n return this.sourceFabricFriendlyName;\n }", "java.lang.String getAssociatedSource();", "public String getContactString() {\n Logger.d(TAG, \"getContactString() entry mContactString is \"\n + mContactString);\n return mContactSt...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Parse JSON given as string.
public T parse(String jsonString) { return gson.fromJson(jsonString, type.getType()); }
[ "public static JSONObject parseStringToJSON(String s) {\n\t\tJSONObject json = null;\n\n\t\ttry {\n\t\t\tif (s.charAt(0) == '[' && s.charAt(s.length() - 1) == ']') {\n\t\t\t\tJSONArray ar = new JSONArray(s);\n\t\t\t\tjson = ar.getJSONObject(0);\n\t\t\t} else {\n\t\t\t\tjson = new JSONObject(s);\n\t\t\t}\n\n\t\t} ca...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This performs one of two actions while the zoom is being initialized it will start the zoom box or it will finish it, Depending on the zoomCounter This button expects a left click and right click from the user. These points become the corners of the rectangle that we will zoom in on
public void mouseClicked(MouseEvent evt) { int x = evt.getX(); int y = evt.getY(); if((SwingUtilities.isRightMouseButton(evt)||evt.isControlDown())&&zoomCounter==1){ //bZoomInBox = false; images.setZoomInBox(false); images.trackingZoomBox(x,y); ...
[ "public void processMouseMotionEvent(MouseEvent e) {\r\n switch (e.getID()) {\r\n case MouseEvent.MOUSE_DRAGGED:\r\n // return if environment is not set for a zoom event\r\n if (e.isPopupTrigger()\r\n || this == null\r\n || datasetGraphics == null\r\n || zoomSt...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Setter method for property : surname (nullable: no) Person surname
void setSurname( java.lang.String value );
[ "public void setSurname(String s) {\n this.surname = s;\n }", "public void setSurname(String surname) {\n this.surname = firstUpperCase(surname);\n }", "public void setSurname(String surname) {\r\n\t\tthis.surname = surname;\r\n\t}", "public void setSurname(String Surname) {\n this.Surnam...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the accountCityName attribute.
public String getAccountCityName() { return accountCityName; }
[ "java.lang.String getCityName();", "public String getCityCnName() {\n return cityCnName;\n }", "public String getName() {\n\t\treturn cityName;\n\t}", "public String getCity() {\n return (String)getAttributeInternal(CITY);\n }", "java.lang.String getCity();", "@Override\n\tpublic java....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Notifies the message from restoring backup.
void showRestoredBackUp(String result);
[ "void notifyGameRestored();", "public void exibeBackup(){\n\t\tSystem.out.println(this.bd.gerarBackup());\n\t}", "public void notifySaved() {\n forceReparse();\r\n }", "@Override\r\n\tpublic void onRestoreInstanceState(Bundle savedInstanceState) {\r\n\r\n\t\tsuper.onRestoreInstanceState(savedInstanc...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This class is used to map Product entity to Product DTO and vice versa
@Mapper public interface ProductMapper { /** * Map Product entity into Product DTO * @param product entity to be mapped * @return Product DTO */ ProductDTO productToProductDto(Product product); /** * Map List<Product> into List<ProductDTO> * @param product list of product ent...
[ "ProductDTO productToProductDto(Product product);", "Product productDtoToProduct(ProductDTO productDTO);", "private ProductDTO convertToDTO(Product product) {\n \treturn modelMapper.map(product, ProductDTO.class);\n }", "@Mapper(componentModel = \"spring\", uses ={})\npublic interface ProductMapper exte...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a new child scene node at the parents origin
public SceneNode createChild() { return createChild(new Vector3()); }
[ "ChildNode createChildNode();", "protected abstract void createChildren();", "abstract protected void createNode (DefaultMutableTreeNode parent);", "public abstract Entity createChild(String title, String description);", "PEChild createPEChild();", "public Node createNode(Node parent, int numChild, int le...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the ITBAG value for this ProductPRD.
public java.lang.String getITBAG() { return ITBAG; }
[ "public java.math.BigDecimal getTIPOPAGO() {\r\n return TIPOPAGO;\r\n }", "public void setITBAG(java.lang.String ITBAG) {\n this.ITBAG = ITBAG;\n }", "public java.math.BigInteger getGibbmt()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphan...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method gets the MyJoke object associated with the specified id.
@ApiMethod(name = "getMyJoke") public MyJoke getMyJoke(@Named("id") Long id) { // TODO: Implement this function logger.info("Calling getMyJoke method"); String joke_str = new Main().fetchJoke(); MyJoke joke = new MyJoke(); joke.setJoke(joke_str); return joke; ...
[ "@Override\r\n\tpublic Wordi get(String id) {\r\n\t\tQuery query = new Query(Criteria.where(\"_id\").is(id));\r\n\t\treturn this.mongoTemplate.findOne(query, Wordi.class, PERSON_COLLECTION);\r\n\t}", "public Kids get( Integer id ) {\n\t\t// Retrieve session from Hibernate\n\t\tSession session = sessionFactory.get...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
.TransTasmanResponse.TransTasmanResponseOutputFields OutputFields = 1;
public com.equifax.fabric.dataprep.geocoder.TransTasmanResponse.TransTasmanResponseOutputFieldsOrBuilder getOutputFieldsOrBuilder() { if (outputFieldsBuilder_ != null) { return outputFieldsBuilder_.getMessageOrBuilder(); } else { return outputFields_ == null ? com.equifax.fabric....
[ "public com.equifax.fabric.dataprep.geocoder.TransTasmanResponse.TransTasmanResponseOutputFieldsOrBuilder getOutputFieldsOrBuilder() {\n return getOutputFields();\n }", "public Builder setOutputFields(com.equifax.fabric.dataprep.geocoder.TransTasmanResponse.TransTasmanResponseOutputFields value) {\n if (...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets (as xml) the "currency_ID" element
void xsetCurrencyID(org.apache.xmlbeans.XmlString currencyID);
[ "void setCurrencyID(java.lang.String currencyID);", "public void setCurrencyID(String value) {\n this.currencyID = value;\n }", "void setNilCurrencyID();", "java.lang.String getCurrencyID();", "public void setCurrencyID(java.lang.Object currencyID) {\n this.currencyID = currencyID;\n }", "or...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks whether the specified JAR file entry denotes a signaturerelated file, i.e. matches METAINF/.SF, METAINF/.DSA or METAINF/.RSA.
private static boolean isSignatureFile( String entryName ) { if ( entryName.regionMatches( true, 0, "META-INF", 0, 8 ) ) { entryName = entryName.replace( '\\', '/' ); if ( entryName.indexOf( '/' ) == 8 && entryName.lastIndexOf( '/' ) == 8 ) { if (...
[ "private boolean isJarFile(File file) {\n\t\tif(file.isFile())\n\t\t\treturn file.getName().toLowerCase().endsWith(\".jar\");\n\t\treturn false;\n\t}", "private void checkForManifest(ZipEntry entry, ZipFile jar) {\n \t\tif (entry.getName().equalsIgnoreCase(MANIFEST_ENTRY_NAME))\n \t\t\tmanifestJar = jar;\n \t}", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of isLocked method, of class CollectionEventHelper.
@Test public void testIsLocked_NoLock() { assertFalse(testObject.isLocked()); verifyZeroInteractions(adapter); }
[ "@Test\n public void testIsLocked_AfterLockMethod() {\n testObject.beginChange(event);\n assertTrue(testObject.isLocked());\n }", "public boolean isLocked()\r\n\t{\r\n\t\tif (CollectionStatus.LOCK_TE.equals(status_) \r\n\t\t\t\t|| CollectionStatus.LOCK_RST.equals(status_)\r\n\t\t\t\t|| Collect...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Evaluates whether the JMX report should be refreshed by calling the Namenode, based on the following conditions: 1. JMX Updates must be enabled. 2. The last attempt to update JMX occurred before the configured interval (if any).
private boolean shouldUpdateJmx() { if (this.updateJmxIntervalMs < 0) { return false; } return Time.monotonicNow() - this.lastJmxUpdateAttempt > this.updateJmxIntervalMs; }
[ "@Test\n public void testJmxMetrics() throws Exception {\n\n assertEquals(getStatus(), \"true\");\n master.getLoadBalancer().updateBalancerStatus(false);\n assertEquals(getStatus(), \"false\");\n\n }", "public boolean isJmxEnabled();", "public boolean isJMXReportingEnabled() {\n return jmxEnabled;...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Name: Constructor Purpose: set name for shape Parameters: String name
public Shape(String name) { this.setName(name); }
[ "public Shape(String name, String type) {\n this.name = name;\n this.type = type;\n }", "public Shape() \n {\n this.setName(\"Shape\");\n }", "@Override\n public String getName() {\n return this.shape.getName();\n }", "protected Geom( String name ) {\r\n this.name = name;\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the date a particular booking was cancelled/approved
public Date getDateCancelledOrApproved() { return dateCancelledOrApproved; }
[ "public Number getCancelDate() {\n return (Number) getAttributeInternal(CANCELDATE);\n }", "public Date getCancelDate() {\n return this.getAdvanceTravelPayment().getCancelDate();\n }", "public Date getDATE_CANCELLED() {\r\n return DATE_CANCELLED;\r\n }", "public java.util.Calenda...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__CState__Group__0" $ANTLR start "rule__CState__Group__0__Impl" InternalSymboleoide.g:8782:1: rule__CState__Group__0__Impl : ( ( rule__CState__ContrStateAssignment_0 ) ) ;
public final void rule__CState__Group__0__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalSymboleoide.g:8786:1: ( ( ( rule__CState__ContrStateAssignment_0 ) ) ) // InternalSymboleoide.g:8787:1: ( ( rule__CState__ContrStateAssign...
[ "public final void rule__CState__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalSymboleoide.g:8774:1: ( rule__CState__Group__0__Impl rule__CState__Group__1 )\n // InternalSymboleoide.g:8775:2: rule__CState__Group...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the correct ThrottleAction based on the current pressed keys
ThrottleAction getThrottleAction() { // The last pressed key for (KeyCode pressedKey : pressedKeys) { if (BOOST.contains(pressedKey)) { return ThrottleAction.BOOST; } if (ACCELERATE.contains(pressedKey)) { return ThrottleActi...
[ "HandbrakeAction getHandbrakeAction() {\r\n\r\n for (KeyCode pressedKey : pressedKeys) {\r\n\r\n if (HANDBRAKE.contains(pressedKey)) {\r\n return HandbrakeAction.ACTIVE;\r\n }\r\n\r\n }\r\n return HandbrakeAction.INACTIVE;\r\n }", "AccelerationType getA...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Randomly generates 128 byte key
public Add128(){ key = new byte[128]; Random rand = new Random(); rand.nextBytes(key); }
[ "public static byte[] generateRandomKey_AES128() {\n return ByteUtil.randomBytes(16);\n }", "long generateKey();", "T getRandomKey();", "public Hash getRandomKey() { return _randomKey; }", "public String generateNewKey();", "public static String generateResetKey() {\n return RandomStringU...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Deserializes a CounterRecord from a ByteBuffer.
public static CounterRecord fromByteBuffer( java.nio.ByteBuffer b) throws java.io.IOException { return DECODER.decode(b); }
[ "T deserialize(ByteBuffer byteBuffer);", "public static AvroRide fromByteBuffer(\n java.nio.ByteBuffer b) throws java.io.IOException {\n return DECODER.decode(b);\n }", "Object deserialize(ByteBuffer bb);", "public static DNSLog fromByteBuffer(\n java.nio.ByteBuffer b) throws java.io.IOException...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Removes the first element; an exception is thrown if deque is empty.
public E removeFirst() throws EmptyDequeException;
[ "public T frontRemove() throws EmptyCollectionException\n {\n if (isEmpty())\n throw new EmptyCollectionException (\"deque\");\n\n T result = deque[0];\n\n rear--;\n\n /** shift the elements */\n for (int scan=0; scan < rear; scan++)\n deque[scan] = deque[scan+1];\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
SEARCH /_search/audit_logss/:query > search for the audit_logs corresponding to the query.
@RequestMapping(value = "/_search/audit_logss/{query}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) @Timed public List<Audit_logs> searchAudit_logss(@PathVariable String query) { return StreamSupport .stream(audit_logsSearchRepository.search(query...
[ "public Collection<LogEntry> findLogEntries(String search) throws Exception;", "List<AccountFeeLog> search(AccountFeeLogQuery queryParameters) throws DaoException;", "public org.eclipse.stardust.engine.api.query.LogEntries\n getAllLogEntries(org.eclipse.stardust.engine.api.query.LogEntryQuery query)\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a value of the horizontal lines model thickness.
final int getHorizontalLinesThicknessModel() { return horizontalLinesThicknessModel; }
[ "public int getLineThickness()\r\n\t{\r\n\t\treturn _lineWidth;\r\n\t}", "final int getHorizontalLinesThickness() {\n\n updateGraphArea();\n return horizontalLinesThickness;\n }", "public float getLineThickness() {\n // check for border style\n if (borderStyle != null) {\n return...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removes all the legal fields where groupId = &63; and companyId = &63; and language = &63; and statusField = &63; from the database.
@Override public void removeByG_C_L_S( long groupId, long companyId, String language, boolean statusField) { for (LegalField legalField : findByG_C_L_S( groupId, companyId, language, statusField, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(legalField); } }
[ "@Override\n\tpublic void removeByG_C_L(long groupId, long companyId, String language) {\n\t\tfor (LegalField legalField :\n\t\t\t\tfindByG_C_L(\n\t\t\t\t\tgroupId, companyId, language, QueryUtil.ALL_POS,\n\t\t\t\t\tQueryUtil.ALL_POS, null)) {\n\n\t\t\tremove(legalField);\n\t\t}\n\t}", "@Override\n\tpublic void r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the access type.
public void setAccessType(AccessType accessType) { this.accessType = accessType; }
[ "protected void setAccessType(AccessType accessType) {\n\tthis.accessType = accessType;\n }", "public void setAccessType(int accessType) {\n this.accessType = accessType;\n }", "public void setAccessType(String accessType) {\r\n\t\tthis.accessType=accessType;\r\n\t}", "public void setAccessType(java.la...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The list of shipping rates per zone.
@Nonnull public List<ZoneRate> getZoneRates() { return zoneRates; }
[ "public List<AvailableShippingMethod> getAvailableShippingMethods() {\n return (List<AvailableShippingMethod>) get(\"available_shipping_methods\");\n }", "@ApiModelProperty(value = \"Rates that will be applied during the duration of the car rental requested. These rates are generally not inclusive of ta...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removes the meal ticket with the primary key from the database. Also notifies the appropriate model listeners.
@Override public MealTicket remove(String custom_key) throws NoSuchMealTicketException { return remove((Serializable)custom_key); }
[ "@Override\n\tpublic MealTicket remove(Serializable primaryKey)\n\t\tthrows NoSuchMealTicketException {\n\t\tSession session = null;\n\n\t\ttry {\n\t\t\tsession = openSession();\n\n\t\t\tMealTicket mealTicket = (MealTicket)session.get(MealTicketImpl.class,\n\t\t\t\t\tprimaryKey);\n\n\t\t\tif (mealTicket == null) {\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Unit test for setGoalLocation()
public void testSetGoalLocation() { test = new Location(9, 9); assertEquals(test, maze1.getGoalLocation()); test = new Location(1, 1); maze1.setGoalLocation(test); assertEquals(test, maze1.getGoalLocation()); test = new Location(2, 2); maze1.setC...
[ "public void testGetGoalLocation() {\n test = new Location(9, 9);\n assertEquals(test, maze1.getGoalLocation());\n }", "@Test\n public void testSetLocation() {\n }", "public void setGoal(Point point) {\n mGoal = point;\n }", "@Test\n public void targetLocationTest() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
route receives a map of json key value pairs. keys are "username", "password" and "filename". the user is created with the value of keys username and password and then the character is created by getting both avatars that are paired with the filename of what is coming back.
@RequestMapping(path = "/signup", method = RequestMethod.POST) public Character getUser(HttpSession session, @RequestBody Map<String, String> json) throws PasswordStorage.CannotPerformOperationException { if (json.get("username") == null) { return null; } User user = new User(jso...
[ "void chooseMap(String username);", "void createActorAssetUserFactory(String assetUserActorPublicKey, String assetUserActorName, byte[] assetUserActorprofileImage) throws CantCreateAssetUserActorException;", "void setMapping(String uuid, String filepath);", "public String createAvatar(AvatarRequest avatarRequ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get a description of this function for use in error messages. For named functions, the description is the function name (as a lexical QName). For others, it might be, for example, "inline function", or "partiallyapplied endswith function".
public String getDescription() { return getFunctionName().getDisplayName(); }
[ "WSDLFunction getFunctionDescription(String aName) throws WSDLException;", "public String getFunctionDesc() {\n return functionDesc;\n }", "public StructuredQName getFunctionQName() {\n return FUNCTION_NAME;\n }", "java.lang.String getFuncName();", "public String getFunction_short_desc()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Evaluate a stack, store in info. If a particle is not in the list it must be created. All particles in the map must receive data.
public void analyze(ProgressHandle progh, EvStack stackValue, EvStack stackMask, ParticleMeasure.FrameInfo info);
[ "public void evaluate (Deque<Apfloat> valueStack) throws ExpressionException;", "private MiniREVariable evaluateStack(LinkedList<MiniREVariable> stack) {\r\n\t\twhile (stack.size() != 1) {\r\n\t\t\tMiniREVariable list1 = stack.pop();\r\n\t\t\tMiniREVariable op = stack.pop();\r\n\t\t\tMiniREVariable list2 = stack....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Determine an Id of a next sibling node.
public String getNextSiblingId(String nodeId) throws PortalException;
[ "public String getPreviousSiblingId(String nodeId) throws PortalException;", "public int getNextSibling(int nodeHandle) {\n nodeHandle &= NODEHANDLE_MASK;\n // Document root has no next sibling\n if (nodeHandle == 0)\n return NULL;\n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Make sure issue tracker component exists for all the released plugins.
public void testAllPlugins() throws ProcessingException { JavaNet net = JavaNet.connect(); JNProject hudson = net.getProject("hudson"); JNIssueComponent comp = hudson.getIssueTracker().getComponent("hudson"); Set<String> names = new HashSet<String>(); for(String n : comp.getSub...
[ "private void ensureRegistered() {\n if (fDescriptors == null) {\n reloadExtensions();\n }\n }", "public IssuesTrackerRegister() {\n initComponents();\n }", "public IssuesTracker() {\r\n // Empty\r\n }", "private void checkLibraryDescriptorsUpToDate() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retorna a quantidade pessoas sem bens vinculados.
Number quantidadePessoasSemBensVinculados() throws BancoobException;
[ "private void verificarQuantidadePecas() {\r\n\t\tTabuleiro tabuleiro = estadoJogo.getTabueiro();\r\n\r\n\t\tint numLinhas = tabuleiro.getNumLinhas();\r\n\t\tint numColunas = tabuleiro.getNumColunas();\r\n\r\n\t\t// Verificando quantidade de peças dos jogadores...\r\n\t\tint numPecasJogador1 = 0;\r\n\t\tint numPeca...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a new AlarmMessageDao without any configuration
public AlarmMessageDao() { super(AlarmMessage.ALARM_MESSAGE, jooq.data.tables.pojos.AlarmMessage.class); }
[ "public AlarmMessageDao(Configuration configuration) {\n super(AlarmMessage.ALARM_MESSAGE, jooq.data.tables.pojos.AlarmMessage.class, configuration);\n }", "public abstract AlarmDao alarmDao();", "public RAlarmLogDAOImpl() {\r\n super();\r\n }", "public MessageFactory() {}", "@Override\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Builds a translator based on the specified Locale.
public static void initTranslator(Locale locale) { getTranslator().setLocale(locale); }
[ "java.util.concurrent.Future<BuildBotLocaleResult> buildBotLocaleAsync(BuildBotLocaleRequest buildBotLocaleRequest);", "@Override\n\tpublic AttachmentSourceTranslator build() throws BuildException {\n\t\tLOG.info(\"Using translator that calls all registered translators\");\n\t\tLOG.debug(\"Registered translators:...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
asserts count of elements by xpath
@Then("There should be {int} occurences of {string}") public void countOccurences(int count, String xpath) { assertEquals(count, driver.findElements(By.xpath(xpath)).size()); }
[ "public void assertXpathCount(final String xpath, final int count);", "public void assertXpathCount(final String xpath, final String count);", "public void assertElementCount(final String elementLocator, final int count);", "public void assertElementCount(final String elementLocator, final String count);", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Determine if the session supports RPC API requests
public final boolean supportsRPCAPIs() { return (m_sessCaps & Capability.RemoteAPIs) != 0 ? true : false; }
[ "public abstract boolean isRequestSupported();", "private boolean isAllowedApiRequest(HttpServletRequest request) {\n\t\tM_log.debug(\"isAllowedApiRequest(): called\");\n\t\tHttpSession session = request.getSession(true);\n\t\tString url;\n\t\tString queryString = request.getQueryString();\n\t\tString pathInfo = ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
return true if the internal state represents the signature described in the passed in array.
@Override public boolean verifySignature(byte[] signature) { try { Element[] sig = derDecode(signature); CL04SignPublicPairingKeySerParameter pk = (CL04SignPublicPairingKeySerParameter) pairingKeySerParameter; Pairing pairing = PairingFactory.getPairing(pairingKeySerParameter.getParameters()); ...
[ "private boolean isConvertedSignature(byte[] signature) {\n return (signature.length == CURVE_BYTE_LENGTH + 1) && (signature[0] == 0) && ((signature[1] & 0x80) == 0x80);\n }", "public static boolean verifySignature(byte[] data, byte[] signature) {\n try {\n if (!isTinkRegistered) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Determines the total number of Rectangle elements in the tree.
public int rectangleCount() { return this.root.rectangleCount(); }
[ "private double getTotalArea(List<Rect> rectangles) {\n double sum = 0;\n for (Rect r : rectangles) {\n sum += r.getArea();\n }\n return sum;\n }", "@Override\n public int size() {\n sizeNum = 0;\n if(this.root== null){\n sizeNum = 0;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets up the Gamelin Pool.
private Pool setUpGamelin() { final int gamelinVolume = 4300; final int gamelinTemperature = 37; final double gamelinPH = 7.5; final double gamelinNutrientCoefficient = 1.0; final int gamelinNumberOfGuppies = 30; final int gamelinMinAge = 15; final int gamelinMaxA...
[ "public void setUpGame() {\n isRunning = true;\n createBufferStrategy(3);\n bs = getBufferStrategy();\n g = (Graphics2D)bs.getDrawGraphics();\n g.setRenderingHints(new RenderingHints(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON));\n gameInput = new Gam...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__Query__Group__2__Impl" $ANTLR start "rule__Query__Group__3" InternalOCLlite.g:3635:1: rule__Query__Group__3 : rule__Query__Group__3__Impl rule__Query__Group__4 ;
public final void rule__Query__Group__3() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalOCLlite.g:3639:1: ( rule__Query__Group__3__Impl rule__Query__Group__4 ) // InternalOCLlite.g:3640:2: rule__Query__Group__3__Impl rule__Query__Gro...
[ "public final void rule__Query__Group__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalOCLlite.g:3612:1: ( rule__Query__Group__2__Impl rule__Query__Group__3 )\n // InternalOCLlite.g:3613:2: rule__Query__Group__2__Impl ru...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }