query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
2. Make Basic Blocks using leaders
public void makeBasicBlock(String fileName) { ArrayList<String> ucodes; try { BufferedReader br = new BufferedReader(new FileReader(fileName)); String line; int leaderSize = Leaders.size(); for (int i = 0; i < leaderSize; i++) { ucodes = new ArrayList<>(); while ((lineCount == totalLineNum) ||...
[ "Block createBlock();", "public void createSideBlocks() {\n Fill fill = new FillColor(Color.darkGray);\n Block topB = new Block(new Rectangle(new Point(0, 0), 800, 45), fill);\n Block rightB = new Block(new Rectangle(new Point(775, 25), 25, 576), fill);\n Block leftB = new Block(new Re...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Handle user's click on "medium button"
public void clickMedium(ActionEvent actionEvent) { current.getSelector().update(Selector.AnswerType.MEDIUM); nextCard(); }
[ "protected abstract void clickNow(int button);", "public void click()\r\n\t{\r\n\t\tsilentClick();\r\n\t}", "void onPositiveClick();", "public void onButtonAPressed();", "void bigButtonClicked(MouseEvent me) {\n\t\tEvent e = new Event();\n\t\te.button = me.button;\n\t\te.data = this;\n\t\te.display = me.dis...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tries to log an administrator into the application, if the given values in the textfields in the GUI are valid and corresponds to an existing admin. Gives an error message otherwise.
private void adminLogin() { Administrator admin = App.getDatabase().getAdminIfItExists(usernameTextField.getText()); if (admin != null) { if ((admin.getPassword() != null) && (admin.getPassword().equals(passwordField.getText()))) { AccountManager.setCurrentUser(admin); resetFields(); ...
[ "public void testLoginAsAdmin(){\n\t\t//input a user name that exists in database, with wrong password\n\t\t//and it should not login\n\t\tUtils.clearEditViews(solo, new EditText[]{userID,password});\n\t\tUtils.enterTextToEditView(solo, \n\t\t\t\tnew String[]{\"admin\",\"123456\"},\n\t\t\t\tnew EditText[]{password,...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the reader for the specified dataobject
private Reader getSourceReader( DataObject dataobject ) throws IOException { Reader reader; EditorCookie editor = ( EditorCookie )dataobject.getCookie( EditorCookie.class ); //If it's the currently open document that's being checked if( editor != null && editor.getOpenedPanes() != null ) { String text...
[ "public DataReader getReader () {\r\n\t\treturn (DataReader) getStateHelper().eval(PropertyKeys.reader);\r\n\t}", "public abstract DatumReader<T> getReader(Class<T> clazz);", "public Reader getReader()\r\n throws TorqueException\r\n {\r\n if (aReader == null && (this.readerId != 0))\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
.services.common.v1.JsonPayload didcomm_invitation = 3;
@java.lang.Override public trinsic.services.common.v1.CommonOuterClass.JsonPayload getDidcommInvitation() { if (deliveryMethodCase_ == 3) { return (trinsic.services.common.v1.CommonOuterClass.JsonPayload) deliveryMethod_; } return trinsic.services.common.v1.CommonOuterClass.JsonPayload.ge...
[ "trinsic.services.common.v1.CommonOuterClass.JsonPayload getDidcommInvitation();", "trinsic.services.common.v1.CommonOuterClass.JsonPayloadOrBuilder getDidcommInvitationOrBuilder();", "trinsic.services.ProviderService.InviteRequest.DidCommInvitation getDidcommInvitation();", "trinsic.services.ProviderService....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the boolean value of whether the tram with the corresponding tramID exists in any route
public boolean tramExists(long tramID) { for (TramRoute route : routes.values()) { if (route.tramExists(tramID)) { return true; } } return false; }
[ "public boolean tramExists(long tramID, int routeID) {\n TramRoute route = routes.get(routeID);\n if (route != null) {\n return route.tramExists(tramID);\n }\n return false;\n \n }", "public boolean routeExists(int routeID) {\n return routes.containsKey(rout...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets a new AccountDao of the default type
public static AccountDao getAccountDao() throws DaoException { return getAccountDao(DEFAULT_DAO); }
[ "public static AccountDao getAccountDao(int daoType) throws DaoException {\n AccountDao dao = null;\n\n switch (daoType) {\n case DATABASE_DAO:\n // no-op: this is for future use\n break;\n case FILE_DAO:\n default:\n dao = new FileAccountDaoImpl();...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the color corresponding to a tetrimino type.
public static TetriminoColor getColorFromType(final TetriminoType type) { final TetriminoColor[] palette = { new TetriminoColor(20, 255, 255), // stick new TetriminoColor(240, 240, 20), // box new TetriminoColor(130, 30, 130), // stairs new TetriminoColor(40, 255, 40), // right snake new TetriminoColor...
[ "public Color getColor(BlockType type) {\n\t\tswitch (type) {\n\t\tcase Z : \n\t\t\treturn z;\n\t\tcase S :\n\t\t\treturn s;\n\t\tcase LEFT :\n\t\t\treturn left;\n\t\tcase RIGHT : \n\t\t\treturn right;\n\t\tcase LINE :\n\t\t\treturn line;\n\t\tcase TRIANGLE :\n\t\t\treturn tri;\n\t\tcase SQUARE :\n\t\t\treturn squa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ see superclass Find mappings for map set.
@SuppressWarnings({ "unchecked" }) @Override public MappingList findMappingsForMapSet(Long mapSetId, String query, PfsParameter pfs) throws Exception { Logger.getLogger(getClass()).debug( "Content Service - find mappings " + mapSetId + ", query=" + query); final StringBuilder sb = new Str...
[ "public Mapper[] findMappers();", "public abstract List<AttrMapping> getMappings();", "public Set<MyMap1A.Entry<K, V>> entrySet();", "String[][] getAbstractMappings();", "public String getMapping();", "static Set get_mapping(HashMap callee_to_caller, Node callee_n) {\n Set s = (Set)callee_to_caller...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__Actor__NameAssignment" $ANTLR start "rule__Subject__NameAssignment_1" ../br.com.levysiqueira.dsl.textualusecase.ui/srcgen/br/com/levysiqueira/dsl/textualusecase/ui/contentassist/antlr/internal/InternalTextualUseCase.g:3498:1: rule__Subject__NameAssignment_1 : ( ruleName ) ;
public final void rule__Subject__NameAssignment_1() throws RecognitionException { int stackSize = keepStackSize(); try { // ../br.com.levysiqueira.dsl.textualusecase.ui/src-gen/br/com/levysiqueira/dsl/textualusecase/ui/contentassist/antlr/internal/InternalTextualUseCase.g:350...
[ "public final void rule__Subject__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../br.com.levysiqueira.dsl.textualusecase.ui/src-gen/br/com/levysiqueira/dsl/textualusecase/ui/contentassist/antlr/internal/InternalTextualUse...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the post generator effects. For the client it is things like colors. For the server it are things like mob spawning.
public abstract void setEffects(BiomeConfig config);
[ "public void setEffects(String sE) {\n effects = sE;\n }", "public void setEffect(String effect){\n this.effect = effect;\n }", "public void setTransitionEffects() {\r\n\r\n }", "private void defineEffects() {\n EffectElementFactory factory = EffectElementFactory.getNewInstance(thi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
takes the binary representation of a string and returns the inverse of it bitFlip(String)
public static String bitFlip(String source){ String out = ""; for(int i = 0; i < source.length(); i++){ if(source.charAt(i) == '1'){ out = out + '0'; } else { out = out + '1'; } } return out; }
[ "private String invertBitString(String bitString) {\r\n return bitString.replaceAll(\"0\", \"x\").replaceAll(\"1\", \"0\").replaceAll(\"x\", \"1\");\r\n }", "public static String invertBinaryString(String binaryString) {\n // Invert bits\n StringBuilder builder = new StringBuilder();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets all tiles in the board grid as either sea tiles or the board game tiles using the setTile method in the Board class. The sea tiles will always be located in the same place The tile locations are all within the TileStack class which also shuffles them. setTiles() simply pops the TilesEnums from the TileStack and se...
public void setTiles() { TileStack names = new TileStack(); for(int x=0; x < theBoard.getCols(); x++) { for(int y=0; y < theBoard.getRows(); y++) { p = new Point(x,y); if(p.equals(new Point(0,0))) theBoard.setTile(p, TilesEnums.SEA); else if(p.equals(new Point(1,0))) theBoard.setTile(p, Ti...
[ "private void setBoardTiles() {\n\t\t// set all Tile board points\n\t\tfor (Dimension location : BoardMap.getTileLocationsDim()) {\n\t\t\tGameBoardTile tile = new GameBoardTile(this/* assigns itself as parent */, location.width, location.height) {\n\n\t\t\t\t// fires this function when there is clicked on this obje...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the direct delivery Indicates if the product is available for direct delivery or not.
public String getDirectDelivery() { return directDelivery; }
[ "public boolean isDelivery(){\r\n return delivery;\r\n }", "public boolean isDelivery() {\n\t\treturn type.equals(\"delivery\") ? true: false;\n\t}", "public int getHas_delivery_charge() {\n return has_delivery_charge;\n }", "public boolean hasDelivery() {\n return fieldSetFlags()[15]...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the value of the 'AWAY_TEAM' field.
public java.lang.CharSequence getAWAYTEAM() { return AWAY_TEAM; }
[ "public java.lang.CharSequence getAWAYTEAM() {\n return AWAY_TEAM;\n }", "public void setAWAYTEAM(java.lang.CharSequence value) {\n this.AWAY_TEAM = value;\n }", "public String getAwayTeam() throws JSONException {\n return mGame.getString(\"away_team\");\n }", "public org.LNDCDC_NCS_TCS.SHOW...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the config object associated with the given world
public static Config get(World world) { for (Config c : CONFIGS) { if (c.world.equals(world)) { return c; } } loadConfigs(); for (Config c : CONFIGS) { if (c.world.equals(world)) { return c; } } ...
[ "public PerWorldConfig getConfig(World world){\n \t\treturn config.get(world);\n \t}", "public WorldConfig getWorldConfig(String name) \n\t{\n\t\treturn worldConfigs.get(name);\n\t}", "public static World getWorld()\n {\n Configuration c = ArenaManager.config;\n c.load();\n \n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "ruleQualifiedName" $ANTLR start "entryRuleGImportStatement" ../org.gemoc.gel.xtext.ui/srcgen/org/gemoc/gel/ui/contentassist/antlr/internal/InternalGEL.g:987:1: entryRuleGImportStatement : ruleGImportStatement EOF ;
public final void entryRuleGImportStatement() throws RecognitionException { try { // ../org.gemoc.gel.xtext.ui/src-gen/org/gemoc/gel/ui/contentassist/antlr/internal/InternalGEL.g:988:1: ( ruleGImportStatement EOF ) // ../org.gemoc.gel.xtext.ui/src-gen/org/gemoc/gel/ui/contentassist/antlr...
[ "private String importDeclaration()\r\n {\r\n String handle;\r\n\r\n matchKeyword(Keyword.IMPORTSY);\r\n handle = nextToken.string;\r\n matchKeyword(Keyword.IDENTSY);\r\n handle = qualifiedImport(handle);\r\n matchKeyword(Keyword.SEMICOLONSY);\r\n\r\n return handle;\r\n }", "publ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
public methods Only searches the services directory inside the plugin folder and loads them.
@SuppressWarnings("unused") public void loadLocalServices() { registerServicesFromDirectories(this.localServiceDirectory, true); }
[ "@SuppressWarnings(\"unused\")\n public void loadServices() {\n if (Objects.nonNull(this.localServiceDirectory)) {\n registerServicesFromDirectories(this.localServiceDirectory, true);\n }\n\n if (Objects.nonNull(this.remoteServiceDirectories)) {\n for (File directory : ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a circular mask and store it as double array.
public static double[] circularMask(int width, int height, int radius){ double[] mask = new double[width*height]; int hWidth = width >> 1; int hHeight = height >> 1; for (int j=0; j<height; j++) for (int i=0; i<width; i++) { int rad2 = (i-hWidth)*(i-hWidth)+(...
[ "public static CircleWithPrivateDataFields[] createCircleArray() \n { \n CircleWithPrivateDataFields[] circleArray =\r\n new CircleWithPrivateDataFields[5];\n for (int i = 0; i < circleArray.length; i++) \n { \n circleArray[i] =\n new CircleWithPrivateDataFields(Math.rand...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
======================================================= End of Inquiry Button element ======================================================== ==================================================== Start of Unverified Products element ==================================================== To click on Unverified Supplier Na...
public static WebElement lnk_clickUnvSuppName() throws Exception{ try{ element = driver.findElement(By.xpath("(//*[@id='unverifpparea']//p[1]/a)[position()=1]")); WebDriverWait wait = new WebDriverWait(driver, 15); wait.until(ExpectedConditions.elementToBeClickable(element)); ...
[ "public static WebElement lnk_clickUnvSupplierNameTitle() throws Exception{\r\n \ttry{\r\n \t\telement = driver.findElement(By.xpath(\"(//*[contains(@class, 'unverified_detail')]//a)[position()=1]\"));\r\n \t\tAdd_Log.info(\"Unverified Supplier name title is click on the page.\");\r\n \t\t\r\n \t}cat...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set soap action to the message
public void setSoapAction(String soapAction) { this.soapAction = soapAction; }
[ "public void setSoapAction(String soapAction)\n {\n if ( ( soapAction != null) && ( !soapAction.equals(\"\")) )\n {\n mSoapAction = soapAction;\n }\n }", "public String getSoapAction() {\n return soapAction;\n }", "public void setAction(java.lang.String action);",...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
When activity resumes, check if preferences changed and if so, recreate activity
@Override protected void onResume() { super.onResume(); Log.v(LOG_TAG, "onResume called"); Log.v(LOG_TAG, "GinboxPreferenceFragment.mPreferencesChanged: " + SettingsActivity.GinboxPreferenceFragment.mPreferencesChanged); if (SettingsActivity.GinboxPreferenceFragment.mPreferencesChang...
[ "private void onPreferenceChanged() {\n restartActivity(MainActivity.this);\n }", "@Override\n protected void onResume() {\n super.onResume();\n SharedPreferences sharedPreferences = getSharedPreferences(\"com.example.ivonneortega.the_news_project.Settings\", Context.MODE_PRIVATE);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
gets the exchange rate trend
private Trend getExchangeRateTrend(JSONObject obj, String targetCurrency) { List<Date> lastFiveDays = new ArrayList<>(); try { for (String key : obj.keySet()) { lastFiveDays.add(dateFormat.parse(key)); } Collections.sort(lastFiveDays); } catch...
[ "double getTransRate();", "Rate getExpenseRate();", "double getBaseRate();", "Rate getRevenueRate();", "public BigDecimal getTELLER_RATE() {\r\n return TELLER_RATE;\r\n }", "Float getEurRate();", "public double tradeRate()\n\t{\n\t\treturn _dblTradeRate;\n\t}", "public double getExchangeRate...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
end case 1735 Setter for property cvUserRights.
public void setUserRights(edu.mit.coeus.utils.CoeusVector cvUserRights) { this.cvUserRights = cvUserRights; }
[ "public void setRights(int rights) {\r\n this.rights = rights;\r\n }", "public void setAccessRight(java.lang.String value);", "public void setInstitutePropRights(edu.mit.coeus.utils.CoeusVector cvInstitutePropRights) {\r\n this.cvInstitutePropRights = cvInstitutePropRights;\r\n }", "Text s...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the QA check.
public void setQACheck(boolean isQACheck);
[ "public void validateQASite() {\n\t\textTestObj.createNode(\"Starting QA site validation\").info(\"INFO\");\n\t\tlog.info(\"Starting QA site validation\");\n\t\ttry {\n\t\t\tseetest.hybridClearCache();\n\t\t\tdriver.get(prop.getProperty(\"url\"));\n\t\t\texplicitWait(Elements.popUpCloseButton);\n\t\t\tlog.info(\"QA...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The function returns the numeric value for the enumeration. Example for use: int x = HeroineEnum.MinimapCursorEnum.MINIMAP_CURSOR_BLOCK_RIGHT.getValue(); Return the numeric value for the enumeration.
public int getValue() { return minimapCursorEnum; }
[ "public int getValue() \n {\n return minimapEnum;\n }", "public int getValue() \n {\n return powerResultEnum;\n }", "public int getValue() \n {\n return magicItemEnum;\n }", "public int getValue() \n {\n return itemEn...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the ref inv no.
public String getRefInvNo() { return refInvNo; }
[ "public BigDecimal getREF_NO() {\r\n return REF_NO;\r\n }", "public void setRefInvNo(String refInvNo) {\n\t\tthis.refInvNo = refInvNo;\n\t}", "public java.lang.String getRefNo() {\n return RefNo;\n }", "@Override\n public String getRefNo() {\n return refNo;\n }", "public Big...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds the line of code on the current depth.
public void addLine(String codeLine) { checkNotNull(codeLine); CodeLine line = new CodeLine(codeLine, currentDepth); codeLines.add(line); }
[ "public JasminBytecode add( String line ) {\n jasminCode.add(line);\n return this;\n }", "private void addLine()\n\t{\n\t\tlines.add(printerFormatter.markEOL());\n\t}", "public void inc()\n {\n _level++;\n calculateIndentationString();\n }", "public void addLine() {\n addLine(\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Devuelve true si encuentra un numero en un archivo, de lo contrario devuelve false
static boolean existeEnArchivo(String path,int num) { return false; }
[ "public boolean esNumero() {\n if(Character.isDigit(caracter_actual)) {\n String numero = \"\";\n while (Character.isDigit(caracter_actual)) {\n numero += caracter_actual;\n if(Character.isDigit(caracter_siguiente))\n avanzar();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Initializes all nodes and edges in the diagram which were added since the last call to initialize.
public void initialize() { fGraph.initialize(); }
[ "public void initialize() {\n\t\tnodes = new Node[rows][columns];\n\t\thorizontalEdges = new Edge[rows][columns - 1];\n\t\tverticalEdges = new Edge[rows - 1][columns];\n\t\t\n\t\t// Create nodes\n\t\tfor (int i = 0; i < nodes.length; i++) {\n\t\t\tfor (int j = 0; j < nodes[i].length; j++) {\n\t\t\t\tnodes[i][j] = n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates an instance of SqlContainerCreateUpdateParameters class.
public SqlContainerCreateUpdateParameters() { }
[ "Parameters createParameters();", "public ControllerUpdateParametersProperties() {\n }", "public WorkspacePropertiesUpdateParameters() {\n }", "public VaultCreateOrUpdateParameters() {\n }", "ActualParameters createActualParameters();", "Update createUpdate();", "UpdateType createUpdateType();"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
DATABASE MAPPING : FI_NGUOITAO ( VARCHAR2 )
public void setFiNguoitao( String fiNguoitao ) { this.fiNguoitao = fiNguoitao; }
[ "public void setFiNguoitao(String fiNguoitao) {\n this.fiNguoitao = fiNguoitao;\n }", "public int nun_entidade_bd(){\r\n return 4;\r\n }", "public static String getIndServicioFarmaSix() throws SQLException {\n parametros = new ArrayList();\n parametros.add(FarmaVariables.vCodGr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
get current url address
String getCurrentUrl();
[ "public String getCurrentUrl() {\n \t\treturn getWebDriver().getCurrentUrl();\n \t}", "public String getCurrentUrl() {\n\t\tString currentUrl = \"\";\n\t\ttry {\n\t\t\tcurrentUrl = driver.getCurrentUrl();\n\t\t\tlog.info(\"Current url : \" + currentUrl);\n\t\t} catch (Exception ex) {\n\t\t\texceptionMessage = ex....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This is the main interface to implement when new types of scrapers are needed, other classes need not be touched. Implementations are required to have a noarg ctor!
public interface Scraper { /** * Specify fields which will be generating when scraping. */ FieldDef[] fields(); /** * Scrape whatever necessary from given url and feed results to {@code scraperOutput::yield}. */ void scrapeUrl(String url, ScraperBase.LoggerForScraper logger, ScraperO...
[ "public PageCrawler() {\n this(new CrawlSettings());\n }", "public WebScraper(String urlIn)\r\n\t{\r\n\t\tdepth = DEPTH_DEFAULT;\r\n\t\tsetURL(urlIn);\r\n\t}", "public interface WebCrawlerInterface {\n\t\n\t/**\n\t * This method crawls all the links found by following links found within the URL provided by ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the Reason for Leave.
public final String getLeaveReason() { return leaveReason; }
[ "public String getLeaveMessage() {\n return leaveMessage;\n }", "public String getReason() {\n return (String)getAttributeInternal(REASON);\n }", "java.lang.String getReason();", "public final LeaveStatus getLeaveStatus() {\n return leaveStatus;\n }", "public final LeaveType getLeave...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ AutoSearch for Medicine list
@GetMapping(value = "rest-medicineNameList") public JsonResponse<List<RestPatientMedicationModel>> getmedNameAutoSearchList(@RequestParam String id) { logger.info("Method : getmedNameAutoSearchList starts"); logger.info("Method :getmedNameAutoSearchList ends"); return medicationDao.getMedNameAutoSearchListDao(i...
[ "public MedicalStore searchMedicalStore(String medicineName);", "top.itcat.pb_gen.common.MedicalModel.Medicine getList(int index);", "@Override\n\tpublic void searchByMobile() {\n\t\tcount = 0;\n\t\tif (UtilityClinic.patFile == null) {\n\t\t\ttry {\n\t\t\t\tutil.accessExistingPatJson();\n\t\t\t} catch (FileNotF...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the sink that this decoder writes to. The sink must implement the ByteSink interface.
public void setSink (Object sink) { out = (ByteSink) sink; }
[ "public void setObjSink(final T objSink) {\n this.objSink = objSink;\n }", "public void setValueSink(IPassiveValueSink<T> valueSink);", "public void SetVaporSink() {\r\n\t\tif (vaporType == VaporEnum.SINK) return;\r\n\t\telse if (vaporType == VaporEnum.SOURCE) GlobalFuncs.scenMap.vaporSourceList.remov...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__Partition__Group__1__Impl" $ANTLR start "rule__Partition__Group__2" InternalMLRegression.g:1785:1: rule__Partition__Group__2 : rule__Partition__Group__2__Impl rule__Partition__Group__3 ;
public final void rule__Partition__Group__2() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalMLRegression.g:1789:1: ( rule__Partition__Group__2__Impl rule__Partition__Group__3 ) // InternalMLRegression.g:1790:2: rule__Partition__Group...
[ "public final void rule__Partition__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMLRegression.g:1762:1: ( rule__Partition__Group__1__Impl rule__Partition__Group__2 )\n // InternalMLRegression.g:1763:2: rule__Pa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Instantiates a new Amzn area picker map fragment.
public AmznAreaPickerMapFragment() { }
[ "private MapArea() {\n initFields();\n }", "void onAmznMapFragmentAreaInputChange(int areaType);", "public AreaSelection() {\n initComponents();\n }", "AREA createAREA();", "public MapsFragment() {\n }", "public abstract Area newArea();", "private void setupMapSelectionArea() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test case number: 20 / 1 covered goal: 1 nu.staldal.xtree.SequentialTreeBuilder.skippedEntity(Ljava/lang/String;)V: I4 Branch 16 IFLE L312 true
@Test public void test20() throws Throwable { SequentialTreeBuilder sequentialTreeBuilder0 = new SequentialTreeBuilder((ElementHandler) null); sequentialTreeBuilder0.skippedEntity("}Ok"); }
[ "@Test\n public void test21() throws Throwable {\n SequentialTreeBuilder sequentialTreeBuilder0 = new SequentialTreeBuilder((ElementHandler) null);\n AttributesImpl attributesImpl0 = new AttributesImpl();\n sequentialTreeBuilder0.startElement(\"No text content\", \"No text content\", \"\", (Attrib...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
//////////////////////////////////////////////////// absolute value of a DD ////////////////////////////////////////////////////
public static DD abs(DD dd) { // dd is a leaf if (dd.getVar() == 0) { if (dd.getVal() >= 0) return dd; else return DDleaf.myNew(-dd.getVal(), dd.getConfig()); } // dd is a node else { DD children[]; children = new DD[dd.getChildren().length]; for (int i = 0; i < dd.getChildren().lengt...
[ "public int adx(){return Math.abs(dx());}", "public int getAbsDecl_d ( ) {\r\n\t\tdouble d = getDecl();\r\n\t\tif (d < 0.0)\r\n\t\t\td = - d;\r\n\t\treturn (int)Math.abs(d + 0.0000001);\r\n\t}", "public int getDyaAbs()\n {\n return field_15_dyaAbs;\n }", "public int getDxaAbs()\n {\n re...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Metodo: Imprimir Funcao: Armazenar na Fila o texto a ser impresso Parametros: texto : String Retorno: void
public void imprimir(String texto) { if (imprimir) {//Verificando se pode adicionar a Fila this.filaImpressao.add(texto);//Adicionando a Fila this.controlador.release();//Liberando execucao da Thread } }
[ "public void setTexto(String texto) {\n\t\tlogger.error(\"Asignando valor\");\t\t\n\t\tthis.texto = texto;\n\t}", "public void clicarPorTexto(String texto) {\r\n \tclicar(By.xpath(\"//*[@text=' + texto + ']\"));\r\n\t}", "public void ImprimirNombre(){\n \r\n System.out.println(nombre);\r\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return the selected indexes of the authors of the book model.
int[] getSelectedAuthorsBookIndexes();
[ "int[] getSelectedAuthorsIndexes();", "public List<Author> selectAllAuthors();", "DefaultListModel getAuthorsBookModel();", "java.lang.String getAuthorities(int index);", "java.lang.String getAuthors(int index);", "DefaultListModel getAuthorsModel();", "@Override\r\n public List<Booksauthors> getBook...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Month property integer property.
public IntegerProperty monthProperty() { return month; }
[ "public int getMonth() { return number; }", "public void setMonth(java.lang.Integer value) {\n this.month = value;\n }", "public int intValue()\n {\n return this.month;\n }", "public int getMonthValue(){\n\t\treturn monthValue;\n\t}", "public Integer getDatemonth() {\n return datemonth;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Provide a text description of the event flavour
public static String event_flavor(int ef) { switch(ef) { case 1: return "key"; case 2: return "mouse"; case 3: return "touch"; } return "type?"; }
[ "public String getFlavourText() {\n\t\treturn FlavourText;\n\t}", "@Override\n\tpublic java.lang.String getDescription() {\n\t\treturn _events.getDescription();\n\t}", "public void setFlavourText(String flavourText) {\n\t\tFlavourText = flavourText;\n\t}", "private String getEventDescription(Event event) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a default handler for deserializing an XCAS into the cas parameter. Warning: for efficiency reasons, the deserializer does not do much type checking for features and their values. It is expected that the incoming XCAS conforms to the type system provided. If it doesn't, the results are undefined.
public DefaultHandler getXCASHandler(CAS cas) { return getXCASHandler(cas, null); }
[ "public DefaultHandler getXCASHandler(CAS cas, OutOfTypeSystemData outOfTypeSystemData) {\n return new XCASDeserializerHandler((CASImpl) cas, outOfTypeSystemData);\n }", "private void _testConversions(CAS aCAS) throws IOException, ParserConfigurationException,\n SAXException, ResourceInitializationEx...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODOPPA1 Solution Start The build method is called once, when your RayTracerScreen is first created. 1) Create the GLProgram by compiling and linking the vertex and fragment shaders 2) Load the scene from XML 3) Set VP matrix for the first time???????? 4) Set up any data/buffers necessary to transfer to the shaders 5) ...
@Override public void build() { program = new GLProgram(false); // TODO#PPA1: load shaders from src and create program (using available framework methods) program.quickCreateResource("", "cs4621/GPUray/shaders/raytracer.vert", "cs4621/GPUray/shaders/raytracer.frag", null); // TODO#PP...
[ "public void start() {\n GL20.glUseProgram(programId);\n }", "protected void setupSceneGraph()\n {\n shaderCallback = new BulkShaderLoadStatusCallback();\n\n Vector3d real_view_pos = new Vector3d();\n real_view_pos.set(0, 0, 20.0f);\n\n MRTOffscreenTexture2D gbuffer_tex = ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check if act as Restful many children via parent update method
public boolean isRestfulRelatedToManyUpdate() { return Arrays.asList("PUT", "PATCH").contains(httpMethod.toUpperCase()) && isRelatedToManyPath() ; }
[ "public boolean isRestfulRelatedUpdate() {\n return Arrays.asList(\"PUT\", \"PATCH\").contains(httpMethod.toUpperCase()) && isParentChildPath() ;\n }", "public boolean isRestfulRelatedToManyCreate() {\n return \"POST\".equalsIgnoreCase(httpMethod) && isRelatedToManyPath() ;\n }", "public boo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
end of switchToMin method switchToMax(): transforms a min to a maxpriority queue; else leave unchanged.
public void switchToMax() { if(currentState.equalsIgnoreCase(MIN_HEAP)) { currentState = MAX_HEAP; rebuildHeap(); } }
[ "protected final void setMax() {\n\n\tint prevmax = this.max;\n\n\tint i1 = this.high;\n\tint i2 = left.max;\n\tint i3 = right.max;\n\n\tif ((i1 >= i2) && (i1 >= i3)) {\n\t this.max = i1;\n\t} else if ((i2 >= i1) && (i2 >= i3)) {\n\t this.max = i2;\n\t} else {\n\t this.max = i3;\n\t}\n\t\n\tif ((p != Inter...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the first e s f field e s f electronic in the ordered set where electronicId = &63;.
public static it.ethica.esf.model.ESFFieldESFElectronic findByElectronicId_First( long electronicId, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException, it.ethica.esf.NoSuchFieldESFElectronicException { return getPersistence() ...
[ "public static it.ethica.esf.model.ESFFieldESFElectronic fetchByElectronicId_First(\n\t\tlong electronicId,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException {\n\t\treturn getPersistence()\n\t\t\t\t .fetchByElectronicId_First(e...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new database connection to a given URL.
public static Connection createConnection(String url, Properties prop) throws SQLException { if (!isValidURL(url)){ return null; } return new HttpdbConnection(url.trim(), prop); }
[ "public Connection newConnection(String url, String user, String password) throws SQLException;", "public DatabaseInterface(String url) throws SQLException {\n sql = DriverManager.getConnection(url);\n }", "private static Connection createConnection(String url, String pass,\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The action triggered by pushing the save and train button on the GUI creates a new training set, saves it into a dat file and displays it.
@FXML protected void trainAndSaveDirectory() throws ClassNotFoundException, IOException { // the number of eigenfaces to be created int n; // handle exceptions pertaining to user input try { n = Integer.parseInt(tfNumberOfEigenfaces.getText()); } ...
[ "private void jButton_SaveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton_SaveActionPerformed\n // TODO add your handling code here:\n saveToFile();\n //new FittingCriteria(this.digPopGUIInformation, this.currentMarkovChainId).setVisible(true);\n new StepThree(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Pieces of fileText for the NGram
public static HashMap calculateNGram(String fileText,int counter){ HashMap<String, Integer> hmap = new HashMap<String, Integer>(); for (int i = 0;i<(fileText.length()-counter);i++){ for (int j = 0; j<counter;j++){ //total += (fileText.substring(i,i+counter) +", "); ...
[ "public List<String> getnGrams(ExtractedFileData extractedFileData, int n){\n String content = extractedFileData.getContent().replaceAll(\"[^\\\\w\\\\s\\\\ ]\", \"\").toLowerCase();\n NGram nGram = new NGram(content,n);\n return nGram.list();\n }", "public static List<String> genNgram(int ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Slide out transition animation that slides out element when exiting the layout from its position to the parent edge in the given direction.
private static SlideOutTransition slideOutTransition(@SlideDirection int direction) { return new SlideOutTransition.Builder().setDirection(direction).build(); }
[ "public final void easeOut() {\n float originX = phasesUI.getX();\n MoveToAction out = new MoveToAction();\n out.setPosition(phasesUI.getWidth() * -1, phasesUI.getY());\n out.setDuration(PhaseConstants.PANEL_EASE_DURATION);\n\n VisibleAction hide = new VisibleAction();\n hi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ getPhenotype Get the phenotype for a sample
public int getPhenotype(int k) { for (int i = 0; i < numPhenotype; i++) { if (sample[k].isPhenotype(phenotypeName.get(i))) { return i; } } return -1; }
[ "public Phenotype<S> getPhenotype() {\n\t\treturn phenotype;\n\t}", "public int[] getPhenotype() {\n int[] p = new int[numSample];\n\n for (int i = 0; i < numSample; i++) {\n p[i] = getPhenotype(i);\n }\n\n return p;\n }", "public int[] getPhenotype(Text s) {\n T...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removes the ith "businessIndustryLicenses" element
public void removeBusinessIndustryLicenses(int i) { synchronized (monitor()) { check_orphaned(); get_store().remove_element(BUSINESSINDUSTRYLICENSES$22, i); } }
[ "void removeBusinessIndustryLicenses(int i);", "public void removeFromLinesOfBusiness(entity.AppCritLineOfBusiness element);", "public void removeFromCedingTransactions(entity.WCCededPremiumTransaction element);", "public void removeAllLicensee() {\r\n\t\tBase.removeAll(this.model, this.getResource(), LICENSE...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates new form Gui_lectura_consumo
public Gui_lectura_consumo() { initComponents(); centrarform(); consumo_capturado.setEditable(false); limpiarCajas(); }
[ "public frmContas() {\n initComponents();\n \n CondominioDAO condao = new CondominioDAO();\n \n for (Condominio con : condao.read()) {\n cmbCondominio.addItem(String.valueOf(con.getCodigo()));\n }\n }", "public frmTelaVendas() {\n initComponents();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns true if field address1 is set (has been assigned a value) and false otherwise
public boolean isSetAddress1() { return this.address1 != null; }
[ "public boolean isSetAddress1()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(ADDRESS1$0) != 0;\n }\n }", "public boolean isSetAddress1()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orp...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Initialize ULD Types if requested.
private static void initUldtypes(final String[] args) throws Exception { if (args.length == 0 || ArgsEvaluator.contains("ULDTYPES", args)) { UldtypeLoader uldtypeLoader = new UldtypeLoader(new File("./db/load_cart.dat")); uldtypeLoader.init(); } }
[ "private static void initDataTypeList()\n\t{\n\t\tfor(String numberType : DATA_TYPE_ARRAY)\n\t\t{\n\t\t\tdataTypeList.add(numberType);\n\t\t}\n\t\tlogger.info(\" --|*|-- All Data types are initialized! --|*|--\");\n\t}", "private void initObjectTypes()\n\t{\n\t\tfor (int i = 0;i < defaultObjectTypes.length;i++)\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the list of Place AP database file under the given folder
public static List<String> getPlaceApDatabaseFileList(String sParentFolder) { List<String> lstDBFileList = null; File flFolder; flFolder = new File(sParentFolder); if (flFolder.exists()) { File[] files = flFolder.listFiles(new FilenameFilter() { public boolean accept(File dir, String nam...
[ "public List<String> readDataFromDBStoreFile(String dbStoreFileName);", "public static File[] getFiles() {\r\n\t\tString path = plugin.getDataFolder() + \"/Queries\";\r\n\t\tFile folder = new File(path);\r\n\t\tFile[] list = folder.listFiles();\r\n\t\treturn list;\r\n\t}", "private List<String> getDataFromApi()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Construit un personnage avec son nombre de points de vies, de pieces d'or et de sa force
public Character(int nbLifPoints, int nbPieceOr, int force) { this.nbLifPoints = nbLifPoints; this.nbPieceOr = nbPieceOr; this.force = force; this.alive = true; }
[ "public void placerBateauSurVue() {\n\t\tint compteur = 1;\n\t\tif (partie.verifierSiPoseBateauPossible()) {\n\t\t\tfor (int i : partie.getJoueur().getBateau()[partie.getJoueur().getIndiceBateauEnCours()].getCaseOnId()) {\n\t\t\t\tif (i != -1)\n\t\t\t\t\tvue.setfield(i, partie.getJoueur().getBateau()[partie.getJoue...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks all messages sent against the provided regex. Executes the provided function when there is a match.
public void hear(Pattern regex, Function<RobotContext, Completable> f) { respond(regex, f, ""); }
[ "abstract void onPatternMatch();", "public static FastFilter matchText(final String regex) {\r\n if (regex == null || regex.equals(\"\")) {\r\n return none();\r\n }\r\n else {\r\n Pattern pattern = Pattern.compile(regex);\r\n return context -> pattern.matcher(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a SceneNode at the passed position
public SceneNode(Vector3 pos) { this(pos.x, pos.y, pos.z); }
[ "void createNode(BlockPos pos);", "Position createPosition();", "Node createNode();", "public SceneNode createChild() {\r\n\t\treturn createChild(new Vector3());\r\n\t}", "public Node createNode(Document doc, int position, File modelPath) {\r\n Node agentNode = doc.createElement(\"agentstyle\");\r\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column employee.gwsalary
public void setGwsalary(Float gwsalary) { this.gwsalary = gwsalary; }
[ "public void setSalary(double empSal) {\r\n salary = empSal;\r\n }", "public void setGongshicdbl(BigDecimal gongshicdbl) {\r\n this.gongshicdbl = gongshicdbl;\r\n }", "public Float getGwsalary() {\n return gwsalary;\n }", "public void setEmplSalary(double salary) {\n thi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
multiply via complex numbers the 10 and 8 together and store the result to the 10 vector
public void complex_mult_8_10() { final double t = x_10 * x_8 - y_10 * y_8; y_10 = x_10 * y_8 + y_10 * x_8; x_10 = t; }
[ "public void complex_mult_10_8() {\n final double t = x_8 * x_10 - y_8 * y_10;\n y_8 = x_8 * y_10 + y_8 * x_10;\n x_8 = t;\n }", "public void complex_mult_9_10() {\n final double t = x_10 * x_9 - y_10 * y_9;\n y_10 = x_10 * y_9 + y_10 * x_9;\n x_10 = t;\n }", "public void complex_mult_10_9()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Converts provided kilometer value to meters.
public static double kilometerToMeter(final double kilometer) { return kilometer * METERS_PER_KILOMETER; }
[ "public static double kilometersToUnits(double distanceKilometer) {\n\t\treturn Conversions.metersToUnits(distanceKilometer / (double) (1000));\n\t}", "public static double convertKilometersToMiles(double km)\n {\n return km / 1.60934;\n }", "public static double meterToKilometer(final double meter...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the operand index at the location
int getOperandIndex(ListingActionContext context) { ProgramLocation location = context.getLocation(); if (location instanceof OperandFieldLocation) { return ((OperandFieldLocation) location).getOperandIndex(); } return -1; }
[ "int getOperandPosition();", "Expression getIndexExpr();", "long getIndex();", "int getResultantVarIndex();", "Index getIndex(String symbol);", "public int getOperandType(int opIndex);", "public Expression getIndex()\n {\n return index;\n }", "public int getIndex(int position);", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Getter method for property dropAmount.
public double getDropAmount() { return dropAmount; }
[ "public List<Double> getDropAmount() {\n return dropAmount;\n }", "public void setDropAmount(double dropAmount) {\n this.dropAmount = dropAmount;\n }", "public float getBonusItemDrop() {\n return bonusItemDrop_;\n }", "public float getBonusItemDrop() {\n return bonusItemDrop...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Calculates the percent of fat in a Food object.
public abstract double percentFat();
[ "Float getFedAnimalsPercentage();", "public double caloriesInFat(double fatCalories, double calories)\n {\n double totalCalories = (fatCalories / calories) * 100;\n\n return totalCalories;\n }", "public float percentOfDiscount() {\n\t\treturn 0.7f; \r\n\t}", "public float getFoodPerDay(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method is called when a nested transaction manager is about to apply its changes to our data.
@Override public void startTransaction() { /* * This method is called only when transactions are nested. The nested * transaction will call this method before it applies the changes to * this transaction. */ insideTransaction = true; }
[ "protected void commitChanges() {\n getDataContext().commitChanges();\n }", "public void updateTransaction(Transaction trans);", "protected void processNontransactionalAtomicChanges()\n {\n if (tx.isActive() || !tx.getNontransactionalWrite() || !tx.getNontransactionalWriteAutoCommit())\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Interface definition for a callback to be invoked when the unhandled input event is received.
public interface OnUnhandledInputEventListener { /** * Called when an input event was not handled by the bound TV input. * * <p>This is called asynchronously from where the event is dispatched. It gives the host * application a chance to handle the unhandled input events. ...
[ "public interface FinishedInputEventCallback {\n public void onFinishedInputEvent(Object token, boolean handled);\n }", "protected abstract void handleInput();", "interface SignalHandler extends Callback {\n void callback(int signum);\n }", "public void addInputHandler() {\r\n\t\tnativeon(in...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Fuegt ein Wort an die bestehende wortStastik an. Erzeugt ein neues Element in der Hash Map, wenn das Wort noch nicht gefunden wurde.
private void fuegeWortAn(String wort) { if(wortStatistik.get(wort) == null) { wortStatistik.put(wort, 1); } else { wortStatistik.put(wort, wortStatistik.get(wort) + 1); } }
[ "public Map<Soort, List<Dier>> maakOverzichtVolgensSoort(){\n return dieren.stream()\n .collect(Collectors.groupingBy(Dier::getSoort, TreeMap::new, Collectors.toList()));\n }", "public void sortiereSchnittpunkte(){\n\t\tentferneDoppelteSchnittpunkte();\n\t\tArrayList <Vektor> tmp=new ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
if( seq != null ) System.err.println( "set aligned seq " + seq.getName() + " " + alseq.length() ); else System.err.println( "seq null" );
public void setAlignedSequence( Sequence alseq ) { this.alignedsequence = alseq; if(alseq.id == null) alseq.id = id; if(seq != null) alseq.name = seq.getGroup(); if(alseq.group == null) alseq.group = group; }
[ "public void setAlignedSequence(java.lang.CharSequence value) {\n this.alignedSequence = value;\n }", "public org.ga4gh.models.ReadAlignment.Builder setAlignedSequence(java.lang.CharSequence value) {\n validate(fields()[12], value);\n this.alignedSequence = value;\n fieldSetFlags()[12] = true;\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Function: fromString, input for user strings Parameters: temperature_string, a string Preconditions: temperature_string is in format "0.0 C" Returns: new Temperature object
public final static Temperature fromString(String temperature_string) { String[] temperature = temperature_string.split(" "); double degrees = Double.parseDouble(temperature[0]); char scale = temperature[1].charAt(0); return new Temperature(degrees, scale); }
[ "public static ConversionData createInstance(String temperatureStr,\n\t\t\tString inputScaleStr, String outputScaleStr) {\n\t\tdouble temperature = 0;\n\t\ttry {\n\t\t\ttemperature = Double.parseDouble(temperatureStr);\n\t\t}\n\t\tcatch(NumberFormatException nfe) {\n\t\t\treturn null;\n\t\t}\n\n\t\tTempScale inputS...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Converts seconds to nanoseconds.
protected long secondsToNanoseconds(double seconds) { return (long)(seconds * ONE_SECOND); }
[ "public double convertToNanoSeconds(double t) {\n return t * Time.NS_PER_MS;\n }", "public static double convertFromNanoToSec(long time) {\n return ((double) time / 1000000000);\n }", "public double asSeconds() {\n\t\treturn asNanoseconds() / SECOND;\n\t}", "public static ElapsedNanosecon...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Media Find the sentence content id
int getContentID(int sentenceID) { int themeContentID = 0; Cursor contentCursor = databaseHelper.getQueryResultData(SentenceTable.TABLE_NAME, new String[]{SentenceTable.CONTENT_ID}, SentenceTable.SENTENCE_ID + "='" + sentenceID + "'", null, null, null, null, null); if (contentCur...
[ "java.lang.String getContentId();", "java.lang.String getRecognitionId();", "int getContentId();", "java.lang.String getStoryId();", "public String getId()\n\t\t{\n\t\t\treturn mediaElement.getAttribute(ID_ATTR_NAME);\n\t\t}", "public abstract int getSentenceID();", "long getTimedtextTrackId();", "pub...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
a method called UpdateStationInfo(strStationID,blnUpdate) that will accept the station id and a boolean value as parameters update the form fields and download the weather condition image and update the image control on the form.
private static void UpdateStationInfo(String strStationID, Boolean blnUpdate) { DBMS db = new DBMS(); db.openConnection(strData); //blnUpdate is true if (blnUpdate == true) { try { XMLRead xml = new XMLRead(); xml.loadPage("http://w1.weather.go...
[ "private void UpdateStationInfo(String strStationID, boolean blnUpdate)\r\n {\r\n DBMS db = new DBMS();\r\n db.openConnection(\"WEATHERDATA\");\r\n XMLRead xm = new XMLRead();\r\n String UrlId = strStationID.trim();\r\n try\r\n { // update the fields for the given statio...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
1. Write a static method called intArraySorted. This method takes in an array of integers and it returns a boolean. The method returns true if the integer array is in ascending order and false otherwise
static boolean intArraySorted(int[] iarray) { for (int i = 0; i + 1< iarray.length; i++) { if (iarray[i] > iarray[i + 1]) { return false; } } return true; }
[ "static boolean intArraySorted(int[] intArray) {\n\t\tfor (int i = 0; i < intArray.length-1; i++) {\n\t\tp=intArray[i];\n\t\tif(intArray[i+1]<p) {\n\t\t\treturn false;\n\t\t}\n\t\t}\n\t\treturn true;\n\t}", "static boolean intArraySorted(int[] nums) {\n\t\tboolean ascending = true;\n\t\tfor(int i = 0;i<nums.lengt...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test adding treatment to patient medical records
@Test public void testPatientTreatmentMedicalHistory() { String expectedValue = "Treatment: " + " Date: " + "2019-10-01" + " Diagnose: " + "Headache"; // this.history = new PatientHistory(); // treatments.add(treatment); String actualValue = treatment.toString(); assertTrue(expectedValue.equals(actualV...
[ "public static void assignPatientsToMedic() {\r\n\r\n ArrayList<Patient> patientsAssigned;\r\n\r\n for (int i = 0; i < data.getPatientList().size(); i++) {\r\n\r\n Patient patient = data.getPatientList().get(i);\r\n\r\n if (patient.getLevelOfCare().contentEquals(\"Doctor\") && pa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generates a DUP2_X1 instruction.
public static void dup2X1(MethodVisitor mv) { mv.visitInsn(Opcodes.DUP2_X1); }
[ "public static void dupX2(MethodVisitor mv) {\r\n mv.visitInsn(Opcodes.DUP_X2);\r\n }", "public static void dup2X2(MethodVisitor mv) {\r\n mv.visitInsn(Opcodes.DUP2_X2);\r\n }", "public static void dupX1(MethodVisitor mv) {\r\n mv.visitInsn(Opcodes.DUP_X1);\r\n }", "public static...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method is activated on the Keystrokes we are listening to in this implementation. Here it listens for Copy and Paste ActionCommands. Selections comprising nonadjacent cells result in invalid selection and then copy action cannot be performed. Paste is done by aligning the upper left corner of the selection with th...
public void actionPerformed(ActionEvent e) { if (e.getActionCommand().compareTo("Copy")==0) { StringBuffer sbf=new StringBuffer(); // Check to ensure we have selected only a contiguous block of // cells int numcols=jTable1.getSelectedColumnCount(); int numrows=jTable1.getSelectedRowCount(); int[]...
[ "public void actionPerformed(ActionEvent e) {\n if (e.getActionCommand().compareTo(\"Copy\") == 0) {\n StringBuffer sbf = new StringBuffer();\n // Check to ensure we have selected only a contiguous block of\n // cells\n int numCols = jTable.getSelectedColumnCount()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
protected static Logger logger = Logger.getLogger("controller"); Retrieves the PDF report file
@RequestMapping(value = "/getpdfReport", method = RequestMethod.GET) public ModelAndView doSalesReportPDF(HttpServletRequest request, HttpServletResponse response) { //logger.debug("Received request to download PDF report"); // Retrieve our data from a mock data provider MockDataFactory dataprovi...
[ "@GetMapping(value = \"/pdf\", produces = MediaType.APPLICATION_JSON_VALUE)\n public ResponseEntity<String> generatePDFReport() {\n LOGGER.info(\"Generating Fund PDF report.\");\n\n // ReportPdfExporter pdfExporter = context.getBean(ReportPdfExporter.class);\n boolean success =false;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the MATERIAL value for this Po_Posting_RequestMATERIAL_POSTING.
public java.lang.String getMATERIAL() { return MATERIAL; }
[ "public java.lang.String getMaterial() {\r\n return material;\r\n }", "public String getMaterial() {\n return material;\n }", "public Material getMaterial() {\n return this.material;\n }", "public Material getMaterial()\n {\n if (materials.length == 0) return null;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create adjacency List each vertex
private void createAdjacencyLists(List<Edges> edges,int numberOfVertices){ for(int i=0;i<numberOfVertices;i++){ neighbors.add(new ArrayList<Integer>()); } for(Edges edge:edges){ neighbors.get(edge.u).add(edge.v); } }
[ "private List<Vertex> prepareGraphAdjacencyList() {\n\n\t\tList<Vertex> graph = new ArrayList<Vertex>();\n\t\tVertex vertexA = new Vertex(\"A\");\n\t\tVertex vertexB = new Vertex(\"B\");\n\t\tVertex vertexC = new Vertex(\"C\");\n\t\tVertex vertexD = new Vertex(\"D\");\n\t\tVertex vertexE = new Vertex(\"E\");\n\t\tV...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column sh_order.settlement_money
public void setSettlementMoney(BigDecimal settlementMoney) { this.settlementMoney = settlementMoney; }
[ "void setSettlementAmount(java.math.BigDecimal settlementAmount);", "public BigDecimal getSettlementMoney() {\r\n return settlementMoney;\r\n }", "public void setSettlementAmount(BigDecimal settlementAmount) {\n this.settlementAmount = settlementAmount;\n }", "public Long getSettlementmone...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests construction with a null Map (should throw an Exception).
@Test(expected = NullPointerException.class) public void testConstructionWithNullMap() { new HashMapper(null, DEFAULT_VALUE); }
[ "@Test(expected = IllegalArgumentException.class)\n\tpublic void testConstructionWithEmptyMap() {\n\t\tnew HashMapper(new HashMap<Object, Object>(), DEFAULT_VALUE);\n\t}", "@Test(expected = NullPointerException.class)\n\tpublic void testChainedConstructionWithNullMap() {\n\t\tnew HashMapper(null, DEFAULT_VALUE, n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column line.line_name
public void setLineName(String lineName) { this.lineName = lineName == null ? null : lineName.trim(); }
[ "public void setLineId(String line_id)\r\n {\r\n this.line_id = line_id;\r\n }", "public void setLine(Line line1) {\n line = line1;\n }", "public String getName() {\n return this.lineName;\n }", "public void setDateline(String dateline) {\n this.dateline = dateline;\n }", "pub...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests canShootThrough on various tiles
@Test public void testCanShootThrough() { Tile o = new OpenTile(); Tile b = new BlockedTile(); Tile s = new BlockedSeeThroughTile(); assertTrue(o.canShootThrough()); assertFalse(b.canShootThrough()); assertTrue(s.canShootThrough()); }
[ "public boolean checkAttackTile(){\r\n Actor a = getOneIntersectingObject(AttackTile.class);\r\n if(a != null)\r\n return true;\r\n return false;\r\n }", "@Test\n\tpublic void correctShotInitialization() {\n\t\tboolean isShotAt = false;\n\t\tfor (int y = 0; y < height; y++) {\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The stage of the Pool definition allowing to specify userAccounts.
interface WithUserAccounts { /** * Specifies the userAccounts property: The list of user accounts to be created on each node in the pool.. * * @param userAccounts The list of user accounts to be created on each node in the pool. * @return the next definiti...
[ "interface WithUserAccounts {\n /**\n * Specifies the userAccounts property: The list of user accounts to be created on each node in the pool..\n *\n * @param userAccounts The list of user accounts to be created on each node in the pool.\n * @return the nex...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The process who calls this system call will join the the terminated process, if it is still running join will wait until it is exited, if there is an error it will return 1. The process that joins has to be the parent of the process that uses the system call, and can only be joined once.
private int handleJoin(int ProcessID, int status){ UserProcess child = children.get(ProcessID); //sets the user process to that of the specified child join child.statLock.acquire(); //acquire lock Integer childStatus = child.eStat; //exit status if (childStatus == null){ statLock.acquire(); child.statL...
[ "private int handleJoin(int pid, int status)\n {\n UserProcess child = allProcess.get(pid);\n if (null == child)\n {\n printDebug(\"Child does not exist for pid: \" + pid);\n return -1;\n }\n else if (this != child.parent)\n {\n printDebu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Resolves config for a given key and config definition
ConfigInstance.Builder getConfigInstance(ConfigKey<?> configKey, ConfigDefinition configDefinition);
[ "public Object lookupConfigurationEntry(String key);", "Configuration getConfigByKey(String configKey);", "Object getConfiguration(String key);", "RuleConfigWrapper get(String key);", "String getConfiguration(String key);", "PointerByReference rs2_config_resolve(Realsense2Library.rs2_config config, Realse...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the cards the player can play, given the faction played by the leader.
Hand playableCards(Faction faction) { Hand cards = new Hand(); if (faction == null) { cards.addAll(this); return cards; } getCards(faction).forEach(cards::add); if (cards.size() > 0) { if (faction != Faction.DOPPELGANGERS) { ...
[ "public Stream<Card> getCards(Faction faction) {\n return this.stream().filter(c -> c.faction == faction);\n }", "public List<Card> getCards(Character player){\r\n\t\treturn playerRefs.get(player).getCards();\r\n\t}", "public ArrayList<Card> getPlayableCards(Player p) {\n ArrayList<Card> playab...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of reorderVertexs method, of class Graph.
@Test public void testReorderVertexs_0args() { System.out.println("reorderVertexs"); testSubject.reorderVertexs(); }
[ "@Test\n public void testReorderVertexs_double() {\n System.out.println(\"reorderVertexs\");\n testSubject.reorderVertexs(0);\n testSubject.reorderVertexs(1000);\n testSubject.reorderVertexs(-10);\n }", "@Test\r\n void test_check_order_properly_increased_and_decreased() {\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a list of salaries filtered according to the given criterias.
public List<Salary> filterSalaries(String rank, String discipline) { return salaries.stream().filter(s -> { return (StringUtils.isBlank(rank) || StringUtils.equals(rank, s.rank)) && (StringUtils.isBlank(discipline) || StringUtils.equals(discipline, s.discipline)); }).collect(Collectors.toList()); }
[ "@GetMapping(\"/salaries\")\n @Timed\n public ResponseEntity<List<SalaryDTO>> getAllSalaries(SalaryCriteria criteria, Pageable pageable) {\n log.debug(\"REST request to get Salaries by criteria: {}\", criteria);\n Page<SalaryDTO> page = salaryQueryService.findByCriteria(criteria, pageable);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new instance of AutoCloseImpl
private AutoCloseImpl() { AutoCloseOptions.getDefault().addPropertyChangeListener(this); timestamps = new WeakHashMap(); timestamps.putAll(AutoCloseOptions.getDefault().getTimestampMap()); loadSettings(); }
[ "Close createClose();", "protected void addAutoClose() throws Exception {\n facility.addAutoClosableSReq(this).signal();\n }", "Open createOpen();", "public void setAutoClose(long timeout);", "public SpeechRecognizer.Builder autoClose(boolean autoClose) {\n\t\t\tthis.autoClose = autoClose;\n\t\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructs an empty OpenAddressingHashMap with the default initial capacity (16) and the default load factor (0.75).
public OpenAddressingHashMap() { this.loadFactor = DEFAULT_LOAD_FACTOR; }
[ "public OpenAddressingHashMap(int initialCapacity) {\n this(initialCapacity, DEFAULT_LOAD_FACTOR);\n }", "public OpenAddressingHashMap(int initialCapacity, float loadFactor) {\n if (initialCapacity < 0) {\n throw new IllegalArgumentException(\"Illegal initial capacity: \" + initialCapa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
To create a WsClient.
public static WsClient create( String uri, Map<String, String> additionalHttpHeaders, WsClientConfig config) throws Exception { WsClient client = new WsClient(uri, additionalHttpHeaders); client.config = config; return client; }
[ "static WsClient create(WsClientConfig clientConfig) {\n WebClient webClient = WebClient.create(it -> it.from(clientConfig));\n return new WsClientImpl(webClient,\n webClient.client(Http1Client.PROTOCOL),\n clientConfig);\n }", "public...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__InputPort__Group__0__Impl" $ANTLR start "rule__InputPort__Group__1" InternalComponentDefinition.g:2730:1: rule__InputPort__Group__1 : rule__InputPort__Group__1__Impl rule__InputPort__Group__2 ;
public final void rule__InputPort__Group__1() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalComponentDefinition.g:2734:1: ( rule__InputPort__Group__1__Impl rule__InputPort__Group__2 ) // InternalComponentDefinition.g:2735:2: rule__In...
[ "public final void rule__InputPort__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalComponentDefinition.g:2707:1: ( rule__InputPort__Group__0__Impl rule__InputPort__Group__1 )\n // InternalComponentDefinition.g:27...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removes any messages stored in the orphanedMessageSet from the cache, clears the set, and then fires the necessary events to have them expunged by any listeners.
protected void removeOrphanedMessages() { Enumeration e = orphanedMessageSet.elements(); MessageToken[] orphanedTokens = new MessageToken[orphanedMessageSet.size()]; int index = 0; while(e.hasMoreElements()) { FolderMessage message = (FolderMessage)e.nextElement(); ...
[ "public synchronized void clearPersistentMessages() {\n _persistent.clear();\n }", "private void deleteAckedMessages() {\n for (String id : this.ackedMessageIds) {\n if (this.hasMessage(id) && !isSending(id)) {\n this.deleteMessage(id, false);\n }\n }\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
copy the "original" map and putAll the "overrides"
private static Map override_params( Map original, Map overrides) { if (overrides == null || overrides.isEmpty()) { return original; } Map ret = new HashMap(original); ret.putAll(overrides); ret = Collections.unmodifiableMap(ret); return ret; }
[ "private Map<String, String> withDefaults(Map<String, String> original) {\n\t\tMap<String, String> combined = new HashMap<>(attributesByMode.get(ALL_MODES));\n\t\tcombined.putAll(original);\n\t\treturn combined;\n\t}", "public static Arguments mergeMapWithAnOverrideMap(Map<String,String> baseMap, Map<String, Stri...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }