query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
Marks the leaf "minoraction" with operation "merge".
public void markMinorActionMerge() throws JNCException { markLeafMerge("minorAction"); }
[ "public void markMajorActionMerge() throws JNCException {\n markLeafMerge(\"majorAction\");\n }", "public void markMinorAbateMerge() throws JNCException {\n markLeafMerge(\"minorAbate\");\n }", "public void markMinorOnsetMerge() throws JNCException {\n markLeafMerge(\"minorOnset\");\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets whether levers are powered
public void setLeverPowered(boolean powered) { this.leverpowered = powered; }
[ "public void setPowerLess(boolean bool);", "public void updateLevers() {\r\n \t\tthis.setLevers(this.port.hasPower() && !this.leverpowered);\r\n \t}", "public void power() {\r\n\t\tpowerOn = !powerOn;\r\n\t}", "public void power()\r\n\t{\r\n\t\tpowerOn = !powerOn;\r\n\t}", "public void setPowerUp(boolean va...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests simple reception of data by a single receiver.
@Test(timeout = 1000000) public void simpleReceive() throws Exception { getClient().addDataReceiver(mReceiver1); runTest(new TestVerifier() { @Override public void verifyExpected(Object inExpected) throws Exception { verifyEquals(inExpected, mReceiver1.g...
[ "@Test(timeout = 10000)\r\n public void dualReceivers() throws Exception {\r\n getClient().addDataReceiver(mReceiver1);\r\n getClient().addDataReceiver(mReceiver2);\r\n runTest(new TestVerifier() {\r\n @Override\r\n public void verifyExpected(Object inExpected) throws E...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructs a new ObjectCollectionValueHolder for the given collection.
public ObjectCollectionValueHolder(Collection collection) { super(new ObjectValueHolder(), collection); }
[ "public ObjectCollectionValueHolder() {\n super(new ObjectValueHolder());\n }", "public ObjectCollectionValueHolder(Object[] array) {\n super(new ObjectValueHolder(), new ArrayList(Arrays.asList(array)));\n }", "protected SafeHashMap.ValuesCollection instantiateValuesCollection()\n {\n ret...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Read the Winds Aloft data FROM THE INTERNET and populate your LOCATIONS table
private static void LoadWindsAloftData(String strFileName) throws Exception { String strVar = ""; INET net = new INET(); DBMS db = new DBMS(); NWS nwsfb = new NWS(strVar); String strTest; String strPage; //check to see if the file exists on disk Boolean bo...
[ "private static void LoadWorldData(String strFileName) throws Exception {\n INET net = new INET();\n DBMS dbms = new DBMS();\n String strPage;\n //check to see if the WORLD.TXT file exists on disk\n Boolean boTest = net.fileExist(strFileName);\n if (boTest == false) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "entryRuleBinaryOperatorCS" $ANTLR start "ruleBinaryOperatorCS" ../org.eclipse.qvto.examples.xtext.qvtoperational/srcgen/org/eclipse/qvto/examples/xtext/qvtoperational/parser/antlr/internal/InternalQVTOperational.g:4546:1: ruleBinaryOperatorCS returns [EObject current=null] : (this_InfixOperatorCS_0= ruleInf...
public final EObject ruleBinaryOperatorCS() throws RecognitionException { EObject current = null; EObject this_InfixOperatorCS_0 = null; EObject this_NavigationOperatorCS_1 = null; enterRule(); try { // ../org.eclipse.qvto.examples.xtext....
[ "public final EObject entryRuleNavigationOperatorCS() throws RecognitionException {\r\n EObject current = null;\r\n\r\n EObject iv_ruleNavigationOperatorCS = null;\r\n\r\n\r\n try {\r\n // ../org.eclipse.qvto.examples.xtext.qvtoperational/src-gen/org/eclipse/qvto/examples/xtext/qvtop...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
get the execution context for the filter operator
public ExecutionContext getFilterCtx();
[ "public FilterContext<String, Object> getFilterContext() {\n\treturn this.context;\n }", "protected EvaluationContext getContext() {\n\t\treturn this.sopremoTestPlan.getCompilationContext();\n\t}", "public EvaluationContext getContext() {\n return context;\n }", "@Test\n public void operator_c...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the maximum number of rounds before a runaway reaction is detected.
void setMaxReactionRounds( @Nonnegative final int maxReactionRounds ) { if ( Arez.shouldCheckInvariants() ) { invariant( () -> maxReactionRounds >= 0, () -> "Arez-0098: Attempting to set maxReactionRounds to negative " + "value " + maxReactionRounds + "." ); }...
[ "public void setMaxRoundsPerBattle(int value) {\n this.maxRoundsPerBattle = value;\n }", "public GameSettingBuilder setMaxRound(int maxRound) {\n this.maxRound = maxRound;\n return this;\n }", "void setMaxWrongGuesses(Integer max);", "protected void setMaxRetries(final int maxRetries) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Reads this modifier entry from the packet buffer
public static ModifierEntry read(PacketByteBuf buffer) { return new ModifierEntry(TinkerRegistries.MODIFIERS.get(buffer.readVarInt()), buffer.readVarInt()); }
[ "public abstract RPacketBase readFrom(DataInputCustom din) throws IOException;", "public void read_control_packet(\r\n byte[] buff,\r\n int buff_len) throws Exception\r\n {\r\n // this format is mostly similar to that used for the serial packet. the major difference is\r\n // in the interpr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check's if a ship could be placed at a pair of coordinates (based on the coordinates that have already been guessed
public boolean couldBePlaced(Ship s, int x, int y) { //Check the ship's orientation if (s.isVertical()) { //Loop through the vertical ship's coordinates for (int i=0; i<s.getYSize(); i++) { try { //If this coordinate has already been guessed th...
[ "private boolean checkCoordinatesOfTheShip(ShipData data, Ship ship) {\n int fromX = (data.x == 0) ? data.x : data.x - 1;\n int fromY = (data.y == 0) ? data.y : data.y - 1;\n\n var coords = getEndCoordinates(data, ship);\n\n if (coords.toX == -1 || coords.toY == -1) {\n return...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new instance of an Aura class.
public static Aura createAura(Spell entry, Unit owner, int level, int duration) { Aura aura = null; Class<? extends Aura> auraClass = Aura.customAuraClasses.get(entry.getId()); // Custom aura Class if (auraClass != null) { try { aura = auraClass.newInstance()...
[ "public static MageArena create(Player player) {\n\t\tMageArena activity = new MageArena(player, player.playerAssistant.instance());\n\t\tplayer.move(new Position(3105, 3934, 0));\n\t\t// player.gameRecord.start();\n\t\tactivity.add(player);\n\t\tactivity.resetCooldown();\n\t\treturn activity;\n\t}", "@Override\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return a Taxonomy for a given taxonomy ID.
public Taxonomy getTaxonomy(String taxonomyId) { if (taxonomyId == null || taxonomyId.equals("")) { InvalidValueException exception = new InvalidValueException("The taxonomy id cannot be empty"); exception.addParameterValue("taxonomyId", ""); throw exception; } try { return dataSource.getTaxonomy(tax...
[ "private TaxaItem getTaxaItem(Integer id) {\n\n\t\tint index = id.intValue();\n\t\tint size = alltaxa.size();\n\n\t\tfor (int x = 0; x < size; x++) {\n\n\t\t\tTaxaItem taxon = (TaxaItem)alltaxa.get(x);\n\n\t\t\tif (taxon.id == index) {\n\n\t\t\t\treturn taxon;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}", "TaxonMeta...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Calculate the scalar product of vector a and vector b
public static double scalarProduct(Vector a, Vector b) { double r = (a.getX() * b.getX()) + (a.getY() * b.getY()) + (a.getZ() * b.getZ()); return r; }
[ "public static double scalarProduct(ThreeVector a, ThreeVector b) {\r\n\t\t// multiply and sum corresponding elements of each vector\r\n\t\tdouble dot = a.x*b.x + a.y*b.y + a.z*b.z;\r\n\t\treturn dot;\r\n\t}", "public static double multVectors(double[] a, double[] b) {\n double result = 0;\n for (int i = 0;...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This function will also take a parameters struct and deer tuple. predict next year based on post hunt populaiton from previous year, this year's harvest and PredictionData parameters.
public static DeerTuple Next_Year(DeerTuple Post, DeerTuple Harvest_in, PredictionData Constants_in) { DataBaseModel db = new DataBaseModel(); DeerTuple harvest = Harvest_in; DeerTuple prebirth = new DeerTuple(); DeerTuple postbirth = new De...
[ "public abstract int predict(double[] testingData);", "PredictionConfig prediction();", "D trainData(Map<String, Object> dataParameters);", "public void addNonExemptTrainingorDevelopmenData(TrainingAndDevelopment trainingAndDevelopement,String year);", "public void generateStraightLineDepreciationModel(int ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the identifier for the array using the given ResultSet at the current cursor position. The default implementation returns all queried columns in the populating SQL statement as a CSV string. E.g. SELECT ID1,ID2 FROM TABLE => "ID1,ID2" This may be overridden to use the columns returned from a SQL statement which...
protected String getArrayIdentifier(String fieldName, ResultSet rset) throws SQLException { String id = rset.getString(1); if (id == null) { return null; } StringBuffer identifier = new StringBuffer(id); int columnCount = rset.getMetaData().getColumnCount(); for (int i = 2; i <= col...
[ "java.lang.String getColId();", "String getSurveyMultiRespColId();", "String getColumnSeqId();", "public String getCSVData()\n {\n return (Integer.toString(this.getID()) + \",\" +\n this.getName());\n }", "public StrColumn getScatterId() {\n return delegate.getColumn(\"sca...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A method testing the getCollisionPositionmethod in an illegal case where the xcoordinate of the two ships is infinity.
@Test (expected=IllegalComponentException.class) public void getCollisionPositionIllegalCaseInfinity() throws IllegalDoubleException, IllegalComponentException{ movingShip1.setPosition(Double.POSITIVE_INFINITY,100); movingShip2.setPosition(Double.POSITIVE_INFINITY,0); movingShip1.setVelocity(0,-10); movingShip...
[ "@Test\n\tpublic void getCollisionPositionLegalCaseTrue() throws IllegalComponentException, IllegalDoubleException{\n\t\tmovingShip1.setPosition(-40,0);\n\t\tmovingShip2.setPosition(35,0);\n\t\tmovingShip1.setVelocity(10,0);\n\t\tmovingShip2.setVelocity(-10,0);\n\t\tVector position = movingShip1.getCollisionPositio...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method to load the Document by ID and type.
Document getDocument(Long documentID, Integer type) throws EntityNotFoundException;
[ "SingleDocumentModel loadDocument(Path path);", "public Document getDocumentByID_Or_UNID(String id);", "public FinancialDocument loadFinancialDocumentById(Integer id);", "public JSONObject getDocument(String index, String type, String id){\t\t\n\t\t//Build URL\n\t\tString url = server + \"/\" + index + \"/\" ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Initialize the root layout.
public void initRootLayout() { FXMLLoader loader = fxmlLoaderService.getLoader(getClass().getResource(FXML_MAIN)); try { rootLayout = loader.load(); } catch (IOException ex) { logger.warn("Failed to load: " + FXML_MAIN, ex); return; } ...
[ "public void initRootLayout() {\n try {\n // Load root layout from fxml file.\n FXMLLoader loader = new FXMLLoader();\n loader.setLocation(Thesis.class.getResource(\"/GUI.fxml\"));\n rootLayout = loader.load();\n\n // Show the scene containing the root l...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets user defined string for "None" button.
public String getNoneText() { return ValueBindings.get(this, "noneText", noneText, "None"); }
[ "public void setNoneText(String noneText) {\r\n this.noneText = noneText;\r\n }", "public WslButton getDefaultButton()\n {\n return null;\n }", "public String getText_click_Ok_I_Will_Do_This_Now_Button(){\r\n\t\treturn click_Ok_I_Will_Do_This_Now_Button.getText();\r\n\t}", "@Override\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method: getSearchResultPanel Description: Gets the searchResultPanel for com.cs_group.managers.ScreenManager
public JPanel getSearchResultPanel(){return searchResultPanel;}
[ "protected JPanel getSearchPanel() throws Exception{\r\n JPanel pnlSearch = super.getSearchPanel();\r\n JPanel southPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));\r\n southPanel.add(rolesPanel);\r\n pnlSearch.add(southPanel,BorderLayout.SOUTH);\r\n rolesPanel.setRolesList(\r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by Apache iBATIS ibator. This method returns the value of the database column tb_interest_log.update_at
public Integer getUpdateAt() { return updateAt; }
[ "public Date getUpdate_at() {\n return update_at;\n }", "public Long getUpdateAt() {\n\t\treturn updateAt;\n\t}", "public Date getUpdateAt() {\n return updateAt;\n }", "public Long getUpdateDatetime() {\n return updateDatetime;\n }", "public Date getUpdated_at() {\n retu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check that the filterByDate method is working correctly
@Test public void filterMeetingByDateWithSuccess() { List<Meeting> meetings = new ArrayList<>(); String filterDate = "01/06/2021"; meetings.addAll(mMeetingRepository.filterByDate(filterDate)); for (Meeting m : meetings){ assertTrue(m.getMeetingStartDate().equals(filterDat...
[ "boolean isFilterByDate();", "@Test\n public void testGetOrdersByDate() {\n\n LocalDate ld = LocalDate.parse(\"2017-06-23\");\n List<Order> orderListByDate = service.getOrdersByDate(ld);\n List<Order> filteredList = new ArrayList<>();\n\n for (Order currentOrder : orderListByDate) {...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
enable all TextInputEditText for fuel editing mode
private void enableAllTextInputEditText() { List<TextInputEditText> textInputEditTextList = new ArrayList<>(); textInputEditTextList.add(tin_perLitrePrice); textInputEditTextList.add(tin_fuelQuantityLitres); textInputEditTextList.add(tin_totalFuelPrice); textInputEditTextList.add...
[ "private void disableAllTextInputEditText() {\n List<TextInputEditText> textInputEditTextList = new ArrayList<>();\n textInputEditTextList.add(tin_perLitrePrice);\n textInputEditTextList.add(tin_fuelQuantityLitres);\n textInputEditTextList.add(tin_totalFuelPrice);\n textInputEditT...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the private key location.
protected final void setPrivateKeyLocation(final String privateKeyLocation) { this.privateKeyLocation = privateKeyLocation; }
[ "public static void setPrivateKeyPath(String privateKeyPath) {\n Program.privateKeyPath = privateKeyPath;\n Program.authType = AUTH_TYPE.CERT;\n }", "protected final String getPrivateKeyLocation() {\n return this.privateKeyLocation;\n }", "String getPrivateKeyLocation();", "public ConnectInfo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
POST /equipmentgroups : Create a new equipmentGroup.
@PostMapping("/equipment-groups") @Timed public ResponseEntity<EquipmentGroupDTO> createEquipmentGroup(@Valid @RequestBody EquipmentGroupDTO equipmentGroupDTO) throws URISyntaxException { log.debug("REST request to save EquipmentGroup : {}", equipmentGroupDTO); if (equipmentGroupDTO.getId() != n...
[ "IDeviceGroup createDeviceGroup(IDeviceGroupCreateRequest request) throws SiteWhereException;", "@PostMapping(\"/skillgroups\")\n @Timed\n public ResponseEntity<Skillgroup> createSkillgroup(@RequestBody Skillgroup skillgroup) throws URISyntaxException {\n log.debug(\"REST request to save Skillgroup :...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the number of proper descendants for node.
@Transient public int getDescendantCount() { int totalDescendants = 0; for( Taxon child: getChildren() ) { totalDescendants += 1 + child.getDescendantCount(); } return totalDescendants; }
[ "public int getDescendantCount();", "int getNodeCount();", "public int getNoOfChildren()\r\n\t{\r\n\t\tif (this.getChild() == null) {\r\n\t\t\treturn 1;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tassert this.getChild().getNodes().size() > 0;\r\n\t\t\treturn this.getChild().getNodes().size();\r\n\t\t}\r\n\t}", "public in...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method used to unlink a Transaction from all Category objects in the database.
public void unlinkTransactionFromAllCategories(int userID, long transactionID) { try { PreparedStatement statement = connection.prepareStatement(UNLINK_TRANSACTION_FROM_ALL_CATEGORIES); statement.setInt(1, userID); statement.setLong(2, transactionID); statement.ex...
[ "public void deleteAllTransactions();", "public void unlinkTransactionFromCategory(int userID, long transactionID, long categoryID) {\n try {\n PreparedStatement statement = connection.prepareStatement(UNLINK_TRANSACTION_FROM_CATEGORY);\n statement.setInt(1, userID);\n stat...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Updates existing aspirant profile identifiable by aspirant account email.
void updateAspirantProfile(String email, AspirantProfile aspirantProfile) throws IllegalArgumentException, AspirantNotRegisteredException, AspirantProfileNotFoundException, ServiceException;
[ "User updateProfile(MultipartFile image, String email) throws Exception;", "public void updateUserProfile (IPerson person,IUserProfile profile);", "public void updateProfile(final JabberId userId, final Profile profile);", "void update(U profile, String password);", "void addAspirantProfile(String email, As...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
inserts new sorted words as well as just anagrams if sorted exists
public void insert(String w){ String sorted = sort(w); //sorts the word alphabetically int pos = value(sorted)%H.length; //Hash Function if(H[pos] == null){ //H[pos] = sorted; //System.out.println("Inserting "+sorted); H[pos] = new SortedStringNode(sorted, H[pos], w); //forget about incrementing ana...
[ "public void sort(){\n\t\twordAndKeys=mergeSortByKeys(wordAndKeys);\n\t}", "public static void insert(String word){\n\n\t\tfor (int i=1;i<=word.length()+1; i++){\n\t\t\tfor(int j=0; j<26; j++){\n\t\t\t\t\n\t\t\t\tString first = word.substring(0, i-1);\n\t\t\t\tString second = word.substring(i-1);\n\t\t\t\t\n\t\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
testing of extracting district from the JSON object response
@Test public void testGetDistrict() throws Exception { TestCase.assertEquals("Kandy", testDistrictExtractor.getDistrict("Poththapitiya")); TestCase.assertEquals("NULL", testDistrictExtractor.getDistrict("ziii")); }
[ "public void doGetDistrict() {\n\t\tString url = getBaseURL() + \"FDGetDistrict\";\n\t\tint method = Method.GET;\n\n\t\tLog.i(\"url\", url);\n\t\tmakeJsonObjReq(method, url, new HashMap<String, String>());\n\t}", "@Test\n public void districtsTest() throws ApiException {\n String stateId = null;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets force checkin flag.
public boolean isForceCheckIn() { return this.forceCheckIn; }
[ "public String getCheckFlag() {\n return checkFlag;\n }", "public String getCHECK_FLAG() {\n return CHECK_FLAG;\n }", "public String getCheckFlag() {\r\n return checkFlag;\r\n }", "public Integer getIsForcein() {\n return isForcein;\n }", "boolean getCheckState();", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
map feature indexes to feature nodes, sorting by index
public FeatureNode[][] featueStore2FeatureNode(FeatureStore store) { Map<Integer, FeatureNode> featureNodes = new TreeMap<Integer, FeatureNode>(); // add a "bias" feature node; otherwise LIBLINEAR is unable to predict // the majority class for // instances consisting entirely of features never seen during tr...
[ "int getForwardFeatureMapping(int index);", "int getBackwardFeatureMapping(int index);", "List<Integer> getIndexedFeatures()\n\t{\n\t\tArrayList<Integer> result = new ArrayList<Integer>();\n\t\t/*\n\t\tfor (int i = bs.nextSetBit(0); i >= 0; i = bs.nextSetBit(i+1)) {\n\t\t\tresult.add(i);\n\t\t}*/\n\t\tfor(IntIt...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
repeated .protobuf.stock_united_req reqs = 1;
java.util.List<? extends protobuf.Protobuf.stock_united_reqOrBuilder> getReqsOrBuilderList();
[ "protobuf.Protobuf.stock_united_req getReqs(int index);", "java.util.List<protobuf.Protobuf.stock_united_req> \n getReqsList();", "public protobuf.Protobuf.stock_united_reqOrBuilder getReqsOrBuilder(\n int index) {\n return reqs_.get(index);\n }", "public protobuf.Protobuf.stock_united_r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
SAK26322 Essentially the same as getReviewScore() only it acts upon the ContentResource parameter rather than that which is returned by firstAcceptableAttachment(). TODO: consider deleting getReviewScore(). If not possible, then refactor to eliminate code duplication
private int getReviewScore(ContentResource cr) { M_log.debug(this + " getReviewScore(ContentResource) for submission " + this.getId() + " and review service is: " + (this.getAssignment().getContent().getAllowReviewService())); //null check, allow review service check if (cr == null) { M_log.debug(thi...
[ "public int getReviewScore(int reviewId) {\n\t\tif (!reviewIndex.isReviewIdValid(reviewId - 1)) { return -1;}\n\t\treturn reviewIndex.getScore(reviewId - 1);\n\t}", "public float getAverageReview()\n {\n return averageReview;\n }", "public double getScore() {\n double compositeScore = this.normalise...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method corresponds to the database table nj_order_callback_log
int insert(NjOrderCallbackLog record);
[ "@Insert({\n \"insert into payment_t_weixin_callback_records (ID, OUT_TRADE_NO, \",\n \"TRANSACTION_ID, RESULT_CODE, \",\n \"PARAMETER_LIST, CALLBACK_TIME)\",\n \"values (#{id,jdbcType=BIGINT}, #{outTradeNo,jdbcType=VARCHAR}, \",\n \"#{transactionId,jdbcType=VARCHAR}, #{resultCode...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
=========== Itinerary Attraction Commands =======================================================================
@Test public void parserCommand_addItineraryAttraction() throws Exception { // tests if same input produces same command AddItineraryAttractionCommand command = (AddItineraryAttractionCommand) parser.parseCommand( AddItineraryAttractionCommand.COMMAND_WORD + " " + index.getOneBased()...
[ "private void runAT() {\n\t\ttry {\n\t\t\tString[] args = new String[1];\n\n\t\t\tSystem.out.print(\"\\n\\nPlease specify a name for the output file: \");\n\n\t\t\targs[0] = br.readLine();\n\n\t\t\tAblationTesting.main(args);\n\t\t} catch (IOException ioe) {\n\t\t\tioe.printStackTrace();\n\t\t}\n\t}", "public Att...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Click on first Email Link in footer page
public void clickOnEmailLink1InFooter() { By element =By.xpath("//a[text()='CE at VIN' ]"); scrollIntoView(element); _normalWait(3000); waitAndClick(emailLink1InFooter); }
[ "public void clickOnEmailLink2InFooter() {\n\t\t_normalWait(2000);\n\t\twaitAndClick(emailLink2InFooter);\n\t }", "public zoho clickMailLink() {\n mail.click();\n return this;\n }", "public static void linksOnFooterOfPage() {\n\t\tWebElement footer = driver.findElement(By.id(\"gf-BIG\"));//\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
String Comment_ID String Reply_ID
public void Add_Reply( String Comment_ID, String Reply_ID) { // TODO implement here }
[ "public void Comment( String Comment_ID, String Reply_ID, String Comment_Date) {\n // TODO implement here\n }", "java.lang.String getCommentId();", "ReplyCommentInfo selectByPrimaryKey(String replyCommentId);", "protected abstract String getCommentId();", "long getCommentId();", "public int ge...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks whether the 'field930' field has been set
public boolean hasField930() { return fieldSetFlags()[930]; }
[ "public boolean hasField931() {\n return fieldSetFlags()[931];\n }", "public boolean hasField910() {\n return fieldSetFlags()[910];\n }", "public boolean hasField935() {\n return fieldSetFlags()[935];\n }", "public boolean hasField928() {\n return fieldSetFlags()[928];\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__Data__Group_14__0" $ANTLR start "rule__Data__Group_14__0__Impl" InternalMyDsl.g:11789:1: rule__Data__Group_14__0__Impl : ( RULE_COMA ) ;
public final void rule__Data__Group_14__0__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalMyDsl.g:11793:1: ( ( RULE_COMA ) ) // InternalMyDsl.g:11794:1: ( RULE_COMA ) { // InternalMyDsl.g:11794:1: ( RULE...
[ "public final void rule__Data__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:10836:1: ( rule__Data__Group__0__Impl rule__Data__Group__1 )\n // InternalMyDsl.g:10837:2: rule__Data__Group__0__Impl rule__Da...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the first fact post in the ordered set where libraryId = &63; and period = &63;.
public com.idetronic.eis.model.FactPost findByLibraryPeriod_First( long libraryId, java.lang.String period, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.idetronic.eis.NoSuchFactPostException, com.liferay.portal.kernel.exception.SystemException;
[ "public com.idetronic.eis.model.FactPost fetchByLibraryPeriod_First(\n\t\tlong libraryId, java.lang.String period,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;", "public com.idetronic.eis.model.FactPost findByLibrary_Firs...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Shorthand: applies SHA256 algorithm to an input and returns the "hashed" bytes
public static byte[] applySha256(byte[] input){ return hashWith(input,"SHA-256"); }
[ "private byte[] SHA256hash(byte[] tobeHashed){\r\n\t\tSHA256Digest digester=new SHA256Digest(); \r\n\t\tbyte[] retValue=new byte[digester.getDigestSize()]; \r\n\t\tdigester.update(tobeHashed, 0, tobeHashed.length); \r\n\t\tdigester.doFinal(retValue, 0);\r\n\t return retValue; \r\n}", "public static byte[] getS...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add Club to the league
@Override public void addClubToLeague(){ try { List<FootballClub> readFiles = readClubFile("Clubs.xls"); club = readFiles; FootballClub clubObject = new FootballClub(); String inputString; ...
[ "void addTheClub(FootballClub club);", "@Override\n public void addClub() {\n int choice = validation.validateChoice(\"Enter type of club\" +\n \"\\n1. University Club\" +\n \"\\n2. School Club\" +\n \"\\nEnter your selection: \");\n String nameOfClub ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Process template resource content and retrieve template elements.
private String[] getTemplateElements(Resource templateResource, String notificationChannel, String displayName, String locale) throws NotificationTemplateManagerException { try { Object content = templateResource.getContent(); if (content != null) { byte[] te...
[ "private TemplatePersistenceData[] read(InputSource source, ResourceBundle bundle, String singleId) throws IOException {\n \t\ttry {\n \t\t\tCollection templates= new ArrayList();\n \t\t\tSet ids= new HashSet();\n \n \t\t\tDocumentBuilderFactory factory= DocumentBuilderFactory.newInstance();\n \t\t\tDocumentBuilder...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
ProblemNoVars returns Problem: property=Implication;
public ProblemNoVarsElements getProblemNoVarsAccess() { return pProblemNoVars; }
[ "@Test\r\n public void testUndefinedVariableConstraints() {\r\n reasoningTest(\"UndefinedVariableConstraints.ivml\", 0);\r\n }", "@Override\n public void printProblem() {\n System.out.print(\"There are \" + this.variables.size() + \" variables: \");\n System.out.print(\"{\");\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This task will not complete on its own, which allows us to test the timeout
@Test public void testTimeoutTaskWithTimeout() throws InterruptedException { final Task<String> task = new BaseTask<String>("task") { @Override protected Promise<? extends String> run(final Context context) throws Exception { return Promises.settable(); } }; final Task<String> t...
[ "@Test\n void timeoutExceeded() {\n Assertions.assertTimeout(Duration.ofMillis(10), () -> {\n // Simulate task that takes more than 10 ms.\n Thread.sleep(100);\n });\n }", "@Test\n void timeoutExceededWithPreemptiveTermination() {\n Assertions.assertTimeoutPreem...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Simulates a car with actions
private static Car simulateCarActions(Car car, ActionSet action, Rigidbody ball, double delta){ boolean boosting = (action.isBoostDepressed() && car.getBoost() != 0); if (car.isMidAir()) { } else { // We are on the ground double newYaw = car.getRotation().yaw + getTurn...
[ "public static void simulateCarUsage(CarModel car)\n {\n car.left.window.rollup();\n car.engine.start();\n car.engine.rev();\n car.wheel[0].align();\n car.engine.stop();\n }", "public void act() \n {\n movegas();\n \n atingido2(); \n \n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Convert FROM and TO addresses to testing addresses if needed. When original addresses are converted to testing addresses, the original addresses are not completed lost, they are shown as "Display Name".
protected void rebuildAddresses(javax.mail.Message m, boolean overrideTestAddr) throws MessagingException { if (isDebugEnabled) { logger.debug("Entering rebuildAddresses method..."); } // set TO address to Test Address if it's a test run if (clientVo.getUseTestAddress() && !overrideTestAddr) { i...
[ "private void ConvertAddresses(){\n\n\n\t\tint currentSequenceNumber = -1;\n\t\tint currentDay = 0;\n\t\tint currentMonth = 0;\n\t\tint currentYear = 0;\n\n\t\tRegistrationAddress rao = null;\n\t\tRegistrationAddressStandardized ras = null;\n\t\tString streetName = null;\n\n int sequenceNumber = 1;\n\n\t\tfo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Opening a site at row i and column j
public void open(int i, int j) { //Throw exceptions if incorrect bounds indexValidator(i, j); // open site (row i, column j) if it is not open already if (!isOpen(i, j)) { //Open the particular site gridState[xyTo1D(i, j)] = true; //Check which boxes need to be opened (Check all directions as ap...
[ "public void open(int i, int j) {\n if (!checkIndex(i, j))\n throw new IndexOutOfBoundsException(\"invalid index i or j for grid site\");\n\n if (isOpen(i, j)) return;\n\n mGrid[i - 1][j - 1] = true;\n ++mOpenSites;\n\n // Neither Topmost or bottom most rows\n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns an array of TIFFFields containing all the fields in this directory.
public TIFFField[] getFields() { return fields; }
[ "public Field<?, ?>[][] allFields() {\r\n final Field<?, ?>[][] allFields = { fields, optionalFields,\r\n globalFields, virtualFields, objectFields() };\r\n return allFields;\r\n }", "DatabaseField[] getFields();", "public List<Field> getAllFields() {\n\t\tList<Field> all = new A...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test the property 'hostNoCertCheck'
@Test public void hostNoCertCheckTest() { // TODO: test hostNoCertCheck }
[ "public static void ignoreCert() {\n\t\ttry {\n\t\t\tSSLContext sc = SSLContext.getInstance(\"SSL\");\n\t\t\tsc.init(null, new TrustManager[] { new DefaultTrustManager() },\n\t\t\t\t\tnew SecureRandom());\n\t\t\tHttpsURLConnection\n\t\t\t\t\t.setDefaultSSLSocketFactory(sc.getSocketFactory());\n\t\t\tHostnameVerifie...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
string seller = 2;
java.lang.String getSeller();
[ "public java.lang.String getSellingvar() {\r\n return sellingvar;\r\n }", "public void setSellingvar(java.lang.String sellingvar) {\r\n this.sellingvar = sellingvar;\r\n }", "public Integer getSellNum() {\n return sellNum;\n }", "public Integer getSellNumber() {\n return s...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
void setSzCdContactType(java.lang.String) Sets the value of field 'tmScrTmCntct'.
public void setTmScrTmCntct(java.lang.String tmScrTmCntct) { this._tmScrTmCntct = tmScrTmCntct; }
[ "public void setSzCdContactType(java.lang.String szCdContactType)\r\n {\r\n this._szCdContactType = szCdContactType;\r\n }", "public java.lang.String getSzCdContactType()\r\n {\r\n return this._szCdContactType;\r\n }", "public void setCsttype (java.lang.String csttype) {\n\t\tthis.cstt...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the synchronized attribute.
public void setSynchronized(boolean fSync) { if (fSync) { m_nFlags |= ACC_SYNCHRONIZED; } else { m_nFlags &= ~ACC_SYNCHRONIZED; } }
[ "@PropertySetter(\"synchronized\")\n protected void setSynchronized(boolean synced) {\n propertyChange(\"synced\", this.synced, this.synced = synced, true);\n }", "public void setSynchronized(boolean fSynchronized)\n {\n ensureLoaded();\n m_flags.setSynchronized(fSynchronized);\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns an existing ImageCache, if it doesn't exist, a new one is created using DEFAULT_CACHE_SIZE_PERCENT (0.1).
public static ImageCache getInstance() { return getInstance(DEFAULT_CACHE_SIZE_PERCENT); }
[ "private ImageCache(float memCacheSizePercent) {\n int memCacheSize = calculateMemCacheSize(memCacheSizePercent);\n\n // Set up memory cache\n if (DEBUG) {\n Log.d(TAG, \"Memory cache created (size = \" + memCacheSize + \" Kbytes)\");\n }\n mMemoryCache = new LruCache<S...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Determines the difference between the previous and the current bid. For each issue, it is determined if the value changed. If this is the case, a 1 is stored in a hashmap for that issue, else a 0.
private HashMap<Integer, Integer> determineDifference(BidDetails previousBid, BidDetails currentBid) { HashMap<Integer, Integer> diff = new HashMap<Integer, Integer>(); try { for (Issue i : opponentUtilitySpace.getDomain().getIssues()) { // compare the values of each is...
[ "public int getChanged () {\n int d = getDiff () * 2;\n int s = getSize () * 2;\n\n for (int i = 0; i < references.length; i++) {\n if (references[i] != null) {\n d += references[i].getDiff ();\n s += references[i].getSize ();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
inserts the given letters onto the board and updates the list of letters on the board
public void insertWord(Move letters, int turn) { for (int i = 0; i < letters.size(); i++) { int row = letters.get(i).getLoc().getRow(); int col = letters.get(i).getLoc().getCol(); if (board[row][col].getLetter() == null) board[row][col].setTurnPlaced(turn); board[row][col].setLetter(letters.get(i)); ...
[ "void placeLetter(String gameId, String playerId, int letterIndex, int row, int column) throws RemoteException;", "public void changeLetters(List<Letter> letters){\r\n if(letters.size() <= bag.size()){\r\n for(Letter l : letters){\r\n rack.removeLetter(l);\r\n Lette...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
.Spice.Primitives.Double.DblArray2D doubles = 1;
public org.Main.Spice.Primitives.Double.DblArray2D getDoubles() { return doubles_ == null ? org.Main.Spice.Primitives.Double.DblArray2D.getDefaultInstance() : doubles_; }
[ "public org.Main.Spice.Primitives.Double.DblArrayOrBuilder getDoubles1OrBuilder() {\n return getDoubles1();\n }", "public abstract double[] asDoubleArray();", "public org.Main.Spice.Primitives.Double.DblArray getDoubles1() {\n return doubles1_ == null ? org.Main.Spice.Primitives.Double.DblArray.getDefaul...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of computeShortestPath method, of class DijkstrasAlgorithm.
@Test public void testComputeShortestPathSimple() { System.out.println("computeShortestPath simple test"); RoadNetwork graph = new RoadNetwork("simpleGraphTest"); DijkstrasAlgorithm instance = new DijkstrasAlgorithm(graph); assertEquals(0, instance.computeSho...
[ "@Test\r\n public void testGetCalculatedShorthestPath(){\r\n System.out.println(\"getCalculatedShorthestPath test\");\r\n \r\n RoadNetwork graph = new RoadNetwork(\"kusalicGraphTest\");\r\n DijkstrasAlgorithm instance = new DijkstrasAlgorithm(graph);\r\n \r\n instance.co...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__Policy__Group__15__Impl" $ANTLR start "rule__Policy__Group__16" ../org.xtext.example.rmodp.ui/srcgen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:12293:1: rule__Policy__Group__16 : rule__Policy__Group__16__Impl rule__Policy__Group__17 ;
public final void rule__Policy__Group__16() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:12297:1: ( rule__Policy__Group__16__Impl rule...
[ "public final void rule__Policy__Group__15() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:12268:1: ( rule__Policy__Gro...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Parse an SVG base64 image and convert it into a JR image. The extracted file is stored in the workspace in the same folder of the report
private JRDesignImage parseImage(SVGOMImageElement imageElement, AffineTransform previousTransform) { AffineTransform newTransofrm = getTransofrm(imageElement); previousTransform.concatenate(newTransofrm); double x = parseCoordinates(imageElement.getAttribute("x")); //$NON-NLS-1$ double y = parseCoordinates...
[ "static void convertirSVGtoPNG(File file) {\n\t\ttry {\n\t\t\t//Step -1: We read the input SVG document into Transcoder Input\n\t\t\t//We use Java NIO for this purpose\n\t\t\tString svg_URI_input = Paths.get(file.getAbsolutePath()).toUri().toURL().toString();\n\t\t\tTranscoderInput input_svg_image = new TranscoderI...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "entryRuleInputsDeclRule" $ANTLR start "ruleInputsDeclRule" InternalUclid.g:554:1: ruleInputsDeclRule returns [EObject current=null] : (otherlv_0= 'input' ( (lv_inputs_1_0= ruleInputDecl ) ) (otherlv_2= ',' ( (lv_inputs_3_0= ruleInputDecl ) ) ) otherlv_4= ':' ( (lv_t_5_0= ruleTypeRule ) ) otherlv_6= ';' ) ;
public final EObject ruleInputsDeclRule() throws RecognitionException { EObject current = null; Token otherlv_0=null; Token otherlv_2=null; Token otherlv_4=null; Token otherlv_6=null; EObject lv_inputs_1_0 = null; EObject lv_inputs_3_0 = null; EObject l...
[ "public final EObject entryRuleInputsDeclRule() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleInputsDeclRule = null;\n\n\n try {\n // InternalUclid.g:547:55: (iv_ruleInputsDeclRule= ruleInputsDeclRule EOF )\n // InternalUclid.g:548:2: iv_ruleIn...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Save returns true if the roster was able to be saved as a csv with no exceptions or errors.
@Test void save() { boolean successfulSave = repo.save("test.csv"); assertEquals(successfulSave, true); }
[ "@Override\n public Boolean insertInfo(Object obj) {\n if(obj instanceof LiveSession) {\n LiveSession liveSession = (LiveSession) obj;\n boolean flag = false;\n File outFile = new File(filePath);\n try {\n BufferedWriter writer = new BufferedWrite...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Updates the AppointmentRequest with the id provided by overwriting it with the new AppointmentRequest that is provided. If the ID provided does not match the ID set in the AppointmentRequest provided, the update will not take place
@PutMapping ( BASE_PATH + "sFGPtaL" ) @PreAuthorize ( "hasAnyRole('ROLE_HCP', 'ROLE_PATIENT')" ) public ResponseEntity updateAppointmentRequest ( @PathVariable final Long id, @RequestBody final AppointmentRequestForm requestF ) { try { final AppointmentRequest request = service.b...
[ "@RequestMapping(path = \"/{appointmentId}\", method = RequestMethod.PUT, produces = \"application/json\", consumes = \"application/json\")\n\t@ResponseStatus(HttpStatus.OK)\n\tpublic Appointment update(@PathVariable Long appointmentId, @RequestBody Appointment appointment) {\n\t\treturn appointmentService.update(a...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
convert degreees to radians
private static double toRad(double degrees) { return degrees * (Math.PI / 180); }
[ "public static double toRadians(double degree) {\n\t\treturn (degree * 3.14159) / 180;\r\n\t\t\r\n\t}", "public static double radians(double degrees) {\n\t return Length.DECIMAL_DEGREE.toRadians(degrees);\n\t }", "private static double toDeg(double radians)\n {\n return radians * (180 / Math.PI)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
parses XML string of Bl type Toast and returns a map of element names and values.
public Map<String,String> processToast(String xmlResponse) { Map<String,String> blDialogMap = new HashMap<String, String>(); String tagName = null; try{ XmlPullParserFactory xmlPullParserFactory = XmlPullParserFactory .newInstance(); xmlPullParserFactory.setNamespaceAware(true); XmlPullParser xm...
[ "public Map<Object, Object> parseXML(String xmlString) {\n try {\n DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();\n Document doc = dBuilder.parse(new ByteArrayInputStream(xmlString\n .getBytes()));\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
cette methode positionne le Membership Service
@EJB public void setMembershipService(MembershipService membership) { this.membership = membership; }
[ "public MembershipService getMembershipService() {\n return this.membership;\n }", "public IMembershipFunction getMembershipFunction();", "MembershipInformation getMembershipInfo();", "public abstract void grantMembership(String nickname);", "Membership getValidatedMember();", "protected void ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets an instance of type Topcat with the given name. Does not modify the underlying ontology.
public Topcat getTopcat(String name) { return delegate.getWrappedIndividual(name, Vocabulary.CLASS_TOPCAT, DefaultTopcat.class); }
[ "public Topcat createTopcat(String name) {\n\t\treturn delegate.createWrappedIndividual(name, Vocabulary.CLASS_TOPCAT, DefaultTopcat.class);\n }", "Category getCategory(String name);", "Category getByName(String name);", "Category getCategoryByName(String name);", "public Category getCategoryByName(Strin...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Send a subscribe message to the validator.
public void sendSubscribe() { Offset o = OffsetBuilder.fromLong(2, 0, 0); this.sendSubscribe(o); }
[ "public synchronized void subscribe() {\n\t\tString data = terminal.read(\"Please enter a topic to subscribe to: \");\n\t\tterminal.println(\"Please enter a topic to subscribe to: \" + data);\n\t\tterminal.println(\"Sending packet...\");\n\t\tDatagramPacket packet = createPackets(SUBSCRIPTION, 0, data, dstAddress)[...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Intersect the ray (r0,r) with the triangle, updating "intersection" if necessary.
private void intersectTriangle(Vector r0, Vector r, Triangle triangle, Intersection intersection, boolean debug) { // The plane is perpendicular to "normal" and goes through "v0". Vector normal = triangle.getNormal(); boolean backfacing = normal.dot(r) > 0; if (backfacing &&...
[ "private static boolean intersect_triangle(ReadableVector3f orig, ReadableVector3f dir,\n ReadableVector3f v0, ReadableVector3f v1, ReadableVector3f v2,\n float[] lenSequard, int offset){\n float t,u,v;\n\n // Fi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__Feature__Group__3" $ANTLR start "rule__Feature__Group__3__Impl" ../com.mguidi.soa.ui/srcgen/com/mguidi/soa/ui/contentassist/antlr/internal/InternalSOA.g:2302:1: rule__Feature__Group__3__Impl : ( ( rule__Feature__TypeAssignment_3 ) ) ;
public final void rule__Feature__Group__3__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // ../com.mguidi.soa.ui/src-gen/com/mguidi/soa/ui/contentassist/antlr/internal/InternalSOA.g:2306:1: ( ( ( rule__Feature__TypeAssignment_3 ) ) ) ...
[ "public final void rule__Feature__Group__3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../com.mguidi.soa.ui/src-gen/com/mguidi/soa/ui/contentassist/antlr/internal/InternalSOA.g:2295:1: ( rule__Feature__Group__3__Impl )\n // ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the wellness value for this Rezervacija.
public java.lang.Boolean getWellness() { return wellness; }
[ "float getWetness();", "@NonNull\n public RunningAverageMetric getSelfishnessMetric() {\n return selfishnessMetric;\n }", "public double getAverageOutlierness() {\n\n return this.averageOutlierness;\n }", "Double getHardness();", "@Basic @Raw\r\n\tpublic int getToughness() {\r\n\t\treturn t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the pnerrorOut value for this EipConsumeServicio_Out.
public int getPnerrorOut() { return pnerrorOut; }
[ "public void setPnerrorOut(int pnerrorOut) {\n this.pnerrorOut = pnerrorOut;\n }", "public java.lang.String getPverrorOut() {\n return pverrorOut;\n }", "public void setPverrorOut(java.lang.String pverrorOut) {\n this.pverrorOut = pverrorOut;\n }", "public String getOutAccountNo(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Methode dessineIncendies dessine les incendies dans la zone de dessin
public void dessineIncendies(){ for(Incendie inc : incendies){ if(inc.getIntensite()>0){ gui.addGraphicalElement(new ImageElement(inc.getCase().getColonne()*largeurCase, inc.getCase().getLigne()*longueurCase, "cartes/incendie.jpg", longueurCase, longueurCase, null)); gui.addGraphicalElement(new Text(inc.getCa...
[ "public void addDeActiveness(){\n deActiveInARow +=1;\n }", "public void asseche() {\r\n \t\r\n \t/** \r\n \tDeux tableaux pour pouvoir acceder a notre guise aux Zone et aux typeZone\r\n \tselon nos besoins et selon les types des parametres des fonctions utilisees\r\n \tCeux ci s...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create new solutions in the population Generate send receive and execute jobs based on their execution and communication times
public void generateJob() { total_rt = 0; /*taskArray[0]= 2; taskArray[1]= 2; taskArray[2]= 1; taskArray[3]= 2; taskArray[4]= 1; taskArray[5]= 2; taskArray[6]= 2; taskArray[7]= 0; taskArray[8]= 1; taskArray[9]= 2; taskArray[10]= 0; taskArray[11]= 0; taskArray[12]= 2; taskArray[1...
[ "public void createJobs(){\n \t\n \tjobSimulator.simulateJobs(this.list, this.timeToPlay);\n\n }", "public static void creator7(){\r\n\t\tJobList list = new JobList();\r\n\t\t//\r\n\t\t// // job 1\r\n\t\t// String[] inputs = new String[2];\r\n\t\t// inputs[0] = \"inputs/1.txt\";\r\n\t\t// inputs[1] = \"i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get band mode: 1system, 2system etc.
public String getBandMode() { return _avTable.get(ATTR_BAND_MODE); }
[ "int getMode();", "public String getBaseBandVersion() {\n return SystemProperties.get(\"gsm.version.baseband\", \"Unknown\");\n }", "String getModes();", "public void setBandMode(String value) {\n _avTable.set(ATTR_BAND_MODE, value);\n }", "MeasuringMode getMode();", "public String get...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Query test case format id.
public String queryTestCaseFormatID(String testcaseId, String projId, String storyId, String defName){ String formattedID = ""; String testCaseRegex = "^/testcase/"; String formatRegex = "^FormattedID[\\s]*:[\\s]*"; RequestInfo rInfo = new RequestInfo(); //Retrieve the TestCase FormattedID using the ...
[ "String getCaseExecutionId();", "String experimentId();", "@Query(\"SELECT id FROM HydraTest where fullTestSpec=:fullTestSpec AND hydraTestsuiteId=:hydraTestsuiteId\")\n Integer getHydraTestId(@Param(\"fullTestSpec\") String fullTestSpec,\n @Param(\"hydraTestsuiteId\") Integer hydraTestsuite...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Indicates if the isWriteOnly flag was set via external metadata.
public boolean isSetWriteOnly() { return isWriteOnly != null; }
[ "boolean isWriteOnly();", "public Boolean getWriteOnly() {\n\t\treturn writeOnly;\n\t}", "public void setWriteOnly(boolean isWriteOnly) {\r\n this.isWriteOnly = isWriteOnly;\r\n }", "public void setWriteOnly(boolean is) {\n _writeOnly = is;\n }", "public boolean getWriteOnly() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the importance attribute of the Issue object
public void setImportance(int tmp) { this.importance = tmp; }
[ "public void setImportance(int importance){\n this.importance = importance;\n }", "public void setImportance(typekey.ImportanceLevel value);", "public void setImportance(String importance) {\n\t\tthis.importance = importance;\n\t}", "public void setDifferenceImportance(double differenceImportance) {...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method Purpose: Reads the hidden password input by user. Parameters: String prompt Return Value: String password
private static String readPassword (String prompt) { HidePass et = new HidePass(prompt); Thread mask = new Thread(et); mask.start(); BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); String password = ""; try { password = in.readLine(); } catch (IOException...
[ "public String askPassword();", "public void showPasswordPrompt();", "public void passwordprompt() {\n System.out.println(\"Please enter your password:\");\n }", "public String readPassword() {\n if (this.console != null) {\n return new String(this.console.readPassword());\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column item_file.file_quarter
public void setFileQuarter(String fileQuarter) { this.fileQuarter = fileQuarter == null ? null : fileQuarter.trim(); }
[ "public String getFileQuarter() {\n return fileQuarter;\n }", "public void setQuarter(String quarter) {\r\n this.quarter = quarter;\r\n }", "public void setQuarter(Quarter p) {\n\t\tthis.quarter = p;\n\t}", "public void setQuarterName(String quarterName) {\n this.quarterName = quart...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
interface Builder: An interface to define all the builder classes in the database package. The build() method must be implemented by all Builder classes so that the respective TableEntity can be added to the table.
public interface Builder { TableEntity build(); }
[ "private Table(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private Table(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private TableDefinition(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
LinkedHashMap> contextVariables iterate over all stack frames (stackID, the key used in the contextVariables LinkedHashMap) and remove the stackID variable if its name matches
public void unsetContextVariable(String varName) { Logger.info("I have been called to unset " + varName); contextVariables.forEach((key,value) -> { //Logger.info("Current Key is " + key); //for (String aKey : value.keySet()) { //Logger.info("Found stackID level ke...
[ "public void depopulateContext(Context ctx) {\n Iterator iter = cl.getAllParameters();\n while (iter.hasNext()) {\n AbstractParameter param = (AbstractParameter) iter.next();\n String ctxKey = param.getContextKey();\n log.debug(\"remove ctx attr: \" + ctxKey + \"=\" + ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get number of bytes sent to clients
public float getClientsBytesSent() { return this._clientsBytesSent; }
[ "public long sentBytesCount() {\n return sentBytesCnt.longValue();\n }", "public static int size_p_sendts() {\n return (32 / 8);\n }", "public int getSendCount();", "public native long getSentPacketCount()\n throws IOException, IllegalArgumentException;", "long getTotalServerS...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Computes the validity to be applied to the template resolution. This includes determining whether the template can be cached or not, and also in what circumstances (for instance, for how much time) can its cache entry be considered valid.
protected abstract ICacheEntryValidity computeValidity(final IEngineConfiguration configuration, final String ownerTemplate, final String template, final Map<String, Object> templateResolutionAttributes);
[ "public boolean isTemplateCacheRequired();", "boolean isValid(CacheValidity validity);", "CacheValidity generateValidity();", "public void validateCache();", "public boolean isValid() {\n boolean ret = System.currentTimeMillis() - this.timestamp < CACHE_ALIVE;\n ret = this.timestamp == 0 ? fal...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the counter group display name
public static String getCounterGroupName(String group, String defaultValue) { return getValue(group, "CounterGroupName", "", defaultValue); }
[ "public String getDisplayName(String counter) {\n return counter;\n }", "java.lang.String getGrpNm();", "public synchronized String toString() {\n StringBuilder sb = new StringBuilder(\"Counters: \" + size());\n for (Group group: this) {\n sb.append(\"\\n\\t\" + group.getDisplayName());\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructs instance of RelationshipServicePortImpl .
public RelationshipServicePortImpl() { }
[ "PortDefinition createPortDefinition();", "Port createPort();", "public Port createPort();", "DynamicPort createDynamicPort();", "private IC32ServiceProxy createPortProxy() {\n\t\tfinal URL WSDL_LOCATION = this.getClass().getClassLoader()\n\t\t\t\t.getResource(\"C32Service.wsdl\");\n\t\tfinal QName SERVICE ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method to delete a Faction.
@Override public void deleteFaction(@NotNull Faction faction) throws IllegalStateException { ((MassiveCoreFactionsFaction) faction).getFaction().detach(); }
[ "public void delete() {\n\n\t\t\n\t\t// Log:\n\t\tSaga.info(\"Deleting \" + getId() + \"(\" + getName() + \") faction.\");\n\t\t\n\t\t// Remove all members:\n\t\tArrayList<String> playerNames = getMembers();\n\t\tfor (int i = 0; i < playerNames.size(); i++) {\n\t\t\tremoveMember(playerNames.get(i));\n\t\t}\n\t\t\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
End setter Set the voting thresold.
public void setVotingThreshold(double votingThreshold) { this.votingThreshold = votingThreshold; }
[ "public void setVote(Long vote) {\n this.vote = vote;\n }", "public void vote(){\n\t\tvoterVoted = \"true\";\t\t\n\n\t}", "void setThreadVoteTotalStars(int value);", "public Votes(){\n this.votesUp = 0;\n this.votesDown = 0;\n this.totalVotes = 0;\n }", "public void setVote...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the value of the 'field458' field. doc for field458
public java.lang.CharSequence getField458() { return field458; }
[ "public java.lang.CharSequence getField458() {\n return field458;\n }", "public java.lang.CharSequence getField547() {\n return field547;\n }", "public java.lang.CharSequence getField483() {\n return field483;\n }", "public java.lang.CharSequence getField789() {\n return field789;\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the estimated position error.
public void setPositionError(GPSPositionError pos_error) { position_error_ = pos_error; lost_signal_ = false; repaint(); }
[ "public void setError(int err);", "protected void setError(EnrolleeSetupError error) {\n mError = error;\n }", "private void setLatitudeError (float latitude, Exception e, int error) {\n this.latitude = latitude;\n latitudeErrorMessage = e.toString();\n latitudeError = error;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a writer to the real response
public PrintWriter getRealResponseWriter() throws IOException { return super.getResponse() // the wrapped real response .getWriter(); }
[ "void augmentResponse(Writer out) throws IOException;", "public PrintWriter getWriter() throws IOException {\n return this.response.getWriter();\n }", "public PrintWriter getWriter() {\r\n try {\r\n return response.getWriter();\r\n } catch (IOException ex) {\r\n thr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
concat subJSONObject to mainJSONObject
public static void concat(JSONObject mainJSONObject, JSONObject subJSONObject) throws JSONException { try{ Iterator it = subJSONObject.keys(); String key; while(it.hasNext()){ key = (String)it.next(); mainJSONObject.put(key, subJSONObject.get(key)); } }catch(Exception e){ throw new J...
[ "static String mergeJSONString(String mainJsonString, String addJsonString) {\n JsonNode mainJson;\n JsonNode addJson;\n\n try {\n mainJson = mapper.readTree(mainJsonString);\n addJson = mapper.readTree(addJsonString);\n } catch (IOException e) {\n throw ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the result of interpreting the object as an instance of 'Invariant Exp CS'. This implementation returns null; returning a nonnull result will terminate the switch.
public T caseInvariantExpCS(InvariantExpCS object) { return null; }
[ "public T caseInvariantOrDefinitionCS(InvariantOrDefinitionCS object) {\r\n return null;\r\n }", "public T caseIfExpCS(IfExpCS object) {\r\n return null;\r\n }", "public T caseInitValueCS(InitValueCS object) {\r\n return null;\r\n }", "public T caseCallExpCS(CallExpCS object) {\r\n return null;...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Unsets the "volume" element
void unsetVolume();
[ "public void unsetVolume()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_attribute(VOLUME$52);\r\n }\r\n }", "public void resetVolume() {\n\t\tthis.volume = defaultVolume;\n\t}", "public void res...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A scope to be associated with this descriptor object. Note that at the current time a descriptor can only have one scope, hence this method will throw an IllegalArgumentException if in is called more than once.
public ActiveDescriptorBuilder in(Class<? extends Annotation> scope) throws IllegalArgumentException;
[ "public String getScope() {\n return scope;\n }", "public java.lang.String getScope() {\r\n return scope;\r\n }", "public IScope getScope(String name);", "public Scope scope() {\n return scope;\n }", "public abstract Scope getScopeRequest();", "@Nullable\n public String ge...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Changes the GUI so that the user can publish or not the activity
private void setGUIForPublishedStatus(boolean published) { if (published) { btnPublish.setVisibility(View.INVISIBLE); addInvitedContainer.setVisibility(View.INVISIBLE); tvPublishedStatus.setText("Published"); } else { btnPublish.setVisibility(View....
[ "@Override\n public void updatePublishedStatus(boolean published) {\n if (published) {\n activity.setDatePublished(new Date());\n setGUIForPublishedStatus(true);\n Toast toast = Toast.makeText(this, \"Activity has been published!\", Toast.LENGTH_SHORT);\n toast....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the currently selected node.
public DefaultMutableTreeNode getCurrentNode();
[ "public TreeNode getSelectedNode() {\r\n final TreeNode node = new TreeNode(selenium, getExpression());\r\n return node.getSelectedNode();\r\n }", "protected DefaultMutableTreeNode getSelectedNode() {\n\tTreePath selPath = tree.getSelectionPath();\n\n\tif(selPath != null)\n\t return (DefaultMutableTre...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__ExistPID__Group__2__Impl" $ANTLR start "rule__ExistPID__Group__3" InternalDsl.g:32240:1: rule__ExistPID__Group__3 : rule__ExistPID__Group__3__Impl ;
public final void rule__ExistPID__Group__3() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalDsl.g:32244:1: ( rule__ExistPID__Group__3__Impl ) // InternalDsl.g:32245:2: rule__ExistPID__Group__3__Impl { pushFollo...
[ "public final void rule__ExistPID__Group__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:32217:1: ( rule__ExistPID__Group__2__Impl rule__ExistPID__Group__3 )\n // InternalDsl.g:32218:2: rule__ExistPID__Group__2__I...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get an iterator for registered namespace URIs
public Iterator<String> getRegisteredNamespaceURIs() { return namespaces.getRegisteredURIs(); }
[ "public abstract Iterator getNamespacePrefixes();", "@SuppressWarnings(\"unchecked\")\n public Iterator getPrefixes(String namespaceURI) {\n return namespaces.entrySet().iterator();\n }", "public abstract Iterator getVisibleNamespacePrefixes();", "@Override\n public Iterator<String> getPrefixe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }