query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
File contains single 'ICC_PROFILE' chunk, with a truncated (32 000 bytes) "Europe ISO Coated FOGRA27" ICC profile (by Adobe). Profile should have been about 550 000 bytes, split into multiple chunks. Written by GIMP 2.6.11 See:
@Test public void testTruncatedICCProfile() throws IOException { JPEGImageReader reader = createReader(); reader.setInput(ImageIO.createImageInputStream(getClassLoaderResource("/jpeg/cmm-exception-invalid-icc-profile-data.jpg"))); assertEquals(1993, reader.getWidth(0)); assertEquals...
[ "public native ProfileInfo getIptcProfile() throws MagickException;", "public ICCProfileHeader (byte [] data) {\r\n\r\n dwProfileSize = ICCProfile.getInt (data, offProfileSize);\r\n dwCMMTypeSignature = ICCProfile.getInt (data, offCMMTypeSignature);\r\n dwProfileClass ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructor to initialize the title, genres and release year
public Movie(String title, int releaseYear, String[] genres) { super(); this.title = title; this.releaseYear = releaseYear; this.genres = genres; this.left = this.right = null; }
[ "public Publication(String title, int year)\n {\n // this is the constructor that iniates the variables \n name = title;\n yr = year;\n }", "public Media(String title, String year){\n\t\tthis.title = title;\n\t\tthis.year = year;\n\t}", "public Song(String title, String artist, int ye...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
create a TileView with the icon given in constructor's path
public TileView(Tile t) { tileModel = t; loadIcon(t); int iconHeight = getIcon().getIconHeight(); int iconWidth = getIcon().getIconWidth(); if( iconHeight != 50 || iconWidth != 50) throw new IllegalStateException(); }
[ "Icon createIcon();", "public Tile(char tileAppearance) {\n Image image;\n if (tileAppearance =='G'){\n image = new Image(\"image/blinky_left.png\"); \n\n }else if (tileAppearance =='P'){\n image = new Image(\"image/pacman_right.png\"); \n\n }else if (tileAppearance == ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets active activity to handle setting up multiple activities
public Activity getActiveActivity(){return activeActivity;}
[ "public Activity getCurrentActivity() {\n return solo.getCurrentActivity();\n }", "Activity getNextActivity();", "public String getACTIVITY_ID() {\n return ACTIVITY_ID;\n }", "public static Activity getBase() {\n // TODO Auto-generated method stub\n return null;\n }", "p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
english requirement radio group
public void checkEnglishRequirement(View view){ int radioID_EngRequ = radioGroupEnglishRequirement.getCheckedRadioButtonId(); radioButtonEnglishRequirement = findViewById(radioID_EngRequ); }
[ "QuestionnaireGroup getGroup();", "public void chooseLevelByGroupBtn(int size){\n RadioButton rbEasy = makeRadionBtnOption(size, \"Easy\");\n rbEasy.setTextColor(Color.WHITE);\n RadioButton rbMedium = makeRadionBtnOption(size, \"Medium\");\n rbMedium.setTextColor(Color.WHITE);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Executing 0 as a command should stop the program running. Make a CoffeeMakerQuest and set it as running. Execute the 0 command. It should no longer be running.
@Test public void testCMQExecuteCommandZero() { CoffeeMakerQuest CMQ = new CoffeeMakerQuest(); CMQ.setRunning(true); Character zero = 0; CMQ.executeCommand(zero); assertFalse(CMQ.isRunning()); }
[ "public void stopExecutingProgramOnRobot() {\n manageCommandAsync(new Command(\"stop\", \"\"));\n }", "public void beginControl() {\n\t\tCommandInfo curCommand;\n\t\tCommandExecutor curCommandExecuter;\n\t\twhile (true) {\n\t\t\ttry {\n\t\t\t\t//take command from the queue\n\t\t\t\tcurCommand = commands...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructs a newly allocated VehicleType object indicated by the Hashtable parameter
public VehicleType(Hashtable hash) { super(hash); }
[ "public VehicleType() { }", "public BVHashtable(Hashtable hashtable)\n {\n super(hashtable);\n }", "public BVHashtable()\n {\n super();\n }", "Vehicle createVehicle();", "private void createHashtable()\n {\n int numLanguages = languages.length;\n mapping = new Hash...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Update the simulation for 1 cycle: Updates entity locations, deals with entity interactions, spawns new entities, deletes dead entities, and updates the 2D world array
public void updateWorld(){ // Iterate through each entity and update their coords, health, age for(int i = 0; i < entityList.size(); i++){ Entity ent = entityList.get(i); ent.update(world); // Spawn plants if(ent instanceof Plant){ ...
[ "@Override\n public void update ( long t )\n {\n try\n { \n // Iterate through all entities, filtering by those that contain the specific set of components, that this system is intended to work with.\n \n for ( ECSEntity entity : engine.getEntities ().values ()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method corresponds to the database table gamegrade
List<gameGrade> selectByExample(gameGradeExample example);
[ "gameGrade selectByPrimaryKey(Integer gId);", "ShopGrade selectByPrimaryKey(Long gradeId);", "public List<StudentGrade> viewGradeCard(int studentId) throws SQLException;", "int getGrade();", "public int getGrade() { return grade; }", "public void createGrade(String name,int year, String subject, String as...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns true if the element is in the given namespaceURI and has the specified name.
public static boolean isElement(Element elem, String namespaceURI, String name) { if (elem.getNamespaceURI().equals(namespaceURI) && elem.getLocalName().equals(name)) { return true; } return false; }
[ "public boolean hasAttributeNS(String namespaceURI, \n String localName);", "public static boolean isElementNamed(Element e, String ns, String localName) {\n\t\treturn (e != null && safeCompare(ns, e.getNamespaceURI()) && safeCompare(\n\t\t\t\tlocalName, e.getLocalName()));\n\t}",...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This constructor creates the person object and it has in the parameters the first name(givenName), lastname(surname), streetAddress, city, state, zipcode, bloodtype as well as the rhesus.
public Person(String givenName, String surname, String streetAddress, String city, String state, String zipCode, String bloodType, String rhesus) { this.givenName = givenName; this.surname = surname; this.streetAddress = streetAddress; this.city = city; this.state = state; this.zipCode = zipCode; this.bl...
[ "public Patient(String username, String firstName, String lastName, String password,\n String gender, String address, String insuranceProvider,\n String primaryPhoneNumber, String secondaryPhoneNumber,\n java.util.Date dateOfBirth) {\n // Call the constru...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Decreases the slice to be displayed by one and updates title frame.
public synchronized void decSlice() { if (imageA.getNDims() <= 2) { return; } if (componentImage.getSlice() > 0) { componentImage.setSlice(componentImage.getSlice() - 1); controls.setZSlider(componentImage.getSlice()); if (imageA.getLi...
[ "protected void removeTitle(){\n canvas.remove(titleBorder);\n canvas.remove(titleBox);\n canvas.remove(title);\n canvas.remove(startBorder);\n canvas.remove(startBox);\n canvas.remove(startText);\n }", "public void showSlice(int index) {\n\t\tif (index>=1 && index<=im...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Restarts failed requests and cancels and restarts in progress requests.
public void restartRequests() { for (Request request : getSnapshot(requests)) { if (!request.isComplete() && !request.isCancelled()) { // Ensure the request will be restarted in onResume. request.pause(); if (!isPaused) { request.be...
[ "public void restartRequestQueue() {\n if (mRequestQueue != null) {\n mRequestQueue.removeRequestEventListener(this); // Prevent interrupted requests from messing with downloads\n mRequestQueue.cancelAll(request -> true);\n mRequestQueue.addRequestEventListener(this);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Repeats the notes specified in the method
public void repeatNotes() { int start, end; printScore(); //prints the current score that we have for the user to reference System.out.print("\nEnter the note number that starts the repetition > "); //...
[ "void repeatText()\r\n {\r\n for (String i: repeatedText)\r\n {\r\n speak(i);\r\n }\r\n }", "private void playNotes()\n\t{\n\t\t//Update tracks when we can shift chords.\n\t\tChord curChord = ClearComposer.cc.getChord();\n\t\tif (index % ClearComposer.cc.getChordInterval() ==...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
set the current size read from the file
protected void setFileCurrentSizeRead(int value) { mFileCurrentSizeRead = value; }
[ "public void setFileSize(long v) { filesize = v; }", "public abstract void setFilesize(TagContent size) throws TagFormatException;", "public void updateFileSize(long size) throws VrsException;", "private void setFileSize(StorageInfo info, long length)\n throws CacheException\n {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add bean properties to a URI
public static String addPropertiesToURIFromBean(String uri, Object bean) throws Exception { Map<String, String> props = PropertyUtil.getProperties(bean); return PropertyUtil.addPropertiesToURI(uri, props); }
[ "public static String addPropertiesToURI(String uri, Map<String, String> props) throws Exception {\n String result = uri;\n if (uri != null && props != null) {\n StringBuilder base = new StringBuilder(stripBefore(uri, '?'));\n Map<String, String> map = parseParameters(uri);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a detached, initialised ProcessExecutionRecord
public ProcessExecutionRecord(Long id, Long processInstanceId, String uuid, Map<String,Object> log, Date created) { super(ProcessExecutionTable.PROCESS_EXECUTION); set(0, id); set(1, processInstanceId); set(2, uuid); set(3, log); set(4, created); }
[ "public ProcessExecutionRecord() {\n super(ProcessExecutionTable.PROCESS_EXECUTION);\n }", "public ProcessRecord() {\n this(DSL.name(\"process_record\"), null);\n }", "void createRuntimeRecord(ScriptRuntimeDTO record) throws PersistenceException;", "SAProcessInstanceBuilder createNewInstan...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column user.wage_number
public void setWageNumber(String wageNumber) { this.wageNumber = wageNumber == null ? null : wageNumber.trim(); }
[ "public void setWage(double w){ // begin setter\n \n wage = w; // set new wage\n \n }", "public void setWage(double wage) {\r\n this.wage = wage;\r\n }", "public String getWageNumber() {\r\n return...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the color of the range rings. (used by persistence)
public void setRrColor(Color value) { rrColor = value; }
[ "private void setRed()\n {\n setColors(2.0,3.0,4.0,5.0,3.0,4.0);\n }", "void setColor(int r, int g, int b);", "void changeColor(Shape s, float red, float blue, float green, int start, int end);", "public void setColor(int color);", "void setRed(int x, int y, int value);", "public void setColo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The update index documents function will take as arguments the index name, document type, and a map of documents to update. The document map key is the document id, and the value is the document as a JSON string.
@Override public final void updateIndexDocuments(String indexName, String documentType, Map<String, String> documentMap) { LOGGER.info("Updating Elasticsearch index documents, indexName={}, documentType={}.", indexName, documentType); List<String> allIndices = getAliases(indexName); al...
[ "public int updateDocument(String index, String type, String id, JSONObject data){\t\t\n\t\t//POST headers\n\t\tHashMap<String, String> headers = new HashMap<String, String>();\n\t\theaders.put(\"Content-Type\", \"application/json\");\n\t\theaders.put(\"Content-Length\", Integer.toString(data.toJSONString().getByte...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructs an array of Booleans that represents a subset of this set. The subset either equals this set (if init==true) or is the empty set (if init==false).
public boolean[] getSubset(boolean init) { boolean[] subset = new boolean[ax.length]; for (int i = 0; i < ax.length; i++) subset[i] = init; return subset; }
[ "public Set<OWLAxiom> toSet(boolean[] subset) {\n HashSet<OWLAxiom> axs = new HashSet<OWLAxiom>();\n for (int i = 0; i < ax.length; i++) {\n if (subset[i]) {\n axs.add(ax[i]);\n }\n }\n return axs;\n }", "public bo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
mAdapter.modelList.remove(position); mAdapter.notifyItemRemoved(position); mAdapter.notifyItemRangeChanged(position, mAdapter.modelList.size()); RowModel rowModel = new RowModel("My personal training " + (mAdapter.modelList.size() + 1), "Description... ");
public void removeItem(int position) { RowModel model = mAdapter.getItem(position); mAdapter.modelList.remove(position); mAdapter.notifyDataSetChanged(); SharedPreferences sPref = getActivity().getSharedPreferences("TRAINING", Context.MODE_PRIVATE); SharedPreferences.Editor edito...
[ "public void removeRow ( )\n {\n getTableModel ( ).removeRow ( getItemCount ( ) );\n decrementItemCount ( );\n }", "private void deleteItem(int position){\n deleteItem(dataset.get(position),position);\n }", "private void removeSelectedItem() {\r\n DefaultListM...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the flag indicating if nillable elements should provide content.
public void setGenerateNillableContent(boolean aFlag) { mGenerateNillableContent = aFlag; }
[ "public boolean shouldSetNillable() {\r\n if (isNillable()) {\r\n return true;\r\n }\r\n if (isSetNullPolicy()) {\r\n return (getNullPolicy().isXsiNilRepresentsNull() || getNullPolicy().getNullRepresentationForXml() == XmlMarshalNullRepresentation.XSI_NIL);\r\n }\r\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieve the qualified name of the given element node.
String getElementQName(Object element);
[ "String getNameElement();", "public String getName() {\n return element.getNodeName();\n }", "public QName getEnclosingElementName();", "static String getName(Node node) {\n Attr attribute = (Attr) node.getAttributes().getNamedItemNS(null, ATTR_NAME);\n\n if (attribute != null) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns distance from this entity to other, using centered coordinates for both entities.
public float distance(Entity other) { return getCenteredCoordinate().distance(other.getCenteredCoordinate()); }
[ "public double getDistanceBetween(Entity other) throws IllegalArgumentException{\r\n\t\tif(other == null)\r\n\t\t\tthrow new IllegalArgumentException();\r\n\t\treturn this.getPosition().sub(other.getPosition()).getLength() - this.getRadius() - other.getRadius();\r\n\t}", "public double getDistance(){\r\n\t\tretur...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
SubscribeTransactions creates a unidirectional stream from the server to the client in which any newly discovered transactions relevant to the wallet are sent over.
public java.util.Iterator<lnrpc.Rpc.Transaction> subscribeTransactions( lnrpc.Rpc.GetTransactionsRequest request) { return blockingServerStreamingCall( getChannel(), getSubscribeTransactionsMethod(), getCallOptions(), request); }
[ "public void subscribeTransactions(lnrpc.Rpc.GetTransactionsRequest request,\n io.grpc.stub.StreamObserver<lnrpc.Rpc.Transaction> responseObserver) {\n asyncServerStreamingCall(\n getChannel().newCall(getSubscribeTransactionsMethod(), getCallOptions()), request, responseObserver);\n }", "p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__XTryCatchFinallyExpression__Group_3_0_1__0" $ANTLR start "rule__XTryCatchFinallyExpression__Group_3_0_1__0__Impl" ../org.xtext.example.rmodp.ui/srcgen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:25838:1: rule__XTryCatchFinallyExpression__Group_3_0_1__0__Impl : ( ( 'finally'...
public final void rule__XTryCatchFinallyExpression__Group_3_0_1__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:25842:1: ( ( (...
[ "public final void rule__XTryCatchFinallyExpression__Group_3_1__0__Impl() 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...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the selected tool, updates the cursor, and keeps track of the tool that was selected prior the newly selected one
public void setSelectedTool(ToolbarButton button) { previousTool = selectedTool; if (selectedTool != null) { selectedTool.setSelected(false); } selectedTool = button; selectedTool.setSelected(true); if ( TreePanel.getTreePanel()...
[ "protected abstract GTool initSelectTool(Cursor cur);", "public void switchSelCursor() {\r\n\t\tif (getSelectMode()) {\r\n\t\t\tdrawingArea.setCursor(new Cursor(Cursor.CROSSHAIR_CURSOR));\r\n\t\t} else {\r\n\t\t\tdrawingArea.setCursor(Cursor.getDefaultCursor());\r\n\t\t}\r\n\t}", "public void returnToPreviousTo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the sds value for this ServicesDevicesDTO.
public java.lang.String getSds() { return sds; }
[ "public String getSsds() {\n return ssds;\n }", "public String getSsdsmc() {\n return ssdsmc;\n }", "public java.lang.String getDSCRSD() {\n return DSCRSD;\n }", "public Long getDlsbsdsj() {\n return dlsbsdsj;\n }", "public String getDeviceStat()\r\n {\r\n r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generates the SEO content for the given page. Nothing is generated if the SEO content has been generated or it shall not be generated. The SEO content shall be placed inside &lt;div class="ztemp"&gt;. If a page renderer generates &lt;div class="ztemp"&gt; by itself, it must invoke this method.
public static void outSEOContent(Page page, Writer out) throws IOException { if (page != null && ((PageCtrl)page).getOwner() == null) { //only the topmost page shall generate SEO final SEORenderer[] sds = page.getDesktop().getWebApp() .getConfiguration().getSEORenderers(); for (int j = 0; j < sds.length; +...
[ "protected abstract void createContent(Composite page);", "public ISearchPage createObject() throws CoreException {\r\n if (fCreatedPage == null) {\r\n fCreatedPage= (ISearchPage) fElement.createExecutableExtension(CLASS_ATTRIBUTE);\r\n //fCreatedPage.setTitle(getLabel());\r\n //fCreatedPage.set...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns all rows from the renquiry table that match the criteria 'tmpcaseno = :tmpcaseno'.
public Renquiry findByPrimaryKey(String tmpcaseno) throws RenquiryDaoException;
[ "public Renquiry[] findWhereTmpcasenoEquals(String tmpcaseno) throws RenquiryDaoException;", "public Renquiry[] findWhereSlnoEquals(int slno) throws RenquiryDaoException;", "public EmergenciaCreditoFacturaRealizada[] findWhereRfcReceptorEquals(String rfcReceptor) throws EmergenciaCreditoFacturaRealizadaDaoExcep...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the summary statistics values Name Count Average Std. Dev.
public String getSummaryStatistics() { String format = "%-50s \t %12d \t %12f \t %12f %n"; int n = (int) getCount(); double avg = getAverage(); double std = getStandardDeviation(); String name = getName(); return String.format(format, name, n, avg, std); }
[ "public String computeStats(){\r\n\r\n Collections.sort(data);\r\n this.min = Collections.min(data);\r\n this.max = Collections.max(data);\r\n\r\n // Calculates mean\r\n double sum = 0;\r\n\r\n for (int i = 0; i < data.size(); i++) {\r\n sum = sum + data.get(i);\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructs a new Library object.
private Library() { // empty }
[ "public Library()\n {\n super();\n }", "public Library() {\n _lib = new Book[MAX_BOOKS];\n _noOfBooks = 0;\n }", "public TwilioWrapperLibrary buildLibrary()\n {\n return new TwilioWrapperLibrary( this.twilio_account_sid, this.twilio_account_token, this.thinQ_id, this.thin...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns whether this mob/player is married to their liege, or whether they are a simple liege.
public boolean isMarriedToLiege();
[ "public boolean isMarried() {\r\n\t\treturn married.isSelected();\r\n\t}", "public boolean isCarried() {\n return transportable != null\n && transportable.getLocation() == carrier;\n }", "public Boolean getIsmarried() {\r\n return ismarried;\r\n }", "public boolean isBurdened() ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Called when an ingredient has been deleted. Update display.
@Override public void ingredientDeleted() { drawIngredients(); }
[ "@Override\n\tpublic void ingredientDeleted()\n\t{\n\t\tdrawIngredients();\n\t}", "@FXML\n\tpublic void deleteIngredient(ActionEvent event) {\n\t\tif (!txtDeleteIngredientName.getText().equals(\"\")) {\n\t\t\ttry {\n\t\t\t\tboolean delete = restaurant.deleteIngredient(txtDeleteIngredientName.getText());\n\t\t\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Determine if the ObservedScanAnalysis is configured.
public boolean isSetObservedScanAnalysis() { return ((this.observedScanAnalysis != null) && (!this.observedScanAnalysis.isEmpty())); }
[ "protected static boolean isConfigured()\n {\n return __s_Configured;\n }", "public boolean isSetObservedLobeAnalysis() {\n return ((this.observedLobeAnalysis != null) && (!this.observedLobeAnalysis.isEmpty()));\n }", "public boolean isSetObservedPolarisationAnalysis() {\n return ((t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the text fields and combo boxes so that it displays the id/status/date opened/date closed/impact/priority of the passed in ticket
public void setTicketInfo(Ticket ticket) { idTF.setText(""+ticket.getTicketID()); //ticket ID is an int so making it a string if (ticket.isOpen()) statusTF.setText("OPEN"); else statusTF.setText("CLOSED"); doTF.setText(ticket.getDateOpened()); dcTF.setText(ticket.getDateClosed()); ...
[ "private void setAppearanceForTicketCreation()\r\n\t{\r\n\t\t//Set id, status, date open/closed to N/A as \r\n\t\t//Users won't input this information - it\r\n\t\t//will be populated for them.\r\n\t\tidTF.setText(\"N/A\"); \r\n\t\tstatusTF.setText(\"N/A\");\r\n\t\tdoTF.setText(\"N/A\");\r\n\t\tdcTF.setText(\"N/A\")...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Determines if changing the drop down option is necessary and gives the drop down index Notes: 1) There must be at least 2 drop down options for the results to be correct 2) ChangeResults.nIndex is only valid if ChangeResults.bChange == true 3) If future drop down is random selection, then there will be no change as cur...
public static ChangeResults changeOption(WebElement dropDownElement, DropDown future, String sDefaultVisible, String sDefaultValue, String sDefaultIndex) { // Index of drop down option to switch to int nIndex; DropDown current = future.copy(); /* * Need to update the option. * * NOTE: If future....
[ "private void SelectChange(int index)\n\t{\n\t\t\n\t\tswitch(index)\n\t\t{\n\t\tcase 0:\n\t\t\tif(buttoneye==1)\n\t\t\t{\n\t\t\t\tmCtrl.Optometry_status.lens_right=0;\n\t\t\t\tmCtrl.Optometry_status.R_eye_enable=true;;\n\t\t\t\tmCtrl.Optometry_status.r_lens_code=0;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tmCtrl.Optom...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the number phone of this ads item.
public void setNumberPhone(java.lang.String numberPhone) { _adsItem.setNumberPhone(numberPhone); }
[ "public void setPhoneNumber(String value) {\r\n setAttributeInternal(PHONENUMBER, value);\r\n }", "public com.politrons.avro.AvroPerson.Builder setPhoneNumber(java.lang.CharSequence value) {\n validate(fields()[3], value);\n this.phone_number = value;\n fieldSetFlags()[3] = true;\n r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates new StandardPackageValidator instance. The classes that extend this validator should provide their own implementation of this method.
protected StandardPackageValidator createValidatorInstance() { return new StandardPackageValidator(); }
[ "Validator createValidator();", "protected Validator createValidator() {\n return factory.getValidator();\n }", "private TSLValidatorFactory() {\r\n\t\tsuper();\r\n\t}", "protected SimpleValidator() {\n }", "private static void createApplicationValidator(group_bp my_group_bp) {\n\t\t// TODO Aut...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Acknowledge a generated interrupt. This function must be called when an interrupt is generated to discover which pin caused the interrupt and to enable future interrupts. [0] An output paramter that specifies which pin generated the interrupt. [1] The current state of the input pins.
public byte[] AcknowledgeInterrupt() throws IOException { byte ret[] = new byte[2]; ret[0] = mDevice.readRegByte( INTF ); ret[1] = mDevice.readRegByte( INTCAP ); return ret; }
[ "public void IRQ ()\r\n {\r\n if(!I)\r\n {\r\n if(!WAIFlag)\r\n {\r\n push16(PC);\r\n push16(IX);\r\n push8(ACCA);\r\n push8(ACCB);\r\n push8(GetConditionCode());...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This function allows setting a value for _accessURL
public EndpointBuilder _accessURL_(URI _accessURL_) { this.endpointImpl.setAccessURL(_accessURL_); return this; }
[ "private void changeAccess(final BoxSharedLink.Access access){\n if (access == null){\n // Should not be possible to get here.\n Toast.makeText(this, \"No access chosen\", Toast.LENGTH_LONG).show();\n return;\n }\n executeRequest((BoxRequestItem)getCreatedShared...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/This method asks the user to enter the Id of the book being returned. If the records indicate that the given book was borrowed then it allows the user to enter the Id of the student doing the return. If the student Id matches the Id of the student who borrowed the book, then the method calculates how much the student ...
private static void returnBook(){ System.out.println("===Book Return==="); Scanner integer_input = new Scanner(System.in); System.out.println("Enter Id of book being returned: "); int bookId = getIntegerInput();//ensures user input is an integer value //if bookId entered does not exist then continually ask...
[ "private static void checkoutBook(){\n\t\tSystem.out.println(\"===Book Checkout===\");\n\t\tScanner string_input = new Scanner(System.in); //gets String values entered by the user\n\t\tScanner integer_input = new Scanner(System.in); //gets integer values entered by the user\n\t\tboolean exit = false; //indicates wh...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the OS versions to use for nodes in this
public OsVersions osVersions() { return osVersions; }
[ "public Map<OsVersion, List<Node>> versions() {\n return versions;\n }", "public String getOSVersion();", "public Collection<OS> GetSupportedOSs() {\n return Supported;\n }", "public String getOSVersion() {\n return null;\n }", "String determineOSVersion();", "public final St...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method to get All opinions
@Override public List<Opinion> getAllOpinions() { TypedQuery<Opinion> query = em.createQuery("FROM Opinion", Opinion.class); return query.getResultList(); }
[ "public List<OperationHolder> getAllOperations();", "public OptionSet getOpset(int i) {\n\t\treturn opset[i];\n\t}", "java.util.List<yandex.cloud.api.operation.OperationOuterClass.Operation> \n getOperationsList();", "ListIterable<Operation<Handler>> getOperations();", "List<AbstractOperation> getAcc...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR start "functionMethodDeclaration" E:\\GitHub\\CesTa\\src\\org\\cesta\\grammars\\java\\ValidateStateTransitionsParser.g:211:1: functionMethodDeclaration : ^( FUNCTION_METHOD_DECL modifierList ( genericTypeParameterList )? type IDENT formalParameterList ( arrayDeclaratorList )? ( throwsClause )? ( block )? ) ;
public final ValidateStateTransitionsParser.functionMethodDeclaration_return functionMethodDeclaration() throws RecognitionException { ValidateStateTransitionsParser.functionMethodDeclaration_return retval = new ValidateStateTransitionsParser.functionMethodDeclaration_return(); retval.start = input.LT...
[ "public void visitMethodDeclaration(GNode node) {\n\n // set method flag\n methodFlag = true;\n\n // modifiers\n String accessModifier = \"\";\n boolean isStatic = false;\n\n Iterator modifierIter = node.getNode(0).iterator();\n while (mod...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the 'userUpdated' field.
public void setUserUpdated(java.lang.CharSequence value) { this.userUpdated = value; }
[ "public void setUpdatedUser(String updatedUser) {\n this.updatedUser = updatedUser;\n }", "public void setUpdatedUser(Integer updatedUser) {\n this.updatedUser = updatedUser;\n }", "void setUserUpdated(final Long userUpdated);", "public br.com.cogna.test_score_updated.Builder setUserUpdate...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a collection of Experiment objects from the provided files. Experiments information are contained in text files. By default, the info on experiment are stored under in separate text files. The location of the experiments file can also be provided via _rel_path, however, this path must be relative to the default...
public static ArrayList<Experiment> readMultipleExperiments( String _rel_path, ArrayList<String> _file_names) { /* * Initialize path to settings directory with Parameters file. */ String exp_path = Commons.PATH_DEFAULT_EXPERIMENT; File exp_path_file = null; if (_rel_path != null && _rel_path.length() >...
[ "List<ExperimentMetadata> getExperiments(String workspaceName, String projectName, String experimentNamePattern);", "public void setExperiments(Collection<Experiment> experiments);", "List<ExperimentMetadata> getAllExperiments(String projectId);", "public Collection<Experiment> getExperiments();", "public E...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
It will give the list of employee and custom fields detail with the value. EntityFieldValueDetails object will give fields information like field is required, its datatype, Its value and type of field. Type of field defined in 3 types of classes. 1) system 2) builtin 3) custom.
public List<EntityFieldValueDetails> getEmployeeFieldDetailValueList(UUID entityId, int entityType) throws EwpException { EntityCustomFieldDataService service = new EntityCustomFieldDataService(); Cursor cursor = service.getViewableEntityCustomFieldAndPermissionListByUserId(EwpSession.getSharedInstance(...
[ "java.util.List<edu.stanford.slac.archiverappliance.PB.EPICSEvent.FieldValue> \n getFieldvaluesList();", "public HrEmployeeCustomFieldsRecord(Integer id, Integer companyId, String fname, String fvalues, Integer forder, Byte disable, Integer mandatory, Integer status, Integer optionType, Byte fieldType, Str...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
construct a board from an NbyN array of blocks (where blocks[i][j] = block in row i, column j)
public Board(int[][] blocks) { N = blocks.length; tiles = new int[N][N]; for (int i = 0; i < N; i++) { for (int j = 0; j < N; j++) { tiles[i][j] = blocks[i][j]; } } }
[ "public Board(int[][] blocks) \n {\n this.n = blocks.length;\n // corner cases\n for (int i = 0; i < n; i++) // blocks.length is the number of rows\n {\n if (n != blocks[i].length) \n throw new IllegalArgumentException(\"Numbers of rows and columns of the arr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test that available multipackage rollbacks are properly persisted.
@Test public void testAvailableMultiPackageRollbackPersistence() throws Exception { try { RollbackTestUtils.adoptShellPermissionIdentity( Manifest.permission.INSTALL_PACKAGES, Manifest.permission.DELETE_PACKAGES, Manifest.permission.TES...
[ "@Test\n public void testAvailableRollbackPersistence() throws Exception {\n try {\n RollbackTestUtils.adoptShellPermissionIdentity(\n Manifest.permission.INSTALL_PACKAGES,\n Manifest.permission.DELETE_PACKAGES,\n Manifest.permission.TEST...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Make a fresh JUnitTestRunner with its own class loader instance.
private JUnitTestRunner makeRunner() { ClassLoader current = JUnitTestManager.class.getClassLoader(); // References to JUnit classes must match those of the current loader so that, // for example, when a test fails, the failure exception is of a class we can talk // about in the current context. Cl...
[ "private static Object createStandaloneTester() {\n List<URL> urls = new ArrayList<>();\n for (String path : Splitter.on(':').split(System.getProperty(\"java.class.path\"))) {\n\n // A small hack is needed since we didn't make example application under different groupId and not prefixed\n // the art...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the mpMax value for this MerchantPullInfoType.
public void setMpMax(CoreComponentTypes.apis.ebay.BasicAmountType mpMax) { this.mpMax = mpMax; }
[ "public final void setMaxMP(double maxMP) {\r\n\t\tthis.mMaxMP = maxMP;\r\n\t}", "public CoreComponentTypes.apis.ebay.BasicAmountType getMpMax() {\r\n return mpMax;\r\n }", "public void setpMax(int pMax) {\n this.pMax = pMax;\n }", "@Override\n public void setMax(boolean m) {\n max = m...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Represents a function that will act on the Application GUI based on what color was clicked.
@FunctionalInterface public interface AppFunction { /** * Calback for the event, this will be called when a clickable * segment of the application is clicked and the color clicked is * passed to it. * @param color the Color that was clicked */ void fire(Color color); }
[ "private void onMouseDown() {\n ColorDialog dialog = new ColorDialog(shell);\n RGB rgb = dialog.open();\n \n if (rgb != null) {\n Color col = new Color(shell.getDisplay(), rgb);\n label.setForeground(col);\n col.dispose();\n } \n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks whether the ship with a certain size and orientation can fit in the following row and column
public boolean checkIfCanAddShip(int size, int row, int column, Orientation orientation) { boolean canAddShip = true; try { if (orientation == Orientation.Horizontal) { for (int i = column; i < column + size; i++) { if (hasShip[row][i] == false) { } else { canAddShip = false; } }...
[ "private boolean checkSize() {\n\t\t// Note that this method indirectly checks for invalid coordinates such\n\t\t// as ([2,2],[2,2]), where the ship would have size of 0\n\n\t\tif (startCoordinates.x == endCoordinates.x) {\n\t\t\tif (startCoordinates.y > endCoordinates.y) {\n\t\t\t\t// Ship faces north\n\t\t\t\tif ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Remove null shifts introduced into split state.
private void removeNulls( State state) { StackOp[] shifts = new StackOp[ state.stackOps.length - 1]; for( int i=0, j=0; j < shifts.length; i++) { if ( state.stackOps[ i] != nullShift) shifts[ j++] = state.stackOps[ i]; } state.stackOps = shifts; }
[ "void convertBlanksToNull();", "private void removeNulls() {\r\n this.pebbles.removeAll(Collections.singleton(null));\r\n }", "public void removeNull() {\n Texts ind = new Texts();\n\n for (int i = 0; i < numGene; i++) {\n if (!missing[i] && geneName.get(i).ne(\"NULL\") && gen...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets value as the attribute value for Inseam.
public void setInseam(String value) { setAttributeInternal(INSEAM, value); }
[ "public void setInseam(Number value) {\n setAttributeInternal(INSEAM, value);\n }", "public void setInseamId(String value) {\n setAttributeInternal(INSEAMID, value);\n }", "public void set_attribute(Object instance, String attribute_name, Object value) throws XtumlException;", "protected a...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Converts String of time into just the date in format "MMM d, yyyy"
public static Date dateFormattedToDate(String dateTime){ try { return new SimpleDateFormat("MMM d, yyyy", Locale.US).parse(dateTime); } catch (ParseException e) { Timber.e(e, "method=dateFormattedToDate error=Cannot parse date"); return new Date(); } }
[ "public static String convertDateAndTime(String inputString) {\n String trimmedInputString = inputString.trim();\n\n if (trimmedInputString.length() < 10) {\n return convertTime(inputString);\n } else {\n String dateString = trimmedInputString.substring(0, 10).trim();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Performs a HTMLTableVP CompareProperties on an HTMLTable object. Performs a HTMLTableVP CompareProperties on an HTMLTable object. THE BENCHMARK VP MUST ALREADY EXIST AND BE AN ASSET OF THE CURRENTLY RUNNING SCRIPT. Modified VP parameter information can be added to the standard VP=VPName by including the VPName referenc...
public void compareStoredProperties(StepTestTable table, String vPAsset ) { if ( table == null ) throw new IllegalArgumentException ( "compareStoredProperties.table = null"); if ( vPAsset == null ) throw new IllegalArgumentException ( "compareStoredProperties.vPAsset = null"); table.add( HTMLT...
[ "public ComponentFunction compareStoredProperties(String vPAsset ) {\n\n if ( vPAsset == null ) throw new IllegalArgumentException ( \"compareStoredProperties.vPAsset = null\");\n return HTMLTableFunctions.compareStoredProperties(getWindow().getName(), getName(), vPAsset);\n }", "public void comp...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method add trackId to trackIdMap.
private void addTrackId(SongInfo newSong) { if(newSong != null) { this.trackIdMap.put(newSong.getTrackId(), newSong); } }
[ "public void addToIdMap(int Id) {\n idMap.put(Id, true);\n }", "@Override\n public int hashCode() {\n return getTrackId();\n }", "protected abstract String getTrackId();", "public void addIdToPlaylistSongIdsList(int id){\n playlistSongIdsList.add(id);\n }", "public void trac...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the current research level.
public int getResearchLevel(){ return researchLevel; // Returns the current research level }
[ "public String getResearchlevel() {\r\n\t\treturn researchlevel;\r\n\t}", "public int getCurrentLevel();", "public Level getCurrentLevel() {\r\n return currentLevel;\r\n }", "public Level getCurrentLevel(){\r\n return currentLevel;\r\n }", "public int getCurrentLevel() {\n return ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the desired nutrient amount which corresponds to EC.
public static void setNutrients(double newDesiredNutrients) { desiredEC = newDesiredNutrients; }
[ "public void setEcc(double ecc)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(ECC$10, 0);\n if (target == null)\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieves the actual project finish date.
public Date getActualFinish() { return (m_actualFinish); }
[ "public Date getFinishDate()\r\n {\r\n Date result = m_finishDate;\r\n if (result == null)\r\n {\r\n result = getParentFile().getFinishDate();\r\n }\r\n return (result);\r\n }", "public LocalDate getFinishLocalDate() {\n\t\treturn finishDate;\n\t}", "public Date getFinishTim...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method for a doctor requesting viewing permissions from a Client
public void RequestPermission(Client c, Doctor d){ c.addRequest(d); }
[ "void requestViewPatients();", "public void seenByDoctor(View view) {\n\t\tPatient patient = getPatient();\n\t\ttry {\n\t\t\tif (ArrivalCheck(patient.getHc())) { // Checks whether patient is checked in before they see a doctor\n\t\t\t\tIntent intent = new Intent(this, SeenDoctorActivity.class);\n\t\t\t\tHealth_C...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ This method checks all the previous values in currentCombo to see if the next one will be valid or not
public static boolean isValid(int pos) { // Start at index jobsChosen-1 and go down to 0 for (int i = jobsChosen - 1; i >= 0; i--) { if (pos == currentCombo[i]) { return false; } } // Test passed, return true,position is not interfering with others return true; }
[ "private void checkDealValidity() {\n Date endDate = AppUtils.getInstance().getDateFromString(addProductServiceModel.getValidityEndDate(), DATE_FORMAT);\n Date currentDate = AppUtils.getInstance().getDateFromString(AppUtils.getInstance().getDate(), DATE_FORMAT);\n if (currentDate.after(endDate)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructor based on issue builder
protected IssueAbstract(IssueBuilderAbstract builder){ super(builder); assignees = builder.fieldAssignees; themes = builder.fieldThemes; dueDate = builder.fieldDueDate; priority = builder.fieldPriority; calendarString = builder.calendarString; }
[ "public Issue() {\n }", "private IssueModel(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private IssueRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private IssueResponse(com.google.protobuf.GeneratedMessageV3...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Starts the use of the remote network's gateway. If the remote network is in the same subscription, remote gateway use by this network (a.k.a. gateway transit) will also be automatically allowed on the remote network's side. Otherwise, this network will only be configured to use the remote gateway, but the matching peer...
WithCreate withGatewayUseOnRemoteNetworkStarted();
[ "public void start() {\n gateway.openConnection();\n }", "Update withGatewayUseOnRemoteNetworkStarted();", "Update withGatewayUseByRemoteNetworkStarted();", "WithCreate withGatewayUseByRemoteNetworkStarted();", "public synchronized void startNewGateway() throws InvalidMarshallableException {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO: Autogenerated Javadoc The Interface ResourceCollection defines a set of resources and methods to access them.
public interface ResourceCollection { /** * Gets the resources. * * @return the resources */ Iterable<Provider<InputStream>> getResources(); /** * Gets the names. * * @return the names */ Iterable<String> getNames(); /** * Gets the resource. * * @param name the name * @return the resourc...
[ "CollectionResource createCollectionResource();", "public Collection<Resource> getResources() {\n return resourceRegistry.getEntries().values();\n }", "public Iterable<T> iterable() {\n return new ResourceCollectionIterable<>(this);\n }", "public List<Resource> getResources() {\n return r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns true because we do support a custom editor.
public boolean supportsCustomEditor() { return true; }
[ "public boolean supportsCustomEditor() {\n return true;\n }", "public boolean supportsCustomEditor() {\n PropertyEditor[] editors = getAllEditors ();\n if (editors.length > 1) return true; // we must allow to choose the editor even if none of them supports custom editing\n if (edito...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Populate the fields of this object with information contained in a business transaction history record object. This method must set all fields on this object, as if it had been newly created immediately before this method was called. A runtime exception is thrown if the transaction type represented by the history recor...
public void populateFromHistoryRecord(BTXHistoryRecord history) { super.populateFromHistoryRecord(history); setLimsUserId(history.getAttrib1()); setDelimitedSlidesList(history.getAttrib2()); }
[ "public void populateFromHistoryRecord(BTXHistoryRecord history) {\n super.populateFromHistoryRecord(history);\n SampleData sampleData = new SampleData();\n sampleData.setSampleId(history.getAttrib1());\n sampleData.setConsentId(history.getAttrib2());\n setSampleData(sampleData);\n setDeleteReason...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Initializes a new instance of an annotation.
private Annotation() { tokens = new Token[] {}; }
[ "public AnnotationInfoImpl()\n {\n }", "Annotation createAnnotation();", "public AnnotationSearchResultItem() {\n }", "public AnnotationsFactory() {\n super();\n annotationsBeanReader = new AnnotationsBeanReader(this);\n }", "public AnnotationBasedFactory(Class<A> annotationType) {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the boom channel this music is to be played on. Defaults to 1.
public int getBoomChannel() { return boomChannel; }
[ "public int getSoundChannel() \n\t{\n\treturn fSoundChannel;\n\t}", "public int getSoundChannel()\n\t{\n\t\treturn soundChannel;\n\t}", "public int getChannel()\r\n\t{\r\n\t\treturn channel;\r\n\t}", "public int getChannel() {\r\n\t\treturn channel;\r\n\t}", "public int getChannelNumber() {\n return ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method to get the content type of the fileitem.
public String getContentType() { return this.fileItem.getContentType(); }
[ "public String getContentType() {\r\n return mFile.getContentType();\r\n }", "public String getFilecontentContentType() {\n return filecontentContentType;\n }", "public String getFileContentType() {\r\n return (String) getAttributeInternal(FILECONTENTTYPE);\r\n }", "FileType getT...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Setup the editCreditCard page.
@RequestMapping(value="setupEditCreditCard.request", method=RequestMethod.POST) protected String setupEditCreditCard(@ModelAttribute("creditCardId") long creditCardId, Model model) { CreditCardImpl editCreditCard; String encryptedCreditCardNumber, decryptedCreditCardNumber; // Get the CreditCard object and ad...
[ "private void setUpCreditCardViews() {\n\n mSingleLineCardEntry = (SingleLineCardEntryView) mView.findViewById(R.id.credit_card_number);\n\n\n mAddCreditCard = (Button) mView.findViewById(R.id.add_card);\n mAddCreditCard.setOnClickListener(new View.OnClickListener() {\n @Override\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
move area's southwest corner to given point
private static void moveSW(Area a, Point2D p) { AffineTransform t = new AffineTransform(); Rectangle r = a.getBounds(); t.translate(p.getX() - r.x, p.getY() - r.y - r.height); a.transform(t); }
[ "private static void moveSE(Area a, Point2D p) {\n AffineTransform t = new AffineTransform();\n Rectangle r = a.getBounds();\n t.translate(p.getX() - r.x - r.width, p.getY() - r.y - r.height);\n a.transform(t);\n }", "private static void moveNW(Area a, Point2D p) {\n AffineTr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Read MAC address without requiring the ACCESS_WIFI_STATE permission.
private static String getMacAddress(Context context) { // android devices should have a wifi address final String wlanAddress = readAddressFromInterface("wlan0"); if (wlanAddress != null) { return wlanAddress.replace("\n", "").toUpperCase(); } final String ethAddres...
[ "java.lang.String getMAC();", "public static String getMacAddress() {\r\n\t\ttry {\r\n\t\t\treturn loadFileAsString(\"/sys/class/net/eth0/address\")\r\n\t\t\t\t\t.toUpperCase().substring(0, 17);\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "public String...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/Method Name:deletePlanter Parameters:planterId ReturnType:Planter Author Name:Tripura Created Date: 24/05/2021 /Method Name:deletePlanter Parameters:planter ReturnType:Planter Author Name:Tripura Created Date: 24/05/2021
@Override public Planter deletePlanter(Planter planter) throws ResourceNotFoundException{ Optional<Planter> pl = planterRepo.findById(planter.getPlanterId()); if(!(pl.isPresent())) { throw new ResourceNotFoundException("No Planter found with the Id"); } planterRepo.delete(planter); return pl.ge...
[ "public RetrieveUpdateDeleteApi<TestPlan> testplan(String idOrName);", "@Test\n public void deleteTestPlanTest() throws ApiException {\n Integer id = null;\n AbstractRestResponse response = api.deleteTestPlan(id);\n\n // TODO: test validations\n }", "@GET\n\t@Path(\"/deletar/{idPlano}...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
check if the option type is set to radio button
public boolean isRadioButtonTypeSet() { return $(radio).isDisplayed(); }
[ "public boolean hasRadioType()\n {\n return !StringTools.isBlank(this.getRadioType())? true : false;\n }", "public final boolean isRadioValueSetted() {\n\t\treturn engine.isPropertySetted(Properties.RADIO_VALUE);\n\t}", "private model.Type checkRadioButton() throws UiException {\n boolean ca...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
acknowledges TELTONIKA modem about data reception
private static void acknowledgeTeltonikaModem(Channel ch, int recordsNum) { ChannelBuffer buf = ChannelBuffers.buffer(4); byte b[] = intToByteArray(recordsNum); buf.writeBytes(b); LOGGER.info("Response to device about data reception with package amount: " + recordsNum); ch.write(buf); }
[ "void receiveAcknowledgement() {\n byte[] receiveBuffer = new byte[2048];\n DatagramPacket receivePacket = new DatagramPacket(receiveBuffer, receiveBuffer.length);\n try {\n recSocket.receive(receivePacket);\n String dataReceived = new String(receivePacket.getData()).trim(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of setId_Maestro method, of class DMaestros.
@Test public void testSetId_Maestro() { System.out.println("setId_Maestro"); int Id_Maestro = 0; DMaestros instance = new DMaestros(); instance.setId_Maestro(Id_Maestro); }
[ "@Test\r\n public void testGetId_Maestro() {\r\n System.out.println(\"getId_Maestro\");\r\n DMaestros instance = new DMaestros();\r\n int expResult = 0;\r\n int result = instance.getId_Maestro();\r\n assertEquals(expResult, result);\r\n }", "@Test\r\n public void testSe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Verify dealer search title.
public boolean verifyDealerSearchTitle(String searchTitle) { boolean flag = false; if (dealerSearchTitle.getText().contains(searchTitle)) { flag = true; } return flag; }
[ "public void verifyTitle() {\n String expectedTitle = \"Example.co/\";\n Assert.assertEquals(expectedTitle, driver.getTitle());\n }", "private void checkTitle() {\n\t\tif (title == null) {\n\t\t\tinvalidArgs.add(MESSAGE_INVALID_TITLE);\n\t\t}\n\t}", "public boolean verifyDealerPageTitle() {\n\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
If a given object is sliceable, return a slice, or else just return the object.
@SuppressWarnings("unchecked") static <T> T trySlice(T value) { if (value instanceof Sliceable) return ((Sliceable<T>) value).slice(); return value; }
[ "public T caseSlicingRules(SlicingRules object) {\n\t\treturn null;\n\t}", "public T caseElementDefinitionSlicing(ElementDefinitionSlicing object) {\n\t\treturn null;\n\t}", "public boolean isSlice() {\n return ((com.guidewire.pl.domain.persistence.core.effdate.EffDatedBasePublicMethods)__getDelegateManager(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Load the license file into a string.
@SuppressWarnings("CaughtExceptionImmediatelyRethrown") public String getString() throws IOException, GeneralSecurityException { StringBuilder sb = new StringBuilder(); try(FileInputStream fis = new FileInputStream(this.licenseFile)) { try(BufferedReader br = new BufferedReader(new InputStreamReader(fis))){ ...
[ "private String getLicenseText(Cell textCell) {\n\t\tString localFileName = null;\n\t\tFile licenseTextFile = null;\n\t\tHyperlink cellHyperlink = textCell.getHyperlink();\n\t\tif (cellHyperlink != null && cellHyperlink.getAddress() != null) {\n\t\t\tlocalFileName = cellHyperlink.getAddress();\n\t\t\tlicenseTextFil...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A test that checks correctness of the "or" predicate
@Test public void testPredicateOr() { Predicate<Integer> isEven = (x) -> (x % 2) == 0; Predicate<Integer> isDivSeven = (x) -> (x % 7) == 0; Predicate<Integer> evenOrDivSeven = isEven.or(isDivSeven); assertTrue(evenOrDivSeven.apply(14)); assertTrue(evenOrDivSeven.apply(21));...
[ "@Test\n\tpublic void testOr() {\n\t\tOr instruction = new Or(\"or\", \"$s5\", \"$s7\", \"$t1\");\n\t\t\n\t\t// test fields\n\t\tassertEquals(\"or\", instruction.getOpcode());\t// opcode\n\t\tassertEquals(\"$s5\", instruction.getRd());\t\t// rd\n\t\tassertEquals(\"$s7\", instruction.getRs());\t\t// rs\n\t\tassertEq...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a variable retrieval term.
Term<T> getVariableTerm(String variable);
[ "Variable getVariable();", "String value(Term term);", "public String getVariable(String name);", "java.lang.String getVarValue();", "String getToVariable();", "public Term getTerm();", "VariableReference getVariableReference();", "public Term(String var){\n isVariable = true;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the row of a desired protein.
private int getProteinRow(long proteinKey) { int modelIndex = IntStream.range(0, proteinKeys.length) .filter(i -> proteinKeys[i] == proteinKey) .findAny() .orElse(-1); return modelIndex == -1 ? -1 : ((SelfUpdatingTableModel) proteinTable.getModel(...
[ "public int getProbeRow(int column, int row);", "public int getRow(){\n\t\treturn this.row;\n\t}", "public int getRow ()\r\n {\r\n return row;\r\n }", "io.dstore.engine.procedures.OmGetPrepaidCodesAd.Response.Row getRow(int index);", "io.dstore.engine.procedures.PmGetPersonOutputCharacsAd.Respo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The kind of target (e.g., e.g. "cc_library rule", "source file", "generated file") where the completion is reported. string target_kind = 1;
public java.lang.String getTargetKind() { java.lang.Object ref = targetKind_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUt...
[ "java.lang.String getTargetKind();", "public java.lang.String getTargetKind() {\n java.lang.Object ref = targetKind_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toS...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a new index table for an empty primary table.
static IndexTable createIndexTable(Table primaryTable, int indexColumn) throws IOException { if (primaryTable.getRecordCount() != 0) throw new AssertException(); return new FieldIndexTable(primaryTable, indexColumn); }
[ "@Override\n\tpublic void createNewTable() {\n\t\tint i = 1;\n\t\tboolean newIndexIsFound = false;\n\t\tString tableName = null;\n\t\twhile (!newIndexIsFound) {\n\t\t\ttableName = \"Table\" + i++;\n\n\t\t\tif (!this.tableNameAlreadyExists(tableName)) {\n\t\t\t\tnewIndexIsFound = true;\n\t\t\t}\n\t\t}\n\t\tthis.addT...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns an ImageStack with three 8bit slices, representing hue, saturation and brightness
public ImageStack getHSBStack() { int width = getWidth(); int height = getHeight(); byte[] H = new byte[width * height]; byte[] S = new byte[width * height]; byte[] B = new byte[width * height]; getHSB(H, S, B); ColorModel cm = getDefaultColorModel(); ImageStack stack = new ImageStack(width, height, cm)...
[ "public RGBImage makeRGBImage()\r\n {\r\n\tint rows = getHeight();\r\n\tint cols = getWidth();\r\n \r\n\tshort[][] red = new short[rows][cols]; \r\n\tshort[][] green = new short[rows][cols]; \r\n\tshort[][] blue = new short[getHeight()][getWidth()]; \r\n \r\n\t@SuppressWarnings(\"unused\")\r\n\tdouble ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Verifies the input of a Birthday. Checks if it satisfies a simple REGEX of //
public static boolean confirmBirthday(String birthday){ // TODO: Verify based on age as well. No one over 100, under TBT, or from the future // TODO: Verify this is an actual date (i.e. no 67th month, no June 34th) Pattern p = Pattern.compile("[\\d]{1,2}/[\\d]{1,2}/[\\d]{4}"); Matcher m ...
[ "public static boolean isValidBirthday(String test) {\n return test.matches(BIRTHDAY_VALIDATION_REGEX);\n }", "public void validateBirthDate(String birthDate) {\n\n int day = 0;\n int month = 0;\n int year = 0;\n if (birthDate.trim().isEmpty()) {\n throw new Illega...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
adds an item to the tree
public void add(T item) { // calls a recursive, private method // cannot get direct access to the root outside the class root = add(root, item); }
[ "Item addItem(Item item);", "public TreeNode add(T item){\n this.root = add(this.root, item);\n return this.root;\n }", "protected void addItem() {\n\n\t}", "public boolean insertItem(BPTreeNodeItem item);", "public boolean add(E item)\r\n\t{\r\n\t\tif (root == null)\r\n\t\t{\t\r\n\t\t\troo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Then void promise like.
public native VoidPromiseLike then(FullfilledValueVoidCallback<T> onfulfilled, RejectedValueVoidCallback onrejected);
[ "public T caseVoid(org.eclipselabs.swedit.turtle.turtle.Void object)\r\n {\r\n return null;\r\n }", "public void DoVoid() {\n System.out.println(\"This is a void method.There is no return type\");\n }", "boolean isVoid();", "public VoidType asVoid() { return null; }", "@NotNull\n\t@Co...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The inner exception to forward.
void innerError(Throwable ex) { error(ex); }
[ "protected void unWrapAndThrowWfsException(ScriptException e) throws ScriptException {\n Throwable t = e.getCause();\n while(t != null) {\n if (t instanceof WFSException) {\n throw (WFSException) t;\n }\n t = t.getCause();\n }\n throw e;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the number of ticks to skip between ticks with labels. For example, setting this to two means there will be a label on every third tick, or setting it to zero puts a label on every tick.
public void setTickSkip(int skip) { tickSkip = skip; }
[ "public void setTicksAll() {\n\t\t// set major tick spacing\n\t\tslider.setMajorTickSpacing(1);\n\t\t\n\t\t// set labels\n\t\tHashtable<Integer, JLabel> tickLabels = new Hashtable<>();\n\t\tfor (int i = min; i <= max; i ++) tickLabels.put(i, new JLabel(\"\"+i));\n\t\tslider.setLabelTable(tickLabels);\n\t}", "void...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test a regex without operands of a word that exists in the babylon text
@Test void runRegExNoOperands_LegalCase() throws Exception { maxScore += 10; RegEx.regEx = "Sargon"; try { RegExTree ret = RegEx.parse(); Automaton a = RegEx.RegExTreeToAutomaton(ret); a.toTable(); a.eliminateEpsilonTransitions(); a.minimize(); ArrayList<MatchResponse> response = a.search("book...
[ "public boolean isWord2ignore(String word);", "public void testNegativeLookahead(){\n String inputText = \"this will match a so long as it does not follow as 'ab'. Anything after\" +\n \"is still fair game to be matched with the same criteria.\";\n String negativeLookahead = \"a(?!b)\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Signer1 with 1 attachment requirement
@Override public void execute() { signer1 = SignerBuilder.newSignerWithEmail(email1) .withFirstName("John") .withLastName("Smith") .withCustomId(SIGNER1_ID) .withAttachmentRequirement(newAttachmentRequirementWithName(NAME1) ...
[ "java.lang.String getSigner();", "protected void validateSigner(Signer[] param){\r\n \r\n }", "String getSignatureFile();", "public void testX509SignatureThumb() throws Exception {\n WSSecSignature builder = new WSSecSignature();\n builder...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of getObservaciones method, of class Usuario.
@Test public void testGetObservaciones() { System.out.println("getObservaciones"); Usuario instance = new Usuario(); String expResult = ""; String result = instance.getObservaciones(); assertEquals(expResult, result); // TODO review the generated test code and remove ...
[ "@Test\n public void testSetObservaciones() {\n System.out.println(\"setObservaciones\");\n String observaciones = \"\";\n Usuario instance = new Usuario();\n instance.setObservaciones(observaciones);\n // TODO review the generated test code and remove the default call to fail....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Setter for property cvParameters.
public void setCvParameters(edu.mit.coeus.utils.CoeusVector cvParameters) { this.cvParameters = cvParameters; }
[ "public edu.mit.coeus.utils.CoeusVector getCvParameters() {\r\n return cvParameters;\r\n }", "public int setCamParams(){\n\t\tCamera.Parameters camParams = mCamera.getParameters();\n\t\tcamParams.setFlashMode(\"off\");\n\t\tcamParams.setColorEffect(\"none\");\n\t\tcamParams.setWhiteBalance(\"cloudy-dayl...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Throw a CfgFileException. Its detail message includes the current line number and s.
private void errorAt(String s) throws CfgFileException { throw new CfgFileException("line " + _lineno + ": " + s); }
[ "public ConfigFileNotFoundException(String msg) {\n\tsuper(msg);\n }", "public ConfigException(String message) {\r\n super(message);\r\n }", "public ConfigurationException(String message) {\r\n super(message);\r\n }", "public CSVFileInvalidException(String message){\r\n super(mes...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method getRENTED_CARS() returns a collection of the cars that have been rented.
public Collection<Car> getRentedCars() { return RENTED_CARS.values(); }
[ "public Collection<InterfaceAbstractCar> getRentedCars() {\r\n\t\treturn rentDetails.values();\r\n\t}", "public List<Car> getCars() {\r\n\t\treturn ebeanServer.find(Car.class)\r\n\t\t\t\t.orderBy().desc(\"lapsCompleted\")\r\n\t\t\t\t.orderBy().desc(\"nrSegmentsTravelled\")\r\n\t\t\t\t.orderBy().desc(\"finishedTim...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }