idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,780,840 | public Request<DescribeSnapshotsRequest> marshall(DescribeSnapshotsRequest describeSnapshotsRequest) {<NEW_LINE>if (describeSnapshotsRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>Request<DescribeSnapshotsRequest> request = new DefaultRequest<De... | request.addParameter("Version", "2015-02-02"); |
194,092 | private static void addReturnNew(MethodSpec.Builder builder, TypeElement type, ExecutableElement instantiator, Object builderVar, ProcessingEnvironment env) {<NEW_LINE>List<? extends TypeMirror> allThrown = instantiator.getThrownTypes();<NEW_LINE>if (!allThrown.isEmpty()) {<NEW_LINE>builder.beginControlFlow("try");<NEW... | instantiator.getSimpleName(), parameters); |
21,243 | public Dumper dumpInner(Dumper d) {<NEW_LINE>boolean multi = args.size() != 1;<NEW_LINE>boolean first = true;<NEW_LINE>// If we need to CAST the lambda to something, we have to do this.<NEW_LINE>if (childCastForced()) {<NEW_LINE>d.separator("(").dump(getInferredJavaType().getJavaTypeInstance()).separator(")");<NEW_LINE... | explicitType = explicitArgTypes.get(i); |
136,182 | private void connectTelnetSocket() {<NEW_LINE>disconnect();<NEW_LINE>int delay = 0;<NEW_LINE>while (socket == null || !socket.isConnected()) {<NEW_LINE>try {<NEW_LINE>Thread.sleep(delay);<NEW_LINE>logger.debug("Connecting to {}", connection.getHost());<NEW_LINE>// Use raw socket instead of TelnetClient here because Tel... | connection.getHost(), e); |
531,811 | public static void convert(GrayU8 input, GrayI16 output) {<NEW_LINE>if (input.isSubimage() || output.isSubimage()) {<NEW_LINE>// CONCURRENT_BELOW BoofConcurrency.loopFor(0, input.height, y -> {<NEW_LINE>for (int y = 0; y < input.height; y++) {<NEW_LINE>int indexSrc = input.getIndex(0, y);<NEW_LINE>int indexDst = output... | .data[i] & 0xFF); |
1,591,959 | public void handler(PowerObject power) {<NEW_LINE>Map<String, Boolean> permissionMap = eruptUserService.getEruptMenuValuesMap();<NEW_LINE>if (power.isAdd()) {<NEW_LINE>power.setAdd(powerOff<MASK><NEW_LINE>}<NEW_LINE>if (power.isDelete()) {<NEW_LINE>power.setDelete(powerOff(EruptFunPermissions.DELETE, permissionMap));<N... | (EruptFunPermissions.ADD, permissionMap)); |
965,034 | List<Inode> createFileInternal(RpcContext rpcContext, LockedInodePath inodePath, CreateFileContext context) throws InvalidPathException, FileAlreadyExistsException, BlockInfoException, IOException, FileDoesNotExistException {<NEW_LINE>if (mWhitelist.inList(inodePath.getUri().toString())) {<NEW_LINE>context.setCacheable... | resolve(inodePath.getUri()); |
88,163 | private void createAttachment(AttachmentInfo newAttachment) {<NEW_LINE>AttachmentPanel attachment = new AttachmentPanel(nbCallback);<NEW_LINE>attachment.setBackground(UIUtils.getSectionPanelBackground());<NEW_LINE>horizontalGroup.addComponent(attachment, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout... | attachment.addPropertyChangeListener(getDeletedListener()); |
939,514 | public void wait(String key, Runnable runnable) {<NEW_LINE>Thread t = new Thread(runnable);<NEW_LINE>t.start();<NEW_LINE>try {<NEW_LINE>t.join(500);<NEW_LINE>} catch (InterruptedException e) {<NEW_LINE>}<NEW_LINE>if (t.isAlive()) {<NEW_LINE>JDialog dialog = new JDialog();<NEW_LINE>dialog.setUndecorated(true);<NEW_LINE>... | setLocationRelativeTo(myApplicationWindow.getFrame()); |
1,229,943 | private void drawAFC(Graphics2D graphics, double frequencyAxis, double errorAxis, double bandwidth, int correction, long frequency) {<NEW_LINE>double height = getSize().getHeight() - mSpectrumInset;<NEW_LINE>double verticalAxisTop = height * 0.88d;<NEW_LINE>double verticalAxisBottom = height * 0.98d;<NEW_LINE>double ha... | getFontMetrics(this.getFont()); |
435,616 | DoubleArray computedBucketedCs01(ResolvedCdsTrade trade, List<ResolvedCdsTrade> bucketCds, CreditRatesProvider ratesProvider, ReferenceData refData) {<NEW_LINE>checkCdsBucket(trade, bucketCds);<NEW_LINE>ResolvedCds product = trade.getProduct();<NEW_LINE>Currency currency = product.getCurrency();<NEW_LINE>StandardId leg... | vS = luRes.solve(vLambda); |
1,360,694 | public static ListAllNodeResponse unmarshall(ListAllNodeResponse listAllNodeResponse, UnmarshallerContext _ctx) {<NEW_LINE>listAllNodeResponse.setRequestId(_ctx.stringValue("ListAllNodeResponse.RequestId"));<NEW_LINE>List<ResultItem> result = new ArrayList<ResultItem>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("L... | ("ListAllNodeResponse.Result[" + i + "].loadOneM")); |
187,217 | final CreateAddonResult executeCreateAddon(CreateAddonRequest createAddonRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createAddonRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<CreateAddonRequest> reques... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
452,137 | private IClass compileGet2(SuperclassMethodInvocation scmi) throws CompileException {<NEW_LINE>final IClass.IMethod iMethod = this.findIMethod(scmi);<NEW_LINE>Scope s;<NEW_LINE>for (s = scmi.getEnclosingScope(); s instanceof Statement || s instanceof CatchClause; s = s.getEnclosingScope()) ;<NEW_LINE>FunctionDeclarator... | iMethod.getDescriptor(), false); |
1,773,338 | final DescribeListenersResult executeDescribeListeners(DescribeListenersRequest describeListenersRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeListenersRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.st... | addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); |
876,188 | public NDArray ones(Shape shape, DataType dataType) {<NEW_LINE>int size = <MASK><NEW_LINE>ByteBuffer bb = allocateDirect(size * dataType.getNumOfBytes());<NEW_LINE>for (int i = 0; i < size; ++i) {<NEW_LINE>switch(dataType) {<NEW_LINE>case BOOLEAN:<NEW_LINE>case INT8:<NEW_LINE>case UINT8:<NEW_LINE>bb.put((byte) 1);<NEW_... | (int) shape.size(); |
1,147,320 | private void createExtraViewControls() {<NEW_LINE>if (logViewer != null) {<NEW_LINE>logViewer.dispose();<NEW_LINE>logViewer = null;<NEW_LINE>}<NEW_LINE>if (variablesViewer != null) {<NEW_LINE>variablesViewer.dispose();<NEW_LINE>variablesViewer = null;<NEW_LINE>}<NEW_LINE>if (outputViewer != null) {<NEW_LINE>outputViewe... | .getChildren()[0]); |
112,015 | final GetPolicyResult executeGetPolicy(GetPolicyRequest getPolicyRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getPolicyRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_L... | awsRequestMetrics.startEvent(Field.RequestMarshallTime); |
607,320 | public void reload() {<NEW_LINE>long start = System.currentTimeMillis();<NEW_LINE>File currentProjectPluginsDir;<NEW_LINE>File currentGlobalPluginsDir;<NEW_LINE>List<GrailsPlugin> currentLocalPlugins;<NEW_LINE>synchronized (this) {<NEW_LINE>File newProjectRoot = FileUtil.toFile(project.getProjectDirectory());<NEW_LINE>... | prepared = new HashMap<>(); |
1,636,664 | /*<NEW_LINE>* (non-Javadoc)<NEW_LINE>*<NEW_LINE>* @see<NEW_LINE>* com.sitewhere.grpc.service.DeviceManagementGrpc.DeviceManagementImplBase#<NEW_LINE>* addDeviceGroupElements(com.sitewhere.grpc.service.<NEW_LINE>* GAddDeviceGroupElementsRequest, io.grpc.stub.StreamObserver)<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public... | Builder response = GAddDeviceGroupElementsResponse.newBuilder(); |
279,569 | public Point2d realWorldSizeFromScreen(Point2d pt0, Point2d pt1) {<NEW_LINE>Point2d size = new Point2d(-1.0, -1.0);<NEW_LINE>if (!running || view == null || renderWrapper == null || renderWrapper.maplyRender == null || renderControl.frameSize == null)<NEW_LINE>return size;<NEW_LINE>final int[] frameSizeInt = getFrameBu... | ], transform, frameSize, true); |
1,369,399 | public static void showYesNoPrompt(Context _context, String title, String message, OnClickListener onYesListener, OnClickListener onNoListener) {<NEW_LINE>try {<NEW_LINE>if (alertDialog != null && alertDialog.isShowing() && !isContextActivityThatIsFinishing(_context)) {<NEW_LINE>alertDialog.dismiss();<NEW_LINE>}<NEW_LI... | .string.yes), onYesListener); |
169,997 | private void search() {<NEW_LINE>try {<NEW_LINE>String search = etSearch.getText().toString();<NEW_LINE>final List<Address> listAddress = new Geocoder(ActivitySettings.this).getFromLocationName(search, 1);<NEW_LINE>if (listAddress.size() > 0) {<NEW_LINE>Address address = listAddress.get(0);<NEW_LINE>// Get coordinates<... | (address.getLongitude())); |
1,656,694 | public SubjectAreaOMASAPIResponse<Project> updateProject(String serverName, String userId, String guid, Project suppliedProject, boolean isReplace) {<NEW_LINE>final String methodName = "updateProject";<NEW_LINE>if (log.isDebugEnabled()) {<NEW_LINE>log.debug("==> Method: " + methodName + ",userId=" + userId + ",guid=" +... | response = new SubjectAreaOMASAPIResponse<>(); |
1,149,256 | private static // ----------------<NEW_LINE>void makeUsericonPopupText(CachedImage<Usericon> usericonImage, String moreInfo, MyPopup p) {<NEW_LINE>Usericon usericon = usericonImage.getObject();<NEW_LINE>String info;<NEW_LINE>if (!usericon.metaTitle.isEmpty()) {<NEW_LINE>info = POPUP_HTML_PREFIX + "Badge: " + usericon.m... | = POPUP_HTML_PREFIX + usericon.type.label; |
388,399 | public synchronized void addSSLPropertiesFromTrustStore(WSKeyStore wsts, SSLConfig sslprops) {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())<NEW_LINE>Tr.entry(tc, "addSSLPropertiesFromTrustStore");<NEW_LINE>for (Enumeration<?> e = wsts.propertyNames(); e.hasMoreElements(); ) {<NEW_LINE>Strin... | (String) e.nextElement(); |
542,475 | private void handleSetData(Event event) {<NEW_LINE>TableItem item = (TableItem) event.item;<NEW_LINE>int index = fProposalTable.indexOf(item);<NEW_LINE>boolean outputRelevance = IdeLog.isInfoEnabled(UIEplPlugin.getDefault(), IUiEplScopes.RELEVANCE);<NEW_LINE>if (0 <= index && index < fFilteredProposals.length) {<NEW_LI... | ] images = proposal.getUserAgentImages(); |
678,780 | public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {<NEW_LINE>View rootView = inflater.inflate(R.layout.fragment_folder_browser, container, false);<NEW_LINE>unbinder = ButterKnife.bind(this, rootView);<NEW_LINE>if (displayedInTabs) {<NEW_LINE>breadcrumbsView = new Breadcru... | getNavigationController().popViewController()); |
1,277,958 | final DescribeTemplateAliasResult executeDescribeTemplateAlias(DescribeTemplateAliasRequest describeTemplateAliasRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeTemplateAliasRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<... | AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
1,048,049 | public PlanInfo findMinCostPlan(RelOptCluster cluster, RelOptSchema relOptSchema, Collection<PlanInfo> planInfos, BaselineInfo baselineInfo, ExecutionContext executionContext, Collection<Integer> toBeRemovedPlan) {<NEW_LINE>if (planInfos.size() == 0) {<NEW_LINE>return null;<NEW_LINE>} else if (planInfos.size() == 1) {<... | relOptSchema, executionContext.getParams()); |
990,293 | /*<NEW_LINE>* Retrieve the governance services for the platform<NEW_LINE>* @param userId userId under which the request is performed<NEW_LINE>* @param platformName The name of the platform to interrogate<NEW_LINE>* @param methodName The name of the method being invoked<NEW_LINE>* @return the list of services<NEW_LINE>... | this.getPlatformServicesClient(platformName, platformRootURL); |
1,630,875 | private void statInit() {<NEW_LINE>fieldValue.setWidth("100%");<NEW_LINE>fieldName.setWidth("100%");<NEW_LINE>labelValue.setValue(Msg.getMsg(Env<MASK><NEW_LINE>fieldValue.addEventListener(Events.ON_CHANGE, this);<NEW_LINE>fieldValue.setAttribute("zk_component_ID", "Lookup_Criteria_fieldValue");<NEW_LINE>labelName.setVa... | .getCtx(), "Value")); |
155,240 | final ListStreamSessionsResult executeListStreamSessions(ListStreamSessionsRequest listStreamSessionsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listStreamSessionsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetri... | addHandlerContext(HandlerContextKey.SERVICE_ID, "ivs"); |
1,737,528 | public void marshall(EntitySummary entitySummary, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (entitySummary == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(entitySummary.getArn(), ARN_BINDING);<NEW_LIN... | entitySummary.getStatus(), STATUS_BINDING); |
1,402,249 | protected View createContentView() {<NEW_LINE>LinearLayout rootLayout = new LinearLayout(activity);<NEW_LINE>rootLayout.setLayoutParams(new LinearLayout.LayoutParams(MATCH_PARENT, MATCH_PARENT));<NEW_LINE><MASK><NEW_LINE>rootLayout.setGravity(Gravity.CENTER);<NEW_LINE>rootLayout.setPadding(0, 0, 0, 0);<NEW_LINE>headerV... | rootLayout.setOrientation(LinearLayout.VERTICAL); |
129,072 | private void process(GrayU8 disparity, ColorImage color, PointCloudWriter output) {<NEW_LINE>final int x0 = Math.max(roi.x0, 0);<NEW_LINE>final int y0 = Math.max(roi.y0, 0);<NEW_LINE>final int x1 = Math.min(roi.x1, disparity.width);<NEW_LINE>final int y1 = Math.min(roi.y1, disparity.height);<NEW_LINE>for (int pixelY = ... | * (pixelX - centerX) / focalLengthX; |
277,222 | private static ImageData rotateOptimized(ImageData srcData) {<NEW_LINE>int bytesPerPixel = Math.max(1, srcData.depth / 8);<NEW_LINE>int destBytesPerLine = ((srcData.height * bytesPerPixel - 1) / srcData.scanlinePad + 1) * srcData.scanlinePad;<NEW_LINE>byte[] newData = new byte[destBytesPerLine * srcData.width];<NEW_LIN... | destBytesPerLine) + (destX * bytesPerPixel); |
1,194,989 | public Iterator<LookupElement> iterator() {<NEW_LINE>final Set<LookupElement> processed = newIdentityTroveSet(mySrcSet.size());<NEW_LINE>final Set<Collection<LookupElement>> arraysProcessed = newIdentityTroveSet();<NEW_LINE>final Iterable<LookupElement> next = myNext.classify(mySource, myContext);<NEW_LINE>Iterator<Loo... | singleton = Collections.singletonList(element); |
673,453 | public void addRemovalTimeById(String processInstanceId, Date removalTime) {<NEW_LINE>CommandContext commandContext = Context.getCommandContext();<NEW_LINE>commandContext.getHistoricActivityInstanceManager().addRemovalTimeToActivityInstancesByProcessInstanceId(processInstanceId, removalTime);<NEW_LINE>commandContext.ge... | ).addRemovalTimeToIdentityLinkLogByProcessInstanceId(processInstanceId, removalTime); |
719,345 | final UpdateThingGroupResult executeUpdateThingGroup(UpdateThingGroupRequest updateThingGroupRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateThingGroupRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<UpdateThingGroupRequest> ... | AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
1,845,413 | public void resumeTrigger(Connection conn, TriggerKey key) throws JobPersistenceException {<NEW_LINE>try {<NEW_LINE>TriggerStatus status = getDelegate().selectTriggerStatus(conn, key);<NEW_LINE>if (status == null || status.getNextFireTime() == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>boolean blocked = false;<NEW_LI... | conn, key, newState, STATE_PAUSED_BLOCKED); |
457,528 | final RemoveRegionResult executeRemoveRegion(RemoveRegionRequest removeRegionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(removeRegionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExec... | awsRequestMetrics.endEvent(Field.RequestMarshallTime); |
1,052,012 | public void downloadHasFinished() {<NEW_LINE>visibleBanner.updateBannerInProgress();<NEW_LINE>if (downloadItem != null && downloadItem != getMyApplication().getRegions().getWorldRegion() && !WorldRegion.WORLD_BASEMAP.equals(downloadItem.getRegionDownloadNameLC())) {<NEW_LINE>if (!Algorithms.isEmpty(downloadTargetFileNa... | File f = new File(downloadTargetFileName); |
137,983 | public UpdateConnectivityResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>UpdateConnectivityResult updateConnectivityResult = new UpdateConnectivityResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NE... | JsonToken token = context.getCurrentToken(); |
108,545 | private void commitModel(final ModuleModelImpl moduleModel, final Runnable runnable) {<NEW_LINE>myModuleModel.myModulesCache = null;<NEW_LINE>myModificationCount++;<NEW_LINE>ApplicationManager.getApplication().assertWriteAccessAllowed();<NEW_LINE>final Collection<Module> oldModules = myModuleModel.myModules;<NEW_LINE>f... | DISPOSED_MODULE_NAME, neverAddedModule.getName()); |
473,446 | final DisassociateTeamMemberResult executeDisassociateTeamMember(DisassociateTeamMemberRequest disassociateTeamMemberRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(disassociateTeamMemberRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_... | addHandlerContext(HandlerContextKey.SERVICE_ID, "CodeStar"); |
817,295 | private void updateWidget() {<NEW_LINE>if (!mAuthorizer.isAuthorized()) {<NEW_LINE>mBackupView.setMessage(mContext.getString(R.string.bookmarks_message_unauthorized_user));<NEW_LINE>mBackupView.setBackupButtonLabel(mContext.getString(R.string.authorization_button_sign_in));<NEW_LINE>if (mAuthorizer.isAuthorizationInPro... | (R.string.bookmarks_message_authorized_user)); |
1,769,924 | private void updateInstanceLiveness(List<LiveInstance> liveInstances) {<NEW_LINE>synchronized (notificationLock) {<NEW_LINE>Set<String> liveInstancesSet = new HashSet<>();<NEW_LINE>for (LiveInstance liveInstance : liveInstances) {<NEW_LINE>liveInstancesSet.add(liveInstance.getInstanceName());<NEW_LINE>}<NEW_LINE>for (S... | ).setState(HardwareState.UNAVAILABLE); |
1,389,396 | final ListChannelFlowsResult executeListChannelFlows(ListChannelFlowsRequest listChannelFlowsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listChannelFlowsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEv... | awsRequestMetrics.endEvent(Field.RequestMarshallTime); |
1,291,276 | public void run() {<NEW_LINE>// Configure the server.<NEW_LINE>EventLoopGroup bossGroup = new NioEventLoopGroup();<NEW_LINE>EventLoopGroup workerGroup = new NioEventLoopGroup();<NEW_LINE>try {<NEW_LINE>serverBootstrap = new ServerBootstrap();<NEW_LINE>serverBootstrap.option(ChannelOption.SO_BACKLOG, Config.http_backlog... | .closeFuture().sync(); |
1,061,248 | public void execute(String group, IConnection conn, boolean participated) {<NEW_LINE>// XA transaction must be 'PREPARED' state here.<NEW_LINE>String xid = getXid(group, conn, shareReadView);<NEW_LINE>try (Statement stmt = conn.createStatement()) {<NEW_LINE>try {<NEW_LINE>stmt.execute("XA COMMIT " + xid);<NEW_LINE>} ca... | warn("XA COMMIT failed: " + xid, e); |
1,720,460 | static void pick_intra4x4mby_modes(Macroblock mb, QualityMetrics best) {<NEW_LINE>final MacroblockD xd = mb.e_mbd;<NEW_LINE>int i;<NEW_LINE>int cost = mb.mbmode_cost.get(xd.frame_type).get(MBPredictionMode.B_PRED);<NEW_LINE>long distortion = 0;<NEW_LINE>EnumMap<BPredictionMode, Integer> bmode_costs;<NEW_LINE>ReconIntra... | mb.rddiv, cost, distortion); |
232,004 | public void initComponents() {<NEW_LINE>jPanel = new JPanel();<NEW_LINE>jScrollPane1 = new JScrollPane(jPanel);<NEW_LINE>jScrollPane1.getViewport().setBackground(new Color(0, 0, 0, 0));<NEW_LINE>hand = new mage.client.cards.Cards(true, jScrollPane1);<NEW_LINE>hand.setCardDimension(GUISizeHelper.handCardDimension);<NEW_... | , 0, 0, 0)); |
1,780,560 | public void updateState(WindowsState state, List<TridentTuple> tuples, TridentCollector collector) {<NEW_LINE>Long currentTxId = state.getCurrentTxId();<NEW_LINE>LOG.debug("Removing triggers using WindowStateUpdater, txnId: [{}] ", currentTxId);<NEW_LINE>for (TridentTuple tuple : tuples) {<NEW_LINE>try {<NEW_LINE>Objec... | class, fieldValue.getClass()); |
1,275,415 | private void deleteContentData(final List<String> inodeList) throws DotDataException {<NEW_LINE>final int splitAt = 100;<NEW_LINE>// Split all records into lists of size 'truncateAt'<NEW_LINE>final List<List<String>> inodesToDelete = Lists.partition(inodeList, splitAt);<NEW_LINE>final List<String> queries = Lists.newAr... | createParametersPlaceholder(inodes.size()); |
163,105 | private byte[] encryptSessionInfo(ECDHPublicBCPGKey ecPubKey, byte[] sessionInfo, byte[] secret, byte[] userKeyingMaterial, byte[] ephPubEncoding) throws IOException, PGPException {<NEW_LINE>RFC6637KDFCalculator rfc6637KDFCalculator = new RFC6637KDFCalculator(new BcPGPDigestCalculatorProvider().get(ecPubKey.getHashAlgo... | .createKey(secret, userKeyingMaterial)); |
818,537 | public boolean saveSettings(Element element) {<NEW_LINE>if (!isSettingsEnabled()) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>boolean settingsChanged = false;<NEW_LINE>if (isUsePresentations()) {<NEW_LINE>boolean textSelection = component.isTextSelectionEnabled();<NEW_LINE>String settingsTextSelection = element.attrib... | (MetaPropertyPath) component.getSortContainerPropertyId(); |
710,969 | private void writeVarint64EightBytes(long value) {<NEW_LINE>UnsafeUtil.putByte(buffer, pos--, (byte) (value >>> 49));<NEW_LINE>UnsafeUtil.putByte(buffer, pos--, (byte) (((value >>> 42) & 0x7F) | 0x80));<NEW_LINE>UnsafeUtil.putByte(buffer, pos--, (byte) (((value >>> 35) & 0x7F) | 0x80));<NEW_LINE>UnsafeUtil.putByte(buff... | value & 0x7F) | 0x80)); |
363,840 | public Request<CopyClusterSnapshotRequest> marshall(CopyClusterSnapshotRequest copyClusterSnapshotRequest) {<NEW_LINE>if (copyClusterSnapshotRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>Request<CopyClusterSnapshotRequest> request = new Default... | (copyClusterSnapshotRequest.getSourceSnapshotClusterIdentifier())); |
1,337,894 | ActionResult<Wo> execute(EffectivePerson effectivePerson, String id, JsonElement jsonElement) throws Exception {<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {<NEW_LINE>ActionResult<Wo> result = new ActionResult<>();<NEW_LINE>Wi wi = this.convertToWrapIn(jsonElement, Wi.... | check(reveal, CheckPersistType.all); |
920,701 | public Result delete(UUID customerUUID) {<NEW_LINE>Customer customer = Customer.getOrBadRequest(customerUUID);<NEW_LINE>// TODO(API): Let's get rid of raw Json.<NEW_LINE>// Create DeleteBackupReq in form package and bind to that<NEW_LINE>ObjectNode formData = (ObjectNode) request().body().asJson();<NEW_LINE>List<YBPTas... | LOG.info("Can not delete {} backup as it is still in progress", uuid); |
560,181 | public RelNode enforce(final RelNode input, final RelTraitSet required) {<NEW_LINE>if (input.getConvention() == Convention.NONE) {<NEW_LINE>// left Convert Rule to deal with<NEW_LINE>return null;<NEW_LINE>} else if (input.getConvention() == DrdsConvention.INSTANCE) {<NEW_LINE>// only deal with collation<NEW_LINE>RelCol... | required.getTrait(RelCollationTraitDef.INSTANCE); |
1,648,675 | public void generate(IndentWriter writer) {<NEW_LINE>writer.println("StartStopRules Manager");<NEW_LINE>try {<NEW_LINE>writer.indent();<NEW_LINE>writer.println("Started " + TimeFormatter.format100ths(SystemTime.getMonotonousTime() - monoStartedOn) + " ago");<NEW_LINE>writer.println("debugging = " + bDebugLog);<NEW_LINE... | - 1))) + "ms"); |
1,389,645 | final ListPricingRulesResult executeListPricingRules(ListPricingRulesRequest listPricingRulesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listPricingRulesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEv... | HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); |
1,335,970 | public PropertyValueHistory unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>PropertyValueHistory propertyValueHistory = new PropertyValueHistory();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = con... | String currentParentElement = context.getCurrentParentElement(); |
1,733,901 | public RestChannelConsumer prepareRequest(final RestRequest request, final NodeClient client) throws IOException {<NEW_LINE>final ClusterUpdateSettingsRequest clusterUpdateSettingsRequest = Requests.clusterUpdateSettingsRequest();<NEW_LINE>clusterUpdateSettingsRequest.timeout(request.paramAsTime("timeout", clusterUpdat... | new RestToXContentListener<>(channel)); |
1,850,668 | protected void processElement(IJavaElement element) throws JavaModelException {<NEW_LINE>ICompilationUnit cu = (ICompilationUnit) element;<NEW_LINE>// keep track of the import statements - if all are removed, delete<NEW_LINE>// the import container (and report it in the delta)<NEW_LINE>int numberOfImports = cu.getImpor... | JavaElementDelta delta = new JavaElementDelta(cu); |
1,091,295 | protected void drawDotIfNecessary(Canvas canvas) {<NEW_LINE>if (!mForceHideDot && (hasDot() || mDotParams.scale > 0)) {<NEW_LINE>getIconBounds(mDotParams.iconBounds);<NEW_LINE>Utilities.scaleRectAboutCenter(mDotParams.iconBounds, IconShape.getNormalizationScale());<NEW_LINE>final int scrollX = getScrollX();<NEW_LINE>fi... | .color = prefs.getNotificationBackground(); |
824,824 | private static void printHelpExit(CmdLineParser parser) {<NEW_LINE>parser.getProperties().withUsageWidth(120);<NEW_LINE>parser.printUsage(System.out);<NEW_LINE>System.out.println();<NEW_LINE><MASK><NEW_LINE>for (PaperSize p : PaperSize.values()) {<NEW_LINE>System.out.printf(" %12s %5.0f %5.0f %s\n", p.getName(), p.wi... | System.out.println("Document Types"); |
1,364,450 | protected TransactionAttribute computeTransactionAttribute(Method method, @Nullable Class<?> targetClass) {<NEW_LINE>// Don't allow no-public methods as required.<NEW_LINE>if (allowPublicMethodsOnly() && !Modifier.isPublic(method.getModifiers())) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>// Ignore CGLIB subclasses - ... | findTransactionAttribute(method.getDeclaringClass()); |
20,851 | public void visitClass(final ClassNode node) {<NEW_LINE>this.classNode = node;<NEW_LINE>if (node.isRecord()) {<NEW_LINE>detectInvalidRecordComponentNames(node);<NEW_LINE>if (node.isAbstract()) {<NEW_LINE>throw new RuntimeParserException("Record '" + classNode.getNameWithoutPackage() + "' must not be abstract", classNod... | classInternalName = BytecodeHelper.getClassInternalName(node); |
1,482,831 | public Xavc4kIntraVbrProfileSettings unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>Xavc4kIntraVbrProfileSettings xavc4kIntraVbrProfileSettings = new Xavc4kIntraVbrProfileSettings();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurren... | class).unmarshall(context)); |
1,522,872 | private TypeDefPatch updateMetadataServerClassification() {<NEW_LINE>final String typeName = "MetadataServer";<NEW_LINE>TypeDefPatch typeDefPatch = archiveBuilder.getPatchForType(typeName);<NEW_LINE>typeDefPatch.setUpdatedBy(originatorName);<NEW_LINE>typeDefPatch.setUpdateTime(creationDate);<NEW_LINE>List<TypeDefAttrib... | getStringTypeDefAttribute(attribute1Name, attribute1Description, attribute1DescriptionGUID); |
1,550,963 | private static User parsePlayer(Element element) {<NEW_LINE>Element userBlock = element.select("a.url").first();<NEW_LINE>String avatarUrl = userBlock.select("img.photo").first().attr("src");<NEW_LINE>if (avatarUrl.contains("/mini/")) {<NEW_LINE>avatarUrl = avatarUrl.replace("/mini/", "/normal/");<NEW_LINE>}<NEW_LINE>M... | null : slashUsername.substring(1); |
1,421,025 | private BUnionType createNextReturnType(Location pos, BStreamType streamType, AnalyzerData data) {<NEW_LINE>BRecordType recordType = new BRecordType(null, Flags.ANONYMOUS);<NEW_LINE>recordType.restFieldType = symTable.noType;<NEW_LINE>recordType.sealed = true;<NEW_LINE>Name fieldName = Names.VALUE;<NEW_LINE>BField fiel... | retTypeMembers = new LinkedHashSet<>(); |
1,799,524 | public <T extends E> Indexed<T> append(T entry) {<NEW_LINE>// Store the entry index.<NEW_LINE>final long index = getNextIndex();<NEW_LINE>try {<NEW_LINE>// Serialize the entry.<NEW_LINE>memory.clear();<NEW_LINE>memory.position(<MASK><NEW_LINE>try {<NEW_LINE>namespace.serialize(entry, memory);<NEW_LINE>} catch (KryoExce... | Integer.BYTES + Integer.BYTES); |
461,132 | public String info() {<NEW_LINE>StringBuilder result = new StringBuilder();<NEW_LINE><MASK><NEW_LINE>registrationList.forEach(registration -> {<NEW_LINE>if (first.getAndSet(false)) {<NEW_LINE>result.append("App ID: " + registration.getAppId() + "\n");<NEW_LINE>result.append("Service Name: " + registration.getMicroservi... | AtomicBoolean first = new AtomicBoolean(true); |
380,538 | public void updateDrawState(TextPaint ds) {<NEW_LINE>if (linkColor != null) {<NEW_LINE>int normalLinkColor = linkColor.getColorForState(new int[] { android.R.attr.state_enabled, -android.R.attr.state_pressed }, Color.TRANSPARENT);<NEW_LINE>int pressedLinkColor = linkColor.getColorForState(new int[] { android.R.attr.sta... | .bgColor = mPressed ? pressedBgColor : normalBgColor; |
1,103,806 | public static void main(final String[] arg) throws ClassNotFoundException, IOException, JSAPException, SecurityException, NoSuchMethodException {<NEW_LINE>final SimpleJSAP jsap = new SimpleJSAP(ImmutableExternalPrefixMap.class.getName(), "Builds an external map reading from standard input a newline-separated list of te... | Charset) jsapResult.getObject("encoding"); |
1,788,687 | public static void main(String[] args) {<NEW_LINE>AggregateNumber an = new AggregateNumber();<NEW_LINE>// true 11 + 22 == 33(+22) = 55(+33) = 88(+55) = 143<NEW_LINE>int[] number = { 1, 1, 2, 2, 3, 3, 5, 5, 8, <MASK><NEW_LINE>// false 11 + 22 == 33(+55) = 88(+55) != 144<NEW_LINE>int[] number1 = { 1, 1, 2, 2, 3, 3, 5, 5,... | 8, 1, 4, 3 }; |
215,157 | private void _initializeMode(ExternalContext context) {<NEW_LINE>String facesVersion = RuntimeConfig.getCurrentInstance(context).getFacesVersion();<NEW_LINE>boolean partialStateSavingDefault;<NEW_LINE>// Per spec section 11.1.3, the default value for the partial state saving feature needs<NEW_LINE>// to be true if 2.0,... | getCurrentInstance(context).isRefreshTransientBuildOnPSS(); |
1,268,596 | public boolean visit(SQLMethodInvokeExpr x) {<NEW_LINE>SQLExpr owner = x.getOwner();<NEW_LINE>if (owner != null) {<NEW_LINE>printMethodOwner(owner);<NEW_LINE>}<NEW_LINE>if (parameterized) {<NEW_LINE>List<SQLExpr<MASK><NEW_LINE>if (x.methodNameHashCode64() == FnvHash.Constants.TRIM && arguments.size() == 1 && arguments.... | > arguments = x.getArguments(); |
1,840,867 | private ApplicationMap createMap(FilteredMapServiceOption option, FilteredMap filteredMap) {<NEW_LINE>final ApplicationMapBuilder applicationMapBuilder = applicationMapBuilderFactory.createApplicationMapBuilder(option.getOriginalRange());<NEW_LINE><MASK><NEW_LINE>final WasNodeHistogramDataSource wasNodeHistogramDataSou... | applicationMapBuilder.linkType(LinkType.DETAILED); |
735,551 | public static Map<String, Double> balancednessCostByGoal(List<Goal> goals, double priorityWeight, double strictnessWeight) {<NEW_LINE>if (goals.isEmpty()) {<NEW_LINE>throw new IllegalArgumentException("At least one goal must be provided to get the balancedness cost.");<NEW_LINE>} else if (priorityWeight <= 0 || strictn... | isHardGoal() ? strictnessWeight : 1); |
323,206 | private void processServerChange() throws InterruptedException {<NEW_LINE>// check if the leader can perform server changes<NEW_LINE>performServerChangesPermits.acquire();<NEW_LINE>long elapsedMs = System.currentTimeMillis() - lastSuccessfulAssigmentAt;<NEW_LINE>long remainingMs <MASK><NEW_LINE>if (remainingMs > 0) {<N... | = scheduleDuration.toMillis() - elapsedMs; |
1,225,995 | public static void main(String[] args) {<NEW_LINE>// Instantiate a KeyClient that will be used to call the service. Notice that the KeyClient is using default Azure<NEW_LINE>// credentials. To make default credentials work, ensure that environment variables 'AZURE_CLIENT_ID',<NEW_LINE>// 'AZURE_CLIENT_KEY' and 'AZURE_T... | build()).buildClient(); |
217,177 | public void handleAgentDisconnect(long agentId, com.cloud.host.Status state) {<NEW_LINE>if (state == com.cloud.host.Status.Alert || state == com.cloud.host.Status.Disconnected) {<NEW_LINE>HostVO host = hostDao.findById(agentId);<NEW_LINE>if (host.getType() == Type.ConsoleProxy) {<NEW_LINE>String name = host.getName();<... | .parseLong(tokens[1]); |
262,500 | protected Node createNodeForKey(AbstractFile key) {<NEW_LINE>return key.accept(new ContentVisitor.Default<AbstractNode>() {<NEW_LINE><NEW_LINE>public FileNode visit(AbstractFile f) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE><NEW_LINE>public FileNode visit(FsContent f) {<NEW_LINE>return new FileNode(f, false);<NEW_LINE>}<NEW... | return new FileNode(f, false); |
1,001,060 | public void run() {<NEW_LINE>try {<NEW_LINE>if (logger.isInfoEnabled()) {<NEW_LINE>logger.info("Job: [" + job + "] launched with the following parameters: [" + jobParameters + "]");<NEW_LINE>}<NEW_LINE>job.execute(jobExecution);<NEW_LINE>if (logger.isInfoEnabled()) {<NEW_LINE>Duration jobExecutionDuration = BatchMetric... | ), jobExecution.getEndTime()); |
1,220,900 | private List<File> findResourcesFromExportTxt(final File contentsDir) {<NEW_LINE>final File exportTxt = new File(contentsDir, "export.txt");<NEW_LINE>if (!exportTxt.exists()) {<NEW_LINE>log("No export.txt in " + contentsDir.getAbsolutePath());<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>final Map<String, String[]> export... | "Found 'application." + PLATFORM + BITS + "' in export.txt"); |
463,695 | public void clusterChanged(ClusterChangedEvent event) {<NEW_LINE>try {<NEW_LINE>SnapshotsInProgress previousSnapshots = event.previousState().custom(SnapshotsInProgress.TYPE, SnapshotsInProgress.EMPTY);<NEW_LINE>SnapshotsInProgress currentSnapshots = event.state().custom(SnapshotsInProgress.TYPE, SnapshotsInProgress.EM... | logger.warn("Failed to update snapshot state ", e); |
578,281 | public void doHandleBytes(TcpChannel channel, ReleasableBytesReference reference) throws IOException {<NEW_LINE>channel.getChannelStats().markAccessed(relativeTimeInMillis.getAsLong());<NEW_LINE>statsTracker.markBytesRead(reference.length());<NEW_LINE>pending.add(reference.retain());<NEW_LINE>final ArrayList<Object> fr... | decode(toDecode, fragments::add); |
878,616 | final ListFoldersResult executeListFolders(ListFoldersRequest listFoldersRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listFoldersRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<ListFoldersRequest> reques... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
1,843,476 | protected List<Column> loadColumnsByInclude(DataGrid component, Element columnsElement, MetaClass metaClass, View view) {<NEW_LINE>Collection<String> appliedProperties = getAppliedProperties(columnsElement, view, metaClass);<NEW_LINE>List<Column> columns = new ArrayList<>(appliedProperties.size());<NEW_LINE>List<Elemen... | mpp = metaClass.getPropertyPath(propertyId); |
1,402,434 | public void glReadPixels(int x, int y, int width, int height, int format, int type, Buffer pixels) {<NEW_LINE>// verify request<NEW_LINE>if ((format != WebGLRenderingContext.RGBA) || (type != WebGLRenderingContext.UNSIGNED_BYTE)) {<NEW_LINE>throw new GdxRuntimeException("Only format RGBA and type UNSIGNED_BYTE are curr... | buffer(), 0, size); |
444,826 | protected TreeNode createRoot(final Model model, final boolean subDirection) {<NEW_LINE>final FileRootNode retval = new FileRootNode(model);<NEW_LINE>FileScope fileScope = model.getFileScope();<NEW_LINE>Set<TypeElement> types = new HashSet<>();<NEW_LINE>Set<TypeElement> recursionDetection = new HashSet<>();<NEW_LINE>ty... | TypeElement type = iterator.next(); |
1,736,484 | private Result anotherNodeInAnotherGroupHasWantedState(StorageNodeInfo nodeInfo) {<NEW_LINE>if (groupVisiting.isHierarchical()) {<NEW_LINE>SettableOptional<Result> <MASK><NEW_LINE>groupVisiting.visit(group -> {<NEW_LINE>if (!groupContainsNode(group, nodeInfo.getNode())) {<NEW_LINE>Result result = otherNodeInGroupHasWan... | anotherNodeHasWantedState = new SettableOptional<>(); |
72,600 | private TExecPlanFragmentParams streamLoadPutImpl(TStreamLoadPutRequest request) throws UserException {<NEW_LINE>String cluster = request.getCluster();<NEW_LINE>if (Strings.isNullOrEmpty(cluster)) {<NEW_LINE>cluster = SystemInfoService.DEFAULT_CLUSTER;<NEW_LINE>}<NEW_LINE>Catalog catalog = Catalog.getCurrentCatalog();<... | "txn does not exist: " + request.getTxnId()); |
1,128,346 | public JBIterable<? extends T> children(@Nonnull final T node) {<NEW_LINE>return new JBIterable<T>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Iterator<T> iterator() {<NEW_LINE>FlyweightCapableTreeStructure<T> structure = getStructure();<NEW_LINE>Ref<T[]<MASK><NEW_LINE>int count = structure.getChildren(node, ref);... | > ref = Ref.create(); |
147,670 | public void valueChanged(ListSelectionEvent e) {<NEW_LINE>if (e.getValueIsAdjusting()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>FilesSetDefsPanel.this.rulesListModel.clear();<NEW_LINE>FilesSetDefsPanel.this.resetRuleComponents();<NEW_LINE>// Get the selected interesting files set and populate the set<NEW_LINE>// componen... | this.rulesList.setSelectedIndex(0); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.