query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
Create a probability vector for multinomial distribution creates a symmetry around zero by construction
private double [] uniformDiscreteProbs(int numStates) { double [] uniformProbs = new double[2 * numStates]; for(int i = 0; i < 2 * numStates; i++) uniformProbs[i] = (1.0 / (2 * numStates)); return uniformProbs; }
[ "private void initializeProbabilityVector(MatrixLib p) {\n double sum = 0.0;\n for (int i = 0; i < p.numRows(); i++) {\n double ele = p.elementAt(i, 0);\n if (ele < 0) {\n throw new IllegalArgumentException(\"Probability \" + ele\n + \" for element \" + i + \" is negative.\");\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This is an abstract method where vehicle picks a service bay from the end of the list.
@Override public void pickServiceBay(Garage garage) throws NoAvailableBayException { int i = garage.getSize() - 1; for (; i >= 0; i--) { ServiceBay sb = garage.getBayAt(i); try { sb.occupy(this); break; } catch (BayOccupiedException e) { // skip this line. } catch (BayCarMismatchException e...
[ "public synchronized void take(Station s, Bicycle b, Bank_Card bank_card) throws Exception{\r\n\t\tif(!s.equals(this.last_routine.getSource())){System.out.println(\"CHOOSE THE STATION OF YOUR ROUTINE\");throw new Exception(\"WRONG STATION\");}\r\n\t\tif(this.bicycle!=null){System.out.println(\"Already Got a Bicycle...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set one ghost to start the "Scared" state.
public void setGhostScared(String ghostName, int defaultScaredTime) { final int[] scaredTime = {defaultScaredTime}; ghostScaredTimes.put(ghostName, scaredTime[0]); Timer countDownGhostBuster = new Timer(); countDownGhostBuster.scheduleAtFixedRate(new TimerTask() { /** ...
[ "public void moveGhost() {\n\t\t\tswitch (_mode) {\n\t\t\tcase Chase:\n\t\t\t\tthis.chase();\n\t\t\t\tbreak;\n\t\t\tcase Scatter:\n\t\t\t\tthis.scatter();\n\t\t\t\tbreak;\n\t\t\tcase Frightened:\n\t\t\t\tthis.frightened();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t}", "private void setupGhostPen() {\n\t\tKeyFrame kf ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Invoke an action expected to raise a Python exception and check the message. The return value may be the subject of further assertions.
public static <E extends PyException> E assertRaises( Class<E> expected, Executable action, String expectedMessage) { E e = assertThrows(expected, action); assertEquals(expectedMessage, e.getMessage()); return e; }
[ "public void testActionPerformed() {\n try {\n handler.actionPerformed(null, EventValidation.SUCCESSFUL);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n }", "@Test\n public void testI...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Update media in the database with the given content values. Apply the changes to the rows specified in the selection and selection arguments (which could be 0 or 1 or more pets). Return the number of rows that were successfully updated.
private int updateMedia(Uri uri, ContentValues values, String selection, String[] selectionArgs, String tableName) { // TODO SANITY CHECKING HERE!!!!!!!!!!!!!!!!!!!!!!!!! /* // If the {@link PetEntry#COLUMN_PET_NAME} key is present, // check that the name value is not null. if (...
[ "private int updateFavoriteMovies(Uri uri, ContentValues values, String selection, String[] selectionArgs) {\n\n // Update the selected pets in the pets database table with the given ContentValues\n // If the {@link PetEntry#COLUMN_PET_NAME} key is present,\n // check that the name value is not...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Helper method to find the defining component of a SelectItem so passthrough attributes can be rendered.
public UIComponent getSelectItemComponent(SelectItem item) { if (item instanceof WrapperSelectItem) { WrapperSelectItem wrapper = (WrapperSelectItem) item; return wrapper.getComponent(); } return null; }
[ "public Object getSelectItem() {\n\t\treturn selectItem;\n\t}", "public interface SelectItem {\n\n /**\n * @return A star is used as select item\n */\n boolean isStar();\n\n /**\n * @return Namespace and star is used as select item in order to select operations\n */\n boolean isAllOper...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Filter current user's following people's mood events by a specific mood state.
public void filterByFoMoodState(String selectedMoodState){ // for each mood event in the list for (int i = 0; i < moodListBeforeFilterFo.getCount(); i++ ){ // get the mood event's mood state stateOfMood = moodListBeforeFilterFo.getMoodEvent(i).getMoodState(); // if it...
[ "public void filterByMyMoodState(String selectedMoodState){\n // for each mood event in the list\n for (int i = 0; i < moodListBeforeFilterMy.getCount(); i++ ){\n // get the mood event's mood state\n stateOfMood = moodListBeforeFilterMy.getMoodEvent(i).getMoodState();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the types of aggregate to calculate.
public void setAggregateType(AggregateType aggregateType) { this.aggregateType = aggregateType; }
[ "public void setAggregateFunction(Type aggregateFunction) {\n this.aggregate = aggregateFunction;\n }", "String getAggregateType();", "@Resource\n public void setAggregateFactories(List<AggregateFactory<?>> aggregateFactories) {\n for (AggregateFactory<?> factory : aggregateFactories) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method corresponds to the database table map_room_build_apdt
MapRoomBuildApdt selectByPrimaryKey(Integer id);
[ "public void doBuild() throws TorqueException\n {\n dbMap = Torque.getDatabaseMap(\"cream\");\n\n dbMap.addTable(\"OPPORTUNITY\");\n TableMap tMap = dbMap.getTable(\"OPPORTUNITY\");\n\n tMap.setPrimaryKeyMethod(TableMap.NATIVE);\n\n\n tMap.addPrimaryKey(\"OPPORTUNITY.OPPO...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks if is hardware verified.
public boolean isHardwareVerified() { return hardwareVerified; }
[ "boolean isFingerprintHardwarePresent();", "@DISPID(12) //= 0xc. The runtime will prefer the VTID if present\n @VTID(28)\n boolean isVerify();", "@SuppressWarnings(\"unused\")\n\tprivate void setHardwareVerified(boolean hardwareVerified) {\n\t\tthis.hardwareVerified = hardwareVerified;\n\t}", "boolean hasFi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the saturdayEndTime2 value for this Account.
public void setSaturdayEndTime2(java.lang.String saturdayEndTime2) { this.saturdayEndTime2 = saturdayEndTime2; }
[ "public void setSaturdayStartTime2(java.lang.String saturdayStartTime2) {\n this.saturdayStartTime2 = saturdayStartTime2;\n }", "public void setSaturdayEndTime1(java.lang.String saturdayEndTime1) {\n this.saturdayEndTime1 = saturdayEndTime1;\n }", "public void setTuesdayEndTime2(java.lang.St...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
return the number of white key pegs by comparing this object and c.
public int getNumWhiteKeyPegs(Code c) { return (getPeg1() == c.getPeg2() ? 1 : 0) + (getPeg1() == c.getPeg3() ? 1 : 0) + (getPeg1() == c.getPeg4() ? 1 : 0) + (getPeg2() == c.getPeg1() ? 1 : 0) + (getPeg2() == c.getPeg3() ? 1 : 0) + (getPeg2() == c.getPeg4() ? 1 : 0) + (getPeg3() == c.getPeg1() ? 1 : 0) + ...
[ "public int getNumBlackKeyPegs(Code c) {\n\t\treturn (getPeg1() == c.getPeg1() ? 1 : 0) + (getPeg2() == c.getPeg2() ? 1 : 0)\n\t\t\t\t+ (getPeg3() == c.getPeg3() ? 1 : 0) + (getPeg4() == c.getPeg4() ? 1 : 0);\n\t}", "public int numPieces(Color c)\n {\n int count = 0;\n for(Piece[] p : Grid)\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get value from characteristic.
protected byte[] getValue() throws GattException { try { byte[] value = bluetoothGattCharacteristic.getValue(); if (value == null) { throw new GattException(String.format("Value can not be " + "got from characteristic %s.", getUuid())); ...
[ "public String getCharacteristic() {\n return characteristic;\n }", "io.dstore.values.IntegerValue getValueCharacteristicId();", "public Object getCharacteristic(String name) throws DataExchangeException;", "public byte getValue() {\n return value;\n }", "public byte getValue() {\n retu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generate the unique key. This key must be unique inside the space of this component. This method must be invoked before the generateValidity() method.
long generateKey();
[ "public String generateNewKey();", "public long generateKey() {\n final StringBuffer hash = new StringBuffer(this.elementName);\n hash.append('<').append(this.count).append('>').append(this.blocknr);\n return HashUtil.hash(hash);\n }", "public static synchronized String genUniqueKey(){\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Calculates average processing time.
public double averageProcessTime() { if (numCompleted < 1) { return 0.0; } else { return (double)totalProcessTime / (double)numCompleted; } }
[ "public static double doAvgProcessingTime() {\n if (count >= 1) {\n return processingTimeTotal / count;\n } else {\n return -1;\n }\n }", "public long calulateAverageTime()\r\n {\r\n long sum = 0;\r\n long avgTime = 0;\r\n\r\n //Get the sum of ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the content of a directory as HTML. Should be called only for directories (does not test if file is a directory).
public static String getDirectoryContentAsHtml(File file, String uri) { StringBuilder dirContent = new StringBuilder("<html><head><title>Index of "); dirContent.append(uri); dirContent.append("</title></head><body><h1>Index of "); dirContent.append(uri); dirContent.append("</h1><hr><pre>"); File[] files ...
[ "public String FormatDirectory(File file, String path){\n\n\t\tString[] subFiles = file.list();\n\t\tString html = \"<!DOCTYPE html PUBLIC \\\"-//W3C//DTD XHTML 1.0 Strict//EN\\\" \\\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\\\">\";\n\t\tfor(int i=0;i<subFiles.length;i++){\n\t\t\thtml += \"<a href=\" + pat...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Kudo an activity (kudo is given by the authenticated athlete). You can do this multiple times, but the activity only receives one kudos.
public void giveKudos(final Long activityId) throws NotFoundException;
[ "public List<StravaAthlete> listAllActivityKudoers(final Long activityId);", "void kick(GroupChatUser user, Optional<String> reason);", "public void confusionIntent(View v){\n if(!MultiplayerManager.getInstance().enoughTimeBetweenCommands()){\n showToast(\"Please wait a second before issueing ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Contexts: packed_conformant_array_schema returns packed_conformant_array_schema Constraint: (bound=bound_specification name=ID)
protected void sequence_packed_conformant_array_schema(ISerializationContext context, packed_conformant_array_schema semanticObject) { if (errorAcceptor != null) { if (transientValues.isValueTransient(semanticObject, PascalPackage.Literals.PACKED_CONFORMANT_ARRAY_SCHEMA__BOUND) == ValueTransient.YES) errorA...
[ "protected void sequence_unpacked_conformant_array_schema(ISerializationContext context, unpacked_conformant_array_schema semanticObject) {\r\n\t\tgenericSequencer.createSequence(context, semanticObject);\r\n\t}", "public static boolean isArray_id() {\n return false;\n }", "com.microsoft.schemas.crm._...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Description:verify error messge on trying to post the ad without filling mandatory fields
public void verifyErrorMessageonTryingtoPostAdwithoutFillingMandatoryfields() throws Exception { CreateStockTradusProPage createStockObj = new CreateStockTradusProPage(driver); click(createStockObj.allMyStockOptioninSiderBar); explicitWaitFortheElementTobeVisible(driver, createStockObj.LeavepageButtonInPostingFor...
[ "@Test(priority = 9)\n\tpublic void verifyErrorMessagesUnderMandatoryFields() throws Exception {\n\t\tCreateStockTradusProPage createStockObj = new CreateStockTradusProPage(driver);\n\t\tLoginTradusPROPage loginPage = new LoginTradusPROPage(driver);\n\t\twaitTill(2000);\n\t\tloginPage.setAccountEmailAndPassword(\"a...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a model type's definition from a required interface.
private String createModelTypeForRequiredInterface( RequiredInterface requiredInterface) { String answer = "modeltype " + requiredInterface.getName() + "{\n"; answer += " syntax \"platform:/resource" + requiredInterface.getEcoreRelativePath() + "\"\n}\n"; return answer; }
[ "RequiredInterfaceDefinition createRequiredInterfaceDefinition();", "InterfaceDefinition createInterfaceDefinition();", "ProvidedInterfaceDefinition createProvidedInterfaceDefinition();", "private String createModelTypeForProvidedInterface(\n\t\t\tProvidedInterface providedInterface) {\n\t\tString answer = \"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the bid property.
public void setBid(double value) { this.bid = value; }
[ "public void setBid(Integer bid) {\n this.bid = bid;\n }", "public void setBid(String bid) {\r\n this.bid = bid;\r\n }", "public String getBid() {\r\n return bid;\r\n }", "public String getBid() {\n return bid;\n }", "public Integer getBid() {\n return bid;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Receives parts of a multipart message from `source` socket and sends them to `destination` socket. Stops when the multipart message is over, i.e. there are no more messages to receive.
private static void forwardMessages(Socket source, Socket destination) { while (true) { byte[] msg = source.recv(0); boolean hasMore = source.hasReceiveMore(); destination.send(msg, hasMore ? ZMQ.SNDMORE : 0); if (!hasMore) break; } }
[ "private void transferFilePeer(){\n\n try{\n\n BufferedReader bf = new BufferedReader(new InputStreamReader(socket.getInputStream()));\n StringBuilder sb = new StringBuilder();\n String message = bf.readLine();\n\n int i = 3;\n\n //get the fileName from ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method checks if a Country Code is present in GET individual country response, return true if found
public boolean isCountryCodePresent (JsonPath jp, String countryCode) { HashMap<Object,Object> fetchedCountry = jp.get("RestResponse.result"); if(fetchedCountry.get("alpha2_code").equals(countryCode)) { return true; } return false; }
[ "boolean hasCountriesAllowed();", "public static boolean hasCountryInfo(String code)\n {\n return (CountryCode.getCountryInfo(code) != null)? true : false;\n }", "boolean isCountryCodeCorrect(String countryCode);", "public static Boolean countryExists(String country){\n DBCountry.getCountr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
First load of the game when PicturePoker is initially run. If a save file doesn't exist, it is automatically created, otherwise the number of coins is loaded
private int initialLoad() { File saveFile = new File("save.txt"); int coins = 5; try { if (saveFile.createNewFile()) { save(coins); } else { coins = load(); } } catch (IOException e) { } return coins; }
[ "public void loadgame() {\r\n GameChooser gc;\r\n gc = new GameChooser(this);\r\n game_load_test = true;\r\n //this.dispose();\r\n //System.exit(0);\r\n }", "public void startSavedGame()\n {\n \n // get rid of nl character left in the stream\n // outFile...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
extract hairpins from a rna secondary structure. setCutOff() can change the minimal length of the hairpin
public ArrayList<PriMiRNA> extractHairpin(SimRNA rna){ ArrayList<PriMiRNA> pris=new ArrayList<PriMiRNA>(); String str=rna.getStr(); m=pattern.matcher(str); while(m.find()){ int start1=str.lastIndexOf(")", m.start(1))+1;//replace m.start(1) Str...
[ "public short getHair_subdiv() throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn __io__block.readShort(__io__address + 3918);\n\t\t} else {\n\t\t\treturn __io__block.readShort(__io__address + 3874);\n\t\t}\n\t}", "IntOctagon[] cutout_from(IntOctagon p_d)\n {\n IntOctagon c = thi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method creates and initializes an NbaVpmsAdaptor object to call VP/MS to execute the supplied entryPoint.
protected NbaVpmsModelResult getDataFromVpms(String entryPoint) throws NbaBaseException, NbaVpmsException { NbaVpmsAdaptor vpmsProxy = null; try { NbaOinkDataAccess oinkData = new NbaOinkDataAccess(getWork().getNbaLob()); Map deOink = new HashMap(); deOink.put(NbaVpmsAdaptor.A_PROCESS_ID, NbaUtils.getBusin...
[ "public NbaVpmsResultsData getDataFromVpms(String entryPoint) throws NbaBaseException, NbaVpmsException {\n\t\tNbaVpmsAdaptor vpmsProxy = null; //SPR3362\n\t\ttry {\n\t\t\tNbaOinkDataAccess oinkData = new NbaOinkDataAccess(getWork().getNbaLob());\n\t\t\tMap deOink = new HashMap();\n\t\t\tdeOink.put(NbaVpmsAdaptor.A...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This interface defines the available certificate types as defined by PKCS11: X_509_PUBLIC_KEY, X_509_ATTRIBUTE or VENDOR_DEFINED.
public interface CertificateType { /** * The identifier for a X.509 public key certificate. */ static public final Long X_509_PUBLIC_KEY = new Long(PKCS11Constants.CKC_X_509); /** * The identifier for a X.509 attribute certificate. */ static public final Long X_509_ATTRIBUTE = new ...
[ "@AutoEscape\n\tpublic String getCertificateType();", "public void setCertificateType(String certificateType);", "public String getCertificateType() {\n return this.CertificateType;\n }", "public String getCertType() {\n return certType;\n }", "public String getCertificatetype() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Convert the specified target to string (for DEBUG)
public static String toString(Object target) { return toString(target, (String[]) null); }
[ "java.lang.String getTarget();", "public static String getTarget() {\n return TARGET;\n }", "public static String getLogTarget()\n {\n return BaseBoot.getInstance().getGlobalConfig().getConfigProperty\n (LOGTARGET, LOGTARGET_DEFAULT);\n }", "@NotNull\n public static String getTarget...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This function adds associated entities to an example criterion
public void addAssoications(Criteria criteria, Candidate exampleInstance) { }
[ "@Test\n public void testAdd() {\n assertEquals(3, prototype.getList().size());\n prototype.add(new Criterion(\"name4\", new IdCategory(Category.HEALTH), \"description\", \"help\"));\n assertEquals(4, prototype.getList().size());\n }", "public void addExample(Example e){\n\t\tclassIndex...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the URI for the given relative path in the project folder
public static String getURIPathToFolder(String relativePath){ URL binUrl = JavaFxNodeToSvgConverterDemo.class.getClassLoader().getResource("."); try { URI binUri = binUrl.toURI(); URI wantedUri = binUri.resolve("../" + relativePath); File file = new File(wantedUri); String wantedFilePath = file.getAbso...
[ "String getRelativeInternalURL();", "public abstract String getURL (String relativePath, boolean global);", "public static java.net.URI getURI(String relativePath) {\n\t\tString absolutePath = Utils.getAbsolutePath(relativePath);\n\t\tURI emfUri = URI.createFileURI(absolutePath);\n\t\tjava.net.URI uri = null;\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a map with the key set being every available data access plugin type.
public static Map<String, List<DataAccessPlugin>> getAllPlugins() { final Map<String, List<DataAccessPlugin>> plugins = DataAccessPluginType.getTypes().stream() .collect(Collectors.toMap( type -> type, type -> new ArrayList<>(), ...
[ "Map<String, Plugin> getPluginsMap();", "static HashMap<String, Pluggable> getPlugins(){\r\n\t\treturn new HashMap<String, Pluggable>(pluginMap);\r\n\t}", "@Override\n public Map<String, List<DataAccessPlugin>> get() {\n final Map<String, List<DataAccessPlugin>> plugins = DataAccessPluginType.getTypes...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test the property 'launchesEventhandlerThreadpoolPriority'
@Test public void launchesEventhandlerThreadpoolPriorityTest() { // TODO: test launchesEventhandlerThreadpoolPriority }
[ "@Test\n public void launchesEventhandlerThreadpoolMaxsizeTest() {\n // TODO: test launchesEventhandlerThreadpoolMaxsize\n }", "@Test\n public void orgApacheFelixEventadminThreadPoolSizeTest() {\n // TODO: test orgApacheFelixEventadminThreadPoolSize\n }", "int getThreadPriorityBoost();...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
sequence of indices for horizontal seam
public int[] findHorizontalSeam() { return null; }
[ "public int[] findHorizontalSeam() {\n\t\tif (!transposed) {\n\t\t\ttranspose();\n\t\t}\n\t\treturn operateFindSeam();\n\t}", "public int[] findHorizontalSeam() {\n if (!transposed) {\n transpose();\n }\n return findSeam();\n }", "public int[] findHorizontalSeam() {\n i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
GENLAST:event_panel_preferences_left_proxyMouseClicked advanced button click
private void panel_preferences_left_advancedMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_panel_preferences_left_advancedMouseClicked panel_preferences_left_general.setBorder(null); panel_preferences_left_filters.setBorder(null); panel_preferences_left_InternetUpdates.s...
[ "private void advancedBoxactionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_advancedBoxactionPerformed\r\n advancedClicked();\r\n }", "private void btnAdvancedMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnAdvancedMouseClicked\n if(flagMode){\n pNormal....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Assertion: HttpOpenFile.seek(n) will throw exepction when n = length_of_file.
public void testBoundarySeek() throws Exception { OpenFile dof = null; try { // Open Default file. dof = new DefaultOpenFile(TestDataFileHelper.getTestFilePath()); } catch (Exception e) { fail("Exception occurred constructing Defau...
[ "@Test\n\tpublic void testRandomAccessFile() throws IOException {\n\t\tString fileName = archiveDownloadDir + \"/\" + UUID.randomUUID().toString();\n\t\tRandomAccessFile raf = new RandomAccessFile(fileName, \"rw\");\n\t\traf.setLength(DOWNLOAD_CHUNK_SIZE);\n\t\t// write at the start of file\n\t\traf.seek(0);\n\t\tr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
set the matrixed form by the 8 vector and 10 vector (by column)
public void set_matrix_8_10(final double x0, final double y0, final double x1, final double y1) { x_8 = x0; y_8 = y0; x_10 = x1; y_10 = y1; }
[ "public void set_matrix_10_8(final double x0, final double y0, final double x1, final double y1) {\n x_10 = x0;\n y_10 = y0;\n x_8 = x1;\n y_8 = y1;\n }", "@Test\n public void testSetMatrixColumn() {\n final Matrix33d mBase = getMatrix();\n final Matrix33d m = getMatrix();\n f...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
get the sections for the lab, tutorial and discussion
public List<String> getSections(){ return new ArrayList<>(Arrays.asList(lab, tutorial, discussion)); }
[ "List<Section> getSections();", "public List<WebPage> getSections(HttpSession session) {\r\n\t\tUtilHttpSession hos = new UtilHttpSession(session);\r\n\t\tUsers user = getUser(hos.getloggedUserId());\r\n\t\tif(user.getProfile().getUpId().equals(1)){\r\n\t\t\treturn getSections();\r\n\t\t}\r\n\t\telse{\r\n\t\t\tLi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Unread the given number of previously read bytes.
public void unread(int len) { if (this.off - len < 0) throw new IndexOutOfBoundsException(); this.off -= len; }
[ "private void localUnread(byte[] buffer, int off, int len) throws IOException\n {\n if (datapos < len) \n {\n throw new IOException(\"ByteArrayParserInputStream.unread(int): \" +\n \"cannot unread \" + len + \n \" bytes at...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Downloads CSV file based on tickerName
private String downloadFile(String theTicker) throws MalformedURLException, IOException { String preUrl = "http://chart.finance.yahoo.com/table.csv?s=" + theTicker + "&a=3&b=12&c=1996&d=0&e=31&f=2017&g=d&ignore=.csv"; String fileLocString = "StockFiles\\" + theTicker + ".csv"; ...
[ "private static Path tickerPath(String ticker) {\n\t\treturn FileSystems.getDefault().getPath(\"src\", \"main\", \"resources\", \"ticker\", ticker.toLowerCase() + \".csv\");\n\t}", "static void getAllSymbolsData()\n {\n try{\n BufferedReader br = new BufferedReader(new FileReader(\"data/ticke...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Metodo obtenerSubbodegasPorArticulo, utilizado para obtener subbodegas por articulo
Collection<BodegaDTO> obtenerSubbodegasPorProveedor(Integer codigoCompania, String codigoProveedor);
[ "public abstract List<Subproducto> listarSubproducto(EntityManager sesion, Subproducto subproducto);", "public Collection<String> obtenerCodigosArticulosSubClasificaciones(SubClasificacionDTO subClasificacion) throws SICException;", "SubProduct readSubProduct(int id);", "public Nodo DondeEsMasBaratoSubir(){\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the list of CustomerInfo records associated with this customer model.
public List<CustomerInfo> getCustomerInfos () { return new ArrayList<CustomerInfo>(allCustomerInfos); }
[ "public List<Customer> viewCustomers() {\n\t\tList<Customer> customer = customerRepository.findAll();\n\t\treturn customer;\n\t}", "@Override\r\n\tpublic List<Customer> viewAllCustomer() {\r\n\r\n\t\treturn customerRepository.findAll();\r\n\t}", "public ArrayList<Customer> getCustomers()\r\n {\r\n ret...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Verify that the hashcode for two different devices is NOT the same.
@Test public void hashCodeTest2() { Device device2 = new Device("other", token); assertNotEquals(device.hashCode(), device2.hashCode()); }
[ "public static void ensureHashcodesNotEqual(Object o1, Object o2) {\n int object1Hashcode = o1.hashCode();\n int object2Hashcode = o2.hashCode();\n assertFalse(\"Objects which are not equal should ideally not have the same \" +\n \"hash codes. Were : \"\n + object1...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ This test signs up a new user, logs that user in, verifies that they can access the home page, then logs out and verifies that the home page is no longer accessible.
@Test public void testUserLifeCycle() throws InterruptedException { driver.get("http://localhost:" + port + "/signup"); helper.signup(user); assertEquals("Login", driver.getTitle()); helper.login(user); Assertions.assertEquals("Home", driver.getTitle()); helper.log...
[ "@Test\n\tpublic void signupUserAndAccessHomePage() {\n\t\tcreateUserAndLogin();\n\t\tAssertions.assertEquals(\"http://localhost:\" + this.port + \"/home\", driver.getCurrentUrl());\n\t\tdriver.findElement(By.id(\"logoutForm\")).submit();\n\t\tdriver.get(\"http://localhost:\" + this.port + \"/home\");\n\t\tAssertio...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
public Long getUserDetailsId(String authCode) throws BlockbusterException;
public UserAuthDetails getUserAuthDetails(String authCode) throws BlockbusterException;
[ "long getUserid();", "long getCodeId();", "String getAuthenticationID();", "public Integer getAuthCode() {\n return authCode;\n }", "java.lang.String getUserID();", "public String getAuthCode() {\n return authCode;\n }", "public String getUserID();", "public String getAuthCode() {\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
get the parameter for reservation record list
public void getRsvRecordList(Hashtable parameter) throws cwException { if (parameter == null) parameter = new Hashtable(); this.getCurrentUser(parameter); /** * parameter * add the key with prefix "param_" for FE */ parameter.put("start_date", g...
[ "String getValParam();", "public List<Reservation> selectionTousReservation();", "public Long getReservation() {\n return reservation;\n }", "public List<TblReservation>getAllDataReservationByPeriode(Date startDate,Date endDate,\r\n RefReserva...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the attribute value for CREATED_DATE using the alias name CreatedDate.
public Date getCreatedDate() { return (Date)getAttributeInternal(CREATEDDATE); }
[ "public Date getDateCreated() {\n return (Date)getAttributeInternal(DATECREATED);\n }", "public Date getDateCreated()\n {\n return (Date)getAttributeInternal(DATECREATED);\n }", "public Timestamp getCreatedDate() {\r\n return (Timestamp) getAttributeInternal(CREATEDDATE);\r\n }", "public Ti...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__Declarator__Group__1" $ANTLR start "rule__Declarator__Group__1__Impl" ../org.ow2.mindEd.idt.editor.textual.ui/srcgen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:3895:1: rule__Declarator__Group__1__Impl : ( ( rule__Declarator__DcAssignment_1 ) ) ;
public final void rule__Declarator__Group__1__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:3899:1: ( (...
[ "public final void rule__Declarator__Group__1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Use CGameNotifications_UpdateNotificationSettings_Response.newBuilder() to construct.
private CGameNotifications_UpdateNotificationSettings_Response(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); }
[ "private CGameNotifications_UpdateNotificationSettings_Request(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private CGameNotifications_UpdateSession_Response(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "SteamMsgGam...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
gets the size of the JFrame
public Dimension getSize() { return windowSize; }
[ "public static int getWidthOfGui() {\r\n return 800; }", "@Override\n\tpublic int getJPanelLength() throws RemoteException {\n\t\treturn WINDOWSIZE;\n\t}", "private void sizeFrame()\r\n\t{\r\n//\t\tmainBox.revalidate();\r\n//\t\tDimension pSize = mainBox.getPreferredSize();\r\n//\t\tsetSize((int) pSize.g...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Delete an example or a category. This function will also if entry is ICategory, remove all the code examples from the category. if entry is IExample, remove itself from any categories and dependencies list. if entry is User, do nothing.
public int delete(IEntry entry, IUser user) { //not owner if (!entry.getOwner().equals(user)) return 1; //user is owner if (entry instanceof ICategory) { if(((ICategory) entry).getExampleList().size()!=0) { ICategory categoryEntry = (ICategory)entry; List<IExample> examples = categoryEntry.get...
[ "public void deleteGlossaryEntry(Field entryToDelete);", "public void deleteEntriesAndTypesByCategoryAndAction(String category, String action);", "void deleteCategory(Category category);", "void removeCategory(Category category);", "public void removeCategory(Category category);", "void deleteCategory(int...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of setPrecision method, of class DefaultPrecisionRecallPair.
@Test public void testSetPrecision() { double precision = DefaultPrecisionRecallPair.DEFAULT_PRECISION; DefaultPrecisionRecallPair instance = new DefaultPrecisionRecallPair(); assertEquals(precision, instance.getPrecision(), 0.0); precision = 0.1; instance.setPrecision(p...
[ "@Test\n public void testGetPrecision()\n {\n this.testSetPrecision();\n }", "void setPrecision(double precision);", "void setPrecision(java.lang.String precision);", "public void setPrecision(int value) {\n this.precision = value;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns foreign data wrapper of given name or null if the foreign data wrapper has not been found.
public PgForeignDataWrapper getForeignDW(final String name) { return fdws.get(name); }
[ "private SchemaWrapper findSchemaWrapperInTree( String name )\n {\n List<TreeNode> schemaWrappers = ( ( TreeNode ) viewer.getInput() ).getChildren();\n for ( TreeNode sw : schemaWrappers )\n {\n if ( ( ( SchemaWrapper ) sw ).getSchema().getName().toLowerCase().equals( name.to...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Scan class names from the given package name.
public static Set<Class<?>> scanClassNames(final String packageName) throws IOException, ClassNotFoundException { return scanClassNames(packageName, false); }
[ "public interface PackageScanner {\n String FILE_SUFFIX = \".class\";\n\n /**\n * Find target element blow package except two class name.\n *\n * @param packageName\n * @param except\n * @param except2\n * @return\n * @throws IOException\n */\n Set<String> classNames(String ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Guarantee that only one instance of the AgentExecutor is built.
private static AgentExecutor createDefaultInstance() { synchronized (sAgentExecutorMap) { AgentExecutor agentExecutor = sAgentExecutorMap.get(DEFAULT_AGENT_EXECUTOR_ID); if (agentExecutor == null) { agentExecutor = builder(DEFAULT_AGENT_EXECUTOR_ID).build(); ...
[ "public AgentExecutor getAgentExecutor() {\n return mAgentExecutor;\n }", "public static Agent agent() {\n return new Agent(coreMemory());\n }", "public static DirectCallExecutor newExecutor() {\n\t\treturn NEVER_PAUSING_EXECUTOR;\n\t}", "private void scavengeOldAgentObjects() {\n _...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generated Property Setter for attribute RELATIONSHIPS
@Override public void setRelationships(com.gensym.util.Sequence relationships) throws G2AccessException { setAttributeValue (SystemAttributeSymbols.RELATIONSHIPS_, relationships); }
[ "void setAttribute(PropertyNoun newattr);", "@Override\n public com.gensym.util.Sequence getRelationships() throws G2AccessException {\n java.lang.Object retnValue = getAttributeValue (SystemAttributeSymbols.RELATIONSHIPS_);\n return (com.gensym.util.Sequence)retnValue;\n }", "@Test\r\n public void t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__Database__ValueAssignment_2" $ANTLR start "rule__Tab__ValueAssignment_2" ../eu.artist.migration.mdt.database.sql.editor.ui/srcgen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:1985:1: rule__Tab__ValueAssignment_2 : ( RULE_ID ) ;
public final void rule__Tab__ValueAssignment_2() throws RecognitionException { int stackSize = keepStackSize(); try { // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:1989...
[ "public final void rule__Database__ValueAssignment_2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/Inte...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method formatting log message
public String formatMessage(LogRecord record) { java.util.Date d = new java.util.Date(record.getMillis()); StringBuilder message = new StringBuilder(record.getLevel() + ": " + d + " "); message.append(record.getSourceClassName() + "."); message.append(record.getSourceMethodName() + "()\n"); message.appe...
[ "java.lang.String getLogformat();", "String formatMessage(LogMessage ioM);", "public abstract String formatInfo(String message);", "public String formatLogEntry( LogEntry logEntry, String message){\n // precondition(false, \"Must override this\");\n return null;\n }", "public String format(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generates the source code of the whiteboxed class.
TypeSpec generateSource() { List<Constructor> constructors = visibilityFilter.getConstructors(); List<Method> methods = visibilityFilter.getMethods(); TypeSpec.Builder whiteBoxedClass = TypeSpec .classBuilder(name) .addModifiers(Modifier.PUBLIC, Modifier.FINAL) ...
[ "public String toString() {\n\t\tStringBuilder classCode = new StringBuilder();\n\n\t\t/* Header guarding uwu */\n\t\tString guardName = \"GUARD_\"+this.getPackageless();\n\t\tclassCode.append(\"#ifndef \");\n\t\tclassCode.append(guardName);\n\t\tclassCode.append(\"\\n\");\n\t\tclassCode.append(\"#define \");\n\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
sets the rank of the runners based on the time and in the age group
@Override public void setRanking(String name) { getRealm().executeTransactionAsync(realm -> { RealmResults<Runner> runnerListForAgeGroup1 = realm.where(Race.class) .equalTo(Race.NAME, name) .findFirst().getRunnersList().where().beginGroup().between(Runner...
[ "private void setRank(RealmResults<Runner> runners, Realm realm){\n for(int i = 0; i < runners.size() ; i++){\n if(i != 0 && runners.get(i).getTime() == runners.get(i - 1).getTime()){\n runners.get(i).setRank(runners.get(i - 1).getRank());\n } else {\n run...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a reader builder for RequestForQuotation.
@Nonnull public static UBL23ReaderBuilder<RequestForQuotationType> requestForQuotation(){return UBL23ReaderBuilder.create(RequestForQuotationType.class);}
[ "@Nonnull\n public static UBL23WriterBuilder <RequestForQuotationType> requestForQuotation ()\n {\n return UBL23WriterBuilder.create (RequestForQuotationType.class);\n }", "@Nonnull public static UBL23ReaderBuilder<QuotationType> quotation(){return UBL23ReaderBuilder.create(QuotationType.class);}", "@Nonn...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Flatten the shape to 1 dimension.
public <U extends TNumber> Operand<U> flatten(Shape<U> shape, Class<U> type) { return Shapes.flatten(scope, shape, type); }
[ "@Override\n public Array1D<N> flatten() {\n return myDelegate.wrapInArray1D();\n }", "private NDArray flattenForFullyConnected(final NDArray ndArray) {\n //Get the current shape of the ndArray\n final Shape shape = ndArray.getShape();\n //Get the batch size (the first dimension)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Specifies that the other DDC origin tissue column be returned in this detail query.
public void addColumnDdcTissueOriginOther() { addColumnInPrimarySection(ColumnMetaData.KEY_SECTION_TISSUE_ORIGIN_OTHER); }
[ "public void addColumnDdcTissueOrigin() {\n addColumnInPrimarySection(ColumnMetaData.KEY_SECTION_TISSUE_ORIGIN);\n }", "public void addColumnSampleTissueOriginOther() {\n addColumnInSample(ColumnMetaData.KEY_SAMPLE_TISSUE_ORIGIN_OTHER);\n }", "public void addColumnDdcTissueFindingOther() {\n addColum...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
create a new composition in the workspace for each composition controller encountered
private void createCompositions(){ CompositionController t=rootController.getCompositionControllerStart(); CompositionViewController firstComposition=null; compositionTabs.getTabs().clear(); while(t!=null){ CompositionViewController compositionViewController=new CompositionVi...
[ "private void createControllers(){\n controllerList = new ArrayList<>();\n controllerList.add(new ButtonCommandPanelController(gui, parser));\n controllerList.add(new VariableHistoryBoxController(gui, variableHistory));\n controllerList.add(new PaletteController(gui, model));\n co...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Output only. A permanent fixed identifier for source. .google.cloud.functions.v2beta.SourceProvenance source_provenance = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
com.google.cloud.functions.v2beta.SourceProvenance getSourceProvenance();
[ "com.google.cloud.functions.v2beta.SourceProvenanceOrBuilder getSourceProvenanceOrBuilder();", "public java.lang.String getProvenance() {\n java.lang.Object ref = provenance_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protob...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Fetch Roster list for jID from Openfire.
private void fetchRosterFromOpenfire() { if(!Utility.VcardLoadedOnce){ if(NetworkAvailabilityReceiver.isInternetAvailable(ThatItApplication.getApplication()) && MainService.mService.connection.isConnected() && MainService.mService.connection.isAuthenticated()){ Log.e("fetchRosterFromOpenfi...
[ "ch.epfl.dedis.proto.RosterProto.Roster getRoster();", "public List<MeetingGrap> getByUid(String uid);", "private void list() throws JSONException, InterruptedException {\r\n\t /**Database Manager Object used to access mlab.com*/\r\n db.setDataBaseDestination(cDatabase, null, true);\r\n db.accessDat...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
constructor for the ListController class
public ListController(ConsoleLogger log) { this.log = log; }
[ "public ListaSEController() {\n }", "public ItemController(){\n\t\titemList = new ArrayList<Item>();\n\t}", "public CounterController(CounterList aCounterList) \n\t{\n\t\tcounterList = aCounterList;\n\t}", "public ModelList() {\n }", "public ShelterListController() {\n this(\"\", true, true, true...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method is to pick up some binary numbers that do not meet the requirement,such as 1110,0001,0000,1111
public static List<String> pickUpBinaryNumbers(List<String> list, int num){ for(int j = 0; j < list.size(); j++){ int num1 = 0 , num2 = 0; char[] ch=list.get(j).toCharArray(); for(int i = 0; i < ch.length; i++){ if(ch[i] == '0') num1++; else if(ch[i] == '1') num2++; } if(num1 != num ...
[ "public void testNBitInteger() {\n\n\t}", "private static String[] getValidMiniFloatBitSequences(){\r\n int nbrValues = (int)Math.pow(2, MINI_FLOAT_SIZE);\r\n\r\n String[] result = new String[nbrValues];\r\n for(int i = 0; i < nbrValues; i++){\r\n\r\n String full = String.format(\"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Click on Member Services link to open the Member Services page
public KPAUIMemberServicesPage openMemberServicesPage() { sleep(1); getFooterLegalAndCustomerServiceContactUsLink().click(); return new KPAUIMemberServicesPage(driver); }
[ "public OPEN_POSITIONS clickServicesLink() {\n\t if(services.isDisplayed())\n services.click();\n return this;\n }", "public KPAUIPregnancyPage clickPregnancyServicesLink(){\n getPregnancyServicesLink().click();\n return new KPAUIPregnancyPage(driver);\n }", "public KPAUITou...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
se modifica los datos del resultado
@Override public Resultado modificar() { LOG.info("Se modificó el resultado"); return resultado; }
[ "@Override\r\n\tpublic Resultado modificar() {\n\t\tLOG.info(\"Se modificaron los datos del resultado\");\r\n\t\treturn resultado;\r\n\t}", "public void cargarResultados() {\n\t\t//Completar\n\t\tthis.columnas = new String[] {\"Cosecha\",\"Tipo Cultivo\",\"Fecha\",\"Kilos\",\"Altura\",\"Humedad\"};\n\t\t\n\t\tres...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method to test that a file is loaded corretly, so that a valid scanner object is returned
@Test public void testFileConnection() { Scanner scan = TextReader.loadStudentWishesFromFile("students.csv"); assertThat(scan, is(not(nullValue()))); scan = TextReader.loadStudentWishesFromFile("notfound.txt"); assertThat(scan, is(nullValue())); }
[ "@Test\n public void testGetFileScanner() throws Exception {\n //get file scanner cannot be accurately tested as it is dependant on user input\n System.out.println(\"getFileScanner\");\n Scanner expResult = null;\n Scanner result = BTRouterPatch.getFileScanner();\n System.out.p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets jpmProductSaleNew's information based on primary key. An ObjectRetrievalFailureException Runtime Exception is thrown if nothing is found.
public JpmProductSaleNew getJpmProductSaleNew(final Long uniNo);
[ "Product getProductDetails(int idproduct) throws DataBaseException;", "Product getProduct(String identifier) throws ProductNotFoundException;", "public Product loadProductFromId(int productId) {\n ResultSet rs = database.getProduct(productId);\n Product newProduct = null;\n\n try {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method calculates the total possible revenue of the bundle based on the price of the book, quantity of books, and cost of the bundle
public double getTotalRevenue(){ double totalRevenue = this.book.getPrice()*this.quantity; DecimalFormat df = new DecimalFormat("#.##"); totalRevenue = Double.parseDouble(df.format(totalRevenue)); return totalRevenue; }
[ "private void calculateTotalRevenue(){\n for(WorkRequest wr: organization.getWorkQueue().getWorkRequestList()){\n totalrevenue += wr.getProduct().getSellingPrice();\n }\n \n totalRevenueFromRecycledProducts = totalrevenue;\n lblsellRecycleprd.setText(String.valueOf(tota...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method is implemented from the oAW PostProcessor interface. It is called after the file is closed. Does nothing.
public void afterClose(FileHandle file) { /* PROTECTED REGION ID(java.implementation._Wcbk4A_0EeKuTrE1zpGjjg) ENABLED START */ // do nothing ... /* PROTECTED REGION END */ }
[ "@Override\r\n public void finalize()\r\n {\r\n \tthis.savetofile();\r\n \ttry\r\n \t{super.finalize();}\r\n \tcatch(Throwable e)\r\n \t{e.printStackTrace();}\r\n }", "public void endFlatFile() {\n }", "void fileEnd();", "public void finalize() {\r\n fileName = null;\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
prompts to enter an address
private static void promptAddress() { System.out.print("Please enter an address: "); }
[ "private void getSetUserAddress()\n\t{\n\t\tSystem.out.print(\"7. Please enter your address in the form: House#, Street, City, State.: \");\n\t\tuser.setAddress(scanObj.nextLine());\n\t}", "private void setConfirmAddress(){\n if (sendAddressTask != null) {\n return;\n }\n\n boolean cancel =...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method initializes menuToolsFilter
private ZapMenuItem getMenuToolsFilter() { if (menuToolsFilter == null) { menuToolsFilter = new ZapMenuItem("menu.tools.filter"); menuToolsFilter.addActionListener(new java.awt.event.ActionListener() { @Override public void actionPerformed(java.awt.event.ActionEvent e) { FilterDialog...
[ "public MenuFilter() {\r\n // TODO Auto-generated constructor stub\r\n }", "public void setMenuFilter(ObjectMenuFilter filter);", "private void setupFilterPopupMenus() {\r\n\t\t\r\n\t\t// setup swoop ontology filter menu\r\n\t\tthis.swoFilterMenu = new JPopupMenu();\r\n\t\tthis.swoRedFMenu = (JMenuIte...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method returns the list of pillar objects where each object contains SubtopicList and KpiList under that particular pillar
@Override public List<Pillars> getPillarList(Locale locale) { return pillarService.getPillarList(locale); }
[ "@Override\r\n\tpublic List<Pilot> getAllPilots() {\r\n\t\tList<Pilot> cloned = new ArrayList<>(pilots);\r\n\t\treturn cloned;\r\n\t}", "java.util.List<com.felania.msldb.SmjBarParentObjectOuterClass.SmjBarParentObject> \n getParentObjectList();", "public List getTopicPublisherList(String topicName)\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Double rotate binary tree node: first left child with its right child; then node k3 with new left child. For AVL trees, this is a double rotation for case 2. Update heights, then return new root.
protected AvlNode<T> doubleWithLeftChild(AvlNode<T> k3) { k3.left = rotateWithRightChild(k3.left); return rotateWithLeftChild(k3); }
[ "private Node doubleWithLeftChild(Node k3) {\r\n k3.left = rotateWithRightChild( k3.left );\r\n return rotateWithLeftChild( k3 );\r\n }", "private Node doubleWithLeftChild(Node k3){\n k3.left = rotateWithRightChild( k3.left );\n return rotateWithLeftChild( k3 );\n }", "priva...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The log filter of the observation.
public String getLogFilter() { return this.logFilter; }
[ "public Observation withLogFilter(String logFilter) {\n setLogFilter(logFilter);\n return this;\n }", "public Observation withLogFilter(LogFilter logFilter) {\n this.logFilter = logFilter.toString();\n return this;\n }", "double logNorm(IFilter<Category<MR>> filter);", "doubl...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__QualifiedName__Group_1__0__Impl" $ANTLR start "rule__QualifiedName__Group_1__1" InternalScoping.g:578:1: rule__QualifiedName__Group_1__1 : rule__QualifiedName__Group_1__1__Impl ;
public final void rule__QualifiedName__Group_1__1() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalScoping.g:582:1: ( rule__QualifiedName__Group_1__1__Impl ) // InternalScoping.g:583:2: rule__QualifiedName__Group_1__1__Impl ...
[ "public final void rule__QualifiedName__Group_1__1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../hu.bme.mit.androtext.androres.ui/src-gen/hu/bme/mit/androtext/androres/ui/contentassist/antlr/internal/InternalAndroResDsl.g:28...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks whether the 'field161' field has been set
public boolean hasField161() { return fieldSetFlags()[161]; }
[ "public boolean hasField141() {\n return fieldSetFlags()[141];\n }", "public boolean hasField121() {\n return fieldSetFlags()[121];\n }", "public boolean hasField1040() {\n return fieldSetFlags()[1040];\n }", "public boolean hasField151() {\n return fieldSetFlags()[151];\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test method for 'setText(String)', given null, should be treated as empty string.
public void testSetTextString_null() { textField.setText(null); assertEquals("Text should be treated as empty string.", textField.getText(), ""); }
[ "public void testSetText_NullText() throws Exception {\n try {\n textInputBox.setText(null);\n fail(\"Expect IllegalArgumentException.\");\n } catch (IllegalArgumentException iae) {\n // expect\n }\n }", "public void testSetText_EmptyText1() throws Exceptio...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Writes a byte array to a file creating the file if it does not exist. NOTE: As from v1.3, the parent directories of the file will be created if they do not exist.
public static void writeByteArrayToFile( final File file, final byte[] data ) throws IOException { writeByteArrayToFile( file, data, false ); }
[ "static void writeContents(File file, byte[] bytes) {\n try {\n if (file.isDirectory()) {\n throw\n new IllegalArgumentException(\"cannot overwrite directory\");\n }\n Files.write(file.toPath(), bytes);\n } catch (IOException excp) {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks if is history chess manual.
public static boolean isHistoryChessManual(ChessManual chessManual) { if (chessManual == null || chessManual.getSgfUrl() == null) { return false; } ArrayList<ChessManual> chessManuals = getHistoryChessManualCaches(); for (ChessManual cManual : chessManuals) { if (chessManual.equals(cManual)) { ...
[ "@DISPID(10) //= 0xa. The runtime will prefer the VTID if present\n @VTID(24)\n boolean isHistory();", "public static boolean isFavoriteChessManual(ChessManual chessManual) {\r\n\t\tif (chessManual == null || chessManual.getSgfUrl() == null) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tArrayList<ChessManual> chessM...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of passOrPlay method, of class Game.
@Test public void testPassOrPlay() { System.out.println("passOrPlay"); Game instance = new Game(new euchreGUI(), new Deck()); instance.passOrPlay(); }
[ "@Test\n public void testPickItUpOrPass() {\n System.out.println(\"pickItUpOrPass\");\n Game instance = new Game(new euchreGUI(), new Deck());\n instance.startGame(1, 1, 1);\n instance.pickItUpOrPass();\n }", "public void pass() {\n\t\tgame.pass();\n\n\t}", "@Test\n public v...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
_pdbx_phasing_MAD_set_site.atom_type_symbol records the name of site obtained from MAD phasing.
public StrColumn getAtomTypeSymbol() { return delegate.getColumn("atom_type_symbol", DelegatingStrColumn::new); }
[ "public String getAtom_type() {\n return atom_type;\n }", "public String getSymbolType() {\n return symbolType;\n }", "public SymbolType getSymbolType() {\n return symbolType;\n }", "public void setAtom_type(String atom_type) {\n this.atom_type = atom_type;\n }", "pub...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Registers a listener that will be called when the dock divider changes its visibility or when the docked stack gets added/removed.
void registerDockedStackListener(IDockedStackListener listener);
[ "public void dockNodeDocked(DockNodeEvent e) {}", "public void dockNodeFloated(DockNodeEvent e) {}", "void registerLabelVisibilityListener(Listener listener);", "interface Listener {\n void onVisibilityChanged(boolean showLabels);\n }", "public void register(VisibilityChange callback) {\n vis...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check rover position within boundary.
@Test public void checkRoverPositionOutOfBoundary() { // First set the position and direction r.setPosX(4); r.setPosY(4); r.setInputSignal("MMMMMMMMMMMMMM"); r.move(); Assert.assertTrue(r.getResult().equals(Constants.OUT_OF_BOUNDARY)); }
[ "private boolean isMoveToLocationWithinPlateauBoundary() {\r\n\t\tfinal int maxX = plateau.getUpperRight().getXcoordinate();\r\n\t\tfinal int maxY = plateau.getUpperRight().getYcoordinate();\r\n\t\tfinal int minX = plateau.getLowerLeft().getXcoordinate();\r\n\t\tfinal int minY = plateau.getLowerLeft().getYcoordinat...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Given an outbound message and an input stream, creates and return an XMLStreamWriter for the supported payload type.
public XMLStreamWriter getXMLStreamWriter(OutboundMessage msg, List<Class> paramTypes, OutputStream out) throws ServiceException;
[ "OutputStream createStream(String location);", "@Override\n\tpublic XMLStreamWriter asXMLStreamWriter(SerializeOpts opts) throws SaxonApiException, IOException {\n\t\tSerializer ser = Util.getSerializer(opts);\n\t\tser.setOutputStream(asOutputStream(opts));\n\n\n\n\t\t StreamWriterToReceiver sw = ser.getXMLStream...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
rpc error2(.hadoop.common.EmptyRequestProto) returns (.hadoop.common.EmptyResponseProto);
public abstract void error2( com.google.protobuf.RpcController controller, org.apache.hadoop.ipc.protobuf.TestProtos.EmptyRequestProto request, com.google.protobuf.RpcCallback<org.apache.hadoop.ipc.protobuf.TestProtos.EmptyResponseProto> done);
[ "public abstract void error2(\n com.google.protobuf.RpcController controller,\n org.apache.hadoop.ipc.protobuf.TestProtos.EmptyRequestProto request,\n com.google.protobuf.RpcCallback<org.apache.hadoop.ipc.protobuf.TestProtos.EmptyResponseProto> done);", "public abstract void error(\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ This method creates the IntakeOwnerForm gui.
public void createIntakeOwnerForm(){ Stage ownerForm = new Stage(); Parent root; try { root = FXMLLoader.load(getClass().getClassLoader().getResource("IntakeOwnerFormGUI.fxml")); OwnerController ownerController = new OwnerController(); ownerController.setPetIDNumber(cageCard.getPetID()); Sc...
[ "public OwnerViewForm() {\n initComponents();\n }", "public CreateAccount_GUI() {\n initComponents();\n }", "public EnterDetailsGUI() {\n initComponents();\n }", "public InventoryGUI () {\n\t\tthis.buildGUI();\n\t}", "private void makeGUI()\n {\n mainFrame = new JFram...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Install a given resource in a given URL.
public void install(URL resource, URL dest, String format, String version) throws Exception;
[ "public void install(InputStream resource, URL dest, String format, String version) throws Exception;", "public void install(URL resource, URL dest, String format, String version, InputStreamFactory factory) throws Exception;", "public Manifest install( URL url ) throws RepositoryException\n {\n Strin...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method to receive data from a client. A connection must be made prior to using this method.
public Object receiveData(int clientSocketNumber) throws ClassNotFoundException, IOException { return server.receiveData(clientSocketNumber); }
[ "private void read(SocketChannel client) throws IOException {\n ByteBuffer readBuffer = ByteBuffer.allocate(1024);\n \n int numRead = client.read(readBuffer);\n byte[] data = new byte[numRead];\n System.arraycopy(readBuffer.array(), 0, data, 0, numRead);\n \n System....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Run print receipt sequence boolean.
public boolean runPrintReceiptSequence() { //connect to printer if (!initializeObject()) { return false; } //create receipt if (!createReceiptData(isfirst,isconfirmed,candidate)) { finalizeObject(); return false;...
[ "public boolean isPrinted();", "public void printReceipt(){\n\t\t//TO DO\n\t\t\n\t}", "private boolean isPrint(final TestStepFinished event) {\n\t\treturn event.result.isOk(true) && !Arrays.asList(Result.Type.SKIPPED).contains(event.result.getStatus())\n\t\t\t\t&& event.testStep instanceof PickleStepTestStep\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
check all slot radio on.
public static boolean isAllSlotRadioOn(Context context) { boolean isAllRadioOn = true; final TelephonyManager tm = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE); final int numSlots = tm.getSimCount(); for (int i = 0; i < numSlots; ++i) { ...
[ "public void checkAll() {\n\t\tboolean change = false;\n\t\tfor (int i = 0; i < buttons.size(); i++) {\n\t\t\tAbstractButton button = buttons.get(i);\n\t\t\tchange = setSelected(button, true, i) || change;\n\t\t}\n\t\tif (change) {\n\t\t\trepaint();\n\t\t}\n\t}", "public void checkRadioButton() {\n\t\tLOGGER.debu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Used to verify picked number on right panel
public boolean verify_NumberDisplayedOnPanel() { boolean value = false; //System.out.println(element("NumberType").getText()); if (element("NumberType").isDisplayed() && element("NumberPrice").isDisplayed() && element("BookNow_Btn").isDisplayed()) { value = true; } else { value = false; } return v...
[ "public boolean verify_NumUnderDrpDwn() {\n\t boolean value=false;\n\t \n\t if (element(\"Number_Dropdown\").isDisplayed()) {\n\t\t\tvalue = true;\n\t\t\tSystem.out.println(element(\"Number_Dropdown\").getText() + \"is the number\");\n\t\t} else {\n\t\t\tvalue = false;\n\t\t\tSystem.out.println(element(\"Numb...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Determine if the web service was created from WSDL
public boolean isFromWSDL(String serviceName);
[ "boolean hasGenericWebService();", "protected boolean isWSDLProvidedForProxyService(AxisService service) {\n boolean isWSDLProvided = false;\n if (service.getParameterValue(WSDLConstants.WSDL_4_J_DEFINITION) != null ||\n service.getParameterValue(WSDLConstants.WSDL_20_DESCRIPTION) != ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Build a PacketLargeFactory object from the data contained within the Packet250CustomPayload packet
@Override public void onPacketData(INetworkManager manager, Packet250CustomPayload packet, Player player) { PacketLargeFactory packetLargeFactory = PacketTypeHandler.buildPacket(packet.data); // Execute the appropriate actions based on the PacketLargeFactory type packetLargeFactory.execute(...
[ "private static byte[] makePacket(byte pkID, byte[] data){\n //Logger.log(\"Length of data:\"+data.length);\n ByteBuffer packetFactory = ByteBuffer.allocate(5+data.length);\n packetFactory.put(pkID);\n packetFactory.putInt((int)(data.length));\n packetFactory.put(data);\n r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks whether the current user has been granted privileges to delete the specified node.
boolean canDelete(Node node);
[ "boolean hasPermission(String node);", "private boolean checkDeletePermissions(String bucketName, String objectPath, User user)\n throws UnauthorizedException {\n BlobMetadata metadata = BlobManager.getBlobMetadata(bucketName, objectPath);\n if (metadata == null) {\n return false;\n }\n\n if (...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the modifiedByID value for this Team.
public void setModifiedByID(java.lang.String modifiedByID) { this.modifiedByID = modifiedByID; }
[ "public java.lang.String getModifiedByID() {\r\n return modifiedByID;\r\n }", "public void setIdEntidadRespondioModified(boolean idEntidadRespondioModified)\r\n\t{\r\n\t\tthis.idEntidadRespondioModified = idEntidadRespondioModified;\r\n\t}", "public void setModifyed(Long modifyed) {\n this.modi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
After Places and Rules have been added, there are only StringidtoINodemappings for the original inserted nodes, but not for the ones that were inserted automatically For beeing able to properly add arcs to the rule, we need those mappings
private static void fillMapsWithMappings(int ruleId, Map<String, INode> idToINodeInL, Map<String, INode> idToINodeInK, Map<String, INode> idToINodeInR) { ITransformation transformation = TransformationComponent .getTransformation(); // fill with mappings of Ls nodes for (String xmlId : idToINodeIn...
[ "private void mapTree(){\r\n if (stopAlgorithm){\r\n return;\r\n }\r\n t2 = 0;\r\n pm.updateTo(t2);\r\n pm.setMessage(\"Mapping Tree\");\r\n pm.setTitle(\"Mapping Tree\");\r\n pm.start();\r\n Enumeration en2 = selectedRoot.depthFirstEnumeration();\r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }