idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
921,559 | final StopThingRegistrationTaskResult executeStopThingRegistrationTask(StopThingRegistrationTaskRequest stopThingRegistrationTaskRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(stopThingRegistrationTaskRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequest... | invoke(request, responseHandler, executionContext); |
1,248,855 | public void replaceFill(SVGDocument document, String idRegex, Color color) {<NEW_LINE>String colorCode = String.format("#%02x%02x%02x", color.getRed(), color.getGreen(), color.getBlue());<NEW_LINE>if (DEBUG)<NEW_LINE>System.out.println("color code: " + colorCode);<NEW_LINE>NodeList children = document.getElementsByTagN... | element.getAttributeNS(null, "style"); |
496,610 | private String buildMBRecordingQuery(final CoverArtArchiveTagInfo tagInfo, final boolean fuzzy) {<NEW_LINE>final String and = urlEncode(" AND ");<NEW_LINE>StringBuilder query = new StringBuilder("recording/?query=");<NEW_LINE>boolean added = false;<NEW_LINE>if (isNotBlank(tagInfo.title)) {<NEW_LINE>if (fuzzy) {<NEW_LIN... | tagInfo.title) + "\"")); |
1,256,288 | public void run(RegressionEnvironment env) {<NEW_LINE>RegressionPath path = new RegressionPath();<NEW_LINE>String stmtOneText = "@name('l1') @public insert into StreamA select nested.* from SupportBeanComplexProps as s0";<NEW_LINE>env.compileDeploy(stmtOneText, path).addListener("l1");<NEW_LINE>env.assertStatement("l1"... | ().getUnderlyingType())); |
773,393 | private ResponseSpec fooGetRequestCreation() throws WebClientResponseException {<NEW_LINE>Object postBody = null;<NEW_LINE>// create path and map variables<NEW_LINE>final Map<String, Object> pathParams = new HashMap<String, Object>();<NEW_LINE>final MultiValueMap<String, String> queryParams = new LinkedMultiValueMap<St... | localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); |
1,574,164 | public int fill(TileTransceiver from, @Nonnull Set<Channel> list, FluidStack resource, boolean doFill) {<NEW_LINE>if (resource == null || !from.hasPower()) {<NEW_LINE>return 0;<NEW_LINE>}<NEW_LINE>for (Channel channel : list) {<NEW_LINE>if (channel != null) {<NEW_LINE>RoundRobinIterator<<MASK><NEW_LINE>for (TileTransce... | TileTransceiver> iter = getIterator(channel); |
1,201,209 | final AdminInitiateAuthResult executeAdminInitiateAuth(AdminInitiateAuthRequest adminInitiateAuthRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(adminInitiateAuthRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<AdminInitiateAuthReq... | AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
86,512 | protected void handleCollision(PointList points, int index) {<NEW_LINE>Point start = points.getFirstPoint();<NEW_LINE>Point end = points.getLastPoint();<NEW_LINE>if (start.equals(end))<NEW_LINE>return;<NEW_LINE>Point midPoint = new Point((end.x + start.x) / 2, (end.y + start.y) / 2);<NEW_LINE>int position = end.getPosi... | = separation * ray.y / length; |
490,769 | public static Perfetto.Data.Builder enumerate(Perfetto.Data.Builder data) {<NEW_LINE>ImmutableListMultimap<String, CounterInfo> counters = data.getCounters(CounterInfo.Type.Global);<NEW_LINE>CounterInfo total = onlyOne(counters.get("MemTotal"));<NEW_LINE>CounterInfo free = onlyOne(counters.get("MemFree"));<NEW_LINE>Cou... | (counters.get("SwapCached")); |
1,547,691 | public Optional<DateTime> earliestPostIndexingTimestamp() {<NEW_LINE>final String sortField = ProcessingStatusDto.FIELD_RECEIVE_TIMES + "." + ProcessingStatusDto.ReceiveTimes.FIELD_POST_INDEXING;<NEW_LINE>final DateTime updateThresholdTimestamp = clock.nowUTC().minus(updateThreshold.toMilliseconds());<NEW_LINE>final DB... | receiveTimes().postIndexing()); |
63,248 | public double d(double[] x, double[] y) {<NEW_LINE>if (x.length != y.length) {<NEW_LINE>throw new IllegalArgumentException(String.format("Arrays have different length: x[%d], y[%d]", x.length, y.length));<NEW_LINE>}<NEW_LINE>int n = x.length;<NEW_LINE>int m = 0;<NEW_LINE>double dist = 0.0;<NEW_LINE>if (weight == null) ... | .length, weight.length)); |
746,073 | protected void startExecutorMonitor(final int container, final Process containerExecutor, Set<PackingPlan.InstancePlan> instances) {<NEW_LINE>// add the container for monitoring<NEW_LINE>Runnable r = new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>try {<NEW_LINE>LOG.info("Waiting for... | Level.INFO, "Container {0} is killed. No need to relaunch.", container); |
102,866 | protected void taskOperation(GetDeploymentStatsAction.Request request, TrainedModelDeploymentTask task, ActionListener<AllocationStats> listener) {<NEW_LINE>Optional<ModelStats<MASK><NEW_LINE>List<AllocationStats.NodeStats> nodeStats = new ArrayList<>();<NEW_LINE>if (stats.isPresent()) {<NEW_LINE>var presentValue = sta... | > stats = task.modelStats(); |
1,595,037 | public void addConvolve(int num) {<NEW_LINE>String typeCast = generateTypeCast();<NEW_LINE>out.print("\tpublic static void convolve" + num + "( Kernel2D_" + typeKernel + " kernel, " + typeInput + " input, " + typeOutput + " output, int skip )\n");<NEW_LINE>out.print("\t{\n" + "\t\tfinal " + dataInput + "[] dataSrc = in... | "\n" + "\t\t\t\t" + sumType + " total = 0;\n"); |
314,021 | private void addNode(ModelNodeInternal child, ModelRegistration registration) {<NEW_LINE>ModelPath childPath = child.getPath();<NEW_LINE>if (!getPath().isDirectChild(childPath)) {<NEW_LINE>throw new IllegalArgumentException(String.format("Element registration has a path (%s) which is not a child of this node (%s).", ch... | )), getPath())); |
1,552,936 | final ListUsersResult executeListUsers(ListUsersRequest listUsersRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listUsersRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_L... | awsRequestMetrics.startEvent(Field.RequestMarshallTime); |
559,627 | final TagResourceResult executeTagResource(TagResourceRequest tagResourceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(tagResourceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTi... | addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); |
959,711 | void addPart(int partId, byte[] part) {<NEW_LINE>if (partId != currentPartId) {<NEW_LINE>throw new IllegalStateException("Received partid " + partId + " while expecting " + currentPartId);<NEW_LINE>}<NEW_LINE>if (fileSize < currentFileSize + part.length) {<NEW_LINE>throw new IllegalStateException("Received part would e... | part, 0, part.length); |
1,208,104 | void routerBootstrap() {<NEW_LINE>List<CompletableFuture<RPCCall>> callFutures = new ArrayList<>();<NEW_LINE>resolveBootstrapAddresses();<NEW_LINE>Collection<InetSocketAddress> addrs = bootstrapAddresses;<NEW_LINE>for (InetSocketAddress addr : addrs) {<NEW_LINE>if (!type.canUseSocketAddress(addr))<NEW_LINE>continue;<NE... | FindNodeRequest(Key.createRandomKey()); |
106,184 | /*<NEW_LINE>* (non-Javadoc)<NEW_LINE>* @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public void initializeDefaultPreferences() {<NEW_LINE>IEclipsePreferences pref = DefaultScope.INSTANCE.getNode(CSSFormatterPlugin.PLUGIN_I... | ).getSymbolicName()))); |
1,086,707 | private static void showWarning(Object filename, int lineno, Object text, Object category, Object sourceline) {<NEW_LINE>Object name;<NEW_LINE>if (category instanceof PythonBuiltinClassType) {<NEW_LINE>name = ((PythonBuiltinClassType) category).getName();<NEW_LINE>} else {<NEW_LINE>name = PyObjectLookupAttr.getUncached... | null, stderr, "write", "\n"); |
458,732 | private void generateStepExecutionEntry(Long executionId, Long dummyTopLevelStepExecId, BatchStatus batchStatus, String exitStatus) throws Exception {<NEW_LINE>long stepExecutionId = -1L;<NEW_LINE>Connection conn = null;<NEW_LINE>PreparedStatement statement = null;<NEW_LINE>ResultSet rs = null;<NEW_LINE>long time = Sys... | statement.setLong(9, 0); |
1,429,437 | private static Request prepareReindexRequest(ReindexRequest reindexRequest, boolean waitForCompletion) {<NEW_LINE>String endpoint = new EndpointBuilder().addPathPart("_reindex").build();<NEW_LINE>Request request = new Request(HttpMethod.POST.name(), endpoint);<NEW_LINE>Params params = new Params(request).withWaitForCom... | Boolean.TRUE.toString()); |
1,051,586 | public void onChildDraw(Canvas c, RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder, float dX, float dY, int actionState, boolean isCurrentlyActive) {<NEW_LINE>View itemView = viewHolder.itemView;<NEW_LINE>// not sure why, but this method get's called for viewholder that are already swiped away<NEW_LINE>if ... | int intrinsicWidth = xMark.getIntrinsicWidth(); |
1,381,306 | public static boolean isMouseActionEvent(@Nonnull MouseEvent e, @Nonnull String actionId) {<NEW_LINE><MASK><NEW_LINE>if (keymapManager == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>Keymap keymap = keymapManager.getActiveKeymap();<NEW_LINE>if (keymap == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>int butt... | KeymapManager keymapManager = KeymapManager.getInstance(); |
79,490 | private void sortTail() {<NEW_LINE>// size > limit here<NEW_LINE>T[] d = data;<NEW_LINE><MASK><NEW_LINE>Comparator<? super T> cmp = comparator;<NEW_LINE>Arrays.sort(d, l, s, cmp);<NEW_LINE>if (cmp.compare(d[s - 1], d[0]) < 0) {<NEW_LINE>// Common case: descending sequence<NEW_LINE>// Assume size - limit <= limit here<N... | int l = limit, s = size; |
1,190,637 | public Clustering<DendrogramModel> extractClusters() {<NEW_LINE>final Logging log = getLogger();<NEW_LINE>final int split = findSplit();<NEW_LINE>// Extract the child clusters<NEW_LINE>FiniteProgress progress = log.isVerbose() ? new FiniteProgress("Extracting clusters", merges.numMerges(), log) : null;<NEW_LINE>// Init... | = new ArrayList<>(expcnum); |
677,546 | // analyze the origin stmt and return multi-statements<NEW_LINE>private List<StatementBase> analyze(String originStmt) throws AnalysisException {<NEW_LINE>LOG.debug("the originStmts are: {}", originStmt);<NEW_LINE>// Parse statement with parser generated by CUP&FLEX<NEW_LINE>SqlScanner input = new SqlScanner(new String... | throw new AnalysisException(errorMessage, e); |
480,227 | private String queryServiceName(GrpcRequestContainer request, Templater templater) {<NEW_LINE>ReplayProcessor<String> processor = ReplayProcessor.create();<NEW_LINE>fetchServiceList(processor.sink(), request, templater);<NEW_LINE>var serviceDefinitions = Flux.from(processor).collectList().block();<NEW_LINE>var inputDia... | ).findFirst(), serviceDefinitions); |
699,939 | public Yaml.Mapping.Entry visitMappingEntry(Yaml.Mapping.Entry entry, ExecutionContext ctx) {<NEW_LINE>Yaml.Mapping.Entry e = super.visitMappingEntry(entry, ctx);<NEW_LINE>Deque<Yaml.Mapping.Entry> propertyEntries = getCursor().getPathAsStream().filter(Yaml.Mapping.Entry.class::isInstance).map(Yaml.Mapping.Entry.class:... | ().searchResult())); |
427,997 | public DataRecord deserialize(final DataInput source, @NonNegative final long recordID, final SirixDeweyID deweyID, final PageReadOnlyTrx pageReadTrx) throws IOException {<NEW_LINE>final int valueSize = source.readInt();<NEW_LINE>final byte[] value = new byte[valueSize];<NEW_LINE>source.readFully(value, 0, valueSize);<... | readFully(type, 0, typeSize); |
535,861 | private Mono<Response<ResourceListKeysInner>> listKeysWithResponseAsync(String resourceGroupName, String namespaceName, String authorizationRuleName, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is requi... | this.client.mergeContext(context); |
582,352 | public void initView() {<NEW_LINE>Array<AttributeVO> gridAttributes = new Array<>();<NEW_LINE>gridAttributes.add(new AttributeVO("Width", currentParameters.gridWidth));<NEW_LINE>gridAttributes.add(new AttributeVO("Height", currentParameters.gridHeight));<NEW_LINE>CategoryVO gridVO = new CategoryVO("Grid size: ", gridAt... | .bottom().row(); |
1,556,110 | private SuperByteBuffer buildStructureBuffer(PonderWorld world, RenderType layer) {<NEW_LINE>BlockRenderDispatcher dispatcher = ModelUtil.VANILLA_RENDERER;<NEW_LINE><MASK><NEW_LINE>PoseStack poseStack = objects.poseStack;<NEW_LINE>Random random = objects.random;<NEW_LINE>ShadeSeparatingVertexConsumer shadeSeparatingWra... | ThreadLocalObjects objects = THREAD_LOCAL_OBJECTS.get(); |
577,523 | void draw(Graphics g) {<NEW_LINE>setBbox(point1, point2, 3 * opheight / 2);<NEW_LINE>setVoltageColor(g, volts[0]);<NEW_LINE>drawThickLine(g, in1p[0], in1p[1]);<NEW_LINE>setVoltageColor(g, volts[1]);<NEW_LINE>drawThickLine(g, in2p[0], in2p[1]);<NEW_LINE>setVoltageColor(g, volts[2]);<NEW_LINE>drawThickLine(g, in3p[0], in... | -getCurrentIntoNode(3), curCount3); |
462,710 | public void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>binding = ActivityAboutBinding.inflate(getLayoutInflater());<NEW_LINE>final View view = binding.getRoot();<NEW_LINE>setContentView(view);<NEW_LINE>setSupportActionBar(binding.toolbarBinding.toolbar);<NEW_LINE>getSupp... | githubLaunchIcon.setOnClickListener(this::launchGithub); |
696,907 | private void convertGrailsProject(IProject project, SubMonitor sub) throws Exception {<NEW_LINE>// nature<NEW_LINE>IProjectDescription description = project.getDescription();<NEW_LINE>String[] ids = description.getNatureIds();<NEW_LINE>List<String> newIds = new ArrayList<String>(ids.length);<NEW_LINE>for (int i = 0; i ... | = new ArrayList<IClasspathEntry>(); |
1,437,622 | private boolean isMongos() {<NEW_LINE>if (definition.isMongos() != null) {<NEW_LINE>return definition.isMongos().booleanValue();<NEW_LINE>} else {<NEW_LINE>DB adminDb = getAdminDb();<NEW_LINE>if (adminDb == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>logger.trace("Found {} database", MongoDBRiver.MONGODB_ADMIN_D... | (process.contains("mongos")); |
1,592,809 | private static void requestShapeFeatures(ImageData<?> imageData, Collection<ShapeFeatures> features) {<NEW_LINE>if (imageData == null)<NEW_LINE>return;<NEW_LINE>var featureArray = features.<MASK><NEW_LINE>if (featureArray.length == 0)<NEW_LINE>return;<NEW_LINE>Collection<PathObject> selected = imageData.getHierarchy().... | toArray(ShapeFeatures[]::new); |
1,632,624 | private void checkStatus() {<NEW_LINE>new AsyncTask<Void, Void, Boolean>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>protected Boolean doInBackground(Void... voids) {<NEW_LINE>List<String> owned = bp.listOwnedProducts();<NEW_LINE>return owned != null && owned.size() != 0;<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>... | getSupportActionBar().setTitle("Support development"); |
426,931 | public EvalRankingBatchOp linkFrom(BatchOperator<?>... inputs) {<NEW_LINE>BatchOperator<?> in = checkAndGetFirst(inputs);<NEW_LINE>TableUtil.assertSelectedColExist(in.getColNames(<MASK><NEW_LINE>TableUtil.assertSelectedColExist(in.getColNames(), this.getPredictionCol());<NEW_LINE>DataSet<Row> dataSet = in.select(new St... | ), this.getLabelCol()); |
189,583 | private void fillDeserializedKvBuilder(ConsumerRecord<Bytes, Bytes> rec, boolean isKey, DeserializedKeyValueBuilder builder) {<NEW_LINE>Optional<Integer> schemaId = extractSchemaIdFromMsg(rec, isKey);<NEW_LINE>Optional<MessageFormat> format = schemaId.flatMap(this::getMessageFormatBySchemaId);<NEW_LINE>if (schemaId.isP... | ().get())); |
357,382 | public static ListScaleOutEcuResponse unmarshall(ListScaleOutEcuResponse listScaleOutEcuResponse, UnmarshallerContext _ctx) {<NEW_LINE>listScaleOutEcuResponse.setRequestId(_ctx.stringValue("ListScaleOutEcuResponse.RequestId"));<NEW_LINE>listScaleOutEcuResponse.setCode(_ctx.integerValue("ListScaleOutEcuResponse.Code"));... | ("ListScaleOutEcuResponse.EcuInfoList[" + i + "].Name")); |
131,430 | public static org.apache.cassandra.thrift.ConsistencyLevel ToThriftConsistencyLevel(ConsistencyLevel cl) {<NEW_LINE>switch(cl) {<NEW_LINE>case CL_ONE:<NEW_LINE>return org.apache.cassandra.thrift.ConsistencyLevel.ONE;<NEW_LINE>case CL_QUORUM:<NEW_LINE>return org.apache.cassandra.thrift.ConsistencyLevel.QUORUM;<NEW_LINE>... | .cassandra.thrift.ConsistencyLevel.LOCAL_ONE; |
1,226,009 | public int findPage(int requiredSize) {<NEW_LINE>int nodeIndex = 0;<NEW_LINE>final int maxValue = 0xFF & getByteValue<MASK><NEW_LINE>if (maxValue == 0 || maxValue < requiredSize) {<NEW_LINE>return -1;<NEW_LINE>}<NEW_LINE>for (int level = 2; level <= LEVELS; level++) {<NEW_LINE>final int leftNodeIndex = nodeIndex << 1;<... | (nodeOffset(1, 0)); |
469,932 | public static Download from(Cursor cursor) {<NEW_LINE>Download download = new Download();<NEW_LINE>download.mId = cursor.getLong(cursor.getColumnIndex(DownloadManager.COLUMN_ID));<NEW_LINE>download.mUri = cursor.getString(cursor.getColumnIndex(DownloadManager.COLUMN_URI));<NEW_LINE>int status = cursor.getInt(cursor.get... | .getColumnIndex(DownloadManager.COLUMN_BYTES_DOWNLOADED_SO_FAR)); |
1,736,091 | public double pNorm(double p) {<NEW_LINE>if (p <= 0)<NEW_LINE>throw new IllegalArgumentException("norm must be a positive value, not " + p);<NEW_LINE>double result = 0;<NEW_LINE>if (p == 1) {<NEW_LINE>for (int i = 0; i < used; i++) result += abs(values[i]);<NEW_LINE>} else if (p == 2) {<NEW_LINE>for (int i = 0; i < use... | [i] * values[i]; |
1,722,958 | public static void main(String[] args) throws Exception {<NEW_LINE>JmxProcess process = new JmxProcess(Server.builder().setHost("w2").setPort("1099").setAlias("w2_ehcache_1099").addQuery(Query.builder().setObj("net.sf.ehcache:CacheManager=net.sf.ehcache.CacheManager@*,name=*,type=CacheStatistics").addAttr("CacheHits").... | ()).build()); |
1,457,360 | private void createCyclicalRelationsAndOwnerships(TypeDB.Transaction transaction) throws IOException {<NEW_LINE>try (InputStream inputStream = new BufferedInputStream(Files.newInputStream(dataFile))) {<NEW_LINE>DataProto.Item item;<NEW_LINE>while ((item = ITEM_PARSER.parseDelimitedFrom(inputStream)) != null) {<NEW_LINE... | getLabel()).create(); |
460,740 | private void onBrowseClick() {<NEW_LINE>File oldFile = defaultWorkingDirectory();<NEW_LINE>// NO I18N<NEW_LINE>JFileChooser fileChooser = new AccessibleJFileChooser(NbBundle.getMessage(ClonePanel.class, "ACSD_BrowseFolder"), oldFile);<NEW_LINE>// NO I18N<NEW_LINE>fileChooser.setDialogTitle(NbBundle.getMessage(ClonePane... | (ClonePanel.class, "OK_Button")); |
1,310,075 | private void doDelete(HttpEntity<String> entity) {<NEW_LINE>AgentResponse rsp = null;<NEW_LINE>DeleteCmd cmd = JSONObjectUtil.toObject(entity.getBody(), DeleteCmd.class);<NEW_LINE>if (!config.deleteSuccess) {<NEW_LINE>rsp = new AgentResponse();<NEW_LINE>rsp.setError("Fail delete on purpose");<NEW_LINE>rsp.setSuccess(fa... | headers.setContentType(MediaType.APPLICATION_JSON); |
513,558 | public static void main(String[] args) throws Exception {<NEW_LINE>TopologyBuilder builder = new TopologyBuilder();<NEW_LINE>builder.setSpout("word"<MASK><NEW_LINE>builder.setBolt("mybolt", new MyBolt(), 2).customGrouping("word", new MyCustomStreamGrouping());<NEW_LINE>Config conf = new Config();<NEW_LINE>// component ... | , new TestWordSpout(), 2); |
1,511,598 | protected void executeSynchronous(FlowNode flowNode) {<NEW_LINE>CommandContextUtil.getActivityInstanceEntityManager(commandContext).recordActivityStart(execution);<NEW_LINE>// Execution listener<NEW_LINE>if (CollectionUtil.isNotEmpty(flowNode.getExecutionListeners())) {<NEW_LINE>executeExecutionListeners(flowNode, Exec... | processEngineConfiguration = CommandContextUtil.getProcessEngineConfiguration(commandContext); |
1,038,372 | private Mono<Response<NetworkWatcherInner>> createOrUpdateWithResponseAsync(String resourceGroupName, String networkWatcherName, NetworkWatcherInner parameters, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint... | this.client.mergeContext(context); |
6,993 | public static void main(String[] args) {<NEW_LINE>Point2D[] pts = new Point2D[13];<NEW_LINE>pts[0] = new Point2D.Double(0, 5);<NEW_LINE>pts[1] = new Point2D.Double(-1, 1);<NEW_LINE>pts[2] = new Point2D.Double(0, 1);<NEW_LINE>pts[3] = new <MASK><NEW_LINE>pts[4] = new Point2D.Double(-5, 0);<NEW_LINE>pts[5] = new Point2D.... | Point2D.Double(1, 1); |
1,515,494 | public InternalExtendedStats reduce(List<InternalAggregation> aggregations, ReduceContext reduceContext) {<NEW_LINE>double sumOfSqrs = 0;<NEW_LINE>double compensationOfSqrs = 0;<NEW_LINE>for (InternalAggregation aggregation : aggregations) {<NEW_LINE>InternalExtendedStats stats = (InternalExtendedStats) aggregation;<NE... | sigma, format, getMetadata()); |
1,556,487 | public DiagnosticsReportSource heapDump() {<NEW_LINE>return new DiagnosticsReportSource() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public String destinationPath() {<NEW_LINE>return "heapdump.hprof";<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public InputStream newInputStream() throws IOException {<NEW_LINE>final P... | getPlatformMXBean(mBeanServer, MemoryMXBean.class); |
724,698 | private void initializeFcmCheck() {<NEW_LINE>if (!SignalStore.account().isRegistered()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>PlayServicesUtil.PlayServicesStatus fcmStatus = PlayServicesUtil.getPlayServicesStatus(this);<NEW_LINE>if (fcmStatus == PlayServicesUtil.PlayServicesStatus.DISABLED) {<NEW_LINE>if (SignalStore.... | Log.i(TAG, "Play Services are disabled. Disabling FCM."); |
1,249,404 | public Annotation annotate(File file, String revision) throws IOException {<NEW_LINE>List<String> cmd = new ArrayList<>();<NEW_LINE>ensureCommand(CMD_PROPERTY_KEY, CMD_FALLBACK);<NEW_LINE>cmd.add(RepoCommand);<NEW_LINE>cmd.add("blame");<NEW_LINE>cmd.add("--all");<NEW_LINE>cmd.add("--long");<NEW_LINE>if (revision != nul... | getInstance().getInteractiveCommandTimeout()); |
471,049 | public void deleteFromFriendList(MethodCall methodCall, final MethodChannel.Result result) {<NEW_LINE>List<String> userIDList = CommonUtil.getParam(methodCall, result, "userIDList");<NEW_LINE>int deleteType = CommonUtil.getParam(methodCall, result, "deleteType");<NEW_LINE>V2TIMManager.getFriendshipManager().deleteFromF... | v2TIMFriendOperationResults.get(i))); |
515,256 | public static List<ResourceFile> findExtensionPropertyFiles(ResourceFile sourceFile, boolean includeUninstalled) {<NEW_LINE>List<ResourceFile> propertyFiles = new ArrayList<>();<NEW_LINE>// Search for the file in the current directory.<NEW_LINE>ResourceFile propFile = findExtensionPropertyFile(sourceFile);<NEW_LINE>if ... | ] rfiles = sourceFile.listFiles(); |
482,820 | // ===================================================================================<NEW_LINE>// Source<NEW_LINE>// ======<NEW_LINE>@Override<NEW_LINE>public Map<String, Object> toSource() {<NEW_LINE>Map<String, Object> sourceMap = new HashMap<>();<NEW_LINE>if (endTime != null) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>i... | addFieldToSource(sourceMap, "endTime", endTime); |
932,160 | public void addRecipe(String recipePath, String blueprintCategory, IIngredientWithAmount[] inputs, IItemStack output) {<NEW_LINE>final ResourceLocation resourceLocation = new ResourceLocation("crafttweaker", recipePath);<NEW_LINE>final IngredientWithSize[] <MASK><NEW_LINE>final ItemStack results = output.getInternal();... | ingredients = CrTIngredientUtil.getIngredientsWithSize(inputs); |
326,402 | static Shape createCenteredStrokedShape(Shape s, BasicStroke stroke) {<NEW_LINE>final float lw = (stroke.getType() == BasicStroke.TYPE_CENTERED) ? stroke.getLineWidth() : stroke.getLineWidth() * 2.0f;<NEW_LINE>final RendererContext rdrCtx = MarlinRenderingEngine.getRendererContext();<NEW_LINE>try {<NEW_LINE>// initiali... | Path2D p2d = rdrCtx.getPath2D(); |
729,845 | public static LightweightHint showEditorFragmentHint(Editor editor, TextRange range, boolean showFolding, boolean hideByAnyKey) {<NEW_LINE>if (!(editor instanceof EditorEx))<NEW_LINE>return null;<NEW_LINE>JRootPane rootPane = editor.getComponent().getRootPane();<NEW_LINE>if (rootPane == null)<NEW_LINE>return null;<NEW_... | .getEndOffset())).y; |
396,286 | public void run() {<NEW_LINE>try {<NEW_LINE>Map resp = (Map) handler.invoke(buildRequestMap(req));<NEW_LINE>if (resp == null) {<NEW_LINE>// handler return null<NEW_LINE>cb.run(HttpEncode(404, new HeaderMap(), null, this.serverHeader));<NEW_LINE>eventLogger.log(eventNames.serverStatus404);<NEW_LINE>} else {<NEW_LINE>Obj... | ) resp.get(HEADERS)); |
1,702,669 | protected void onActivityResult(int requestCode, int resultCode, Intent data) {<NEW_LINE>super.onActivityResult(requestCode, resultCode, data);<NEW_LINE>if (requestCode == RESULT_LOAD_IMAGE && resultCode == RESULT_OK && null != data) {<NEW_LINE>Uri selectedImage = data.getData();<NEW_LINE>try {<NEW_LINE>InputStream ima... | tableResult.addDoneListener(this::applyServerEdits); |
1,354,893 | protected ServiceAndProperties createService() {<NEW_LINE>Cassandra311Persistence cassandraDB = new Cassandra311Persistence();<NEW_LINE>@SuppressWarnings("JdkObsolete")<NEW_LINE>Hashtable<String, String> props = new Hashtable<>();<NEW_LINE>props.put("Identifier", "CassandraPersistence");<NEW_LINE>// TODO copy metrics i... | setProcessor(authorizationProcessor.get()); |
267,690 | protected static void handleCreateStream(DestinationManager DM, ControlCreateStream msg, MessageProcessor MP) {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())<NEW_LINE>SibTr.entry(tc, "handleCreateStream", new Object[] { DM, msg, MP });<NEW_LINE>ControlMessage reply = null;<NEW_LINE>try {<NEW... | sender, SIMPConstants.CONTROL_MESSAGE_PRIORITY, reply); |
1,338,190 | private void loadNode923() {<NEW_LINE>PropertyTypeNode node = new PropertyTypeNode(this.context, Identifiers.ServerType_ServerRedundancy_RedundancySupport, new QualifiedName(0, "RedundancySupport"), new LocalizedText("en", "RedundancySupport"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueOf(0), new Dat... | .expanded(), true)); |
730,942 | private void loadNode248() {<NEW_LINE>SessionsDiagnosticsSummaryTypeNode node = new SessionsDiagnosticsSummaryTypeNode(this.context, Identifiers.Server_ServerDiagnostics_SessionsDiagnosticsSummary, new QualifiedName(0, "SessionsDiagnosticsSummary"), new LocalizedText("en", "SessionsDiagnosticsSummary"), LocalizedText.N... | .expanded(), true)); |
1,205,284 | // private synthetic method_1454(ILnet/minecraft/client/gui/screen/Screen;[ZIII)V<NEW_LINE>@Inject(method = "method_1454(ILnet/minecraft/client/gui/screen/Screen;[ZIII)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screen/Screen;keyPressed(III)Z"), cancellable = true)<NEW_LINE>private void beforeKey... | screen, key, scancode, modifiers); |
1,545,453 | private Mono<Response<Void>> validateMoveWithResponseAsync(String resourceGroupName, CsmMoveResourceEnvelope moveResourceEnvelope, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be n... | this.client.mergeContext(context); |
612,968 | public void saveSharesDB(List<OCShare> shares) {<NEW_LINE>ArrayList<ContentProviderOperation> operations = new ArrayList<>();<NEW_LINE>// Reset flags & Remove shares for this files<NEW_LINE>String filePath = "";<NEW_LINE>for (OCShare share : shares) {<NEW_LINE>if (!filePath.equals(share.getPath())) {<NEW_LINE>filePath ... | operations = prepareInsertShares(shares, operations); |
1,342,821 | private JPanel buildMainPanel(GhidraProgramTableModel<T> tableModel, GoToService gotoService) {<NEW_LINE>JPanel panel = new JPanel(new BorderLayout());<NEW_LINE>threadedPanel = new GhidraThreadedTablePanel<>(tableModel);<NEW_LINE><MASK><NEW_LINE>table.getSelectionModel().addListSelectionListener(e -> {<NEW_LINE>if (e.g... | GhidraTable table = threadedPanel.getTable(); |
1,811,086 | public static <K extends Comparable<K>, V> ImmutableSortedKeyListMultimap<K, V> copyOf(Multimap<K, V> data) {<NEW_LINE>if (data.isEmpty()) {<NEW_LINE>return EMPTY_MULTIMAP;<NEW_LINE>}<NEW_LINE>if (data instanceof ImmutableSortedKeyListMultimap) {<NEW_LINE>return (ImmutableSortedKeyListMultimap<K, V>) data;<NEW_LINE>}<N... | int size = keySet.size(); |
844,775 | public static long shaderc_compile_into_preprocessed_text(@NativeType("shaderc_compiler_t const") long compiler, @NativeType("char const *") CharSequence source_text, @NativeType("shaderc_shader_kind") int shader_kind, @NativeType("char const *") CharSequence input_file_name, @NativeType("char const *") CharSequence en... | stack.nUTF8(input_file_name, true); |
1,079,664 | final void defineSharedVarsForType(TypeElement type, ImmutableSet<ExecutableElement> methods, AutoValueishTemplateVars vars) {<NEW_LINE>vars.pkg = TypeSimplifier.packageNameOf(type);<NEW_LINE>vars.origClass = TypeSimplifier.classNameOf(type);<NEW_LINE>vars.simpleClassName = TypeSimplifier.simpleNameOf(vars.origClass);<... | equalsParameterType = equalsParameterType(methodsToGenerate, nullable); |
1,387,762 | private void readRowUShort(final DataInput input, int height, Rectangle srcRegion, boolean flip, int xSub, int ySub, short[] rowDataUShort, WritableRaster destChannel, Raster srcChannel, int y) throws IOException {<NEW_LINE>// Flip into position?<NEW_LINE>int srcY = flip ? height - 1 - y : y;<NEW_LINE>int dstY = (<MASK... | srcY - srcRegion.y) / ySub; |
72,131 | private String saveTable() throws IOException {<NEW_LINE>ExecutorService executorService = Executors.newFixedThreadPool(writeOptions.getThreadPoolSize());<NEW_LINE>CompletionService<Void> writerCompletionService = new ExecutorCompletionService<>(executorService);<NEW_LINE>createFolder(path);<NEW_LINE>// creates the fol... | columnPath = filePath.resolve(pathString); |
246,676 | public static void upgradeTo40_assignDashboards(Path dashboardsDump, DashboardService dashboardService, boolean sql) throws Exception {<NEW_LINE>JavaType assignedCustomersType = objectMapper.getTypeFactory().constructCollectionType(<MASK><NEW_LINE>try (CSVParser csvParser = new CSVParser(Files.newBufferedReader(dashboa... | HashSet.class, ShortCustomerInfo.class); |
958,185 | public static List<Object> generateValidDatetimeNumeric(int n) {<NEW_LINE>return IntStream.range(0, n).mapToObj(i -> {<NEW_LINE>final int r = Math.abs(R.nextInt()) % 6;<NEW_LINE>switch(r) {<NEW_LINE>case 0:<NEW_LINE>return randomDoubleInRange(1, (70 - 1) * 10000L + 1231L);<NEW_LINE>case 1:<NEW_LINE>return randomDoubleI... | 70 * 10000000000L + 101000000L, 991231235959L); |
1,269,561 | private <T extends Markable> void addPins(boolean removeViews, List<T> countries, T selectedCountry) {<NEW_LINE>if (removeViews) {<NEW_LINE>mapView.getMarkerLayout().removeAllViews();<NEW_LINE>removePaths();<NEW_LINE>}<NEW_LINE>List<T> countriesCopy = sortPins(countries);<NEW_LINE>for (Markable country : countriesCopy)... | ).getCountryName()))); |
1,083,002 | public void deleteNetwork(String guid) {<NEW_LINE>String name = null;<NEW_LINE>if (nameToGuid.isEmpty()) {<NEW_LINE>log.warn("Could not delete network with ID {}, network doesn't exist", guid);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>for (Entry<String, String> entry : nameToGuid.entrySet()) {<NEW_LINE>if (entry.getValue()... | remove(entry.getKey()); |
355,845 | public void findFunctionsUsingAtexit() throws CancelledException, InvalidInputException {<NEW_LINE>Function atexitFunction = null;<NEW_LINE>List<Function> atexitFunctions = extendedFlatAPI.getGlobalFunctions("_atexit");<NEW_LINE>if (atexitFunctions.size() != 1) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>atexitFunction = at... | extendedFlatAPI.getSubroutineAddresses(program, fromAddress); |
851,506 | private static void loadLib(String lib) {<NEW_LINE>InputStream is = Os.class.getResourceAsStream(lib);<NEW_LINE>if (is == null) {<NEW_LINE>throw new FatalError("Internal error: cannot find " + lib + ", broken package?");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>File tempLib = null;<NEW_LINE>try {<NEW_LINE>int <MASK><NEW_LINE... | dot = lib.indexOf('.'); |
303,184 | private void showPreferencesSummary() {<NEW_LINE>showCurrentFileName(Strings.getFormattedFileName());<NEW_LINE>ImageView imgGpx = (ImageView) rootView.findViewById(R.id.simpleview_imgGpx);<NEW_LINE>ImageView imgKml = (ImageView) rootView.findViewById(R.id.simpleview_imgKml);<NEW_LINE>ImageView imgCsv = (ImageView) root... | imgJson.setVisibility(View.GONE); |
1,787,975 | String executeDdl(final String sqlExpression, final DdlCommand command, final boolean withQuery, final Set<SourceName> withQuerySources, final boolean restoreInProgress) {<NEW_LINE>if (command instanceof DropSourceCommand && !restoreInProgress) {<NEW_LINE>throwIfInsertQueriesExist(((DropSourceCommand<MASK><NEW_LINE>}<N... | ) command).getSourceName()); |
1,381,793 | public void replace(File inputFile, File outputFile) {<NEW_LINE>try (BufferedReader reader = new BufferedReader(new FileReader(inputFile))) {<NEW_LINE>BufferedWriter writer = null;<NEW_LINE>FileOutputStream outputStream = null;<NEW_LINE>try {<NEW_LINE>if (charsetName != null) {<NEW_LINE>outputStream = new FileOutputStr... | new OutputStreamWriter(outputStream, charset)); |
913,080 | public static int edgelblcmpfn(CArrayOfStar<ST_Agedge_s> ptr0, CArrayOfStar<ST_Agedge_s> ptr1) {<NEW_LINE>ENTERING("bmsa24i3avg14po4sp17yh89k", "edgelblcmpfn");<NEW_LINE>try {<NEW_LINE>ST_Agedge_s e0, e1;<NEW_LINE>final ST_pointf sz0 = new ST_pointf(), sz1 = new ST_pointf();<NEW_LINE>e0 = ptr0.get_(0);<NEW_LINE><MASK><... | e1 = ptr1.get_(0); |
751,045 | private Attributes filterAttributes(Attributes attributes) throws SAXException {<NEW_LINE>int len = attributes.getLength();<NEW_LINE>String langValue = null;<NEW_LINE>for (int i = 0; i < len; i++) {<NEW_LINE>String local = attributes.getLocalName(i);<NEW_LINE>String uri = attributes.getURI(i);<NEW_LINE>if (local == "la... | , attributes.getValue(k)); |
115,450 | public static DescribeIngressResponse unmarshall(DescribeIngressResponse describeIngressResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeIngressResponse.setRequestId(_ctx.stringValue("DescribeIngressResponse.RequestId"));<NEW_LINE>describeIngressResponse.setCode(_ctx.stringValue("DescribeIngressResponse.Code"));<... | (_ctx.stringValue("DescribeIngressResponse.Message")); |
293,401 | public static DescribeLayer4RulePolicyResponse unmarshall(DescribeLayer4RulePolicyResponse describeLayer4RulePolicyResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeLayer4RulePolicyResponse.setRequestId(_ctx.stringValue("DescribeLayer4RulePolicyResponse.RequestId"));<NEW_LINE>describeLayer4RulePolicyResponse.setIn... | ("DescribeLayer4RulePolicyResponse.SecRealServers[" + i + "].Protocol")); |
1,614,957 | private void initializeResources() {<NEW_LINE>chatId = getIntent().getIntExtra(CHAT_ID_EXTRA, 0);<NEW_LINE>contactId = getIntent().getIntExtra(CONTACT_ID_EXTRA, 0);<NEW_LINE>chatIsMultiUser = false;<NEW_LINE>chatIsDeviceTalk = false;<NEW_LINE>chatIsMailingList = false;<NEW_LINE>chatIsBroadcast = false;<NEW_LINE>fromCha... | 1 ? members[0] : 0; |
289,776 | public static List<OpenSSLX509CRL> fromPkcs7DerInputStream(InputStream is) throws ParsingException {<NEW_LINE><MASK><NEW_LINE>final long[] certRefs;<NEW_LINE>try {<NEW_LINE>certRefs = NativeCrypto.d2i_PKCS7_bio(bis.getBioContext(), NativeCrypto.PKCS7_CRLS);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new ParsingExc... | OpenSSLBIOInputStream bis = new OpenSSLBIOInputStream(is); |
505,853 | private void populateTraceTnSlowCountAndPointPartialPart2() throws Exception {<NEW_LINE>if (!columnExists("trace_tn_slow_point", "partial")) {<NEW_LINE>// previously failed mid-upgrade prior to updating schema version<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>PreparedStatement deleteCountPS = session.prepare("delete from tr... | (session.writeAsync(boundStatement)); |
307,349 | private CombinedStatistics runAnalysis(Runtime runtime, long t0, EngineArguments args, MutationEngine engine) {<NEW_LINE>CoverageDatabase coverageData = coverage().calculateCoverage();<NEW_LINE>HistoryStore history = this.strategies.history();<NEW_LINE>LOG.fine("Used memory after coverage calculation " + ((runtime.tota... | ("Completed in " + timeSpan(t0)); |
769,331 | public void prompt(String msg) {<NEW_LINE>scr_img_original = scrOCP.capture();<NEW_LINE>scr_img = scr_img_original.getImage();<NEW_LINE>scr_img_darker = scr_img;<NEW_LINE>scr_img_type = scr_img.getType();<NEW_LINE>scr_img_rect = new Rectangle(scrOCP.getBounds());<NEW_LINE>promptMsg = msg;<NEW_LINE>if (isLocalScreen) {<... | ) (scr_img_rect.width * scr_img_scale); |
1,481,713 | public boolean delConsumeCtrlConf(String operator, String groupName, String topicName, StringBuilder strBuff, ProcessResult result) {<NEW_LINE>Integer topicLockId = null;<NEW_LINE>Integer groupLockId = null;<NEW_LINE>GroupConsumeCtrlEntity curEntity;<NEW_LINE>String printPrefix = "[delConsumeCtrlConf], ";<NEW_LINE>// e... | .getBytesUtf8(topicName), true); |
320,186 | private List<QuestionConcept> retrieveArtificialConcepts(Request request) {<NEW_LINE>List<QuestionConcept> artificialConcepts = new ArrayList<>();<NEW_LINE>String numberOfArtificialConceptsS = request.queryParams("numberOfConcepts");<NEW_LINE>if (numberOfArtificialConceptsS == null)<NEW_LINE>return artificialConcepts;<... | numberOfArtificialConcepts = Integer.parseInt(numberOfArtificialConceptsS); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.