query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
show the address book name
public static String[] showAddressBookName() { File file=new File(ConstantValue.PATH); return file.list(); }
[ "@Override public String toString(){\n\t\treturn String.format(\"Address Book (%s)\", bookName);\n\t}", "public String getAddressBookName() {\n return addressBookName;\n }", "public void showAddressBook() {\n System.out.println(\"addressbook are created :\" + addressBookMap);\n }", "String getBo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Jvm j1 = Jvm.getJvm(122); System.out.println(j1); Jvm j2 = Jvm.getJvm(300); System.out.println(j2);
public static void main(String[] args) { JvmThread jvmThread = new JvmThread(123); JvmThread jvmThread1 = new JvmThread(456); jvmThread.start(); jvmThread1.start(); System.out.println(jvmThread); System.out.println(jvmThread1); }
[ "public static Jvm getCurrent() {\n return new Jvm();\n }", "HotspotRuntime(VMManagement vm) {\n jvm = vm;\n }", "public native static GameScript execVM(String oper1);", "public void testPhysicalMemoryEqualJvmAllocation() {\n String jvmOptions = \"-Xmx1024M -XX:MaxPermSize=128M\";\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Checking if it is of format Category:http......
public boolean isCategory(String entity){ return entity.matches("Category:(.*)"); }
[ "public boolean validateCategory(String item_category) {\r\n\t\tCategory[] category = Category.values();\r\n\t\tfor (Category c : category) {\r\n\t\t\tString s = c.toString();\r\n\t\t\tif (s.equalsIgnoreCase(item_category)) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "private boole...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Finds a method based on regex
private Method findWithPattern(String regex, Class<?> clazz) { return Arrays.stream(clazz.getMethods()) .filter(m -> m.getName().matches(regex)) .findFirst() .orElseThrow(AssertionError::new); }
[ "public MethodInfo findMethodInfo( String name, Signature sig ) ;", "PsiMethod @NotNull [] findMethodsBySignature(@NotNull PsiMethod patternMethod, boolean checkBases);", "public boolean methodRegexMatcher(String inputString){\n String regex = \"(public|private|protected)\\\\s+(static?|abstract?)\\\\s+(S...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Defines a basic storage for both buckets and blobs.
public interface DataStore { Bucket loadBucket(String bucketName); List<Bucket> loadBuckets(); void saveBucket(Bucket bucket); void deleteBucket(String bucketName); Blob loadBlob(String bucketName, String blobKey); List<Blob> loadBlobs(String bucketName); void saveBlob(String bucketNa...
[ "public interface StorageService {\n\n /**\n * List all the {@link Bucket}s in a given {@link com.google.openbidder.ui.entity.Project}.\n */\n List<Bucket> listAllBuckets(ProjectUser projectUser);\n\n /**\n * List all the objects in a given {@link Bucket}.\n */\n BucketContents listAllObjectsInBucket(Pr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
json array string convert to list with javaBean
public static <T> List<T> json2list(String jsonArrayStr, Class<T> clazz) { JavaType type = objectMapper.getTypeFactory().constructParametricType(List.class, clazz); try { return objectMapper.readValue(jsonArrayStr, type); } catch (IOException e) { throw new RuntimeExcept...
[ "List<String> toList(@NonNull JsonArray array) throws Exception;", "public static <T> List<T> json2list(String jsonArrayStr, Class<T> clazz) throws Exception {\r\n\t\tList<Map<String, Object>> list = (List<Map<String, Object>>) objectMapper.readValue(jsonArrayStr, new TypeReference<List<T>>() {\r\n\t\t});\r\n\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Both broker and virtualhost statistics.
public void testGenerateBrokerAndVirtualhostStatistics() throws Exception { sendUsing(_test, 5, 200); Thread.sleep(1000); for (ManagedConnection mc : _jmxUtils.getManagedConnections("test")) { assertEquals("Incorrect connection total", 0, mc.getTotalMessagesRece...
[ "public void testGenerateBrokerVirtualhostAndConnectionStatistics() throws Exception\n {\n sendUsing(_test, 5, 200);\n Thread.sleep(1000);\n \n for (ManagedConnection mc : _jmxUtils.getManagedConnections(\"test\"))\n {\n assertEquals(\"Incorrect connection total\", 5...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new o g c service layer with the primary key. Does not add the o g c service layer to the database.
public de.i3mainz.flexgeo.portal.liferay.services.model.OGCServiceLayer create( long layerId);
[ "@Override\n public de.i3mainz.flexgeo.portal.liferay.services.model.OGCServiceLayer createOGCServiceLayer(\n long layerId) {\n return _ogcServiceLayerLocalService.createOGCServiceLayer(layerId);\n }", "Layer create(Long travelId, String name);", "public Layer createLayer(Layer layer) throws...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Whether the requested offset/byte_count combo already exist in the cache
private boolean cached(int offset, int byte_count) throws BadRangeException { check_range(offset, byte_count); int start_block = get_start_block(offset); int end_block = get_end_block(offset, byte_count); for (int i = start_block; i <= end_block; i++) { if (!content.containsK...
[ "boolean isCached(K key);", "boolean inCache();", "protected boolean foundInCache() {\n\t\treturn iFoundInCache;\n\t}", "boolean hasCacheBlocks();", "boolean isCached(IPAddress address) {\n return false; // just so it compiles\n }", "public boolean isSetCacheLocalKeyUnchangedHitsCount() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the operation name for the specified parameters.
static String getOperationName(final ParameterValueGroup parameters) { return parameters.getDescriptor().getName().getCode().trim(); }
[ "String getOperationName();", "public String getOperationName();", "String operationName() {\n return name().toLowerCase(Locale.ROOT);\n }", "@Override\n public final String getOperatorAsString() {\n return myOperationName.toString();\n }", "java.lang.String getOperation();", "private Str...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a new LRU cache with a given "timetolive" in seconds, and a 30 second delay in cleaning up expired values.
public MyLRUCache(int cacheSizeLimit, int timeToLive) { this(cacheSizeLimit, timeToLive, 30); }
[ "public MyLRUCache(int cacheSizeLimit, int timeToLive, int cleanupDelay) {\n if (cacheSizeLimit <= 0) {\n throw new IllegalArgumentException(\"Cache-Size-Limit value must be > 0\");\n } else if (timeToLive <= 0) {\n throw new IllegalArgumentException(\"Time-To-Live value must be ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
verify we can't set the allocation per queue larger then cluster setting
@Test public void testRefreshQueuesMaxAllocationPerQueueLarge() throws Exception { CapacityScheduler cs = new CapacityScheduler(); cs.setConf(new YarnConfiguration()); cs.setRMContext(rm.getRMContext()); cs.init(conf); cs.start(); // change max allocation for B3 queue to be larger then cluster...
[ "@Test\n public void testVerifyQueuesMaxAllocationConf() throws Exception {\n\n CapacityScheduler cs = new CapacityScheduler();\n cs.setConf(new YarnConfiguration());\n cs.setRMContext(rm.getRMContext());\n setMaxAllocMb(conf,\n YarnConfiguration.DEFAULT_RM_SCHEDULER_MAXIMUM_ALLOCATION_MB);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column USER_PROFILE_VIEW.DATE_REGISTERED
public void setDateRegistered(Date dateRegistered) { this.dateRegistered = dateRegistered; }
[ "public void setRegister_date(Date register_date) {\r\n\t\tthis.register_date = register_date;\r\n\t}", "public void setRegisterDate(Date registerDate) {\r\n this.registerDate = registerDate;\r\n }", "public void setRegisterDate(Date registerDate) {\n this.registerDate = registerDate;\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets PermitRuleEO entity object.
public EntityImpl getPermitRuleEO() { return (EntityImpl)getEntity(0); }
[ "public SummitEntityImpl getEmpEO() {\r\n return (SummitEntityImpl)getEntity(1);\r\n }", "public OrdEOImpl getOrdEO() {\r\n return (OrdEOImpl)getEntity(0);\r\n }", "public OfficeIncome_EOImpl getOfficeIncome_EO() {\n return (OfficeIncome_EOImpl) getEntity(ENTITY_OFFICEINCOME_EO);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generates random data with passed size and range
public ArrayList<Integer> generateRandomData(int size, int range){ int counter ; Random randomnum = new Random(); ArrayList<Integer> generatedData = new ArrayList<Integer>(); for (counter = 0; counter < size ; counter++) { int...
[ "private static int[] generateArray(int size, int startRange, int endRange) {\n\t\tint[] array = new int[size];\n\t\tfor(int i = 0; i < array.length; i++) {\n\t\t\tarray[i] = (int)((Math.random()*(endRange - startRange + 1)) + startRange);\n\t\t}\n\t\treturn array;\n\t}", "private static int randomGen(int range) ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__AstExternalFunction__Group__5" $ANTLR start "rule__AstExternalFunction__Group__5__Impl" ../org.caltoopia.frontend.ui/srcgen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:9154:1: rule__AstExternalFunction__Group__5__Impl : ( '(' ) ;
public final void rule__AstExternalFunction__Group__5__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:9158:1: ( ( '(' ) ) // ....
[ "public final void rule__AstExternalFunction__Group_6__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:9378:1: ( rule__AstExternalF...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Factory for a "nullary" CALWorkspace.
public static CALWorkspace makeNullaryWorkspace() { Nullary workspace = new Nullary(); // Register the resource managers. workspace.registerNonCarAwareResourceManager(new CALSourceManager(new CALSourceNullaryStore())); workspace.registerNonCarAwareReso...
[ "Workspace createWorkspace();", "public static Feature createEmptyFeature() {\n return new Feature().withProperties(new Properties().withXyzNamespace(new XyzNamespace()));\n }", "public ShadowOperation createEmptyShadowOperation() {\n\t\treturn new ShadowOperation();\n\t}", "public WorkspacePatch() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the result of interpreting the object as an instance of 'Relational Table'. This implementation returns null; returning a nonnull result will terminate the switch.
public T caseRelationalTable(RelationalTable object) { return null; }
[ "public T caseRelationalSchema(RelationalSchema object) {\n\t\treturn null;\n\t}", "public T caseTable(Table object) {\n\t\treturn null;\n\t}", "public Object caseTable(Table object) {\r\n\t\treturn null;\r\n\t}", "public T caseRelationalExpression(RelationalExpression object)\n {\n return null;\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check if an airport exists by its id (iatacode).
@PermitAll @GET @Path("/exists/{id}") @Produces({MediaType.APPLICATION_XML}) public Response exists(@PathParam("id") String id) { Airport airport = airportMangerRemote.getById(id); if (airport != null) { return Response.ok().entity("true").build(); } return R...
[ "private static boolean validate(String airportID) {\r\n \tConnection connection = DatabaseUtil.getConnection();\r\n \t\r\n \tPreparedStatement ps;\r\n\t\t\r\n \ttry {\r\n \t\t// Create a prepared statement for substituting in values\r\n\t\t\tps = connection.prepareStatement(\r\n\t\t\t\t\"SELECT * FR...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creeaza o lista de utilizatori, care sunt prietenii userului dat de idul parametru
public List<Utilizator> creareLista(long id) { List<Utilizator> aux = new ArrayList<>(); List<Long> l = service.getFriend2(id); for (Long e : l) { Utilizator u = service.findOne(e); aux.add(u); } return aux; }
[ "List<Utilisateur> rechercherTousLesUtilisateurs();", "void nominateTask(String userId, List<String> userList, Long taskId);", "public List<Usuari> DemanarUsuaris(){\r\n System.out.println(\"Quants usuaris vas a introduir?: \");\r\n int tamany = lector.nextInt();\r\n List<Usuari> llista = n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Unpacks the JSONObject and forwards request to ServiceProviderMim.getMessageHeaders
public static JSONObject getMessageHeaders(JSONObject request) throws ApiRequestException, JSONException{ JSONArray array = request.getJSONArray(ServiceProviderConstants.DATA); JSONObject response; ApiResponse result; try { result = ServiceProviderMim.getMessageHeaders( request.g...
[ "public Map<String, String> getRequestHeaders();", "@Override\n public Response intercept(Chain chain) throws IOException {\n\n Request originalRequest = chain.request();\n\n //create a new Request with header from original one\n Request newRequest = origina...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sort the chromosomes by GH
public ArrayList<Chromosome> getChromosomesSorted() { int j; boolean flag = true; // set flag to true to begin first pass Chromosome temp; //holding variable ArrayList<Chromosome> sortedChromosomes = this.chromosomes; while (flag) { flag = false; //set flag to ...
[ "public static void sortChromosomes(Chromosome chromosomes[], int num) {\n Chromosome ctemp;\n boolean swapped = true;\n while (swapped) {\n swapped = false;\n for (int i = 0; i < num - 1; i++) {\n if (chromosomes[i].getCost() > chromosomes[i + 1].getCost())...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Read in all Users from the database and initialize the inmemory cache.
private final void initializeCache() { try { UserIndex index = makeUserIndex(this.dbManager.getUserIndex()); for (UserRef ref : index.getUserRef()) { String email = ref.getEmail(); String userString = this.dbManager.getUser(email); User user = makeUser(userString); ...
[ "public List<User> loadUsers() throws PersistentDataStoreException {\n return persistentDataStore.loadUsers();\n }", "protected void loadUsersIfNecessary() {\n if (userDB == null) {\n userDB = ESAPI.securityConfiguration().getResourceFile(\"users.txt\");\n }\n if (userDB ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Access methods for optional leaf child: "minorabate". Gets the value for child leaf "minorabate".
public YangUInt8 getMinorAbateValue() throws JNCException { YangUInt8 minorAbate = (YangUInt8)getValue("minor-abate"); if (minorAbate == null) { minorAbate = new YangUInt8("65"); // default } return minorAbate; }
[ "public void setMinorAbateValue(YangUInt8 minorAbateValue)\n throws JNCException {\n setLeafValue(Epc.NAMESPACE,\n \"minor-abate\",\n minorAbateValue,\n childrenNames());\n }", "long getMinor();", "public YangUInt8 getMinorOnsetValue() throws JNCException {\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Will return true if the player can do frame positioning. Hack for now, should be removed when players actually implement the framePositioning control.
public boolean isFramePositionable() { return framePositioning; }
[ "boolean appliesToFrame(int frame) {\n\t\treturn frame >= frameOrigin && frame < frameOrigin + frames;\n\t}", "public boolean isPositionValid(){\n\t\t//check overlapping with walls\n\t\tfor(Wall wall : Game.gameField.getWalls()){\n\t\t\tif(wall.overlaps(center))\n\t\t\t\treturn false;\n\t\t}\n\t\t//check overlapp...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
You can use initialDelay parameter with fixedRate and fixedDelay to delay the first execution of the task with the specified number of milliseconds. In the following example, the first execution of the task will be delayed by 5 seconds and then it will be executed normally at a fixed interval of 2 seconds
@Scheduled(fixedRate = 2000, initialDelay = 5000) public void scheduleTaskWithInitialDelay() { logger.info("Fixed Rate Task with Initial Delay :: Execution Time - {}", formatter.format(LocalDateTime.now())); }
[ "public ScheduledFuture<?> scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit);", "public ScheduledFuture<?> scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit);", "@Scheduled(\r\n\t\t\tinitialDelayString=\"${batch.greeting.initialdelay}\",\r\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the value of the 'var46' field.
public java.lang.Integer getVar46() { return var46; }
[ "public java.lang.Integer getVar46() {\n return var46;\n }", "public java.lang.CharSequence getVar54() {\n return var54;\n }", "public java.lang.CharSequence getVar54() {\n return var54;\n }", "public java.lang.Integer getVar43() {\n return var43;\n }", "public java.lang.Integer getVar43...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
returns home id from ean string
public static int toHomeInt(String EAN) { return Integer.parseInt(EAN.substring(EAN.length() -3));}
[ "public static String toHomeString(String EAN) { return EAN.substring(EAN.length() -3);}", "protected String parsePrimaryId(String uriTxt) {\n\t\tString id = null;\n\t\tint idx = uriTxt.lastIndexOf(QuickLinksAction.CHAR_SLASH);\n\t\tif (idx < uriTxt.length()) \n\t\t\tid = uriTxt.substring(idx+1);\n\t\treturn i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the SourceSchema that corresponds to this Relation
public void setSource(SourceSchema s) throws MediatorException{ if(s==null){ //name is not a source, it's probably a rule head from the query return; } source=s; if(source.getAttrs().size()!=terms.size()){ throw(new MediatorException("Number of attributes in predicate " + this + " has to be equal with ...
[ "public void setSchema( Schema schema )\n {\n this.schema = schema;\n }", "public void setSchema(java.lang.String schema) {\r\n this.schema = schema;\r\n }", "public void setSchema(IDatabaseSchema schema);", "void setSchemaUri(final String schemaUri);", "public void setSourceTable(Str...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This function will retrieve the known allergies from the server. MedicalConditionListServices This service class will make the service calls to get the conditions list.
@Override protected void getConditionsOrAllergiesData() { showProgress(); NetworkSuccessListener<JSONObject> successCallBackListener = new NetworkSuccessListener<JSONObject>() { @Override public void onResponse(JSONObject response) { medicalConditionOrAl...
[ "public List<ConditionLinkJson> getAllConditions() {\n\n List<ConditionLinkJson> allConditions = new ArrayList<>();\n\n // request parameters\n List<NameValuePair> parameters = new ArrayList<>();\n parameters.add(new BasicNameValuePair(PARAM_SYNONYMS, \"false\"));\n\n // run from ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
getInstance allows other classes to retrieve the instance of OrderingSystem
public static OrderingSystem getInstance() { return os; }
[ "public static ZOrderManager getInstance () {\n if (instance == null) {\n instance = new ZOrderManager();\n }\n return instance;\n }", "public static SalesOrderDataSingleton getInstance()\n {\n // Return the instance\n return instance;\n }", "public static ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Setzt den übergebenen String als neuen TabTitel für die NReferenz ein.
public void setTabTitle(String t);
[ "public void setTitle(String t){\r\n rTitle.set(t);\r\n }", "void setTableTitle(String tableTitle);", "void setTableText(String aTableText);", "public void setTitle(String str) {\n title = str;\n }", "public void setName(String s)\n {\n tablename = s;\n }", "private void s...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__For__Group__4__Impl" $ANTLR start "rule__While__Group__0" InternalWhdsl.g:1745:1: rule__While__Group__0 : rule__While__Group__0__Impl rule__While__Group__1 ;
public final void rule__While__Group__0() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalWhdsl.g:1749:1: ( rule__While__Group__0__Impl rule__While__Group__1 ) // InternalWhdsl.g:1750:2: rule__While__Group__0__Impl rule__While__Group__...
[ "public final void ruleWhile() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalWhdsl.g:341:2: ( ( ( rule__While__Group__0 ) ) )\n // InternalWhdsl.g:342:2: ( ( rule__While__Group__0 ) )\n {\n // Interna...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the auto close property. If set to true, the ASR session is automatically closed at the end of each recognition. Otherwise, it is kept open for the next recognition.
public SpeechRecognizer.Builder autoClose(boolean autoClose) { this.autoClose = autoClose; return this; }
[ "public void setAutoCloseRequested() {\n synchronized (mCancelMode) {\n if (mCancelMode != CancelMode.CLOSE_AUTO) {\n mCancelMode = CancelMode.CLOSE_AUTO;\n }\n }\n }", "public void setAutoClose(long timeout);", "protected void addAutoClose() throws Exceptio...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Store block of hashurl into database
private void saveHashURL() { LinkedList<HashURL> hashUrls = new LinkedList<>(); while (!queues.hashQueue.isEmpty()) { HashURL item = queues.hashQueue.poll(); hashUrls.add(item); } DBUtil.insertHashUrl(hashUrls); }
[ "public void saveBlock(int experience_id,int segment_id,String block_url,String allsubpage) throws SQLException {\t \t \r\n \t PreparedStatement prepStatement = dbConnection.prepareStatement(\"insert into georeachdb.block (experience_id,segment_id,block_url,allsubpage) values (?,?,?,?)\"); ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a new object of class 'VEX Document Fragment'.
VEXDocumentFragment createVEXDocumentFragment();
[ "VEXDocument createVEXDocument();", "Fragment createFragment();", "VEXElement createVEXElement();", "protected abstract Fragment createFragment();", "public DocumentFragment createDocumentFragment();", "@Function DocumentFragment createDocumentFragment();", "@Override\n protected Fragment createFragm...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get Call Detail Records for startDate and endDate.
List<Map<String, Object>> getCallDetailRecordList(Tenant tenant, Date startDate, Date endDate) throws CdrQueryException;
[ "public static Result getReportData( /* todo startDate, endDate */ ) {\n\n // todo information to be contained in the report\n\n // todo 1- how many customers where created during this period -- look at the events_sample/customer_created.json event\n\n // todo 2- The number of subscriptions per...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Main loop for single simulation run. Start method for CrapsSimulation asks for user details, ensures user makes a valid bet, begins the game, asks if the user would like to play again, and resets the game statistics for a clean slate
public void start() { while(true){ System.out.print("Welcome to SimCraps! Enter your user name: "); this.setName(s.nextLine()); System.out.println("Hello " + getName() + "!"); System.out.print("Enter the amount of money you will bring to the table: "); setBalance(Integer.parseInt(s.nextLine...
[ "public CrapsSimulation() {\n\t\tthis.crapsMetricsMonitor = new CrapsMetricsMonitor();\n\t\tthis.crapsGame = new CrapsGame(this.crapsMetricsMonitor);\n\t\tthis.name = \" \";\n\t\tthis.balance = 0;\n\t\tthis.bet = 0;\n\t\tthis.currentWinStreak = 0;\n\t\tthis.currentLoseStreak = 0;\n\t\tthis.s = new Scanner(System.in...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A helper method to configure a "pushState" enabled Navigator for given UI and ViewDisplay.
public static void configurePushStateEnabledNavigator(UI ui, ViewDisplay display) { HistoryExtension history = new HistoryExtension(); history.extend(ui); String contextPath = VaadinServlet.getCurrent().getServletContext() .getContextPath(); NavigationStateManager pushS...
[ "public static void configurePushStateEnabledNavigator(UI ui, ComponentContainer display) {\n HistoryExtension history = new HistoryExtension();\n history.extend(ui);\n\n String contextPath = VaadinServlet.getCurrent().getServletContext()\n .getContextPath();\n\n final Nav...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column public.Quest14.col9value
public String getCol9value() { return col9value; }
[ "public String getCol7value() {\n return col7value;\n }", "public String getCol9() {\r\n return col9;\r\n }", "public String getCol11value() {\n return col11value;\n }", "public java.lang.String getColumnValue() {\n return columnValue;\n }", "public String getCol6valu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generates the signature over the string of concatenated form control data as indicated by the SimpleSign spec.
protected String generateSignature(final Credential signingCredential, final String algorithmURI, final String formData) throws MessageEncodingException { log.debug(String.format( "Generating signature with key type '%s', algorithm URI '%s' over form control string '%s'"...
[ "protected String buildFormDataToSign(final VelocityContext velocityContext,\n final MessageContext<SAMLObject> messageContext,\n final String sigAlgURI) {\n final StringBuilder builder = new StringBuilder();\n\n boolean isRequest = false;\n if (velocityContext.get(\"SAMLR...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Delete the tuple having the given ID value from the table. Return false if no such tuple in the table.
public boolean delete(String ID) { int i = keyIndex(ID); if (i >= 0) { tuples.remove(i); return true; } return false; }
[ "public boolean delete(String id){\n try {\n PreparedStatement preparedStatement = connection.prepareStatement(\"DELETE FROM tb_location WHERE location_id = ?\");\n preparedStatement.setString(1, id);\n preparedStatement.executeUpdate();\n return true;\n } c...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Trim a list of strings, removing any strings which are empty after trimming, and returning a new list with the same traversal order as the original. The resulting list is mutable.
public static List<String> trim(List<String> strings) { if (notNull("strings", strings).isEmpty()) { return strings; } List<String> result; if (strings instanceof LinkedList<?>) { result = new LinkedList<>(); } else { result = new ArrayList<>()...
[ "public static List<String> mapTrim(final List<String> strings) {\n\t\tif (strings == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\tfor (int i = 0; i < strings.size(); i++) {\n\t\t\tstrings.set(i, strings.get(i).trim());\n\t\t}\n\t\treturn strings;\n\t}", "public static List<String> removeAllEmpties(final String ...o...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks if is mean fitness value.
public boolean isMeanFitnessValue(){ return meanFitnessValue; }
[ "public void setMeanFitnessValue(boolean meanFitnessValue) {\n\t\tthis.meanFitnessValue = meanFitnessValue;\n\t}", "private float isMean(float mean, int score) {\r\n return Math.round(mean) == score ? 1F : 0F;\r\n }", "boolean hasBayesianMeanRating();", "public final boolean checkMean(double mean) {...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets (as xml) the "algIdExtSource" attribute
void xsetAlgIdExtSource(org.apache.xmlbeans.XmlString algIdExtSource);
[ "void setAlgIdExtSource(java.lang.String algIdExtSource);", "void xsetAlgIdExt(org.apache.xmlbeans.XmlUnsignedInt algIdExt);", "void setAlgIdExt(long algIdExt);", "org.apache.xmlbeans.XmlString xgetAlgIdExtSource();", "java.lang.String getAlgIdExtSource();", "boolean isSetAlgIdExtSource();", "void xsetC...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the navigation bar color.
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP) public static void setNavigationBarColor(Window window, int navigationBarColor) { window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS); window.setNavigationBarColor(navigationBarColor); }
[ "public static void setNavigationBarColor(Activity activity, int navigationBarColor) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) setNavigationBarColor(activity.getWindow(), navigationBarColor);\n }", "public void setNavMenuItemThemeColors (int color){\n int navDefaultTextColor ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Indicates if the specified refresh rate is supported by this display device.
public final boolean isRefreshRateSupported(final int refreshRate) { return supportedSettings.stream().anyMatch((m) -> (m.getRefreshRate() == refreshRate)); }
[ "public synchronized boolean shouldRefresh() {\n long curTime = System.currentTimeMillis();\n if ((curTime - lastRefreshTime) > intervalTime) {\n lastRefreshTime = curTime;\n return true;\n }\n return false;\n }", "boolean isRefreshAllowed();", "public boolea...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Updates the current process instance from the given id and returns the associated ProcessInstance object. If the instanceId parameter is null, updates nothing and returns the current ProcessInstance. Throws ProcessManagerException when the instanceId is unkwown and when the current user is not allowed to access the ins...
public ProcessInstance resetCurrentProcessInstance(String instanceId) throws ProcessManagerException { SilverTrace.info("processManager", "ProcessManagerSessionController.resetCurrentProcessInstance()", "root.MSG_GEN_ENTER_METHOD", "instanceId = " + instanceId); if (instanceId !=...
[ "public void suspendInstance(String instanceId) {\n\t\tsuspendInstance(this.instances.get(instanceId));\n\t}", "@ServiceMethod(returns = ReturnType.SINGLE)\n VirtualMachineScaleSetVMInner update(\n String resourceGroupName,\n String vmScaleSetName,\n String instanceId,\n VirtualMach...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Called when an object has been removed. The binding of the newly removed object can be obtained using evt.getOldBinding().
public void objectRemoved(NamingEvent evt) throws RemoteException;
[ "protected void onRemove() {\n currentSo = null;\n showInformation(\"simulationObjectView\");\n }", "public void removePropertyChangeListener(java.beans.PropertyChangeListener pcl);", "public void onRemove(Component component)\n\t{\n\t}", "public void objectDeleted(IScenarioObject obj) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Writes a LoginEntry to the user's userData.xml file
public final void writeLoginEntryToFile(LoginEntry newEntry) { if(newEntry.getClass() != LoginEntry.class){ System.err.println("Error: Not a LoginEntry."); } else { writeDefaults(newEntry); } }
[ "private EntryXMLWriter() {\n\t\tuserFile = new File(System.getenv(\"APPDATA\") + \"/jKeeper/userData.xml\");\n\t}", "public final void writeCreditCardEntryToFile(CreditCardEntry newEntry) {\n\t\tif(newEntry.getClass() != CreditCardEntry.class){\n\t\t\tSystem.err.println(\"Error: Not a CreditCardEntry.\");\n\t\t}...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Getter of the boolean attribute playing.
public boolean getPlaying (){ return this.playing; }
[ "public BooleanProperty getPlaying() {\n\t\treturn playing;\n\t}", "boolean getIsPlay();", "public boolean isPlaying() {\n return state.isActive();\n }", "Boolean isPlaying() {\n return execute(\"player.playing\");\n }", "boolean isPlaying();", "public boolean getPlayerState()\r\n {...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the job offer.
public JobOffer getJobOffer() { return jobOffer; }
[ "public Offer getOffer() {\n return offer;\n }", "public String offer() {\n return this.offer;\n }", "@Override\n public IOffer getOffer() {\n return offer;\n }", "public JobOffer getJobOffer(int id) throws JobOfferNotFoundException {\n\n try {\n JobOffer job...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the texture coordinate of the first vertex
public void setTextureCoordDetail1A(E3DVector2F textureCoord){ this.vertices[0].setTextureCoordDetail1(textureCoord); }
[ "public void setTextureCoordA(E3DVector2F textureCoord){\r\n this.vertices[0].setTextureCoord(textureCoord);\r\n }", "void setStartTexture(ITexture texture);", "public void setTextureCoordB(E3DVector2F textureCoord){\r\n this.vertices[1].setTextureCoord(textureCoord);\r\n }", "public void ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return the person's pronouns preference.
public String getPronouns() { return pronouns; }
[ "public String getPronoun() {\r\n return pronoun;\r\n }", "public Atom getPronoun()\r\n\t{\r\n\t\treturn pronoun;\r\n\t}", "private static boolean isPronoun(CoreLabel pronoun) {\n return pronoun.get(CoreAnnotations.PartOfSpeechAnnotation.class).contains(\"PRP\") && !personalPronouns.contains(pr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Clears the value of the 'field621' field
public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField621() { field621 = null; fieldSetFlags()[621] = false; return this; }
[ "private void clear() {\n\t\ttxtId.setText(\"\");\n\t\ttxtAlert.setText(\"\");\n\t\ttxtNbMax.setText(\"\");\n\t\t\n\t}", "public void clearAnswer(){\r\n textField1.setText(\"\");\r\n }", "private void clearFields() {\r\n\t\tmCardNoValue1.setText(\"\");\r\n\t\tmCardNoValue1.setHint(\"-\");\r\n\t\tmCard...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This is the method clalled when the user clicks the add button, it calls the AddNewSubActivty when press
@Override public void onClick(View view) { startActivity(new Intent(MainActivity.this, AddNewSubActivity.class)); }
[ "@FXML\n public void IngredAddBtnClicked(){\n subMenuDisplay(IngredientsSubMenu);\n IngredientsAddPane.toFront();\n MenuPane.toFront();\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n\n super.onCreate(savedInstanceState);\n setContentView(R.lay...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Updates the models of the specified model holder and merges them if it is possible.
@SuppressWarnings({ "rawtypes", "unchecked" }) protected void updateModels(ModelHolder modelHolder){ for (int i = 0; i < modelHolder.size(); i++){ // get the ith model from the modelHolder Model model = modelHolder.getModel(i); // if it is a mergeable model, them merge them if (model insta...
[ "private Recommender updateModelAndRecSys(RecommenderBuilder builder, SybilModelBuilder sybilBuilder, DataModel model, TLongObjectMap<List<RecommendedItem>> recommendations) {\n\t\tDataModel updatedModel = sybilBuilder.updateSybilProfiles(model, recommendations);\n\t\treturn ExceptHandler.buildRecSys(builder, updat...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Will authenticate a user thanks to he datas in the userDTO
public UserDTO authenticate(UserDTO userFromForm) throws DataNotFoundException ;
[ "User authenticate(User user);", "public boolean authenticate(User user);", "public Boolean ClientLogin(userLoginDTO userLogin);", "@PostMapping(\"/login\")\n public ResponseEntity<JwtDTO> login(@Valid @RequestBody LoginUser loginUsuario, BindingResult bindingResult){\n \tSystem.out.println(\"usuario lo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Fire the left jet, expending one unit of fuel and accelerating the Lander one unit to the right.
public boolean fireLeftJet() { return fireJet(new Point(0.3, 0)); }
[ "public boolean fireRightJet()\r\n\t{\r\n\t\treturn fireJet(new Point(-0.3, 0));\r\n\t}", "private void rotateLeft() {\n robot.leftBack.setPower(-TURN_POWER);\n robot.leftFront.setPower(-TURN_POWER);\n robot.rightBack.setPower(TURN_POWER);\n robot.rightFront.setPower(TURN_POWER);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Use NEMAddress.newBuilder() to construct.
private NEMAddress(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); }
[ "Address createAddress();", "private static NetworkAddress newAddress(final URI uri) {\n return new NetworkAddress(uri.getHost(), Integer.valueOf(uri.getPort()));\n }", "public Address createAddress(String address);", "Adresse createAdresse();", "Adressen createAdressen();", "public @NotNull Add...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates new form ScreenISFForm
public ScreenISFForm() { initComponents(); setVisible(true); calculateISFButton.addActionListener(new ScreenIsfFormController(this,nameField,surnameField,emailField,realEstateAmountField, capitalAmountField, assetsAmountField, donationField, investmentField)); this.setDefaultCloseOperati...
[ "FORM createFORM();", "public newScreen() {\n initComponents();\n }", "public static AssessmentCreationForm openFillCreationForm(Assessment assm) {\n openCreationSearchForm(Roles.STAFF, WingsTopMenu.WingsStaffMenuItem.P_ASSESSMENTS, Popup.Create);\n\n Logger.getInstance().info(\"Fill out...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Accessor for the delete action of the FK.
ForeignKeyAction getDeleteAction();
[ "public Action getDeleteAction () {\n\t\treturn deleteAction;\n\t}", "MemberMetadata setDeleteAction(ForeignKeyAction action);", "public int getReferentialActionDeleteRule();", "public OpenApiOperation getDeleteOperation() {\n return deleteOperation;\n }", "public final String getDeleteMethodName(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
end of getConfigurationProperties() Test Case to Create Single Use Token with Missing or Invalid Merchant Account Number.
public void testMissingOrInvalidAccount() throws Exception { client = new PaysafeApiClient(merchantApiKey, merchantApiPassword, Environment.TEST); try { SingleUseToken sObjResponse = client.customerVaultService().createSingleUseToken( SingleUseToken.builder() ...
[ "@Test\r\n\tpublic void testReceiverAccountNumberEmpty() {\r\n\t\tAccountTransferRequest accountTransferRequest = new AccountTransferRequest();\r\n\t\taccountTransferRequest.setUsername(VALID_USERNAME);\r\n\t\taccountTransferRequest.setPassword(VALID_PASSWORD);\r\n\t\taccountTransferRequest.setSenderAccount(VALID_...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Instantiates a new pirate
public void createPirate() { activePirate = new Pirate(); }
[ "public Pago() {\n\t}", "public void createPolice() { activePolice = new Police(); }", "P createP();", "public Parroquia() {\n\t}", "public Prix() {\r\n }", "public Piecen ()\n {\n }", "public Paciente () {}", "public Produto() {}", "private static PDP getPDPNewInstance(){\n\n PDPCon...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
testwithinVirus() Method tests if inside the virus
@Test public void testwithinVirus() { //Create Virus object Virus v=new Virus(4,2,6,1,3,5,0,false); //Check if inside the virus assertEquals(v.withinVirus(6, 5),true); }
[ "public String getVirusName() {\n return this.VirusName;\n }", "public void setVirusName(String VirusName) {\n this.VirusName = VirusName;\n }", "@Test \r\n\tpublic void testisAlive() {\r\n\t\t//Create Virus object\r\n\t\tVirus v=new Virus(); \r\n\t\t\r\n\t\t//Check if virus is alive\r\n\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the panel which displays selectors for the columns.
protected JComponent getColumnSelectorPanel() { return entryBox_; }
[ "public JPanel getSelectorPanel() {\n return selector;\n }", "Panel getPanels();", "private ch.softenvironment.view.DataSelectorPanel getPnlDataSelector() {\n\tif (ivjPnlDataSelector == null) {\n\t\ttry {\n\t\t\tivjPnlDataSelector = new ch.softenvironment.view.DataSelectorPanel();\n\t\t\tivjPnlDataSel...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the decode options parameters.
public native void setDecodeOptions(DecodeOptions options) throws DecoderException;
[ "public void setDecodeParms(List<?> decodeParams)\n {\n stream.setItem(COSName.DECODE_PARMS,\n COSArrayList.converterToCOSArray(decodeParams));\n }", "public native void getDecodeOptions(DecodeOptions options)\n\t\t\tthrows DecoderException;", "protected void setEncodingsFromOptions(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generic base interface for generated Thrift objects.
public interface TBase extends Cloneable { /** * Reads the TObject from the given input protocol. * * @param iprot Input protocol */ public void read(TProtocol iprot) throws TException; /** * Writes the objects out to the protocol * * @param oprot Output protocol */ public void write(T...
[ "CustomT createCustomT();", "public interface WireGenerator {\n\n /**\n * Generates a PhysicalWireDefinition for a bound service.\n *\n * @param binding the service binding\n * @param callbackUri the callback URI associated with this wire or null if the service is unidirectional\n * @re...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the flight class.
public String getFlightClass() { return flightClass; }
[ "public java.lang.String getTravelclass() {\n return travelclass;\n }", "public void setFlightClass(String flightClass) {\n\t\tthis.flightClass = flightClass;\n\t}", "public String getFullclass() {\n return fullclass;\n }", "public DeviceClass getDeviceClass() {\n return this.blueto...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Populates the JavaWireSourceDefinition with resource wiring information.
void generateResourceWireSource(JavaSourceDefinition definition, LogicalResourceReference<?> resourceReference) throws GenerationException;
[ "void generateWireSource(JavaSourceDefinition definition, LogicalReference reference, EffectivePolicy policy) throws GenerationException;", "void attachToSource(PWSD source, PhysicalWireTargetDefinition target, Wire wire) throws WiringException;", "void attachObjectFactory(PWSD source, ObjectFactory<?> objectFa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Parses a single command.
void parseCommand(String command);
[ "public Chatbot parseCommand(String commandString);", "public static Command parse(String fullCommand) {\n String[] arr = fullCommand.split(\" \", 2);\n String keyCommand = arr[0].trim();\n\n try {\n switch (keyCommand) {\n case \"list\":\n return new List...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method that generates the session date line
private static String generateSessionDateLine(Session session){ String sessionDateLineToWrite = ""; sessionDateLineToWrite += "Date : " + SEPARATOR_COLUMN_CSV + DateUtils.getStringFromDate(session.getSessionDate()) + "\n\n"; return ...
[ "private static String generatePositionDateLine(Session session, String uuid){\n String positionDateLineToWrite = \"Date : \" + SEPARATOR_COLUMN_CSV;\n for(int i=0; i<session.getPlayerSessionDataMap().get(uuid).getPlayerPositionData().size(); i++){\n positionDateLineToWrite\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
To account for anything that might not have been metioned in the instruction return phrase.toUpperCase().chars().map(KEYPRESSES::get).sum();
public static int presses(String phrase) { return phrase.toUpperCase().chars().map(i->{ if (KEYPRESSES.containsKey(i)){ return KEYPRESSES.get(i); } return 0; }).sum(); }
[ "public String classifyAllPOSY() {\r\n\t\r\n\t\tint count = 0;\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tString delimiters = \"\\\\W\";\r\n\t\t\tString[] tokens = text.split(delimiters);\r\n\t\t\t\r\n\t\t\tString feeling = \"\";\r\n\t\t\t\r\n\t\t\tfor (int i = 1; i < tokens.length; ++i) {\r\n\t\t\t\t\r\n\t\t\t\t// Add weight...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Getting Bitmap from Fresco
private void gettingBitmap() { ImageRequest request = null; try { contentImagePreviewImage.setImageURI(Uri.parse(imageUrlsObject.getString(Const.IMAGE_REGULAR))); request = ImageRequestBuilder .newBuilderWithSource(Uri.parse(imageUrlsObject.getString(Const...
[ "public Bitmap getBitmap(){\r\n //TODO: Get the bitmap from the image file.\r\n return null;\r\n }", "public Bitmap fetchImg(){\r\n\r\n\t\t\r\n\t\tBitmap bitm = BitmapFactory.decodeFile(bitmapPath);\r\n\t\treturn bitm;\r\n\t}", "public Bitmap getImagem(){\n\n Bitmap imagem=null;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removes the TopicConnectionFactory of name name from JNDI and deletes it
void deleteTopicConnectionFactory(String name);
[ "public void deleteTopicConnectionFactory(String name);", "public void deleteConnectionFactory(String name);", "void deleteConnectionFactory(String name);", "void deleteQueueConnectionFactory(String name);", "public void deleteQueueConnectionFactory(String name);", "public void seDeconnecter(){\n tr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Metodo que obtiene un string dependiendo del parametro periodo que se le pase
public String obtenPeriodoString(short p) { String perString = null; if (p == 1) { perString = "Agosto-Diciembre"; } else if (p == 2) { perString = "Enero-Junio"; } else if (p == 3) { perString = "Verano"; } return perStr...
[ "String getPeriodName();", "public java.lang.String getPeriodicidad();", "@Override\n public String toString(){\n \n return periodo;\n \n }", "public String getPeriodo() {\n\t\treturn periodo;\n\t}", "public String getPeriodName(int i){\n if (this instanceof Hockey) ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the JSON representation of the RegistrationSourceObject.
public JSONObject toJSON() { JSONObject jo = new JSONObject(); try { jo.put("registration_source_id", registration_source_id); jo.put("registration_source_name", registration_source_name); } catch (JSONException je) {} return jo; }
[ "public RegistrationSourceObject (JSONObject jObject) {\n\t\ttry {\n\t\t\tregistration_source_id = jObject.getInt(\"registration_source_id\");\n\t\t} catch (JSONException je) {}\n\t\ttry {\n\t\t\tregistration_source_name = jObject.getString(\"registration_source_name\");\n\t\t} catch (JSONException je) {registratio...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Use GetBikeAndBikeUserResponseMessage.newBuilder() to construct.
private GetBikeAndBikeUserResponseMessage(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); }
[ "com.yzh.rfid.app.response.BikeUser.BikeUserMessageOrBuilder getBikeUserOrBuilder();", "com.yzh.rfid.app.response.BikeUser.BikeUserMessage getBikeUser();", "com.yzh.rfid.app.response.Bike.BikeMessageOrBuilder getBikeOrBuilder();", "com.yzh.rfid.app.response.Bike.BikeMessage getBike();", "public com.yzh.rfid...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tokenizes a ECMAScript string. The current character is used as the quote character.
private Token tokenizeString() throws CompilerException { StringBuffer buffer = new StringBuffer(); int quote = c; // skip the leading quote readChar(); while (true) { if (c == quote) { break; } else if (isEOF()) { throwCompilerException("EOF in string literal"); ...
[ "private StringToken tryTokenizeString() {\n String string = \"\";\n\n if (validPosition() && input[inputPos] == '\"') {\n inputPos++;\n\n while (validPosition() && input[inputPos] != '\"') {\n string += input[inputPos];\n inputPos++;\n }\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
iceberg order is not supported for now
@Test public void testPlaceIcebergOrder(){ BinanceApi.PlaceOrderRequest placeOrderRequest = new BinanceApi.PlaceOrderRequest(); placeOrderRequest.setOrderSide(BinanceApi.OrderSide.BUY); placeOrderRequest.setSymbol("LTCBTC"); placeOrderRequest.setPrice(new BigDecimal("0.005")); ...
[ "public interface OpenOrder {\n\n /**\n * Returns the ID for this order.\n *\n * @return the ID of the order.\n */\n String getId();\n\n /**\n * Returns the exchange date/time the order was created.\n *\n * @return The exchange date/time.\n */\n Date getCreationDate();\n\n /**\n * Returns the...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method fetchs the chats from the database
public List<Chats> getChats() { Session session = new AnnotationConfiguration().configure().buildSessionFactory().openSession(); Transaction t; t = session.beginTransaction(); Query q = session.createQuery("From Chats"); List<Chats> chatList = q.list(); return chatList; }
[ "public ObservableList<Chat> getChats() {\n HttpResponse<JsonNode> response = unirest.get(\"/chatEntities/search/userin\")\n .queryString(\"id\", id)\n .asJson();\n\n JSONArray chats = response.getBody().getObject()\n .getJSONObject(\"_embedded\").getJSONAr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Unfollow someone. Update the User friends list given by id_user by removing the friend id given by id_user_to_add variable.
@ApiMethod(name = "unfollow_user", path="put/users/{id_user}/unfollow/{id_user_to_remove}", httpMethod = HttpMethod.PUT) public void unfollowUser(@Named("id_user") String id_user, @Named("id_user_to_remove") String id_user_to_remove){ DatastoreService datastore = DatastoreServiceFactory.getDatastoreService(); ...
[ "void unFollow(User user);", "public void unfollow(User toUnfollowUser) {\n Assert.notNull(toUnfollowUser, \"User to un-follow can not be null\");\n getFollowings().remove(toUnfollowUser);\n toUnfollowUser.removeFollower(this);\n }", "@ApiMethod(name = \"follow_user\", path=\"put/users/{...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Prompts the user to delete the selected game
private void promptUserToDeleteGame(final BaseDTO game) { AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setTitle(R.string.removeGame); TextView textView = new TextView(this); textView.setText(R.string.removeGameMsg); builder.setView(textView); builder.setPositiveButton(R.string....
[ "@FXML\n private void deleteGame() {\n if (VistaNavigator.confirmationAlert(Alert.AlertType.CONFIRMATION, language.get(Lang.CONFIRMATION))) {\n Game game = table.getSelectionModel().getSelectedItem();\n for (Image image : game.getImages()) {\n new File(image.getPath())...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test all > = <= etc, but no need to test for all other cases as orthogonal
@Test public void testOperatorBoundaries() { assertThat(true).isEqualTo(false); }
[ "public static void main(String[] args) {\n\t\t\r\n\t\tint x = 10;\r\n\t\tint p = 5;\r\n\t\tSystem.out.println(x > p);\r\n\t\tSystem.out.println(x < p);\r\n\t\tSystem.out.println(x < p + 100);\r\n\t\tSystem.out.println(x < p - 100);\r\n\t\tSystem.out.println(10 + x < p + 100);\r\n\t\t\r\n\t\tSystem.out.println(\"Te...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the previous_magistrate value for this InsolvencyCase.
public java.lang.String getPrevious_magistrate() { return previous_magistrate; }
[ "public double getZPrevious()\r\n\t{\r\n\t\treturn zPrevious;\r\n\t}", "public KnownVehicle getPrevious() {\r\n\t\treturn previous_;\r\n\t}", "public void setPrevious_magistrate(java.lang.String previous_magistrate) {\n this.previous_magistrate = previous_magistrate;\n }", "public java.lang.String g...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a modal chemical editor dialog to edit a single molecule, which may, of course, consist of multiple disconnected fragments. Query features can be edited, if the passed mol's fragment bit is true.
public SwingEditorDialog(Dialog owner, StereoMolecule mol) { this(owner, mol, Dialog.DEFAULT_MODALITY_TYPE); }
[ "public SwingEditorDialog(Frame owner, StereoMolecule mol) {\n\t\tthis(owner, mol, Dialog.DEFAULT_MODALITY_TYPE);\n\t}", "public SwingEditorDialog(Frame owner, StereoMolecule[] mol, ModalityType modalityType) {\n\t\tsuper(owner, DEFAULT_MOLECULE_TITLE, modalityType);\n\t\tmMolecule = new StereoMolecule();\n\t\tin...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Instructs the client to run automatic bridging
void runAutomaticBridging() throws IOException, SoapException;
[ "public void buildBridges() {\n\t\tList<MagneticComponent> firstTier = getValidLinks(0);\r\n\t\t\r\n\t\tbuildNextBridge(firstTier, 0);\r\n\t}", "public void setBrid(java.lang.String brid) {\r\n this.brid = brid;\r\n }", "public void initiateOBDConnection() {\n this.sm.initiateOBDSetup();\n }...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructor for objects of class bord with 8 queens randomly placed
public bord() { bord = new int[8][8]; numQueens = 8; placeQueens(8); }
[ "public QueensChamber()\n {\n super();\n }", "public void placeQueens(int num)\n {\n Random getRand = new Random();\n int rand;\n //iterates thru the colems of the 2d bord array\n for(int i = 0; i < num; i++){\n //generates a random number betwean 0 and num-...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removes the specific action. If it was the selected one, selection is lost. This method has no effect if the popupmenu is overridden.
public void removeAction(Action action) { menuDirty = true; actions.remove(action); if (action == selectedAction) { if (actions.isEmpty()) { selectedAction = null; } else { // Selected the first element if there are any left ...
[ "public void removeSelectedAction() {\n\t\tvar selectedItems = pairsListView.getSelectionModel().getSelectedItems();\n\t\tpairsListView.getItems().removeAll(selectedItems);\n\t}", "public void doUnselectAction() {\n }", "public void removeAllActions() {\n menuDirty = true;\n actions.clear();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests that the xml is parsed into the correct operations
@Test public void testParseSubsystem() throws Exception { //Parse the subsystem xml into operations List<ModelNode> operations = super.parse(subsystemXml); ///Check that we have the expected number of operations Assert.assertEquals(10, operations.size()); //Check that each ...
[ "public void testXMLParsing() throws ParserException {\n tpcs = new TestParserContextStack(ALL_XML_ATTRS);\n TestWordReader wordReader = new TestWordReader();\n Parser parser = new Parser(tpcs);\n parser.addWordReader( wordReader );\n parser.parse( XML_STREAM );\n wordRea...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
We test these cases: If dy > 0 and abs(dx) If dy If dx > 0 and abs(dy) If dx If abs(dx) == abs(dy) return null. We also make sure, that all combinations are covered by these cases.
@Test public void testNearest() { for (int dx = -5; dx <= 5; dx++) { for (int dy = -5; dy <= 5; dy++) { if (dy > 0 && Math.abs(dx) < Math.abs(dy)) assertEquals(Direction.SOUTH, Direction.nearest(dx, dy)); else if (dy < 0 && Math.abs(dx) < Math....
[ "static boolean isValid (int d, long a, long b) {\n \n // 1. The origin is an ambiguous point that is part of all quadrants.\n if ((a == 0) && (b == 0)) {\n return true;\n }\n \n // 2. Other than at the origin, the boundary conditions differ between the\n // quadrants.\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column ypxx_backup.VCHAR1
public String getVchar1() { return vchar1; }
[ "public void setVchar1(String vchar1) {\n this.vchar1 = vchar1;\n }", "public String getVchar2() {\n return vchar2;\n }", "public String getsBVarchar() {\n\t\treturn sBVarchar;\n\t}", "public StrColumn getPdbxRecordRevised1() {\n return (StrColumn) (isText ? textFields.computeIfAbse...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method get the partitioned datapoints using the task index and write those values using the respective edge name.
@Override public void execute() { Buffer buffer; byte[] line = new byte[getDataSize() * 2]; ByteBuffer byteBuffer = ByteBuffer.allocate(getDataSize() * 2); byteBuffer.order(ByteOrder.BIG_ENDIAN); InputSplit inputSplit = source.getNextSplit(context.taskIndex()); int co...
[ "int getPartitions(int index);", "org.roylance.yaorm.TestingModel.Task getFlattenedTasks(int index);", "com.google.monitoring.v3.TimeSeriesData.PointData getPointData(int index);", "private Step exportData() {\n\n return stepBuilderFactory.get(STEP_EXPORT_METER_DATA)\n ....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__XConstructorCall__Group_3__1__Impl" $ANTLR start "rule__XConstructorCall__Group_3__2" ../org.xtext.lwc.instances.ui/srcgen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:9709:1: rule__XConstructorCall__Group_3__2 : rule__XConstructorCall__Group_3__2__Impl rule__XConstructo...
public final void rule__XConstructorCall__Group_3__2() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:9713:1: ( rule__XConstructorCall__G...
[ "public final void rule__XConstructorCall__Group_3__2__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:9725:1: ( ( ( rul...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Calls super, loadCrashlytics(), readIntent(), initializeVariable(), and checkRequirement() on this activity's creation.
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); loadCrashlytics(); readIntent(); initializeVariable(); checkRequirement(); }
[ "protected void startApplicationActivityTracker() {}", "private void initiateActivity() {\r\n\t\tif (application == null) {\r\n\t\t\tthis.application = SmartApplication.REF_SMART_APPLICATION;\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\tif (application.attachedCrashHandler)\r\n\t\t\t\tCrashReportHandler.attach(this);\r\n\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Metodo que convierte un listado de configuracionFamiliaDTO en un informe excel DTO
public static InformeExcelDTO convertFromConfiguracionFamilias(List<ConfiguracionesFamiliaDTO> configuracionFamiliaList) { InformeExcelDTO informeExcel = new InformeExcelDTO(); informeExcel.setNombre("ListadoConfiguracionFamilias"); String[] cabecera ={"Id","Nombre","Familia Instalación","Observaciones","Fech...
[ "public static InformeExcelDTO convertFromFamiliaInstalacions(List<FamiliaInstalacionDTO> familiaInstalacionList) {\r\n\t\tInformeExcelDTO informeExcel = new InformeExcelDTO();\r\n\t\tinformeExcel.setNombre(\"ListadoFamiliaInstalacions\");\r\n\t\tString[] cabecera ={\"Id\",\"Nombre\",\"Area\",\"Activo\",\"Fecha Al...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Finds the nearest checkbox to the component with the given text. The total amount of checkboxes is needed to make sure all checkbox are taken into account.
public CheckableComponent.Pair getCheckbox(String nearest, int totalAmount){ return getCheckbox(getComponentWithText(nearest), totalAmount); }
[ "public WebElement getCheckbox(String checkboxText, int ofCheckboxTextOccurrence) {\n\t\tif (ofCheckboxTextOccurrence < 1)\n\t\t\tthrow new InvalidArgumentException(String.format(\"The checkbox text %s position should be greater than zero, on which tried to perform action. Currently given position occurrence is %s\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Load an Iceberg table using the catalog and table identifier (or table path) specified by the configuration.
public static Table loadTable(Configuration conf) { return loadTable(conf, conf.get(InputFormatConfig.TABLE_IDENTIFIER), conf.get(InputFormatConfig.TABLE_LOCATION), conf.get(InputFormatConfig.CATALOG_NAME)); }
[ "private void analyzeLoadIntoIcebergTable() throws AnalysisException {\n Path sourcePath = sourceDataPath_.getPath();\n String tmpTableName = QueryStringBuilder.createTmpTableName(dbName_,\n tableName_.getTbl());\n QueryStringBuilder.Create createTableQueryBuilder =\n QueryStringBuilder.Creat...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
repeated .llql_proto.Expr expand_array = 1;
public java.util.List<? extends com.vitessedata.llql.llql_proto.LLQLExpr.ExprOrBuilder> getExpandArrayOrBuilderList() { return expandArray_; }
[ "java.util.List<? extends com.vitessedata.llql.llql_proto.LLQLExpr.ExprOrBuilder> \n getExpandArrayOrBuilderList();", "com.vitessedata.llql.llql_proto.LLQLExpr.Expr getExpandArray(int index);", "public com.vitessedata.llql.llql_proto.LLQLExpr.Expr.Builder addExpandArrayBuilder() {\n return getExpa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of setID_Username method, of class Associate.
@Test public void testSetID_Username() { System.out.println("setID_Username"); String username = ""; Associate instance = null; instance.setID_Username(username); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prot...
[ "@Test\n public void testGetID_Username() {\n System.out.println(\"getID_Username\");\n Associate instance = null;\n String expResult = \"\";\n String result = instance.getID_Username();\n assertEquals(expResult, result);\n // TODO review the generated test code and remo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }