query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
JDBC 2.0 Retrieves the result set concurrency.
@Override public int getResultSetConcurrency() throws SQLException { throw new SQLException("tinySQL does not support ResultSet concurrency."); }
[ "int getResultSetConcurrency() throws SQLException;", "public int getResultSetConcurrency() throws java.sql.SQLException {\r\n return wrappedStatement.getResultSetConcurrency();\r\n }", "JDBCSource<C> setResultSetConcurrency(String resultSetConcurrency);", "public int getResultSetConcurrency() throw...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns true if field jobApplicationId is set (has been assigned a value) and false otherwise
public boolean isSetJobApplicationId() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __JOBAPPLICATIONID_ISSET_ID); }
[ "public boolean isSetApplicationId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __APPLICATIONID_ISSET_ID);\n }", "public boolean isSetJobid() {\n return __isset_bit_vector.get(__JOBID_ISSET_ID);\n }", "public boolean isSetJobID() {\r\n return __isset_bit_vector.get(_...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the Optional Frequency.
public Optional<Frequency> getFrequency() { return Optional.ofNullable(freq); }
[ "java.lang.String getFrequency();", "double getFrequency();", "int getFrequency();", "public java.lang.Integer getFrequency() {\n return frequency;\n }", "public int getFreq() {\r\n return frequency;\r\n }", "public double getFreq() \r\n {\r\n return this.freq;\r\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Changes the quantity value (also known as line units) for the line at the given index in both the data model the current sale
public void changeLineQuantity(int lineIndex, int quantity) { String newQty; if(quantity == 0 && activeSale) { voidLineItem(lineIndex); } else { if(activeSale) { if(quantity < 0) { int response = JOptionPane.showConfirmDialog(null, "Add returned product(s) to inventory?", "Adjust stock co...
[ "public void voidLineItem(int lineIndex) {\r\n\t\tif(activeSale) {\r\n\t\t\tLine lineItem = currentSale.getLineItems().get(lineIndex);\r\n\t\t\tcurrentSale.removeLineItem(lineItem);\r\n\t\t\tdataModel.removeRow(lineIndex);\r\n\t\t\tcalculateTotal();\r\n\t\t}\r\n\t}", "public void setQuantity(final int index, fina...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
struct LDKPublicKey ChannelInfo_get_node_two(const struct LDKChannelInfo NONNULL_PTR this_ptr);
public static native byte[] ChannelInfo_get_node_two(long this_ptr);
[ "public static native long ChannelInfo_get_two_to_one(long this_ptr);", "public static native long ChannelInfo_get_one_to_two(long this_ptr);", "public static native byte[] ChannelInfo_get_node_one(long this_ptr);", "public static native void ChannelInfo_set_node_two(long this_ptr, byte[] val);", "public st...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the contents of the high level code pane.
public String getHighLevelCode() { return mHighLevelTextPane.getText(); }
[ "public CodePane getHighLevelTextPane() {\n return mHighLevelTextPane;\n }", "public CodeArea getCurCodeArea( ) {\n if (this.getTabs().size()>0) {\n Tab selectedTab = getCurTab();\n VirtualizedScrollPane vsp = (VirtualizedScrollPane) selectedTab.getContent();\n re...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the technician who owns the ticket.
public Technician getOwner() { return owner; }
[ "public java.lang.String getTicket()\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(TICKET$0, 0);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the 'var179' field.
public void setVar179(java.lang.CharSequence value) { this.var179 = value; }
[ "public com.dj.model.avro.LargeObjectAvro.Builder setVar179(java.lang.CharSequence value) {\n validate(fields()[180], value);\n this.var179 = value;\n fieldSetFlags()[180] = true;\n return this;\n }", "public com.dj.model.avro.LargeObjectAvro.Builder setVar180(java.lang.CharSequence value) ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add a connection state listener.
public void addConnectionStateListener(ConnectionStateListener listener);
[ "public void registerConnectionStateListener(final ConnectionStateListener listener);", "public void addConnectionEventListener(ConnectionListener listener);", "public void addConnectionListener(ConnectionListener listener);", "public void addStateListener(IStateListener listener);", "public void addClientS...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ start thread used to repaint image at fixed intervals whenever scn_repaint has been set true
public synchronized void start_scn_updates() { if (scn_update_thread == null){ scn_update_thread = new Thread(this); scn_update_thread.start(); } scn_ready = true; repaint(); scn_repaint = true; }
[ "@Override\n public void run(){\n\n while(true){\n\n repaint();\n try {\n Thread.sleep(1000 / frameRate);\n } catch (InterruptedException e) {}\n \n \n }\n }", "public void run() {\r\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Fills the outside of the maze with '' and the inside randomly with '.' or ''.
private void fillMaze() { for (int i = 0; i < height; i++) { maze[0][i] = '#'; maze[width - 1][i] = '#'; } for (int i = 0; i < width; i++) { maze[i][0] = '#'; maze[i][height - 1] = '#'; } for (int i = 1; i < width - 1; i++) { for (int j = 1; j < height - 1; j++) maze[i][j] = ...
[ "private static char[][] fillMaze(char[][] maze) {\r\n\t\tint maxLinha = maze.length - 1;\r\n\t\tint maxColuna = maze[0].length - 1;\r\n\r\n\t\t// preenche as bordas do labirinto com #\r\n\t\tfor (int i = 0; i <= maxColuna; i++) {\r\n\t\t\tmaze[0][i] = '#';\r\n\t\t\tmaze[maxLinha][i] = '#';\r\n\t\t}\r\n\r\n\t\tfor ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
PackageMojo can't work with nonWAR projects.
@Test(expected = IllegalStateException.class) public void testNonWarPackaging() throws Exception { final PackageMojo mojo = new PackageMojo(); final MavenProject project = new MavenProjectMocker() .withPackaging("jar") .mock(); mojo.setProject(project); mojo.e...
[ "@Test\n public void packsArtifactsNormally() throws Exception {\n final Environment env = new EnvironmentMocker().mock();\n final PackageMojo mojo = new PackageMojo();\n mojo.setWebappDirectory(env.webdir().getAbsolutePath());\n final MavenProject project = new MavenProjectMocker().m...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Looks up and returns the ParameterService.
protected ParameterService getParameterService() { if (this.parameterService == null) { this.parameterService = KraServiceLocator.getService(ParameterService.class); } return this.parameterService; }
[ "public ParameterService getParameterService() {\n return parameterService;\n }", "protected ParameterService getParameterService() {\r\n return parameterService;\r\n }", "public ParameterService getParameterService() {\r\n\t\treturn parameterService;\r\n\t}", "public interface ParameterSe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Determine if start date and time form field is valid, calls validateDateAndTime() to do so Sets the boolean value indicating validity once done
public void validateStartDateAndTime(String date){ setStartDateAndTimeValid(validateDateAndTime(date)); }
[ "public boolean validateTime(){\n if(startSpinner.getValue().isAfter(endSpinner.getValue())){\n showError(true, \"The start time can not be greater than the end time.\");\n return false;\n }\n if(startSpinner.getValue().equals(endSpinner.getValue())){\n showErro...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Search all files in directory wich in their name has timestamp from begin date to end date
static public Vector<File> searchDateFiles(File dir, Date beginDate, Date endDate, String prefix) { Vector<File> toReturn=new Vector<File>(); // if directory ha files if(dir.isDirectory() && dir.list()!=null && dir.list().length!=0){ // serach only files starting with prefix // get sorted array File...
[ "private Iterable<File> findUpdateFilesAfter(long minimumLastModified) {\r\n\t\t String dataFileName = dataFile.getName();\r\n\t\t int period = dataFileName.indexOf('.');\r\n\t\t String startName = period < 0 ? dataFileName : dataFileName.substring(0, period);\r\n\t\t File parentDir = dataFile.getParent...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Convert an input stream to a buffered reader.
private static BufferedReader streamToReader(InputStream in) { BufferedReader br; try { br = new BufferedReader(new InputStreamReader(new BufferedInputStream(in), "UTF-8"), 8); } catch (UnsupportedEncodingException e) { br = null; } return br; }
[ "public static BufferedInputStream get(InputStream in) {\n if(in == null || in instanceof BufferedInputStream) {\n return (BufferedInputStream)in;\n }\n return new BufferedInputStream(in);\n }", "static public BufferedReader asBufferedUTF8(InputStream in) {\n // Always bu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Updates the cookie registry with the cookie occurrence.
private static void updateRegistry(String cookie) { if (cookieCounterRegistry.containsKey(cookie)) { cookieCounterRegistry.put(cookie, cookieCounterRegistry.get(cookie) + 1); } else { cookieCounterRegistry.put(cookie, 1); } }
[ "void updateCookieJar(ICookie cookie);", "void updateCookie(String cookie);", "void updateCookies(Map<String, String> cookies);", "private int addCookie(String cookie) {\n\t\tif (cookies.contains(cookie)) return 0; //we have this exact cookie\n\n\t\tString newCookieName = cookie.split(\"=\")[0];\n\t\tif (cook...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column gaibanhan.col7
public String getCol7() { return col7; }
[ "public String getCol7value() {\n return col7value;\n }", "public void setCol7(String col7) {\r\n this.col7 = col7;\r\n }", "public String getCol6() {\r\n return col6;\r\n }", "public String getCol6value() {\n return col6value;\n }", "public String getCol8() {\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Whether the current PowerState allows deep sleep or not. Calling this for power state other than STATE_SHUTDOWN_PREPARE will trigger exception.
public boolean canEnterDeepSleep() { if (mState != STATE_SHUTDOWN_PREPARE) { throw new IllegalStateException("wrong state"); } return (mParam & VehicleApPowerStateShutdownParam.CAN_SLEEP) != 0; }
[ "public boolean isSleepingAllowed () {\n\t\treturn jniIsSleepingAllowed(addr);\n\t}", "public boolean canPostponeShutdown() {\n if (mState != STATE_SHUTDOWN_PREPARE) {\n throw new IllegalStateException(\"wrong state\");\n }\n return (mParam & VehicleApPowerStateShut...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the jwt token.
public void setJwtToken(String jwtToken) { this.jwtToken = jwtToken; }
[ "public JWTToken(final String token) {\n\n this.token = token;\n }", "void setSecurityToken(String token);", "public void setAuthToken(String token) {\n\t\t\n\t\tConfigurationManager.instance.authToken = token;\n\t}", "public void setToken(){\n final AuthenticationRequest request = getAuthenticatio...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method changes the position of the horizontal bar according to the direction of the move.
public void changeHorizontalBarPosition() { BarPosition barPosition = horizontals[numberOfBar].getPosition(); if (directionOfMove.equals("i")) { if (barPosition == BarPosition.OUTER) horizontals[numberOfBar].setPosition(BarPosition.CENTRAL); else //if (barPosition...
[ "public void moveBar() {\n if (typeOfBar.equals(\"v\"))\n changeVerticalBarPosition();\n else /*if (typeOfBar.equals(\"h\"))*/\n changeHorizontalBarPosition();\n\n if (typeOfBar.equals(\"v\"))\n updateColumnInGrid();\n else /*if (typeOfBar.equals(\"h\"))*...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks the string to see if it begins with the correct suffix for the given number, e.g. 1st, 102nd, 13th
public static boolean parseSuffix(StringBuilder sb, int num) { if(sb.length() < 2) return false; boolean ret; if(num % 10 == 1 && num / 10 != 1) ret = sb.charAt(0) == 's' && sb.charAt(1) == 't'; else if(num % 10 == 2 && num / 10 != 1) ret = sb.charAt(0) == 'n' && sb.charAt(1) == 'd'; else i...
[ "private static String getSuffix(int num) {\n\n\t\tswitch(num){\n\t\tcase 1: return(\"st\");\n\t\tcase 2: return(\"nd\");\n\t\tcase 3: return(\"rd\");\n\t\t}\n\t\t\n\t\tString number = String.valueOf(num);\n\t\tSystem.out.println();\n\t\t\n\t\tif(number.charAt(number.length()-1) == '1'){\n\t\t\treturn(\"th\");\n\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds a primitive long to the SQL statement for the given fieldName.
public void addLong(String fieldName, long value) { fields.add(fieldName); values.add(new Long(value)); }
[ "protected static long verifyLong(Text field, String fieldName)\r\n\t\t\tthrows MusicTunesException {\r\n\t\tlong number = 0;\r\n\t\ttry {\r\n\t\t\tnumber = Long.parseLong(field.getText());\r\n\t\t} catch (NumberFormatException e2) {\r\n\t\t\tfield.setFocus();\r\n\t\t\tfield.selectAll();\r\n\t\t\tthrow new MusicTun...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Determine whether a char is a URI character (reserved or unreserved, not including '%' for escaped octets).
private static boolean isURICharacter (char p_char) { return (p_char <= '~' && (fgLookupTable[p_char] & MASK_URI_CHARACTER) != 0); }
[ "private static boolean isURIString(String p_uric) {\n if (p_uric == null) {\n return false;\n }\n int end = p_uric.length();\n char testChar = '\\0';\n for (int i = 0; i < end; i++) {\n testChar = p_uric.charAt(i);\n if (testChar == '%') {\n if (i+2 >= end ||\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This function return the leading term of the Lanczo's Formula
private double leadingTerm(double x){ double temp=x+5.5; return Math.log(temp)*(x+0.5)-temp; }
[ "private static BigInteger getLucasLehmerNumber(BigInteger termNo) {\n // x(n+1) = (x(n)) ^ 2 - 2\n if (termNo.equals(ZERO)) return FOUR;\n BigInteger lastTerm = getLucasLehmerNumber(termNo.subtract(ONE));\n BigInteger lastTermSquared = lastTerm.pow(2);\n return lastTermSquared.su...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the freeware property.
public void setFreeware(boolean value) { this.freeware = value; }
[ "public boolean isFreeware() {\n return freeware;\n }", "public void setIntellectualProperty(Boolean intellectualProperty) {\r\n\t\t\t_intellectualProperty = intellectualProperty;\r\n\t\t}", "public void setExternallyOwned(java.lang.Boolean value);", "public void setFrecuencia(String frecuencia) {\r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__XReturnExpression__ExpressionAssignment_2" $ANTLR start "rule__XTryCatchFinallyExpression__ExpressionAssignment_2" ../org.xtext.mongobeans.ui/srcgen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:17617:1: rule__XTryCatchFinallyExpression__ExpressionAssignment_2 : ( ruleXExpr...
public final void rule__XTryCatchFinallyExpression__ExpressionAssignment_2() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:17621:1: ( ( ruleX...
[ "public final void rule__XTryCatchFinallyExpression__ExpressionAssignment_2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A private utility routine to calculate the minimum size of the rectangle to hold the name and extension points (if displayed).
private Dimension getTextSize() { Dimension minSize = getNameFig().getMinimumSize(); // Now allow for the extension points, if they are displayed if (epVec.isVisible()) { // Allow for a separator (spacer each side + 1 pixel width line) minSize.height += 2 * SPACER + 1; ...
[ "float getMinBoundingBoxSize();", "@Override\n public Dimension getMinimumSize() {\n\n Dimension textSize = getTextSize();\n\n Dimension size = calcEllipse(textSize, MIN_VERT_PADDING);\n\n return new Dimension(Math.max(size.width, 100),\n\t\t\t Math.max(size.height, 60));\n }", "p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removes the specified BookedFlights from the table.
@Override public boolean removeBookedFlight(BookedFlight bf) { return bookedFlightsDB.remove(bf); }
[ "public void clearBookings() {\n realm.beginTransaction();\n realm.delete(BookingRealm.class);\n realm.commitTransaction();\n }", "public void deleteFlights(List<Flight> newFlights) {\n\t\tSession session = connector.getSession();\n\t\tTransaction transaction = session.beginTransaction();\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the options in the table when values are changed.
@SuppressWarnings("unused") public void setOptions() { CIVLTable tbl_optionTable = (CIVLTable) getComponentByName("tbl_optionTable"); DefaultTableModel optionModel = (DefaultTableModel) tbl_optionTable .getModel(); Object[] opts = currConfig.getGmcConfig().getOptions().toArray(); GMCSection section = curr...
[ "@Override\n public Status changeOptions(Options options) {\n if (options.getComparator() != this.options.getComparator()) {\n return Status.InvalidArgument(\"changing comparator while building table\");\n }\n\n // Note that any live BlockBuilders point to rep_->options and theref...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Medium of conversations used in training data. This field is being deprecated. To specify the medium to be used in training a new issue model, set the `medium` field on `filter`. .google.cloud.contactcenterinsights.v1.Conversation.Medium medium = 1 [deprecated = true];
@java.lang.Deprecated com.google.cloud.contactcenterinsights.v1.Conversation.Medium getMedium();
[ "@java.lang.Deprecated\n public Builder setMedium(\n com.google.cloud.contactcenterinsights.v1.Conversation.Medium value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n medium_ = value.getNumber();\n onChanged(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__ComparisonOpExp__Group__0__Impl" $ANTLR start "rule__ComparisonOpExp__Group__1" InternalOCLlite.g:4580:1: rule__ComparisonOpExp__Group__1 : rule__ComparisonOpExp__Group__1__Impl ;
public final void rule__ComparisonOpExp__Group__1() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalOCLlite.g:4584:1: ( rule__ComparisonOpExp__Group__1__Impl ) // InternalOCLlite.g:4585:2: rule__ComparisonOpExp__Group__1__Impl ...
[ "public final void rule__ComparisonOpExp__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalOCLlite.g:4595:1: ( ( ( rule__ComparisonOpExp__Group_1__0 )* ) )\n // InternalOCLlite.g:4596:1: ( ( rule__ComparisonO...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Find books by their removal status
@Override public List<Inventory> findByRemovalStatus(boolean status) throws SQLException { String query = "SELECT * FROM inventory WHERE removal_status = ?"; books = new ArrayList<>(); try (Connection connection = inventorySource.getConnection(); PreparedStatement ps = connec...
[ "@Override\n public List<Book> removeBooks(Book removingBook) throws DaoException {\n DataBaseHelper helper = new DataBaseHelper();\n List<Book> removedBooks = new ArrayList<>();\n try (Connection connection = SqlConnector.connect();\n PreparedStatement statementSelect =\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the project owner ID of this eprocurement request.
@Override public void setProjectOwnerId(long projectOwnerId) { _eprocurementRequest.setProjectOwnerId(projectOwnerId); }
[ "@Override\n\tpublic long getProjectOwnerId() {\n\t\treturn _eprocurementRequest.getProjectOwnerId();\n\t}", "void updateOwner(final Long projectID, final Long ownerID);", "void setOwnerId(final Integer ownerId);", "public void setOwnerId(long ownerId) {\n this.ownerId = ownerId;\n }", "public voi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
getRawXData This method returns the raw data of the specified type for the yaxis.
@Override public SensorData<Double> getRawYData(DataType dataType) { final String funcName = "getRawYData"; double value = 0.0; long currTagId = FtcOpMode.getLoopCounter(); if (dataType == DataType.ACCELERATION) { if (currTagId...
[ "@Override\n public SensorData<Double> getRawYData(DataType dataType)\n {\n final String funcName = \"getRawYData\";\n double value = 0.0;\n long currTagId = FtcOpMode.getLoopCounter();\n\n if (dataType == DataType.ROTATION_RATE)\n {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
transitions from WELCOME Frame to next Frame based on the Button Clicked SHOPPING or PREVIOUS RECORDS
void nextFrame(Welcome welcomeF, int pageChoice){ welcomeF.setVisible(false); if(pageChoice == Globals.SHOPPING_PAGE){ shoppingF.setVisible(true); //to fill the shopping tables in the SHOPPING Frame before displaying the frame. shoppingF.setTables(); } else if(pageChoice == Globals.PREV_RECORDS...
[ "void nextFrame(PreviousRecords prevRecordsF){\n\t\tprevRecordsF.setVisible(false);\n\t\twelcomeF.setVisible(true);\n\t\t\n\t}", "private void continueButton() {\n Side side = view.getRadioButtonAllies().isSelected() ? Side.ALLIES : Side.AXIS;\n\n game.setNew();\n game.setScenario(scenarioVie...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ This is a utility to get a user from a collection were it is necessary that the collection has a single instance, thus an exception if not single.
private User getSingleUser(Collection collection) throws EmptyUserCollectionException, NotSingleUserException { if (collection.size() == 1) { return (User) collection.iterator().next(); } else if (collection.size() < 1) { throw new EmptyUserCollectionException();...
[ "public User getUser(String uid) {\n Enumeration<Object> enumeration = elements();\n while(enumeration.hasMoreElements()){\n User user = (User)enumeration.nextElement();\n if(uid.equals(user.getUid().toString())) {\n return user;\n }\n }\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ / Get the document builder to insert a REF field, reference a bookmark with it, and add text before and after it. /
private FieldRef insertFieldRef(final DocumentBuilder builder, final String bookmarkName, final String textBefore, final String textAfter) throws Exception { builder.write(textBefore); FieldRef field = (FieldRef) builder.insertField(FieldType.FIELD_REF, true); ...
[ "@Test//ExSkip\n public void fieldRef() throws Exception {\n Document doc = new Document();\n DocumentBuilder builder = new DocumentBuilder(doc);\n\n builder.startBookmark(\"MyBookmark\");\n builder.insertFootnote(FootnoteType.FOOTNOTE, \"MyBookmark footnote #1\");\n builder.wr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Merges current input buffers, outputing them into a single sorted run on disk. Returns a File object representing this sorted run stored on disk
private File merge() { File nextSortedRun = new File(this.getUniqueFileName()); TupleWriter outBuffer = new TupleWriter(nextSortedRun.getName(), this.batchSize); if (!outBuffer.open()) { System.err.println("Sort: Error in opening file for writing"); System.exit(1); ...
[ "private void sortAndWrite(ArrayList<Batch> buffers) {\n File sortedRun = new File(this.getUniqueFileName());\n sortedRuns.add(sortedRun);\n TupleWriter out = new TupleWriter(sortedRun.getName(), this.batchSize);\n if (!out.open()) {\n System.err.println(\"Sort: Error in writi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ \brief Match an argument. /template TEMPLATE
@Converted(kind = Converted.Kind.MANUAL_SEMANTIC, source = "${LLVM_SRC}/llvm/include/llvm/IR/PatternMatch.h", line = 1183, FQN="llvm::PatternMatch::m_Argument", NM="Tpl__ZN4llvm12PatternMatch10m_ArgumentERKT0_", cmd="jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/Transfor...
[ "public static void main(String[] args) {\n System.out.println(new RegularExpressionMatching().isMatch(\"aab\", \"aab*a*\"));\n }", "boolean match(String mnemonic, ParameterType[] parameters);", "public static void main(String[] args)\n {\n try\n {\n System.out.println(\"Re...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
End of variables declaration//GENEND:variables Creates new form ControlsDialog
public ControlsDialog(java.awt.Frame parent) { super(parent, true); Preferences prefs = PrefsSingleton.get(); int[][] keys = { { prefs.getInt("keyUp1", KeyEvent.VK_UP), prefs.getInt("keyDown1", KeyEvent.VK_DOWN), prefs.getInt("keyLeft1", KeyEvent.VK_LEFT), prefs.getInt("keyRight1", KeyEvent.VK_RIGHT), ...
[ "static private boolean DIALOG_CreateControls32(int hwnd, int template, DLG_TEMPLATE dlgTemplate, int hInst, boolean unicode) {\n DialogInfo dlgInfo = WinWindow.get(hwnd).dlgInfo;\n DialogControlInfo info = new DialogControlInfo();\n int hwndCtrl = 0, hwndDefButton = 0;\n\n for (int i = ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column TRSDEAL_PROMISSORY_FX.OTHER_CY
public BigDecimal getOTHER_CY() { return OTHER_CY; }
[ "public BigDecimal getOTHER_CY() {\r\n return OTHER_CY;\r\n }", "public BigDecimal getACTUAL_PROMISSORY_OTHER_AMOUNT()\r\n {\r\n\treturn ACTUAL_PROMISSORY_OTHER_AMOUNT;\r\n }", "public String getOtherCountry(final SessionContext ctx)\n\t{\n\t\treturn (String)getProperty( ctx, OTHERCOUNTRY);\n\t}...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the value of the allEULAsAccepted property.
public Boolean isAllEULAsAccepted() { return allEULAsAccepted; }
[ "public static ArrayList<Errand> getUserAcceptedErrands() {\n return userAcceptedErrands;\n }", "public Collection getAcceptedValues() {\n return acceptedLanguages;\n }", "public boolean getAccepted_tou();", "public Integer getEducateValidate() {\n return educateValidate;\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
sort opcodes in descending order of values
public HashMap<String, Integer> sort(HashMap<String, Integer> num_opcode) { LinkedHashMap<String, Integer> sortedMap = new LinkedHashMap<>(); num_opcode.entrySet().stream().sorted(Map.Entry.comparingByValue(Comparator.reverseOrder())) .forEachOrdered(x -> sortedMap.put(x.getKey(), x.getValue())); return...
[ "void sortProcesses() {\n\t\tfor (int i = 0; i < noOfProcess; i++) {\n\t\t\tfor (int j = 0; j < noOfProcess - i - 1; j++) {\n\t\t\t\tif (input[j][0] > input[j + 1][0]) {\n\t\t\t\t\tswap(j, j + 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void sortDescending()\n {\n cards.sort(new Card.CompareDescending...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns an Enumeration of the Cookies contained in the message.
public Enumeration getCookies ();
[ "public Enumeration getCookieNames ();", "public List<Cookie> getCookies() {\n return header.getCookies();\n }", "public List<Pair<String, String>> getCookies() {\n return cookies;\n }", "public String[] getCookies() throws GGException{\n\t\tif(!authorized){\n\t\t\tthrow new GGException(GGErrorCode...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the UID of the PingRequest that requested this Ping.
public UID getPingReqUID() { return pingReqUID; }
[ "public int getRequestID() {\n return requestID.getValue();\n }", "public long getRequestid() {\n return requestid;\n }", "public String getRequestorId() {\n String requestorId = _record.getSimpleField(LockInfoAttribute.REQUESTOR_ID.name());\n return requestorId == null ? LockConstants.DEFAU...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
store array as column in AL
@Override public void storeArray(Float a[],int column) { for(int i=0;i<a.length;i++) { switch(column) { case 0: attribute1.remove(i); attribute1.add(i, a[i]); break; case 1: ...
[ "protected abstract String[] assignTableElementsToArray();", "public SettableAssign array(Expr array);", "void setArray(int parameterIndex, Array x) throws SQLException;", "public void loadData(Object[] columnData);", "public void append(DataArray<?> array, ResultSet set, int column, int row, int type) thro...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Precondition: current speed is less than max speed Postcondition: Calculates and returns the amountOfFuel used by the boat using the formula: AmountOfFuel = motorEfficiency time (current speed)^2
public double amountOfFuelUsed(double speed, double time) { if(speed>this.maxSpeed) { System.out.println("Current Speed cannot be greater than Max Speed!"); System.exit(0); } return this.efficiency*time*speed*speed; }
[ "public double getCurrentFuel();", "public abstract double maxSpeed();", "public double calculateFuelConsumption()\n {\n return getFuelNeeds()/getDistance();\n }", "public float getSpeed() {\n if ( MAXFUEL == 0 ) {\n throw new IllegalArgumentException(\"Zero division at SpaceSta...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test the property 'authenResult'
@Test public void authenResultTest() { assertEquals("R", authResponse.getAuthenResult()); }
[ "@Test\n public void authorisedTest() {\n assertTrue(authResponse.isAuthorised());\n }", "@Test\n public void authcodeTest() {\n assertEquals(\"12345\", authResponse.getAuthcode());\n }", "@Test\n public void avsResultTest() {\n assertEquals(\"G\", authResponse.getAvsResult()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates the specified registry key. If the key already exists, the function opens it. Note that key names are not case sensitive.
LONG RegCreateKeyEx( /* _In_ */HKEY hKey, /* _In_ */String lpSubKey, /* _Reserved_ */DWORD Reserved, /* _In_opt_ */String lpClass, /* _In_ */DWORD dwOptions, /* _In_ *//* REGSAM */WORD samDesired, /* _In_opt_ */SECURITY_ATTRIBUTES lpSecurityAttributes, /* _Out_ */HKEY phkResult, /* _Out_opt_ */DWORD lpdwDispos...
[ "E create(K key) throws CreateException;", "public static CreateResult createKey(int hKey, String subKey) throws RegistryException {\n // retval[NATIVE_HANDLE] will be the Native Handle of the registry entry\n // retval[ERROR_CODE] will be the error code; ERROR_SUCCESS means success\n // retval[DISPOSITI...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a new String with all the vowels removed
public static String disemvowel(String originStr){ return originStr.replaceAll("[AaEeIiOoUu]",""); }
[ "public String removeAllVowels() {\n\t\t// remove the vowels\n\t\tString newWord;\n\t\tnewWord = \"\";\n\t\tchar hold;\n\t\tword = this.getOriginalString();\n\n\t\tfor (int idx = 0; idx < word.length(); idx++) {\n\t\t\thold = word.charAt(idx);\n\t\t\tif (hold != 'A' && hold != 'E' && hold != 'I' &&\n\t\t\t\t\thold ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a warning marker of specified dimension with an ! inside. The resulting image is a triangular icon with an exclamation mark.
public static BufferedImage getWarningMarker(int dimension, ColorSchemeEnum colorSchemeEnum) { // new RGB image with transparency channel BufferedImage image = new BufferedImage(dimension, dimension, BufferedImage.TYPE_INT_ARGB); // create new graphics and set anti-aliasing hint Graphics2D graphi...
[ "public static Icon getWarningMarkerIcon(int dimension,\r\n\t\t\tColorSchemeEnum colorSchemeEnum) {\r\n\t\treturn new ImageIcon(getWarningMarker(dimension, colorSchemeEnum));\r\n\t}", "public static void paintWarningIcon(float x, float y, float width, float height, float stroke, Graphics2D g) {\n final Genera...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__TimeSignature__Group__0__Impl" $ANTLR start "rule__TimeSignature__Group__1" ../ufscar.Compiladores2.ui/srcgen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:2649:1: rule__TimeSignature__Group__1 : rule__TimeSignature__Group__1__Impl rule__TimeSignature__Group__2 ;
public final void rule__TimeSignature__Group__1() throws RecognitionException { int stackSize = keepStackSize(); try { // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:2653:1: ( rule__TimeSignature__Group__1__Impl rule_...
[ "public final void rule__TimeSignature__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:2624:1: ( rule__TimeSignature__Group__0...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column dt_expense_adjstmnt.ACCOUNT_TITLE_ID
public void setAccountTitleId(Integer accountTitleId) { this.accountTitleId = accountTitleId; }
[ "public Integer getAccountTitleId() {\r\n return accountTitleId;\r\n }", "public void setAudit_name_title_id(int audit_name_title_id) {\n this.audit_name_title_id = audit_name_title_id;\n }", "public void setTitleHasAccountPK(TitleHasAccountPK titleHasAccountPK) {\r\n this.titleHasAcc...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Load the specified heap with the specified number of entries.
@SuppressWarnings("unchecked") protected final KeyValueTriple<Integer, Integer, Heap.Entry<Integer, Integer>>[] loadHeap( final Heap<Integer, Integer> heapToLoad, final int size, final boolean useRandom, int keyOffset) throws IllegalArgumentException { if (keyOffset < 0) { throw new IllegalArgumentException...
[ "protected final KeyValueTriple<Integer, Integer, Heap.Entry<Integer, Integer>>[] loadHeap(\n\t\t\tfinal Heap<Integer, Integer> heapToLoad, final int size)\n\t{\n\t\treturn (this.loadHeap(heapToLoad, size, this.getRandomFlag()));\n\t}", "protected final KeyValueTriple<Integer, Integer, Heap.Entry<Integer, Integer...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
find a territory to attack
@Override public AttackPlan getTerritoryToAttack() { AttackPlan result = null; ITerritory t = this.getRandomTerritory(); for(ITerritory a: t.getAdjacentTerritoryObjects()) { if(a.getOwner() != this) { result = new AttackPlan(t,a); ...
[ "private void actOnTerritory() {\n if(!engine.getConsoleGameManager().getCurrentPlayerTerritories().isEmpty()) {\n int territoryID;\n Scanner scanner = new Scanner(System.in);\n System.out.println(\"Select a territory to act on: \");\n territoryID = scanner.nextInt...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Writes the start of a BSON array element to the writer.
void writeStartArray(String name);
[ "void writeStartArray();", "protected abstract void doWriteStartArray();", "public void beginArray() {\n expect(JsonType.START_COLLECTION);\n stack.addFirst(Container.COLLECTION);\n input.read();\n }", "void writeEndArray();", "protected abstract void doWriteEndArray();", "boolean startArray() t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the tags for a jobTime. Get all existing jobTime tags.
public void getJobTimeTags(Integer jobTimeId) throws ApiException { getJobTimeTagsWithHttpInfo(jobTimeId); }
[ "public Set<String> getJobs(String tag, long timestamp);", "public ApiResponse<Void> getJobTimeTagsWithHttpInfo(Integer jobTimeId) throws ApiException {\n com.squareup.okhttp.Call call = getJobTimeTagsValidateBeforeCall(jobTimeId, null, null);\n return apiClient.execute(call);\n }", "public com...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Call when a single node, v, is added to set, S ForAll u neighboursOf(v) (incl v) > Update edgesFromNodetoS(u) > Determine if nodeInB(u) by examining edgesFromNodeToS(u) & nodeInS(u) > Add/remove u to/from B
private void updateBAfterAdd(Node v) { // ForAll u neighboursOf(v) (incl v) long edgesFromVToS = 0; long degV = deg(v); for (Relationship ve : v.getRelationships(Direction.BOTH)) { Node u = ve.getOtherNode(v); // Only consider vertices that have not been partitioned yet Byte colorU = (Byte) u.getPr...
[ "private void updateBAfterRemove(Node v) {\n\n\t\t// ForAll u neighboursOf(v) (incl v)\n\n\t\tlong edgesFromVToS = 0;\n\n\t\tfor (Relationship ve : v.getRelationships(Direction.BOTH)) {\n\t\t\tNode u = ve.getOtherNode(v);\n\n\t\t\t// Only consider vertices that have not been partitioned yet\n\t\t\tByte color = (Byt...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test sharding using Tradefed internal algorithm.
@Test public void testShardConfig_internal_shardIndex() throws Exception { CommandOptions options = new CommandOptions(); OptionSetter setter = new OptionSetter(options); setter.setOptionValue("disable-strict-sharding", "true"); setter.setOptionValue("shard-count", "5"); sett...
[ "public void testShardedRun() throws Exception {\n final String shardableRunner = \"android.support.test.runner.AndroidJUnitRunner\";\n final String nonshardableRunner = \"android.test.InstrumentationTestRunner\";\n\n final String shardableTestPkg = \"com.example.shardabletest\";\n final...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Context should have been initialized and an instance of Foo created
@Test public void testContextShouldInitalizeChildContexts() { assertThat(Foo.getInstanceCount()).isEqualTo(1); ApplicationContext ctx = springClientFactory.getContext("testspec"); assertThat(Foo.getInstanceCount()).isEqualTo(1); Foo foo = ctx.getBean("foo", Foo.class); assertThat(foo).isNotNull(); }
[ "public Context() {}", "Context createContext();", "public void testInitAccuracy() throws Exception {\r\n this.serviceContext = new ServiceContextMock();\r\n this.instance.init(this.serviceContext);\r\n assertEquals(\"Service context should be set.\", this.serviceContext, this.instance.getS...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a signal corresponding to the passed state
public SignalBase getSignalForState(Integer state) { Integer signalId = idForSignalFromState(state); if(isSignalIdForDirectionProvider(signalId)) { return (SignalBase)getSignalDirectionProviderForState(state, signalId); } return null; }
[ "Signal getSignal();", "java.lang.String getSignal();", "public double getSignal() {return _signal;}", "public OtuSignalType signalType();", "public double getSignal(){\n\t\t\treturn SIGNAL; //a constant for olfactory\n\t\t}", "com.google.analytics.admin.v1alpha.GoogleSignalsState getState();",...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Feature: previous getter for previous gets the annotation that preceded this diagnosis before rule application, if any
public Annotation getPrevious() { return (Annotation)(_getFeatureValueNc(wrapGetIntCatchException(_FH_previous))); }
[ "public void setPrevious(Annotation v) {\n _setFeatureValueNcWj(wrapGetIntCatchException(_FH_previous), v);\n }", "public KnownVehicle getPrevious() {\r\n\t\treturn previous_;\r\n\t}", "public String getPrevious() {\r\n\t\treturn previous;\r\n\t}", "public Train getPrev() {\n\t\treturn this.prev;\n\t}", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
To get the alt attribute of the html element (ex : input, area, ...)
String alt(Component component) { return evaluator.attribute(component.id(), Attribute.alt); }
[ "public final String getAltAttribute() {\n return getAttributeValue(\"alt\");\n }", "@JsxGetter(@WebBrowser(IE))\n public String getAlt() {\n final String alt = getDomNodeOrDie().getAttribute(\"alt\");\n return alt;\n }", "public String getAltTag() {\n return altTag;\n }"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Our private constructor so only a static "factory" method from this class can create a SingletonScrabble instance
private SingletonScrabble(){ }
[ "private SingletonPattern() {\n\t\t\n\t}", "private HelloSingleton() {\r\n\t}", "private OnlyOneInstance () { }", "private J2_Singleton() {}", "private BleUtility() {\n }", "private SimpleRepository() {\n \t\t// private ct to disallow external object creation\n \t}", "private HibernateUtilSingleton() {...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Build the Hugo site through hugo cmd line
private void hugoBuild(@Nonnull Run<?, ?> run, Launcher launcher, TaskListener listener, @Nonnull FilePath workspace) throws IOException, InterruptedException { PrintStream logger = listener.getLogger(); EnvVars env = run.getEnvironment(listener); String hugoCmd; if(getH...
[ "public void execute()\n throws MojoExecutionException\n {\n if ( templateDirectory == null )\n {\n siteRenderer.setTemplateClassLoader( SiteMojo.class.getClassLoader() );\n }\n else\n {\n try\n {\n URL templateD...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets (as xml) the "curvature" attribute
org.landxml.schema.landXML11.Clockwise xgetCurvature();
[ "org.landxml.schema.landXML11.Clockwise.Enum getCurvature();", "void xsetCurvature(org.landxml.schema.landXML11.Clockwise curvature);", "void setCurvature(org.landxml.schema.landXML11.Clockwise.Enum curvature);", "String getMinCurvatureRadiusAsString();", "double getMinCurvatureRadius();", "public double ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the result of interpreting the object as an instance of 'EOPENACC Case'. This implementation returns null; returning a nonnull result will terminate the switch.
public T caseEOPENACCCase(EOPENACCCase object) { return null; }
[ "public T caseEOPENACC(EOPENACC object)\n {\n return null;\n }", "public T caseEOPENCLCase(EOPENCLCase object)\n {\n return null;\n }", "public T caseEOPENCL(EOPENCL object)\n {\n return null;\n }", "public T caseEOPENMPCase(EOPENMPCase object)\n {\n return null;\n }", "public T caseExpr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
setup the node name filter handler
private NodeRecordFilter makeNodeNameFilterHandler() { final WindowReference windowReference = _mainWindowReference; final JTextField nodeFilterField = (JTextField)windowReference.getView( "NodeFilterField" ); final NodeRecordNameFilter nameFilter = new NodeRecordNameFilter(); final FreshProcessor nodeFil...
[ "public FNameFilter() {\r\n }", "private void setFilterMapping() {\n try {\n XPath xpath = XPathFactory.newInstance().newXPath();\n Element eleFltMapping = (Element) xpath.\n \t\t evaluate(Messages.exprFltMapping,\n \t\t\t\t doc, XPathConstants.NODE);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
tests the getWeight method for item
public void testGetWeight() { assertEquals(2, item.getWeight(), 0.01); }
[ "public void testWeight() {\n assertTrue(mTestItem.getWeight() == 0);\n mTestItem.setWeight(123);\n assertTrue(mTestItem.getWeight() == 123);\n }", "public int getWeight(Item item) {\n\t\treturn weight.get(item);\n\t}", "public int getItemWeight()\n {\n return weight;\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test getFileBytesIterator(String, String) method, if an exception occurs while performing the operation, throw FilePersistenceException.
public void testGetFileBytesIteratorFilePersistenceException() { assertNotNull("setup fails", filePersistence); try { filePersistence.getFileBytesIterator(VALID_FILELOCATION, DIRNAME); fail("if an exception occurs while performing the operation, throw FilePersistenceException...
[ "public void testNextBytesFilePersistenceException() {\r\n BytesIterator iterator = new InputStreamBytesIterator(new MockInputStream(), 10);\r\n try {\r\n iterator.nextBytes();\r\n fail(\"if an exception occurs while performing the operation, throw FilePersistenceException\");\r\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
performAction implementation: ask to the player which weapon he want to discard
@Override public Event performAction(RemoteView remoteView) { return remoteView.weaponDiscardChoice(getWeapons()); }
[ "public abstract Result attack(Weapon weapon);", "public static void attackSelectorPlayer(Player play, Entity enemy) {\r\n\t\tSystem.out.println(\"Choose your action: Enter number of choice\");\r\n\t\t@SuppressWarnings(\"unused\")\r\n\t\tint resp; // user response\r\n\t\tswitch(play.getType()) {\r\n\t\tcase \"Fi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Recursive helper method which returns a String representation of the BST rooted at current. An example of the String representation of the contents of a MovieTree is provided in the description of the above toString() method.
protected static String toStringHelper(BSTNode<Movie> current) { String stringy = ""; if(current == null) { return ""; } stringy = stringy + toStringHelper(current.getLeft()); stringy = stringy + current.getData().toString() + "\n"; stringy = stringy + toStringHelper(curr...
[ "public String toStringTreeFormat() {\r\n \tStringBuilder s = new StringBuilder();\r\n \tpreOrderPrint (root, 0, s);\r\n \treturn s.toString();\r\n }", "public String toTreeString() {\n return toTreeString(overallRoot);\n }", "public String treeToString() {\n\t\treturn treeToString(false);\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the value of the PriorPremiums_amt field.
@gw.internal.gosu.parser.ExtendedProperty public java.math.BigDecimal getPriorPremiums_amt() { return (java.math.BigDecimal)__getInternalInterface().getFieldValue(PRIORPREMIUMS_AMT_PROP.get()); }
[ "@gw.internal.gosu.parser.ExtendedProperty\n public java.math.BigDecimal getPriorPremiums_amt() {\n return (java.math.BigDecimal)__getInternalInterface().getFieldValue(PRIORPREMIUMS_AMT_PROP.get());\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public gw.pl.currency.MonetaryAmount getPriorPremiums() ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Moves a hero to a point
public void moveToPoint(int x, int y) { /** * DO NOT EDIT THIS CODE TO REMOVE DUPLICATIONS IT WILL BREAK MULTIPLAYER * SERIOUSLY JUST DO NOT DO IT * * DON'T DO IT * * * JUST DON'T TOUCH THIS CODE AT ALL */ AbstractHero hero = map.ge...
[ "void moveHero(int x, int y) {\n setOnTile(heroC.getX(), heroC.getY(), false);\n // vector needed to aim\n setVector(x, y, heroC);\n setLastXYArray(heroC);\n //Log.i(\"dan\", \"SET VECTOR TO : \" + heroC.getVector());\n creatures.get(0).setX(x);\n creatures.get(0).se...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the ID of the "basic authentication" secret stored in Sources.
Long getBasicAuthenticationSourcesId();
[ "void setBasicAuthenticationSourcesId(Long basicAuthenticationSourcesId);", "public String getBasicAuthKey() {\n String token = this.userInfo.getUserName() + \":\" + userInfo.getPassword();\n byte[] tokenBytes = token.getBytes(StandardCharsets.UTF_8);\n String encodedToken = new String(Base64...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Setter for row height settings.
public Row setHeight(String height) { if (jsBase == null) { this.height = null; this.height1 = null; this.height = height; } else { this.height = height; if (!isChain) { js.append(jsBase); isChain = ...
[ "public void setRowHeight(double height) {\n setBarHeight(height);\n }", "protected void setRowHeight (int rowHeight ){\r\n\t\tcancelEditing(tree);\r\n\t\tif(treeState != null) {\r\n\t\t\ttreeState.setRowHeight(rowHeight);\r\n\t\t\tupdateSize();\r\n\t\t}\r\n\t}", "public void setRowHeight(int rowHeig...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the applicationSecurityGroups property: Application security groups in which the private endpoint IP configuration is included.
public PrivateEndpointPropertiesInner withApplicationSecurityGroups( List<ApplicationSecurityGroupInner> applicationSecurityGroups) { this.applicationSecurityGroups = applicationSecurityGroups; return this; }
[ "public VirtualMachineScaleSetUpdateIpConfigurationProperties withApplicationSecurityGroups(\n List<SubResource> applicationSecurityGroups) {\n this.applicationSecurityGroups = applicationSecurityGroups;\n return this;\n }", "public List<ApplicationSecurityGroupInner> applicationSecurityGr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Subnetwork Aggregated Data by (a) componentId for UI mostly (b) subnetId (c) List of subnet Ids (d) List of Tags
CloudSubNetworkAggregatedResponse getSubNetworkAggregatedData (String componentIdString);
[ "Collection<CloudSubNetwork> getSubNetworkDetailsByComponentId (String componentIdString);", "int getSubnetId();", "public List<VerticalServiceInstance> getVsInstancesFromNetworkSliceSubnet(String sliceSubnetId) {\n\t\tList<VerticalServiceInstance> vsiWithNsi = vsInstanceRepository.findAll().stream()\n\t\t\t\t....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Brings up the "dialpad chooser" UI in place of the usual Dialer elements (the textfield/button and the dialpad underneath). We show this UI if the user brings up the Dialer while a call is already in progress, since there's a good chance we got here accidentally (and the user really wanted the incall dialpad instead). ...
private void showDialpadChooser(boolean enabled) { // Check if onCreateView() is already called by checking one of View objects. if (!isLayoutReady()) { return; } if (enabled) { // Log.i(TAG, "Showing dialpad chooser!"); if (mDigitsContainer != null) ...
[ "private void addDialInInfo() {\n\t\tif(ConferenceGlobals.showPhoneInfo )\n\t\t{\n\t\t\t\tconsoleLayout.addWidgetToID(\"dailinfo\", new Label(UIStrings.getTollInfoLabel()));\n\t\t\t\tconsoleLayout.addWidgetToID(\"confid\", new Label(UIStrings.getAttendePasscodeLabel()));\t\t\n\t\t\t\n\t\t\t\tLabel internToll = new ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Determines whether or not this abstract planner matches a specification.
@Override public synchronized boolean matches(Specification<? extends FactoryProduct> specification) { boolean matches = false; if ((null != specification) && specification.getId().equals(this.getId()) && (specification.getProperties() instanceof AbstractPlannerProperties)) { AbstractPlannerPropertie...
[ "public abstract boolean matches(CurveSpecification curveSpec);", "public boolean matches(final LiveDataSpecification liveDataSpec) {\n return getFullyQualifiedLiveDataSpecification().equals(liveDataSpec);\n }", "public abstract boolean isMatched();", "public boolean matches()\n\t{\n\t\treturn matcher.mat...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
//GENEND:|432getter|2| //GENBEGIN:|435getter|0|435preInit Returns an initiliazed instance of itemCommand26 component.
public Command getItemCommand26() { if (itemCommand26 == null) {//GEN-END:|435-getter|0|435-preInit // write pre-init user code here itemCommand26 = new Command("Acerca de...", Command.ITEM, 0);//GEN-LINE:|435-getter|1|435-postInit // write post-init user code here }/...
[ "public Command getItemCommand27() {\n if (itemCommand27 == null) {//GEN-END:|438-getter|0|438-preInit\n // write pre-init user code here\n itemCommand27 = new Command(\"Atras\", Command.ITEM, 0);//GEN-LINE:|438-getter|1|438-postInit\n // write post-init user code here\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the validationData property: Validation data inputs.
public Forecasting withValidationData(MLTableJobInput validationData) { this.validationData = validationData; return this; }
[ "public void setDataValidation(String dataValidation);", "public ValidationData getValidationData() {\n return validationData;\n }", "public void setValidationValue() {\n\n\t}", "@Override\n\tpublic void setValidationDate(Date validationDate) {\n\t\t_pathologyData.setValidationDate(validationDate);\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create an AnnotatedPrivateKey with a single annotation using AnnotatedPrivateKey.LABEL as a key.
public static AnnotatedPrivateKey annotate(PrivateKey privKey, String label) { return new AnnotatedPrivateKey(privKey, label); }
[ "PrivateKey getPrivateKey();", "private static PrivateKey generatePrivateKey(byte[] encodedPrivateKey) {\n try {\n return KeyFactory.getInstance(\"RSA\").generatePrivate(new PKCS8EncodedKeySpec(encodedPrivateKey));\n } catch (Exception e) {\n System.out.println(\"Error on gener...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
For accepted, either returns null or a ChabuConnectionAcceptInfo with code set to 0.
public ChabuConnectionAcceptInfo isAccepted( ChabuSetupInfo local, ChabuSetupInfo remote );
[ "public Integer getAcceptedAchCount() {\n return acceptedAchCount;\n }", "public void setAcceptedAchCount(Integer acceptedAchCount) {\n this.acceptedAchCount = acceptedAchCount;\n }", "public String getAccept() {\n return this.accept;\n }", "public String getAccept_no() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Tests containsFavorite with a one element list. Also exercises isFavorite and toggleFavorite. Prerequisites: Set of favorites is empty Procedure: 1. Add 1 PwPair to list 2. Verify list does not contain favorite 3. Add site used for PwPair to favorites 4. Verify list contains favorite
@Test public void testContainsFavoriteOneItem() throws Exception { String siteUrl = siteUrls.get(0); List<PwPair> pairs = new ArrayList<>(); pairs.add(new PwPair(null, new PwsResult("", siteUrl))); Assert.assertFalse(Utils.containsFavorite(pairs)); Utils.toggleFavorite(siteUrl); Assert.assertT...
[ "@Test\n public void testContainsFavoriteTwoItems() throws Exception {\n String siteUrl = siteUrls.get(0);\n List<PwPair> pairs = new ArrayList<>();\n pairs.add(new PwPair(null, new PwsResult(\"\", siteUrl)));\n pairs.add(new PwPair(null, new PwsResult(\"\", siteUrls.get(1))));\n Assert.assertFalse(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Attempts to find the EJBean with a given Primary Key from the persistent storage.
public String ejbFindByPrimaryKey(String pk) throws ObjectNotFoundException { log("ejbFindByPrimaryKey (" + pk + ")"); Connection con = null; PreparedStatement ps = null; try { con = getConnection(); ps = con.prepareStatement("select bal from ejbAccounts where id = ?"); ...
[ "public EventEntityPK ejbFindByPrimaryKey(EventEntityPK pk) throws FinderException {\n\t\ttry {\n\t\t\tConnection connection = Util.getInstance().getConnection();\n\t\t\ttry {\n\t\t\t\tPreparedStatement statement = connection.prepareStatement(\"SELECT pk FROM Event WHERE pk = ?\");\n\t\t\t\ttry {\n\t\t\t\t\tstateme...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the value of the valorBinario property.
public byte[] getValorBinario() { return valorBinario; }
[ "public void setValorBinario(byte[] value) {\n this.valorBinario = value;\n }", "public ByteArray getBin() {\n return bin;\n }", "public String getBin() {\n return bin;\n }", "public java.lang.String getBin() {\r\n return bin;\r\n }", "public byte[] getBinaryValue() {\n th...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks whether the 'var123' field has been set.
public boolean hasVar123() { return fieldSetFlags()[124]; }
[ "public boolean hasField123() {\n return fieldSetFlags()[123];\n }", "public boolean hasVar112() {\n return fieldSetFlags()[113];\n }", "public boolean hasVar131() {\n return fieldSetFlags()[132];\n }", "public boolean hasVar231() {\n return fieldSetFlags()[232];\n }", "publi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "cp_term_symbol" $ANTLR start "function" /home/matthias/src/netbeans/ide/css.lib/src/org/netbeans/modules/css/lib/Css3.g:951:1: function : functionName ( ws )? LPAREN ( ws )? ( fnAttributes |) RPAREN ;
public final void function() throws RecognitionException { try { dbg.enterRule(getGrammarFileName(), "function"); if ( getRuleLevel()==0 ) {dbg.commence();} incRuleLevel(); dbg.location(951, 0); try { // /home/matthias/src/netbeans/ide/css.lib/src/org/netbeans/modules/css/lib/Css3.g:952:2: ( functionName ...
[ "Rule Function() {\n // Push 1 FunctionNode onto the value stack\n StringVar functionName = new StringVar(\"\");\n return Sequence(\n Optional(\"oneway \"),\n FunctionType(),\n Identifier(),\n actions.pop(),\n ACTION(fun...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Changes this class's type parameters.
public void setTypeParameters(TypeParameterListNode typeParameters);
[ "public void alterType(AttrType newType) { type = newType; }", "void setClassType(String classType);", "void setType(Type t);", "protected void adjustTypeAttributes() {\n /// Override to alter attributes.\n }", "public void setOriginalType(JavaClass type) {\r\n originalType = type;\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Spring Data ElasticSearch repository for the Cr_element entity.
public interface Cr_elementSearchRepository extends ElasticsearchRepository<Cr_element, Long> { }
[ "public interface OrderConsigneeSearchRepository extends ElasticsearchRepository<OrderConsignee, Long> {\n}", "public interface ChemicalsSearchRepository extends ElasticsearchRepository<Chemicals, Long> {\n}", "public interface Cr_objet_craftSearchRepository extends ElasticsearchRepository<Cr_objet_craft, Long>...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the mapping code for a given character. The mapping codes are maintained in an internal char array named soundexMapping, and the default values of these mappings are US English.
private char getMappingCode(char c) { if (!Character.isLetter(c)) { return 0; } else { return soundexMapping[Character.toUpperCase(c) - 'A']; } }
[ "protected char map(char c) {\r\n int index = findFromIndex(c);\r\n if(index < 0) return c;\r\n return toChars[index];\r\n }", "public abstract char mapChar(char c);", "public static int getIndexFromChar(Character c){\n\t\treturn charToIndexMap.get(c);\n\t}", "public String soundex(Str...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Translates one or more (non) transient Vaadin sort orders to OCS sort orders
@SafeVarargs public static com.ocs.dynamo.dao.SortOrder[] translateSortOrders(SortOrder<?>... originalOrders) { if (originalOrders != null && originalOrders.length > 0) { final com.ocs.dynamo.dao.SortOrder[] orders = new com.ocs.dynamo.dao.SortOrder[originalOrders.length]; for (int i...
[ "Map<String, org.springframework.batch.item.database.Order> genBatchOrderByFromSort(TableFields tableFields, Sort sort);", "io.dstore.values.StringValue getOrderBy();", "public void changeSortOrder();", "io.dstore.values.StringValueOrBuilder getOrderByOrBuilder();", "String getOrdering();", "public void s...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Converts seconds to ticks.
public static int toTicks(float seconds) { return Math.round(seconds * ReferenceConfig.TARGET_UPS); }
[ "public static String convertTicksToSecondsString(long ticks) {\n return String.format(\"%.2fs\", (double) (ticks / 20) + 0.05D * (ticks % 20));\n }", "protected long secondsToNanoseconds(double seconds) {\n\n\treturn (long)(seconds * ONE_SECOND);\n }", "public TimeConverter (int sec)\r\n {\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Setter method for manager.
public void setManager(Manager aManager) { manager = aManager; }
[ "public void setManager(Manager manager);", "public void setManager ( Object manager ) {\r\n\t\tgetStateHelper().put(PropertyKeys.manager, manager);\r\n\t\thandleAttribute(\"manager\", manager);\r\n\t}", "@Override\n public void setToBeManager() throws RemoteException {\n this.isManager = true;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
bitfinex tick event consumer
public void onTickEvent(BiConsumer<BitfinexTickerSymbol, BitfinexTick> consumer) { this.tickConsumer = consumer; }
[ "public void tick() {}", "void tick(long tickSinceStart);", "public abstract void tick();", "private void tick() {\n Log.enter();\n Log.write(\"[:Timer].tick()\");\n Log.exit();\n }", "void tick(H host, int systemTick);", "void applyTick(int tick);", "private void tick(){\n time++;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the expectedDateOfDelivery value for this ReferenceNumberResponse.
public java.util.Date getExpectedDateOfDelivery() { return expectedDateOfDelivery; }
[ "public Date getExpectedDeliveryDate() {\n return expectedDeliveryDate;\n }", "public void setExpectedDateOfDelivery(java.util.Date expectedDateOfDelivery) {\r\n this.expectedDateOfDelivery = expectedDateOfDelivery;\r\n }", "com.google.protobuf.Int64Value getDeliveryDateBefore();", "com.go...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Build call for getBudgetsBySeller
public okhttp3.Call getBudgetsBySellerCall(String sellerId, String authorization, String status, Boolean withBalance, Boolean withSpend, OffsetDateTime endAfterDate, OffsetDateTime startBeforeDate, Integer campaignId, String type, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null...
[ "ImmutableList<SchemaOrgType> getSellerList();", "public okhttp3.Call getSellerBudgetsCall(String authorization, String status, Boolean withBalance, Boolean withSpend, OffsetDateTime endAfterDate, OffsetDateTime startBeforeDate, Integer campaignId, String sellerId, String type, Integer advertiserId, final ApiCall...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add the given resource to this JsonLd object using the resourceId as key.
public void put(String resourceId, JsonLdResource resource) { this.resourceMap.put(resourceId, resource); }
[ "public void addResource(TIdentifiable resource) {\r\n // make sure that the resource doesn't exists already\r\n\t if (resourceExists(resource)) return;\t \r\n\t \r\n // check to see if we need to expand the array:\r\n\t if (m_current_resources_count == m_current_max_resources) expandTable...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }