query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
sets the merchant points of the player
public void setMerchantPoints(int points) { if (pointsPullCheck(points)) { merchantPoints += points; } }
[ "public void setCurrPoints(int points){\n playerPoints = playerPoints + points;\n }", "public void setEngineerPoints(int points){\n\t player.setEngineer(points);\n }", "public void setTraderPoints(int points){\n\t player.setTrader(points);\n }", "public void initializePlayerPointValues() {\n this.play...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the 'producer_time' field.
public cz.muni.fi.sdipr.kafka.latency.avro.Payload.Builder setProducerTime(long value) { validate(fields()[1], value); this.producer_time = value; fieldSetFlags()[1] = true; return this; }
[ "public void setProducerTime(java.lang.Long value) {\n this.producer_time = value;\n }", "public java.lang.Long getProducerTime() {\n return producer_time;\n }", "public java.lang.Long getProducerTime() {\n return producer_time;\n }", "public cz.muni.fi.sdipr.kafka.latency.avro.Payload.Builder...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the media size.
public MediaSizeName getMediaSize() { return mediaSize; }
[ "public VideoSize getSize() {\n\t\treturn size;\n\t}", "public ImageSize getSize() {\n return size;\n }", "@Schema(example = \"2186\", description = \"Size of the image in bytes.\")\n public Long getSize() {\n return size;\n }", "VideoSize getSize() {\n return size;\n }", "public String g...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Verifies that we can send and peek a message.
@Test void peekMessage() { // Arrange final String messageId = UUID.randomUUID().toString(); final ServiceBusMessage message = TestUtils.getServiceBusMessage(CONTENTS, messageId, 0); // Assert & Act StepVerifier.create(sender.send(message).then(receiver.peek())) .assertNext(receivedMessage -> assertTrue(receivedMessage.getProperties().containsKey(MESSAGE_TRACKING_ID))) .verifyComplete(); }
[ "boolean hasIsPerMsg();", "boolean hasReadyMsg();", "boolean hasMsgbyte();", "boolean hasEstablishConsume();", "private boolean canSend() {\n\n if (StringUtils.isEmpty(constructedCommand())) return false;\n\n int beginIndex = constructedCommand()\n .indexOf(serialProperties.getC...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Construct client for accessing prediction service server using the existing channel.
public RpcClient(ManagedChannelBuilder<?> channelBuilder) { channel = channelBuilder.build(); blockingStub = PredictionServiceGrpc.newBlockingStub(channel); asyncStub = PredictionServiceGrpc.newStub(channel); modelServiceBlockingStub = ModelServiceGrpc.newBlockingStub(channel); modelServiceStub = ModelServiceGrpc.newStub(channel); channelzBlockingStub = ChannelzGrpc.newBlockingStub(channel); }
[ "public void create_channel() {\n EventLoopGroup group = new NioEventLoopGroup();\n try {\n Bootstrap b = new Bootstrap();\n b.group(group)\n .channel(NioSocketChannel.class)\n .handler(new HttpSnoopClientInitializer(null));\n\n //...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
get content of doc in the collection, and send back to the client
public void getCache(int docid){ try { FileReader fr; String file_name = ServerThread.collection_path+docid+".html"; fr = new FileReader(file_name); BufferedReader file_input = new BufferedReader(fr); String line; String file_content=""; while ((line = file_input.readLine()) != null) { file_content += line; } fr.close(); send(file_content); //System.out.println(file_content); } catch (IOException ex) { Logger.getLogger(ServerThread.class.getName()).log(Level.SEVERE, null, ex); System.out.println("Could not access file: "+docid); } }
[ "Collection<Document> getDocuments();", "private void handleDocuments(HttpResponse response) {\n String content = readContent(response);\n Type collectionType = new TypeToken<List<DocsEntry>>() {}.getType();\n List<DocsEntry> entries = getGson().fromJson(content, collectionType);\n success(entries);\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add a map join to this stream using the specified join type and ON condition.
default <K, V> FromStream<V, MapJoin<X, K, V>> join(MapAttribute<? super X, K, V> attribute, JoinType joinType, Function<? super MapJoin<X, K, V>, ? extends Expression<Boolean>> on) { if (attribute == null) throw new IllegalArgumentException("null attribute"); if (joinType == null) throw new IllegalArgumentException("null joinType"); if (on == null) throw new IllegalArgumentException("null on"); QueryStreamImpl.checkOffsetLimit(this, "join()"); return new FromStreamImpl<>(this.getEntityManager(), new SearchType<>(attribute.getElementType().getJavaType()), (builder, query) -> { final From<?, X> from = (From<?, X>)this.configure(builder, query); // cast must be valid... final MapJoin<X, K, V> join = from.join(attribute, joinType); final Expression<Boolean> onPredicate = on.apply(join); if (onPredicate != null) join.on(onPredicate); return join; }, new QueryInfo()); }
[ "public void addJoin(int type, Expression on_expression) {\n join_set.add(new JoinPart(type, on_expression));\n }", "default <E> FromStream<E, SetJoin<X, E>> join(SetAttribute<? super X, E> attribute, JoinType joinType,\n Function<? super SetJoin<X, E>, ? extends Expression<Boolean>> on) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates new form menuFornecedorNovoView
public menuFornecedorView() { initComponents(); botoes(true,true,false,true,false,false); campos(false,true,false,false,false,false); }
[ "@Listen(\"onClick=#btnNuevo\")\n\tpublic void nuevo(){\n\t\tMap<String, Object> params = new HashMap<String, Object>();\n\t\tparams.put(\"Persona\", null);\n\t\tparams.put(\"VentanaPadre\", this);\n\t\tWindow ventanaCargar = (Window) Executions.createComponents(\"/mvc/personaEditar.zul\", winListaPersonas, params)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Writes the JSON file as compressed GZip file
public static void writeToJsonGzFile(Object jsonObj, Path filePath) throws JsonGenerationException, JsonMappingException, IOException { GZIPOutputStream gzipOS = new GZIPOutputStream(Files.newOutputStream(filePath)); WritableByteChannel out = Channels.newChannel(gzipOS); ObjectMapper mapper = new ObjectMapper(); byte[] jsonOut = mapper.writeValueAsBytes(jsonObj); out.write(ByteBuffer.wrap(jsonOut)); out.close(); }
[ "private ByteOutputArray generateGzipJSON(UserInfo ui, StudyInfo si, DataSource ds, Iterator iter, boolean segmentData) {\n ByteArrayOutputStream bos = new ByteArrayOutputStream();\n boolean additionalData = false;\n try {\n GZIPOutputStream gzip = new GZIPOutputStream(bos);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Will guess randomly until it hits something, then continues to guess neighbours while it keeps hitting things.
public int[] randomGuessUntilHit() { //Figure out whether or not the last guess was a hit boolean hitLast = this.numHits > this.lastNumHits; //If this is the first guess or we missed and have no other squares to guess, //make a new list of neighbours if (! hitLast && this.neighbours.isEmpty()) { this.lastGuess = alwaysRandomGuess(); //Otherwise, we need to guess from the list of neighbours } else { //Check if the last guess was a hit if (hitLast) { //Loop through all of the neighbours to the square we hit and //add them to the ArrayList for (int i=-1; i<=1; i++) { for (int j=-1; j<=1; j++) { //We only want to check lattice neighbours, not diagonals. if (Math.abs(i-j) % 2 == 0) { continue; } //Error checking (can't be out of array's bounds) if (this.lastGuess[0]+i < 0 || this.lastGuess[0]+i >= this.board.getBoardSize()) { continue; } if (this.lastGuess[1]+j < 0 || this.lastGuess[1]+j >= this.board.getBoardSize()) { continue; } //If the arraylist doesn't already have these coordinates //and it isn't already guessed, add it to the neighbours if (! this.containsPair(this.neighbours, this.lastGuess[0]+i, this.lastGuess[1]+j) && !this.board.isGuessed(this.lastGuess[0]+i, this.lastGuess[1]+j)) { this.neighbours.add(new int[] {this.lastGuess[0]+i, this.lastGuess[1]+j}); } } } } //Randomly pick from the list of neighbours int guessIndex = this.random.nextInt(this.neighbours.size()); this.lastGuess = this.neighbours.get(guessIndex); //Remove the pair from the ArrayList because now it will have been //guessed this.neighbours.remove(lastGuess); } //Update the previous number of hits to be equal to the current amount this.lastNumHits = this.numHits; //Return the pair that is generated return this.lastGuess; }
[ "public void guess() {\n int[] coords;\n //If the AI is on medium, use the random guesses until something is hit approach\n if (this.difficulty.equalsIgnoreCase(\"medium\")) {\n coords = this.randomGuessUntilHit();\n \n //If the AI is on hard, use the probability di...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the historical timeseries db id.
public void setHistoricalTimeSeriesId(Long historicalTimeSeriesId) { this._historicalTimeSeriesId = historicalTimeSeriesId; }
[ "public Long getHistoricalTimeSeriesId() {\n return _historicalTimeSeriesId;\n }", "@Override\n\tpublic void setId(int id) {\n\t\t_dmHistoryMaritime.setId(id);\n\t}", "public void setIdGenerator(HistoryServiceIdGenerator idGenerator);", "public void setDBID(int dbid)\n {\n synchronized (monitor(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
ID of the disk type to return information about. To get the disk type ID use a [DiskTypeService.List] request. string disk_type_id = 1 [(.yandex.cloud.required) = true];
public com.google.protobuf.ByteString getDiskTypeIdBytes() { java.lang.Object ref = diskTypeId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); diskTypeId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } }
[ "public java.lang.String getDiskTypeId() {\n java.lang.Object ref = diskTypeId_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n diskTypeId_ = s...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Whether the current entity is a cache entity (CACHE entities are generally constructed through create())
public boolean isCacheEntity() { return request == null; }
[ "boolean getCacheable();", "public boolean isCached() { return cached; }", "Boolean getIsEntity();", "private boolean isAEntity(Class type) {\n boolean result = false;\n if (type.isAnnotationPresent(Entity.class)) {\n return true;\n }\n log.debug(\"[isAEntity] class \" +...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the rendering mode.
public void setRenderingMode(PSRenderingMode renderingMode) { this.renderingMode = renderingMode; }
[ "public void setPaintMode()\r\n\t{\r\n\t\t// System.out.println(\"setPaintMode\");\r\n\t}", "void setDisplayMode(DisplayMode mode);", "public native void setPaintMode();", "public void setPaintMode()\n {\n if (waitForReady())\n return;\n _wnd.getOffG2D().setPaintMode();\n }", "public abstract v...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a JSON streamer that will write to the given output, optionally with beautification of the generated JSON.
public JsonOutput(OutputStream out, boolean beautify) { this(new OutputStreamWriter(out, StandardCharsets.UTF_8), beautify); }
[ "public abstract JsonWriter newWriter(OutputStream out);", "public JsonOutput(OutputStream out)\n\t{\n\t\tthis(out, false);\n\t}", "public interface JsonOutput {\n\n // basic json tools.\n void flush() throws IOException;\n void writeStartArray() throws IOException;\n void writeEndArray() throws IOException...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the taxID value for this Account.
public void setTaxID(java.lang.Object taxID) { this.taxID = taxID; }
[ "public void setTaxId(java.lang.String taxId)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(TAXI...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns true if the existing item with the given ItemId can be read.
boolean canRead(ItemState itemState) throws ItemNotFoundException, RepositoryException;
[ "public boolean CheckItemId(int Id){\r\n\t\tPreparedStatement st;\r\n\t\t\ttry {\r\n\t\t\t\tst = connection.prepareStatement(\"SELECT * from item WHERE id = ?\");\r\n\t\t\t\t\t st.setInt(1, Id);\r\n\t\t\t\t ResultSet rs = st.executeQuery(); \r\n\t\t\t\t // if this id exist returns true else returns false \r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
generate staff list from webController data
public void makeStaffList(){ for(int i = 0; i< webContentController.getStaffNames().size(); i++){ addPersonToStaff(webContentController.getStaffNames().get(i), webContentController.getStaffPhotoLink().get(i)); } }
[ "@GetMapping\n\tpublic List<UniversityStaffMember> viewAllStaffs() {\n\t\tList<UniversityStaffMember> list = universityService.viewAllStaffs();\n\t\tif (list.size() == 0)\n\t\t\tthrow new EmptyDataException(\"No University Staff in Database.\");\n\t\treturn list;\n\t}", "public static ArrayList<Staff> viewStaff()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Deleting collars by shop id.
@DeleteMapping("/shops/{id}/collars") public ResponseEntity <String> deleteShopsCollars(@PathVariable("id") long id) { try { shopsDao.findById(id).get(); } catch (RuntimeException e){ throw new ResponseStatusException(HttpStatus.NOT_FOUND, "No shop with id " + id + "."); } int shopCollars = 0; List <Long> collarsId = new ArrayList<Long>(); for (Collars collar: collarsDao.findAll()) { if (collar.getShopId() == id) { collarsId.add(collar.getId()); shopCollars++; } } if (shopCollars > 0) { for (long ids: collarsId) { collarsDao.deleteById(ids); } return ResponseEntity.ok("Collars erased."); } else { throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "Impossible to run command." + "No collars in this shop."); } }
[ "public void deleteShop(Shop shop)throws Exception{\n\n // find shop with specific id\n Shop shops = shopRepository.findOne(shop.getId());\n\n // check if shop was found\n if(shops == null){\n throw new Exception(\"Shop not found!\");\n }\n\n // find store of sho...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the expand clause for the request
@Nonnull public IdentityRequest expand(@Nonnull final String value) { addExpandOption(value); return this; }
[ "public void setExpand(String expand) {\n this.expand = expand;\n }", "public void setExpand(boolean expand) { this.expand = expand; }", "ICallRequest expand(final String value);", "IResourceOperationRequest expand(final String value);", "public void setExpandNode(ch.ivyteam.ivy.scripting.objects....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Delete a specific worklog entry
public void deleteWorkLog(int logId) { this.workLogs.removeIf((WorkLog element) -> element.getLogId() == logId); }
[ "private void deleteLogEntry() {\n getActivity().getContentResolver().delete(\n WalksContract.LogEntry.CONTENT_URI,\n \"_id = ?\",\n new String[] {new Long(logEntryId).toString()});\n\n }", "public static void delete_log_entry (LogEntry en...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks the given long index is between the range from min and max.
public static boolean isBetween(final long min, final long max, final long index) { return isBetween(min, max, index, false, false); }
[ "public static boolean isBetween(final long min, final long max, final long index,\n\t\tfinal boolean includeMin, final boolean includeMax)\n\t{\n\t\tif (includeMin && !includeMax)\n\t\t{\n\n\t\t\treturn (index >= min && index < max);\n\t\t}\n\t\tif (!includeMin && includeMax)\n\t\t{\n\n\t\t\treturn (index > min &&...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
execMethodAsync_. Execute a Method of this Object asynchronously
public void execMethodAsync_ ( Object objWbemSink, String strMethodName, Object objWbemInParameters, int iFlags, Object objWbemNamedValueSet, Object objWbemAsyncContext) throws java.io.IOException, com.linar.jintegra.AutomationException{ Object zz_retVal[] = { null }; Object zz_parameters[] = { objWbemSink, strMethodName, objWbemInParameters, new Integer(iFlags), objWbemNamedValueSet, objWbemAsyncContext, zz_retVal }; vtblInvoke("execMethodAsync_", 20, zz_parameters); return; }
[ "public void asynchExecution(String remoteMethod, String[] param) {\n return;\n }", "@Test @Disabled(\"Can't get this to return\")\n public void testExecuteScriptAsync() {\n LOG.entering(CLASS, \"testExecuteScriptAsync\");\n try{\n setUrl(URL);\n JsonObject result ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Only for use if utilising the alternate refill type: checking if you can partially serve each task on the route to the depot.
private void altRefill(DecisionProcess dp, int currNode, int nextNode, double remainingCapacity){ DecisionProcessState state = dp.getState(); Instance instance = state.getInstance(); Graph graph = instance.getGraph(); Arc task = graph.getArc(currNode, nextNode); if(task.isTask() && state.getTaskRemainingDemandFrac(task) > 0){ double remainingDemandFraction = state.getTaskRemainingDemandFrac(task); double remainingDemand = instance.getActDemand(task) * remainingDemandFraction; if(remainingCapacity >= remainingDemand) { // ie: we can serve the whole thing. CollaborativeServingEvent cseTemp; CollaborativeServingEvent cse = null; if(!state.getUnassignedTasks().contains(task)) { // identify which route is currently assigned to this task (if any) for(DecisionProcessEvent event: dp.getEventQueue()) { if (event.getClass().equals(CollaborativeServingEvent.class)) { cseTemp = (CollaborativeServingEvent) event; if (cseTemp.route.getNextTask() == task || cseTemp.route.getNextTask() == task.getInverse()) { cse = cseTemp; break; } } } } // finish whatever is left double servedFraction = state.getTaskRemainingDemandFrac(task); // if(servedFraction != 1.0) System.out.println("ServedFraction: " + servedFraction); route.add(nextNode, servedFraction, instance); // remove the task from the remaining tasks state.removeRemainingTasks(task); state.removeUnassignedTasks(task); // update the task-to-task and route-to-task maps state.completeTask(task); // calculate the route-to-task map state.calcRouteToTaskMap(route); if(cse != null) // i.e. steal the task from another vehicle cse.assignNewTask(dp); } else { // we can't serve the whole thing (route failure equivalent) double servedFraction = remainingCapacity / instance.getActDemand(task); route.add(nextNode, servedFraction, instance); state.calcRouteToTaskMap(route); } } else { route.add(nextNode, 0, instance); } }
[ "private boolean areTaskForcesPresent() {\n return baseGrid\n .getPort()\n .map(Port::areTaskForcesPresent)\n .orElse(false);\n }", "private static boolean checkFlexibility(Task task) {\n\t\treturn task.getJobs().stream().anyMatch(job -> job.getRoutes().strea...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Native function for initializing the renderer.
public native void initRendering();
[ "public LWJGLRenderer()\r\n {\r\n this.renderedObjectHandler = new LWJGLRenderedObjectHandler();\r\n }", "public native void loadRenderer(final String renderer);", "public Mobile(Renderer renderer) { init(new Renderer[]{ renderer }); }", "public void init() {\r\n shader = createShader();\r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Runs all business rules needed prior to routing. This includes both common rules for all maintenance documents, plus classspecific business rules. Will return false if any business rule fails, or if the document is in an invalid state, and not routable (see isDocumentValidForRouting()).
public abstract boolean processRouteDocument(Document document);
[ "protected boolean processCustomRouteDocumentBusinessRules(MaintenanceDocument document) {\r\n return true;\r\n }", "@Override\n protected boolean doCustomPreRules(MaintenanceDocument document) {\n ReceivingAddress raOld = (ReceivingAddress) document.getOldMaintainableObject().getBusinessObjec...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set Profit Price Std Entered
public void setBSCA_ProfitPriceStdEntered (BigDecimal BSCA_ProfitPriceStdEntered);
[ "public void setProfit(double profit)\n {\n this.profit = profit;\n }", "public void setPriceStdEntered (BigDecimal PriceStdEntered);", "public void setPriceStd (BigDecimal PriceStd);", "public void setProfit(double profit) {\n\t\tthis.profit = profit;\n\t}", "public void setPriceStdOld (BigDec...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Default Empty Constructor for class ShBuilderAccept
public ShBuilderAccept () { super(); }
[ "Accept createAccept();", "public ShBuilderApply () {\n\t\tsuper();\n\t}", "private AcceptReq(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public ConsumerCommand() { }", "private Challenge(Builder builder) {\n super(builder);\n }", "public DefaultNa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
========================================================================= Parse nonterminal parsers.rats.xml.xml.SingleQuotedPart.
private Result pSingleQuotedPart(final int yyStart) throws IOException { int yyC; int yyIndex; Result yyResult; Result yyPredResult; boolean yyPredMatched; int yyRepetition1; boolean yyRepeated1; Void yyValue; ParseError yyError = ParseError.DUMMY; // Alternative 1. yyRepetition1 = yyStart; yyRepeated1 = false; while (true) { yyPredMatched = false; yyPredResult = pSingleQuotedPart$$Choice1(yyRepetition1); if (yyPredResult.hasValue()) { yyPredMatched = true; } if (! yyPredMatched) { yyC = character(yyRepetition1); if (-1 != yyC) { yyIndex = yyRepetition1 + 1; yyRepetition1 = yyIndex; yyRepeated1 = true; continue; } } else { yyError = yyError.select("single quoted part expected", yyStart); } break; } if (yyRepeated1) { yyValue = null; return new SemanticValue(yyValue, yyRepetition1, yyError); } // Alternative 2. yyResult = pRef(yyStart); yyError = yyResult.select(yyError); if (yyResult.hasValue()) { yyValue = null; return yyResult.createValue(yyValue, yyError); } // Done. yyError = yyError.select("single quoted part expected", yyStart); return yyError; }
[ "private Result pSingleQuotedPart$$Choice1(final int yyStart) \n throws IOException {\n\n int yyC;\n int yyIndex;\n Void yyValue;\n ParseError yyError = ParseError.DUMMY;\n\n // Alternative 1.\n\n yyC = character(yyStart);\n if (-1 != yyC) {\n yyIndex = yyStart + 1;\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional string payload = 2;
java.lang.String getPayload();
[ "public void setPayload(String payload);", "public void setPayload(Payload payload) {\n this.payload = payload;\n }", "public static void SetPayload(String passedPayload){\n payload = passedPayload;\n }", "void payload(String json);", "public String getPayload() {\n return payload;\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This function returns true if (p1,P2,P3,P4) form a square, otherwise false
static boolean isSquare(Point p1, Point p2, Point p3, Point p4){ int d2 = distSquare(p1,p2); int d3 = distSquare(p1,p3); int d4 = distSquare(p1,p4); // If lengths if (p1, p2) and (p1, p3) are same, then // following conditions must met to form a square. // 1) Square of length of (p1, p4) is same as twice // the square of (p1, p2) // 2) p4 is at same distance from p2 and p3 if (d2 == d3 && 2*d2 == d4) { int d = distSquare(p2, p4); return (d == distSquare(p3, p4) && d == d2); } // The below two cases are similar to above case if (d3 == d4 && 2*d3 == d2) { int d = distSquare(p2, p3); return (d == distSquare(p2, p4) && d == d3); } if (d2 == d4 && 2*d2 == d3) { int d = distSquare(p2, p3); return (d == distSquare(p3, p4) && d == d2); } return false; }
[ "public boolean validSquare(int[] p1, int[] p2, int[] p3, int[] p4) {\n Set<Integer> dists=new HashSet<>();\n List<int[]> points=Arrays.asList(p1, p2, p3, p4);\n for(int i=0; i<4; i++){\n for(int j=i+1; j<4; j++){\n int x1=points.get(i)[0], x2=points.get(j)[0];\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests the invariant epcAosDrctDbtTxInf.
@Test public void testEpcAosDrctDbtTxInf01() throws Throwable { List<IInterpretationResult> results; results = super.interpretConstraintsForInstance(CONSTRAINT_DIRECTORY + "/epcAosDrctDbtTxInf", MODELINSTANCE_NAME_01, Arrays .asList(new String[] { "DirectDebitTransactionInformation1" })); assertNotNull(results); assertEquals(2, results.size()); this.assertIsTrue(results.get(0)); this.assertIsTrue(results.get(1)); }
[ "@Test\r\n\tpublic void testEpcAosDrctDbtTxInfDbtr01() throws Throwable {\r\n\r\n\t\tList<IInterpretationResult> results;\r\n\t\tresults = super.interpretConstraintsForInstance(CONSTRAINT_DIRECTORY\r\n\t\t\t\t+ \"/epcAosDrctDbtTxInfDbtr\", MODELINSTANCE_NAME_01, Arrays\r\n\t\t\t\t.asList(new String[] { \"DirectDebi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates an empty result list.
public ResultList() { super(); }
[ "EmptyList createEmptyList();", "private List<Map<String, Object>> buildEmptyGetResultMap() {\n List<Map<String, Object>> results = new ArrayList<>();\n Map<String, Object> result = new HashMap<>();\n result.put(\"Status\", \"open\");\n result.put(\"Description\", TEST_DESC);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Start call service to push new missed call.
public void startCallService() { Log.i(TAG, "startCallService()"); // Ensure main service is started if (!mIsMainServiceActive) { startMainService(); } // Start SMS service if (mCallService == null) { mCallService = new CallService(sContext); TelephonyManager telephony = (TelephonyManager) sContext.getSystemService(Context.TELEPHONY_SERVICE); telephony.listen(mCallService, PhoneStateListener.LISTEN_CALL_STATE); } /* if (mCallService == null) { mCallService = new CallService(sContext); } TelephonyManager telephony = (TelephonyManager) sContext .getSystemService(Context.TELEPHONY_SERVICE); telephony.listen(mCallService, PhoneStateListener.LISTEN_CALL_STATE);*/ mIsCallServiceActive = true; }
[ "public void launchIncomingCall() {\n }", "private void startCallOrService() {\n\t\tWeemoEngine weemo = Weemo.instance();\n\t\tassert weemo != null;\n\n\t\t// If there is a call currently going on,\n\t\t// it's probably because the user has clicked in the notification after going on its device home.\n\t\t// In...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Solution: Initialize variables low=0, high=length1 as long as the low doesn't crosses right calculate mid if the number at mid matches target return mid else if the number at mid >= target and <=low then set high as mid1; else low= mid+1 return 1 Time complexity O(logn) space complexity O(1)
private int findTargetElementIndex(int[] nums, int target) { int low=0, high=nums.length-1; while (low<=high){ int mid=(low+high)/2; if(nums[mid]==target)return mid; else if(nums[low]<=nums[mid]){ if(target>=nums[low]&& target<nums[mid]){ high=mid-1; }else{ low=mid+1; } } else if(nums[high]>nums[mid]){ if(target>nums[mid] && target<=nums[high]){ low=mid+1; }else{ high=mid-1; } } } return -1; }
[ "int doSearch(int[] A, int start, int end, int target) {\r\n if (start > end)\r\n return -1;\r\n int mid = (start + end) / 2;\r\n if (A[mid] == target)\r\n return mid;\r\n if (target > A[mid]) {\r\n // left half must be smaller than target, need to go rig...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Called when the requested Asset is retrieved.
void onAssetRetrieved(@Nullable Asset asset);
[ "T get(String name) throws AssetNotFoundException;", "Asset getAsset(String assetKey) throws Exception;", "IAsset getAsset(UUID assetId) throws SiteWhereException;", "io.bloombox.schema.ledger.Assets.AssetKey getAsset();", "com.google.ads.googleads.v1.resources.Asset getAsset();", "com.google.ads.googlead...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a generator producing uniform random values between the given least value (inclusive) and bound (exclusive).
public static IntGenerator intRandom(int least, int bound) { if (least >= bound) throw new IllegalArgumentException(); return new IntIntervalRandomGenerator(least, bound); }
[ "private int randomGen(int upperBound) {\n\t\tRandom r = new Random();\n\t\treturn r.nextInt(upperBound);\n\t}", "int getRandom(int low, int high);", "public int getRandomInt (int minInclusive, int maxInclusive);", "public int getRandom(int bound) {\n return ThreadLocalRandom.current().nextInt(bound);\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__Parameter__Group_4__1" $ANTLR start "rule__Parameter__Group_4__1__Impl" InternalXModel.g:2624:1: rule__Parameter__Group_4__1__Impl : ( ( rule__Parameter__XtypeAssignment_4_1 ) ) ;
public final void rule__Parameter__Group_4__1__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalXModel.g:2628:1: ( ( ( rule__Parameter__XtypeAssignment_4_1 ) ) ) // InternalXModel.g:2629:1: ( ( rule__Parameter__XtypeAssignment_4_1 ) ) { // InternalXModel.g:2629:1: ( ( rule__Parameter__XtypeAssignment_4_1 ) ) // InternalXModel.g:2630:2: ( rule__Parameter__XtypeAssignment_4_1 ) { before(grammarAccess.getParameterAccess().getXtypeAssignment_4_1()); // InternalXModel.g:2631:2: ( rule__Parameter__XtypeAssignment_4_1 ) // InternalXModel.g:2631:3: rule__Parameter__XtypeAssignment_4_1 { pushFollow(FOLLOW_2); rule__Parameter__XtypeAssignment_4_1(); state._fsp--; } after(grammarAccess.getParameterAccess().getXtypeAssignment_4_1()); } } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { restoreStackSize(stackSize); } return ; }
[ "public final void rule__Parameter__Group_4__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:1918:1: ( rule__Parameter__Group_4__1__Im...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns an Element representing the user's layout and UserPreferences (but not portlet preferences) formatted for export. This element must have an element name of &lt;layout&gt;. Exported documents must not reference database identifiers and should exclude unnecessary items like channel publishing parameters, etc. Layout store implementations are may return null for users that don't have layout or preferences customizations.
public org.dom4j.Element exportLayout(IPerson person, IUserProfile profile);
[ "public interface IUserLayout {\n /**\n * The name to use for the root node of the layout. This should be used with\n * regard to rendering position within the layout tree.\n */\n public static final String ROOT_NODE_NAME = \"root\";\n\n\n /**\n * Writes user layout content (with appropriat...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the param mandatory.
public final void setParamMandatory(final boolean paramMandatory) { this.paramMandatory = paramMandatory; }
[ "public void setRequiredParam(boolean requiredParam) {\n this.isRequiredParam = requiredParam;\n }", "public void setMandatory(Boolean mandatory) {\n this.mandatory = mandatory;\n }", "void setMandatory(\n boolean mandatory);", "public void setMandatory(boolean value) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Determine if the other Item can merge with this
public boolean canMerge(Item other);
[ "boolean canMerge();", "boolean canMerge(T x);", "public boolean isMerge();", "boolean isMergeable(ICommand newCommand);", "private boolean combineItems(EntityItem other)\n {\n if (other == this)\n {\n return false;\n }\n else if (other.isAlive() && this.isAlive())\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the right child operator
public LogicalOperator getRightChild(){ return right; }
[ "public OptimizerPlanOperator getChild()\n\t{\n\t\treturn this.childOperator;\n\t}", "EObject getOperator();", "public abstract AirthmaticOperation getAirthmaticOperation(Character operator);", "public abstract OperatorImpl getParent();", "CriteriaExpression<?> getRightHandOperand();", "public BinaryOpera...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Finds the parameters in the rawline.
private void findParameters() { String parameters = rawline.substring(index); parseParameters(parameters); }
[ "private void readParameters() throws IOException\n\t\t{\n\t\tboolean found=false;\n\t\tFile fParamsDir=new File(basedir,\"parameters\");\n\t\tfor(File f:fParamsDir.listFiles())\n\t\t\t{\n\t\t\tif(f.getName().endsWith(\"-parameters\"))\n\t\t\t\t{\n\t\t\t\tfound=true;\n\t\t\t\tString content=EvFileUtil.readFile(f);\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ selectSampleObject Select the samples
public void selectSampleObject(int[] si) { Sample[] ns = new Sample[si.length]; // Create a new sample array // LOOP THROUGH THE SAMPLE ARRAY for (int i = 0; i < si.length; i++) { ns[i] = sample[si[i]]; // Set the ith sample } sample = ns; // Set to the new sample array x = x.selectCol(si); // Set to the new columns }
[ "public void selectSample(int[] si) {\n sampleName = sampleName.select(si); // Select the sample names\n selectSampleObject(si); // Select the sample objects\n numSample = sampleName.size; // Update the number of samples\n }", "public void selectSample(Texts z) ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Make request to tagging microservice
private JSONObject makeRequest() throws JSONException { Client client = ClientBuilder.newClient(); WebTarget res = null; JSONObject result = null; try { String taggingServiceURL = "http://" + fileServiceDomain + "/" + apiVersion + "/tags/?filter=domain%3DSKILLS"; res = client.target(taggingServiceURL); String resp = res.request().get(String.class); JSONObject response = new JSONObject(new JSONTokener(resp)); result = response.getJSONObject("result"); }catch(Exception e) { logger.error("Exception in contacting tagging service "+e.getMessage()); } return result; }
[ "TagResourceResult tagResource(TagResourceRequest tagResourceRequest);", "TagOperationsClient getTagOperations();", "java.util.concurrent.Future<TagResourceResult> tagResourceAsync(TagResourceRequest tagResourceRequest);", "@GetMapping(\"/tag-requests/{id}\")\n @Timed\n public ResponseEntity<TagRequestD...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of description method, of class Appointment.
@Test public void testDescription() { System.out.println("description"); Appointment instance = new Appointment("des", "3/3/2017","12:00","12:30", new Patient("pa","paddr","mob", "id"), new Doctor("d1","d1id","Medicine")); String expResult = "des"; String result = instance.description(); assertEquals(expResult, result); }
[ "@Test\n public void testGetDescription() {\n System.out.println(\"getDescription\");\n Meal m = new Meal(\"rizek\", \"toto je super kureci rizek z kurete z volneho chovu\", \"1,3,2,4\", \"1\", 100, 1);\n assertEquals(\"toto je super kureci rizek z kurete z volneho chovu\", m.getDescription(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
For use with RangedDoubleTextField.java Limits input to document by keystroke. Allows only numeric values and limited localized formatting symbols.
public DoubleTextFieldDocument(){ super(); DecimalFormatSymbols dfs = Intl.getInstanceDecimalFormatSymbols(); locDecimal = dfs.getDecimalSeparator(); locMinus = dfs.getMinusSign(); locExponentSeparator = dfs.getExponentSeparator(); String s = Character.toString(locDecimal)+Character.toString(locMinus)+locExponentSeparator; match = s.toCharArray(); }
[ "private void annoFatturajTextFieldKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_annoFatturajTextFieldKeyTyped\n char c = evt.getKeyChar();\n if (!(c >= 48 && c <= 57)) {\n evt.setKeyChar('\\u0008');\n }\n}", "private void numeroFatturajTextFieldKeyTyped(java.awt.event.KeyEvent evt) {//...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Delete by folder id and user id with correct folder id and user id then true returned.
@Test public void deleteByFolderIdAndUserIdWithCorrectFolderIdAndUserIdThenTrueReturned() { Boolean actualDeletingResult = folderDao.deleteByFolderIdAndUserId(CORRECT_PARENT_ID, CORRECT_USER_ID); assertTrue(actualDeletingResult); }
[ "@Test\n public void deleteByFolderIdAndUserIdWithCorrectFolderIdAndIncorrectUserIdThenFalseReturned() {\n Boolean actualDeletingResult = folderDao.deleteByFolderIdAndUserId(CORRECT_PARENT_ID, INCORRECT_USER_ID);\n assertFalse(actualDeletingResult);\n }", "@Test\n public void deleteByFolder...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Failure test for method importJarsToDiagram(URL[], String). Passing unexisting element of jarURLs[]
public void testImportJarsToDiagramURLFailure6() { try { String[] classpath = new String[1]; classpath[0] = testEntitiesClasspath; JarImporter importer = new DefaultJarImporter(manager, classpath); URL[] jarURLs = new URL[1]; try { jarURLs[0] = new File(unexistingJarPath).toURI().toURL(); } catch (MalformedURLException e) { fail("Shouldn't throw MalformedURLException"); } importer.importJarsToDiagram(jarURLs, "diagramName"); fail("Didn't throw an exception"); } catch (IllegalArgumentException exception) { /* expected */ } catch (JarImporterException exception) { fail("Shouldn't throw JarImporterException"); } }
[ "public void testImportJarsToDiagramURLFailure4() {\n try {\n String[] classpath = new String[1];\n\n classpath[0] = testEntitiesClasspath;\n JarImporter importer = new DefaultJarImporter(manager, classpath);\n\n URL[] jarURLs = new URL[0];\n\n importer....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns true if the class distribution is pure
public boolean classDistributionIsPure() { int count = 0; for (Map.Entry<String, WeightMass> el : weightedClassDist.entrySet()) { if (el.getValue().weight > 0) { count++; if (count > 1) { break; } } } return (count < 2); }
[ "public abstract boolean deterministic () ;", "private boolean isPure(Collection<Instance> instances) {\n\t\tif (instances.size() <= 1) {\n\t\t\treturn true;\n\t\t}\n\t\tIterator<Instance> iter = instances.iterator();\n\t\tint match = iter.next().getCategory();\n\t\twhile (iter.hasNext()) {\n\t\t\tif (match != ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Updates the surgery entry in the table and data base.
public static void updateSurgeryEntry(String srg, String ptg, String avg, String std) { new SurgeriesList().updateSurgery(srg, ptg, avg, std); updateSurgeriesTable(); }
[ "private void doUpdate(){\n TreatmentDAO dao = DAOFactory.getDAOFactory().createTreatmentDAO();\n try {\n dao.update(treatment);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "Merchandise update(Merchandise merchandise);", "public void update(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
getLogs retrieves log instances related to userID from database adds instances to list
private void getLogs(String uID) { // Read from the database myRef.child(uID).orderByChild("jumpNr").addValueEventListener(new ValueEventListener() { @Override public void onDataChange(DataSnapshot dataSnapshot) { jumpList.clear(); for (DataSnapshot child : dataSnapshot.getChildren()) { LogbookPage logbookPage = child.getValue(LogbookPage.class); jumpList.add(logbookPage); refreshListAdapter(); } } @Override public void onCancelled(DatabaseError error) { // rip } }); }
[ "public List<UserLogs> getAllUserLogs(int uid);", "@RequestMapping(value = \"/users/{userId}/logs\", method = RequestMethod.GET)\n public List<ApiLogData> getUserLogs(@PathVariable Long userId) {\n return loggingService.getLogsForUser(userId);\n }", "public void setUserLogs() {\n ResultSet r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add a bit to the history.
public void add(BitData bitData) { mHistory.add(bitData); while (mHistory.size() > mMaxSize) { mHistory.removeFirst(); } }
[ "public void addToHistory() {\n\t\tmyHistory.add(0, this.z);\r\n\t\tmyHistory.add(0, this.y);\r\n\t\tmyHistory.add(0, this.x);\r\n\t\tmyHistory.remove(1000);\r\n\t\tmyHistory.remove(1000);\r\n\t\tmyHistory.remove(1000);\r\n\r\n\t}", "protected void addToHistory (String cmd)\n {\n // remove any previou...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the last login time.
public long getLastLoginTime() { return lastLoginTime; }
[ "public long getLastLoginTime()\n\t{\n\t\treturn m_lastLogin;\n\t}", "String getTimeLastLogin();", "public Date getLastLoginTime() {\r\n return lastLoginTime;\r\n }", "public Date getLastLoginTime() {\n return lastLoginTime;\n }", "java.lang.String getLoginTime();", "Date getUserLastLo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
bool max_byte_length_null = 1006;
public boolean getMaxByteLengthNull() { return maxByteLengthNull_; }
[ "boolean getMaxByteLengthNull();", "public boolean getMaxByteLengthNull() {\n return maxByteLengthNull_;\n }", "boolean getCheckByteLengthForStringsNull();", "public boolean isFixedLength() { return fixedLength; }", "io.dstore.values.IntegerValue getMaxByteLength();", "public boolean getCheckB...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Populate the immediate predecessor under this rowKey
public void populatePdfPredecessorList(String currentObjectId, int rowKey) { HelperClass.porticoOutput(0, "ViewDiagnostics-populatePdfPredecessorList()-Started for currentObjectId="+currentObjectId); try { if(m_ObjectPredecessorMapping.containsKey(currentObjectId)) { ArrayList alist = (ArrayList)m_ObjectPredecessorMapping.get(currentObjectId); if(alist != null && alist.size() > 0) { ArrayList addList = null; if(m_allPdfList.containsKey(rowKey)) { addList = (ArrayList)m_allPdfList.get(rowKey); } else { addList = new ArrayList(); } addList.addAll(alist); m_allPdfList.put(rowKey, addList); for(int indx=0; indx < alist.size(); indx++) { String tObjectId = (String)alist.get(indx); // Populate next level populatePdfPredecessorList(tObjectId, rowKey+1); } } } } catch(Exception e) { HelperClass.porticoOutput(1, "Exception in ViewDiagnostics-populatePdfPredecessorList()-"+e.getMessage()); e.printStackTrace(); } finally { } HelperClass.porticoOutput(0, "ViewDiagnostics-populatePdfPredecessorList()-Ended"); }
[ "public void populatePredecessorList(String currentObjectId, int rowKey)\n\t{\n\t\tHelperClass.porticoOutput(0, \"ViewDiagnostics-populatePredecessorList()-Started for currentObjectId=\"+currentObjectId);\n\t\ttry\n\t\t{\n\t\t if(m_ObjectPredecessorMapping.containsKey(currentObjectId))\n\t\t {\n\t\t \tArra...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
ParticleSystem constructor. Creates the new system with a random number of particles within a range.
public ParticleSystem(double x, double y, VDMColor c, int thickness, Vector2 coordOr) { super(x, y, c, thickness); // Set the Coordinates origin setCoordOrigin(coordOr); // Initialize all important variables _rnd = new Random(); _particles = new ArrayList<Particle>(); // Establish the number of particles within a range int low = 5; int high = 10; int particles = _rnd.nextInt(high - low) + low; // Create all particles for(int i = 0; i < particles; i++){ CreateNewParticle(); } // for }
[ "public native static ParticleSystem createWithTotalParticles(int numberOfParticles);", "public ParticleSystem(int maxParticles) {\n totalNumParticles = maxParticles;\n \n // Load in the texture that will be used by all particles\n particleTexture = new GLTexture(TextureTarget.Texture2...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Provides information on additional privacy protections Amazon Lex should use with the bot's data.
public DataPrivacy getDataPrivacy() { return this.dataPrivacy; }
[ "public String getPrivacy();", "String privacyPolicy();", "public java.lang.String getPrivacyCode() {\n return privacyCode;\n }", "public void getPrivacy(Context ctx) throws SQLException, PersonNotFoundException {\n var person = currentPerson(ctx);\n ctx.json(person.getPrivacy());\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Takes string arguments as actual parameters that being two things: 1. the filename, 2. Double quoted encoded message (The first line in the filename.file) and sends it to unMixture
public static void main(String[] args) { UnMix v = new UnMix(); //Linked list initialization String userMessage = args[1]; for(int i = 0; i < userMessage.length(); i++) { v.message.add(userMessage.charAt(i)); } System.out.println(v.message.toString()); //Passing to unMixture v.unMixture(args[0], args[1]); }
[ "private void unMixture(String filename, String userMessage) {\r\n String original = UnMixUsingFile (filename, userMessage);\r\n System.out.println (\"The Original message was: \" + original);\r\n }", "private void unMixture(String filename, String userMessage) {\n\t\t//passed to UnMixUsingFile\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Allows calling &x60;create_prompt&x60; multiple times idempotently, such that a prompt is sent atmost once. This key should contain sufficient randomness. Idempotent requests are stored for 24 hours. After that time, the same key will create a new request.
@ApiModelProperty(value = "Allows calling `create_prompt` multiple times idempotently, such that a prompt is sent at-most once. This key should contain sufficient randomness. Idempotent requests are stored for 24 hours. After that time, the same key will create a new request.") public String getIdempotencyKey() { return idempotencyKey; }
[ "public void generatePrompt(View view) {\n String prompt;\n\n int i = generator.nextInt(prompts.size());\n prompt = prompts.get(i);\n\n displayPrompt(prompt);\n }", "void askForRepeat();", "public int promptKey() {\n int key;\n Scanner scanner = new Scanner(System.in...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Match that the start element with the expected tag
public static boolean matches(StartElement startElement, String tag) { String elementTag = StaxParserUtil.getElementName(startElement); return tag.equals(elementTag); }
[ "public boolean match( ElementExp p ) { return false; }", "public void startElement(ElementStart element);", "private boolean checkIfTagStart() {\n\t\tif(data[currentIndex] == '{') {\n\t\t\tif(currentIndex+1 < data.length && data[currentIndex+1] == '$') {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\tret...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Permite obtener una fecha de solicitud de garantia.
public Date generarFechaSolicitudGarantia() { return new Date(); }
[ "Date getExpiredDate();", "public Date getUserrevokeTime() {\n return userrevokeTime;\n }", "Label getRevokeDate();", "long getExpirationDate();", "public Date getExpiredDate();", "java.lang.String getManualAccessTokenExpirationTime();", "String getAccountExpirationTime();", "java.lang.Strin...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__Literal__FlAssignment_2" $ANTLR start "rule__FunctionLit__SignatureAssignment_1" InternalGo.g:18481:1: rule__FunctionLit__SignatureAssignment_1 : ( ruleSignature ) ;
public final void rule__FunctionLit__SignatureAssignment_1() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalGo.g:18485:1: ( ( ruleSignature ) ) // InternalGo.g:18486:2: ( ruleSignature ) { // InternalGo.g:18486:2: ( ruleSignature ) // InternalGo.g:18487:3: ruleSignature { if ( state.backtracking==0 ) { before(grammarAccess.getFunctionLitAccess().getSignatureSignatureParserRuleCall_1_0()); } pushFollow(FOLLOW_2); ruleSignature(); state._fsp--; if (state.failed) return ; if ( state.backtracking==0 ) { after(grammarAccess.getFunctionLitAccess().getSignatureSignatureParserRuleCall_1_0()); } } } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { restoreStackSize(stackSize); } return ; }
[ "public final void rule__FunctionLit__Group__1__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:14651:1: ( ( ( rule__FunctionLit__SignatureAssignment_1 ) ) )\r\n // InternalGo.g:14652:1: ( ( rule__Funct...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The thread waits until an event matures on the timer queue, then posts it to the event processor queue.
public void run() { while (true) { // If the queue is not empty, post any matured events if (!queue.isEmpty()) { // The time to wait until the next event long nextEventDelay = 0; do { // See if an event has matured nextEventDelay = queue.peek().getTime() - getTime(); if (nextEventDelay <= 0) { // Remove the event from the timer queue and post it to the processor queue Event event = queue.get(); world.postEvent(event); } } while (nextEventDelay <= 0); } // Go to sleep for a short time try { thread.sleep(SLEEP_TIME); } catch (InterruptedException e) { } } }
[ "protected void processEvents() {\n Object event;\n while (true) {\n synchronized (eventQueue) {\n if (eventQueue.isEmpty() || !isAlive) {\n eventProcessor = null;\n return;\n }\n event = eventQueue.removeFir...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Getter method for the COM property "PlotOrder"
@DISPID(228) @PropGet int getPlotOrder();
[ "@DISPID(228)\n @PropPut\n void setPlotOrder(\n int rhs);", "public int getModelOutputChartOrder();", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Integer getCalculationOrder() {\n return (java.lang.Integer)__getInternalInterface().getFieldValue(CALCULATIONORDER_PROP.get());\n }", "...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the wrapped MessageListener
public MessageListener getMessageListener() { return listener; }
[ "public JmsRequestorListener getListener() {\n return listener;\n }", "public static MessageProxy getMessageProxy() {\n return MessageProxyHolder.INSTANCE;\n }", "NIOSocketListener getListener();", "private NotificationListener getListenerWrapper(NotificationListener l,\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Instantiates a new rset controller.
public RsetController(RsetView rsetView){ this.rView = rsetView; this.rSet = rsetView.getRset(); }
[ "public RutaController() {\r\n }", "public Controller() {\n\t\tthis.cenarios = new ArrayList<>();\n\t}", "public TutorController() {\r\n }", "public RepRequirementController() {\r\n \r\n }", "public MainController() {\n\t\tcontroller = new Controller(this);\n\t}", "public Controller() {\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Helper method to get length of folder in an otg
public long folderSize(Context context) { long size = 0l; size = FileUtil.folderSize(new File(filePath), null); return size; }
[ "@Override\n\tpublic int totalPathLength() {\n\t\treturn totalPathLength(root, sum);// returns total path lenght number\n\t}", "@ApiModelProperty(required = true, value = \"The length of the file/folder.\")\n public Long getLength() {\n return length;\n }", "public int getPathLength()\r\n\t{\r\n\t\treturn ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a list of XML elements for all vehicles in a model.
private static List<Element> getXMLVehicles(Model model) { Set<Vehicle> vehicles = new TreeSet<>(Comparators.objectsById()); vehicles.addAll(model.getVehicles(null)); List<Element> result = new ArrayList<>(vehicles.size()); for (Vehicle curVehicle : vehicles) { Element vehicleElement = new Element("vehicle"); vehicleElement.setAttribute("id", String.valueOf(curVehicle.getId())); vehicleElement.setAttribute("name", curVehicle.getName()); vehicleElement.setAttribute("length", String.valueOf(curVehicle.getLength())); vehicleElement.setAttribute("energyLevelCritical", String.valueOf(curVehicle.getEnergyLevelCritical())); vehicleElement.setAttribute("energyLevelGood", String.valueOf(curVehicle.getEnergyLevelGood())); for (Map.Entry<String, String> curEntry : curVehicle.getProperties().entrySet()) { Element propertyElement = new Element("property"); propertyElement.setAttribute("name", curEntry.getKey()); propertyElement.setAttribute("value", curEntry.getValue()); vehicleElement.addContent(propertyElement); } result.add(vehicleElement); } return result; }
[ "Set<EObject> getAllModelElements();", "Collection<EObject> getModelElements();", "private static List<Element> getXMLPaths(Model model) {\n Set<Path> paths = new TreeSet<>(Comparators.objectsById());\n paths.addAll(model.getPaths(null));\n List<Element> result = new ArrayList<>(paths.size());\n for...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return a partner by URL
AdPartner getAdPartnerByURL(String url);
[ "PartnerLink getPartnerLink();", "public String getPartnerLink();", "AdPartner getAdPartnerByName(String partnerName);", "public AePartnerLink findPartnerLink()\r\n {\r\n AePartnerLinkDef def = getPartnerLinkDef();\r\n if (def == null)\r\n return null;\r\n \r\n return findPartner...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "PACKAGE" $ANTLR start "PRIVATE"
public final void mPRIVATE() throws RecognitionException { try { int _type = PRIVATE; int _channel = DEFAULT_TOKEN_CHANNEL; // /media/DEVELOP/wcl/software/salsa2/src/salsa/compiler2/Salsa.g:105:9: ( 'private' ) // /media/DEVELOP/wcl/software/salsa2/src/salsa/compiler2/Salsa.g:105:11: 'private' { match("private"); } state.type = _type; state.channel = _channel; } finally { } }
[ "public final void mPRIVATE() throws RecognitionException {\n try {\n int _type = PRIVATE;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // src/main/java/pl/ncdc/differentia/antlr/Java.g:121:9: ( 'private' )\n // src/main/java/pl/ncdc/differentia/antlr/Java.g:121:11: '...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the workflowTimeTriggers value for this WorkflowRule.
public void setWorkflowTimeTriggers(com.sforce.soap._2006._04.metadata.WorkflowTimeTrigger[] workflowTimeTriggers) { this.workflowTimeTriggers = workflowTimeTriggers; }
[ "public com.sforce.soap._2006._04.metadata.WorkflowTimeTrigger[] getWorkflowTimeTriggers() {\r\n return workflowTimeTriggers;\r\n }", "void setTriggers(Expression e, Iterable<? extends Expression> triggers);", "public void setTriggerTime(String triggerTime) {\n this.triggerTime = triggerTime;\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Github app installation id
@javax.annotation.Nullable @ApiModelProperty(value = "Github app installation id") public Long getInstallationId() { return installationId; }
[ "public String getInstallationObjectId();", "private String getInstallId()\n {\n String installId = PropertiesComponent.getInstance().getValue(INSTALL_ID_KEY);\n\n if (installId == null) {\n installId = UUID.randomUUID().toString();\n LOG.info(String.format(\"Creating instal...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the boolean array of checkbox results.
public boolean[] getCheckbox() { return checkboxes; }
[ "public boolean[] getBooleanList();", "public boolean[] getBooleans(){\n\t\tboolean[] b = new boolean[10];\n\t\tb[0] = isBoolean(answer0);\n\t\tb[1] = isBoolean(answer1);\n\t\tb[2] = isBoolean(answer2);\n\t\tb[3] = isBoolean(answer3);\n\t\tb[4] = isBoolean(answer4);\n\t\tb[5] = isBoolean(answer5);\n\t\tb[6] = isB...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the variant map metadata pseudoheader, and remove it from the response object.
private static Map<String, String> getVariantMapPseudoHeadersAndRemove(final HttpResponse response) throws ResourceIOException { final Header[] headers = response.getHeaders(); final Map<String, String> variantMap = new HashMap<>(0); String lastKey = null; for (final Header header : headers) { if (header.getName().equals(SC_HEADER_NAME_VARIANT_MAP_KEY)) { lastKey = header.getValue(); response.removeHeader(header); } else if (header.getName().equals(SC_HEADER_NAME_VARIANT_MAP_VALUE)) { if (lastKey == null) { throw new ResourceIOException("Found mismatched variant map key/value headers"); } variantMap.put(lastKey, header.getValue()); lastKey = null; response.removeHeader(header); } } if (lastKey != null) { throw new ResourceIOException("Found mismatched variant map key/value headers"); } return variantMap; }
[ "private static String getOptionalCachePseudoHeaderAndRemove(final HttpResponse response, final String name) {\n final Header header = response.getFirstHeader(name);\n if (header == null) {\n return null;\n }\n response.removeHeader(header);\n return header.getValue();\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional .speech_formatting.TokenSegment.BreakLevel break_level = 2;
public Builder setBreakLevel(speech_formatting.SegmentedTextOuterClass.TokenSegment.BreakLevel value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; breakLevel_ = value.getNumber(); onChanged(); return this; }
[ "speech_formatting.SegmentedTextOuterClass.TokenSegment.BreakLevel getBreakLevel();", "speech_formatting.SegmentedTextOuterClass.TokenSegment getTokenSegment(int index);", "speech_formatting.SegmentedTextOuterClass.SentenceSegment getSentenceSegment(int index);", "@java.lang.Override\n public speech_form...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the search for files to recurse through sub directories
public GlobFileSet recurse() { m_recurse = true; return (this); }
[ "private void search(File searchFile)\n\t{\n\t\tif (searchFile.isFile())\n\t\t{\n\t\t\tString fileName = searchFile.getName();\n\t\t\tString fileExtension = fileName.substring(fileName.lastIndexOf(\".\"), fileName.length());\n\t\t\tif(fileExtension.equals(extension)){\n\t\t\t\tfoundFiles.add(searchFile.getPath());\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
stime.getInstance(); ftime.getInstance(); long milsecs1= stime.getTimeInMillis(); long milsecs2 = ftime.getTimeInMillis(); long duration = (milsecs2milsecs1)/(60 1000);
public long calculateDuration(Calendar stime, Calendar ftime) { this.starttime.set(Calendar.SECOND, 0); this.starttime.set(Calendar.MILLISECOND, 0); this.finishingtime.set(Calendar.SECOND, 0); this.finishingtime.set(Calendar.MILLISECOND, 0); //IKKE SLETT SYSOUT-ENE NEDENFOR // System.out.print("stime = " + stime.get(Calendar.HOUR_OF_DAY) + ":" + stime.get(Calendar.MINUTE) + " " + stime.get(Calendar.DATE) // + "/" + stime.get(Calendar.MONTH) + "-" + stime.get(Calendar.YEAR)); // System.out.print(" .. ftime = " + ftime.get(Calendar.HOUR_OF_DAY) + ":" + ftime.get(Calendar.MINUTE) + " " + ftime.get(Calendar.DATE) // + "/" + ftime.get(Calendar.MONTH) + "-" + ftime.get(Calendar.YEAR)); long dur = (ftime.getTimeInMillis()-stime.getTimeInMillis())/60000; // System.out.println(" .. Duration: " + dur); return dur; //i minutt }
[ "private void calculate(){\n this.endTime = System.nanoTime();\n this.milliseconds = (endTime - startTime) / 1000000;\n }", "private long getTimeDifference(Time timeValue1, Time timeValue2){\n return (timeValue2.getTime()-timeValue1.getTime())/1000;\n }", "long getDurationUs();", "p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
pseudo code / given your currentSpeed , SpeedLimit check whether the current speed is more than 70 and less than 80 > point taken more than 60 and less than 70 > warning if not speeding keep driving
public static void main(String[] args) { int currentLimit = 45 ; // try 45 , 65 ,90 if (currentLimit >70 ) { System.out.println(" you are speeding more than 70 --POINT TAKEN !! "); } else if (currentLimit > 60 ) { //System.out.println("your speed is less thank 70 but more than 60 "); System.out.println("your are speeding more than 60 and less than 70 -- WARNING TAKEN"); } else { System.out.println("KEEP DRIVING"); } }
[ "private boolean isSpeedNearWarning(double speed) {\n Log.d(\"Spped\", \"Current speed is \" + String.valueOf(vehicleSpeed));\n if(speed>=speedLimit-5){\n return true;\n }\n return false;\n }", "public boolean isOverSpeed(){ return vehicleAvarageSpeed > roadMaxSpeed; }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Updates the current filter values for the given data set column.
protected void filterUpdate(String columnId, int row) { filterUpdate(columnId, row, null); }
[ "private void updateFilteredData() {\n\t\t\t\tfilteredData.clear();\n\t\t\t\t\n\t\t\t\tfor (Data p: data) {\n\t\t\t\t\tif (matchesFilter(p)) {\n\t\t\t\t\t\tfilteredData.add(p);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treapplyTableSortOrder();\n\t\t\t}", "public void updateFilter() { }", "private void updateFi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Validate the given value in its internal representation w.r.t. a concrete argument type implementation and in the context of the given model processing configuration
public abstract void validateValueInInternalRepresentation(final ProcessingConfiguration processingConfiguration, final String value);
[ "public abstract Value validateValue(Value value);", "public abstract void validate(String value) throws DatatypeException;", "@Test\n public void testValidateValue()\n {\n FacesContext context = mock(FacesContext.class);\n UIComponent component = mock(UIComponent.class);\n \n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A helper method which attempts to ban one champion for red team, but errors if they are already banned TODO: Overlay the champion's icon in grey
private int banBlueChampion(String cN) { if (bannedChamps.contains(cN)) { return -1; } if (!cN.equals("noban")) { URL url = getClass().getResource(".coredata/championicons/32px/" + cN + "Square.png"); ImageIcon champIcon = new ImageIcon(Toolkit.getDefaultToolkit().getImage(url)); JLabel champLabel = new JLabel(); JLabel champName = new JLabel(cN); champName.setBackground(Color.BLACK); champName.setForeground(Color.WHITE); champLabel.setIcon(champIcon); bottomPanel.add(champLabel, new Integer(3)); int i = blueBans.size(); champLabel.setBounds(29, 32 + 36*i, 32, 32); bottomPanel.add(champName, new Integer(3)); champName.setBounds(64, 24 + 36*i, 150, 50); blueBans.add(cN); bannedChamps.add(cN); } numBlueBans += 1; return 0; }
[ "private int banPurpleChampion(String cN) {\n\t\tif (bannedChamps.contains(cN)) {\n\t\t\treturn -1;\n\t\t}\n\t\tif (!cN.equals(\"noban\")) {\n\t\t\tURL url = getClass().getResource(\".coredata/championicons/32px/\" + cN + \"Square.png\");\n\t\t\tImageIcon champIcon = new ImageIcon(Toolkit.getDefaultToolkit().getIma...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method will analyze the relevant classes of the refactoring using the current and parent commit It will check if the refactoring is a test refactoring and if there is only 1 class involved (for now only working with one) Than it will determine if we will analyze the class files or if we just note down the metadata based on the fact whether it is a Extract Method or nor
public void handleRefactoring(Refactoring refactoring, RevCommit commit){ Set<ImmutablePair<String, String>> classesAfter = refactoring.getInvolvedClassesAfterRefactoring(); Set<ImmutablePair<String, String>> classesBefore = refactoring.getInvolvedClassesBeforeRefactoring(); // Checking if whether we go through or skip the refactoring if(checkIfTestRefactoring(classesAfter) && checkIfTestRefactoring(classesBefore)){ //fetch the parent commit for the before classes RevCommit commitParent = commit.getParent(0); //For now we are only working with refactorings involving one class at the time ImmutablePair<String, String> classInfoAfter; ImmutablePair<String, String> classInfoBefore; // write classes to disk if we are dealing with an Extract Method if(refactoring.getRefactoringType().getDisplayName() == "Extract Method"){ classInfoAfter = writeFilesToDisk(classesAfter, commit, "/after/"); classInfoBefore = writeFilesToDisk(classesBefore, commitParent, "/before/"); } else { classInfoAfter = classesAfter.iterator().next(); classInfoBefore = classesBefore.iterator().next(); } // Analyze the refactoring metricAnalyzer.handleTestRefactoring(refactoring, commit, classInfoAfter); metricAnalyzer.handleTestRefactoring(refactoring, commitParent, classInfoBefore); // If refactoring type was in test and of type extract method if(metricAnalyzer.currentExtractMethod != null) Utils.makeDatabaseTransaction(sessionFactory, metricAnalyzer.currentExtractMethod); // if refactoring was in test else if(metricAnalyzer.currentRefactoringData != null) Utils.makeDatabaseTransaction(sessionFactory, metricAnalyzer.currentRefactoringData); } }
[ "public void handleTestRefactoring(Refactoring refactoring, RevCommit currentCommit,\n ImmutablePair<String, String> classInfo){\n // Reset global vars\n currentExtractMethod = null;\n currentRefactoringData = null;\n currentClassCommitData = null;\n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the sprite heights.
public int[] getSpriteHeights() { return spriteHeights; }
[ "public int getSpriteHeight() {\n return this.spriteHeight;\n }", "public final int getSpriteHeight() {\r\n return this.spriteHeight;\r\n }", "public int getSpriteHeight() {\r\n\t\treturn spriteHeight;\r\n\t}", "public float getOriginalSpriteHeight()\n {\n return sprite.getHeight();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
returns the Table name that belong to given class.
public String getTableName(Class<?> aClass) { String result = aClass.getSimpleName(); if (this.hasAnnotation(aClass, Table.class)) { Table anno = (Table) this.getAnnotation(aClass, Table.class); if (anno.name() != null && !anno.name().isEmpty()) result = anno.name(); } return result; }
[ "private String getTableName(final String param_class_Name) {// This method\n\t\t// is used to\n\t\t// know the\n\t\t// table name\n\t\t// that is\n\t\t// mapped with the class name\n\t\tString table_Name = null;\n\t\tSolutionsAdapter sAdapter = saReader.getSA();\n\t\tDataObjectType dataObject = sAdapter.getDataObj...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__S_Reflex__Group__1" $ANTLR start "rule__S_Reflex__Group__1__Impl" InternalGaml.g:7293:1: rule__S_Reflex__Group__1__Impl : ( ( rule__S_Reflex__FirstFacetAssignment_1 )? ) ;
public final void rule__S_Reflex__Group__1__Impl() throws RecognitionException { int rule__S_Reflex__Group__1__Impl_StartIndex = input.index(); int stackSize = keepStackSize(); try { if ( state.backtracking>0 && alreadyParsedRule(input, 397) ) { return ; } // InternalGaml.g:7297:1: ( ( ( rule__S_Reflex__FirstFacetAssignment_1 )? ) ) // InternalGaml.g:7298:1: ( ( rule__S_Reflex__FirstFacetAssignment_1 )? ) { // InternalGaml.g:7298:1: ( ( rule__S_Reflex__FirstFacetAssignment_1 )? ) // InternalGaml.g:7299:1: ( rule__S_Reflex__FirstFacetAssignment_1 )? { if ( state.backtracking==0 ) { before(grammarAccess.getS_ReflexAccess().getFirstFacetAssignment_1()); } // InternalGaml.g:7300:1: ( rule__S_Reflex__FirstFacetAssignment_1 )? int alt92=2; int LA92_0 = input.LA(1); if ( (LA92_0==76) ) { alt92=1; } switch (alt92) { case 1 : // InternalGaml.g:7300:2: rule__S_Reflex__FirstFacetAssignment_1 { pushFollow(FollowSets000.FOLLOW_2); rule__S_Reflex__FirstFacetAssignment_1(); state._fsp--; if (state.failed) return ; } break; } if ( state.backtracking==0 ) { after(grammarAccess.getS_ReflexAccess().getFirstFacetAssignment_1()); } } } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { if ( state.backtracking>0 ) { memoize(input, 397, rule__S_Reflex__Group__1__Impl_StartIndex); } restoreStackSize(stackSize); } return ; }
[ "public final void rule__S_Definition__Group__1__Impl() throws RecognitionException {\n int rule__S_Definition__Group__1__Impl_StartIndex = input.index();\n\n \t\tint stackSize = keepStackSize();\n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 413) ) { r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Overridden to include the type and generic type in the stringification of subclasses.
@Override public String toString() { return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE) .appendToString(super.toString()) .append("type", getType()).append("genericType", getGenericType()) //$NON-NLS-1$ //$NON-NLS-2$ .toString(); }
[ "public static String typeToString () {\n RxToolkit.trace(\"GenericRecipe::typeToString()\");\n return \"Generic Recipe\";\n }", "@Override\n public String toString() {\n return this.typeString;\n }", "abstract protected String basicRepresentativeString(TypeSystem typeSystem);", "@Override...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ get the location of this Schedule by index
public String getLocationOfIndex(int index) { return location.getLocations().get(index); }
[ "public Location getLocation(int index){\n return locations.get(index);\n }", "public Location getLocation(int index) {\n\t\treturn locations.get(index);\n\t}", "public long getIndex()\n {\n return this.gpsIndex;\n }", "public LocalDateTime getArrivalTimeOfIndex(int index)\r\n\t{\r\n\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
GETTERS AND SETTERS Set god mode on.
public void setGodModeOn() { godModeOn = true; }
[ "public void setGodModeOff()\n {\n godModeOn = false;\n }", "public void toggleGodMode() {\n\t\tthis.isGodModeEnabled = !this.isGodModeEnabled;\n\t\tif (this.isGodModeEnabled) {\n\t\t\tSystem.out.println(\"GodMode Enabled.\");\n\t\t} else {\n\t\t\tSystem.out.println(\"GodMode Disabled.\");\n\t\t}\n\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Conversion from instant to GPS time.
public static GpsCcsdsTime toGpsTime(final long instant) { GpsCcsdsTime gpsTime = new GpsCcsdsTime(); long shiftedMillis = instant - GPS_EPOCH_YAMCS_EPOCH_DELTA; gpsTime.coarseTime = (int) (shiftedMillis / 1000); gpsTime.fineTime = (byte) (((shiftedMillis % 1000) * 256 / 1000)); return gpsTime; }
[ "public static long toGpsTimeMillisec(final long instant) {\n return instant - GPS_EPOCH_YAMCS_EPOCH_DELTA;\n }", "public static long getJavaGpsFromInstant(long instant) {\n return instant - 19000;\n }", "long getGpsTime();", "private String timeConversion() {\n Calendar local =...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests that search functionality works right after initial sync.
@Test @UiThreadTest @Ignore // TODO(sdspikes): re-enable once there is a working waitForProgressFragment public void testSearchAfterSync() throws Throwable { screenshot("Before Sync Completed"); waitForProgressFragment(); screenshot("After Sync Completed"); click(viewWithId(R.id.action_search)); screenshot("After Search Clicked"); // Check that at least one patient is returned (since clicking search // should show all patients). inPatientListClickFirstPatient(); // open patient chart screenshot("Final State"); }
[ "public void testSearch() {\n doTestSearch();\n }", "@Test\n public void executeSavedSearch(){\n fillSearchFields();\n int accountID = new AccountDAO().findAccount(\"jkalo@gmail.com\").getId();\n presenter.doSearch();\n presenter.saveSearch();\n\n int counterBeforeSavedSe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
! Loads the module. Loads the module data from the database.
public void load() throws CouldntLoadDataException { if (isLoaded()) { return; } try { m_module.load(); } catch (com.google.security.zynamics.binnavi.Database.Exceptions.CouldntLoadDataException | LoadCancelledException e) { throw new CouldntLoadDataException(e); } }
[ "private void loadFromDataBase() \n\t{\n\t\tDBManager db = new DBManager();\n\t\tsetCourseList(db.readCoursesFromDB());\n\t}", "private void loadDatabase()\n\t{\n\t\ttry\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t// Check to make sure the Bmod Database is there, if not, try \n\t\t\t\t// downloading from the website.\n\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional .hearts.PlaySingleCardResponse play_single_card_response = 23;
boolean hasPlaySingleCardResponse();
[ "pb4server.DealHeartAskReq getDealHeartAskReq();", "@GET(GET_CARD)\n Call<Card> getSingleCard(\n @Path(\"card\") String card\n );", "public void playCard() {\n\t}", "public PlayingCard() { //default ctor - same name as class, no parameters, no return type\n cardValue = 1;\n card...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the tnmp of this pathology data.
@Override public java.lang.String getTnmp() { return _pathologyData.getTnmp(); }
[ "@Override\n\tpublic java.lang.String getTnmn() {\n\t\treturn _pathologyData.getTnmn();\n\t}", "@Override\n\tpublic java.lang.String getTnmpn() {\n\t\treturn _pathologyData.getTnmpn();\n\t}", "public final double getTn() {\n\t\treturn tn;\n\t}", "@Override\n\tpublic java.lang.String getTnmm() {\n\t\treturn _p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add a new software to the system.
boolean add( Software s );
[ "public void addSoftware(Software software){\n products.add (software);\n }", "public void addSoftware(Software software) {\r\n if (software == null) {\r\n throw new IllegalArgumentException(\"Software should not be null\");\r\n }\r\n\r\n this.softwareMap.put(software.get...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
end getNextLine method Check current line to see if it contains a field label.
private boolean checkNextField () { lineHasLabel = false; if (! endOfText()) { labelEnd = blockIn.indexOf (LABEL_SUFFIX, lineStart); if (labelEnd >= 0) { label = blockIn.substring (lineStart, labelEnd).trim(); labelStart = labels.indexOf (label); if (labelStart >= 0) { lineHasLabel = true; } } } return lineHasLabel; }
[ "public boolean findNextField () {\n if (lineHasLabel) {\n nextLabel = label;\n fieldStart = labelEnd + LABEL_SUFFIX.length();\n nextField = new StringBuilder();\n do {\n if (nextField.length() > 0) {\n nextField.append (GlobalConstants.LINE_FEED);\n }\n if (line...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removes a value of property OriginalTextWriter given as an instance of Contact
public static void removeOriginalTextWriter(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, Contact value) { Base.remove(model, instanceResource, ORIGINALTEXTWRITER, value); }
[ "public void removeOriginalTextWriter(Contact value) {\r\n\t\tBase.remove(this.model, this.getResource(), ORIGINALTEXTWRITER, value);\r\n\t}", "public void removeTextWriter(Contact value) {\r\n\t\tBase.remove(this.model, this.getResource(), TEXTWRITER, value);\r\n\t}", "public void setOriginalTextWriter(Contact...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Initialise a missile fired by the players craft
private void initMissile() { loadImage("src/resources/missile.png"); getImageDimensions(); }
[ "public Missile(int x, int y) {\r\n\t\tsuper(x, y);\r\n\t\tinitMissile();\r\n\t}", "protected void fireMissile()\n {\n for ( int i = invaders.length - 1; i >= 0; i-- )\n for ( int j = 0; j < invaders[i].length; j++ )\n if ( invaders[i][j] != null && !isBlocked( i, j ) && new Ra...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the value of the bulkTransport property.
public boolean isBulkTransport() { return bulkTransport; }
[ "public void setBulkTransport(boolean value) {\r\n this.bulkTransport = value;\r\n }", "public String getTransport() {\n return (String) getAttributeInternal(TRANSPORT);\n }", "public Boolean getTransport() {\n return transport;\n }", "public String getTransportType() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Metodo costruttore di SaccaWrapper
public SaccaWrapper(List<Sacca> sacche) { this.sacche = sacche; }
[ "SCAImplementation createSCAImplementation();", "private ContaCapitalFrontofficeServiceLocator() {\n\t\tsuper(\"cca_frontoffice\");\n\t}", "public interface SshCa extends CA {\n\n String CA_TYPE = \"SSHCA\";\n\n Integer getSerialNumberOctetSize();\n void setCaSerialNumberOctetSize(int serialNumberOctet...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }