idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
643,874 | public IRubyObject op_mul(ThreadContext context, IRubyObject other) {<NEW_LINE>if (other instanceof RubyComplex) {<NEW_LINE>RubyComplex otherComplex = (RubyComplex) other;<NEW_LINE>boolean arzero = f_zero_p(context, real);<NEW_LINE>boolean aizero = f_zero_p(context, image);<NEW_LINE>boolean brzero = f_zero_p(context, o... | (context).op_times, other); |
724,173 | public void run(RegressionEnvironment env) {<NEW_LINE>String epl = "select cast(item?,double) as t0 from SupportBeanDynRoot";<NEW_LINE>EPStatementObjectModel model = new EPStatementObjectModel();<NEW_LINE>model.setSelectClause(SelectClause.create().add(Expressions.cast("item?", "double"), "t0"));<NEW_LINE>model.setFrom... | sendEventBean(new SupportBeanDynRoot(6L)); |
1,183,005 | protected void doCheckShard(ClusterMeta clusterMeta, ShardMeta shardMeta) {<NEW_LINE>Long clusterDbId = clusterMeta.getDbId();<NEW_LINE><MASK><NEW_LINE>List<KeeperMeta> keeperMetas = currentMetaManager.getSurviveKeepers(clusterDbId, shardDbId);<NEW_LINE>if (keeperMetas.isEmpty())<NEW_LINE>return;<NEW_LINE>SequenceComma... | Long shardDbId = shardMeta.getDbId(); |
1,072,042 | RelNode changeTraitsUsingConverters(RelNode rel, RelTraitSet toTraits) {<NEW_LINE>final RelTraitSet fromTraits = rel.getTraitSet();<NEW_LINE>assert fromTraits.size() >= toTraits.size();<NEW_LINE>final boolean allowInfiniteCostConverters = CalciteSystemProperty.ALLOW_INFINITE_COST_CONVERTERS.value();<NEW_LINE>// Traits ... | getTraitSet().getTrait(i); |
1,346,563 | final GetRoutesResult executeGetRoutes(GetRoutesRequest getRoutesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getRoutesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_L... | addHandlerContext(HandlerContextKey.SERVICE_ID, "ApiGatewayV2"); |
1,222,792 | protected void segment(int y0, int y1, Motion currentToWorld, Planar<T> frame, GrayU8 segmented) {<NEW_LINE>final int numBands = background.getNumBands();<NEW_LINE>final float thresholdSq = numBands * threshold * threshold;<NEW_LINE>transform.setModel(currentToWorld);<NEW_LINE>for (int y = y0; y < y1; y++) {<NEW_LINE>i... | .startIndex + y * segmented.stride; |
1,710,174 | public void killProcess(final int processIndex) {<NEW_LINE>if (processGroup[processIndex] == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>Runtime.getRuntime().removeShutdownHook(processKillHooks[processIndex]);<NEW_LINE>} catch (Exception e) {<NEW_LINE>if (processGroup[processIndex] != null) {<NEW_LINE>t... | .getErrorStream().close(); |
1,094,604 | public static URI findRoot(URI file) {<NEW_LINE>if (!file.equals(BaseUtilities.normalizeURI(file))) {<NEW_LINE>throw new // NOI18N<NEW_LINE>IllegalArgumentException(// NOI18N<NEW_LINE>"Parameter file was not " + "normalized. Was " + file + " instead of " + BaseUtilities.normalizeURI(file));<NEW_LINE>}<NEW_LINE>for (Col... | root = cqi.findRoot(f); |
611,344 | protected void readNodeChildren(org.w3c.dom.Node node, java.util.Map namespacePrefixes) {<NEW_LINE>org.w3c.dom.NodeList children = node.getChildNodes();<NEW_LINE>for (int i = 0, size = children.getLength(); i < size; ++i) {<NEW_LINE>org.w3c.dom.Node childNode = children.item(i);<NEW_LINE>String childNodeName = (childNo... | _XjcOptions.readNode(childNode, namespacePrefixes); |
1,644,878 | public Code declare(MethodId<?, ?> method, int flags) {<NEW_LINE>TypeDeclaration <MASK><NEW_LINE>if (typeDeclaration.methods.containsKey(method)) {<NEW_LINE>throw new IllegalStateException("already declared: " + method);<NEW_LINE>}<NEW_LINE>int supportedFlags = Modifier.ABSTRACT | Modifier.NATIVE | Modifier.PUBLIC | Mo... | typeDeclaration = getTypeDeclaration(method.declaringType); |
885,350 | protected Action process() throws Exception {<NEW_LINE>// Only return if EOF has previously been read and thus<NEW_LINE>// a write done with EOF=true<NEW_LINE>if (_eof) {<NEW_LINE>if (LOG.isDebugEnabled())<NEW_LINE>LOG.debug("EOF of {}", this);<NEW_LINE>if (!_closed) {<NEW_LINE>_closed = true;<NEW_LINE>_channel.getByte... | BufferUtil.flipToFlush(_buffer, 0); |
46,041 | private void displayToast(View v, CharSequence message) {<NEW_LINE>int xOffset = 0;<NEW_LINE>int yOffset = 0;<NEW_LINE>Rect gvr = new Rect();<NEW_LINE>// View parent = (View) v.getParent();<NEW_LINE>// int parentHeight = parent.getHeight();<NEW_LINE>if (v.getGlobalVisibleRect(gvr)) {<NEW_LINE>View root = v.getRootView(... | ) / 2) + gvr.left; |
1,458,105 | private void backupCorruptedContent(long recoveredTransactionLogVersion, long recoveredTransactionOffset, Optional<CheckpointInfo> corruptCheckpoint) throws IOException {<NEW_LINE>Path corruptedLogArchive = getArchiveFile(recoveredTransactionLogVersion, recoveredTransactionOffset);<NEW_LINE>try (ZipOutputStream recover... | CheckpointFile checkpointFile = logFiles.getCheckpointFile(); |
1,599,266 | private void formRecommendationsWithoutResourceId(List<Map<String, Object>> recommendationsWithoutResourceId, Map<String, String> check, Map<String, Object> resourceInfo, Map<String, String> resource) {<NEW_LINE>Map<String, Object> recommendationObj = new HashMap<>();<NEW_LINE>try {<NEW_LINE>recommendationObj.putAll(re... | .get(Constants.ACCOUNTID)); |
1,370,468 | private void createNewProfile(Object source, boolean live) {<NEW_LINE>Tab tab = newLoadingTab();<NEW_LINE>ProfileRootController controller = loadViewIntoTab(FXML_PROFILE_ROOT, tab);<NEW_LINE>tab.getContent().setVisible(false);<NEW_LINE>Task<ProfileContext> task = new InitializeProfileTask(appCtx(), source, live);<NEW_L... | ), task.getException()); |
1,593,573 | private void acquireEventTickets(PaymentProxy paymentProxy, String reservationId, PurchaseContext purchaseContext, Event event) {<NEW_LINE>TicketStatus ticketStatus = paymentProxy.isDeskPaymentRequired() ? TicketStatus.TO_BE_PAID : TicketStatus.ACQUIRED;<NEW_LINE>AdditionalServiceItemStatus asStatus = paymentProxy.isDe... | (null, null, general)); |
23,295 | public void testSFLocalEnvEntry_Long_InvalidValue() throws Exception {<NEW_LINE>SFLa ejb1 = fhome1.create();<NEW_LINE>try {<NEW_LINE>// The test case looks for a environment variable named "envLongInvalid".<NEW_LINE>Long tempLong = ejb1.getLongEnvVar("envLongBlankValue");<NEW_LINE>fail("Get environment invalid long obj... | getClass().getName()); |
1,461,745 | protected Solver.SolutionInfo solve(DataSet x) {<NEW_LINE>final int l = x.size();<NEW_LINE>QMatrix Q = new CachedQMatrix(l, cache_size, new R2_Qq(x, C));<NEW_LINE>Q.initialize();<NEW_LINE>double[] QD = Q.get_QD();<NEW_LINE>double[] alpha = new double[l];<NEW_LINE>// all others are 0.<NEW_LINE>alpha[0] = 1;<NEW_LINE>byt... | Arrays.fill(ones, ONE); |
1,288,465 | public boolean offer(E e) {<NEW_LINE>if (null == e) {<NEW_LINE>throw new NullPointerException();<NEW_LINE>}<NEW_LINE>final int chunkMask = this.chunkMask;<NEW_LINE>final int chunkShift = this.chunkShift;<NEW_LINE>final long pIndex = getAndIncrementProducerIndex();<NEW_LINE>final int piChunkOffset = (int) (pIndex & chun... | pChunk = producerChunkForIndex(pChunk, piChunkIndex); |
627,360 | final GetCloudFrontOriginAccessIdentityConfigResult executeGetCloudFrontOriginAccessIdentityConfig(GetCloudFrontOriginAccessIdentityConfigRequest getCloudFrontOriginAccessIdentityConfigRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getCloudFrontOriginAccessIdentityConfigRequest);<NEW_LIN... | addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetCloudFrontOriginAccessIdentityConfig"); |
402,375 | public static void main(final String[] args) {<NEW_LINE>final PluginServices plugins = PluginServices.makeForContextLoader();<NEW_LINE>final OptionsParser parser = new OptionsParser(new PluginFilter(plugins));<NEW_LINE>final ParseResult <MASK><NEW_LINE>if (!pr.isOk()) {<NEW_LINE>parser.printHelp();<NEW_LINE>System.out.... | pr = parser.parse(args); |
269,230 | public String escapeObjectName(String catalogName, String schemaName, String objectName, Class<? extends DatabaseObject> objectType) {<NEW_LINE>if (Index.class.isAssignableFrom(objectType)) {<NEW_LINE>return super.escapeObjectName(objectName, objectType);<NEW_LINE>}<NEW_LINE>boolean includeCatalog <MASK><NEW_LINE>if ((... | = GlobalConfiguration.INCLUDE_CATALOG_IN_SPECIFICATION.getCurrentValue(); |
1,383,640 | private static String canonicalizeHost(String input, int pos, int limit) {<NEW_LINE>// Start by percent decoding the host. The WHATWG spec suggests doing this only after we've<NEW_LINE>// checked for IPv6 square braces. But Chrome does it first, and that's more lenient.<NEW_LINE>String percentDecoded = percentDecode(in... | percentDecoded.length() - 1); |
442,357 | private void findLabels(char[] label, char[][] choices) {<NEW_LINE>if (choices == null || choices.length == 0)<NEW_LINE>return;<NEW_LINE>int length = label.length;<NEW_LINE>for (int i = 0; i < choices.length; i++) {<NEW_LINE>if (length <= choices[i].length && CharOperation.prefixEquals(label, choices[i], false)) {<NEW_... | .setCompletion(choices[i]); |
209,979 | public Tuple call() {<NEW_LINE>if (msg.getBackupStorageUuids() != null && !msg.getBackupStorageUuids().isEmpty()) {<NEW_LINE>String sql = "select sum(bs.totalCapacity), sum(bs.availableCapacity) from BackupStorageVO bs where bs.uuid in (:bsUuids)";<NEW_LINE>TypedQuery<Tuple> q = dbf.getEntityManager().<MASK><NEW_LINE>q... | createQuery(sql, Tuple.class); |
928,886 | private Intent createCustomTabsIntent(ReadableArguments arguments) {<NEW_LINE>CustomTabsIntent.Builder builder = new CustomTabsIntent.Builder();<NEW_LINE>String color = arguments.getString(TOOLBAR_COLOR_KEY);<NEW_LINE>String secondaryColor = arguments.getString(SECONDARY_TOOLBAR_COLOR_KEY);<NEW_LINE>String packageName ... | .getBoolean(ENABLE_BAR_COLLAPSING_KEY, false)); |
1,727,810 | public void testServletSubmitsBeanToManagedExecutor() throws Exception {<NEW_LINE>appScopedBean.setCharacter('c');<NEW_LINE>requestScopedBean.setNumber(2);<NEW_LINE>sessionScopedBean.setText("This is some text");<NEW_LINE>singletonScopedBean.put("Key_TaskBean", "value");<NEW_LINE>Future<String> <MASK><NEW_LINE>try {<NE... | future = executor.submit(taskBean); |
989,876 | private boolean resolveGenericsType(GenericsType genericsType) {<NEW_LINE>if (genericsType.isResolved())<NEW_LINE>return true;<NEW_LINE>currentClass.setUsingGenerics(true);<NEW_LINE><MASK><NEW_LINE>// save name before redirect<NEW_LINE>GenericsTypeName name = new GenericsTypeName(type.getName());<NEW_LINE>ClassNode[] b... | ClassNode type = genericsType.getType(); |
1,791,594 | protected BitSet routeAndBuildPartBitSet(ExecutionContext context, PartPruneStepPruningContext pruningCtx, BitSet allPartBitSet) {<NEW_LINE>ComparisonKind[] cmpKindOutput = new ComparisonKind[1];<NEW_LINE>SearchDatumInfo finalVal = null;<NEW_LINE>try {<NEW_LINE>// Compute the const expr val for part predicate<NEW_LINE>... | matchLevel, partCount, subPartCount, true); |
1,408,636 | public final double injectAEPower(double amt, Actionable mode) {<NEW_LINE>if (mode == Actionable.SIMULATE) {<NEW_LINE>final double fakeBattery = this.internalCurrentPower + amt;<NEW_LINE>if (fakeBattery > this.getInternalMaxPower()) {<NEW_LINE>return fakeBattery - this.getInternalMaxPower();<NEW_LINE>}<NEW_LINE>return ... | .internalCurrentPower - this.getInternalMaxPower(); |
407,342 | public static boolean showNetworkErrorDialog(List<String> failedRequests) {<NEW_LINE>// NOI18N<NEW_LINE><MASK><NEW_LINE>if (failedRequests.isEmpty()) {<NEW_LINE>throw new IllegalArgumentException("Failed requests must be provided.");<NEW_LINE>}<NEW_LINE>DialogDescriptor descriptor = new DialogDescriptor(new NetworkErro... | Parameters.notNull("failedRequests", failedRequests); |
1,682,740 | final UpdateInstanceCustomHealthStatusResult executeUpdateInstanceCustomHealthStatus(UpdateInstanceCustomHealthStatusRequest updateInstanceCustomHealthStatusRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateInstanceCustomHealthStatusRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetri... | HandlerContextKey.SIGNING_REGION, getSigningRegion()); |
1,716,702 | // Application context menu<NEW_LINE>@Override<NEW_LINE>public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) {<NEW_LINE>super.onCreateContextMenu(menu, v, menuInfo);<NEW_LINE>// Check if running<NEW_LINE>boolean running = false;<NEW_LINE>ActivityManager activityManager = (ActivityManager)... | (R.string.menu_app_settings)); |
728,478 | private Mono<Response<HybridComputePrivateLinkScopeInner>> updateTagsWithResponseAsync(String resourceGroupName, String scopeName, TagsResource privateLinkScopeTags, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.<MASK><NEW_LINE>}<NEW_LINE>if (resourceGroupName == null) {<NEW_... | error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); |
566,333 | public Channel openAuxChannel(String auxItemTag, DataAccessOption... options) throws IOException {<NEW_LINE>Path auxPath = getAuxObjectAsPath(auxItemTag);<NEW_LINE>if (isWriteAccessRequested(options)) {<NEW_LINE>if (dvObject instanceof Dataset && !this.canWrite()) {<NEW_LINE>// If this is a dataset-level auxilary file ... | ) + "." + auxItemTag + " for reading"); |
1,737,891 | final DeleteTapePoolResult executeDeleteTapePool(DeleteTapePoolRequest deleteTapePoolRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteTapePoolRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.... | (super.beforeMarshalling(deleteTapePoolRequest)); |
1,207,795 | protected boolean renameFolder(Folder folder, String newName, User user, boolean respectFrontEndPermissions) throws DotDataException, DotSecurityException {<NEW_LINE>// checking if already exists<NEW_LINE>final Identifier ident = APILocator.getIdentifierAPI().loadFromDb(folder.getIdentifier());<NEW_LINE>final String id... | loadObjectResults()).asList(); |
50,676 | public static String encode(byte[] in) {<NEW_LINE>StringBuilder out = s_workBuffer.get();<NEW_LINE>out.setLength(0);<NEW_LINE>int inLength = in.length;<NEW_LINE>int nFullGroups = inLength / 3;<NEW_LINE>int nBytesInPartialGroup = inLength - 3 * nFullGroups;<NEW_LINE>int inIndex = 0;<NEW_LINE>for (int i = 0; i < nFullGro... | = in[inIndex++] & 0xff; |
1,270,918 | public void removeACL(Collection<String> listIPs, int from, int to) {<NEW_LINE>AmazonEC2 client = null;<NEW_LINE>try {<NEW_LINE>client = getEc2Client();<NEW_LINE>List<IpPermission> ipPermissions = new ArrayList<>();<NEW_LINE>ipPermissions.add(new IpPermission().withFromPort(from).withIpProtocol("tcp").withIpRanges(list... | .getACLGroupName(), ipPermissions)); |
1,312,909 | public synchronized void update(LogProviderConfig config) {<NEW_LINE>// Get the configured log location, and derive the ffdc location from it<NEW_LINE>File location = config.getLogDirectory();<NEW_LINE>if (location == null) {<NEW_LINE>location = new File(".");<NEW_LINE>}<NEW_LINE>location = new File(location, FFDCConfi... | Object token = ThreadIdentityManager.runAsServer(); |
1,192,148 | private void removeFromClientPolicies(ClientRemovedEvent event, AuthorizationProvider authorizationProvider) {<NEW_LINE>StoreFactory storeFactory = authorizationProvider.getStoreFactory();<NEW_LINE>ResourceServerStore store = storeFactory.getResourceServerStore();<NEW_LINE>ResourceServer resourceServer = store.findByCl... | getClient().getId()); |
1,653,181 | public DescribeClientVpnRoutesResult unmarshall(StaxUnmarshallerContext context) throws Exception {<NEW_LINE>DescribeClientVpnRoutesResult describeClientVpnRoutesResult = new DescribeClientVpnRoutesResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>i... | ().unmarshall(context)); |
1,774,954 | public static void vertical(Kernel1D_F64 kernel, GrayF64 src, GrayF64 dst) {<NEW_LINE>final double[] dataSrc = src.data;<NEW_LINE>final double[] dataDst = dst.data;<NEW_LINE>final double[] dataKer = kernel.data;<NEW_LINE>final int offset = kernel.getOffset();<NEW_LINE>final int kernelWidth = kernel.getWidth();<NEW_LINE... | dataSrc[i]) * kernelValue); |
1,150,423 | public void validate() throws InvalidPropertyException {<NEW_LINE><MASK><NEW_LINE>boolean good = false;<NEW_LINE>boolean debug = DebugTracer.isDebugActivationSpec();<NEW_LINE>if (debug) {<NEW_LINE>out.println("SecPermAnnInvLoc1.validate(): Current contents of Prop1: " + prop1);<NEW_LINE>out.println("SecPermAnnInvLoc1.v... | PrintStream out = DebugTracer.getPrintStream(); |
1,489,361 | static // visible for testing<NEW_LINE>Properties loadConfigurationFile() {<NEW_LINE>Properties properties = new Properties();<NEW_LINE>// Reading from system property first and from env after<NEW_LINE>String configurationFilePath = System.getProperty(CONFIGURATION_FILE_PROPERTY);<NEW_LINE>if (configurationFilePath == ... | log(SEVERE, "Configuration file '{0}' not found.", configurationFilePath); |
460,549 | protected final boolean processKeyBinding(final KeyStroke ks, final KeyEvent e, final int condition, final boolean pressed) {<NEW_LINE>// Forward all key events on this component to the text field.<NEW_LINE>// We have to do this for the case when we are embedding this editor in a JTable and the JTable is forwarding the... | ks, e, condition, pressed); |
347,121 | static Map<String, Object> createBaseCoSProperties(@NonNull final JavaActionProvider.Context ctx) {<NEW_LINE>final String command = ctx.getCommand();<NEW_LINE>final Project project = ctx.getProject();<NEW_LINE>final UpdateHelper updateHelper = ctx.getUpdateHelper();<NEW_LINE>final PropertyEvaluator evaluator = ctx.getP... | evaluator, execProperties, ProjectProperties.RUN_JVM_ARGS); |
29,578 | protected void doInit() {<NEW_LINE>synchronized (this.initializationMonitor) {<NEW_LINE>if (this.initialized) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Assert.<MASK><NEW_LINE>Assert.isTrue(this.requestDestination != null ^ this.requestDestinationName != null ^ this.requestDestinationExpressionProcessor != null, "Exactly o... | notNull(this.connectionFactory, "connectionFactory must not be null"); |
343,945 | protected JsonObject parseConfig(JdbcOptionsBean config) {<NEW_LINE>JsonObject jsonConfig = new JsonObject();<NEW_LINE>// Vert.x thing<NEW_LINE>nullSafePut(jsonConfig, "provider_class", HikariCPDataSourceProvider.class.getCanonicalName());<NEW_LINE>nullSafePut(jsonConfig, "jdbcUrl", config.getJdbcUrl());<NEW_LINE>nullS... | ), entry.getValue()); |
1,671,676 | private Map<ResourceType, Integer> chooseTypeIds() {<NEW_LINE>Map<ResourceType, Integer> allocatedTypeIds = new EnumMap<>(ResourceType.class);<NEW_LINE>Set<Integer> reservedTypeSlots = ImmutableSet.copyOf(allocatedTypeIds.values());<NEW_LINE>// ATTR always takes up slot #1, even if it isn't present.<NEW_LINE>allocatedT... | put(ResourceType.ATTR, ATTR_TYPE_ID); |
198,025 | public DescribeClusterSnapshotsResult unmarshall(StaxUnmarshallerContext context) throws Exception {<NEW_LINE>DescribeClusterSnapshotsResult describeClusterSnapshotsResult = new DescribeClusterSnapshotsResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LI... | ().unmarshall(context)); |
907,678 | private int extractLineagePublisherBatchSize(Map<String, Object> accessServiceOptions, String accessServiceFullName, AuditLog auditLog) throws OMAGConfigurationErrorException {<NEW_LINE>final String methodName = "extractLineagePublisherBatchSize";<NEW_LINE>if (accessServiceOptions == null) {<NEW_LINE>return defaultPubl... | .INVALID_PUBLISHER_BATCH_SIZE.getMessageDefinition(PUBLISHER_BATCH_SIZE_PROPERTY_NAME)); |
111,945 | public void writeAllCurrentRequestsAsPart() throws IOException {<NEW_LINE>writeHtmlHeader();<NEW_LINE>final List<Counter> counters = collector.getRangeCountersToBeDisplayed(range);<NEW_LINE>final Map<JavaInformations, List<CounterRequestContext>> currentRequests;<NEW_LINE>if (collectorServer == null) {<NEW_LINE><MASK><... | assert javaInformationsList.size() == 1; |
1,249,426 | public static void equalizeLocal(GrayU8 input, int radius, GrayU8 output, int histogramLength, @Nullable GrowArray<DogArray_I32> workspaces) {<NEW_LINE>output.reshape(input.width, input.height);<NEW_LINE>workspaces = BoofMiscOps.checkDeclare(workspaces, DogArray_I32::new);<NEW_LINE>int width = radius * 2 + 1;<NEW_LINE>... | grow(), histogramLength, false); |
983,953 | private boolean resolveContext(CompilationInfo javac, JavadocContext jdctx) throws IOException {<NEW_LINE>jdctx<MASK><NEW_LINE>// find class context: class, method, ...<NEW_LINE>DocTrees trees = javac.getDocTrees();<NEW_LINE>TreePath javadocFor = JavadocCompletionUtils.findJavadoc(javac, this.caretOffset);<NEW_LINE>if ... | .doc = javac.getDocument(); |
1,300,178 | private void createTraitControls(final Composite parent) {<NEW_LINE>final int nColumns = 4;<NEW_LINE>Composite composite = new Composite(parent, SWT.NONE);<NEW_LINE>composite.setData("TypeKind", "trait");<NEW_LINE>GridLayout layout = new GridLayout();<NEW_LINE>layout.numColumns = nColumns;<NEW_LINE>composite.setLayout(... | NewWizardMessages.NewTypeWizardPage_modifiers_default, Flags.AccDefault); |
1,158,604 | private void createLocalDecl(polyglot.ast.LocalDecl localDecl) {<NEW_LINE>// System.out.println("local decl: "+localDecl);<NEW_LINE>String name = localDecl.name();<NEW_LINE>polyglot.types.LocalInstance localInst = localDecl.localInstance();<NEW_LINE>soot.Value lhs = createLocal(localInst);<NEW_LINE>polyglot.ast.Expr ex... | ), expr.position()); |
975,471 | protected void checkFile(@NotNull ErlangFile file, @NotNull ProblemsHolder problemsHolder) {<NEW_LINE>ErlangSdkRelease release = ErlangSdkType.getRelease(file);<NEW_LINE>boolean supportOptionalCallbacks = release == null || !ErlangSdkRelease.V_18_0.isNewerThan(release);<NEW_LINE>for (ErlangBehaviour behaviour : file.ge... | arity = ErlangPsiImplUtil.getCallbackSpecArity(spec); |
1,463,857 | public void addContent(Content content) {<NEW_LINE>invokeLaterIfNeeded(() -> {<NEW_LINE>ContentManager contentManager = getOrCreateToolWindow().getContentManager();<NEW_LINE>final String name = content.getTabName();<NEW_LINE>final String category = StringUtil.trimEnd(StringUtil.split(name, " ").get(0), ':');<NEW_LINE>i... | contentManager.addContent(content, place); |
1,154,346 | public void deleteById(String id) {<NEW_LINE>String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");<NEW_LINE>if (resourceGroupName == null) {<NEW_LINE>throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroup... | Utils.getValueFromIdByName(id, "caches"); |
900,321 | protected IDP.SingleSignOnService instantiateElement(XMLEventReader xmlEventReader, StartElement element) throws ParsingException {<NEW_LINE>final IDP.SingleSignOnService sso = new IDP.SingleSignOnService();<NEW_LINE>sso.setSignRequest(StaxParserUtil.getBooleanAttributeValueRP(element, KeycloakSamlAdapterV1QNames.ATTR_... | (element, KeycloakSamlAdapterV1QNames.ATTR_VALIDATE_RESPONSE_SIGNATURE)); |
1,040,430 | static void parseAndValidateExtensionSchemas(String resolverPath, File inputDir) throws IOException, InvalidExtensionSchemaException {<NEW_LINE>// Parse each extension schema and validate it<NEW_LINE>Iterator<File> iterator = FileUtils.iterateFiles(inputDir, new String[] { PDL }, true);<NEW_LINE>DataSchemaResolver reso... | File inputFile = iterator.next(); |
1,022,143 | protected void findClosestContacts(byte[] node_id, int num_to_return, int depth, DHTRouterNodeImpl current_node, boolean live_only, List res) {<NEW_LINE>List buckets = current_node.getBuckets();<NEW_LINE>if (buckets != null) {<NEW_LINE>// add everything from the buckets - caller will sort and select<NEW_LINE>// the bes... | ))) & 0x01) == 1; |
1,185,986 | public DataSet<DenseVector> train(DataSet<Tuple2<Double, DenseVector>> data, DataSet<DenseVector> initialModel, Params optimizationParams) {<NEW_LINE>final Topology topology = this.topology;<NEW_LINE>final int inputSize = this.inputSize;<NEW_LINE>final int outputSize = this.outputSize;<NEW_LINE>final boolean onehotLabe... | .setRequired().build(); |
1,306,024 | final ListProtectionsResult executeListProtections(ListProtectionsRequest listProtectionsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listProtectionsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(F... | HandlerContextKey.SIGNING_REGION, getSigningRegion()); |
1,143,699 | public MqttContext unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>MqttContext mqttContext = new MqttContext();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentTok... | int originalDepth = context.getCurrentDepth(); |
684,936 | public static DOMNode create(org.openide.nodes.Node node) {<NEW_LINE>String idValue = tryGetID(node);<NEW_LINE>if (idValue != null) {<NEW_LINE>DOMNode dn = new DOMNode(idValue);<NEW_LINE>if (LOG.isLoggable(Level.FINE)) {<NEW_LINE>LOG.fine("new DOMNode(" + idValue + ") created from " + node);<NEW_LINE>}<NEW_LINE>return ... | ().getNodes(true)); |
1,772,300 | public static void main(String[] args) {<NEW_LINE>String test = "<RULE atype=\"TEST_TYPE\">" + "<RULE_ELEMENT feature_name=\"TEST_FEATURE1\">" + "<FEATURE_VALUE>value1</FEATURE_VALUE>" + "<FEATURE_VALUE>value2</FEATURE_VALUE>" + "<FEATURE_VALUE>value3</FEATURE_VALUE>" + "</RULE_ELEMENT>" + "<RULE_ELEMENT feature_name=\... | out.println("Test instance: " + testInstance); |
185,724 | public void run() {<NEW_LINE>// Deletes are implemented per BootDashModel. So sort selection into bins per model.<NEW_LINE>Multimap<BootDashModel, BootDashElement> sortingBins = HashMultimap.create();<NEW_LINE>for (BootDashElement e : getSelectedElements()) {<NEW_LINE><MASK><NEW_LINE>// We are only capable of removing ... | BootDashModel model = e.getBootDashModel(); |
1,691,948 | public void calculate(@NonNull final IPricingContext pricingCtx, @NonNull final IPricingResult result) {<NEW_LINE>if (!applies(pricingCtx, result)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final I_M_PriceList_Version ctxPriceListVersion = getPriceListVersionEffective(pricingCtx);<NEW_LINE>if (ctxPriceListVersion == null)... | .setPriceUomId(getProductPriceUomId(productPrice)); |
669,785 | final ListTagsForResourceResult executeListTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listTagsForResourceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequest... | (super.beforeMarshalling(listTagsForResourceRequest)); |
998,723 | private void configureQueryParameters(Request request) {<NEW_LINE>try {<NEW_LINE>Config queryParameters = params.parseNestedOrGetEmpty("query");<NEW_LINE>for (String name : queryParameters.getKeys()) {<NEW_LINE>request.param(UserSecretTemplate.of(name).format(context.getSecrets()), UserSecretTemplate.of(queryParameters... | (context.getSecrets())); |
1,388,929 | public CompletableFuture<Boolean> connectWithIndication() {<NEW_LINE>return internalConnect().whenCompleteAsync((status, throwable) -> {<NEW_LINE>if (throwable != null) {<NEW_LINE>// TODO: The exception handling from this is not very good. Find a better way.<NEW_LINE>handleConnectionException(status != null ? status.ge... | nil(), ConnectionMessages.ALREADY_CONNECTED); |
471,989 | public Text[][] render(PositionalParamSpec param, IParamLabelRenderer paramLabelRenderer, ColorScheme scheme) {<NEW_LINE>Text label = paramLabelRenderer.renderParameterLabel(param, scheme.ansi(), scheme.parameterStyles);<NEW_LINE>Text requiredParameter = scheme.parameterText(param.arity().min > 0 ? requiredMarker : "")... | ] description = param.description(); |
1,677,708 | public void run() {<NEW_LINE>try {<NEW_LINE>final boolean succeed = "success".equalsIgnoreCase(status);<NEW_LINE>if ("cancelled".equalsIgnoreCase(status)) {<NEW_LINE>System.out.println("Job status is `cancelled` - exiting");<NEW_LINE>System.exit(0);<NEW_LINE>}<NEW_LINE>System.out.println(String<MASK><NEW_LINE>final Git... | .format("The CI build had status %s.", status)); |
1,774,813 | public static void plus(IntIterableRangeSet setr, IntIterableRangeSet set1, int l, int u) {<NEW_LINE>setr.clear();<NEW_LINE>int s1 = set1.SIZE >> 1;<NEW_LINE>if (s1 > 0 && l <= u) {<NEW_LINE>int k = 0;<NEW_LINE>setr.grow(set1.SIZE);<NEW_LINE>int lb = <MASK><NEW_LINE>int ub = set1.ELEMENTS[1] + u;<NEW_LINE>for (; k < s1... | set1.ELEMENTS[0] + l; |
800,051 | private ArrayList<Organizations> queryLdap() throws NamingException {<NEW_LINE>SearchControls constraints = new SearchControls();<NEW_LINE>constraints.setSearchScope(ldapUtils.getSearchScope());<NEW_LINE>String filter = "(&(objectClass=OrganizationalUnit))";<NEW_LINE>if (StringUtils.isNotBlank(this.getSynchronizer().ge... | ), sr.getNameInNamespace()); |
557,044 | public Stream<E> read(QueryParameters<M> queryParameters) {<NEW_LINE>JpaModelCriteriaBuilder mcb = queryParameters.getModelCriteriaBuilder().flashToModelCriteriaBuilder(createJpaModelCriteriaBuilder());<NEW_LINE>CriteriaBuilder cb = em.getCriteriaBuilder();<NEW_LINE>CriteriaQuery<RE> <MASK><NEW_LINE>Root<RE> root = que... | query = cb.createQuery(entityType); |
1,706,097 | public long handle(Emulator<?> emulator) {<NEW_LINE><MASK><NEW_LINE>UnidbgPointer object = context.getPointerArg(1);<NEW_LINE>UnidbgPointer jfieldID = context.getPointerArg(2);<NEW_LINE>ByteBuffer buffer = ByteBuffer.allocate(16);<NEW_LINE>buffer.order(ByteOrder.LITTLE_ENDIAN);<NEW_LINE>buffer.put(emulator.getBackend()... | RegisterContext context = emulator.getContext(); |
1,494,378 | Automaton toLevenshteinAutomata(Automaton automaton) {<NEW_LINE>List<Automaton> subs = new ArrayList<>();<NEW_LINE>FiniteStringsIterator finiteStrings = new FiniteStringsIterator(automaton);<NEW_LINE>for (IntsRef string; (string = finiteStrings.next()) != null; ) {<NEW_LINE>if (string.length <= nonFuzzyPrefix || string... | ints, 0, ints.length); |
976,326 | private double doPing(int size) {<NEW_LINE>// let's get that speed<NEW_LINE>OutputParams op = new OutputParams(null);<NEW_LINE>op.setLog(true);<NEW_LINE>op.setMaxBufferSize(1);<NEW_LINE>SystemUtils sysUtil = BasicSystemUtils.instance;<NEW_LINE>final ProcessWrapperImpl pw = new ProcessWrapperImpl(sysUtil.getPingCommand(... | debug("Could not estimate network speed from time: \"" + timeString + "\""); |
1,622,852 | public static void main(String[] args) {<NEW_LINE>// load logging configuration<NEW_LINE>LogConfig.configureRuntime();<NEW_LINE>Config config = buildConfig();<NEW_LINE>Security security = Security.create(config.get("security"));<NEW_LINE>// this is needed for proper encryption/decryption of cookies<NEW_LINE>Contexts.gl... | , config.get("server")); |
520,422 | public void generateChunkData(@NotNull ChunkBatch batch, int chunkX, int chunkZ) {<NEW_LINE>for (int x = 0; x < Chunk.CHUNK_SIZE_X; x++) {<NEW_LINE>for (int z = 0; z < Chunk.CHUNK_SIZE_Z; z++) {<NEW_LINE>final int height = getHeight(x + chunkX * <MASK><NEW_LINE>for (int y = 0; y < height; y++) {<NEW_LINE>if (y == 0) {<... | 16, z + chunkZ * 16); |
72,579 | public void initShaderProgram() {<NEW_LINE>if (program == 0) {<NEW_LINE>program = GL20.glCreateProgram();<NEW_LINE>int vtxShdr = GL20.glCreateShader(GL20.GL_VERTEX_SHADER);<NEW_LINE>int frgShdr = GL20.glCreateShader(GL20.GL_FRAGMENT_SHADER);<NEW_LINE>GL20.glShaderSource(vtxShdr, "#version 130\n" + "\n" + "uniform vec4 ... | GL20.glGetShaderInfoLog(frgShdr, 1024); |
1,121,405 | final DBInstance executeRestoreDBInstanceToPointInTime(RestoreDBInstanceToPointInTimeRequest restoreDBInstanceToPointInTimeRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(restoreDBInstanceToPointInTimeRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestM... | endClientExecution(awsRequestMetrics, request, response); |
463,162 | private ThinQuery removeDupSelections(ThinQuery old) {<NEW_LINE>Map<AxisLocation, ThinAxis> map = old.getQueryModel().getAxes();<NEW_LINE>for (Map.Entry<AxisLocation, ThinAxis> entry : map.entrySet()) {<NEW_LINE>for (ThinHierarchy h : entry.getValue().getHierarchies()) {<NEW_LINE>Map<String, ThinLevel<MASK><NEW_LINE>fo... | > map2 = h.getLevels(); |
313,975 | final CreateConfigurationSetTrackingOptionsResult executeCreateConfigurationSetTrackingOptions(CreateConfigurationSetTrackingOptionsRequest createConfigurationSetTrackingOptionsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createConfigurationSetTrackingOptionsRequest);<NEW_LINE>AWSReque... | addHandlerContext(HandlerContextKey.SERVICE_ID, "SES"); |
1,637,538 | public static void doPrint(Project proj) {<NEW_LINE>CircuitJList list = new CircuitJList(proj, true);<NEW_LINE>Frame frame = proj.getFrame();<NEW_LINE>if (list.getModel().getSize() == 0) {<NEW_LINE>OptionPane.showMessageDialog(proj.getFrame(), S.get("printEmptyCircuitsMessage"), S.get("printEmptyCircuitsTitle"), Option... | > circuits = list.getSelectedCircuits(); |
450,194 | private void validateEnumMemberMetadata(List<BLangConstant> constants) {<NEW_LINE>Map<String, List<BLangConstant>> duplicateEnumMembersWithMetadata = new HashMap<>();<NEW_LINE>for (BLangConstant constant : constants) {<NEW_LINE>if (!constant.flagSet.contains(Flag.ENUM_MEMBER) || (constant.markdownDocumentationAttachmen... | duplicateMember.pos, DiagnosticWarningCode.INVALID_METADATA_ON_DUPLICATE_ENUM_MEMBER); |
1,590,051 | protected void writeSerializerBody(TreeLogger logger, SourceWriter w) {<NEW_LINE>String qualifiedSourceName = type.getQualifiedSourceName();<NEW_LINE>w.println("public " + JsonValue.class.getName() + " serialize(" + qualifiedSourceName + " value, " + ApplicationConnection.class.getName() + " connection) {");<NEW_LINE>w... | w, "type", "jsonValue", "connection"); |
1,811,427 | public DateTimeParameter unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>DateTimeParameter dateTimeParameter = new DateTimeParameter();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token... | int originalDepth = context.getCurrentDepth(); |
871,620 | public void parse(CLObject json, ConstraintLayoutState state) {<NEW_LINE>try {<NEW_LINE>state.clear();<NEW_LINE>for (CLKey key : json) {<NEW_LINE>String name = key.getName();<NEW_LINE>if (name.equals("Header")) {<NEW_LINE>CLElement value = key.getValue();<NEW_LINE>if (value instanceof CLObject) {<NEW_LINE>parseHeader((... | , name, (CLObject) value); |
98,464 | public static void startRayHead(RayConfig rayConfig) {<NEW_LINE>LOGGER.debug("Starting ray runtime @ {}.", rayConfig.nodeIp);<NEW_LINE>List<String> command = new ArrayList<>();<NEW_LINE>command.add("ray");<NEW_LINE>command.add("start");<NEW_LINE>command.add("--head");<NEW_LINE>command.add("--redis-password");<NEW_LINE>... | matcher = pattern.matcher(output); |
731,723 | final RegisterContainerInstanceResult executeRegisterContainerInstance(RegisterContainerInstanceRequest registerContainerInstanceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(registerContainerInstanceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequest... | awsRequestMetrics.endEvent(Field.RequestMarshallTime); |
710,409 | protected ClientAnchor drawContent(XlsProcesserContext context) {<NEW_LINE>String pngData = context.getData().getString("data");<NEW_LINE>// data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABI4AAAEsCAYAAAClh/jbAAA ...<NEW_LINE>String[] arr = pngData.split("base64,");<NEW_LINE>byte[] bytes = Base64.getDecoder()<MASK><NEW_L... | .decode(arr[1]); |
1,808,997 | public static PrunedTag[] parse(final String value) {<NEW_LINE>return split(value, ",").get(stream -> stream.filter(StringUtil::isNotBlank).map(v -> {<NEW_LINE>final Pattern pattern = Pattern.compile("(\\w+)(\\[[^\\]]+\\])?(\\.[\\w\\-]+)?(#[\\w\\-]+)?");<NEW_LINE>final Matcher matcher = pattern.matcher(v.trim());<NEW_L... | 4).substring(1)); |
23,545 | public Request<GetSessionTokenRequest> marshall(GetSessionTokenRequest getSessionTokenRequest) {<NEW_LINE>if (getSessionTokenRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>Request<GetSessionTokenRequest> request = new DefaultRequest<GetSessionTo... | (getSessionTokenRequest.getSerialNumber())); |
572,494 | public StringBuilder adminDelGroupConsumeCtrlInfo(HttpServletRequest req, StringBuilder sBuffer, ProcessResult result) {<NEW_LINE>// check and get operation info<NEW_LINE>if (!WebParameterUtils.getAUDBaseInfo(req, false, null, sBuffer, result)) {<NEW_LINE>WebParameterUtils.buildFailResult(sBuffer, result.getErrMsg());<... | String>) result.getRetData(); |
1,187,903 | private static Vector apply(CompIntIntVector v1, IntDummyVector v2, Binary op) {<NEW_LINE>IntIntVector[] parts = v1.getPartitions();<NEW_LINE>Storage[] resParts = StorageSwitch.applyComp(v1, v2, op);<NEW_LINE>if (!op.isKeepStorage()) {<NEW_LINE>for (int i = 0; i < parts.length; i++) {<NEW_LINE>if (parts[i].getStorage()... | (int) (gidx / subDim); |
1,207,345 | final AssociateLicenseResult executeAssociateLicense(AssociateLicenseRequest associateLicenseRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(associateLicenseRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEv... | awsRequestMetrics.startEvent(Field.RequestMarshallTime); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.