query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
$ANTLR end "rule__XRelationalExpression__Group_1_1_0_0__1" $ANTLR start "rule__XRelationalExpression__Group_1_1_0_0__1__Impl" InternalDroneScript.g:6667:1: rule__XRelationalExpression__Group_1_1_0_0__1__Impl : ( ( rule__XRelationalExpression__FeatureAssignment_1_1_0_0_1 ) ) ;
public final void rule__XRelationalExpression__Group_1_1_0_0__1__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalDroneScript.g:6671:1: ( ( ( rule__XRelationalExpression__FeatureAssignment_1_1_0_0_1 ) ) ) // InternalDroneSc...
[ "public final void rule__XRelationalExpression__Group_1_1_0_0__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:5544:1: ( (...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates navigation breadcrumb a navigation event can be a URL change in a web application, or a UI transition in a mobile or desktop application, etc.
public static @NotNull Breadcrumb navigation( final @NotNull String from, final @NotNull String to) { final Breadcrumb breadcrumb = new Breadcrumb(); breadcrumb.setCategory("navigation"); breadcrumb.setType("navigation"); breadcrumb.setData("from", from); breadcrumb.setData("to", to); retu...
[ "protected abstract void updateBreadcrumb(BreadcrumbPanel breadcrumbPanel);", "java.util.List<Googleplay.BrowseLink> \n getBreadcrumbList();", "private void appendBreadcrumb(Context context, ExternalFileInfo newFolder) {\n int currentCrumb = -1;\n if (mBreadcrumbBarLayout.getChildCount() > ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Can only be an upsert if initial == current, this map was previously empty and the parent is a "reference"
private boolean isUpsert(RecordingMap<?, ?, ?> map) { if (map.size() == map.getAddedKeys().size()) { BasicDirtyTracker parent = map.$$_getParent(); if (parent instanceof EntityViewProxy) { EntityViewProxy parentProxy = (EntityViewProxy) parent; // Since a ...
[ "private void fixUpInsert(TwoThreeNodeClass localRef)\n {\n \n TwoThreeNodeClass newNode = null;\n \n if( localRef.numItems == THREE_DATA_ITEMS)\n {\n // check for no parent\n // case: localRef == root\n if(localRef.parentRef == null ) \n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the value of the global variable curiosity_prob.
@ReLogoBuilderGeneratedFor("global: curiosity_prob") public Object getCuriosity_prob(){ return repast.simphony.relogo.ReLogoModel.getInstance().getModelParam("curiosity_prob"); }
[ "float getSpecialProb();", "@ReLogoBuilderGeneratedFor(\"global: curiosity_prob\")\n\tpublic void setCuriosity_prob(Object value){\n\t\trepast.simphony.relogo.ReLogoModel.getInstance().setModelParam(\"curiosity_prob\",value);\n\t}", "public double getProb() {\r\n return prob;\r\n }", "String getProb...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
activity lifecycle onDestroy clear the song list, unbind and terminate the service
@Override protected void onDestroy() { super.onDestroy(); mTrackList.clear(); if (isFinishing()) { unbindService(serviceConnection); mIsBound = false; mPlayerService.stopSelf(); } }
[ "@Override\n protected void onDestroy() {\n unBoundAudioService();\n super.onDestroy();\n }", "@Override\n protected void onDestroy() {\n super.onDestroy();\n Intent i = new Intent(this, SpeechService.class);\n stopService(i);\n }", "@Override\n\tprotected void onD...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
method: buildCactus purpose: this method spawns a cactus at the given location
private void buildCactus(int x, int y, int z, Block[][][] Blocks, FloatBuffer VertexPositionData, FloatBuffer VertexColorData, FloatBuffer VertexTextureData) { for(int i = y; i < y + 3; i++) { Blocks[(int) x][(int) i][(int) z].setID(Block.BlockType.BlockType_Cactus); ...
[ "private void create(int localVP, int localLOD, String parentID, ArrayList<BioMightPropertyView> bioMightProperties, ArrayList<BioMightMethodView> bioMightMethods) \r\n\t{\r\n\t\tthis.setImage(\"images/Nucleus.jpg\");\r\n\t\tthis.setImageHeight(300);\r\n\t\tthis.setImageWidth(300);\r\n\t\tthis.parentID = parentID;\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Note : Please Insert processSalaryForEmployee logic into this processSalaryForEmployeeForTds also
private void processSalaryForEmployee(Epf epf, Esi esi, List<PayOut> payOuts, ReportPayOut reportPayOut, PayrollControl payrollControl, List<LoanIssue> loanIssues, List<OneTimeDeduction> oneTimeDeductionList ) { PayRollProcessUtil util = new PayRollProcessUtil(); BigDecimal netSalary = new BigDecimal(0);...
[ "public void processSalary(){\n System.out.println(\"Processing Salary For Permanent Employees : \");\r\n System.out.println(\"HRA : \"+(basic*20/100));\r\n System.out.println(\"MA : \"+(basic*10/100));\r\n }", "public static void employeeSalary() {\n System.out.println(\"\\nemploy...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retorna um cargo que deseja se atribuir ao funcionario por meio do que o usuario selecionar. Caso aperte 1: o usuario visualiza os cargos existentes, com seu codigo, e insere o codigo do cargo que deseja atribuir. Caso aperte 2: o usuario cadastra um cargo para atribuir ao funcionario. Caso aperte qualquer outra tecla:...
public Cargo atribuiCargoAoFuncionario() { int opcao = this.telaFuncionario.pedeOpcao(); Cargo cargo = null; switch (opcao) { case 1: ControladorPrincipal.getInstance().controladorCargo.listaCargos(); cargo = comparaCodigoComCargo(); br...
[ "private void btnAgregarUsuarioActionPerformed(java.awt.event.ActionEvent evt) {\n String v_nombre=\" \";\n\n if(txtNombreAU.getText().length()==0){\n Utilidades.mensajeInformacion(\"Digite un nombre, por favor\", \"Informacion\");\n return;\n }\n v_nomb...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Saves the tickers of the stocks marked as favorites to the device.
private void saveData() { String jsonSaveFile = getString(R.string.data_save_file); Type stockListType = new TypeToken<ArrayList<String>>() {}.getType(); ArrayList<String> favoriteStockTickers = new ArrayList<>(); for(Stock stock : snp500Stocks) { if (stock.getIsFavorite()) ...
[ "public void saveFavourites() \n\t{\n\t\t/*\n\t\t * delete file if it already exist\n\t\t */\n\t\tFile saveFile = new File(\"weatherData.csv\");\n\t\t\n\t\tif(saveFile.exists())\n\t\t{\n\t\t saveFile.delete();\n\t\t}\n\t\ttry {\n\t\t\tsaveFile.createNewFile();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-g...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generate the Set of all Permutation Substrings
public static final java.util.Set<java.lang.String> PermutationSet ( final java.lang.String s) { java.util.Set<java.lang.String> permutationSet = new java.util.HashSet<java.lang.String>(); java.util.Set<java.lang.Integer> exclusionIndexSet = new java.util.HashSet<java.lang.Integer>(); return PermutationSet (...
[ "private HashSet<String> getAllPermutations(String str) {\n HashSet<String> permutations = new HashSet<>();\n\n if (str == null || str.length() == 0) {\n permutations.add(\"\");\n return permutations;\n }\n\n char first = str.charAt(0);\n String remainderString = str.substring(1);\n Hash...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO FIx this test > EmptyArrayException
@Test (expected = EmptyListException.class) public void checkEmpyArrayException() throws EmptyListException, InvalidListSizeException { Solution instance = new Solution(); List<Integer> nullarray = new ArrayList<Integer>(); instance.solution(nullarray); }
[ "@Test\n public void testEmptyArrayCreation() {\n final String[] array = ArrayUtils.<String>toArray();\n assertEquals(0, array.length);\n }", "private boolean checkEmpty() {\n\t\treturn this.array[0] == null;\n\t}", "@Test\n\tpublic void testFirstEmptyArrayException() {\n\t\t\n\t\tint[] stoc...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
register a global locale aware formatter with the given key and locale
public void register(LocaleFormatter formatter, String key, Locale locale) { key = getLocKey(key, locale); localizedConverters.put(key, formatter); }
[ "public void register(LocaleFormatter formatter, String key)\n\t{\n\t\tkey = getLocKey(key);\n\t\tlocalizedConverters.put(key, formatter);\n\t}", "public void register(Formatter formatter, String key)\n\t{\n\t\tkey = getLocKey(key);\n\t\tconverters.put(key, formatter);\n\t}", "public LocaleFormatter() {\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional int32 roomState = 5;
int getRoomState();
[ "public int getRoomState() {\n return roomState_;\n }", "int getRoomOverType();", "int getRoomNumber();", "public void setRoom(int value) {\n this.room = value;\n }", "int getRoomType();", "int getRoomid();", "public int getRoom() {\n return room;\n }", "public Integer getRoomtypei...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructor for objects of class lv3.
public lv3() { // Create a new world with 600x400 cells with a cell size of 1x1 pixels. //super(950, 600, 1); //prepare(); prepare(); stopped(); started(); }
[ "public Level3()\n {\n super();\n }", "public LVInfo() {\r\n }", "public Lyrics3v2() {\r\n super();\r\n }", "public Tuple3ifx() {\n\t\tthis(0, 0, 0);\n\t}", "public ViewerPosition3D()\n {\n }", "public CrearLR3() {\n initComponents();\n }", "public Vecto...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Encodes a URL to a shortened URL.
public String encode(String longUrl) { urls.add(longUrl); int index = urls.size() - 1; StringBuilder shorten = new StringBuilder(); while(index != 0) { shorten.append(BASE62[index % 62]); index = index / 62; } return shorten.toString(); }
[ "public String encode(String longUrl) {\n\n String shortUrl = getShortUrl();\n\n if(shortToLongUrl.containsKey(shortUrl)){\n shortUrl = getShortUrl();\n }\n\n shortToLongUrl.put(shortUrl, longUrl);\n return \"http://tinyurl.com/\" + shortUrl;\n }", "public String e...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method creates a new PickPermitTileBonusAction action according to the PickPermitTileBonusActionDTO received, then maps all the parameters DTO into their corresponding real objects, setting them to the real action created
public PickPermitTileBonusAction map(PickPermitTileActionDTO pickPermitTileActionDTO);
[ "public BuildByPermitTile map(BuildByPermitTileDTO selectedActionDTO);", "public AcquirePermitTile map(AcquirePermitTileDTO selectedActionDTO);", "public PurchasedPermitTileAction map(PurchasedPermitTileActionDTO selectedActionDTO);", "public ChangePermitTiles map(ChangePermitTilesDTO selectedActionDTO);", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ xmsoriginalfile: specification/hardwaresecuritymodules/resourcemanager/Microsoft.HardwareSecurityModules/stable/20211130/examples/DedicatedHsm_ListByResourceGroup.json Sample code: List dedicated HSM devices in a resource group.
public static void listDedicatedHSMDevicesInAResourceGroup( com.azure.resourcemanager.hardwaresecuritymodules.HardwareSecurityModulesManager manager) { manager.dedicatedHsms().listByResourceGroup("hsm-group", null, Context.NONE); }
[ "public static void listDedicatedHSMDevicesInAResourceGroupIncludingPaymentHSM(\n com.azure.resourcemanager.hardwaresecuritymodules.HardwareSecurityModulesManager manager) {\n manager.dedicatedHsms().listByResourceGroup(\"hsm-group\", null, Context.NONE);\n }", "IDeviceGroup getDeviceGroup(UUID i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__Permutation__Group__6" $ANTLR start "rule__Permutation__Group__6__Impl" InternalDsl.g:8356:1: rule__Permutation__Group__6__Impl : ( ';' ) ;
public final void rule__Permutation__Group__6__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalDsl.g:8360:1: ( ( ';' ) ) // InternalDsl.g:8361:1: ( ';' ) { // InternalDsl.g:8361:1: ( ';' ) // ...
[ "public final void rule__Permutation__Group__6() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:8349:1: ( rule__Permutation__Group__6__Impl )\n // InternalDsl.g:8350:2: rule__Permutation__Group__6__Impl\n {...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method will be used by DS to unset the quote service
public synchronized void unsetQuote(IQuoteService service) { System.out.println("Service was unset. Why did you do this to me?"); if (this.service == service) { this.service = null; } }
[ "public void deleteQuote(Quote quote_1);", "void unsetServiceId();", "boolean unbindQuoteInSessionCart();", "void unsetSelfServiceInd();", "public void removeQuote(int id);", "public void removeQuote(Quote q);", "public void unsetServiceValue() throws JNCException {\n delete(\"service\");\n }"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns an Array of GraphChangeListeners receiving Graph Change Events from the source Graph. Ownership of the returned Array is transferred to the calling Object. No reference to the Array is maintained by GraphChangeSupport. However, the GraphChangeListeners contained in the Array are (obviously!) returned BY REFEREN...
@SuppressWarnings("unchecked") public synchronized GraphChangeListener<N, ET>[] getGraphChangeListeners() { return listenerList.getListeners(GraphChangeListener.class); }
[ "@Override\n\tpublic GraphChangeListener<N, ET>[] getGraphChangeListeners()\n\t{\n\t\treturn gcs.getGraphChangeListeners();\n\t}", "public ChangeListener[] getChangeListeners() {\r\n return (ChangeListener[])listenerList.getListeners(\r\n ChangeListener.class);\r\n }", "public ChangeLis...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "ruleGenerateOption" $ANTLR start "entryRuleDirectory" InternalDsl.g:2954:1: entryRuleDirectory : ruleDirectory EOF ;
public final void entryRuleDirectory() throws RecognitionException { try { // InternalDsl.g:2955:1: ( ruleDirectory EOF ) // InternalDsl.g:2956:1: ruleDirectory EOF { if ( state.backtracking==0 ) { before(grammarAccess.getDirectoryRule()); ...
[ "public final void entryRuleDirectory() throws RecognitionException {\n try {\n // InternalMyDsl.g:1279:1: ( ruleDirectory EOF )\n // InternalMyDsl.g:1280:1: ruleDirectory EOF\n {\n before(grammarAccess.getDirectoryRule()); \n pushFollow(FOLLOW_1);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generates staff information grouped by role
public void viewStaffInformationGroupedByRole(Scanner input) { //Query database for nurse try { result = statement.executeQuery("SELECT jobTitle, COUNT(id) FROM Staff GROUP BY jobTitle"); } catch (SQLException e) { e.printStackTrace(); return; } ...
[ "public String getStaffInfo() \n\t{ \n\t\treturn this.getfName() + \" \" + this.getlName() + \" - \" + this.getRole(); \n\t}", "private static void generateStaff(InterchangeWriter<InterchangeStaffAssociation> iWriter, Collection<StaffMeta> staffMetas) throws Exception {\n long startTime = System.currentTim...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__ModulesAST__ImportSectionAssignment_0" $ANTLR start "rule__ModulesAST__ModulesAssignment_1" ../org.xtext.guicemodules.ui/srcgen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:16678:1: rule__ModulesAST__ModulesAssignment_1 : ( ruleModuleAST ) ;
public final void rule__ModulesAST__ModulesAssignment_1() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:16682:1: ( ( ruleModuleAST ) ) ...
[ "public final void rule__ModulesAST__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:3579:1: ( ( ( rule__Modu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Obtiene el nombre del vertice del nodo.
public String obtenerNombre() { return Vertice.obtenerNombre(vertex); }
[ "public String getName() {\n\t\tInteger inicio = indices.elementAt(0);\n\t\tInteger fin = (indices.size() > 1 ? indices.elementAt(1) : contenido.length());\n\t\treturn contenido.substring(inicio, fin-1);\n\t}", "public String getName() {\n return _cell.getN();\n }", "public final String name(int nodeI...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
to calculate the total value of sales transactions of a product type
public float getValueOfSales(String product) { float totalValue = 0; LinkedList<Sale> temp = storageSale.get(product); Iterator<Sale> it = temp.iterator(); while (it.hasNext()) { totalValue = totalValue + it.next().getValue(); } return totalValue; }
[ "public double getTotalSalesValue();", "@GetMapping(\"/total-sum\")\n\tpublic Double getTotalTransactionsSumByType(@RequestParam String type) {\n\t\tDouble totalSum = null;\n\t\t\n\t\ttry {\n\t\t\ttotalSum = transactionService.getTotalTransactionsSumByType(type);\n\t\t}\n\t\tcatch (InvalidDataException e) {\n\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Find the first device profile which is compatible with this application.
public static DeviceProfile findDevice() throws NoCompatibleDeviceException { for (DeviceProfile dp : profiles) { if (dp.isCompatible()) { return dp; } } throw new NoCompatibleDeviceException("no supported device"); }
[ "PointerByReference rs2_pipeline_profile_get_device(PointerByReference profile, PointerByReference error);", "private String getDeviceProfile(int th) {\n try {\n String p = \"/ncs:devices/device{\"+this.device_id+\"}/device-profile\";\n if (maapi.exists(th, p)) {\n retu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get a partition of the given table. The given partition spec keys and values need to be matched exactly for a result.
CatalogPartition getPartition(ObjectPath tablePath, CatalogPartitionSpec partitionSpec) throws PartitionNotExistException, CatalogException;
[ "alluxio.grpc.table.PartitionSpec getPartitionSpec();", "public HdfsPartition getPartition(List<PartitionKeyValue> partitionSpec) {\n List<TPartitionKeyValue> partitionKeyValues = Lists.newArrayList();\n for (PartitionKeyValue kv: partitionSpec) {\n String value = kv.getPartitionKeyValueString(getNullP...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
constructor to create a new TimeStamp by Hanwei Cheng
public TimeStamp() { dao = new TimeStampDao(); long id = dao.setUpTimeStamp(); // created this.timeStampsID = id; }
[ "public XAdESTimeStamp() {\n }", "ThinkTime createThinkTime();", "public TimeTrackingRecord() {\n super(TimeTracking.TIME_TRACKING);\n }", "public CDSPacketTime(long timeStamp) {\r\n \tthis.time = timeStamp;\r\n \t\r\n \tdays = (timeStamp >> 48) & 0x0000ffffL; // this is a 16 bit quantit...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
factory method to create a deep copy of ItemShippingDetailsDraft
@Nullable public static ItemShippingDetailsDraft deepCopy(@Nullable final ItemShippingDetailsDraft template) { if (template == null) { return null; } ItemShippingDetailsDraftImpl instance = new ItemShippingDetailsDraftImpl(); instance.setTargets(Optional.ofNullable(templa...
[ "public static ItemShippingDetailsDraftBuilder builder() {\n return ItemShippingDetailsDraftBuilder.of();\n }", "public static ItemShippingDetailsDraft of(final ItemShippingDetailsDraft template) {\n ItemShippingDetailsDraftImpl instance = new ItemShippingDetailsDraftImpl();\n instance.set...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Setter for the score of a specific player.
public void setScore(Player player, Integer score) { synchronized (players) { players.replace(player, score); } }
[ "public void setObjectiveScore(String name, Player player, int value) {\n scoreboard.getObjective(name).getScore(player.getName()).setScore(value);\n }", "private void setPlayerScore(Player player, int newScore) {\n\t\tplayer.score = Math.max(newScore, 0);\n\t\tfor (ScoreMarker scoreMarker : playerScore...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Marks the leaf "triggersmme" with operation "merge".
public void markTriggersMmeMerge() throws JNCException { markLeafMerge("triggersMme"); }
[ "public void markMobilityEventsMmeMerge() throws JNCException {\n markLeafMerge(\"mobilityEventsMme\");\n }", "public void markOdbSmsMerge() throws JNCException {\n markLeafMerge(\"odbSms\");\n }", "public void markUtilizedMerge() throws JNCException {\n markLeafMerge(\"utilized\");\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Setter for property title.
public void setTitle(String title) { this.title = title; }
[ "public void setTitle(String title) {\n mTitle = title;\n }", "public void setTitle(String title) {\n if (title != \"\"){\n this.title = title;\n }else {\n System.out.println(\"Invalid title!\");\n }\n }", "public void setTitle(String title) {\n s...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
getLastAmbiguityDegree Search through the lexical string (inBuf) looking for inTag and then return the count either the number following "inTag:" or 1,000.0 if no colon. Example: Parse through the lex string: Something like the following for "to" "_TO_II_CC:1" For each tag without a colon, add 1,000 "_TO", "_II" For ea...
public double scanLex(String inBuf, String inTag) { double rtn = 0.0; if(inBuf.length() > 0) { StringBuffer tmp = new StringBuffer("_").append(inTag); int pos = inBuf.indexOf(tmp.toString()); if(pos >= 0) { boolean found ...
[ "long getTagUseCount(Tag tag);", "public static void countTokens(Scanner in) {\n }", "public HashMap<String,Integer> getPosAtSentenceStart(String taggedtext){\n String pos = \"\";\n StringTokenizer sentences = new StringTokenizer(taggedtext,\".;:?!\");\n while(sentences.hasMoreTokens()){\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
INTERNAL: Returns the syntax of the document.
public String getSyntax() { return syntax; }
[ "public HeadedSyntacticCategory getSyntax() {\n return syntax;\n }", "public Syntax getSyntax() {\n\t\treturn SyntaxJ.commandSyntax(new int[] { Syntax.WildcardType() });\n\t}", "public static SyntaxSupport getSyntaxSupport(JTextComponent target) {\n Document doc = target.getDocument();\n retur...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Join with the replication threads
public void join() { if (this.replication) { this.getReplicationManager().join(); if (this.replicationSink != null) { this.replicationSink.stopReplicationSinkServices(); } } }
[ "public void join() {\n try {\n clientThread.join();\n serverThread.join();\n } catch (InterruptedException e) {\n System.out.println(\"Execute thread was stopped\");\n }\n }", "private void joinWorkers(){\n /* Join all current threads */\n tr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method saves all shops that were not completely matched yet.
@PreDestroy public void saveStates() { if(getShopId() != 0) { log.info("Interrupt matching for shop {} during phase {} at {} ", getShopId(), getPhase(), new Date()); getRemainingStates().add(new State(getShopId(), getPhase(), getPictureIds())); } getMatcherStateReposi...
[ "public void saveShops(List<ShopModel> shops) {\n Realm realm = Realm.getDefaultInstance();\n for (final ShopModel shop : shops) {\n realm.executeTransaction(new Realm.Transaction() {\n @Override\n public void execute(Realm realm) {\n realm.c...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructs a new instance with the given persons and current timestamp
public KITBook(Person person1, Person person2, Person person3, Timestamp currentTime) { this.profile1 = new Profile(person1); this.profile2 = new Profile(person2); this.profile3 = new Profile(person3); this.currentTime = currentTime; }
[ "public TimeStamp() {\n dao = new TimeStampDao();\n long id = dao.setUpTimeStamp(); // created\n this.timeStampsID = id;\n }", "public Vote(Person person,String date){\n this.person = person;\n this.date = date;\n }", "private static DefaultTemporalDatum create() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method interacts with the user to search for an animal.
private void findAnimal(){ System.out.println("Please type the animal id:"); System.out.println("Available ids from 1 to " + this.animals.getAnimals().size()); int id = this.validate.checkForInt(this.in); if(this.animals.findAnimal(id) != null){ this.animals.display(this.animals.findAni...
[ "private static void searchAnimalByName() {\n\t\tshowMessage(\"type in the animal's name: \\n\");\n\t\t\n\t\tString name = getUserTextTyped();\n\t\tToScreen.listAnimal(AnimalSearch.byName(name), true);\n\t\t\n\t\t//condition to do another search by name or go back to the main menu\n\t\t//if the user decide for doin...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
set the title visibility.
public void setTitleVisable(boolean show){ try{ if(show)this.title.setVisibility(View.VISIBLE); else this.title.setVisibility(View.GONE); }catch (NullPointerException e){ e.printStackTrace(); } }
[ "void setShowTitle(boolean showTitle);", "public void hideTitle() {\n \tmTitleContainer.setVisibility(View.GONE);\n }", "public void showIt(String title){\r\n\t\tthis.setTitle(title);\r\n\t\tthis.setVisible(true);\r\n\t}", "public void showIt(String title){\n this.setTitle(title);\n this.s...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get channel types flag.
public boolean getChannelTypesFlag() { return channelTypes; }
[ "public boolean getChannelTypesFlag()\t{ return channelTypes; }", "String getChannelType();", "public int getChannelType( ) {\r\n return 1;\r\n }", "public ChannelType getChannelType() {\n return type;\n }", "CommunicationChannels getCommunicationChannelType();", "public String getChan...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Assign a role to a given entity that will has effect on the given level only over the objId. If objId is null it means that all authorization associated with the role will be granted to the user over all objects of the given level. This method is idempotent
private AuthorizableEntityAuthorization doAssignRoleToEntity(Long entityId, Long roleId, int level, Long objId) { // AuthorizableEntityAuthorization AuthorizationLevelConf conf = authLoader.getConfLevel(level); String columnName = conf.getColumn(); Role role = roleService.findById(roleId); if (role.getAuthLev...
[ "PermissionModel setRoleId(String roleId);", "private void assignOrRemoveRoleForEntity(Long blogId, BlogRole role, Long entityId)\r\n throws NoBlogManagerLeftException, BlogNotFoundException, BlogAccessException,\r\n CommunoteEntityNotFoundException {\r\n if (role == null) {\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A utility function to print the constructed MST stored in parent[]
void printMST(int[] parent) { System.out.println("Edge \tWeight"); for (int i = 1; i < VERTICES; i++) System.out.println(parent[i] + " - " + i + "\t" + graph[i][parent[i]]); }
[ "public static void printMST(GraphAdjacencyMatrix graph, int parent[]) {\n System.out.println(\"Edge \\tWeight\");\n for (int i = 1; i < graph.getV(); i++)\n System.out.println(parent[i] + \" - \" + i + \"\\t\" + graph.getMatrix()[i][parent[i]]);\n }", "public static String printTree()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create an instance of CatalogPackageFullType
public com.vodafone.global.er.decoupling.binding.request.CatalogPackageFullType createCatalogPackageFullType() throws javax.xml.bind.JAXBException { return new com.vodafone.global.er.decoupling.binding.request.impl.CatalogPackageFullTypeImpl(); }
[ "public com.vodafone.global.er.decoupling.binding.request.CatalogFullPackageRequestType createCatalogFullPackageRequestType()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.CatalogFullPackageRequestTypeImpl();\n }", "public com.vod...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
test if f1 equals f1
@Test public void testEqual() { Assert.assertTrue(f1.equals(f1)); }
[ "@Test\n \tpublic void testf1Equalf3() {\n \t\tAssert.assertTrue(f1.equals(f3));\n \t}", "private static boolean equals(float f1, float f2) {\n return (Math.abs(f1 - f2) < DELTA);\n }", "private boolean equals(function f1,double x0,double x1,double step)\n\t{\n\t\tdouble epsilon=0.0001;\n\t\tif(x0>=x1...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
this fuction display progress dialog while signing in progress
private void displayProgressDialog() { pDialog.setMessage("Logging In.. Please wait..."); pDialog.setIndeterminate(false); pDialog.setCancelable(false); pDialog.show(); }
[ "private void displayProgressDialog() {\n pDialog.setMessage(\"Logging in.. Please wait...\");\n pDialog.setIndeterminate(false);\n pDialog.setCancelable(false);\n pDialog.show();\n\n }", "private void displayLoader() {\n pDialog = new ProgressDialog(getActivity());\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Begins a timer and sets a flag that the timer has started.
public void startTimer() { timerStart = System.currentTimeMillis(); timerStarted = true; }
[ "public void startTimer() {\r\n startTime = getCurrentTimestamp();\r\n timerOn = true;\r\n }", "public void start() {timer.start();}", "public static void startTimer() {\n elapsedTime = 0;\r\n timerIsWorking = true;\r\n startTime = System.nanoTime() / 1000000; // ms\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Setter for property cxcleunik.
public void setCxcleunik(int cxcleunik) { this.cxcleunik = cxcleunik; }
[ "public int getCxcleunik() {\r\r\r\r\r\r\r\n return cxcleunik;\r\r\r\r\r\r\r\n }", "public void setCrust(){\n this.crust = \"Thin\";\n }", "public void setCui(String cui) {\n _cui = cui;\n }", "void setCit(java.lang.String cit);", "public void setIniciatCAT(byte value) {\n t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of cryptoBoxSeal method, of class CryptoService.
@Test public void testCryptoBoxSeal() throws SodiumException, CryptoException { byte[] data = "Hola caracola".getBytes(); CryptoService instance = new CryptoService(); Keys keys = instance.createKeys(null); byte[] result = instance.cryptoBoxSeal(keys, data); assertN...
[ "@Test\r\n public void testCryptoBoxSealOpen() throws SodiumException, CryptoException {\r\n\r\n byte[] data = \"Hola caracola\".getBytes();\r\n\r\n CryptoService instance = new CryptoService();\r\n Keys keys = instance.createKeys(null);\r\n byte[] cipher = instance.cryptoBoxSeal(keys...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get a list of slots with names and relative position offsets for a given kit or parts tray name.
public List<Slot> getSlotOffsets(String name, boolean ignoreEmpty);
[ "List<Slot> getSlots();", "public RTWListValue getSubslots(RTWLocation location);", "InventorySlot[] slots();", "@Override\n\tpublic Set<String> getSlots() {\n\t\treturn slots.keySet();\n\t}", "public List<Slot> getAbsSlots(Tray tray, boolean ignoreEmpty) {\n if (null != externalSlotOffsetProvider) {...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Called by the RoomManager when it is no longer hosting a scene.
public void roomDidShutdown (int sceneId) { log.debug("No longer hosting scene", "id", sceneId); _mnobj.removeFromHostedScenes(sceneId); }
[ "public void onSceneExit() {\r\n update();\r\n }", "public void destroyScene() {\n\t\t\n\t\tthis.game = null;\n\t\tassert(this.game == null):(\"Game must be null to destroy the scene\");\n\t\t\n\t\tthis.keyboard = null;\n\t\tassert(this.keyboard == null):(\"Keyboard must be null to destory the scene\");...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__Descriptor__Group__4__Impl" $ANTLR start "rule__Descriptor__Group__5" InternalMyDsl.g:7306:1: rule__Descriptor__Group__5 : rule__Descriptor__Group__5__Impl ;
public final void rule__Descriptor__Group__5() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalMyDsl.g:7310:1: ( rule__Descriptor__Group__5__Impl ) // InternalMyDsl.g:7311:2: rule__Descriptor__Group__5__Impl { p...
[ "public final void rule__Descriptor__Group__4() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:7283:1: ( rule__Descriptor__Group__4__Impl rule__Descriptor__Group__5 )\n // InternalMyDsl.g:7284:2: rule__Descriptor__G...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tries to get a set of transactions for a specific data source from the master and possibly write it out as a versioned log file. Useful for recovering your damaged or missing log files.
private void copyLogFromMaster( Pair<Master, Machine> master, String datasource, long logVersion, long startTxId, long endTxId ) throws Exception { Response<Void> response = master.first().copyTransactions( emptyContext(), datasource, startTxId, endTxId )...
[ "@Test\n public void testCompactionMergeRecoverMergeStartSourceLog()\n throws IOException, IllegalPathException {\n LevelCompactionTsFileManagement levelCompactionTsFileManagement =\n new LevelCompactionTsFileManagement(COMPACTION_TEST_SG, tempSGDir.getPath());\n levelCompactionTsFileManagement.a...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Run the exercises to ensure we got the right answers
public void runExercises() throws IOException { System.out.println("JDK 8 Lambdas and Streams MOOC Lesson 2"); System.out.println("Running exercise 1 solution..."); exercise1(); System.out.println("Running exercise 2 solution..."); exercise2(); System.out.println("Running...
[ "public void testExercises() {\n\t\tSystem.out.println(\"Exercise 2:\");\n\t\tSATSolver solver = get2Solver();\n\t\tshowClauses(solver);\n\t\ttestLiterals(solver);\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Exercise 5:\");\n\t\tsolver = get5Solver();\n\t\tshowClauses(solver);\n\t\ttestLiterals(solver);\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Construct the storage properties object by reading the relevant properties from the parameter object.
StorageProperties(Properties properties) { String fragmentPathKey = PREFIX + "vault-fragment"; String networkPropsKey = PREFIX + "network-properties"; this.fragmentPath = properties.getProperty(fragmentPathKey); this.networkPropertiesPath = properties.getProperty(networkPropsKey); ...
[ "public void buildProperties() {\n\t\t//Basic and Shared Datasource properties.\n\t\tproperties.clear();\n\t\tproperties.putIfAbsent(\"Specific Binned Labels Names\", \"stimulus_ID\");\n\t\tproperties.putIfAbsent(\"Num CV Splits\", 20);\n\t\tproperties.putIfAbsent(\"Create Simulataneously Recorded Populations\", fa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the associated OWLProject.
void setOWLProject(OWLProject owlProject);
[ "void setProject(IProject project);", "public void setProject(Project project) {\n this.project = project;\n }", "private void setProject(IProject project) {\n this.project = project;\n }", "public void setProject(IProject project) {\n this.project = project;\n }", "public void setProject(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Maps an object to a default delete query, for example given the object it should create a query that deletes that specific object. Usually this is done by selecting the primary key of the object such as id. A default implementation might look something like this return DeleteQuery.builder() .table(SomeObjectTable.TABLE...
public abstract DeleteQuery toDeleteQuery(Database database, T object);
[ "DeleteQuery<T, K> delete();", "public static String buildDeleteSql(Object object)\r\n\t\t\tthrows IllegalAccessException, InvocationTargetException, NoSuchMethodException {\r\n\t\tif (null == object) {\r\n\t\t\tthrow new BuildSqlException(BuildSqlExceptionEnum.nullObject);\r\n\t\t}\r\n\t\tMap<?, ?> dtoFieldMap =...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Launches Search Activity to search for tags Goes to Search.java
public void Search(View view){ Intent intent = new Intent(getApplicationContext(),Search.class); startActivity(intent); }
[ "private void search()\n {\n if(this.getClass() != SearchActivity.class) {\n Intent i = new Intent(this, SearchActivity.class);\n startActivity(i);\n }\n }", "private void goToSearch() {\n final Intent intent = new Intent(this, SearchActivity.class);\n start...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Function to read the github's directory tree
private void readTree(String urlGit) { try { String[] splitedUrl = urlGit.split("https://github.com/")[1].split("/"); URL url = new URL(urlGit); HttpURLConnection con = (HttpURLConnection) url.openConnection(); String readStream = readStream(con.getInputStream()); Matcher blobPattern = Pattern .c...
[ "Path localRepo();", "String getRepositoryPath(String name);", "String getRepositoryPath();", "private String readFileFromRepo(final String originalFileName, final String originalReference, final GHRepository originalRepo) {\n GHRateLimit startRateLimit = null;\n // when looking through submodul...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
lookup the depth from the VC DP field or calculate by summing the depths of the genotypes
protected static int calculateVCDepth(VariantContext vc) { if ( vc.hasAttribute(VCFConstants.DEPTH_KEY) ) { return vc.getAttributeAsInt(VCFConstants.DEPTH_KEY, 0); } else { // handle the gVCF case from the HaplotypeCaller return vc.getGenotypes().stream() .map...
[ "float getDepth();", "int getTotalDepth();", "int depth();", "private interface dGetDepthFn {\n\t\tdouble get( DGeom g, double x, double y, double z );\n\t}", "int getDepth();", "Double getBaseDepth1();", "Double getBaseDepth2();", "public int depth(int search){\n\t\t int sum = 1;\r\n\t\t if (sear...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
comparator, nulls lower (claimType) //
public JwComparator<AcGb0901InvoiceItemClaimTotalVo> getClaimTypeComparatorNullsLower() { return ClaimTypeComparatorNullsLower; }
[ "public JwComparator<AcItem> getTypeComparatorNullsLower()\n {\n return TypeComparatorNullsLower;\n }", "public JwComparator<AcCandidateRouteAnalysisRequest> getTypeComparatorNullsLower()\n {\n return TypeComparatorNullsLower;\n }", "public JwComparator<AcActionAutoCorrectedLog> getAct...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
End showDialogTime Start fragment to select Category
private void startFragmentSelectCategory(int oldCategoryId) { LogUtils.logEnterFunction(Tag, "OldCategoryId = " + oldCategoryId); FragmentTransactionSelectCategory nextFrag = new FragmentTransactionSelectCategory(); Bundle bundle = new Bundle(); bundle.putInt("Tab", mTab); bundle...
[ "private void showCategoryDialog(){\n CategoryDialog dialog = new CategoryDialog();\n dialog.setTargetFragment(this, 0);\n dialog.show(getFragmentManager(), \"transactionCategory\");\n }", "private void openCategorySelection() {\n CategorySelectionDialogFragment categorySelectionDia...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the accountCondition value for this Account.
public java.lang.String getAccountCondition() { return accountCondition; }
[ "public void setAccountCondition(java.lang.String accountCondition) {\n this.accountCondition = accountCondition;\n }", "public String getCondition() {\n return condition;\n }", "public int getCondition() {\r\n\t\tif(this.condition == null){\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\treturn this.co...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Loads all countries into the `countries` hashmap
protected static void loadAllCountries() throws SQLException { countries = new HashMap<>(); establishConnection(); try(PreparedStatement statement = databaseConnection.prepareStatement("SELECT * FROM COUNTRY")) { try(ResultSet resultSet = statement.executeQuery()) { ...
[ "public void setCountries(HashMap<String, Country> countries) {\n\t\tthis.countries = countries;\n\t}", "public void fetchAllCountryByLanguageId(){\n\t\tmapCountryName.clear();\n\t\tList<CountryMasterDesc> lstCountryDesc = iGeneralService.getCountryList(session.getLanguageId());\n\t\tif(lstCountryDesc != null && ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method returns the logs controller
public LogController logController() { return logsController; }
[ "private Log getLog() {\n if (controller != null) {\n log = controller.getLog();\n } \n return log ;\n }", "public Controller getController();", "public LoggingHandler getLog() {\n\t\treturn logService;\n\t}", "public static AppLog Instance()\n {\n return _logg...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method that returns a Contract object by User and ID.
Contract getContractByUserAndId(User user, String idString);
[ "Contract getContractById(String idString);", "Contract findById(int id);", "@Override\n\tpublic Optional<Contract> getOne(Integer id) {\n\t\t\n\t\treturn contractRepo.findById(id);\n\t}", "public Contract getContract(int contractID) {\r\n\r\n\t\ttry {\r\n\t\t\treturn em.find(Contract.class, contractID);\r\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ creamos una fucnion que permita calcualr el interes anual
public void calcularInteres(){ saldo = saldo* Math.pow(1+((interesAnual/100)/12),12*1); }
[ "public double calcularIntereses(){\n double intereses;\n intereses = capital * (taza / 100) * plazo;\n return intereses;\n }", "double calculerInterets();", "public int calcularVolumen(){\r\n return ancho * alto * profundo;\r\n }", "@Override\n public double calculaSalari...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get an ACL using the ACL's ID
AccessControlList get(Long id) throws DatastoreException, NotFoundException;
[ "ACL load(long id) throws FxApplicationException;", "SysAcl selectByPrimaryKey(Integer id);", "Optional<AccessControlList> getAcl(String objectId, ObjectType objectType) throws DatastoreException;", "Long getAclId(String id, ObjectType objectType) throws DatastoreException, NotFoundException;", "public Acce...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removes the given element from the UnmannedAircrafts array. This is achieved by marking the element for removal.
public void removeFromUnmannedAircrafts(entity.GL7UnmannedAircraft element);
[ "@java.lang.Deprecated\n public void removeFromUnmannedAircrafts(gw.pl.persistence.core.Key elementID);", "public void addToUnmannedAircrafts(entity.GL7UnmannedAircraft element);", "public void removeAirplane(Airplane airplane) throws IllegalArgumentException;", "public void removeFirstFlight() {\n fl...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns an array of HostingSlot objects representing all the slots associated with this block.
HostingSlot[] getSlots();
[ "InventorySlot[] slots();", "List<Slot> getSlots();", "public java.util.List<maestro.components.internal.Slot> getSlots() {\n return slots;\n }", "public List<MetaSlot> getAllSlots() {\n List<MetaSlot> all = new ArrayList<MetaSlot>();\n\n all.addAll(getSlots());\n all.addAll(getHidden...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "computedQuestion" $ANTLR start "question" C:\\Users\\caytekin\\Documents\\GitHub\\seaofql\\caytekin\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:69:1: question returns [Question result] : Ident ':' StringLiteral t= type ;
public final Question question() throws RecognitionException { Question result = null; int question_StartIndex = input.index(); Token Ident3=null; Token StringLiteral4=null; Type t =null; try { if ( state.backtracking>0 && alreadyParsedRule(inpu...
[ "public final void question() throws RecognitionException {\r\n Token a=null;\r\n\r\n try {\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:190:10: ( (a= QUESTION ) )\r\n // D:\\\\ent...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the number of designers for this experiment.
public int getNumberDesigners() { return numberDesigners; }
[ "public int getEngineerCount() {\n return engineerCount;\n }", "public final int getDeponentCount() {\r\n synchronized (f_seaLock) {\r\n return f_deponents.size();\r\n }\r\n }", "public int getDEALERCount() {\r\n\t\treturn _DEALERList.size();\r\n\t}", "public static int getNumberOfTechDe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks if the specified argument is more or equal to zero.
public static void moreOrEqualToZero(int argument, String argumentName) { if (argument < 0) { throw new IllegalArgumentException(String.format( "Argument '%1$s' can't be less, than 0.", argumentName)); } }
[ "public boolean isSetArgs0()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(ARGS0$0) != 0;\n }\n }", "public static void moreThanZero(int argument, String argumentName)\n\t{\n\t\tif (argument <...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Use Ack.newBuilder() to construct.
private Ack(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); }
[ "private AckPacket(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private Ack() {\n initFields();\n }", "messages.Ackinterface.AckInterfaceOrBuilder getAckOrBuilder();", "private AckWithCredit(com.google.protobuf.GeneratedMessageV3.Builder<?> bu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get all runs associated with these materials, including the source runs and any derived runs
List<? extends ExpRun> getRunsUsingMaterials(List<ExpMaterial> materials);
[ "List<? extends ExpRun> getRunsUsingMaterials(int... materialIds);", "List<ExpRun> getDeletableRunsFromMaterials(Collection<? extends ExpMaterial> materials);", "public List<SaffronRun> getAllRuns() {\n\t\ttry {\n\t\t\treturn dataSource.getAllRuns();\n\t\t} catch (Exception e) {\n\t\t\tthrow new RuntimeExceptio...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Estimate the scaled volume of this shape, based on its debug mesh.
public float scaledVolume() { int meshResolution = DebugShapeFactory.highResolution; float volume = DebugShapeFactory.volumeConvex(this, meshResolution); assert volume >= 0f : volume; return volume; }
[ "public double getVolume() {\r\n return mesh.getVolume(myIndex);\r\n }", "public double getVolume() {\n\n double volume = 0;\n\n double[] v = this.getVertices();\n int[] f = this.getFaces();\n\n for (int i = 0; i < f.length; i += 6) {\n Vector3D v0 = new Vector3...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
go to records page to view previous submissions
public void goToRecords(){ Intent intent = new Intent(this, POCRecordsActivity.class); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK); startActivity(intent); }
[ "public void backToForm()\n {\n ASPManager mgr = getASPManager();\n\n openBrowsWindow = true;\n saveOperation = false;\n savedItem = false;\n\n \n if (!mgr.isEmpty(ctx.readValue(\"REFERRER\")))\n { \n mgr.redirectTo(ctx.readValue(\"REFERRER\"));\n }\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Loads all the level packs bundled with this game.
private void loadLevelPacks() { Pattern fileReg = Pattern.compile(".+\\.mtp$"); File dir = new File("."); File[] packs = dir.listFiles(); if (packs == null) { return; } boolean success = true; for (File f : packs) { try { i...
[ "private void loadLevels()\n\t{\n\t\ttry\n\t\t{\n\t\t\tString levelFolder = AppStructure.LEVEL_FOLDER.substring(0, AppStructure.LEVEL_FOLDER.length()-1);\n\t\t\tthis.levelFolders = this.game.getAssets().list(levelFolder);\n\t\t\t\n\t\t\tfor(String level : this.levelFolders)\n\t\t\t{\n\t\t\t\t// Extract the ID\n\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the targetDataInMB property: The target data transit in MB.
public InMageProtectedDiskDetails withTargetDataInMB(Double targetDataInMB) { this.targetDataInMB = targetDataInMB; return this; }
[ "public Double targetDataInMB() {\n return this.targetDataInMB;\n }", "public void setMemDemandMB(int value) {\n this.memDemandMB = value;\n }", "public Double sourceDataInMB() {\n return this.sourceDataInMB;\n }", "public InMageProtectedDiskDetails withSourceDataInMB(Double sour...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Use LogicRoomAccountItemRequest.newBuilder() to construct.
private LogicRoomAccountItemRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); }
[ "private AddItemRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private LogicRoomRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }", "private RequestItem(c...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get approval url after created payment
private String getApprovalLink(Payment approvedPayment) { List<Links> links = approvedPayment.getLinks(); String approvalLink = null; for (Links link : links) { if (link.getRel().equalsIgnoreCase("approval_url")) { approvalLink = link.getHref(); break...
[ "java.lang.String getPaymentUrl();", "private String getApprovalLink(Payment approvedPayment) {\n\t\tList<Links> links = approvedPayment.getLinks();\n\t\tString approvalLink = null;\n\n\t\tfor (Links link : links) {\n\t\t\tif (link.getRel().equalsIgnoreCase(\"approval_url\")) {\n\t\t\t\tapprovalLink = link.getHre...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get version of OpenShift specified when creating the cluster.
public String openShiftVersion() { return this.openShiftVersion; }
[ "String clusterCodeVersion();", "@HTTP(\n method = \"GET\",\n path = \"/apis/config.openshift.io/v1/clusterversions/{name}\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesCall<ClusterVersion> readClusterVersion(\n @Path(\"name\") String name);", "String getClientVersion();", "protected ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructs a new ActivityOfferingDisplayInfo.
public ActivityOfferingDisplayInfo() { }
[ "public ActivityOfferingDisplayInfo(ActivityOfferingDisplay offeringDisplay) {\r\n super(offeringDisplay);\r\n \r\n if (offeringDisplay == null) {\r\n return;\r\n }\r\n\r\n this.typeName = offeringDisplay.getTypeName();\r\n this.stateName = offeringDisplay.getSta...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
renvoie vrai si aucune piece n'occupe la case (x,y)
public boolean caseVide (int x, int y) { for (int i = 0 ; i<32 ; i++) { if (tableau[i].getX() == x & tableau[i].getY() == y) { return false; } } return true; }
[ "public void deplacerPiece(int x1 , int y1 , int x2 , int y2) {\n\t\tif (positionInvalide(x1,y1)) { System.out.println(\"position de départ invalide\");\n\t\treturn;\n\t\t}\n\t\tif (positionInvalide(x2,y2)) { System.out.println(\"position d'arrivée invalide\");\n\t\treturn;\n\t\t}\n\t\n\t\t\n\t\tif (this.caseVide(x...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Clear on click listener for the itemview
protected void clearOnClickListener() { itemView.setOnClickListener(null); }
[ "public void ClickEnClear(View v){\n clear();\n ActualizarPantalla();\n }", "@Override\n public void onClick(View v) {\n quantity.setText(\"\");\n ingredientName.setText(\"\");\n ingredients.clear();\n currentListOfIngredients...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the endpointType property: Indicates whether the local volume is the source or destination for the Volume Replication.
public ReplicationObject withEndpointType(EndpointType endpointType) { this.endpointType = endpointType; return this; }
[ "public void setEndpointType(String endpointType) {\n this.endpointType = endpointType;\n }", "public String getEndpointType() {\n return this.endpointType;\n }", "public EndpointType getType() {\n return type;\n }", "public EndpointType endpointType() {\n return this.endp...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the value of the DateCriterionChoice field.
@gw.internal.gosu.parser.ExtendedProperty public entity.DateCriterionChoice getDateCriterionChoice() { return (entity.DateCriterionChoice)__getInternalInterface().getFieldValue(DATECRITERIONCHOICE_PROP.get()); }
[ "@gw.internal.gosu.parser.ExtendedProperty\n public entity.DateCriterionChoice getDateCriterionChoice() {\n return (entity.DateCriterionChoice)__getInternalInterface().getFieldValue(DATECRITERIONCHOICE_PROP.get());\n }", "public void setDateCriterionChoice(entity.DateCriterionChoice value) {\n __getIntern...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This will print all the fields from the document.
public void printFields(PDDocument pdfDocument) throws IOException { PDDocumentCatalog docCatalog = pdfDocument.getDocumentCatalog(); PDAcroForm acroForm = docCatalog.getAcroForm(); List<PDField> fields = acroForm.getFields(); System.out.println(fields.size() + " top-level fields we...
[ "public void printField() {\n\t\tgame.printField();\n\n\t}", "public void printFields() {\n System.out.println(Arrays.toString(neighbor));\n System.out.println(Arrays.toString(threat));\n System.out.println(direction);\n }", "@Override\n public final String toString() {\n StringBuilder buff...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "RULE_OBJECT_START" $ANTLR start "RULE_OBJECT_END"
public final void mRULE_OBJECT_END() throws RecognitionException { try { int _type = RULE_OBJECT_END; int _channel = DEFAULT_TOKEN_CHANNEL; // InternalMyDsl.g:4142:17: ( '}' ) // InternalMyDsl.g:4142:19: '}' { match('}'); } ...
[ "public final void entryRuleObject() throws RecognitionException {\r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:314:1: ( ruleObject EOF )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmod...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The NavigationEntryInterface defines one menu entry or folders with subentries as interface.
public interface NavigationEntryInterface { /** * get menu value. * * @return the menuValue */ SafeHtml getMenuValue(); /** * get token. * * @return the token */ String getToken(); /** * get full token. * * @return the token with static and dynamic part */ String getFu...
[ "public interface NavigationEntryService\n{\n\n\t/**\n\t * Creates a navigation node entry\n\t *\n\t * @param navigationEntryData\n\t * the navigation node entry data with the Item ID and Item Type to be assigned to the navigation node.\n\t * @param catalogVersion\n\t * the catalog version model...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Will write a vertex to a file by overwriting file
public static void writeVertex(Vertex<Building> vertex) { try { FileOutputStream fos = new FileOutputStream("data/Vertex.dat"); ObjectOutputStream oos = new ObjectOutputStream(fos); // write object to file oos.writeObject(vertex); System.out.println("Done"); // closing resources oos.close(); ...
[ "public static void writeVertexToFile(Vertex<Building> vertex)\n\t{\n\t\tArrayList<Vertex<Building>> ver= readVertex();\n\t\t\n\t\tboolean con=true;\n\t\t\n\t\tif(ver.size()>=1)\n\t\t{\n\t\t\t\n\t\t\tfor(Vertex<Building> b:ver)\n\t\t\t{\n\t\t\t\tif(b.equals(vertex))\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"Vertex...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns true if the specified window is minimized.
public boolean isMinimized(Window window) { return getWindowDescriptor(window).isMinimized(); }
[ "public boolean minimized(final WinRefEx hWnd) {\n\t\treturn (hWnd == null) ? false : minimized(TitleBuilder.byHandle(hWnd));\n\t}", "public boolean minimized(final String title, final String text) {\n\t\tList<WinState> states = getState_(title, text);\n\t\treturn (states != null) && states.contains(WinState.MINI...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__JvmWildcardTypeReference__Group__2" $ANTLR start "rule__JvmWildcardTypeReference__Group__2__Impl" ../org.xtext.lwc.instances.ui/srcgen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:11721:1: rule__JvmWildcardTypeReference__Group__2__Impl : ( ( rule__JvmWildcardTypeReferenc...
public final void rule__JvmWildcardTypeReference__Group__2__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:11725:1: ( ( ( rule__Jv...
[ "public final void rule__JvmWildcardTypeReference__Group__2__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:16102:1: (...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
////////////////////////////////////////////////////////////////////////////////////////////////////// LogIn: Usuario > Usuario revibe un Usuario, lo compara con la DB, si coincide Devuelve un Usuario, si no, lanza una excepcion. Ej: logIn(Usuario x) devuelve Usuario
Usuario logIn(Usuario p) throws LoginException;
[ "private void verificarUsuarioLogado() {\n //pega o usuario atual\n FirebaseUser usuarioAtual = autenticacao.getCurrentUser();\n if (usuarioAtual != null) {\n String tipoUsuario = usuarioAtual.getDisplayName();\n abrirTelaPrincipal(tipoUsuario)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Purpose: Tests if a string of signs and digits contains digits Method: containsDigits Initialization: None Parameters: a string of signs and digits Correct result: True
@Test void containsDigitsNumbersAndSigns() { assertTrue(PasswordChecker.containsDigits("@@22/")); }
[ "@Test\n\tvoid containsDigitsNumbersandSpace() {\n\t\tassertTrue(PasswordChecker.containsDigits(\"1234567 0\"));\n\t}", "public boolean hasDigits(String s) {\n\t boolean digits = false;\n\n\t if (s != null && !s.isEmpty())\n\t {\n\t for (char c : s.toCharArray())\n\t {\n\t if (Ch...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Move the file from d:/prac/shubha.txt to d:/prac/Sub1/shubha.txt
public static void main(String[] args){ File from = new File("d:/prac/shubha.txt"); //rename and change the file and folder File to = new File("d:/prac/Sub1/shubha.txt"); //Rename if (from.renameTo(to)) System.out.println("Successfully Moved the file"); else System.out.println("Error while moving the file"); }
[ "void moveFileTo(File file, String newFolder);", "@Test\r\n\tpublic void moveTest() {\r\n\t\t// 源文件为null,抛出参数异常\r\n\t\ttry {\r\n\t\t\tIOUtil.move(null, new File(path + \"primeton\"), null);\r\n\t\t} catch (Exception e) {\r\n\t\t\tAssert.assertEquals(\"srcPath is null!\", e.getMessage());\r\n\t\t}\r\n\t\t// 目标文件为n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
public abstract boolean cancelSeat(int column_num, int row_num, boolean paramBoolean);
public abstract boolean selectSeat(int column_num, int row_num, String string);
[ "public boolean cancelSeat(int seatNo) {\r\n\t\tif (seatNo >= 1 && seatNo <= getNumberOfSeats()) {\r\n\t\t\treturn seats[seatNo-1].cancelBooking();\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public void cancelSeat() {\n this.bookedSeats = this.bookedSeats - 1;\n }", "public abstract boolean cancelRequest(int g...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removes a wad from the wad blacklist
public static void removeWadFromBlacklist(String filename, String sender) { String query = "DELETE FROM `" + mysql_db + "`.`blacklist` WHERE `name` = ?"; try (Connection con = getConnection(); PreparedStatement pst = con.prepareStatement(query)) { pst.setString(1, filename); if (...
[ "void unwhitelist(UUID player);", "public static void addWadToBlacklist(String filename, String sender) {\n String query = \"SELECT `md5`,`name` FROM `\" + mysql_db + \"`.`blacklist` WHERE `name` = ?\";\n try {\n Connection con = getConnection();\n PreparedStatement pst = con.p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of getEntityManager method, of class DaftarPengguna.
@Test public void testGetEntityManager() { System.out.println("getEntityManager"); DaftarPengguna instance = new DaftarPengguna(); EntityManager expResult = null; EntityManager result = instance.getEntityManager(); assertEquals(expResult, result); // TODO review the g...
[ "@Test\r\n public void testGetEntityManager() {\r\n /*System.out.println(\"getEntityManager\");\r\n UsuarioJpaController instance = null;\r\n EntityManager expResult = null;\r\n EntityManager result = instance.getEntityManager();\r\n assertEquals(expResult, result);\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set this GameObject to selected
public void isSelected() { selected = this; }
[ "@Override\n\tpublic void select() {\n\t\tselected = true;\n\t\tgetCamera().setFollowingObject(this);\n\t\tGameObject prevSelectedObj = getWorld().getSelectedObject();\n\t\t//Only select one unit for each time.\n\t\tif (prevSelectedObj instanceof Unit)\n\t\t\t((Unit)prevSelectedObj).deselect();\n\t\t//When selectin...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
For meme ratings, the meme ID is returned, if you need it!
@Nullable String getAssociatedMemeID();
[ "int getAssociatedMemeRating();", "public Meme getMeme(int id);", "public String getMetaversalID();", "public String setMediaID() {\n Log.i(TAG, \"setMediaID()\");\n mAuth = FirebaseAuth.getInstance();\n FirebaseUser user = mAuth.getCurrentUser();\n String userId = user.getUid();\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }