query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
Banning a Member from a channel
public void ban(Player player, String channelName) { if (isAdmin(player, channelName)) { List<Player> admins = new ArrayList<Player>(); for (Player admin : channelAdmins.get(channelName)) { admins.add(admin); } admins.remove(player); if (admins.isEmpty()) { channelAdmins....
[ "@AdminAction(@Permission(module = \"adminMemberAccess\", operation = \"changeChannelsAccess\"))\n @BrokerAction(@Permission(module = \"brokerMemberAccess\", operation = \"changeChannelsAccess\"))\n @PathToMember(\"\")\n Member changeMemberChannelsAccess(final Member member, final Collection<Channel> chann...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Convert an array into a puzzle string
static private String toPuzzleString(int[] puz) { StringBuilder buf = new StringBuilder(); for (int element : puz) { buf.append(element); } return buf.toString(); }
[ "private String stringArrayToString(String[][] array) {\n\n StringBuilder sb = new StringBuilder();\n for (int x = 0; x < array.length; x++) {\n for (int y = 0; y < array[0].length; y++) {\n sb.append(array[x][y]);\n sb.append(\" \");\n }\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
sdet_nigvdescu_pric numeric Almacena el valor del IGV con descuento
public BigDecimal getSdetNigvdescuPric() { return sdetNigvdescuPric; }
[ "public void setSdetNigvdescuPric(BigDecimal sdetNigvdescuPric) {\n\t\t\tthis.sdetNigvdescuPric = sdetNigvdescuPric;\n\t\t}", "public String getVincoloDesc() {\n\t\treturn this.vincoloDesc;\n\t}", "public BigDecimal getSdetNdiscountValuePric() {\n\t\t\treturn sdetNdiscountValuePric;\n\t\t}", "public BigDecima...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Metodo che inserisce una categoria nel Database
@Override public int doInsert(Categoria categoria) { try { Connection con = DriverManagerConnectionPool.getConnection(); try { PreparedStatement prst = con.prepareStatement(doInsertQuery); prst.setString(1, categoria.getNome()); prst.se...
[ "void guardar( Categoria categoria );", "int insertFaqCategory(FaqCategory data) throws Exception;", "private void populaObjetivoCat()\n {\n objetivoCatDAO.insert(new ObjetivoCat(\"Hipertrofia\", \"weight\"));\n objetivoCatDAO.insert(new ObjetivoCat(\"Saude\", \"apple\"));\n objetivoCatD...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Initialize an array of size 'n'. All coordinates are set to (0, 0) by default.
public Coordinates(int n) { this.n=n; this.pos=new int[2][n]; }
[ "public static <T> Array<T> ofSize(int n)\n {\n Array<T> out = new Array<>(n);\n out.ensureSize(n);\n return out;\n }", "public Matrix(int n) {\n\t\tsize = n;\n\t\tm = new int[size][size];\n\t}", "public VectorN(int n) {\n\t\tthis.length = n;\n\t\tthis.x = new double[n];\n\t\tfor (int...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get a container for the item stack if possible, else null.
public static @Nullable Container getContainer(ItemStack item) { ItemMeta itemMeta = item.getItemMeta(); if (!(itemMeta instanceof BlockStateMeta)) { return null; } BlockState itemState = ((BlockStateMeta) itemMeta).getBlockState(); if (!(itemState instanceof Contain...
[ "public Class<? extends Container> getContainer()\n {\n return null;\n }", "public abstract Container getTopContainer();", "Container getContainer();", "private static IContainer getContainer( final IResource resource ) {\n return ( resource instanceof IContainer ) ? ( IContainer )resource\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sends a message to a reply queue. Tries to reuse a channel and only opens a new one if the old one was closed.
void replyToQueue(Object message, boolean persistent, String correlationId, String replyTo) throws IOException;
[ "protected void reply(Message replyMessage, ChannelHandlerContext ctx) {\n //messageGateway.sendMessage(replyMessage, ctx);\n }", "void reply(String message)\n {\n markRead();\n _replyMessage = message;\n// _replyTime = System.currentTimeMillis();\n }", "public void sendRepl...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns all the reports ordered by report group.
public List<DynamicReport> findAllReportsOrderByReportGroup() { Map<String, Object> map = new HashMap<String, Object>(); List<DynamicReport> list = findByNamedQuery("jpql.report.findAllReportsOrderByReportGroup", map); if (list == null || list.size() == 0) return null; return list; }
[ "public List<Report> getAllReports()\n\t{\n\t\tfinal SQLiteDatabase readableDatabase = this.dbHelper.getReadableDatabase();\n\t\tfinal Cursor cursor = readableDatabase.query(TABLE_NAME_REPORT,null, null, null, null, null, _ID + \" DESC\");\n\t\tList<Report> reportList = this.getListFromCursor(cursor);\n\n\t\treadab...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the most paying line
public int getbestline() { int i=0; int biggest=0; int keep_track=0; while(i < amount.length) { if(Faucets.amount[i] > biggest) { biggest = Faucets.amount[i]; keep_track = i; } i+=1; } System.out.println("Keep_Track = \"" + keep_track + "\""); return keep_track; }
[ "int getMaxChargeInPence();", "public int getMaxTotalCost();", "public Batsman getBatsmanWithHighestStrikingRate() throws IPLAnalyserException {\n checkEmptyList(batsmanList);\n Comparator<Batsman> batsmanComparator = Comparator.comparing(Batsman::getStrikeRate).reversed();\n return sortLis...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method sets the field tableManagement.
@Inject public void setTableManagement(Tablemanagement tableManagement) { this.tableManagement = tableManagement; }
[ "public void setTableMgr(TableMgr tablMgr);", "void setTables(Object tables);", "public TableManagement() {\n folder= TableComposite.getTabFolder();\n tables = TableComposite.getTables();\n }", "public void setHardwareTable(UIExtendedDataTable hardwareTable) {\r\n\t\tthis.hardwareTable = hard...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Compares this object to the given other object. The type of comparison is given by the operator.
default boolean compare(Operator op, ISqlObject other) { if (this instanceof ConstantSqlObject && other instanceof ConstantSqlObject && (op == Operator.EQ || op == Operator.NE)) { ConstantSqlObject lhs = (ConstantSqlObject) this; ConstantSqlObject rhs = (C...
[ "public Item compareItem(\n Item other,\n ComparisonExpression.ComparisonOperator comparisonOperator,\n ExceptionMetadata metadata\n ) {\n // Subclasses should override this method to perform additional typechecks,\n // and then invoke it on super.\n switch (...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Patches this PersonAnnotation with a source
@Nullable public PersonAnnotation patch(@Nonnull final PersonAnnotation sourcePersonAnnotation) throws ClientException { return send(HttpMethod.PATCH, sourcePersonAnnotation); }
[ "@Nonnull\n public java.util.concurrent.CompletableFuture<PersonAnnotation> patchAsync(@Nonnull final PersonAnnotation sourcePersonAnnotation) {\n return sendAsync(HttpMethod.PATCH, sourcePersonAnnotation);\n }", "protected void set_source(Object source) { this.source = source; }", "public static v...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the dateFormed value for this Account.
public void setDateFormed(java.lang.String dateFormed) { this.dateFormed = dateFormed; }
[ "public void setDate(DsDate date) {\n m_Date = date;\n }", "public void setDate (Date newDate) {\r\n this.dateAttempt = newDate;\r\n }", "public void setConsentGivenDate(final Date value)\n\t{\n\t\tsetConsentGivenDate( getSession().getSessionContext(), value );\n\t}", "public void setDoneDate(Da...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Meta information about the generation process.
public interface Meta<A, B> { /** * The model that was sent to the generator. * @return the model */ A getModel(); /** * The result that was produced by the generator. * @return the model */ B getResult(); /** * The transform that was used to produ...
[ "private void printMetaData() {\n\n\t\tdebugLogger.info(\"Job ID: \" + this.jobID);\n\t\tdebugLogger.info(\"Job Name: \" + this.jobName);\n\t\tdebugLogger.info(\"Output Data Directory: \" + this.outputDir);\n\t\tdebugLogger.info(\"Query File Path: \" + this.queryFilePath);\n\t\tdebugLogger.info(\"Result File Path: ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets value as the attribute value for the calculated attribute DepartmentNameDiff.
public void setDepartmentNameDiff(String value) { setAttributeInternal(DEPARTMENTNAMEDIFF, value); }
[ "public void setDepartmentName(String value) {\r\n setAttributeInternal(DEPARTMENTNAME, value);\r\n }", "public void setDepartmentName(String value)\n {\n departmentName = value;\n }", "public String getDepartmentNameDiff() {\r\n return (String)getAttributeInternal(DEPARTMENTNAMEDI...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add Device Create a device
@Test public void addDeviceTest() throws ApiException { Device device = null; // DeviceEnvelope response = api.addDevice(device); // TODO: test validations }
[ "Device addDevice(Device device);", "org.hl7.fhir.Device addNewDevice();", "@Test\n public void createDeviceTest() throws ApiException {\n String collectionId = null;\n Device body = null;\n Device response = api.createDevice(collectionId, body);\n\n // TODO: test validations\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Send data over connected ComPort.
public void send(String data) throws IOException { if (data == null || data.isEmpty()) return; if (!isConnected()) throw new IOException("Unable to send data - no port connected."); OutputStream out = connectedPort.getOutputStream(); try { if (data.length() == 1)...
[ "final void sendData()\n {\n sendData( this.serialInputTextField.getText() );\n }", "private void sendData() {\n String msg = TX_message.getText().toString();\n msg += (char) TXRX_delimiter; // Append delimiter character\n try {\n outStream.write(msg.getBytes());\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a JavaClass for given class name.
public JavaClass getJavaClassForName(String aClassName) { // Get from Classes cache and just return if found JavaClass javaClass = _classes.get(aClassName); if (javaClass != null) return javaClass; // Otherwise lookup Class for name Class<?> cls = getClassForName...
[ "public static Class<?> fromName(String name) {\n return name2Class.get(name);\n }", "public static Class<?> getClass(String className) {\n try {\n return PigContext.resolveClassName(className);\n } catch (IOException e) {\n throw new RuntimeException(\"Could not instantiate \" + classNa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the 'field430' field
public com.maxpoint.cascading.avro.TestExtraLarge.Builder setField430(java.lang.CharSequence value) { validate(fields()[430], value); this.field430 = value; fieldSetFlags()[430] = true; return this; }
[ "public void setField430(java.lang.CharSequence value) {\n this.field430 = value;\n }", "public void setField420(java.lang.CharSequence value) {\n this.field420 = value;\n }", "public void setField431(java.lang.CharSequence value) {\n this.field431 = value;\n }", "public com.maxpoint.cascading.avr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sends the given String via the GPIB bus to the Instrument specified in Open and returns the number of bytes actually sent. If Msg is empty, the method returns immediately. The character set specified in the iC.properties (ISO88591) is used to convert between Msg and the stream of bytes (byte[] using String.getBytes. NO...
protected long Send(String Msg) throws IOException { // do nothing if Msg is empty. This is required because // Device.invokeGenericScriptMethod uses QueryInstrument("") to query the // Instrument, and if NLend is selected, a \n is added and sent to the // Instrum...
[ "public void sendISO8583Message(ISO8583TCPMessage msg) {\n \tSystem.out.println(\"Request: \" + msg.toString());\n\t\tchannelHandlerContext.writeAndFlush(msg.toString());\n\t}", "private void send(){\n\t\tString msg = input.getText();\n\t\ttry{\n\t\t\t//displayOutput(msg);\n\t\t\tstreamOut.writeUTF(msg);\n\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Condition 2 of rule constrainInterpretation01_PATH_2_GOAL_7_COMPONENT_txtParcela2_19. The original expression was: action.getGoal().getId().equals(7)
private boolean constrainInterpretation01_PATH_2_GOAL_7_COMPONENT_txtParcela2_19_cond_2() { return (module_entity_Action_1.getGoal().getId().equals(7)); }
[ "private boolean constrainInterpretation02_PATH_2_GOAL_7_COMPONENT_txtParcela2_20_cond_2() {\r\n return (module_entity_Action_1.getGoal().getId().equals(7));\r\n }", "private boolean constrainInterpretation01_PATH_1_GOAL_2_COMPONENT_txtOp_4_cond_2() {\r\n return (module_entity_Action_1.getGoal()....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the items in the specified list mode category.
Collection<ChannelListModeItem> getListModeItems(char mode);
[ "public Vector getItemsByCategory(int category);", "java.util.List<String> getAppCategoryList();", "List<? extends HasListBox> getCodeListsForCategory(String category);", "CodeOrNullListType getCategoryList();", "public TaskApparatus.ListCategory getListCategory() {\n\t\treturn findListCategory(m_selectedLi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of scenario description file name.
void setScenarioDescriptionFileName(String fileName);
[ "public void setFiledesc(String filedesc) {\n this.filedesc = filedesc;\n }", "public void setFileName( String name ) {\n\tfilename = name;\n }", "public void setFileName (String FileName);", "void setGameDescription(String gameDescription);", "public static void specifyTestCaseName(String test...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns true if the URI or URL argument given at construction time was valid, false otherwise.
public boolean isValid() { return (uri != null && url != null); }
[ "boolean isSetURI();", "private boolean isValid(){\n\n boolean isValid = false;\n String url = longURL.getText().toString();\n\n //ensure field is not empty\n if (url.isEmpty()) {\n\n createDialog(\"Missing Destination URL field, please fill in field and try again.\");\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
CLLocationDistance! //product are grouped and display according to this distance in meters
public Double getDistanceProduct() { return distanceProduct;}
[ "public double getDistance(){\n\t\treturn TotalDistance;\n\t}", "private void getDistance() {\n\n float dist = 0;\n Location location = \n locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);\n while (location==null) { //If we don't know where we are right now\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Purpose: The purpose of this method is to write a positive integer backwards. Preconditions: The method is passed a valid integer >= 0. Postconditions: The integer is written out backwards.
public static void writeIntegerBackwards(int n) { if (n<10) System.out.println(n); else { //find out what the right most digit is int rightDigit = (n % 10); //write that digit out to the screen System.out.print(rightDigit); //and no...
[ "public void backward (int n)\n {\n if (n == 0)\n backward();\n else\n synchronized (remote.out)\n {\n try\n {\n remote.out.writeByte(METHOD_JOSX_VISION_RCX_BACKWARD_I);\n remote.out.writeByte(n);\n }\n catch...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Log.d(TAG, "Image successfully loaded");
@Override public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) { }
[ "public void onLoadingComplete(Image image);", "void onImageLoadDone(int pos, boolean isSuccess);", "void onImageLoadStart(int pos);", "void onImagesLoaded();", "public void onLoadImage();", "public void onLoadImageError();", "public void loadImage(int id, String url, ImageView iw){\n String name...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Unsets the "timeStamp" attribute
public void unsetTimeStamp() { synchronized (monitor()) { check_orphaned(); get_store().remove_attribute(TIMESTAMP$36); } }
[ "public void unsetTimestamp()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_attribute(TIMESTAMP$28);\n }\n }", "public void unsetTimestamp()\n {\n synchronized (monitor())\n {\n check_orphaned();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new Portfolio.
PortfolioInterface createPortfolio(String name);
[ "public void createPortfolio() {\r\n\t\tArrayList<TitleDeed> emptyPortfolio = new ArrayList<>(0); // empty array list\r\n\t\tPortfolio portfolio = new Portfolio(emptyPortfolio);\r\n\t\tsetPlayerPortfolio(portfolio);\r\n\t}", "void createPortfolio(String name);", "protected void createNewPortfolio(String name) {...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieves a list of contact request types.
@WebMethod(operationName = "WEBContactRequestGetRequestTypes", action = "http://www.avectra.com/2005/WEBContactRequestGetRequestTypes") @WebResult(name = "WEBContactRequestGetRequestTypesResult", targetNamespace = "http://www.avectra.com/2005/") @RequestWrapper(localName = "WEBContactRequestGetRequestTypes", ...
[ "public LinkedList<Class<? extends RequestContent>> getAllRequestsTypes() {\r\n\t\treturn this.currentStrategy.getAllRequestTypes();\r\n\t}", "public String getAllContactsTypes() {\n\t\treturn \"SELECT * FROM CONTACTSTYPES\";\n\t}", "public String[] getSupportedRequestTypes()\n {\n return new String[] { ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This test makes sure that the Cloudwatch Log event is split, and that metadata like owner, log group and log stream are added to the each item, when the environment variable 'split' is set to true
@Test public void shouldSplitEvents() throws Exception { injectEnvironmentVariable("bucket_name", "somebucket"); injectEnvironmentVariable("split", "true"); CloudWatchPutRequest awsCloudWatchEvent = mapper.readValue(awsLogsEvent, CloudWatchPutRequest.class); CloudWatchLogEvents pay...
[ "public void testSplitParallelOldCompactingEventLogging() {\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset28.txt\");\n GcManager gcManager = new GcManager();\n File preprocessedFile = gcManager.preprocess(testFile, null);\n g...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
print the Config_AuctionServer.txt file This file sets up the basic parameters for the server.
protected void printServerConfig(){ /*String filePrefix = System.getProperty("user.dir")+"/src/server/"+gameName; File gameFolderServ = new File(filePrefix); String filePrefix2 = System.getProperty("user.dir")+"/src/auctions/"+gameName; File gameFolderAuct = new File(filePrefix2); File server_config = new Fi...
[ "public void printConfig() {\n\t\tProperty props = Property.getInstance();\n\t\tSystem.out.println(\"You are using the following settings. If this is correct, \"\n\t\t\t\t+ \"you do not have to do anything. If they are not correct, please alter \" + \"your config files.\");\n\t\tString[] importantSettings = new Str...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The corresponding productID is added to a separate ArrayList to store which item the user selects in a GlobalState object.
public void updateProductIds(String productID){ productIds.add(productID); }
[ "public void addProductToHomeProductList(int productId);", "public void getProducts(String eId){\n // invoke getProductsById from ProductDatabse and assign products, productIds and productNames\n products = myDb.getProductsById(eId);\n productIds = new ArrayList<Integer>();\n ArrayList...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the TranscriptionGateway this CallControl uses to create TranscriptionGatewaySession's
public void setTranscriptionGateway(TranscriptionGateway transcriptionGw) { this.transcriptionGateway = transcriptionGw; }
[ "public TranscriptionGateway getTranscriptionGateway()\n {\n return transcriptionGateway;\n }", "public void setGateway(T gateway) {\n\t\tm_gateway = gateway;\n\t}", "public synchronized void setTelGateway(SipURI uri) {\n\t\ttel_gateway=uri;\n\t}", "public void setUserDataGateway(UserDataGateway ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column ac_comments.ac_comments_seneitive
public void setAcCommentsSeneitive(String acCommentsSeneitive) { this.acCommentsSeneitive = acCommentsSeneitive == null ? null : acCommentsSeneitive.trim(); }
[ "@Override\n public void setComments(java.lang.String comments) {\n _entityCustomer.setComments(comments);\n }", "public void setAcCommentsId(Integer acCommentsId) {\n this.acCommentsId = acCommentsId;\n }", "public void setAcCommentsParent(Integer acCommentsParent) {\n this.acComm...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a usascii char sequence codec.
public static ICodec<CharSequence> us_ascii_sequence() { return c_provider.us_ascii_sequence(); }
[ "public static ICodec<String> us_ascii() {\n\t\treturn c_provider.us_ascii();\n\t}", "public ICodec<String> us_ascii();", "public ICodec<CharSequence> utf_8_sequence();", "public ICodec<String> utf_8();", "public ICodec<char[]> us_ascii_array();", "public static ICodec<char[]> us_ascii_array() {\n\t\tretu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test common ancestor of the current tree node and non existent tree node throws exception
@Test(expected = TreeNodeException.class) public void testCommonAncestorNonExistentNodeException() { assertFalse(root.contains(anotherNode)); node2.commonAncestor(anotherNode); }
[ "@Test(expected = TreeNodeException.class)\n public void testCommonAncestorCurrentNodeIsRootException() {\n root.commonAncestor(node1);\n }", "@Test(expected = TreeNodeException.class)\n public void testCommonAncestorNodeIsRootException() {\n node2.commonAncestor(root);\n }", "TreeNode...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method returns option pane message type constant.
public int getOptionPaneMessageType() { return optionPaneMessageType; }
[ "public String getOPTION_TYPE() {\r\n return OPTION_TYPE;\r\n }", "public String getMsgtype() {\n return msgtype;\n }", "public String getOptionType()\n\t{\n\t\treturn optionType;\n\t}", "public Integer getMessageType() {\n return messageType;\n }", "public String getMessageTyp...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column TRSPAYPLANDET_TENTATIVE_TEMP.MATURITY_ENTRY_POSTED_DATE
public void setMATURITY_ENTRY_POSTED_DATE(Date MATURITY_ENTRY_POSTED_DATE) { this.MATURITY_ENTRY_POSTED_DATE = MATURITY_ENTRY_POSTED_DATE; }
[ "public Date getMATURITY_ENTRY_POSTED_DATE() {\r\n return MATURITY_ENTRY_POSTED_DATE;\r\n }", "public void setFINAL_MATURITY_DATE(Date FINAL_MATURITY_DATE)\r\n {\r\n\tthis.FINAL_MATURITY_DATE = FINAL_MATURITY_DATE;\r\n }", "public void setFINAL_MATURITY_DATE(Date FINAL_MATURITY_DATE) {\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
add deleteStaffMember method to delete an existing staff member from staff.txt file. New addition
public void deleteStaffMember() { ArrayList<Staff> staffs = vc.getStaffs(); int id = 0; boolean isValidID = false; System.out.println("To delete any staff member, please enter the staff member ID: "); String input = getInput(); while(!isValidID) { if (isNumeric(input) == true...
[ "public void removeStaff(String StaffID);", "@Override\n public com.ext.portlet.model.StaffMember deleteStaffMember(long id)\n throws com.liferay.portal.kernel.exception.PortalException,\n com.liferay.portal.kernel.exception.SystemException {\n return _staffMemberLocalService.deleteSta...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the result of interpreting the object as an instance of 'DB2 Base Instance'. This implementation returns null; returning a nonnull result will terminate the switch.
public Object caseDB2BaseInstance(DB2BaseInstance object) { return null; }
[ "public Object caseWindowsDB2Instance(WindowsDB2Instance object) {\r\n\t\treturn null;\r\n\t}", "public Object caseDB2Instance(DB2Instance object) {\r\n\t\treturn null;\r\n\t}", "public Object caseUnixDB2Instance(UnixDB2Instance object) {\r\n\t\treturn null;\r\n\t}", "public Object caseDB2InstanceUnit(DB2Inst...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set up the parameters of the tournament : number of players, types of players, maps selection.
public void setUp() throws IOException { MapSelectionView mapSelectionView = new MapSelectionView(); playerNumber = mapSelectionView.print(4); //4 max players map.setPlayers(playerNumber); HashMap<Integer, String> possibleStrategies = new HashMap<Integer, String>(); possibleStrategies.put(1, "Aggressive");...
[ "private void setUpPlayers() {\n\n\t\tSystem.out.println(\"How many players?\");\n\n\t\tnumOfPlayers = Game.input.nextInt();\n\t\twhile (numOfPlayers > 6 || numOfPlayers < 2) {\n\t\t\tSystem.out.println(\"Sorry, player number must be 2-6\");\n\t\t\tnumOfPlayers = Game.input.nextInt();\n\t\t}\n\t\tfor (int i = 0; i ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Appends and returns a new empty "CrashHistory" element
org.landxml.schema.landXML11.CrashHistoryDocument.CrashHistory addNewCrashHistory();
[ "org.landxml.schema.landXML11.CrashHistoryDocument.CrashHistory getCrashHistory();", "void setCrashHistory(org.landxml.schema.landXML11.CrashHistoryDocument.CrashHistory crashHistory);", "protected void appendHistory() {\n\t\tString filePath = BigBrowser.getHistoryPath();\n\t\tFile f = new File(filePath);\n\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This is the default Art constructor.
public Art() { this.artist = "Michelangelo"; this.timePeriod = 1510; this.aesthetic = "High Renaissance"; this.size = "Enormous"; }
[ "public Artist() {\n\t\t\n\t}", "public ASCIIArtiste()\r\n {\r\n }", "public Song() {\n\t\tArtist nArt = new Artist(\"Johnny\", \"Bravo\");\n\t\tthis.mEnsemble = new Ensemble(nArt);\n\t\tthis.mTitle = \"Elegent\";\n\t\tthis.mYearReleased = 0001;\n }", "public Artist () {\n name = \"N/A\";\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ If one or more of the numbers is negative or greater than 300, the method prints an overall message that the group is invalid. In addition, for each invalid value, the method prints the score and a message why the score is invalid. The method returns a boolean value (true or false) as a signal indicating the validity...
public static boolean validGroup(int score1, int score2, int score3, PrintWriter myout){ boolean isVlaid; if (score1 > 300) { myout.println("Score 1: " + score1 + " is invalid because it is greater than 300."); isVlaid = false; } if (score1 < 0) { myou...
[ "public boolean isValid()\r\n\t{\r\n\t\tboolean valid = false;\r\n\t\t\r\n\t\tint actualMinOccur = getActualMinOccur(); \r\n\t\tint actualMaxOccur = getActualMaxOccur();\r\n\t\t\t\t\t\r\n\t\tvalid = (((actualMinOccur >= 0) && (actualMinOccur <= groupElements.size()))\r\n\t\t\t&& ((actualMaxOccur >= 0) && (actualMax...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns all the bookmarks entries where uuid = &63; and companyId = &63;.
public java.util.List<BookmarksEntry> findByUuid_C(String uuid, long companyId);
[ "public java.util.List<BookmarksEntry> findByCompanyId(long companyId);", "@Override\n\tpublic List<Bookmark> findByUuid_C(String uuid, long companyId) {\n\t\treturn findByUuid_C(\n\t\t\tuuid, companyId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);\n\t}", "public BookmarksEntry fetchByUuid_C_First(String uuid, ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Navigate to People and organisation page after adding new person
public PeopleAndOrg navigatePeopleAndOrg() { log.debug("Navigating to People and Organisation page"); ExplicitWait.waitTillClickable(peopleAndOrganisation, driver); peopleAndOrganisation.click(); return new PeopleAndOrg(driver); }
[ "public void navigateToOrganizationsPage()\r\n\t{\r\n\t\torganizationsLnk.click();\r\n\t\tWaitForElement(organizationsLnk);\r\n\t}", "public String gotoPageFinal() {\n PersonDTO personDTO = new PersonDTO(email, password, firstname, surname, ssn, availableFrom, availableTo, droppableCManager.getDroppedCompe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Focus to the selected marker. This method is being used both in Map Fragment and List Fragment
public void focusToSelectedMarker(final Marker marker) { selectedCluster = null; selectedMarker = marker; if (rlMapItemContainerFragment.getVisibility() == View.INVISIBLE) rlMapItemContainerFragment.setVisibility(View.VISIBLE); if (marker.isCluster()) { //selecte...
[ "public void focusToSelectedMarkerObs(Marker marker) {\n if (rlMapItemContainerFragment.getVisibility() == View.INVISIBLE)\n rlMapItemContainerFragment.setVisibility(View.VISIBLE);\n\n if (mContext.getActiveFragment() == MapActivity.ActiveFragment.MAP) {\n currentZoomLevel = mMap...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tool: Add taoKeeperStat to Map > taoKeeperStatMap
private void addStatToTaokeeperStatMap(Map<String, List<TaoKeeperStat>> taoKeeperStatMap, TaoKeeperStat taoKeeperStat) { if (null == taoKeeperStatMap) { taoKeeperStatMap = new HashMap<String, List<TaoKeeperStat>>(); } String server = StringUtil.trimToEmpty(taoKeeperStat.getServer()); if (StringUtil.isBlank...
[ "protected void addInfo(Status status){\n mapInfo.put(status.key,status);\n }", "void addTeamManagerMap(TeamManagerMap teamManagerMap);", "private void addMapKeys() {\n\t\tstatsRef.put(\"int\", getIntelligence());\n\t\tstatsRef.put(\"str\", getStrength());\n\t\tstatsRef.put(\"pre\", getPresence());\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The method to save a connection when there is NOT already an ID. saves to the db and adds the id to the object.
public void saveConnectionWrapperNewID(ConnectionWrapper c, Connection conn) throws SQLException { PreparedStatement ps = conn.prepareStatement(INSERT_CONNECTION_NEW_ID_SQL); ps.setString(1, c.getTitle()); ps.setString(2, c.getUrl()); ps.setString(3, c.getDriver()); ps.setString(4, c.getUsername()); ps.setS...
[ "void save(storage_server_connections connection);", "private void persistConnection(String parentPageId, Page character) throws SQLException {\n\t\ttry {\n\t\t\tfinal DbConnector db = new DbConnector();\n\n\t\t\tResultSet rs = db.executeQuery(SqlConstants.CONNECTION_EXISTS,\n\t\t\t\t\tArrays.asList(parentPageId,...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
return "YES" if T can be obtained by expanding S exactly once.
public String isPossible_Mine(String S, String T) { int index = T.indexOf(S); if (index == -1) return "No"; ArrayList<String> expansions = new ArrayList<String>(); for (int i = 0; i < S.length()-1; i++) { String prefix = S.substring(0, i+1); String s...
[ "boolean hasDupStar();", "boolean contains(Token[] t, Token[][] S) {\n\t\tfor (int i=0; i<S.length; i++) {\n\t\t\tif (equals(t, S[i])) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public boolean isSetS() {\n return this.s != null;\n }", "private static boolean RSTest(int R,int S) {\r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the elementwise substraction of two arrays.
public static double[] substract(double[] array1, double[] array2) { double[] out = new double[array1.length]; for (int i = 0; i < out.length; i++) out[i] = array1[i] - array2[i]; return out; }
[ "public static double[] minus(double[] a, double[] b)\n {\n double[] y = new double[a.length];\n\n for(int x = 0; x < y.length; x++)\n y[x] = a[x]-b[x];\n\n return y;\n }", "public static double[] minus(double a, double[] b)\n {\n double[] y = new double[b.length];\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates new form DescricaoFrame
public DescricaoFrame() { initComponents(); setResizable(false); txtDescricao.setText(Filme.descricao); }
[ "Frame createFrame();", "public Descifrar() {\n initComponents();\n }", "FRAME createFRAME();", "public JIFCadastroAgendaDesc() {\n initComponents();\n iniciarClasse();\n jBAtualizar.setVisible(false);\n jBDeletar.setVisible(false);\n jPanel1.setBorder(javax.swing....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Inserts a specific repetition of RXC2 (Pharmacy/Treatment Component Order)
public RXC insertRXC2(int rep) throws HL7Exception { return (RXC)super.insertRepetition("RXC2", rep); }
[ "public void insertRXC2(RXC structure, int rep) throws HL7Exception { \r\n super.insertRepetition( \"RXC2\", structure, rep);\r\n }", "public void insertRXC(RXC structure, int rep) throws HL7Exception { \r\n super.insertRepetition( \"RXC\", structure, rep);\r\n }", "public RXC insertRXC(int re...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the clusterNames value for this GetDBMetaDataResponse.
public java.lang.String[] getClusterNames() { return clusterNames; }
[ "java.util.List<com.google.bigtable.admin.v2.Cluster> getClustersList();", "java.util.List<? extends com.google.bigtable.admin.v2.ClusterOrBuilder>\n getClustersOrBuilderList();", "@ApiModelProperty(value = \"List of clusters in the system including their services, roles and complete config values.\")\n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the vpnClientIpsecPolicies property: VpnClientIpsecPolicies for VpnServerConfiguration.
public List<IpsecPolicy> vpnClientIpsecPolicies() { return this.innerProperties() == null ? null : this.innerProperties().vpnClientIpsecPolicies(); }
[ "public SecurityPoliciesClient getSecurityPolicies() {\n return this.securityPolicies;\n }", "public P2SVpnServerConfigurationInner withVpnClientIpsecPolicies(List<IpsecPolicy> vpnClientIpsecPolicies) {\n if (this.innerProperties() == null) {\n this.innerProperties = new P2SVpnServerCo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
An interface that provides a data management interface to the HrDeptRescind table.
public interface HrDeptRescindDao extends GenericDao<HrDeptRescind, String> { public JQueryPager getHrDeptRescindCriteria(final JQueryPager paginatedList,List<PropertyFilter> filters); }
[ "public interface ExcessPremiumManager {\r\n /**\r\n * Load all manual excess premium.\r\n *\r\n * @param policyHeader\r\n * @param inputRecord\r\n * @return RecordSet\r\n */\r\n public RecordSet loadAllExcessPremium(PolicyHeader policyHeader, Record inputRecord);\r\n\r\n /**\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method gets a list of thingTypeFields from a list of thing types
public static Map<ThingType, List<ThingTypeField>> getListOfFieldsWithExpression(List<ThingType> lstThingType) { Map<ThingType, List<ThingTypeField>> result = new HashMap<>(); List<ThingTypeField> lstThingTypeField = new ArrayList<>(); if(lstThingType!=null && lstThingType.size()>0) ...
[ "private static List<RelDataTypeField> getFieldList(List<RelDataType> types) {\n final List<RelDataTypeField> fieldList = new ArrayList<>();\n for (RelDataType type : types) {\n addFields(type, fieldList);\n }\n return fieldList;\n }", "public void populateListWithFieldsOfType(List list, Class[]...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Description Getter method to the scenarioID
private int getScenarioID() { return scenarioID; }
[ "public String getScenarioId() {\n return scenarioId;\n }", "public long getScenarioId() {\n return scenarioId;\n }", "@Override\n\tpublic long getDescriptionId() {\n\t\treturn _scienceApp.getDescriptionId();\n\t}", "protected abstract String getId(String description);", "@Override\n\tpu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column TRS_SYN_SETLMT_ACC.MT103_REGULATORY_REPORT2
public void setMT103_REGULATORY_REPORT2(String MT103_REGULATORY_REPORT2) { this.MT103_REGULATORY_REPORT2 = MT103_REGULATORY_REPORT2 == null ? null : MT103_REGULATORY_REPORT2.trim(); }
[ "public String getMT103_REGULATORY_REPORT2() {\r\n return MT103_REGULATORY_REPORT2;\r\n }", "public void setMT103_REGULATORY_REPORT1(String MT103_REGULATORY_REPORT1) {\r\n this.MT103_REGULATORY_REPORT1 = MT103_REGULATORY_REPORT1 == null ? null : MT103_REGULATORY_REPORT1.trim();\r\n }", "publ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new instance with the specified chunk content. If an empty buffer is specified, this chunk becomes the 'end of content' marker.
public DefaultHttpChunk(IoBuffer content) { setContent(content); }
[ "public DataEncoder newChunk() {\r\n\t\treturn this.newChunk(this.startSequence);\r\n\t}", "public ChunkedOutputStream(byte buffer[], DataOutputStream out) {\n\tsuper(out);\n\tthis.buffer = buffer;\n\tthis.chunksize = buffer.length;\n }", "public DataEncoder newChunk(byte[] startString) {\r\n\t\tif (this....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Loads all of the tabbable panels found in the tabbable directory.
private void loadPanels() throws FileNotFoundException { Map<String, Object> panels = Loader.loadObjects(PropertiesReader.value(REFLECT, TABPATH)); for(String name : panels.keySet()){ Panel panel = (Panel) panels.get(name); panel.setController(controller); this.panels...
[ "private void reloadAllScriptTabs() {\n\t\tscriptTabs = new ArrayList<>();\n\n\t\tSet<CdmScript> scripts = cdmCtrl.getScripts();\n\t\tfor (CdmScript script : scripts) {\n\t\t\tscriptTabs.add(new ScriptTab(mainPanelRight, script, this, cdmCtrl));\n\t\t}\n\n\t\treScriptTabViews();\n\n\t\tregenerateScriptList();\n\n\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Update state of playing
private void updateMusicState() { if (MusicUtils.isPlaying()) { if (!isPlaying_old) { //getLrc(trackName, artistName); } if(!isPlaying_old){ initLrc(); } if (iv_music_bar3.getAnimation() == null && !isPlaying_old) { isPlaying_old = true; animation(0, false); } // 获取歌曲播...
[ "public void setPlaying() {\n\t\tstate = State.INGAME;\n\t}", "@TargetApi(Build.VERSION_CODES.LOLLIPOP)\n private void updateNowPlayingState() {\n if(mSession==null)\n return;\n if (mPlayer != null && mPlayer.isPlaying()) {\n if (!mSession.isActive()) {\n mSes...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column neeq_company_recruitment.update_date_machine
public void setUpdateDateMachine(Integer updateDateMachine) { this.updateDateMachine = updateDateMachine; }
[ "public void setUpdateDatetime(Date updateDatetime);", "public Integer getUpdateDateMachine() {\r\n return updateDateMachine;\r\n }", "public void setUpdate_date(Integer update_date) {\n this.update_date = update_date;\n }", "public void setSysUpdateDate(Date sysUpdateDate) {\n\t\tthis.sys...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
getQuery generate the JTable and list the data
public void getQuery() { String[] columnNames = { "Customer ID", "Product ID", "Product Quantity", "Date Issued", "Time Issued" }; Connection connection = null; Statement statement = null; try { connection = DriverManager.getConnection(DATABASE_URL, UserName_SQL, Password_SQL); statement = connection.c...
[ "private void GetData(){\n try {\n Connection conn =(Connection)Database.Koneksi.getConnection();\n java.sql.Statement stm = conn.createStatement();\n java.sql.ResultSet sql = stm.executeQuery(\"select * from karyawan\");\n jTable1.setModel(DbUtils.resultSetToTableModel(sql));\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Crea una hoja Excel y la guarda.
@SuppressWarnings({ "deprecation", "static-access" }) public void crearExcel(String nombreFichero,java.sql.Connection connection) throws SQLException { int contador=0; // Se crea el libro HSSFWorkbook libro = new HSSFWorkbook(); // Se crea una hoja dentro del libro HSSFSheet...
[ "public void createWorkbook() {\r\n\t\tHSSFWorkbook workbook = new HSSFWorkbook();\r\n\r\n\t\twriteIntoFile(workbook);\r\n\t}", "public static void CreateWorkbook() {\r\n\t\t\r\n\t\tif(createsheet == 0) {\r\n\r\n\t\tDate date = new Date() ;\r\n\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"dd-MM-yyyy HH...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
HttpClient 4.2.2 does not use the correct default value for "http.keepAlive" system property (default is "true"). HttpClient NTLM authentication fails badly when this property value is true. So we force it to be true here: effectively, we're ignoring any usersupplied value for our HttpClient configuration.
private void alwaysUseKeepAliveConnections() { System.setProperty("http.keepAlive", "true"); }
[ "public static void disableConnectionReuseIfNecessary() {\n if (Build.VERSION.SDK_INT < Build.VERSION_CODES.FROYO) {\n System.setProperty(\"http.keepAlive\", \"false\");\n }\n }", "private static void disableConnectionReuseIfNecessary() {\n if (Build.VERSION.SDK_INT < Build.VERS...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the values of the quaternion.
public final GLQuaternionD set(final double... values) { return this.set(values, 0, values.length); }
[ "public void set(Quaternion q){\n this.x = q.x;\n this.y = q.y;\n this.z = q.z;\n this.w = q.w;\n }", "public void setOrientationQuaternion(double[] q){\n\t\tthis.q = q;\n\t}", "public void setAxes( Quaternion axes );", "private Quaternion (float[/*4*/] vals)\n {\n val ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
endif / / Set the PropertyMember, which can is assumed to be a MethodInfo for / the static setter method for a DP or a PropertyInfo for the clr property / / / The possibility of having multiple member info cached for an attribute is when a / dependency property that does not belong to the default namespace is used in o...
public void SetPropertyMember (Object propertyMember) { Debug.Assert((propertyMember is MethodInfo) || (propertyMember is PropertyInfo) || (KnownTypes.Types[(int)KnownElements.DependencyProperty].IsAssignableFrom(propertyMember.GetType())), "Cache can hol...
[ "public static MemberExpression property(Expression expression, PropertyInfo property) { throw Extensions.todo(); }", "protected boolean isSetter(Method meth) {\n return startsWith(meth.getName(), \"set\")\n || startsWith(meth.getName(), \"add\")\n || startsWith(meth.getName(), \"r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Reads the list of data sources and default data sources and compares them.
public static boolean isEqualDefault(Context context) { ArrayList<DataSource> dataSources; ArrayList<DataSource> dataSourcesDefault; try { dataSources = read(context); } catch (FileNotFoundException e) { return false; } try { dataSource...
[ "private static boolean isDataSourceMatch(DataSource dataSource, ArrayList<DataSource> dataSourcesDefault){\n for(int i=0;i<dataSourcesDefault.size();i++){\n DataSource dataSourceDefault=dataSourcesDefault.get(i);\n if(isEqualDataSource(dataSource, dataSourceDefault)) return true;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
function to return random number of a specific range[0 mod];
static int random(int mod) { Random rand = new Random(); int l= (rand.nextInt()); if(l<0) l=l*-1; l=l%mod; return l; }
[ "private static int randomGen(int range) {\n\t\treturn (int) ((range + 1) * Math.random());\n\t}", "public final static int rand(int range) {\n\t\tif (range == 0)\n\t\t\treturn 0;\n\t\t// assert range>0\n\t\t// 0 may have division by zero error.\n\t\treturn Math.abs(random.nextInt() % range);\n\t}", "int getRan...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a generic ObjectRepository. Features automatic clean close on system exit and detection of incomplete or failed close on previous use.
public static ObjectRepository createObjectRepository (FileBuffer file, int blockSize, boolean create, boolean failIfDirty, long shutdownTimeout, ObjectStreamBuilder builder) throws IOException { TxFileBuffer txfile; int reserved; ...
[ "@Override\n\tpublic void close() {\n\t\trepository.shutDown();\n\t}", "private ObjectRepository() {\n\t}", "public void closeRepository() {\n this.repo.shutDown();\n }", "Repository createRepository();", "TRepo createRepo();", "public interface ApplicationRepository extends VirtualFileSystem\n{...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets request status id.
public Integer getRequestStatusId() { return requestStatusId; }
[ "public int getRequestID() {\n return requestID.getValue();\n }", "public int getStatusId() {\n return statusId_;\n }", "public long getStatusId() {\n return _app.getStatusId();\n }", "public int getStatusId() {\n return statusId;\n }", "RequestStatus getStatus();", "public String ge...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates and displays the synapse properties dialog.
@Override public void showSelectedSynapseProperties() { StandardDialog dialog = getSynapseDialog(getSelectedSynapses()); dialog.pack(); dialog.setLocationRelativeTo(null); dialog.setVisible(true); }
[ "private TreeItem createPropertiesDialog() {\r\n this.propertiesDialog = new Shell(this.formDialog, SWT.DIALOG_TRIM | SWT.RESIZE | SWT.CLOSE);\r\n this.propertiesDialog.setSize(750, 500);\r\n this.propertiesDialog.setLayout(new FormLayout());\r\n\r\n Button btnCancel = new Button(this.pr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the initialization sql.
void setInitSql(String value);
[ "String getInitSql();", "public void setSql(String sql) { // FIXME move this logic to core module\n\t\tsqlTxt.setText(sql);\n\t\tanalyzeSql();\n\t}", "public void setSQL(String s) {\n\tsql = s;\n }", "void setSQL(String _sqlStatement) {\n\tthis.sql = _sqlStatement;\n }", "public void setSql(final Stri...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns true if field listDate is set (has been assigned a value) and false otherwise
public boolean isSetListDate() { return this.listDate != null; }
[ "public boolean isSetDate() {\n return this.date != null;\n }", "boolean isSetFoundingDate();", "public boolean isSetDistDate()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(DISTDATE$8) != 0;\n }\n }", "public bo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional .speech.logs.AudioStreamDescriptor desc = 5;
@java.lang.Override public com.google.speech.logs.AudioStreamDescriptorOrBuilder getDescOrBuilder() { return desc_ == null ? com.google.speech.logs.AudioStreamDescriptor.getDefaultInstance() : desc_; }
[ "@java.lang.Override\n public com.google.speech.logs.AudioStreamDescriptor getDesc() {\n return desc_ == null ? com.google.speech.logs.AudioStreamDescriptor.getDefaultInstance() : desc_;\n }", "public AudioDescriptor getAudioDescriptor();", "public com.google.speech.logs.AudioStreamDescriptor getDesc() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Switch communication to command mode
public void switchToCommandMode() throws MicrocontrollerException { isStreamMode(); byte[] streamOutSizeBytes = Packet.bytesFromShort(packetSize.getDefaultStreamOutSize()); byte[] streamInSizeBytes = Packet.bytesFromShort(packetSize.getDefaultStreamInSize()); Packet packet = new PacketBu...
[ "void switchToCmdMode() throws IOException;", "public void sendCommand(Command cmd);", "void send(Command command);", "public abstract void setCommand(String cmd);", "@Override\n\tprotected void sendCommand() {\n\t\ttry {\n\t\t\toutputStream.write(command.getBytes());\n\t\t} catch (IOException e) {\n\t\t\tL...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
GENFIRST:event_TextField_BukuActionPerformed TODO add your handling code here:
private void TextField_BukuActionPerformed(java.awt.event.ActionEvent evt) { }
[ "private void vencimentoBoletoJTextFieldActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void biayaActionPerformed(java.awt.event.ActionEvent evt) {\n \n }", "private void Anul_InfintariiTextActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void txtbuscarHCAc...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Execute commandLine as a command passed to builder.
protected void builder(String commandLine) { // Pass through the command line options from the current builder List passThroughArgs = env.getBuilderArgs(); for (Iterator iterator = passThroughArgs.iterator(); iterator.hasNext();) { commandLine = (String)iterator.next() + " " + comman...
[ "protected void launch(List commandline, File workingDirectory) throws BuildException {\n\t\tString[] cmdline = (String[])commandline.toArray(new String[0]);\n\t\tExecuteStreamHandler handler = new LogStreamHandler(this,\n\t\t\t\t(isVerbose() ? EchoLevel.INFO.getLevel() : EchoLevel.VERBOSE.getLevel()),\n\t\t\t\tEch...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Use ValuesChange.newBuilder() to construct.
private ValuesChange(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); }
[ "private Values(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public RemoveLocalizedEnumValuesChange build() {\n Objects.requireNonNull(change, RemoveLocalizedEnumValuesChange.class + \": change is missing\");\n Objects.requireNonNull(previousV...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
private final UserDataSource userLocalDataSource; private final UserDataSource userRemoteDataSource;
protected UserRepository(UserLocalDataSource localDataSource, UserRemoteDataSource remoteDataSource) { super(localDataSource, remoteDataSource); }
[ "public void setDataSource(DataSource dataSource);", "public void setReadDataSource(DataSource dataSource)\n {\n _readDataSource = dataSource;\n }", "public interface IRemoteDataSource {\n\n\n /**\n * Retrieves the system remote configuration from the remote data source.\n *\n * @return -...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Count only the players online
public int getPlayerCount() { int count = 0; for (ArkynePlayer player : currentPlayers) { count += player.isOnline() ? 1 : 0; } return count; }
[ "int getPlayerStatusCount();", "int getOnlineCount();", "int getTotalActivePlayers();", "public int countPlayers(){\n return players.size();\n }", "private int nbPlayerInGame() {\n int count = 0;\n for (Player player : playersList) {\n if (player.isInGame()) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the lowest parking space available in the parking lot based on the given parking lot and ticket list. Returns a 1 if there are no open spaces available.
public static int getLowestAvailableSpace(ParkingLot parkingLot, List<Ticket> ticketList) { List<Integer> occupiedSpaces = new ArrayList<Integer>(); for (Ticket ticket : ticketList) { if ( ticket.getParkingLotName().equals(parkingLot.getParkingLotName()) && !"...
[ "public static int getAvailableSpaces(ParkingLot parkingLot, List<Ticket> ticketList) {\n int ticketCount = 0;\n for (Ticket ticket : ticketList) {\n if (\n ticket.getParkingLotName().equals(parkingLot.getParkingLotName()) &&\n \"\".equals(ticket.getGateExi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the normal vector for a given value of the path parameter and an offset for the array storing the normal vector. The normal vector N is a vector of unit length, perpendicular to the tangent vector, and oriented so that d2r/ds2 = &kappa;N where &kappa; is the curvature. If the normal vector does not exist (e.g., the...
public boolean getNormal(UValues uv, double[] array, int offset) { if (st == PathIterator.SEG_LINETO || st == PathIterator.SEG_CLOSE) { return false; } double[] vtmp = new double[3]; boolean result = getTangent(uv, vtmp, 0); if (result == false) { // Arrays.fill(array, offset, offset+3, 0.0...
[ "public abstract Vec normalAt(Point3D intersection, Ray ray);", "static double[] normal(double[] v) {\n return new double[] {-v[1], v[0]};\n }", "public Vector3 normalAt(Point3 p) {\n return center.vectorTo(p).unit();\n }", "public Vector2D normal()\n\t{\n\t\treturn this.mul(1/this.length());\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Construct a delete volume request.
public DeleteVolumeRequest deleteVolumeRequest(String volumeId) { final DeleteVolumeRequest request = new DeleteVolumeRequest(); request.setVolumeId(volumeId); return request; }
[ "ActionResponse delete(String volumeId);", "public void constructDeleteCartRequest(DeleteCartRequest request);", "public void constructDeleteTourOfferRequest(DeleteTourOfferRequest request);", "private DeleteRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the aliases of the parameter. The alias will be an empty string array by default.
public String[] getAlias() { Preconditions.checkNotNull(alias); return alias; }
[ "public String[] getAliases();", "String[] getAliases();", "public String[] getAliases()\n\t{\n\t\treturn aliases;\n\t}", "public String[] getAliases() {\n return aliases;\n }", "public List getAttributeAliases()\n {\n List aliases = new ArrayList();\n \n Iterator it = _paramet...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the inner node that is wrapped by the explicit tag.
public final DerNode getInnerNode() { return innerNode_; }
[ "private static String getOutermostTag() {\r\n\t\tNodeList outermostNodes;\t\t//A list with one element, the outermost node\r\n\t\tNode outermostNode;\t\t\t\t//The outermost tag in the form of a Node object\r\n\t\tElement outermostElement;\t\t//The outermost tag in the form of a Element object\r\n\t\tString returnV...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks if number of flags is correct for this test case.
@Order(1) @Test public void testNumFlags() { int expected = 5; int actual = this.parser.numFlags(); assertEquals(expected, actual, this.debug); }
[ "@Order(1)\n\t\t@Test\n\t\tpublic void testFlags() {\n\t\t\tint expected = 5;\n\t\t\tint actual = this.parser.numFlags();\n\t\t\tassertEquals(expected, actual, this.debug);\n\t\t}", "private boolean _validateFlags(int pFlags) {\n\n if ((pFlags & aiProcess_GenSmoothNormals.value) != 0 && (pFlags & aiProcess...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the value of the JobDateType field. The date type (effective, written, reference) used to determine whether the job falls within the dates of the hold
@gw.internal.gosu.parser.ExtendedProperty public typekey.JobDateType getJobDateType();
[ "public void setJobDateType(typekey.JobDateType value);", "String getJobType();", "public int getJobType() {\n return jobType;\n }", "public JobType getType() { return type; }", "public void setJobType(String jobType);", "public String getDateType() {\r\n return dateType;\r\n }", "pu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Function to save logs to text file
public void saveLogs() { try { FileWriter logWriter = new FileWriter(System.getProperty("user.dir") + "/src/maintenancelog/LogTextFile.txt"); for (int i = 0; i < currentLog.size(); i ++) { for (int j = 0; j < currentLog.get(i)...
[ "protected void saveLog() {\n\t\ttry {\n\t\t\tFileOutputStream fileoutput = new FileOutputStream(\"src/txt/log.txt\",true);\n\t\t\tString temp = taLog.getText();\n\t\t\tfileoutput.write(temp.getBytes());\n\t\t\tfileoutput.close();\n\t\t\tJOptionPane.showMessageDialog(null, \"Saved in log.txt\");\n\t\t} \n\t\tcatch ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__UseCase__Group__14__Impl" $ANTLR start "rule__UseCase__Group_8__0" ../br.com.levysiqueira.dsl.textualusecase.ui/srcgen/br/com/levysiqueira/dsl/textualusecase/ui/contentassist/antlr/internal/InternalTextualUseCase.g:1673:1: rule__UseCase__Group_8__0 : rule__UseCase__Group_8__0__Impl rule__UseCase__Grou...
public final void rule__UseCase__Group_8__0() throws RecognitionException { int stackSize = keepStackSize(); try { // ../br.com.levysiqueira.dsl.textualusecase.ui/src-gen/br/com/levysiqueira/dsl/textualusecase/ui/contentassist/antlr/internal/InternalTextualUseCase.g:1677:1: (...
[ "public final void rule__UseCase__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../br.com.levysiqueira.dsl.textualusecase.ui/src-gen/br/com/levysiqueira/dsl/textualusecase/ui/contentassist/antlr/internal/InternalTextualUse...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ This method will try the date format string to make sure it knows how to parse the dates. If it fails a parse it will try the alternate format if available. For example, if the first three files have these dates: 2010/03/04 2010/07/09 2010/23/06 For the first two, either yyyy/MM/dd or yyyy/dd/MM would work. When the ...
protected boolean checkDateFormat( String dateStr ) { try { dateFormat.parse( dateStr ); } catch ( ParseException ex ) { if ( log.isDebug() ) { if ( log.isDebug() ) { log.logDebug( BaseMessages.getString( PKG, "MVSFileParser.DEBUG.Date.Parse.Error" ) ); } } if (...
[ "protected void guessDateFormat(String dateStr) {\n if (log4j.isDebugEnabled()) {log4j.debug(BaseMessages.getString(PKG, \"MVSFileParser.DEBUG.Guess.Date\"));} //$NON-NLS-1$\n String[] dateSplit = dateStr.split(\"/\"); //$NON-NLS-1$\n String yrFmt = null;\n int yrPos = -1;\n int dayPos = -1;\n // ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
addFunction Adds a functionID to either the start or stop list
public void addFunction(Integer fid, boolean isInverse) { if (isInverse) { stopFunctionIDs.add(fid); } else { startFunctionIDs.add(fid); } }
[ "public void addFunction(Function functionToAdd){\r\n\t\tgamePlaying.functions.add(functionToAdd); // +kat\r\n\t}", "public void addFunction(String function) {\n\t\tthis.functions.add(function);\n\t\tdrawFunctions();\n\t}", "public void addFunctions(final Function function) {\n functions.add(function);\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
traverse class hierarchy and find all annotated fields
private void findFields() { for(Class<?> clazz=getObject().getClass();clazz != null; clazz=clazz.getSuperclass()) { Field[] fields=clazz.getDeclaredFields(); for(Field field:fields) { ManagedAttribute attr=field.getAnnotation(ManagedAttribute.class); ...
[ "private static HashSet<Field> getAllFields(Class<?> cls) {\n // First, let's get all the super classes.\n HashSet<Class<?>> ancestors = getInstrumentedAncestors(cls);\n\n // Then, let's get all the fields of these classes.\n HashSet<Field> allFields = new HashSet<>();\n for (Class<?> ancestor : ance...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
3.6 Read Operations The process of sending data inbound is called a read operation. A read operation can be initiated by the following: The host application sending an explicit read command The host application program sending a Read Partition structured field specifying Read Buffer, Read Modified, or Read Modified All...
private synchronized void readBuffer() { int byteCount = 0; short[] dataOut = new short[((chars.length) * 2) + 40]; //get the current AID dataOut[byteCount++] = rw.getAID(); //convert the current cursor position to 14-bit addressing dataOut[byteCount++] = addrTa...
[ "private void readBufferCommand() throws IOException {\n\tshort\t\tobuf[], c;\n\tint\t\ti, n;\n\n\tobuf = new short[tn.displaySize * 2 + 20];\n\tn = 0;\n\n\tobuf[n++] = tn.aidGet();\n\tobuf[n++] = codeTable[(tn.cursorGetPosition() >> 6) & 0x3F];\n\tobuf[n++] = codeTable[tn.cursorGetPosition() & 0x3F];\n\n\tfor(i = ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removing disliked member if it exists in the team for all student in the team
public static ArrayList < Student > dislikedMembersRemover(ArrayList < Student > teamCreator) { for (int i = 0; i < teamCreator.size(); i++) { Student[] dislikedMembers = teamCreator.get(i).getDislikedMembers(); List < Student > dislikedMembersList = Arrays.asList(dislikedMembers); ...
[ "public void remove(Student s) {\n\n\t\tint index;\n\t\tint i = 0;\n\t\t// finds the index of the TeamMember in the team array then overwrites the spot\n\t\t// with the last spot and sets it to null\n\t\tindex = find(s);\n\n\t\tif (index == NOT_FOUND) {\n\t\t\tSystem.out.println(\"Student Not Found\");\n\t\t\tretur...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Use NodeFactory to create instance of ConveyorType called "Conveyor". NodeFactory takes care of recursively instantiating Conveyor member nodes as well as adding all nodes to the address space.
static UaObjectNode createConveyorInstance(UaObjectTypeNode conveyorTypeNode, NodeFactory nodeFactory, UShort namespaceIndex) { UaObjectNode conveyor = nodeFactory.createObject( new NodeId(namespaceIndex, "Sorter/Conveyor"), new QualifiedName(namespaceIndex, "Conveyor"), ...
[ "static UaObjectTypeNode createConveyorTypeNode(OpcUaServer server, UShort namespaceIndex) {\n return UaObjectTypeNode.builder(server.getNodeMap())\n .setNodeId(new NodeId(namespaceIndex, \"ObjectTypes/ConveyorType\"))\n .setBrowseName(new QualifiedName(namespaceIndex, \"Conveyo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a new ref alert rule.
public RefAlertRuleModel createRefAlertRule(RefAlertRuleModel model) throws AAException, RemoteException;
[ "public RefAlertRuleModel[] createRefAlertRule(RefAlertRuleModel[] refAlertRules) throws AAException,\r\n\t\t\tRemoteException;", "public RefAlertMessageModel createRefAlertMessage(RefAlertMessageModel model) throws AAException, RemoteException;", "public RefAlertRecipientModel createRefAlertRecipient(RefAlertR...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method is designed to shutdown out classloader file locks in windows.
public void closeClassLoader() { HashSet<String> closedFiles = new HashSet<>(); try { Object obj = getFieldObject( URLClassLoader.class, "ucp", this ); ArrayList<?> loaders = (ArrayList<?>) getFieldObject( obj.getClass(), "loaders", obj ); for ( Object ldr : loaders ) { try { ...
[ "void dispose() {\n\t\tthis.getClasses().forEach(this.manager::removeClass);\n\t\tthis.classes.clear();\n\t\ttry {\n\t\t\tthis.close();\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\tString name;\n\t\t\tURL[] urls = this.getURLs();\n\t\t\tif (urls == null || urls.length == 0) {\n\t\t\t\tname = \"?\";\n\t\t\t}\n\t\t\tel...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }