idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,045,515 | private static void processInsn(RootNode root, MethodNode mth, InsnData insnData, UsageInfo usageInfo) {<NEW_LINE>if (insnData.getOpcode() == Opcode.UNKNOWN) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>switch(insnData.getIndexType()) {<NEW_LINE>case TYPE_REF:<NEW_LINE>insnData.decode();<NEW_LINE>ArgType usedType = ArgType.p... | usageInfo.clsUse(mth, usedType); |
580,348 | private Object buildUserModel(Map<Integer, ReadCellData<?>> cellDataMap, ReadSheetHolder readSheetHolder, AnalysisContext context) {<NEW_LINE><MASK><NEW_LINE>Object resultModel;<NEW_LINE>try {<NEW_LINE>resultModel = excelReadHeadProperty.getHeadClazz().newInstance();<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new ... | ExcelReadHeadProperty excelReadHeadProperty = readSheetHolder.excelReadHeadProperty(); |
207,728 | private Map<String, String> formatEmailInfo(SearchResult sResult, String targetKey) {<NEW_LINE>if (null == sResult) {<NEW_LINE>return Collections.emptyMap();<NEW_LINE>}<NEW_LINE>Map<String, String> result = new <MASK><NEW_LINE>try {<NEW_LINE>NamingEnumeration namingEnumeration = sResult.getAttributes().getAll();<NEW_LI... | LinkedHashMap<String, String>(); |
1,245,055 | protected Control createDialogArea(Composite parent) {<NEW_LINE>Composite area = (Composite) super.createDialogArea(parent);<NEW_LINE>Composite container = Widgets.createComposite(area, new GridLayout(2, false));<NEW_LINE>container.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));<NEW_LINE>for (API.Parameter... | getConstants(param.getConstants()); |
1,316,974 | public void configure(ConfigurableProvider provider) {<NEW_LINE>provider.addAlgorithm("MessageDigest.SHA3-224", PREFIX + "$Digest224");<NEW_LINE>provider.addAlgorithm("MessageDigest.SHA3-256", PREFIX + "$Digest256");<NEW_LINE>provider.addAlgorithm("MessageDigest.SHA3-384", PREFIX + "$Digest384");<NEW_LINE>provider.addA... | addAlgorithm("MessageDigest.TUPLEHASH256-512", PREFIX + "$DigestTupleHash256_512"); |
1,229,908 | public static boolean findStructuralLeftBrace(@Nonnull FileType fileType, @Nonnull HighlighterIterator iterator, @Nonnull CharSequence fileText) {<NEW_LINE>final Stack<IElementType> braceStack = new Stack<IElementType>();<NEW_LINE>final Stack<String> tagNameStack = new Stack<String>();<NEW_LINE>BraceMatcher matcher = g... | getBraceTokenGroupId(iterator.getTokenType()); |
43,433 | public final QualifiedNameElementContext qualifiedNameElement() throws RecognitionException {<NEW_LINE>QualifiedNameElementContext _localctx = new QualifiedNameElementContext(_ctx, getState());<NEW_LINE>enterRule(_localctx, 104, RULE_qualifiedNameElement);<NEW_LINE>try {<NEW_LINE>setState(787);<NEW_LINE>_errHandler.syn... | _errHandler.recover(this, re); |
1,347,843 | static ArrayList<Long> buffertimings(List<ImmutableRoaringBitmap> bitmaps, int maxvalue) {<NEW_LINE>long successive_and = 0;<NEW_LINE>long successive_or = 0;<NEW_LINE>long total_or = 0;<NEW_LINE>long start, stop;<NEW_LINE>ArrayList<Long> timings = new ArrayList<Long>();<NEW_LINE>start = System.nanoTime();<NEW_LINE>for ... | timings.add(stop - start); |
1,193,651 | public DeleteFileSystemLustreConfiguration unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>DeleteFileSystemLustreConfiguration deleteFileSystemLustreConfiguration = new DeleteFileSystemLustreConfiguration();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentEle... | JsonToken token = context.getCurrentToken(); |
466,365 | public void onContentInfoReceived(HashMap<String, Object> contentInfo) {<NEW_LINE>int blockCount = (int) Double.parseDouble(contentInfo.get("blockCount").toString());<NEW_LINE>int wordCount = (int) Double.parseDouble(contentInfo.get("wordCount").toString());<NEW_LINE>int charCount = (int) Double.parseDouble(contentInfo... | = new MaterialAlertDialogBuilder(getActivity()); |
1,626,776 | void addToBuilder(AbstractTable table, QueryStringBuilder builder, Consumer<BindMarker> onMarker) {<NEW_LINE>Column receiver = lhs().appendToBuilder(table, builder, onMarker);<NEW_LINE>builder.append(predicate().toString());<NEW_LINE>ColumnType type = receiver.type();<NEW_LINE>assert type != null;<NEW_LINE>BindMarker m... | append(marker, value()); |
1,399,287 | private DruidScanResponse parseResponse(ArrayNode responses) {<NEW_LINE>String segmentId = "empty";<NEW_LINE>ArrayList<ObjectNode> events = new ArrayList<>();<NEW_LINE>ArrayList<String> columns = new ArrayList<>();<NEW_LINE>if (responses.size() > 0) {<NEW_LINE>ObjectNode firstNode = (ObjectNode) responses.get(0);<NEW_L... | DruidScanResponse(segmentId, columns, events); |
1,352,078 | public static void main(String[] unused) throws Exception {<NEW_LINE>LOG.info("TaskExecutor is running..");<NEW_LINE>try (TaskExecutor executor = requireNonNull(createExecutor())) {<NEW_LINE>// If not reusing port, then reserve them up until before the underlying TF process is<NEW_LINE>// launched. See <a href="https:/... | .valueOf(executor.taskIndex)); |
1,055,655 | public void childEvent(CuratorFramework client, TreeCacheEvent event) throws Exception {<NEW_LINE>if (event == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>if (data == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String path = data.getPath();<NEW_LINE>if (path == null || path.equals(JobNodePath.ROOT)) {... | ChildData data = event.getData(); |
1,206,900 | private void collectInventoryAPINoSee() {<NEW_LINE>BeanUtils.reflections.getTypesAnnotatedWith(Inventory.class).stream().filter(clz -> !Modifier.isStatic(clz.getModifiers())).forEach(clz -> {<NEW_LINE>Inventory inventory = clz.getAnnotation(Inventory.class);<NEW_LINE>if (inventory == null) {<NEW_LINE>return;<NEW_LINE>}... | clz.getName(), skip); |
1,375,233 | public void updateButton(AnActionEvent e) {<NEW_LINE>super.updateButton(e);<NEW_LINE>if (!e.getPresentation().isEnabled())<NEW_LINE>return;<NEW_LINE>final JComponent c = getContextComponent();<NEW_LINE>if (c instanceof JTable || c instanceof JList) {<NEW_LINE>final ListSelectionModel model = c instanceof JTable ? ((JTa... | int max = model.getMaxSelectionIndex(); |
419,314 | public static void processEntries(FhirContext theContext, IBaseBundle theBundle, Consumer<ModifiableBundleEntry> theProcessor) {<NEW_LINE>RuntimeResourceDefinition bundleDef = theContext.getResourceDefinition(theBundle);<NEW_LINE>BaseRuntimeChildDefinition entryChildDef = bundleDef.getChildByName("entry");<NEW_LINE>Lis... | >) entryChildDef.getChildByName("entry"); |
573,803 | public String parameterList(List<PositionalParamSpec> positionalParams) {<NEW_LINE>int usageHelpWidth = commandSpec.usageMessage().width();<NEW_LINE>int longOptionsColumnWidth = longOptionsColumnWidth(createDefaultLayout());<NEW_LINE>int descriptionWidth = usageHelpWidth - 1 - longOptionsColumnWidth;<NEW_LINE>TextTable... | createDefaultOptionRenderer(), createDefaultParameterRenderer()); |
77,759 | public Map<String, Object> postProcessOperationsWithModels(Map<String, Object> objs, List<ModelMap> allModels) {<NEW_LINE>objs = super.postProcessOperationsWithModels(objs, allModels);<NEW_LINE>Map<String, Object> operations = (Map<String, Object>) objs.get("operations");<NEW_LINE>HashMap<String, CodegenModel> modelMap... | (p, modelMaps, processedModelMaps)); |
705,045 | public void doit(JvstCodeGen gen, Bytecode bytecode, ASTList args) throws CompileError {<NEW_LINE>int <MASK><NEW_LINE>if (num != dimension)<NEW_LINE>throw new CompileError(Javac.proceedName + "() with a wrong number of parameters");<NEW_LINE>gen.atMethodArgs(args, new int[num], new int[num], new String[num]);<NEW_LINE>... | num = gen.getMethodArgsLength(args); |
134,823 | public void saveLandmarks(double markerWidth, double markerHeight, List<Point2D_F64> corners, String description, String fileName) {<NEW_LINE>double paperWidth = paper.convertWidth(units);<NEW_LINE>double paperHeight = paper.convertHeight(units);<NEW_LINE>double offsetX = paperWidth / 2.0 - markerWidth / 2.0;<NEW_LINE>... | println("paper=" + paper.name); |
1,590,787 | public List<SuppressionRule> parseSuppressionRules(InputStream inputStream, SuppressionRuleFilter filter) throws SuppressionParseException, SAXException {<NEW_LINE>try (InputStream schemaStream13 = FileUtils.getResourceAsStream(SUPPRESSION_SCHEMA_1_3);<NEW_LINE>InputStream schemaStream12 = FileUtils.getResourceAsStream... | LOGGER.debug("", ex); |
184,991 | JobExecution createJobExecutionFromResultSet(ResultSet rs, int rowNum) throws SQLException {<NEW_LINE>Long id = rs.getLong(1);<NEW_LINE>JobExecution jobExecution;<NEW_LINE>JobParameters jobParameters = getJobParameters(id);<NEW_LINE>JobInstance jobInstance = new JobInstance(rs.getLong(10), rs.getString(11));<NEW_LINE>j... | (rs.getTimestamp(2)); |
424,807 | private static void statementTiming() {<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>Connection conn = null;<NEW_LINE>if (s_cType == C_MULTIPLE)<NEW_LINE>conn = DriverManager.getConnection(CONNECTION, UID, PWD);<NEW_LINE>long startStatement = System.currentTimeMillis();<NEW_LINE>Statement stmt = conn.createStatement();<NEW_... | long startConnection = System.currentTimeMillis(); |
1,847,241 | public NotificationEntity patchNotificationsId(Integer id, NotificationsIdBody body) throws ApiException {<NEW_LINE>Object localVarPostBody = body;<NEW_LINE>// verify the required parameter 'id' is set<NEW_LINE>if (id == null) {<NEW_LINE>throw new ApiException(400, "Missing the required parameter 'id' when calling patc... | localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); |
397,255 | public void validateAndFixProperty(String key, String[] values, String fixValue) {<NEW_LINE>if (values == null || values.length == 0) {<NEW_LINE>if (c_logger.isTraceDebugEnabled()) {<NEW_LINE>c_logger.traceDebug(<MASK><NEW_LINE>}<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String value = getString(key);<NEW_LINE>if (value == ... | this, "validateAndFixProperty", "Skipping validation for key: " + key); |
1,102,206 | private void forceDeleteDatafeed(DeleteDatafeedAction.Request request, ClusterState state, ActionListener<AcknowledgedResponse> listener) {<NEW_LINE>ActionListener<Boolean> finalListener = // use clusterService.state() here so that the updated state without the task is available<NEW_LINE>ActionListener.// use clusterSe... | , listener), listener::onFailure); |
1,189,036 | public okhttp3.Call readNamespacedJobCall(String name, String namespace, String pretty, final ApiCallback _callback) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// create path and map variables<NEW_LINE>String localVarPath = "/apis/batch/v1/namespaces/{namespace}/jobs/{name}".replaceAll("\\{... | localVarHeaderParams.put("Content-Type", localVarContentType); |
246,281 | private static void updateCollectionEndAverages(AdaptiveWeightedAverage costAverage, AdaptivePaddedAverage pauseAverage, ReciprocalLeastSquareFit costEstimator, AdaptiveWeightedAverage intervalSeconds, GCCause cause, long mutatorNanos, long pauseNanos, UnsignedWord sizeBytes) {<NEW_LINE>if (shouldUpdateStats(cause)) {<... | .toDouble(sizeBytes), cost); |
1,245,531 | public ITargetSelector configure(Configure request, String... args) {<NEW_LINE>request.checkArgs(args);<NEW_LINE>switch(request) {<NEW_LINE>case SELECT_MEMBER:<NEW_LINE>if (this.matches.isDefault()) {<NEW_LINE>return new DynamicSelectorDesc(this, Quantifier.SINGLE);<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>case SELECT_INSTR... | getObjectType(args[0])); |
201,818 | private Configuration buildConfig(final String name, final ExecutorService threadPool, final ObjectMapper objectMapper, final Validator validator) {<NEW_LINE>final ClientConfig config = new ClientConfig();<NEW_LINE>for (Object singleton : this.singletons) {<NEW_LINE>config.register(singleton);<NEW_LINE>}<NEW_LINE>for (... | register(new DropwizardExecutorProvider(threadPool)); |
869,318 | public boolean solvePositionConstraints(final SolverData data) {<NEW_LINE>final Rot qA = pool.popRot();<NEW_LINE>final Rot qB = pool.popRot();<NEW_LINE>final Vec2 rA = pool.popVec2();<NEW_LINE>final Vec2 rB = pool.popVec2();<NEW_LINE>final Vec2 uA = pool.popVec2();<NEW_LINE>final Vec2 uB = pool.popVec2();<NEW_LINE>fina... | positions[m_indexB].a = aB; |
110,427 | private void writeFrontSizeToCSS(int fontSize) {<NEW_LINE>try {<NEW_LINE>// $NON-NLS-1$<NEW_LINE>String css = "";<NEW_LINE>if (fontSize > 0) {<NEW_LINE>// windows<NEW_LINE>int[] delta = new int[] <MASK><NEW_LINE>if (Platform.OS_MACOSX.equals(Platform.getOS()))<NEW_LINE>// mac<NEW_LINE>delta = new int[] { 3, 10, -1 };<N... | { 3, 10, -1 }; |
903,542 | public void updateDiscoveryAnalysisReport(String userId, DiscoveryAnalysisReport updatedReport) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException {<NEW_LINE>final String methodName = "updateDiscoveryAnalysisReport";<NEW_LINE>final String reportParameterName = "updatedReport";<NEW_LIN... | getElementHeader(), reportHeaderParameterName, methodName); |
1,627,762 | public static List<TumorNormalPair> extractPossibleTumorNormalPairs(final VCFHeader vcfHeader) {<NEW_LINE>Utils.nonNull(vcfHeader);<NEW_LINE>// First attempt the M2 nomenclature<NEW_LINE>if (vcfHeader.getMetaDataLine(Mutect2Engine.TUMOR_SAMPLE_KEY_IN_VCF_HEADER) != null) {<NEW_LINE>final VCFHeaderLine normalMetaDataLin... | > sampleNames = vcfHeader.getSampleNamesInOrder(); |
822,492 | public TableConstructorExpressionNode transform(TableConstructorExpressionNode tableConstructorExpressionNode) {<NEW_LINE>Token tableKeyword = formatToken(tableConstructorExpressionNode.tableKeyword(), 1, 0);<NEW_LINE>KeySpecifierNode keySpecifier = formatNode(tableConstructorExpressionNode.keySpecifier().orElse(null),... | env.trailingWS, env.trailingNL); |
1,564,951 | protected Object decode(Channel channel, SocketAddress remoteAddress, Object msg) throws Exception {<NEW_LINE>Parser parser = new Parser(PATTERN, (String) msg);<NEW_LINE>if (!parser.matches()) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>Position position = new Position(getProtocolName());<NEW_LINE>DeviceSession deviceS... | setDeviceId(deviceSession.getDeviceId()); |
475,032 | public Request<ListEntitiesForPolicyRequest> marshall(ListEntitiesForPolicyRequest listEntitiesForPolicyRequest) {<NEW_LINE>if (listEntitiesForPolicyRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>Request<ListEntitiesForPolicyRequest> request = n... | (listEntitiesForPolicyRequest.getEntityFilter())); |
1,651,869 | public boolean processOutgoingWakeupMessage(SerialMessage serialMessage) {<NEW_LINE>// The message is Ok, if we're awake, send it now...<NEW_LINE>if (isAwake) {<NEW_LINE>// We're sending a frame, so we need to stop the timer if it's running<NEW_LINE>resetSleepTimer();<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>// Make s... | this.wakeUpQueue.add(serialMessage); |
633,692 | public FlowParameters createFromParcel(Parcel in) {<NEW_LINE>String appName = in.readString();<NEW_LINE>List<IdpConfig> providerInfo = in.createTypedArrayList(IdpConfig.CREATOR);<NEW_LINE>IdpConfig defaultProvider = in.readParcelable(IdpConfig.class.getClassLoader());<NEW_LINE>int themeId = in.readInt();<NEW_LINE><MASK... | int logoId = in.readInt(); |
1,516,782 | public static <K> StringBinding stringValueAt(final ObservableMap<K, String> op, final ObservableValue<? extends K> key) {<NEW_LINE>if ((op == null) || (key == null)) {<NEW_LINE>throw new NullPointerException("Operands cannot be null.");<NEW_LINE>}<NEW_LINE>return new StringBinding() {<NEW_LINE><NEW_LINE>{<NEW_LINE>sup... | ).warning("Exception while evaluating binding", ex); |
606,367 | public void testAuthenticateMethodFL_ProtectedServlet1() throws Exception {<NEW_LINE>METHODS = "testMethod=authenticate,logout,login";<NEW_LINE>String url = "http://" + server.getHostname() + ":" + server.getHttpDefaultPort() + "/formlogin/ProgrammaticAPIServlet?" + METHODS + "&user=" + managerUser + "&password=" + man... | , response.indexOf("ENDTEST1")); |
443,958 | public void mapSimpleJavaTypesPredefined(Map definedElementMap) {<NEW_LINE>// System.out.println("Hit mapSimpleJavaTypesPredefined");<NEW_LINE>String namespace = getXSDNamespace() + ":";<NEW_LINE>// These guys are already defined in XML Schema. The java<NEW_LINE>// types have 1-to-1 mappings.<NEW_LINE>String[] types =... | = getSchemaTypeDef(schemaType[i]); |
214,726 | public void onAvailable(Network network) {<NEW_LINE>NetworkInfo networkInfo = connectivityManager.getNetworkInfo(network);<NEW_LINE>LOG.fine(String.format(Locale<MASK><NEW_LINE>if (networkInfo == null || networkInfo.getState() != NetworkInfo.State.CONNECTED) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>broadcastVpnConnectivi... | .ROOT, "Network available: %s", networkInfo)); |
87,297 | @TruffleBoundary<NEW_LINE>public Object inet_ntop(int family, byte[] src) throws PosixException {<NEW_LINE>if (family != AF_INET.value && family != AF_INET6.value) {<NEW_LINE>throw posixException(OSErrorEnum.EAFNOSUPPORT);<NEW_LINE>}<NEW_LINE>int len = family <MASK><NEW_LINE>if (src.length < len) {<NEW_LINE>throw new I... | == AF_INET.value ? 4 : 16; |
288,402 | public void addFeatureDefinition(FeatureDefinition featureDefinition) {<NEW_LINE>for (BuildSpec buildSpec : buildSpecCache.values()) {<NEW_LINE>if (buildSpec.hasFeature(featureDefinition.getId())) {<NEW_LINE>buildSpec.getFeature(featureDefinition.getId()).setDefinition(featureDefinition);<NEW_LINE>}<NEW_LINE>}<NEW_LINE... | featureDefinition.getId(), featureDefinition); |
110,639 | private void flushMenuCacheIfNeeded(final Contentlet contentlet, final Contentlet workingContentlet, final boolean isNewContent, final User systemUser) throws DotDataException, DotSecurityException {<NEW_LINE>// both file & page as content might trigger a menu cache flush<NEW_LINE>if (contentlet.isFileAsset() || conten... | ), folder.getInode()); |
214,936 | public void run(RegressionEnvironment env) {<NEW_LINE>String[] fields = new String[] { "key", "value" };<NEW_LINE>String epl = "@name('create') create window MyWindowFE#firstevent as MySimpleKeyValueMap;\n" + "insert into MyWindowFE select theString as key, longBoxed as value from SupportBean;\n" + "@name('s0') select ... | sendSupportBean(env, "E1", 1L); |
1,503,680 | public void run() {<NEW_LINE>MessageDialogWithToggle md = new MessageDialogWithToggle(UIUtils.getActiveShell(), Messages.Startup_Notification, null, Messages.Startup_StudioRequiresFirefox, MessageDialog.INFORMATION, new String[] { StringUtil.ellipsify(CoreStrings.BROWSE), download ? Messages.Startup_Download : Messages... | 0] = fileDialog.open(); |
1,118,435 | public void handleConnectionException(RegisteredServer server, Throwable throwable, boolean safe) {<NEW_LINE>if (!isActive()) {<NEW_LINE>// If the connection is no longer active, it makes no sense to try and recover it.<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (throwable == null) {<NEW_LINE>throw new NullPointerExceptio... | ().getName())); |
1,384,883 | public okhttp3.Call readPodSecurityPolicyCall(String name, String pretty, final ApiCallback _callback) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// create path and map variables<NEW_LINE>String localVarPath = "/apis/policy/v1beta1/podsecuritypolicies/{name}".replaceAll("\\{" + "name" + "\\... | localVarHeaderParams.put("Accept", localVarAccept); |
784,156 | public <B extends Message.Builder> B copyInto(B builder) {<NEW_LINE>Descriptor descriptor = builder.getDescriptorForType();<NEW_LINE>// Handle standard codes.<NEW_LINE>if (!descriptor.getOptions().hasExtension(Annotations.fhirValuesetUrl)) {<NEW_LINE>if (!AnnotationUtils.getStructureDefinitionUrl(builder.getDescriptorF... | valueField = descriptor.findFieldByName("value"); |
240,883 | @SuppressWarnings("null")<NEW_LINE>public Iterator<? extends Entity> iterator(Event e) {<NEW_LINE>if (isUsingRadius) {<NEW_LINE>assert center != null;<NEW_LINE>Location l = center.getSingle(e);<NEW_LINE>if (l == null)<NEW_LINE>return null;<NEW_LINE>assert radius != null;<NEW_LINE>Number <MASK><NEW_LINE>if (n == null)<N... | n = radius.getSingle(e); |
1,022,749 | public boolean updateConfig(String group, String serviceId, String config) throws Exception {<NEW_LINE>String appId = environment.getProperty(ApolloConstant.APOLLO_PLUGIN_APP_ID);<NEW_LINE>if (StringUtils.isEmpty(appId)) {<NEW_LINE>throw new <MASK><NEW_LINE>}<NEW_LINE>String env = environment.getProperty(ApolloConstant... | DiscoveryException(ApolloConstant.APOLLO_PLUGIN_APP_ID + " can't be null or empty"); |
1,481,512 | protected Object latestResult(final JsonRpcRequestContext request) {<NEW_LINE>final long headBlockNumber = blockchainQueriesSupplier.get().headBlockNumber();<NEW_LINE>Blockchain chain = blockchainQueriesSupplier.get().getBlockchain();<NEW_LINE>BlockHeader headHeader = chain.getBlockHeader(headBlockNumber).orElse(null);... | Hash block = headHeader.getHash(); |
1,408,388 | public static DescribeUserInfoInChannelResponse unmarshall(DescribeUserInfoInChannelResponse describeUserInfoInChannelResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeUserInfoInChannelResponse.setRequestId(_ctx.stringValue("DescribeUserInfoInChannelResponse.RequestId"));<NEW_LINE>describeUserInfoInChannelResponse... | ("DescribeUserInfoInChannelResponse.Property[" + i + "].Join")); |
231,616 | private static void convertBgpProcess(Configuration c, FrrVendorConfiguration vc, FrrConfiguration frr, Warnings w) {<NEW_LINE>BgpProcess bgpProcess = frr.getBgpProcess();<NEW_LINE>if (bgpProcess == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// First pass: only core processes<NEW_LINE>c.getDefaultVrf().setBgpProcess(... | c)).build()); |
1,807,140 | private RemoteVersion tryProcessDistance(final HttpURLConnection connection) throws IOException {<NEW_LINE>try (BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream(), StandardCharsets.UTF_8))) {<NEW_LINE>final JsonObject obj = new Gson().<MASK><NEW_LINE>switch(obj.get("status").ge... | fromJson(reader, JsonObject.class); |
1,634,978 | public final Tuple2<Integer, Double> bestSplitNumerical(int fStart, double mse, double totalSquareSum, double totalSum, double totalWeight) {<NEW_LINE>double bestGain = 0.;<NEW_LINE>int bestSplit = 0;<NEW_LINE>double leftSum = 0.;<NEW_LINE>double leftSquareSum = 0.;<NEW_LINE>double leftWeight = 0.;<NEW_LINE>double righ... | rightSquareSum -= minusHist[binStart + 1]; |
1,608,067 | public void execute(TransformerImpl transformer) throws TransformerException {<NEW_LINE>boolean found = false;<NEW_LINE>for (ElemTemplateElement childElem = getFirstChildElem(); childElem != null; childElem = childElem.getNextSiblingElem()) {<NEW_LINE>int type = childElem.getXSLToken();<NEW_LINE>if (Constants.ELEMNAME_... | int sourceNode = xctxt.getCurrentNode(); |
645,475 | static ProcStat parseWithSplits(String cat) throws ParseException {<NEW_LINE>ProcStat stat = new ProcStat();<NEW_LINE>if (!TextUtils.isEmpty(cat)) {<NEW_LINE>int index = cat.indexOf(")");<NEW_LINE>if (index <= 0)<NEW_LINE><MASK><NEW_LINE>String prefix = cat.substring(0, index);<NEW_LINE>int indexBgn = prefix.indexOf("(... | throw new IllegalStateException(cat + " has not ')'"); |
260,226 | public void open(Configuration parameters) throws Exception {<NEW_LINE>FieldInfo[] fields = dorisSinkInfo.getFields();<NEW_LINE>int fieldsLength = fields.length;<NEW_LINE>String[] fieldNames = new String[fieldsLength];<NEW_LINE>FormatInfo[] formatInfos = new FormatInfo[fieldsLength];<NEW_LINE>for (int i = 0; i < fields... | i] = field.getName(); |
1,483,891 | public void invokePost() {<NEW_LINE>StringEntity stringEntity = new StringEntity(prepareRequest());<NEW_LINE>HttpPost httpPost = new HttpPost("https://reqbin.com/echo/post/json");<NEW_LINE>httpPost.setEntity(stringEntity);<NEW_LINE><MASK><NEW_LINE>httpPost.setHeader("Content-type", "application/json");<NEW_LINE>try (Cl... | httpPost.setHeader("Accept", "application/json"); |
834,586 | private void processTimestampSeeks() {<NEW_LINE>Iterator<TopicPartitionOffset> seekIterator = this.seeks.iterator();<NEW_LINE>Map<TopicPartition, Long> timestampSeeks = null;<NEW_LINE>while (seekIterator.hasNext()) {<NEW_LINE>TopicPartitionOffset tpo = seekIterator.next();<NEW_LINE>if (SeekPosition.TIMESTAMP.equals(tpo... | this.consumer.offsetsForTimes(timestampSeeks); |
1,526,618 | public void run(RegressionEnvironment env) {<NEW_LINE>env.compileDeploy("@name('s0') select rstream s1.intPrimitive as aID, s2.intPrimitive as bID " + "from SupportBean(theString='a')#length(2) as s1, " + "SupportBean(theString='b')#keepall as s2" + " where s1.intPrimitive = s2.intPrimitive").addListener("s0");<NEW_LIN... | 0].get("aID")); |
1,674,342 | public void resolveChainedTargets() {<NEW_LINE>final Map<TypeVariable, InferredValue> inferredTypes = new LinkedHashMap<>(this.size());<NEW_LINE>// TODO: we can probably make this a bit more efficient<NEW_LINE>boolean grew = true;<NEW_LINE>while (grew) {<NEW_LINE>grew = false;<NEW_LINE>for (final Map.Entry<TypeVariable... | final InferredTarget currentTarget = (InferredTarget) value; |
1,435,691 | private void savePreferences() {<NEW_LINE>// log reply changes.<NEW_LINE>if (!mPrefs.reply().get().equals(mReplyPref.getText().toString())) {<NEW_LINE>// Log old value and new value.<NEW_LINE>mAddLogPresenter.addLog(getString(R.string.settings_changed, mReplyPref.getDialogTitle().toString(), mPrefs.reply().get(), mRepl... | set(mEnableReplyFrmServer.isChecked()); |
429,490 | public void onClickShowAvailableFeedbackWidgets(View v) {<NEW_LINE>Countly.sharedInstance().feedback().getAvailableFeedbackWidgets(new RetrieveFeedbackWidgets() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onFinished(List<CountlyFeedbackWidget> retrievedWidgets, String error) {<NEW_LINE>if (error != null) {<NEW_... | Toast.LENGTH_LONG).show(); |
1,011,004 | public void fieldEofResponse(byte[] headerNull, List<byte[]> fieldsNull, List<FieldPacket> fieldPackets, byte[] eofNull, boolean isLeft, @NotNull AbstractService service) {<NEW_LINE>managerSession.setHandlerStart(this);<NEW_LINE>if (terminate.get()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>lock.lock();<NEW_LINE>try {<NEW... | FrontendConnection source = managerSession.getSource(); |
22,214 | public List<PropertyCombinations> collapseProperties() {<NEW_LINE>// Collate property values in this map<NEW_LINE>SortedMap<CollapsedPropertyKey, List<String[]>> map = Maps.newTreeMap();<NEW_LINE>BindingProperty[] propertyKeys = getOrderedProperties();<NEW_LINE>// Loop over all possible property value permutations<NEW_... | ] propertyValues = it.next(); |
486,797 | public Description matchMethodInvocation(MethodInvocationTree tree, VisitorState state) {<NEW_LINE>if (!matcher.matches(tree, state)) {<NEW_LINE>return Description.NO_MATCH;<NEW_LINE>}<NEW_LINE>Description.Builder description = buildDescription(tree);<NEW_LINE>MethodSymbol sym = ASTHelpers.getSymbol(tree);<NEW_LINE>des... | , replacement)).build(); |
294,432 | protected void layoutChildren() {<NEW_LINE>super.layoutChildren();<NEW_LINE>switch(dayView.getHoursLayoutStrategy()) {<NEW_LINE>case FIXED_HOUR_COUNT:<NEW_LINE>double height = getHeight();<NEW_LINE><MASK><NEW_LINE>// height must be at least 1px<NEW_LINE>dayView.setHourHeight(Math.max(1, height / visibleHours));<NEW_LIN... | int visibleHours = dayView.getVisibleHours(); |
1,532,476 | final UpdateTriggerResult executeUpdateTrigger(UpdateTriggerRequest updateTriggerRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateTriggerRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.Clien... | awsRequestMetrics.startEvent(Field.RequestMarshallTime); |
340,365 | private void initThreadCount() {<NEW_LINE>int availableProcessors = Runtime.getRuntime().availableProcessors();<NEW_LINE>Integer[] fileIngestThreadCountChoices;<NEW_LINE>if (availableProcessors >= 16) {<NEW_LINE>fileIngestThreadCountChoices = new Integer[] { 1, 2, 4, 6, 8, 12, 16 };<NEW_LINE>} else if (availableProcess... | setSelectedItem(UserPreferences.numberOfFileIngestThreads()); |
1,046,239 | private void calculateRatios(LiquidConduit conduit) {<NEW_LINE>ConduitTank tank = conduit.getTank();<NEW_LINE>int totalAmount = tank.getFluidAmount();<NEW_LINE>int upCapacity = 0;<NEW_LINE>if (conduit.containsConduitConnection(EnumFacing.UP) || conduit.containsExternalConnection(EnumFacing.UP)) {<NEW_LINE>upCapacity = ... | Math.min(totalAmount, downCapacity); |
547,131 | private static void runAssertionAllCombinations(RegressionEnvironment env, String field, AtomicInteger milestone) {<NEW_LINE>String[] methods = "getMinuteOfHour,getMonthOfYear,getDayOfMonth,getDayOfWeek,getDayOfYear,getEra,gethourOfDay,getmillisOfSecond,getsecondOfMinute,getweekyear,getyear".split(",");<NEW_LINE>String... | Integer.toString(count++)); |
611,679 | public static int deepHashCode(Object[] a) {<NEW_LINE>if (a == null) {<NEW_LINE>return 0;<NEW_LINE>}<NEW_LINE>int hash = 0xA5A537FC;<NEW_LINE>for (int i = 0; i < a.length; ++i) {<NEW_LINE>Object el = a[i];<NEW_LINE>int h;<NEW_LINE>if (a[i] instanceof boolean[]) {<NEW_LINE>h = hashCode((boolean[]) el);<NEW_LINE>} else i... | ((Object[]) el); |
123,870 | private String startContainer(final String image, final Optional<String> dockerVersion) throws InterruptedException, DockerException {<NEW_LINE>// Get container image info<NEW_LINE>final ImageInfo imageInfo = docker.inspectImage(image);<NEW_LINE>if (imageInfo == null) {<NEW_LINE>throw new HeliosRuntimeException("docker... | "created container: {}: {}, {}", config, container, containerConfig); |
571,785 | private void scheduleAlarm(long timeOut) {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())<NEW_LINE>SibTr.entry(this, tc, "scheduleAlarm", "timeOut=" + timeOut + " started=" + started + " expiryAlarm=" + expiryAlarm);<NEW_LINE>// NB PM27294 You cannot decrease the the timeOut if an alarm is al... | .writeLock().lock(); |
1,519,622 | public void run(RegressionEnvironment env) {<NEW_LINE>RegressionPath path = new RegressionPath();<NEW_LINE>env.compileDeploy("@public create expression int js:abc(p1, p2) [p1*p2*10]", path);<NEW_LINE>env.compileDeploy("@public create expression int js:abc(p1) [p1*10]", path);<NEW_LINE>String epl = "@name('s0') select a... | eplSelect, modelSelect.toEPL()); |
663,941 | public void startElement(StylesheetHandler handler, String uri, String localName, String rawName, Attributes attributes) throws org.xml.sax.SAXException {<NEW_LINE>super.startElement(handler, uri, localName, rawName, attributes);<NEW_LINE>try {<NEW_LINE>int stylesheetType = handler.getStylesheetType();<NEW_LINE>Stylesh... | attributes, handler.getStylesheet()); |
288,005 | protected boolean readIntoBuffer(int minLength) {<NEW_LINE>if (bufferSpaceLeft() < minLength) {<NEW_LINE>// current buffer cannot hold the data requested;<NEW_LINE>// need to make it larger<NEW_LINE>increaseBufferSize(minLength + currentlyInBuffer());<NEW_LINE>} else if (buf.length - writePos < minLength) {<NEW_LINE>//... | context, 0, context.length); |
122,545 | public static // raw_text | magic_comment | comment | environment | pseudocode_block | math_environment | COMMAND_IFNEXTCHAR | group | OPEN_PAREN | CLOSE_PAREN | parameter_text | COMMA | EQUALS | OPEN_BRACKET | CLOSE_BRACKET | BACKSLASH | OPEN_ANGLE_BRACKET | CLOSE_ANGLE_BRACKET<NEW_LINE>boolean required_param_content(... | r = consumeToken(b, COMMAND_IFNEXTCHAR); |
512,093 | public Void call(ShiftParams param) {<NEW_LINE>// we make the shifts atomic, as otherwise listeners to<NEW_LINE>// the items / indices lists get a lot of intermediate<NEW_LINE>// noise. They eventually get the summary event fired<NEW_LINE>// from within shiftSelection, so this is ok.<NEW_LINE>startAtomic();<NEW_LINE>fi... | tp = selectedCellsMap.get(i); |
835,371 | /* (non-Javadoc)<NEW_LINE>* @see com.webank.weid.rpc.CredentialPojoService#verify()<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public ResponseData<Boolean> verify(String issuerWeId, String weIdPublicKeyId, CredentialPojo credential) {<NEW_LINE>if (credential == null) {<NEW_LINE>logger.error("[verify] The input credential ... | String issuerId = credential.getIssuer(); |
1,610,545 | public void marshall(AwsAutoScalingAutoScalingGroupDetails awsAutoScalingAutoScalingGroupDetails, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (awsAutoScalingAutoScalingGroupDetails == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>p... | awsAutoScalingAutoScalingGroupDetails.getLoadBalancerNames(), LOADBALANCERNAMES_BINDING); |
1,678,795 | public Change createChange(IProgressMonitor monitor) throws CoreException {<NEW_LINE>try {<NEW_LINE>final TextChange[] changes = fChangeManager.getAllChanges();<NEW_LINE>final List<TextChange> list = new ArrayList<>(changes.length);<NEW_LINE>list.addAll<MASK><NEW_LINE>String project = null;<NEW_LINE>IJavaProject javaPr... | (Arrays.asList(changes)); |
8,986 | @GET<NEW_LINE>public ImmutableList<AutomationSecretResponse> readSecrets(@Auth AutomationClient automationClient, @QueryParam("name") String name) {<NEW_LINE>ImmutableList.Builder<AutomationSecretResponse> responseBuilder = ImmutableList.builder();<NEW_LINE>if (name != null) {<NEW_LINE>Optional<Secret> optionalSecret =... | secretController.getSanitizedSecrets(null, null); |
221,021 | private void copyAsRyde() throws IOException {<NEW_LINE>// TODO(b/217772483): consider guarding this action with a lock and check if there is work.<NEW_LINE>// Not urgent since file writes on GCS are atomic.<NEW_LINE>Optional<Cursor> cursor = transactIfJpaTm(() -> tm().loadByKeyIfPresent(Cursor.createVKey(BRDA, tld)));... | gcsInput = gcsUtils.openInputStream(xmlFilename); |
1,360,865 | final AssociateProactiveEngagementDetailsResult executeAssociateProactiveEngagementDetails(AssociateProactiveEngagementDetailsRequest associateProactiveEngagementDetailsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(associateProactiveEngagementDetailsRequest);<NEW_LINE>AWSRequestMetrics ... | endClientExecution(awsRequestMetrics, request, response); |
1,131,702 | private Optional<Pair<CaptureBindingPatternNode, String>> findCaptureBindingPattern(Node matchedNode, CodeActionContext context) {<NEW_LINE>Optional<Symbol> symbol = context.currentSemanticModel().flatMap(semanticModel -> semanticModel.symbol(matchedNode));<NEW_LINE>if (symbol.isEmpty() || context.currentSyntaxTree().i... | lineRange().filePath()); |
1,129,532 | public ThirdPartyFirewallFirewallPolicy unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ThirdPartyFirewallFirewallPolicy thirdPartyFirewallFirewallPolicy = new ThirdPartyFirewallFirewallPolicy();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = o... | String currentParentElement = context.getCurrentParentElement(); |
687,004 | private static List<Type> findParametersRecursively(Type type, DotName target, Set<DotName> visitedTypes, IndexView index) {<NEW_LINE>DotName name = type.name();<NEW_LINE>// cache results first<NEW_LINE>if (!visitedTypes.add(name)) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>// always end at Object<NEW_LINE>if (DOTNAME... | interfaceType, target, visitedTypes, index); |
1,071,213 | private ResultQuery<Record6<String, String, String, String, String, Integer>> keys(String constraintType) {<NEW_LINE>return create().select(inline(null, VARCHAR).as("catalog"), inline(null, VARCHAR).as("schema"), RDB$RELATION_CONSTRAINTS.RDB$RELATION_NAME.trim().as(RDB$RELATION_CONSTRAINTS.RDB$RELATION_NAME), RDB$RELAT... | RDB$INDEX_SEGMENTS.RDB$FIELD_POSITION.asc()); |
756,477 | protected Key doJwkRemote(String kid, String x5t, String use, boolean useSystemPropertiesForHttpClientConnections, JwkKeyType keyType) throws KeyStoreException {<NEW_LINE>String jsonString = null;<NEW_LINE>locationUsed = jwkEndpointUrl;<NEW_LINE>if (locationUsed == null) {<NEW_LINE>locationUsed = keyLocation;<NEW_LINE>... | x5t, use, jsonString, keyType); |
1,012,611 | @SchedulerSupport(SchedulerSupport.NONE)<NEW_LINE>public static <@NonNull T1, @NonNull T2, @NonNull T3, @NonNull T4, @NonNull R> Maybe<R> zip(@NonNull MaybeSource<? extends T1> source1, @NonNull MaybeSource<? extends T2> source2, @NonNull MaybeSource<? extends T3> source3, @NonNull MaybeSource<? extends T4> source4, @N... | Objects.requireNonNull(source3, "source3 is null"); |
360,347 | public void serialize(final ODocument document, final BytesContainer bytes) {<NEW_LINE>serializeClass(document, bytes);<NEW_LINE>final Collection<Entry<String, ODocumentEntry>> fields = fetchEntries(document);<NEW_LINE>OVarIntSerializer.write(bytes, fields.size());<NEW_LINE>for (Entry<String, ODocumentEntry> entry : fi... | .alloc(1), null); |
261,252 | public static void filterNonClientNodesIfNeeded(Settings settings, Log log) {<NEW_LINE>if (!settings.getNodesClientOnly()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>RestClient bootstrap = new RestClient(settings);<NEW_LINE>try {<NEW_LINE>String message = "Client-only routing specified but no client nodes with HTTP-enabled... | >(clientNodes.size()); |
925,789 | public void cellPaint(GC gc, TableCellSWT cell) {<NEW_LINE>DownloadManager dm = (DownloadManager) cell.getDataSource();<NEW_LINE>List<Color> colors = new ArrayList<>();<NEW_LINE>if (dm != null) {<NEW_LINE>List<Tag> tags = tag_manager.getTagsForTaggable(TagType.TT_DOWNLOAD_MANUAL, dm);<NEW_LINE>for (Tag tag : tags) {<NE... | ] rgb = tag.getColor(); |
994,066 | public void scrollToNode(@Nullable final N node, final boolean centered) {<NEW_LINE>if (node != null) {<NEW_LINE><MASK><NEW_LINE>if (nodeBounds != null) {<NEW_LINE>if (node.getParent() != null) {<NEW_LINE>final int indent = (getUI().getLeftChildIndent() + getUI().getRightChildIndent()) * 2;<NEW_LINE>nodeBounds.x -= ind... | final Rectangle nodeBounds = getNodeBounds(node); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.