idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
331,500 | public void execute(String commandName, BufferedReader reader, BufferedWriter writer) throws Py4JException, IOException {<NEW_LINE>char subCommand = safeReadLine<MASK><NEW_LINE>String returnCommand = null;<NEW_LINE>if (subCommand == ARRAY_GET_SUB_COMMAND_NAME) {<NEW_LINE>returnCommand = getArray(reader);<NEW_LINE>} els... | (reader).charAt(0); |
1,399,039 | static void createDefaultValues(PolyglotImpl polyglot, PolyglotLanguageInstance languageInstance, Map<Class<?>, PolyglotValueDispatch> valueCache) {<NEW_LINE>addDefaultValue(polyglot, languageInstance, valueCache, false);<NEW_LINE>addDefaultValue(polyglot, languageInstance, valueCache, "");<NEW_LINE>addDefaultValue(pol... | polyglot, languageInstance, valueCache, 0D); |
563,820 | public void marshall(PutSessionRequest putSessionRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (putSessionRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(putSessionRequest.getBotName(), B... | putSessionRequest.getActiveContexts(), ACTIVECONTEXTS_BINDING); |
1,781,009 | public RuleResult execute(Map<String, String> ruleParam, Map<String, String> resourceAttributes) {<NEW_LINE>logger.debug("========CloudfrontAuthorizedHTMLContentDistributionRule started=========");<NEW_LINE>String cloudFrontResourceID = resourceAttributes.get(PacmanSdkConstants.RESOURCE_ID);<NEW_LINE>MDC.put("execution... | = "CloudFront instance: " + cloudFrontResourceID + " is unauthorized for html content distribution. Content hosted on url : " + url; |
88,100 | public final MergeImpl values(Field<T1> value1, Field<T2> value2, Field<T3> value3, Field<T4> value4, Field<T5> value5, Field<T6> value6, Field<T7> value7, Field<T8> value8, Field<T9> value9, Field<T10> value10, Field<T11> value11, Field<T12> value12, Field<T13> value13, Field<T14> value14, Field<T15> value15, Field<T1... | , value20, value21, value22 }); |
466,618 | public void draw(Batch batch, float x, float y, float width, float height) {<NEW_LINE>float oldColor = batch.getPackedColor();<NEW_LINE>batch.setColor(batch.getColor().mul(color));<NEW_LINE>TextureRegion region = getRegion();<NEW_LINE>float regionWidth = region.getRegionWidth() * scale, regionHeight = region.getRegionH... | float v = region.getV(); |
706,861 | public void run(RegressionEnvironment env) {<NEW_LINE><MASK><NEW_LINE>assertTypesC0C1C2(env, "s0", Integer.class, Double.class, Long.class);<NEW_LINE>env.compileDeploy("@name('s1') select intPrimitive as c0, doublePrimitive as c1, longPrimitive as c2, sum(shortPrimitive) " + "from SupportBean group by grouping sets ((i... | env.compileDeploy("@name('s0') select intPrimitive as c0, doublePrimitive as c1, longPrimitive as c2, sum(shortPrimitive) " + "from SupportBean group by intPrimitive, rollup(doublePrimitive, longPrimitive)"); |
753,402 | protected List<SmallFile> smallFilesProfile(String partitionPath) {<NEW_LINE>// smallFiles only for partitionPath<NEW_LINE>List<SmallFile> smallFileLocations = new ArrayList<>();<NEW_LINE>HoodieTimeline commitTimeline = metaClient.getCommitsTimeline().filterCompletedInstants();<NEW_LINE>if (!commitTimeline.empty()) {<N... | .lastInstant().get(); |
360,947 | public static void install(@NonNull final EmojiProvider provider) {<NEW_LINE>synchronized (EmojiManager.class) {<NEW_LINE>INSTANCE.categories = checkNotNull(<MASK><NEW_LINE>INSTANCE.emojiMap.clear();<NEW_LINE>INSTANCE.emojiReplacer = provider instanceof EmojiReplacer ? (EmojiReplacer) provider : DEFAULT_EMOJI_REPLACER;... | provider.getCategories(), "categories == null"); |
103,156 | public static DescribeClusterDetailResponse unmarshall(DescribeClusterDetailResponse describeClusterDetailResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeClusterDetailResponse.setResource_group_id(_ctx.stringValue("DescribeClusterDetailResponse.resource_group_id"));<NEW_LINE>describeClusterDetailResponse.setVpc_... | (_ctx.stringValue("DescribeClusterDetailResponse.security_group_id")); |
627,265 | public void emit(Event event) {<NEW_LINE>if (!started.get()) {<NEW_LINE>throw new ISE("Emit called unexpectedly before service start");<NEW_LINE>}<NEW_LINE>if (event instanceof ServiceMetricEvent) {<NEW_LINE>final TimelineMetric timelineEvent = timelineMetricConverter.druidEventToTimelineMetric((ServiceMetricEvent) eve... | "got interrupted with message [%s]", e.getMessage()); |
455,534 | private static Collection<Object> queryNode(MXCIFQuadTreeNode<Object> node, double x, double y, double width, double height, Collection<Object> result) {<NEW_LINE>if (node instanceof MXCIFQuadTreeNodeLeaf) {<NEW_LINE>MXCIFQuadTreeNodeLeaf<Object> leaf = (MXCIFQuadTreeNodeLeaf<Object>) node;<NEW_LINE>return visit(leaf, ... | y, width, height, result); |
270,901 | public void select(GameView gameView, Map<String, Serializable> options, String message, int messageId) {<NEW_LINE>updateGame(gameView, true, options, null);<NEW_LINE>hideAll();<NEW_LINE>DialogManager.getManager(gameId).fadeOut();<NEW_LINE>this.abilityPicker.setVisible(false);<NEW_LINE>holdingPriority = false;<NEW_LINE... | panelOptions.put("your_turn", true); |
786,533 | private void addConflictedJars(JarLibrary jarLibrary, HashMap<String, JarLibrary> copiedEntries, String entryName) {<NEW_LINE>if (entryName.endsWith(".class") && !entryName.endsWith("module-info.class")) {<NEW_LINE>JarLibrary conflictingJar = copiedEntries.get(entryName);<NEW_LINE>// Ignore if conflicting jars has same... | .path().getFileName(); |
175,339 | protected void updateGoalState(ClusterModel clusterModel, OptimizationOptions optimizationOptions) {<NEW_LINE>List<String> disksAboveBalanceUpperLimit = new ArrayList<>();<NEW_LINE>List<String> disksBelowBalanceLowerLimit = new ArrayList<>();<NEW_LINE>for (Broker broker : brokersToBalance(clusterModel)) {<NEW_LINE>doub... | upperLimit = _balanceUpperThresholdByBroker.get(broker); |
1,500,468 | private static void failIfCorrupted(Directory directory) throws IOException {<NEW_LINE>final String[] files = directory.listAll();<NEW_LINE>List<CorruptIndexException> ex = new ArrayList<>();<NEW_LINE>for (String file : files) {<NEW_LINE>if (file.startsWith(CORRUPTED_MARKER_NAME_PREFIX)) {<NEW_LINE>try (ChecksumIndexIn... | ] buffer = new byte[size]; |
1,630,406 | public void showHomeWatchingArticles(final RequestContext context) {<NEW_LINE>final Request request = context.getRequest();<NEW_LINE>final JSONObject user = (JSONObject) context.attr(User.USER);<NEW_LINE>final AbstractFreeMarkerRenderer renderer = new SkinRenderer(context, "home/watching-articles.ftl");<NEW_LINE>final ... | (followingArticleCnt / (double) pageSize); |
1,031,423 | private AuthRealm createLDAPRealm(SecurityService ss) throws TransactionFailure, PropertyVetoException {<NEW_LINE>AuthRealm ar = ss.createChild(AuthRealm.class);<NEW_LINE>ar.setClassname(LDAPRealm.class.getName());<NEW_LINE>ar.setName(FIXED_ADMIN_REALM_NAME);<NEW_LINE>List<Property> props = ar.getProperty();<NEW_LINE>P... | p.setName(AbstractStatefulRealm.PARAM_GROUP_MAPPING); |
978,428 | public static void writeMBID(final String mBID, InputStream cover) {<NEW_LINE>boolean trace = LOGGER.isTraceEnabled();<NEW_LINE>try (Connection connection = MediaDatabase.get().getConnectionIfAvailable()) {<NEW_LINE>String query = "SELECT * FROM " + TABLE_NAME + contructMBIDWhere(mBID) + " LIMIT 1";<NEW_LINE>if (trace)... | TABLE_NAME, e.getMessage()); |
292,164 | public Collection<Vector2i> listChunks(long modifiedSince) {<NEW_LINE>if (!regionFile.exists() || regionFile.length() == 0)<NEW_LINE>return Collections.emptyList();<NEW_LINE>// 1024 = 32 x 32 chunks per region-file<NEW_LINE>List<Vector2i> chunks = new ArrayList<>(1024);<NEW_LINE>try (RandomAccessFile raf = new RandomAc... | = raf.read() << 24; |
1,251,015 | public static DBTTaskRunStatus makeStatisticsStatus(DBCStatistics statistics) {<NEW_LINE>DBTTaskRunStatus taskResultStatus = new DBTTaskRunStatus();<NEW_LINE>if (statistics.getRowsFetched() > 0 || statistics.getRowsUpdated() > 0 || statistics.getStatementsCount() > 0) {<NEW_LINE>StringJoiner joiner = new StringJoiner("... | setResultMessage(joiner.toString()); |
807,041 | private static <T> Pair<T, T> toRange(String s, T defaultValue, Function<String, T> valueParser) {<NEW_LINE>try {<NEW_LINE>if (s == null)<NEW_LINE>return new Pair<>(defaultValue, defaultValue);<NEW_LINE>s = s.trim();<NEW_LINE>if (s.startsWith("[") && s.endsWith("]")) {<NEW_LINE>String[] numbers = s.substring(1, s.lengt... | - 1).split(","); |
235,907 | private void addInnerObjectType(ObjectTypeDefinition type, SrcLinkedClass enclosingType) {<NEW_LINE>String identifier = makeIdentifier(type.getName(), false);<NEW_LINE>String fqn = getFqn() + '.' + identifier;<NEW_LINE>SrcLinkedClass srcClass = new SrcLinkedClass(fqn, enclosingType, Interface).addInterface(GqlType.clas... | > interfaces = type.getImplements(); |
1,724,816 | public void validate(final Processor<FullData, FullData> processor, final ProcessingReport report, final MessageBundle bundle, final FullData data) throws ProcessingException {<NEW_LINE>final JsonNode instance = data.getInstance().getNode();<NEW_LINE>final NodeType type = NodeType.getNodeType(instance);<NEW_LINE>if (ty... | "disallowed", toArrayNode(types))); |
842,337 | public int lengthLongestPathIterative(String input) {<NEW_LINE>if (input.length() == 0) {<NEW_LINE>return 0;<NEW_LINE>}<NEW_LINE>String[] tokens = input.split("\n");<NEW_LINE>Stack<String> stack = new Stack<>();<NEW_LINE>Stack<Integer> stack1 = new Stack<>();<NEW_LINE>int len = 0;<NEW_LINE>int max = 0;<NEW_LINE>for (St... | -= data.length() + 1; |
651,912 | public void dispatchLoop() {<NEW_LINE>// System.out.println( "ListenerManager::dispatch thread '" + Thread.currentThread() + "' starts");<NEW_LINE>while (true) {<NEW_LINE>dispatch_sem.reserve();<NEW_LINE>Object[] data = null;<NEW_LINE>synchronized (this) {<NEW_LINE>if (async_thread == null || !async_thread.isCurrentThr... | ]) dispatch_queue.remove(0); |
1,642,708 | public Void visitFunctionCall(FunctionCall call, Void v) throws RuntimeException {<NEW_LINE>final String functionName = call.getName();<NEW_LINE>final String fieldName = FieldPathHelper.schemaPath2FieldPath(getSchemaPathArg(call.arg(0))).asPathString();<NEW_LINE>switch(functionName) {<NEW_LINE>case "ojai_sizeof":<NEW_L... | throw new IllegalArgumentException("unrecognized functionName " + functionName); |
1,658,236 | final RebootNodeResult executeRebootNode(RebootNodeRequest rebootNodeRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(rebootNodeRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<... | HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); |
1,824,093 | final GetClientCertificateResult executeGetClientCertificate(GetClientCertificateRequest getClientCertificateRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getClientCertificateRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRe... | addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); |
1,586,532 | final DescribeWorkspacesConnectionStatusResult executeDescribeWorkspacesConnectionStatus(DescribeWorkspacesConnectionStatusRequest describeWorkspacesConnectionStatusRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeWorkspacesConnectionStatusRequest);<NEW_LINE>AWSRequestMetrics awsRe... | addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); |
723,864 | protected /* main loop */<NEW_LINE>void go(String[] args) {<NEW_LINE>JenaSystem.init();<NEW_LINE>if (!suppressDeprecationBanner) {<NEW_LINE><MASK><NEW_LINE>System.err.println(" DEPRECATED: Please use 'riot' instead.");<NEW_LINE>System.err.println(" http://jena.apache.org/documentation/io/#command-line-tools");<NE... | System.err.println("------------------------------------------------------------------"); |
1,422,402 | private void schemeSpecificPart(final UriParser parser) {<NEW_LINE>if (parser.isOpaque()) {<NEW_LINE>if (parser.getSsp() != null) {<NEW_LINE>this.authority = this.host = this.port = null;<NEW_LINE>this.path.setLength(0);<NEW_LINE>this.query.setLength(0);<NEW_LINE>// TODO encode or validate scheme specific part<NEW_LINE... | ), UriComponent.Type.AUTHORITY); |
139,132 | protected Object decode(Channel channel, SocketAddress remoteAddress, Object msg) throws Exception {<NEW_LINE>ByteBuf buf = (ByteBuf) msg;<NEW_LINE>// header<NEW_LINE>buf.skipBytes(2);<NEW_LINE>// length<NEW_LINE>buf.readUnsignedByte();<NEW_LINE>int type = buf.readUnsignedByte();<NEW_LINE>if (type == MSG_LOGIN) {<NEW_L... | channel, remoteAddress, type, null); |
1,215,314 | public boolean apply(Game game, Ability source) {<NEW_LINE>Permanent permanent = game.getPermanent(source.getSourceId());<NEW_LINE>int zcc = game.getState().getZoneChangeCounter(source.getSourceId());<NEW_LINE>if (permanent == null) {<NEW_LINE>permanent = game.getPermanentEntering(source.getSourceId());<NEW_LINE>zcc++;... | getToughness().setValue(value); |
1,716,714 | private static void validateSleighFile(ResourceFile relaxSchemaFile, ResourceFile fileToValidate, String type) throws SleighException {<NEW_LINE>FileResolutionResult result = FileUtilities.existsAndIsCaseDependent(fileToValidate);<NEW_LINE>if (!result.isOk()) {<NEW_LINE>throw new SleighException(fileToValidate + " is n... | fileToValidate.getAbsolutePath(), e); |
461,746 | private Optional<ImportIssueInfo> buildImportIssueInfo(@NonNull final Issue issue, @NonNull final ImportIssuesRequest importIssuesRequest, @NonNull final HashMap<GithubIdSearchKey, String> seenExternalIdsByKey) {<NEW_LINE>final GithubIdSearchKey githubIdSearchKey = GithubIdSearchKey.builder().repository(importIssuesReq... | ().getId())); |
1,352,633 | private long readStreamChunk(ByteBufferStream buffer, long size, MessageDigest md5, MessageDigest sha256) throws IOException {<NEW_LINE>long totalBytesRead = 0;<NEW_LINE>if (this.oneByte != null) {<NEW_LINE>buffer.write(this.oneByte);<NEW_LINE>md5.update(this.oneByte);<NEW_LINE>if (sha256 != null)<NEW_LINE>sha256.updat... | this.buf16k, 0, bytesRead); |
1,549,224 | public RestartRequirement onApply(UserPrefs rPrefs) {<NEW_LINE>RestartRequirement <MASK><NEW_LINE>if (relaunchRequired_)<NEW_LINE>restartRequirement.setUiReloadRequired(true);<NEW_LINE>String themeName = flatTheme_.getValue();<NEW_LINE>if (!StringUtil.equals(themeName, userPrefs_.globalTheme().getGlobalValue())) {<NEW_... | restartRequirement = super.onApply(rPrefs); |
242,989 | public CreateAssessmentTemplateResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>CreateAssessmentTemplateResult createAssessmentTemplateResult = new CreateAssessmentTemplateResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCu... | JsonToken token = context.getCurrentToken(); |
1,853,013 | private void initialize(final String text) {<NEW_LINE>splittedStringList = new ArrayList<IndexPair>();<NEW_LINE>stringWithoutTags = null;<NEW_LINE>{<NEW_LINE>final StringBuffer sb = new StringBuffer();<NEW_LINE>final Matcher matcher = FIND_TAGS_PATTERN.matcher(text);<NEW_LINE>int lastMatchEnd = 0;<NEW_LINE>while (match... | sb.length(), false); |
276,026 | SyntheticBeanBuildItem enableHttpBinders(MicrometerRecorder recorder, MicrometerConfig buildTimeConfig, HttpServerConfig serverConfig, HttpClientConfig clientConfig, VertxConfig vertxConfig, BuildProducer<AdditionalBeanBuildItem> additionalBeans) {<NEW_LINE>boolean clientEnabled = buildTimeConfig.<MASK><NEW_LINE>boolea... | checkBinderEnabledWithDefault(buildTimeConfig.binder.httpClient); |
1,283,202 | public LedgerHandle createLedgerAdv(final long ledgerId, int ensSize, int writeQuorumSize, int ackQuorumSize, DigestType digestType, byte[] passwd, final Map<String, byte[]> customMetadata) throws InterruptedException, BKException {<NEW_LINE>CompletableFuture<LedgerHandleAdv> future = new CompletableFuture<>();<NEW_LIN... | ), lh.getId()); |
1,537,370 | private ASTNode createExpressionSegment(final ASTNode astNode, final ParserRuleContext context) {<NEW_LINE>if (astNode instanceof StringLiteralValue) {<NEW_LINE>return new LiteralExpressionSegment(context.start.getStartIndex(), context.stop.getStopIndex(), ((StringLiteralValue) astNode).getValue());<NEW_LINE>}<NEW_LINE... | ) astNode).getValue()); |
1,628,621 | private Collection<PrivilegeType> loadDatabaseGlobalPrivileges(final ResultSet resultSet) throws SQLException {<NEW_LINE>Collection<PrivilegeType> result = new LinkedList<>();<NEW_LINE>addToPrivilegeTypesIfPresent(resultSet.getObject("Select_priv"), PrivilegeType.SELECT, result);<NEW_LINE>addToPrivilegeTypesIfPresent(r... | ), PrivilegeType.TRIGGER, result); |
559,942 | public boolean tryWaitfor(HostPort hostPort, MasterInfo masterInfo, ExecutionLog executionLog) {<NEW_LINE>if (hostPort == null) {<NEW_LINE>executionLog.info("target instance null");<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (masterInfo == null) {<NEW_LINE>executionLog.info("master info null, no wait");<NEW_LINE>ret... | Long masterOffset = masterInfo.getMasterReplOffset(); |
453,365 | public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {<NEW_LINE>builder.startObject("indexing_pressure");<NEW_LINE>builder.startObject("memory");<NEW_LINE>builder.startObject("current");<NEW_LINE>builder.humanReadableField(COMBINED_IN_BYTES, COMBINED, new ByteSizeValue(currentCom... | PRIMARY, new ByteSizeValue(totalPrimaryBytes)); |
1,763,409 | public static DescribeEndpointsResponse unmarshall(DescribeEndpointsResponse describeEndpointsResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeEndpointsResponse.setRequestId(_ctx.stringValue("DescribeEndpointsResponse.RequestId"));<NEW_LINE>describeEndpointsResponse.setNetType(_ctx.stringValue("DescribeEndpointsR... | (_ctx.stringValue("DescribeEndpointsResponse.Engine")); |
162,735 | public static ListEventAlgorithmResultsResponse unmarshall(ListEventAlgorithmResultsResponse listEventAlgorithmResultsResponse, UnmarshallerContext _ctx) {<NEW_LINE>listEventAlgorithmResultsResponse.setRequestId(_ctx.stringValue("ListEventAlgorithmResultsResponse.RequestId"));<NEW_LINE>listEventAlgorithmResultsResponse... | ("ListEventAlgorithmResultsResponse.Data.Records[" + i + "].UuidCode")); |
1,766,901 | public List<Template> findAllVersions(final Identifier identifier, final User user, final boolean respectFrontendRoles, final boolean bringOldVersions) throws DotDataException, DotSecurityException {<NEW_LINE>Logger.debug(this, () -> "Calling findAllVersions, identifier: " + identifier + ", user: " + user.<MASK><NEW_LI... | getUserId() + ", bringOldVersions: " + bringOldVersions); |
322,989 | public Answer createVolume(CreateObjectCommand cmd) {<NEW_LINE>LOGGER.debug("execute createVolume: " + cmd.getClass());<NEW_LINE>DataTO data = cmd.getData();<NEW_LINE>VolumeObjectTO volume = (VolumeObjectTO) data;<NEW_LINE>try {<NEW_LINE>String poolUuid = data.getDataStore().getUuid();<NEW_LINE>String storeUrl = data.g... | URI uri = new URI(storeUrl); |
319,105 | public void run(RegressionEnvironment env) {<NEW_LINE>String[] fields = "p0,p1".split(",");<NEW_LINE>env.<MASK><NEW_LINE>DefaultSupportCaptureOp<Object> captureOp = new DefaultSupportCaptureOp<Object>();<NEW_LINE>EPDataFlowInstantiationOptions options = new EPDataFlowInstantiationOptions();<NEW_LINE>options.operatorPro... | compileDeploy("@name('flow') create dataflow MyDataFlow " + "Emitter -> outstream<MyOAEventType> {name:'src1'}" + "DefaultSupportCaptureOp(outstream) {}"); |
1,173,928 | private static void expandDataFileRules(Path file) throws IOException {<NEW_LINE>boolean modified = false;<NEW_LINE>StringBuilder builder = new StringBuilder();<NEW_LINE>try (InputStream stream = Files.newInputStream(file);<NEW_LINE>InputStreamReader reader = new InputStreamReader(stream, StandardCharsets.UTF_8);<NEW_L... | e.printStackTrace(System.err); |
1,680,489 | public void handleMessage(Message message) {<NEW_LINE>if (message.type == Type.CALLBACK) {<NEW_LINE>CallbackMessage cm = (CallbackMessage) message;<NEW_LINE>deliverMessage(cm);<NEW_LINE>lastDelivery = timer.nanoTime();<NEW_LINE>} else if (message.type == Type.CANCEL_RESULT_CALLBACK) {<NEW_LINE>deliverCancelResult((Canc... | .getRunnable().run(); |
151,946 | public final void beforeDownBranch(boolean left) {<NEW_LINE>if (left) {<NEW_LINE>DecisionPath dp = mSolver.getDecisionPath();<NEW_LINE>int last = dp.size() - 1;<NEW_LINE>if (last > 0) {<NEW_LINE>String pdec;<NEW_LINE>pdec = pretty(dp.getDecision(last - 1));<NEW_LINE>Decision dec = dp.getLastDecision();<NEW_LINE>int ari... | last_stack.push(nc - 1); |
1,722,059 | public void removeTasksAffectedByPriorityFreeze(List<SingularityTaskRequest> taskRequests) {<NEW_LINE>final Optional<SingularityPriorityFreezeParent<MASK><NEW_LINE>if (maybePriorityFreeze.isPresent()) {<NEW_LINE>final ListIterator<SingularityTaskRequest> iterator = taskRequests.listIterator();<NEW_LINE>while (iterator.... | > maybePriorityFreeze = priorityManager.getActivePriorityFreeze(); |
203,802 | /*<NEW_LINE>* (non-Javadoc)<NEW_LINE>* @see org.eclipse.jface.text.rules.RuleBasedScanner#nextToken()<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public IToken nextToken() {<NEW_LINE>IToken token = super.nextToken();<NEW_LINE>Object data = token.getData();<NEW_LINE>if (data instanceof CSSTokenType) {<NEW_LINE>switch((CSSTo... | token = createToken(CSSTokenType.ID); |
1,146,619 | public static DescribeExposedInstanceListResponse unmarshall(DescribeExposedInstanceListResponse describeExposedInstanceListResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeExposedInstanceListResponse.setRequestId(_ctx.stringValue("DescribeExposedInstanceListResponse.RequestId"));<NEW_LINE>PageInfo pageInfo = new... | ("DescribeExposedInstanceListResponse.ExposedInstances[" + i + "].RegionId")); |
609,432 | protected void addReceiveEventExtensionElements(JsonNode elementNode, FlowElement flowElement) {<NEW_LINE>String eventKey = getPropertyValueAsString(PROPERTY_EVENT_REGISTRY_EVENT_KEY, elementNode);<NEW_LINE>if (StringUtils.isNotEmpty(eventKey)) {<NEW_LINE><MASK><NEW_LINE>addFlowableExtensionElementWithValue("eventName"... | addFlowableExtensionElementWithValue("eventType", eventKey, flowElement); |
579,890 | static void saveProcessorProperties(@NotNull Map<DataTransferProcessorDescriptor, Map<String, Object>> properties) throws IOException {<NEW_LINE>ByteArrayOutputStream os = new ByteArrayOutputStream();<NEW_LINE>try (Writer writer = new OutputStreamWriter(os, StandardCharsets.UTF_8)) {<NEW_LINE>try (JsonWriter jsonWriter... | toByteArray(), StandardCharsets.UTF_8); |
1,722,246 | public boolean intersect(BinaryMapDataObject bo, int lx, int ty, int rx, int by) {<NEW_LINE>// 1. polygon in object<NEW_LINE>if (contain(bo, lx, ty)) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>// 2. object in polygon<NEW_LINE>if (bo.getPointsLength() == 0) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (bo.getPoint31... | bo.getPoint31XTile(i - 1); |
686,513 | private boolean startDownloadRpc(FileReferenceDownload fileReferenceDownload, int retryCount, Connection connection) {<NEW_LINE>Request request = createRequest(fileReferenceDownload);<NEW_LINE>Duration rpcTimeout = rpcTimeout(retryCount);<NEW_LINE>connection.invokeSync(request, rpcTimeout.getSeconds());<NEW_LINE>Level ... | " available at " + connection.getAddress()); |
754,143 | public Object read(final InputStream is) {<NEW_LINE>final EncogReadHelper in = new EncogReadHelper(is);<NEW_LINE>EncogFileSection section;<NEW_LINE>final BasicMLDataSet samples = new BasicMLDataSet();<NEW_LINE>Map<String, String> networkParams = null;<NEW_LINE>PNNKernelType kernel = null;<NEW_LINE>PNNOutputMode outmode... | MLData idealData = new BasicMLData(outputCount); |
924,796 | private boolean checkLine(Polygon2D_F64 square, float grayThreshold, int side) {<NEW_LINE>// find the mid point between two parallel sides<NEW_LINE>int c0 = side;<NEW_LINE>int c1 = (side + 1) % 4;<NEW_LINE>int c2 = (side + 2) % 4;<NEW_LINE>int c3 = (side + 3) % 4;<NEW_LINE>UtilPoint2D_F64.mean(square.get(c0), square.ge... | interpolate.get(x, y); |
745,099 | public EAtom read_atom() throws IOException {<NEW_LINE>int tag;<NEW_LINE>int len;<NEW_LINE>byte[] strbuf;<NEW_LINE>String atom;<NEW_LINE>tag = read1skip_version();<NEW_LINE>if (tag == EExternal.atomCacheRef) {<NEW_LINE>int index = read1() & 0xff;<NEW_LINE>EAtom res = atom_cache_refs[index];<NEW_LINE>if (res == null) {<... | ] in = new char[len]; |
256,892 | public void checkMailAccountConfiguration(EmailAccount mailAccount) throws AxelorException, MessagingException {<NEW_LINE>com.axelor.mail.MailAccount account = getMailAccount(mailAccount);<NEW_LINE>Session session = account.getSession();<NEW_LINE>try {<NEW_LINE>if (mailAccount.getServerTypeSelect().equals(EmailAccountR... | .getStore().connect(); |
312,284 | public io.kubernetes.client.proto.V1Rbac.Role buildPartial() {<NEW_LINE>io.kubernetes.client.proto.V1Rbac.Role result = new io.kubernetes.client.proto.V1Rbac.Role(this);<NEW_LINE>int from_bitField0_ = bitField0_;<NEW_LINE>int to_bitField0_ = 0;<NEW_LINE>if (((from_bitField0_ & 0x00000001) == 0x00000001)) {<NEW_LINE>to_... | util.Collections.unmodifiableList(rules_); |
117,582 | void editLatexInEditor(final NodeModel node) {<NEW_LINE>LatexExtension latexExtension = <MASK><NEW_LINE>final String equation;<NEW_LINE>// if no LaTeX is attached, create one<NEW_LINE>if (latexExtension == null) {<NEW_LINE>equation = LegacyLatexEditor.editLatex("", node);<NEW_LINE>} else // if LaTeX is present edit it<... | node.getExtension(LatexExtension.class); |
426,636 | public static void cleanupMongoDBEntries(String httpString, Integer defaultPort) throws Exception {<NEW_LINE>HttpURLConnection con = null;<NEW_LINE>try {<NEW_LINE>msgUtils.printMethodName("cleanupMongoDBEntries");<NEW_LINE>Log.info(thisClass, "cleanupMongoDBEntries", "Drop DataBases through the server");<NEW_LINE>URL s... | sep = System.getProperty("line.separator"); |
1,128,912 | protected ActionResult<List<Wo>> execute(HttpServletRequest request, EffectivePerson effectivePerson, String name, String date) throws Exception {<NEW_LINE>ActionResult<List<Wo>> result = new ActionResult<>();<NEW_LINE>List<Wo> wraps = null;<NEW_LINE>Business business = null;<NEW_LINE>List<String> ids = null;<NEW_LINE>... | getStatisticUnitForDayFactory().list(ids); |
1,141,264 | public DescribeBillingGroupResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>DescribeBillingGroupResult describeBillingGroupResult = new DescribeBillingGroupResult();<NEW_LINE><MASK><NEW_LINE>reader.beginObject();<NEW_LINE>while (reader.hasNext()) {<NEW_LINE>String name = reader.nextName();... | AwsJsonReader reader = context.getReader(); |
887,272 | static PolystarShape newInstance(JSONObject json, LottieComposition composition) {<NEW_LINE>Type type = Type.forValue(json.optInt("sy"));<NEW_LINE>AnimatableFloatValue points = AnimatableFloatValue.Factory.newInstance(json.optJSONObject("pt"), composition, false);<NEW_LINE>AnimatableValue<PointF> position = AnimatableP... | .optJSONObject("ir"), composition); |
1,573,361 | public void createVideoCallView(Message message, ImageView attachmentIcon, TextView messageTextView) {<NEW_LINE>if (message.getMetadata() == null || message.getMetadata().isEmpty()) {<NEW_LINE>if (attachmentIcon != null) {<NEW_LINE>attachmentIcon.setImageResource(R.drawable.ic_videocam_white_24px);<NEW_LINE>attachmentI... | (message.getMetadata())); |
1,298,329 | private void resolveTime(long hod, long moh, long som, long nos) {<NEW_LINE>if (resolverStyle == ResolverStyle.LENIENT) {<NEW_LINE>long totalNanos = Math.multiplyExact(hod, 3600_000_000_000L);<NEW_LINE>totalNanos = Math.addExact(totalNanos, Math.multiplyExact(moh, 60_000_000_000L));<NEW_LINE>totalNanos = Math.addExact(... | hodVal = HOUR_OF_DAY.checkValidIntValue(hod); |
482,263 | private String drawClassInfo() {<NEW_LINE>final CodeSource cs = clazz.getProtectionDomain().getCodeSource();<NEW_LINE>final TTable tTable = new TTable(new TTable.ColumnDefine[] { new TTable.ColumnDefine(50, TTable.Align.RIGHT), new TTable.ColumnDefine(80, TTable.Align.LEFT) }).addRow("class-info", tranClassName(clazz))... | addRow("fields", drawField()); |
1,666,028 | private boolean addOrderedElement(Ordered adding) {<NEW_LINE>boolean added = false;<NEW_LINE>E[] tempUnorderedElements = (E[]) this.elements.toArray();<NEW_LINE>if (this.elements.contains(adding)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>this.elements.clear();<NEW_LINE>if (tempUnorderedElements.length == 0) {<NEW_L... | this.elements.add(current); |
195,207 | private Response doHttpGet(String url, boolean addIfModifiedSinceHeader) throws IOException {<NEW_LINE>final Request.Builder requestBuilder = new Request.Builder().get().url(url).header("User-Agent", "Graylog (server)");<NEW_LINE>if (addIfModifiedSinceHeader) {<NEW_LINE>final String lastModified = this.lastLastModified... | .UTC).toString()); |
449,045 | public static void average(InterleavedS64 from, GrayS64 to) {<NEW_LINE>final int numBands = from.getNumBands();<NEW_LINE>if (numBands == 1) {<NEW_LINE>for (int y = 0; y < from.height; y++) {<NEW_LINE>int indexFrom = from.getIndex(0, y);<NEW_LINE>int indexTo = to.getIndex(0, y);<NEW_LINE>System.arraycopy(from.data, inde... | to.getIndex(0, y); |
618,415 | /* package */<NEW_LINE>void updateQM_QtyDeliveredAvg(final IQualityInspectionOrder qiOrder, final IQualityInspectionOrder qiOrderPrevious) {<NEW_LINE>//<NEW_LINE>// Case of First Quality Inspection Order<NEW_LINE>// => we just need to copy QtyDelivered to QM_QtyDeliveredAvg<NEW_LINE>if (qiOrderPrevious == null) {<NEW_L... | qiOrderPrevious.getInspectionNumber(), "Previous QI order has invalid inspection number"); |
1,459,826 | private void importMissingProjectLibraries(@Nonnull Module module, @Nonnull Collection<DataNode<LibraryDependencyData>> nodesToImport, boolean synchronous) {<NEW_LINE>LibraryTable libraryTable = ProjectLibraryTable.getInstance(module.getProject());<NEW_LINE>List<DataNode<LibraryData><MASK><NEW_LINE>for (DataNode<Librar... | > librariesToImport = ContainerUtilRt.newArrayList(); |
270,745 | public void relocate(MachoRelocation relocation) throws MemoryAccessException, NotFoundException {<NEW_LINE>if (!relocation.requiresRelocation()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>RelocationInfo relocationInfo = relocation.getRelocationInfo();<NEW_LINE>Address targetAddr = relocation.getTargetAddress();<NEW_LINE>l... | (orig >> 29) & 0x1; |
1,035,362 | public Request<UpdateCloudFrontOriginAccessIdentityRequest> marshall(UpdateCloudFrontOriginAccessIdentityRequest updateCloudFrontOriginAccessIdentityRequest) {<NEW_LINE>if (updateCloudFrontOriginAccessIdentityRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>... | (updateCloudFrontOriginAccessIdentityRequest.getIfMatch())); |
1,581,463 | private void dfs(String nums, int pos, int target, long runningTotal, long multiplicationVal, List<String> result, StringBuffer buff) {<NEW_LINE>if (pos == nums.length()) {<NEW_LINE>if (runningTotal == target) {<NEW_LINE>result.add(buff.toString());<NEW_LINE>}<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>for (int i = pos; i < ... | 1, buff.length()); |
130,282 | public String generateItemsAndGroups() throws IOException, OmniNotConnectedException, OmniInvalidResponseException, OmniUnknownMessageTypeException {<NEW_LINE>groups = new StringBuilder();<NEW_LINE>items = new StringBuilder();<NEW_LINE>rooms = new LinkedHashMap<String, LinkedList<SiteItem>>();<NEW_LINE>lights = new Lin... | = new LinkedList<SiteItem>(); |
1,052,836 | public void updatePopup(Object lookupIteObject) {<NEW_LINE>if (lookupIteObject == null) {<NEW_LINE>doShowJavaDocInfo(finalElement, false, this, originalElement, closeCallback, CodeInsightBundle<MASK><NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (lookupIteObject instanceof PsiElement) {<NEW_LINE>doShowJavaDocInfo((PsiElement... | .message("no.documentation.found"), true); |
1,358,742 | public byte[] decodeMessage() {<NEW_LINE>byte[] data = new byte[29];<NEW_LINE>data[0] = (byte) (data.length - 1);<NEW_LINE>data[1] = RFXComBaseMessage.PacketType.SECURITY2.toByte();<NEW_LINE>data[2] = subType.toByte();<NEW_LINE>data[3] = seqNbr;<NEW_LINE>data[4] = 0;<NEW_LINE>data[5] = 0;<NEW_LINE>data[6] = 0;<NEW_LINE... | (byte) (sensorId & 0xff); |
739,813 | private IBundleProvider doEverythingOperation(TokenOrListParam theIds, IPrimitiveType<Integer> theCount, IPrimitiveType<Integer> theOffset, DateRangeParam theLastUpdated, SortSpec theSort, StringAndListParam theContent, StringAndListParam theNarrative, StringAndListParam theFilter, RequestDetails theRequest) {<NEW_LINE... | paramMap.add("_id", theIds); |
1,809,336 | public void export(OutputStream os, boolean signed, String rootName, List<Score> scores) throws Exception {<NEW_LINE>if (os == null) {<NEW_LINE>throw new IllegalArgumentException("Trying to export a book to a null output stream");<NEW_LINE>}<NEW_LINE>// Storing<NEW_LINE>Mxl.Output mof = new Mxl.Output(os);<NEW_LINE>Out... | scorePartwise = PartwiseBuilder.build(score); |
1,296,172 | public void onCreate(Bundle paramBundle) {<NEW_LINE>super.onCreate(paramBundle);<NEW_LINE>mediaQuality = (ListPreference) this.findPreference("pref_compression");<NEW_LINE>mediaQuality.setOnPreferenceChangeListener((preference, newValue) -> {<NEW_LINE>updateListSummary(preference, newValue);<NEW_LINE>dcContext.setConfi... | setOnPreferenceChangeListener(new AutodelChangeListener("delete_device_after")); |
1,487,160 | public synchronized void printInfo() {<NEW_LINE>System.out.println("#########################################");<NEW_LINE>System.out.println("Peer " + serverSocket.getLocalAddress() + ":" + localPort);<NEW_LINE>System.out.println("UUID: " + getUuid());<NEW_LINE>System.<MASK><NEW_LINE>System.out.println(received + " mes... | out.println("Time offset: " + timeOffset); |
1,587,205 | private TransactionComponents createTransactionComponents(@Output List<AutoCloseable> closeables, MetricsManager metricsManager, LockAndTimestampServices lockAndTimestampServices, KeyValueService keyValueService, Supplier<AtlasDbRuntimeConfig> runtimeConfigSupplier) {<NEW_LINE>CoordinationService<InternalSchemaMetadata... | TransactionSchemaManager transactionSchemaManager = new TransactionSchemaManager(coordinationService); |
25,847 | private void renderStatus(MolecularAssemblerBlockEntity molecularAssembler, PoseStack ms, MultiBufferSource bufferIn, int combinedLightIn, AssemblerAnimationStatus status) {<NEW_LINE>double centerX = molecularAssembler.getBlockPos().getX() + 0.5f;<NEW_LINE>double centerY = molecularAssembler.getBlockPos().getY() + 0.5f... | ItemStack is = status.getIs(); |
313,749 | private String addFieldsBinding(String target, List<ActionBuilderLine> lines, int level) {<NEW_LINE>StringBuilder stb = new StringBuilder();<NEW_LINE>lines.sort((l1, l2) -> {<NEW_LINE>if (l1.getDummy() && !l2.getDummy()) {<NEW_LINE>return -1;<NEW_LINE>}<NEW_LINE>if (!l1.getDummy() && l2.getDummy()) {<NEW_LINE>return 1;... | + value + ";", level)); |
488,174 | public CreateAuditSuppressionResult createAuditSuppression(CreateAuditSuppressionRequest createAuditSuppressionRequest) throws AmazonServiceException, AmazonClientException {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createAuditSuppressionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics ... | new JsonResponseHandler<CreateAuditSuppressionResult>(unmarshaller); |
164,847 | int copyFileV2(String destinationDir, String fileName, byte[] filePartData, long startTime, boolean done) {<NEW_LINE>if (Algorithms.isEmpty(fileName) || filePartData == null) {<NEW_LINE>return COPY_FILE_PARAMS_ERROR;<NEW_LINE>}<NEW_LINE>if (filePartData.length > COPY_FILE_PART_SIZE_LIMIT) {<NEW_LINE>return COPY_FILE_PA... | filePartData, startTime, done, destinationDir); |
547,138 | public void onException(Throwable e) {<NEW_LINE>if (callback == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>ClassLoader cl = Thread<MASK><NEW_LINE>try {<NEW_LINE>Thread.currentThread().setContextClassLoader(this.classLoader);<NEW_LINE>RpcInternalContext.setContext(context);<NEW_LINE>if (EventBus.isEnable(ClientAsyncRe... | .currentThread().getContextClassLoader(); |
687,081 | private void updateContributionsList() {<NEW_LINE>LayoutInflater inflater = UiUtilities.getInflater(app, nightMode);<NEW_LINE>LinearLayout list = mainView.findViewById(R.id.contributions_list);<NEW_LINE>list.removeAllViews();<NEW_LINE>Calendar calendar = Calendar.getInstance();<NEW_LINE>for (int i = 0; i < VISIBLE_MONT... | (String.valueOf(changesSize)); |
378,115 | void updateOwner(Permissionable asset, String ownerId) throws DotDataException {<NEW_LINE><MASK><NEW_LINE>DotConnect dc = new DotConnect();<NEW_LINE>if (ownerId != null && ownerId.startsWith("user-")) {<NEW_LINE>ownerId = ownerId.substring(5, ownerId.length());<NEW_LINE>}<NEW_LINE>String updateIdentifierSql = "update i... | String permissionId = asset.getPermissionId(); |
1,602,229 | // The tested deployment exceptions cause FFDC so we have to allow for this.<NEW_LINE>@AllowedFFDC()<NEW_LINE>public void launchHealth31Tck() throws Exception {<NEW_LINE>String protocol = "http";<NEW_LINE>String host = server.getHostname();<NEW_LINE>String port = Integer.toString(server.getPort(PortType.WC_defaulthost)... | additionalProps = new HashMap<>(); |
568,853 | private void handleIssues(final Activity activity, SpannableStringBuilder text, String[] issues) {<NEW_LINE>final String issueBaseUrl = "https://github.com/Tencent/QMUI_Android/issues/";<NEW_LINE>int start, end;<NEW_LINE>for (int i = 0; i < issues.length; i++) {<NEW_LINE>if (i == issues.length - 1) {<NEW_LINE>text.appe... | start, end, Spanned.SPAN_INCLUSIVE_EXCLUSIVE); |
1,708,152 | private ByteBuffer inet_peer(ByteBuffer buf) {<NEW_LINE>if ((state & INET_F_ACTIVE) == 0) {<NEW_LINE>log.fine("peer -> not connected");<NEW_LINE>return ctl_error(Posix.ENOTCONN);<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>InetAddress a = addr.getAddress();<NEW_LINE>if (log.isLoggable(Level.FINE))<NEW_LINE>log.fine("peer -> " ... | InetSocketAddress addr = fd.getRemoteAddress(); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.