query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
optional string ipv6_public = 5 [(.description) = "client public ipv6 address if it knows it"]; | public java.lang.String getIpv6Public() {
java.lang.Object ref = ipv6Public_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
... | [
"java.lang.String getIpv6Public();",
"public Builder setIpv6Public(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000010;\n ipv6Public_ = value;\n onChanged();\n return this;\n }",
"boolean hasIpv6Pub... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Use WebSocketFrameResponse.newBuilder() to construct. | private WebSocketFrameResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
} | [
"private Frame buildFrame() {\n return new Frame(command, headers, body);\n }",
"com.google.protobuf.ByteString getResponseMessage();",
"static HttpResponse buildWebSocketResponse(HttpRequest request) {\n String reasonPhrase = \"\";\n boolean isThirdTypeHandshake = Boolean.FALSE;\n int ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
snapshot will not include parentItem | @NotNull
@Generated
@Selector("snapshotOfParentItem:")
public native NSDiffableDataSourceSectionSnapshot<_ItemIdentifierType> snapshotOfParentItem(
@NotNull @Mapped(ObjCObjectMapper.class) _ItemIdentifierType parentItem); | [
"public UUID getSnapshotParent();",
"public TrackingItem getParent();",
"Json parent();",
"@Override\n public Object getParent(Object itemId) {\n return ((Container.Hierarchical) items).getParent(itemId);\n }",
"ILitePackItem getParent();",
"private void listSnapshot() {\n\t\t// TODO: impleme... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the value of field 'validator'. | public java.lang.String getValidator(
) {
return this._validator;
} | [
"public String getValidatorProperty() {\n return _validatorProperty;\n }",
"Validator getValidator();",
"public HtmlValidatorText getValidatorText() {\r\n\t\treturn _val;\r\n\t}",
"public ParamValidator<V> getValidator() {\n\t\treturn validator;\n\t}",
"public String getValidatorMessage() {\n \n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the X minima of a 2D or 3D bounding box or a geometry. | public static @Nullable Double ST_XMin(Geometry geom) {
return geom.getEnvelopeInternal().getMinX();
} | [
"public double getMinX() {\n\tcomputeBoundingBoxIfNeeded();\n\treturn minx;\n }",
"Coordinate getMinX();",
"@Generated\n @CFunction\n @NFloat\n public static native double CGRectGetMinX(@ByValue CGRect rect);",
"public double[] getXRange() {\n double [] a = boxT.getXRange();\n double [] ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Converts a jsoup document into the provided W3C Document. If required, you can set options on the output document before converting. | public void convert(org.jsoup.nodes.Document in, Document out) {
if (!StringUtil.isBlank(in.location()))
out.setDocumentURI(in.location());
org.jsoup.nodes.Element rootEl = in.child(0); // skip the #root node
W3CBuilder w3cbuilder = new W3CBuilder(out);
NodeTraversor travers... | [
"public static Document convert(final net.simpleframework.lib.org.jsoup.nodes.Document in) {\n\t\treturn (new W3CDom().fromJsoup(in));\n\t}",
"public void convert(final net.simpleframework.lib.org.jsoup.nodes.Document in,\n\t\t\tfinal Document out) {\n\t\tif (!StringUtil.isBlank(in.location())) {\n\t\t\tout.setDo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Initializes the calendar to the current day. | private void initCalendar() {
calendar = Calendar.getInstance();
calendar.set(Calendar.HOUR_OF_DAY, 0);
calendar.set(Calendar.MINUTE, 0);
calendar.set(Calendar.SECOND, 0);
calendar.set(Calendar.MILLISECOND, 0);
currentDate = calendar.getTime();
selectedDate = currentDate;
} | [
"public void setTodayCalendar()\n {\n this.currentCalendar = Calendar.getInstance();\n }",
"private static void init()\r\n {\r\n if( calendar == null )\r\n calendar = Calendar.getInstance();\r\n }",
"public Calendar() {\r\n\t\tCalendar date = new Calendar(\"1/1/1900\", null)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Pops the fragment matching the given tag off the backstack. | public void pop(String tag) {
Fragment fragment = mFragmentManager.findFragmentByTag(tag);
if (fragment != null) {
performRemoveTransaction(fragment);
}
} | [
"public void clearBackStackInclusive(String tag) {\n fragmentManager.popBackStack(tag, POP_BACK_STACK_INCLUSIVE);\n }",
"public void clearBackStackExclusive(String tag) {\n fragmentManager.popBackStack(tag, 0);\n }",
"public String pop() {\n String fragmentTag = null;\n if (!mF... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the block at the end of the maze | public Block getEnd () {
return end;
} | [
"public Tile getEnd(){\r\n\t\treturn tiles[tiles.length-1];\r\n\t}",
"public Block getLastBlock() {// dont call last block when 0 is null\n int i;\n // System.out.println(\"block length in last block \" + this.block.length);\n\n int nullLocation = -1;\n for ( i = 0; i < block.length ; i... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the basename of the class of this object. The basename is the class name without the package name. | public String getClassBaseName () {
return getLegacyDbObjectClassVariables().classBaseName;
} | [
"public String asClassFileName() {\r\n String fileName = getQualifiedClassName().replace('.', '/');\r\n return fileName + \".class\";\r\n }",
"public String getClassname() {\n return class_;\n }",
"public String getBinaryClassName() {\n\t\tString bcn = classQName.dotSeparated();\n\t\t// Inner classes... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column t_task_message.now_progress_num | public void setNowProgressNum(Integer nowProgressNum) {
this.nowProgressNum = nowProgressNum;
} | [
"public Integer getNowProgressNum() {\n return nowProgressNum;\n }",
"@Override\n public void setProcessProgress(String processName, int progressValue) {\n String sqlStatement = \"select system.process_progress_set(#{process_name}, #{progress_value}) as vl\";\n Map params = new HashMap(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
clear text fields, errors in login panel and close dialog | public void tryLoginAgain(){
nameField.setText("");
rollField.setText("");
seatField.setText("");
nameField.repaint();
seatField.repaint();
rollField.repaint();
clearErrors();
mainDialog.dispose();
} | [
"public void emptyTextFields() {\n\t\tusername.setText(\"\");\n\t\tpassword.setText(\"\");\n\t}",
"private void resetFields() {\n userText.setText(\"\");\n passwordText.setText(\"\");\n userText.clearFocus();\n passwordText.clearFocus();\n }",
"private void logOut() {\n Dia... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Clear the polymorphismName data member; override in proxy if lazily loaded, otherwise this method does nothing. | public void clearPolymorphismName() {
// Override in proxy if lazily loaded; otherwise does nothing
} | [
"public void clearPolymorphismType() {\n // Override in proxy if lazily loaded; otherwise does nothing\n }",
"public void clearPolymorphismSite() {\n // Override in proxy if lazily loaded; otherwise does nothing\n }",
"public void clearPolymorphismTairObjectId() {\n // Override in proxy if lazily loa... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Called when the apply button is clicked on the parameter window. Commits any parameter changes. | public void applyClicked() {
updateParameters();
super.applyClicked();
} | [
"public void clickOnApplyButton() {\r\n\t\tapplyButton.click();\r\n\t}",
"protected void performApply() {\n\n for (int i = 0; i < providers.getItemCount(); i++) {\n\n //TODO: The checkboxes are buggy. Sometimes the provider in the table - representation\n // seems not to be the correc... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Refreshes the reminder date for all reminders. | public void refreshAllDateDescriptions(){
for(int position=0;position<reminderItems.size();position++){
refreshDateDescription(position);
}
} | [
"public void refreshAllRepeatReminderDates(){\n for(int position=0;position<reminderItems.size();position++){\n refreshRepeatReminder(position);\n }\n }",
"public void appendToReminders(List<Date> reminders);",
"@Scheduled(cron = \"0 0 18 * * SUN\")\n\tvoid refreshNotifications(){\n\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Special Pythagorean triplet Problem 9 A Pythagorean triplet is a set of three natural numbers, a < b < c, for which, a2 + b2 = c2 For example, 32 + 42 = 9 + 16 = 25 = 52. There exists exactly one Pythagorean triplet for which a + b + c = 1000. Find the product abc. | public static void main(String[] args) {
for (int c = 1; c < 999; c++) {
for (int b = 1; b < c; b++) {
for (int a = 0; a < b; a++) {
if((a+b+c) == 1000 && Math.pow(c,2) == (Math.pow(a,2)+ Math.pow(b,2))){
System.out.println("a : "+ a);
Syst... | [
"public int specialPythagoreanTripletProblem9(int limit) {\n\n Long a = 0L, b = 0L, c = 0L;\n Long m = 2L;\n while (c < limit) {\n for (Long n = 1L; n < limit; n++) {\n a = m * m - n * n;\n b = 2 * m * n;\n c = m * m + n * n;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Draws an N x N board. Adapted from: | private void drawBoard(int N) {
StdDrawPlus.setXscale(0, N);
StdDrawPlus.setYscale(0, N);
for (int i = 0; i < N; i++) {
for (int j = 0; j < N; j++) {
if ((i + j) % 2 == 0) StdDrawPlus.setPenColor(StdDrawPlus.GRAY);
else StdDrawPlus.set... | [
"private void drawBoard() {\n\n drawGrid();\n drawPositions();\n }",
"public void drawBoard() {\n\n GraphicsContext g = getGraphicsContext2D();\n g.setFill( Color.LIGHTGRAY ); // fill canvas with light gray\n g.fillRect(0,0,314,314);\n\n /* Draw lines ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the SQL statment for locking SystemSBR. It uses 2 sets of EUID and RevisionNumbers | private String getDoubleLockSBRStmt() {
if (null == mDoubleLockStmt) {
initClauses();
mDoubleLockStmt = "SELECT s.EUID FROM SBYN_SYSTEMSBR s " + mWithClause + " WHERE ( s.EUID = ? AND s.REVISIONNUMBER = ?) OR ( s.EUID = ? AND s.REVISIONNUMBER = ?)" + mForUpdateClause;
}
... | [
"private String getSingleLockSBRStmt() {\n\n if (null == mSingleLockStmt) {\n initClauses();\n mSingleLockStmt = \"SELECT s.EUID FROM SBYN_SYSTEMSBR s \" + mWithClause + \" WHERE s.EUID = ? AND s.REVISIONNUMBER = ? \" + mForUpdateClause;\n }\n\n return mSingleLockStmt;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Check that a framebuffer is complete. See the OpenGL specification 3.3 Core section 4.4.4. | public static void checkFramebufferStatus(final GL3 gl, final String msg) {
int fboStatus = gl.glCheckFramebufferStatus(GL.GL_DRAW_FRAMEBUFFER);
if (fboStatus == GL.GL_FRAMEBUFFER_COMPLETE) {
return;
}
String errtext = "";
if (fboStatus == GL.GL_FRAMEBUFFER_INCOMPLET... | [
"public void checkStatus()\n {\n if(glCheckFramebufferStatus(GL_FRAMEBUFFER) == GL_FRAMEBUFFER_COMPLETE){\n return;\n }\n else if (glCheckFramebufferStatus(GL_FRAMEBUFFER) == GL_FRAMEBUFFER_UNDEFINED){\n System.err.println(\"Framebuffer creation failed with GL_FRAMEBUFF... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
CM707886 Set value to Supplier code | public void setSupplierCode(String arg)
{
setValue(SUPPLIERCODE, arg);
} | [
"public String getSupplierCode() {\n return supplierCode;\n }",
"void setSupplier(Supplier<Number> supplier);",
"public void setSupplierCode(String supplierCode) {\n this.supplierCode = supplierCode;\n }",
"public String getSupplierCode()\n\t{\n\t\treturn getValue(WorkingInformation.SUPPLI... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This methods will return a integer that represents a primary key in the product category table for the product category specified otherwise we return 1 if we cant find it | public static int resolveProductCategory(String category)
{
PreparedStatement stmt = null;
ResultSet myRst;
try
{
String pstmt = "SELECT ID FROM Product_Categories WHERE Product_Category = ?";
stmt = DBConnectionManager.con.prepareStatement(pstmt);
... | [
"private long getCatalogId(Connection conn, long categoryId) throws RowNotFoundException {\r\n return selectLong(conn,\r\n \"category_catalog\",\r\n \"catalog_id\",\r\n new String[]{\"category_id\"},\r\n new S... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The type of the routine. .google.cloud.datacatalog.v1.RoutineSpec.RoutineType routine_type = 1; | int getRoutineTypeValue(); | [
"com.google.cloud.datacatalog.v1.RoutineSpec.RoutineType getRoutineType();",
"com.google.cloud.datacatalog.v1.BigQueryRoutineSpec getBigqueryRoutineSpec();",
"com.cscotta.deschutes.example.requests.Requests.Request.OperationType getOperationType();",
"com.mesosphere.dcos.cassandra.common.CassandraProtos.Cassa... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Output only. The effective target CPA (costperacquisition). This field is readonly. optional int64 effective_target_cpa_micros = 47 [(.google.api.field_behavior) = OUTPUT_ONLY]; | boolean hasEffectiveTargetCpaMicros(); | [
"long getEffectiveTargetCpaMicros();",
"int getEffectiveTargetCpaSourceValue();",
"long getTargetCpaMicros();",
"public double getAdjustedAFStatCP() {\n return baseCP + adjustedAFCPOffset;\n }",
"com.google.ads.googleads.v14.enums.BiddingSourceEnum.BiddingSource getEffectiveTargetCpaSource();",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
get top n ranked pictures | public void getHighRankers(int n) throws RollbackException {
System.out.format("The top %d pictures are:\n", n);
for(Picture p : pictureDAO.getHighRankers(n)) {
System.out.println(p.getPid());
}
return;
} | [
"public List<Integer> findTopGenesByRanking( Integer n ) throws DAOException;",
"int getTopN();",
"public List<Integer> findTopGenesByPaperCnt( Integer n ) throws DAOException;",
"public List<Song> getTopRatedSongs(int number) ;",
"public List<Song> getTopPlayedSongs(int number) ;",
"int getPopularity();"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the value of the cell at [row][col] if the cell is in bounds. Otherwise, returns OUT_OF_BOUNDS. | public int getCell(int row, int col)
{
if (inBounds(row, col))
return grid[row][col];
else
return OUT_OF_BOUNDS;
} | [
"private static int getCellValue(int[][] aa, int row, int col) {\n // check all bounds to make sure it doesn't run off\n // the top, the left, the bottom or the right.\n if (row < 0 || col < 0 || row >= aa.length || col >= aa[row].length) {\n return 0;\n }\n\n // must b... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Truncates a name to the specified length while maintaining delimiters. | public static String truncate(String name, int length) {
return normalizer.truncateName(defaultRule, name, length);
} | [
"List<String> getAllNamesTrunc(int maxLength);",
"public static String truncate(String input, int length) {\r\n return truncate(input, length, \"\");\r\n }",
"private String setNameLength(String pName)\n\t{\n\t\tfinal int lTen = 10;\n\n\t\tString lName = pName;\n\n\t\twhile (lName.length() < lTen)\n\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Deadlines optional uint64 relative_deadline = 21; | public long getRelativeDeadline() {
return relativeDeadline_;
} | [
"long getRelativeDeadline();",
"long getAbsoluteDeadline();",
"long getDeadline();",
"Deadline createDeadline();",
"private void deadlineAnzeigen() {\r\n\t\ttasklist.deadlinesAusgeben();\r\n\t}",
"public long getRelativeDeadline() {\n return relativeDeadline_;\n }",
"public void setDeadline(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return the student having the passed deviceId or null if no deviceId is found. | public Student findByDeviceId(String deviceId); | [
"public Device getByDeviceId(String deviceId) {\n\n try {\n return deviceRepository.findByDeviceId(deviceId);\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return null;\n }",
"DeviceDetails getDeviceDetails(String deviceId);",
"public Student findStudent( String studentId )\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the flag that determines whether the sort order is ascending or descending. | public void setAscending(final boolean flag) {
this.ascending = flag;
} | [
"public void ascending(boolean directionflag){\n ascending = directionflag;\n }",
"public void descending(){\n ascending = false;\n }",
"public void ascending(){\n ascending = true;\n }",
"public void changeOrder() {\n ascending = !ascending;\n }",
"public static void sortAsce... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The following function tests if the winner of the schedule is the Condorcet winner | public boolean testCondorcetWinner(int[] schedule){
int winner = schedule[0];
for(int i = 1; i < numJobs; i++) {
int job_right = schedule[i];
if (votes[job_right][winner] > numAgents/2) {
//System.out.println(winner + " > " + job_right + " but the score of job " +... | [
"private boolean winner() {\n\t\t\n\t\tif(( gameBoard[TOP_LEFT] + gameBoard[TOP_CENTER] + gameBoard[TOP_RIGHT]) == P1_WINNER){\n\t\t\t//player 1 winner\n\t\t\twinner = P1_WINNER;\n\t\t}else if((gameBoard[CTR_LEFT] + gameBoard[CTR_CENTER] + gameBoard[CTR_RIGHT]) == P1_WINNER){\n\t\t\t//player 1 winner\n\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the message text to the status panel in the bottom of the chat window. Used to show typing notification messages, links' hrefs, etc. | public void setStatusMessage(String statusMessage){
this.sendPanel.setStatusMessage(statusMessage);
} | [
"public void updateText(String message) {\n completeMessage = completeMessage + addColor(message) + \"<br/>\";\n messageDisplay = completeMessage + \"</html>\";\n consoleMessageLabel.setText(messageDisplay);\n\n int ht = consoleMessageLabel.getSize().height;\n consoleScrollPane.getViewport().setViewP... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the associated OWLProject, which can be used to store projectspecific settings. | OWLProject getOWLProject(); | [
"public Project getProject() throws TelemetryConfigurationException {\r\n if (!this.isProject()) {\r\n throw new TelemetryConfigurationException(\"The share scope is not project.\");\r\n }\r\n return this.project;\r\n }",
"public Project getProject() {\n\t\treturn bnd.getProject();\n\t}",
"public... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get all the groupMembers with eager load of manytomany relationships. | Page<GroupMembers> findAllWithEagerRelationships(Pageable pageable); | [
"List<GroupMembers> findAll();",
"Collection<Entity> getMembers();",
"public Group[] fetchAllGroups();",
"private static List<Member> getMembers(KeycloakSession keycloakSession, GroupModel groupModel)\n {\n List<Member> members = new ArrayList<>();\n\n keycloakSession.users()\n .getGr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns whether the limit switch on the left arm is being pressed | public boolean isTouchingLeftArm() {
return leftArmLimit.get();
} | [
"public boolean getLimitSwitchLeft(){\n\t\treturn !leftLimit.get();\n\t}",
"public boolean checkArmOpen() {\n if (!limitSwitchRight.get()) {\n return true;\n }\n return false;\n }",
"public boolean isLeftPressed()\r\n {\r\n for(int key : Keys.keys.left)\r\n {\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
removes control characters from given text | public static String removeControlCharaters(String text) {
int l = text.length();
StringBuilder modified = new StringBuilder();
for(int i = 0; i < l; i++) {
char ch = text.charAt(i);
if(!CharUtils.isAsciiControl(ch)) {
// valid character
modified.append(ch);
}
}
return modified.toString();... | [
"private static String cleanTextContent(String text) {\n text = text.replaceAll(\"[^\\\\x00-\\\\x7F]\", \"\");\n\n // erases all the ASCII control characters\n text = text.replaceAll(\"[\\\\p{Cntrl}&&[^\\r\\n\\t]]\", \"\");\n\n // removes non-printable characters from Unicode\n te... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the view's example drawable attribute value. In the example view, this drawable is drawn above the text. | public void setExampleDrawable(Drawable exampleDrawable) {
mExampleDrawable = exampleDrawable;
} | [
"public void setExampleDrawable(Drawable exampleDrawable) {\n rightIcon1Drawable = exampleDrawable;\n }",
"public Drawable getExampleDrawable() {\n return mExampleDrawable;\n }",
"public Drawable getExampleDrawable() {\n\t\treturn mExampleDrawable;\n\t}",
"public void setExampleColor(int e... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Find the container and then create the page in that container. This is the process of creating a new page in a container, in that case no need to read the page from disk just need to initialize it in the cache. | public Cacheable createIdentity(
Object key,
Object createParameter)
throws StandardException
{
if (SanityManager.DEBUG)
{
SanityManager.ASSERT(key instanceof PageKey);
}
initialize();
PageKey newIdentity = (PageKey) key;
PageCreationArgs createArgs = (PageCreationArgs... | [
"Page createPage();",
"public void createPage() {\n AddPageCommand c = new AddPageCommand(this);\n PagePane p = new PagePane();\n PageModel m = (PageModel) p.getModel();\n String pageKey = EnumFactory.getInstance().createKey(EnumFactory.PAGE);\n m.setKey(pageKey);\n m.setEnum(EnumFactory.getInst... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Deletes a matching Product to selectedProduct from the Inventory | public boolean deleteProduct(Product selectedProduct) {
for(Product product: allProducts) {
if (product.getId() == selectedProduct.getId() &&
product.getName().equals(selectedProduct.getName()) &&
product.getPrice() == selectedProduct.getPrice() &&
... | [
"public void deleteProduct()\n {\n ObservableList<Product> productRowSelected;\n productRowSelected = productTableView.getSelectionModel().getSelectedItems();\n int index = productTableView.getSelectionModel().getFocusedIndex();\n Product product = productTableView.getItems().get(inde... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the "arrivedonflightnum" element | void setArrivedonflightnum(java.lang.String arrivedonflightnum); | [
"void xsetArrivedonflightnum(\n org.apache.xmlbeans.XmlString arrivedonflightnum);",
"void setNilArrivedonflightnum();",
"public void setNumber(int flightNumber)\n {\n this.flightNumber = flightNumber;\n }",
"public void setFlightNumber(int flightNumber) {\r\n this.flightNumber = flightNumb... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ SELECT d FROM Department d WHERE d.name = :p | public Department findByName(String name)
{
CriteriaBuilder cb = getQueryBuilder();
CriteriaQuery<Department> q = cb .createQuery(Department.class);
// from Deparment
Root<Department> c = q.from(Department.class);
// select klauzule
q.select(c);
// where e.name=:p
q.where(cb.equal(c.get("name"), name... | [
"public ResultSet getDepartmentByName(String dept_name);",
"public Departmentdetails getDepartmentByName(String departmentName);",
"Department findByShortName(String name);",
"Department selectByPrimaryKey(Integer deptId);",
"public List<Depart> findByDname(String dname);",
"SysDepartment selectByPrimaryK... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Input dept id num. | protected void inputDeptIdNum() {
boolean isValidDepartment = false;
int deptIdNum;
do {
deptIdNum = inputController.getInteger("Department ID (1-3): ", 1, 3);
for (Department department : departments) {
if (department.getIdNum() == deptIdNum) {
if (employee instanceof Manager) {
... | [
"public String getDeptId() {\n System.out.println(\"Please enter the department ID: \");\n String id = in.nextLine();\n return id;\n }",
"public void setDeptid(Integer deptid) {\r\n this.deptid = deptid;\r\n }",
"public void setDeptid(Integer deptid) {\n this.deptid = deptid;\n }",... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the total hits returned for the current type of browsing. | public void setTotalHits(long totalHits)
{
this.totalHits = totalHits;
} | [
"protected void incrHits() {\n hits++;\n }",
"public void increaseNumHits() {\n\t\tthis.numHits += 1;\n\t}",
"public void setHits(int hitPoints) {\n this.hits = hitPoints;\n }",
"public void addHits() {\n\t\tthis.m_hits ++;\n\t}",
"public void setTotalResults(Object totalResults) {\n th... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Metodo que sirve para seleccionar DVDs de la base de datos | public static void selectDVDs() throws SQLException {
Statement stmt = connection.createStatement();
String query = "select * from DVDS";
ResultSet rs = stmt.executeQuery(query);
while (rs.next()) {
ClsDVD dvd = new ClsDVD(rs.getString(1), rs.getInt(2),
rs.getString(3), rs.getInt(4), rs.getInt(5),
... | [
"private void retrieveDvd() {\n String howTo = console.getMultiChoiceString(\"How would you like to find the DVD?\", new String[]{\n \"By Title\", \"By Id\", \"By Rating\", \"By Studio\"\n });\n //if they chose \"By Title\"\n if (howTo.equals(\"By Title\")) {\n //as... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets player 1's high card of the player's hand and also repaints the GUI. | public void setP1WonWithHighCardOf(Card p1WonWithHighCardOf) {
this.p1WonWithHighCardOf = p1WonWithHighCardOf;
repaint();
} | [
"private void setHighCard(int highCard) {\r\n this.highCard = highCard;\r\n }",
"public void updatePlayerHand() {\n view.updateView(this.playerHandStringRep());\n }",
"public void setP2WonWithHighCardOf(Card p2WonWithHighCardOf) {\n\t\tthis.p2WonWithHighCardOf = p2WonWithHighCardOf;\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns whether this listener is running (ie. whether a thread is attached to it). | public boolean isRunning() {
return this.runningThread != null && !serverSocket.isClosed();
} | [
"public boolean isRunning() {\n\t\treturn (fSystemEventHandler != null);\n\t}",
"public boolean isRunning() {\r\n \t\treturn connectionThread.isAlive();\r\n \t}",
"public boolean isRunning() {\n return (transitionCallback != null);\n }",
"public boolean isRunning() {\n return (service != null... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
check if word exist in table, return it id. If doesnt, create and return Id | public int getWordId(String wordToGet) throws SQLException
{
int wordId = 0;
String selectQuery = "SELECT word_id "
+ "FROM words "
+ "WHERE word = ?";
PreparedStatement stmt = conn.prepareStatement(selectQuery);
stmt.setString(1, wordToGet);... | [
"public static int GetKIDFromWord(String word)\n\t{\n\t\tint kid = -1; \n\t\ttry\n\t\t{\n\t\t\tConnector con = new Connector();\n\t\t\tString query = \"SELECT k_id FROM Keywords WHERE word = '\"+word+\"'\"; \n\t\t\tResultSet inTable = con.stmt.executeQuery(query); \n\t\t\t\n\t\t\t//keyword is already in table, get ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Converts the number and suit of a card into a name. | public String getCardName()
{
String returnString = "";
if(num == 14)
{
returnString+=("Ace");
}
else if(num == 11)
{
returnString+=("Jack");
}
else if(num == 12)
{
returnString+=("Queen");
}
... | [
"private static String cardToString(String card) {\n\t\t// Map the shorthand suits to their full names\n\t\tMap<String, String> suits = new HashMap<String, String>();\n\t\tsuits.put(\"c\", \"Clubs\");\n\t\tsuits.put(\"d\", \"Diamonds\");\n\t\tsuits.put(\"h\", \"Hearts\");\n\t\tsuits.put(\"s\", \"Spades\");\n\t\t\n\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Insures that the coordinates are valid Checks if the coordinates are within range of the board. They must be nonnegative and less than or equal to 19. | public boolean invalidCoordinates(int x, int y){
return (x < 0 || x > boardSize) || (y < 0 || y > boardSize);
} | [
"private boolean validCoordinates(int x, int y)\n {\n return (x > 0 && x < SIZE - 1 && y > 0 && y < SIZE - 1);\n }",
"private void checkCoordInRange(double x, double y) {\n\t\tif (x < min_x || x > max_x || y < min_y || y > max_y) {\n\t\t\tthrow new IllegalArgumentException(\"x/y value out of simulati... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Clears the value of the 'make' field. | public com.example.domain.AvroCar.Builder clearMake() {
make = null;
fieldSetFlags()[2] = false;
return this;
} | [
"public void setMake(java.lang.String value) {\n this.make = value;\n }",
"public void setMakeId(String makeId) {\n\t\tthis.makeId = makeId;\n\t}",
"public void setMakeName(String makeName) {\n\t\tthis.makeName = makeName;\n\t}",
"public void setCarmake(String carmake)\n {\n if(checker.isString(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Binds the specified value to the specified target. | @UiThread
private void bindValue(Binder binder, Key key, Params[] params, Object target, Value value, int state) {
// Cancel the task associated with the target.
cancelTask(target, false);
binder.bindValue(key, params, target, value, state);
onRecycle(params);
} | [
"void bind(Symbol symbol, SExpression value);",
"public void setTargetBindField(String targetBindField) ;",
"public void bind(String var, E value) {\n put(var, value);\n }",
"T bindTo(Object instance);",
"@Override\n public void setValueInDb(String target, String value) {\n DatabaseRefe... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test accepting external classes without enabling external classes. | @Test
public void testAcceptingExternalClassesWithoutEnablingExternalClasses() {
try (ScanResult scanResult = new ClassGraph()
.acceptPackages(InternalExternalTest.class.getPackage().getName(),
ExternalAnnotation.class.getName())
.enableAllInfo().scan(... | [
"@Test\n public void testAcceptingExternalClasses() {\n try (ScanResult scanResult = new ClassGraph().acceptPackages(\n InternalExternalTest.class.getPackage().getName(), ExternalAnnotation.class.getName()).scan()) {\n assertThat(scanResult.getAllStandardClasses().getNames()).con... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get a list of agencies for this metro. | public List<NtdAgency> getAgencies () {
return NtdAgency.find("byMetroArea", this).fetch();
} | [
"public Cursor getAllAgencies() {\n\t\t\treturn db.query(AGENCIES_TABLE, new String[] {\n\t\t\t\t\t// importing only needed columns instead of all\n\t\t\t\t\tKEY_ROWID,\n\t\t\t\t\tKEY_AGENCYNAME},\n\t\t\t\t\tnull,\n\t\t\t\t\tnull,\n\t\t\t\t\tnull,\n\t\t\t\t\tnull,\n\t\t\t\t\tnull);\t\t\t\t\n\t\t}",
"@Override\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return basic scope names iterator | public Iterator<String> getBasicScopeNames(String type); | [
"public Iterator<String> getScopeNames();",
"public Iterator names()\n {\n return Tools.iterator(names, from, to);\n }",
"String getScopeName();",
"private String[] getScopes() {\n return scopeTextView.getText().toString().toLowerCase().split(\" \");\n }",
"String[] getScopes();",
"priv... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set ICMS Regime. Identifies a ICMS Regime for taxes | public void setLBR_ICMSRegime (String LBR_ICMSRegime); | [
"public void setRegtime(String regtime) {\n this.regtime = regtime;\n }",
"public void setRegtime(Date regtime) {\r\n\t\tthis.regtime = regtime;\r\n\t}",
"public void setRegistTime(Date registTime) {\n this.registTime = registTime;\n }",
"public void setTaRegtime(Date taRegtime) {\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Ends systrace tracing for the most recently begun section. Noop on unsupported platform versions. | public static void traceEndSection() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
android.os.Trace.endSection();
}
} | [
"public static void endSection() {\n if (PlayerLibraryInfo.TRACE_ENABLED) {\n endSectionV18();\n }\n }",
"public static void endSection() {\n checkWhetherSupport();\n if (sTraceBeginMethod != null && sTraceEndMethod != null) {\n try {\n sTraceEnd... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Setter for inputVoltage field | public void setInputVoltage(String inputVoltage) {
this.inputVoltage = inputVoltage;
} | [
"public String getInputVoltage() {\n return inputVoltage;\n }",
"public void setInputVoltage(IfcElectricVoltageMeasure InputVoltage)\n\t{\n\t\tthis.InputVoltage = InputVoltage;\n\t\tfireChangeEvent();\n\t}",
"public void setVoltage(double dblVoltage);",
"public void setVoltage (double v) {\r\n if... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
consulta profesores por curso y ciclo | private ArrayList<String> profesoresCursoCiclo() {
SQLiteDatabase db=mydato.getReadableDatabase();
profesores pro = null;
listaProfesores = new ArrayList<profesores>();
Cursor cursor = db.rawQuery("SELECT * FROM "+MyDADatos.NOMBRE_TABLA1,null);
while (cursor.moveToNext()){
... | [
"public ArrayList<Cursada> buscaCursadasConProfesor(Profesor profesor) {\n ArrayList<Cursada> lista = new ArrayList<Cursada>();\n Iterator<Cursada> it = cursadas.iterator();\n Cursada cursada = null;\n while (it.hasNext()) {\n cursada = it.next();\n if (cursada.getP... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets a double from the given index. | double getDouble( int index ); | [
"public final double at(final int index) {\n return this.series[index];\n }",
"public abstract double getDouble(int attributeIndex);",
"public final double at(final int index) {\n if (index < 0 || index >= this.series.length) {\n throw new IndexOutOfBoundsException(\"No observation a... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a storage server, given a directory on the local filesystem, and ports to use for the client and command interfaces. The ports may have to be specified if the storage server is running behind a firewall, and specific ports are open. | public StorageServer(File root, int client_port, int command_port)
{
InetSocketAddress addrStorage, addrCommand;
if (root == null) {
throw new NullPointerException("Root is null");
}
this.root = root;
if(client_port > 0) {
addrStorage = new In... | [
"public StorageServer(File root, int client_port, int command_port)\n {\n if (root == null){\n \tthrow new NullPointerException();\n }\n this.root = root;\n InetSocketAddress storageAddr = new InetSocketAddress(client_port);\n \n //Create GracefulSkeleton which no... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Clears the value of the 'field628' field | public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField628() {
field628 = null;
fieldSetFlags()[628] = false;
return this;
} | [
"public void clearAnswer(){\r\n textField1.setText(\"\");\r\n }",
"private void clearTextFields() {\n for(int i = 0; i < 4; i++)\n field[i].setText(\"\");\n }",
"public void clearFields()\r\n {\r\n nameField.setText(\"\");\r\n buttonGroup1.clearSelection();\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
main method that declares a s and n and a list of n random numbers between 1 and n After that it calls on the method binSearchT and linSearchT and prints each methods time | public static void main(String[] args){
int s = 80;
int n = (int) Math.pow(10, 7);
Integer[] a = new Integer[n];
Random rand = new Random();
for (int i = 0; i < n; i++){
a[i] = (int) (n*rand.nextDouble());
}
double binTime = binSearchT(s, a);
d... | [
"public static double binSearchT(int s, Integer[] a){\n Random rand = new Random();\n int searchVar;\n Stopwatch timer = new Stopwatch();\n Arrays.sort(a);\n for (int i = 0; i < s; i++){\n searchVar = (int)(rand.nextDouble()*a.length);\n Arrays.binarySearch(a... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The method for checking the number for primecomposite. The result of the verification is displayed on the console. | public static void checkNumberPrime(int number) {
//Check if the number is a natural.
if (number <= 0) {
System.out.println("Number isn't natural number");
return;
}
//Check if the number is a prime.
String strResult = "prime";
for (int i = 2; i ... | [
"public static final boolean isTwoComposite(final BigInteger number) {\r\n\t\tif (isPrime(number)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif (!number.testBit(0)) {\r\n\t\t\treturn isPrime(number.divide(new BigInteger(\"2\"))); //$NON-NLS-1$\r\n\t\t}\r\n\t\tBigInteger j;\r\n\t\tBigInteger[] k;\r\n\t\tfor (int i = ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Check if no day is selected | public boolean noDaySelected() {
return selectedDays.size() == 0;
} | [
"boolean getDayNull();",
"@Test\r\n public void testUnselectableDates() {\r\n SortedSet<LocalDateTime> unselectableDates = new TreeSet<LocalDateTime>();\r\n unselectableDates.add(today);\r\n model.setUnselectableDates(unselectableDates);\r\n model.setSelectionInterval(today, today);... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Marks the leaf "fulldomainname" with operation "replace". | public void markFullDomainNameReplace() throws JNCException {
markLeafReplace("fullDomainName");
} | [
"public void markFullDomainNameMerge() throws JNCException {\n markLeafMerge(\"fullDomainName\");\n }",
"public void changeDomain(String newDomain);",
"public void markFullDomainNameDelete() throws JNCException {\n markLeafDelete(\"fullDomainName\");\n }",
"public void setFullDomainNameVal... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a collection of portlets for which there isn't any RSS files | public Collection selectRssPortlets( )
{
DAOUtil daoUtil = new DAOUtil( SQL_QUERY_SELECT_RSS_PORTLET );
daoUtil.executeQuery( );
ArrayList list = new ArrayList( );
while ( daoUtil.next( ) )
{
PortletImpl portlet = new PortletImpl( );
portlet.set... | [
"public Collection selectAllRssPortlets( )\n {\n String strPortletTypeId = DocumentListPortletHome.getInstance( ).getPortletTypeId( );\n DAOUtil daoUtil = new DAOUtil( SQL_QUERY_SELECT_ALL_RSS );\n\n daoUtil.setString( 1, strPortletTypeId );\n\n daoUtil.executeQuery( );\n\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a new dummy account for the sync adapter | public static Account createSyncAccount(Context context) {
// Get an instance of the Android account manager
AccountManager accountManager =
(AccountManager) context.getSystemService(
Context.ACCOUNT_SERVICE);
// Create the account type and default account... | [
"private Account CreateSyncAccount(Context context) {\n Account newAccount = new Account(ACCOUNT, ACCOUNT_TYPE);\n AccountManager accountManager = (AccountManager) context.getSystemService(ACCOUNT_SERVICE);\n isNewAccountCreated = accountManager.addAccountExplicitly(newAccount, null, null);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A method which is called by the city map, when the visitor changes his position. | public synchronized void visitorPositionChanged (CityMap sender) {
cityMap.getVisitorXY (tmpXY);
visitorX = tmpXY[CityMap.X];
visitorY = tmpXY[CityMap.Y];
repaint ();
} | [
"public void updateMapPosition(Position position);",
"public void onLocationChange() {\n\t\tupdateWeather();\n\t\tgetLoaderManager().restartLoader(FORECAST_LOADER_ID, null, this);\n\t}",
"void setMapChanged();",
"@Override\n public void onLocationChanged(MapWidget v, Location location) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Implement AuthSwitchRequest decode | private void decodeAuthSwitchRequest(int sequenceId, ByteBuf packet, List<Object> out) {
throw new UnsupportedOperationException("Implement decodeAuthSwitchRequest decode.");
} | [
"com.openmdmremote.harbor.HRPCProto.RemoteAuth.AuthRequest getAuthrequest();",
"com.openmdmremote.harbor.HRPCProto.AuthRequest getAuthrequest();",
"se.mejsla.camp.mazela.network.common.protos.MazelaProtocol.AuthenticateRequest getAuthenticationRequest();",
"public interface MiscEncoderDecoder {\n\n public ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sends an ABORT message to the server. By calling this method, the corresponding input and output streams will be closed along with this object. | public synchronized void abort() throws IOException {
ensureOpen();
// need check again .
// if(isDone) {
// throw new IOException("Operation has already ended");
// }
//no compatible with sun-ri
if ((isDone) && (replyHeaders.responseCode != OBEXConstants.OB... | [
"public void abort() {\n terminate();\n this.aborted = true;\n }",
"public void abort() {\n\t\t\r\n\t\tif(m_async){\r\n\t\t\t\t//For aborting the send algorithm, just leave the m_sendflag as false\t\t\t\r\n\t\t\t\tm_errorFlag = true;\r\n\t\t\t\t\r\n\t\t\t\t// check for presence of request headers\r\n\t\t\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test the property 'bundles' | @Test
public void bundlesTest() {
// TODO: test bundles
} | [
"@Test\n public void isBundleTest() {\n // TODO: test isBundle\n }",
"@Test\n\tpublic void listBundles() {\n\t\tfor (Bundle b : bundleContext.getBundles()) {\n\t\t\tSystem.out.println(\"Bundle \" + b.getBundleId() + \" : \"\n\t\t\t\t\t+ b.getSymbolicName());\n\t\t}\n\n\t}",
"public void testBundleC... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Runs before every test. Creates the required messagePopUp object | @Before
public void setup(){
titleForTest = "title for testing";
messageForTest = "message for testing";
messagePopUp = new MessagePopUp(titleForTest,messageForTest);
stage.addActor(messagePopUp);
} | [
"@Test\n \tpublic void testPopup() {\n \t\tpopupPage.open();\n \n \t\t// check title\n \t\tassertEquals(popupPage.getTitle(), \"Firespotting!\");\n \t}",
"@Test\n public void testCreateMessagePane() {\n System.out.println(\"createMessagePane\");\n String message = \"Test\";\n String title ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Methode : getIDLogger() Retourne int idlogger | public int getIDLogger(){
return super.getIDLogger();
} | [
"public String getLoggerId();",
"int getLogId();",
"public Integer getLogid() {\n return logid;\n }",
"public int getLogId() {\n return logId.get();\n }",
"public int getIdLog() {\r\n\t\treturn idLog;\r\n\t}",
"public Integer getLogId() {\n return logId;\n }",
"public Logge... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "ruleXAdditiveExpression" $ANTLR start "entryRuleOpAdd" InternalDsl.g:4915:1: entryRuleOpAdd returns [String current=null] : iv_ruleOpAdd= ruleOpAdd EOF ; | public final String entryRuleOpAdd() throws RecognitionException {
String current = null;
AntlrDatatypeRuleToken iv_ruleOpAdd = null;
try {
// InternalDsl.g:4916:2: (iv_ruleOpAdd= ruleOpAdd EOF )
// InternalDsl.g:4917:2: iv_ruleOpAdd= ruleOpAdd EOF
{
... | [
"public final String entryRuleOpAdd() throws RecognitionException {\n String current = null;\n\n AntlrDatatypeRuleToken iv_ruleOpAdd = null;\n\n\n try {\n // ../org.xtext.scripting/src-gen/org/xtext/scripting/parser/antlr/internal/InternalScripting.g:1162:2: (iv_ruleOpAdd= ruleOpAdd ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method used to fetch wallets and start receiving messages | private void fetchWallets(){
try {
mBitVaultManager = BitVaultWalletManager.getWalletInstance();
mBitVaultDataManager = BitVaultDataManager.getSecureMessangerInstance();
mEotWalletManager = EOTWalletManager.getEOTWalletInstance();
mWalletDetails = new ArrayList<>(... | [
"private static void runAsWallet(){\n nodeIPList = ConsensusNode2.getIPList();\n System.out.println(\"======================================================\");\n showWalletOptions();\n try {\n int choice = Integer.parseInt(reader.nextLine());\n\n while (choice != 1... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method that creates all the skins with default values, so that they can be loaded at once at the starting of the application. | public static void loadSkins() {
andySkin = new AndySkin();
boySkin = new BoySkin();
captainSkin = new CaptainSkin();
ironmanSkin = new IronManSkin();
noobSkin = new NoobSkin();
plankSkin = new PlankSkin();
guidoSkin = new GuidoSkin();
erikSkin = new ErikS... | [
"protected void initSkins()\n {\n synchronized (this)\n {\n _skins = new HashMap<SkinMetadata, Skin>();\n }\n }",
"private void createSkins() {\n\n for (int i = 0; i < this.headFiles.size(); i++) {\n\n Logger.debug(headFiles.get(i));\n Logger.debug(bodyFiles.get(i));\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Interactions that are initially added to the map. If not specified, ol.interaction.defaults() is used. | @JsProperty
void setInteractions(Collection<Interaction> interactions); | [
"public interface CustomizeInteractions {\n\t/**\n\t * \n\t * @return current object iteractions\n\t */\n\tpublic Map<> getInteractions();\n}",
"public AInteractionsManager(AWindow _window) {\n this.window=_window;\n \n interactions=new LinkedList<AInteraction>();\n// mcInteraction=nul... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets value as attribute value for LNAME using the alias name Lname. | public void setLname(String value) {
setAttributeInternal(LNAME, value);
} | [
"public void setAslName(String value) {\n setAttributeInternal(ASLNAME, value);\n }",
"public void setLname(java.lang.String lname) {\n this.lname = lname;\n }",
"public void setLname(String lname) {\n\tthis.lname = lname;\n}",
"public void setL_name(String l_name) {\n this.l_name = l_nam... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column tdx_company_patent_stat.company_shortname | public void setCompanyShortname(String companyShortname) {
this.companyShortname = companyShortname;
} | [
"public String getCompanyShortname() {\r\n return companyShortname;\r\n }",
"void setShortName(String shortName);",
"public void setShortname(String shortname) {\r\n this.shortname = shortname;\r\n }",
"public void setCompany(java.lang.String value) {\n this.company = value;\n }",
"p... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
tendria que ser declarada static class Adherant ================================================CONSTRUCTOR========================================================= Va inicia con un stock de 10 documentos | public Mediatheque() {
Document libro1 = new Document(new Id(1), new Titre("El senor de los anillos"), new Livre(new Auteur("Tolkin")));
Document libro2 = new Document(new Id(2), new Titre("Dracula"), new Livre(new Auteur("Copola")));
Document libro3 = new Document(new Id(3), new Titre("The Tower"), new Li... | [
"public accionDocumentos() {\n \n }",
"public DocumentoDAOFake()\r\n {\r\n }",
"public JwSentDocs () {\n\t\tsuper();\n\t}",
"public DleseCollectionDocReader() {\n\t}",
"public Doclet() {\n }",
"public Doc_estado() {\n }",
"public CMDocumentFactoryTLD() {\n \t\tsuper();\n \t}",
"p... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
getting drink order count | public int getDrinkOrderCount() {
String sqlCountQuery = "SELECT * FROM " + CoffeeShopDatabase.DrinkOrderTable.TABLE_NAME;
SQLiteDatabase db = this.getReadableDatabase();
Cursor cursor = db.rawQuery(sqlCountQuery, null);
cursor.close();
int count = cursor.getCount();
retu... | [
"int getNumOfSellOrders();",
"public Integer countOrderLines();",
"public int totalOrdersTaken();",
"public int totalAllocatedOrders();",
"int getBuyCount();",
"public int getOrderCount() {\n String countQuery = \"SELECT * FROM \" + ORDER_RECORDS_TABLE;\n SQLiteDatabase db = this.getReadabl... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This function prepares for downloading a log file on the local filesystem. | private void downloadLogFile(File file, HttpServletRequest request,
HttpServletResponse response) throws IOException {
long len = file.length();
InputStream is = new FileInputStream(file);
String fileName = file.getName();
response.setContentType("application/octet-stream"... | [
"public File newLogFile() {\n File flog = null;\n try {\n this.logFileName = getTimestamp() + \".xml\";\n this.pathToLogFile = logFileFolder + logFileName;\n URL logURL = new URL(this.pathToLogFile);\n flog = new File... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Verify that the constructor max scan age is obeyed when getting scan results. | @Test
public void testConstructor_maxScanAge_filtersOldScans() {
ScanResultUpdater sru = new ScanResultUpdater(mMockClock, 15_000);
ScanResult scan1 = buildScanResult(SSID, BSSID_1, NOW_MILLIS - 10_000);
ScanResult scan2 = buildScanResult(SSID, BSSID_2, NOW_MILLIS - 15_000);
ScanRes... | [
"@Test\n public void testGetScanResults_overridesConstructorMaxScanAge() {\n ScanResultUpdater sru = new ScanResultUpdater(mMockClock, 15_000);\n\n ScanResult scan1 = buildScanResult(SSID, BSSID_1, NOW_MILLIS - 10_000);\n ScanResult scan2 = buildScanResult(SSID, BSSID_2, NOW_MILLIS - 15_000)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the log level for an exchange. | public Integer getLevel(String exchange) {
Integer level = levels.get(exchange);
if (level == null)
return requestLogPercentage;
return level;
} | [
"public int getLogLevel() {\n\t\treturn Integer.parseInt(getInternalProperty(INTERNAL_KEYS.LOG_LEVEL));\n\t}",
"public int get_log_level() {\r\n return logLevel;\r\n }",
"Level getLogLevel();",
"public static int getLevel(){\n\treturn logLevel;\n }",
"public static int getLogLevel() {\n\t\tretu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns whether this board position has been classified (deadlock or no deadlock). This method returns the same value as !isBeeingAnalyzed() | public boolean isClassified() {
return isDeadlock || isNotDeadlock;
} | [
"public boolean isHitState() {\n return hitState;\n }",
"boolean gameWon() {\n for (Tile t : this.board) {\n if (!((TileFC)t).getisUp()) {\n return false;\n }\n }\n return true;\n }",
"public boolean getWasHit() {\n return wasHit;\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets (as xml) the "limitwarning" element | public void xsetLimitWarning(org.apache.xmlbeans.XmlBoolean limitWarning) {
synchronized (monitor()) {
check_orphaned();
org.apache.xmlbeans.XmlBoolean target = null;
target = (org.apache.xmlbeans.XmlBoolean) get_store().find_element_user(LIMITWARNING$4, 0);
if (target == null) {
... | [
"public void setLimitWarning(boolean limitWarning) {\r\n synchronized (monitor()) {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue) get_store().find_element_user(LIMITWARNING$4, 0);\r\n if (target == null) {\r\n ta... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Setter para o access_token da dropbox de um utilizador | public void setAccess_token(String access_token) {
this.access_token = access_token;
} | [
"void setAccessToken(String accessToken);",
"public void setAccessToken(String accessToken);",
"void setOAuthAccessToken(AccessToken accessToken);",
"void setAccessToken(java.lang.String accessToken);",
"public void setAccessTokenSecret(String accessTokenSecret);",
"void setSecretToken(String secretToken)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The polyline specifying the route the driver app intends to take to the next waypoint. Your driver app updates this every time a waypoint is passed or the driver reroutes. This list is also returned in Trip.current_route_segment for all active trips assigned to the vehicle. Note: This field is intended only for use by ... | public java.lang.String getCurrentRouteSegment() {
java.lang.Object ref = currentRouteSegment_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
currentRouteSegment_... | [
"@java.lang.Override\n public google.maps.fleetengine.v1.TripWaypoint getCurrentRouteSegmentEndPoint() {\n return currentRouteSegmentEndPoint_ == null ? google.maps.fleetengine.v1.TripWaypoint.getDefaultInstance() : currentRouteSegmentEndPoint_;\n }",
"public google.maps.fleetengine.v1.TripWaypoint getCurren... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the ship type code of this temp no tice ship message. | @Override
public java.lang.String getShipTypeCode() {
return _tempNoTiceShipMessage.getShipTypeCode();
} | [
"public java.lang.String getShipTypeCode() {\n\t\treturn _tempNoTiceShipMessage.getShipTypeCode();\n\t}",
"public java.lang.String getNoticeShipType() {\n\t\treturn _tempNoTiceShipMessage.getNoticeShipType();\n\t}",
"@Override\n\tpublic java.lang.String getNoticeShipType() {\n\t\treturn _tempNoTiceShipMessage.g... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Handles a passwort reset action. It is implemented as AJAX call and returns the HTML to display. | private void handlePasswordResetAction(HttpServletRequest request, HttpServletResponse response, Locale locale) throws IOException {
String userId = request.getParameter("userId");
String responseHtml;
if (userId == null || userId.trim().isEmpty()) {
responseHtml = "<div class=\"warnLabel\">" + Loc... | [
"private void resetPassAction(){\n edtResetPassword = (EditText) findViewById(R.id.edtResetPassword);\n edtResetConfirmPassword = (EditText) findViewById(R.id.edtResetConfirmPassword);\n\n strResetPassword = edtResetPassword.getText().toString().trim();\n strResetConfirmPassword = edtRe... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the paper ID of this paper. | @Override
public long getPaperId() {
return _paper.getPaperId();
} | [
"public String getPaper_id() {\n return paper_id;\n }",
"public Integer getPaperid() {\n return paperid;\n }",
"public Long getPaperid() {\n return paperid;\n }",
"public String getPaperid() {\r\n return paperid;\r\n }",
"@Override\n\tpublic org.kisti.edison.science.s... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Rips a Redifs profile | @Test
@Tag("flaky")
public void testRedgifsProfile() throws IOException {
RedgifsRipper ripper = new RedgifsRipper(new URL("https://redgifs.com/users/margo_monty"));
testRipper(ripper);
} | [
"private void updateOwnedShips(JSONObject profile)\n {\n JSONObject ships = Utils.getJsonObject(profile, \"ships\");\n\n for (Object o : ships.keySet())\n {\n String shipId = (String) o;\n\n JSONObject ship = Utils.getJsonObject(ships, shipId);\n\n if (ship !... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Defines if the nodes must be displayed in the preview. | public void setShowNodes(Boolean value) {
showNodes = value;
} | [
"public Boolean getShowNodes() {\n return showNodes;\n }",
"boolean hasDisplayOnly();",
"public void setShowNodeLabels(Boolean value) {\n showNodeLabels = value;\n }",
"public boolean isPreview() {\r\n return preview;\r\n }",
"private void setNoPreview() {\n \t\tpreviewTab.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
use the submitted language to construct a response URL w/an embedded language (if it's german there's no prefix, so we return the URI unmodified) | private static URI prependLanguageCode(URI oldUri, FormRequest.UserLanguage userLang) {
if (userLang != FormRequest.UserLanguage.de) {
// reconstruct the URL with a new path, but everything else the same
try {
return new URI(
oldUri.getScheme(),
... | [
"private String buildSearchUrl(String prefix, String searchTerm, String language) {\n String searchUrl = apiSite + prefix + \"/\" + language + \"/xml/\" + apiKey + \"/\" + searchTerm;\n logger.finest(\"Search URL: \" + searchUrl);\n return searchUrl;\n }",
"public String getUrlByLocale... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
gets pin data back from the ChooseLocationActivity | @Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
if (requestCode == PIN_REQUEST) {
if (resultCode == RESULT_OK) {
fixedPin = (Pin) data.getSerializableExtra("pin");
}
}
} | [
"private void handleSetLocationBTN(){\n setLocationBTN.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent data = new Intent();\n data.putExtra(\"Lat\",mMap.getCameraPosition().target.latitude);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
creates a bundleVersion on server. This is done by uploading given BundleDistributionFile (ZIP) to server. Server than read's deploy.xml from ZIP file and creates appropriate Bundle in version found in ZIP | private BundleVersion createBundleVersion(File input) throws Exception {
byte[] array;
try (FileInputStream is = new FileInputStream(input)) {
int length = (int)input.length();
array = new byte[length];
for (int numRead=0, offset=0; ((numRead >= 0) && (offset < array.... | [
"BundleVersionEntity createBundleVersion(BundleVersionEntity extensionBundleVersion);",
"public void createVersion() {\r\n\t\tif (!active) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (applicationId == null) {\r\n\t\t\tcreateApplication();\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tJSONObject versionJson = getJSonResponse(Unirest.p... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the currently available chat panels. | public List<ChatPanel> getChats()
{
java.awt.Container container
= (getChatTabCount() > 0) ? chatTabbedPane : mainPanel;
int componentCount = container.getComponentCount();
List<ChatPanel> chatPanels
= new ArrayList<ChatPanel>(componentCount);
for (int i = 0;... | [
"public Set<String> getPanels(){\n return panels.keySet();\n }",
"public ChatPanel getCurrentChat()\n {\n if(getChatTabCount() > 0)\n return (ChatPanel) chatTabbedPane.getSelectedComponent();\n else\n {\n int componentCount = mainPanel.getComponentCount();\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Parsing the Place JSON object | private Place getPlace(JSONObject jPlace){
Place place = new Place();
try {
// Extracting Place name, if available
if(!jPlace.isNull("name")){
place.mPlaceName = jPlace.getString("name");
}
// Extrac... | [
"private Place extractFromJSON(JSONObject jo) {\n Place place = new Place();\n place.id = jo.optString(\"id\");\n place.name = jo.optString(\"name\");\n\n JSONObject locationObject = jo.optJSONObject(\"location\");\n if (locationObject != null) {\n place.lat = locationO... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the incomeFinancialSubObject attribute. | public SubObjectCodeCurrent getIncomeFinancialSubObject() {
return incomeFinancialSubObject;
} | [
"public String getIncomeFinancialSubObjectCode() {\n return incomeFinancialSubObjectCode;\n }",
"public SubObjectCodeCurrent getExpenseFinancialSubObject() {\n return expenseFinancialSubObject;\n }",
"public String getFinancialSubObjectCode() {\n return financialSubObjectCode;\n }"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new instance of TablingSolver | public TablingSolver(SudokuStepFinder finder) {
super(finder);
simpleFinder = new SudokuStepFinder(true);
for (int i = 0; i < tmpOnSets.length; i++) {
tmpOnSets[i] = new SudokuSet();
tmpOffSets[i] = new SudokuSet();
}
steps = new ArrayList<Solut... | [
"public static TSPSolver createInstance() {\n\t\tif (_instance == null) {\n\t\t\t_instance = new TSPSolver();\n\t\t}\n\t\t\n\t\treturn _instance;\n\t}",
"public Tableau(Formula f, Theory t) {\n TableauFormula pf = TableauFormula.createTableauFormula(f, false);\n ArrayList goals = new ArrayList(1);\n goal... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the card stock. | public List<CardStock> getCardStock() {
return cardStock;
} | [
"public Card getStockCard()\n {\n if(stock.isEmpty())\n {\n return null;\n }\n else\n {\n return stock.peek();\n }\n }",
"public Integer getStock() {\n return stock;\n }",
"public int getStock(){\n\t\treturn Stock; // Return the pro... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |