idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
739,592 | public ObjectNode detail(HttpServletRequest request) throws Exception {<NEW_LINE>String namespaceId = WebUtils.optional(request, CommonParams.NAMESPACE_ID, Constants.DEFAULT_NAMESPACE_ID);<NEW_LINE>String serviceName = WebUtils.required(request, CommonParams.SERVICE_NAME);<NEW_LINE>NamingUtils.checkServiceNameFormat(se... | WebUtils.required(request, "ip"); |
1,692,318 | public void write(org.apache.thrift.protocol.TProtocol oprot, InstanceRequest struct) throws org.apache.thrift.TException {<NEW_LINE>struct.validate();<NEW_LINE>oprot.writeStructBegin(STRUCT_DESC);<NEW_LINE>oprot.writeFieldBegin(REQUEST_ID_FIELD_DESC);<NEW_LINE>oprot.writeI64(struct.requestId);<NEW_LINE>oprot.writeFiel... | struct.query.write(oprot); |
591,450 | public void validateQuery(String theQuery, String theFieldName) {<NEW_LINE>if (isBlank(theQuery)) {<NEW_LINE>throw new UnprocessableEntityException(Msg.code<MASK><NEW_LINE>}<NEW_LINE>SubscriptionCriteriaParser.SubscriptionCriteria parsedCriteria = SubscriptionCriteriaParser.parse(theQuery);<NEW_LINE>if (parsedCriteria ... | (11) + theFieldName + " must be populated"); |
1,131,250 | public List<CardSet> loadCardSets(final Session session) {<NEW_LINE>synchronized (options.cardSetIds) {<NEW_LINE>try {<NEW_LINE>final List<CardSet> cardSets = new ArrayList<>();<NEW_LINE>if (!options.getPyxCardSetIds().isEmpty()) {<NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>final List<CardSet> pyxCardSets = sessi... | getPyxCardSetIds()).list(); |
895,718 | public void renderButton(@Nonnull PoseStack ms, int mouseX, int mouseY, float partialTicks) {<NEW_LINE>ms.pushPose();<NEW_LINE>ms.translate(x + paddingX, y + paddingY, z);<NEW_LINE>float innerWidth = width - 2 * paddingX;<NEW_LINE>float innerHeight = height - 2 * paddingY;<NEW_LINE>float eX = element.getX(), eY = eleme... | scale(xScale, yScale, 1); |
1,541,582 | static void tryVirtualLock() {<NEW_LINE>JNAKernel32Library kernel = JNAKernel32Library.getInstance();<NEW_LINE>Pointer process = null;<NEW_LINE>try {<NEW_LINE>process = kernel.GetCurrentProcess();<NEW_LINE>// By default, Windows limits the number of pages that can be locked.<NEW_LINE>// Thus, we need to first increase ... | "Unable to lock JVM memory. Failed to set working set size. Error code {}", Native.getLastError()); |
895,057 | public static BatchGetDeviceBindStatusResponse unmarshall(BatchGetDeviceBindStatusResponse batchGetDeviceBindStatusResponse, UnmarshallerContext _ctx) {<NEW_LINE>batchGetDeviceBindStatusResponse.setRequestId(_ctx.stringValue("BatchGetDeviceBindStatusResponse.RequestId"));<NEW_LINE>batchGetDeviceBindStatusResponse.setSu... | ("BatchGetDeviceBindStatusResponse.Data[" + i + "].IotId")); |
747,974 | private boolean detectKeepAlive(Buf buf, RapidoidHelper helper, Bytes bytes, BufRange protocol, BufRanges headers) {<NEW_LINE>IntWrap result = helper.integers[0];<NEW_LINE>// e.g. HTTP/1.1<NEW_LINE>boolean keepAliveByDefault = protocol.isEmpty() || bytes.get(protocol.last()) != '0';<NEW_LINE>// try to detect the opposi... | ) 's', (byte) 'e'); |
1,784,965 | public void onClick(View arg0) {<NEW_LINE>ParticleSystem ps = new ParticleSystem(this, 100, R.drawable.star_pink, 800);<NEW_LINE>ps.setScaleRange(0.7f, 1.3f);<NEW_LINE>ps.setSpeedRange(0.1f, 0.25f);<NEW_LINE>ps.setRotationSpeedRange(90, 180);<NEW_LINE>ps.setFadeOut<MASK><NEW_LINE>ps.oneShot(arg0, 70);<NEW_LINE>Particle... | (200, new AccelerateInterpolator()); |
1,575,536 | public static StringBuilder append(StringBuilder sb, Pod.Value v) {<NEW_LINE>switch(v.getValCase()) {<NEW_LINE>case VAL_NOT_SET:<NEW_LINE>return sb.append("[null]");<NEW_LINE>case STRING:<NEW_LINE>return sb.append(v.getString());<NEW_LINE>case BOOL:<NEW_LINE>return sb.append(v.getBool());<NEW_LINE>case FLOAT64:<NEW_LIN... | append(v.getSint32()); |
281,109 | public Event nextEvent() {<NEW_LINE><MASK><NEW_LINE>if (ev == Event.META_CHANGED) {<NEW_LINE>if (meta == null) {<NEW_LINE>meta = new BundleMeta();<NEW_LINE>}<NEW_LINE>BundleMeta origmeta = source.getMeta();<NEW_LINE>for (int i = meta.size(); i < origmeta.size(); i++) {<NEW_LINE>if (column < 0) {<NEW_LINE>@SuppressWarni... | Event ev = source.nextEvent(); |
1,209,214 | static Object repr(VirtualFrame frame, Object obj, @Cached GetClassNode getClassNode, @Cached(parameters = "Repr") LookupSpecialMethodSlotNode lookupRepr, @Cached CallUnaryMethodNode callRepr, @Cached ObjectNodes.DefaultObjectReprNode defaultRepr, @Cached ConditionProfile isString, @Cached ConditionProfile isPString, @... | defaultRepr.execute(frame, obj); |
928,122 | public static void addAllProjects(BufferedWriter wr) throws IOException {<NEW_LINE>write(wr, "allprojects {");<NEW_LINE>write(wr, "apply plugin: \"eclipse\"");<NEW_LINE>space(wr);<NEW_LINE>write(wr, "version = '1.0'");<NEW_LINE>write(wr, "ext {");<NEW_LINE>write(wr, "appName = \"%APP_NAME%\"");<NEW_LINE>write(wr, "gdxV... | "maven { url \"" + DependencyBank.libGDXSnapshotsUrl + "\" }"); |
688,720 | public double cdf(double x) {<NEW_LINE>// Only values within a certain range will have an effect on the result, so we will skip to that range!<NEW_LINE>int from = Arrays.binarySearch(X, x - h * k.cutOff());<NEW_LINE>int to = Arrays.binarySearch(X, x + <MASK><NEW_LINE>// Mostly likely the exact value of x is not in the ... | h * k.cutOff()); |
874,790 | public static SearchHistoricalSnapshotsResponse unmarshall(SearchHistoricalSnapshotsResponse searchHistoricalSnapshotsResponse, UnmarshallerContext _ctx) {<NEW_LINE>searchHistoricalSnapshotsResponse.setRequestId(_ctx.stringValue("SearchHistoricalSnapshotsResponse.RequestId"));<NEW_LINE>searchHistoricalSnapshotsResponse... | ("SearchHistoricalSnapshotsResponse.Snapshots[" + i + "].ActualItems")); |
1,232,813 | void init(ChannelPipeline pipeline) {<NEW_LINE>pipeline.addFirst("idleStateHandler", new IdleStateHandler<MASK><NEW_LINE>pipeline.addAfter("idleStateHandler", "idleEventHandler", timeoutHandler);<NEW_LINE>// pipeline.addLast("logger", new LoggingHandler("Netty", LogLevel.ERROR));<NEW_LINE>if (errorsCather.isPresent()) ... | (nettyChannelTimeoutSeconds, 0, 0)); |
649,702 | private void doCopy() {<NEW_LINE>Element el = document.getParagraphElement(editor.getSelectionStart());<NEW_LINE>if (el.getName().toUpperCase().equals("P-IMPLIED"))<NEW_LINE>el = el.getParentElement();<NEW_LINE>String elName = el.getName();<NEW_LINE>StringWriter sw = new StringWriter();<NEW_LINE>String copy;<NEW_LINE>j... | ) - editor.getSelectionStart()); |
233,171 | public AttackResult completed(@RequestParam String editor) {<NEW_LINE>try {<NEW_LINE>if (editor.isEmpty())<NEW_LINE>return failed(this).feedback("sql-injection.10b.no-code").build();<NEW_LINE>editor = editor.replaceAll("\\<.*?>", "");<NEW_LINE>String regexSetsUpConnection = "(?=.*getConnection.*)";<NEW_LINE>String rege... | feedback("sql-injection.10b.failed").build(); |
630,029 | final ListTargetsByRuleResult executeListTargetsByRule(ListTargetsByRuleRequest listTargetsByRuleRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listTargetsByRuleRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.st... | endClientExecution(awsRequestMetrics, request, response); |
420,017 | public VolumeAttachment unmarshall(StaxUnmarshallerContext context) throws Exception {<NEW_LINE>VolumeAttachment volumeAttachment = new VolumeAttachment();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>if (context.isStartOfDocument())<NEW_LINE>targetDepth... | ().unmarshall(context)); |
13,427 | private String processTargetTypeCreation(final CreateUpdateTargetTypeDetailsRequest targetTypeRequest, final String userId) throws PacManException {<NEW_LINE>String targetName = targetTypeRequest.getName().toLowerCase().trim().replaceAll(" ", "-");<NEW_LINE>targetTypeRequest.setName(targetName);<NEW_LINE>boolean isTarg... | setDomain(targetTypeRequest.getDomain()); |
798,896 | private void evalLocal() throws Exception {<NEW_LINE>CacheCategory cacheCategory = new CacheCategory(Agent.class);<NEW_LINE>CacheKey cacheKey = new CacheKey(TriggerAgent.class, agent.getId());<NEW_LINE>CompiledScript compiledScript = null;<NEW_LINE>Optional<?> optional = CacheManager.get(cacheCategory, cacheKey);<NEW_L... | .setWebservicesClient(new WebservicesClient()); |
349,715 | private double convertUnits(double fromValue, LogVar fromVar, ProductVar toVar) throws UnitType.IllegalUnitConversionException {<NEW_LINE>double toValue = fromValue;<NEW_LINE>String fromUnits = null;<NEW_LINE>if (fromVar.getUnits() == null && toVar.getFromUnits() != null && !toVar.getFromUnits().isEmpty()) {<NEW_LINE>f... | ), toVar.getUnits()); |
990,027 | public void onEvent(GridEvent<T> event) {<NEW_LINE>super.onEvent(event);<NEW_LINE>if (event.isHandled()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (!event.getCell().isBody()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Column<?, T> gridColumn = event<MASK><NEW_LINE>boolean enterKey = event.getDomEvent().getType().equals(Bro... | .getCell().getColumn(); |
511,087 | /*<NEW_LINE>* A record of default values that represent the value of the<NEW_LINE>* outputs if the route is filtered / dropped in the policy<NEW_LINE>*/<NEW_LINE>@VisibleForTesting<NEW_LINE>BDDRoute zeroedRecord() {<NEW_LINE>BDDRoute rec = new BDDRoute(_factory, _configAtomicPredicates.getCommunityAtomicPredicates().ge... | setNextHopDiscarded(_factory.zero()); |
923,715 | public boolean canImport(final TransferSupport support) {<NEW_LINE>try {<NEW_LINE>final Transferable t = support.getTransferable();<NEW_LINE>if (t.isDataFlavorSupported(dataFlavor)) {<NEW_LINE>final Object transferData = t.getTransferData(transferFlavor);<NEW_LINE>if (transferData instanceof DocumentPaneTransferInfo) {... | e.toString(), e); |
1,265,945 | public void requestPostPhoto(File photo, final String message, OnPostingCompleteListener onPostingCompleteListener) {<NEW_LINE>super.requestPostPhoto(photo, message, onPostingCompleteListener);<NEW_LINE>final Bitmap vkPhoto = getPhoto(photo);<NEW_LINE>VKRequest request = VKApi.uploadWallPhotoRequest(new VKUploadImage(v... | error.toString(), null); |
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... | tempLong = ejb1.getLongEnvVar("envLongGT64bit"); |
519,470 | public void doReportStat(SofaTracerSpan sofaTracerSpan) {<NEW_LINE>Map<String, String> tagsWithStr = sofaTracerSpan.getTagsWithStr();<NEW_LINE>StatKey statKey = new StatKey();<NEW_LINE>String localApp = <MASK><NEW_LINE>String dbType = tagsWithStr.get(Tags.DB_TYPE.getKey());<NEW_LINE>String methodName = tagsWithStr.get(... | tagsWithStr.get(CommonSpanTags.LOCAL_APP); |
646,692 | private static void blockHitAir(ServerWorld serverWorld, RayTraceResult rayTraceResult, ElementalAir airInterfaceInstance) {<NEW_LINE>int arrowAirChargeLevel = airInterfaceInstance.getChargeLevel();<NEW_LINE>if (arrowAirChargeLevel == 0)<NEW_LINE>return;<NEW_LINE>if (!(rayTraceResult instanceof BlockRayTraceResult))<NE... | Vector3d(0.0, 0.0, 0.0); |
990,359 | public Request<DeleteFleetsRequest> marshall(DeleteFleetsRequest deleteFleetsRequest) {<NEW_LINE>if (deleteFleetsRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>Request<DeleteFleetsRequest> request = new DefaultRequest<DeleteFleetsRequest>(delete... | request.setHttpMethod(HttpMethodName.POST); |
1,368,341 | public void initialize(WizardDescriptor wiz) {<NEW_LINE>this.wizardInfo = getWizardInfo(DATAFILE);<NEW_LINE>this.holder = new ResourceConfigHelperHolder();<NEW_LINE>this.helper = holder.getDataSourceHelper();<NEW_LINE>// this.wiz = wiz;<NEW_LINE>// NOI18N<NEW_LINE>wiz.putProperty("NewFileWizard_Title", NbBundle.getMess... | (ConnPoolWizard.class, "Templates/SunResources/JDBC_Resource")); |
608,073 | static IdentityProviderModel toModel(MapIdentityProviderEntity entity) {<NEW_LINE>if (entity == null)<NEW_LINE>return null;<NEW_LINE>IdentityProviderModel model = new IdentityProviderModel();<NEW_LINE>model.setInternalId(entity.getId());<NEW_LINE>model.setAlias(entity.getAlias());<NEW_LINE>model.setDisplayName(entity.g... | storeToken == null ? false : storeToken); |
687,083 | private void startHeadingUpdate() {<NEW_LINE>if (mSensorManager == null || mContext == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>SmartLocation.LocationControl locationControl = SmartLocation.with(mContext).location().oneFix().config(LocationParams.BEST_EFFORT);<NEW_LINE>Location currLoc = locationControl.getLastLoca... | .TYPE_MAGNETIC_FIELD), SensorManager.SENSOR_DELAY_NORMAL); |
676,738 | public synchronized void checkFilesTTL() {<NEW_LINE>if (dataTTL == Long.MAX_VALUE) {<NEW_LINE>logger.debug("{}: TTL not set, ignore the check", logicalStorageGroupName + "-" + virtualStorageGroupId);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>long ttlLowerBound = System.currentTimeMillis() - dataTTL;<NEW_LINE>logger.debug("{... | checkFileTTL(tsFileResource, ttlLowerBound, false); |
1,581,505 | // logic similar to float_subtype_new(PyTypeObject *type, PyObject *x) from CPython<NEW_LINE>// floatobject.c we have to first create a temporary float, then fill it into<NEW_LINE>// a natively allocated subtype structure<NEW_LINE>@Specialization(guards = "isSubtypeOfFloat(frame, isSubtype, cls)", limit = "1")<NEW_LINE... | , PythonBuiltinClassType.PFloat, obj)); |
475,388 | final void handleChannel(int streamId, ByteBuf frame, long initialRequestN, boolean complete) {<NEW_LINE>ResponderLeaseTracker leaseHandler = this.leaseHandler;<NEW_LINE>Throwable leaseError;<NEW_LINE>if (leaseHandler == null || (leaseError = leaseHandler.use()) == null) {<NEW_LINE>final <MASK><NEW_LINE>if (requestInte... | RequestInterceptor requestInterceptor = this.getRequestInterceptor(); |
1,393,188 | public static void maxf(Planar<GrayF32> inX, Planar<GrayF32> inY, GrayF32 outX, GrayF32 outY) {<NEW_LINE>// input and output should be the same shape<NEW_LINE><MASK><NEW_LINE>InputSanityCheck.reshapeOneIn(inX, outX, outY);<NEW_LINE>// make sure that the pixel index is the same<NEW_LINE>InputSanityCheck.checkIndexing(in... | InputSanityCheck.checkSameShape(inX, inY); |
345,643 | public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {<NEW_LINE>// record variable initialization if any<NEW_LINE>if ((flowInfo.tagBits & FlowInfo.UNREACHABLE_OR_DEAD) == 0) {<NEW_LINE>// only set if actually reached<NEW_LINE>this.bits |= ASTNode.IsLocalDeclarationReachable;<... | initialization, this.initialization.resolvedType); |
797,972 | private void refreshCommit() {<NEW_LINE>new RefreshCommitTask(getActivity(), repository, base, commentImageGetter) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>protected FullCommit run(Account account) throws Exception {<NEW_LINE>FullCommit full = super.run(account);<NEW_LINE>List<CommitFile> files = full.getCommit().getFil... | ViewUtils.setGone(progress, true); |
34,302 | public Optional<AbstractDeclaring> datatypeProvider() {<NEW_LINE>Optional<DeclaringType> typeDefining = declaringType().isPresent() ? Optional.of(declaringType().get().associatedTopLevel()) : Optional.<DeclaringType>absent();<NEW_LINE>Optional<DataMirror> typeDefined = typeDefining.isPresent() ? typeDefining.get().data... | Optional.<DataMirror>absent(); |
1,063,367 | public void init(boolean delay) {<NEW_LINE>final Account account = message.getConversation().getAccount();<NEW_LINE>this.file = mXmppConnectionService.getFileBackend().getFile(message, false);<NEW_LINE>final String mime;<NEW_LINE>if (message.getEncryption() == Message.ENCRYPTION_PGP || message.getEncryption() == Messag... | }, MoreExecutors.directExecutor()); |
481,119 | private VirtualFile resolveAbsolutePath(@NotNull String path) {<NEW_LINE>VirtualFile asIsFile = pathToVirtualFile(path);<NEW_LINE>if (asIsFile != null) {<NEW_LINE>return asIsFile;<NEW_LINE>}<NEW_LINE>String projectBasePath = myProject.getBasePath();<NEW_LINE>if (projectBasePath != null) {<NEW_LINE>String projectBasedPa... | libraryFiles[0].getVirtualFile(); |
1,068,621 | final ListWorkteamsResult executeListWorkteams(ListWorkteamsRequest listWorkteamsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listWorkteamsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<ListWorkteamsReq... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
1,122,447 | /*<NEW_LINE>* Low-level API performing the actual compilation<NEW_LINE>*/<NEW_LINE>public void performCompilation() {<NEW_LINE>this.startTime = System.currentTimeMillis();<NEW_LINE>FileSystem environment = getLibraryAccess();<NEW_LINE>try {<NEW_LINE>this.compilerOptions = new CompilerOptions(this.options);<NEW_LINE>th... | .compilerOptions.produceReferenceInfo = this.produceRefInfo; |
792,414 | public boolean includeBean(Class<?> beanClass, String beanName) {<NEW_LINE>Class<?> mbeanInterface;<NEW_LINE>if (Proxy.isProxyClass(beanClass)) {<NEW_LINE>Class[] implementedInterfaces = ClassUtils.getAllInterfacesForClass(beanClass);<NEW_LINE>mbeanInterface = Arrays.stream(implementedInterfaces).filter(i -> i.getName(... | mbeanInterface = JmxUtils.getMBeanInterface(beanClass); |
1,061,543 | public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) {<NEW_LINE>final BindResult<WebEndpointProperties> result = Binder.get(environment).bind(MANAGEMENT_ENDPOINTS_WEB, WebEndpointProperties.class);<NEW_LINE>if (result.isBound()) {<NEW_LINE><MASK><NEW_LINE>List<GroupedOpenApi> newGroups = new ... | WebEndpointProperties webEndpointProperties = result.get(); |
1,101,734 | final CreateCustomMetricResult executeCreateCustomMetric(CreateCustomMetricRequest createCustomMetricRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createCustomMetricRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetri... | invoke(request, responseHandler, executionContext); |
512,271 | public // }<NEW_LINE>DataOutputX writeBlob(byte[] value, int offset, int length) throws IOException {<NEW_LINE>if (value == null || value.length == 0) {<NEW_LINE>writeByte((byte) 0);<NEW_LINE>} else {<NEW_LINE>int len = Math.min(length, value.length - offset);<NEW_LINE>if (len <= 253) {<NEW_LINE>writeByte((byte) len);<... | ] buff = new byte[5]; |
1,461,395 | public void migratePrimaryTab(final I_AD_Tab masterTab) {<NEW_LINE>if (windowDAO.hasUISections(masterTab)) {<NEW_LINE>log("Skip migrating {} because already has sections", masterTab);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final I_AD_UI_Section uiSection = createUISection(masterTab, 10);<NEW_LINE>final I_AD_UI_Column <MA... | uiColumnLeft = createUIColumn(uiSection, 10); |
1,741,593 | public String stats(int printPrecision) {<NEW_LINE>// Calculate AUC and also print counts, for each output<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>int maxLabelsLength = 15;<NEW_LINE>if (labels != null) {<NEW_LINE>for (String s : labels) {<NEW_LINE>maxLabelsLength = Math.max(s.length(), maxLabelsLength... | "AUC", "AUPRC", "# Pos", "# Neg"); |
1,608,898 | private File createSegment(File csvDataFile) {<NEW_LINE>// create segment<NEW_LINE>LOGGER.info("Started creating segment from file: {}", csvDataFile);<NEW_LINE>String outDir = new File(_workingDir, "segment").getAbsolutePath();<NEW_LINE>SegmentGeneratorConfig segmentGeneratorConfig = getSegmentGeneratorConfig(csvDataFi... | deleteQuietly(new File(outDir)); |
109,932 | public com.amazonaws.services.codedeploy.model.InvalidComputePlatformException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.codedeploy.model.InvalidComputePlatformException invalidComputePlatformException = new com.amazonaws.services.<MASK><NEW_LINE>int origi... | codedeploy.model.InvalidComputePlatformException(null); |
692,842 | // must called after tupleDescriptor is computed<NEW_LINE>public void complete() throws UserException {<NEW_LINE>TOlapTableSink tSink = tDataSink.getOlapTableSink();<NEW_LINE>tSink.setTableId(dstTable.getId());<NEW_LINE>tSink.setTupleId(tupleDescriptor.getId().asInt());<NEW_LINE>int numReplicas = 1;<NEW_LINE>for (Parti... | tSink.setNodesInfo(createPaloNodesInfo()); |
1,268,341 | private void doCloseSubscription(final Subscription subscriptionToClose) {<NEW_LINE>if (isClosed) {<NEW_LINE>// don't need to adjust the subscriptions when closed<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// close subscription<NEW_LINE>subscriptionToClose.isClosed = true;<NEW_LINE>subscriptionToClose.position.reset();<NEW_L... | int numMoved = len - index - 1; |
511,328 | private void dialogChanged() {<NEW_LINE>String location = getLocation();<NEW_LINE>String fileName = getFileName();<NEW_LINE>Path path = new Path(location);<NEW_LINE>if (location.length() == 0) {<NEW_LINE>updateStatus("File location must be specified");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (fileName.length() == 0) {<... | dotLoc = fileName.lastIndexOf('.'); |
221,633 | ArrayList<Object> new202() /* reduce ANonTerminal$Declaration */<NEW_LINE>{<NEW_LINE>@SuppressWarnings("hiding")<NEW_LINE>ArrayList<Object> nodeList = new ArrayList<Object>();<NEW_LINE>@SuppressWarnings("unused")<NEW_LINE>ArrayList<Object> nodeArrayList2 = pop();<NEW_LINE>@SuppressWarnings("unused")<NEW_LINE>ArrayList<... | = new LinkedList<Object>(); |
1,171,657 | public boolean process(List<Point2D_F64> observations, List<Se3_F64> listWorldToView, Point3D_F64 worldPt, Point3D_F64 refinedPt) {<NEW_LINE>func.setObservations(observations, listWorldToView);<NEW_LINE>minimizer.setFunction(func, null);<NEW_LINE><MASK><NEW_LINE>param[1] = worldPt.y;<NEW_LINE>param[2] = worldPt.z;<NEW_... | param[0] = worldPt.x; |
534,273 | public void drawU(UGraphic ug) {<NEW_LINE>final double thickness = ug.getParam().getStroke().getThickness();<NEW_LINE>final double radius = 4 + thickness - 1;<NEW_LINE>final double lineHeight = 4 + thickness - 1;<NEW_LINE>final int xWing = 4;<NEW_LINE>final AffineTransform rotate = AffineTransform.getRotateInstance(thi... | getY(), lineTop, lineBottom); |
1,714,837 | public StreamsBuilder topology() {<NEW_LINE>StreamsBuilder builder = new KafkaStreamsBuilder();<NEW_LINE>// executor<NEW_LINE>builder.addStateStore(Stores.keyValueStoreBuilder(Stores.persistentKeyValueStore(EXECUTOR_STATE_STORE_NAME), Serdes.String(), JsonSerde.of(Executor.class)));<NEW_LINE>// WorkerTask deduplication... | , Serdes.String())); |
911,420 | public Object evaluate(ExpressionTemplate template, ExpressionTemplateContext context) throws IOException {<NEW_LINE>Object operand = getOperand().evaluate(template, context);<NEW_LINE>if (getOperator() == UnaryOperator.Negate) {<NEW_LINE>if (operand instanceof Integer) {<NEW_LINE>return -(Integer) operand;<NEW_LINE>} ... | ) + "' must be a boolean", getSpan()); |
208,287 | private Mono<Response<Void>> stopWebSiteNetworkTraceSlotWithResponseAsync(String resourceGroupName, String name, String slot, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.<MASK><NEW_LINE>}<NEW_LINE>if (resourceGroupName == null) {<NEW_LINE>return Mono.error(new IllegalArgume... | error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); |
555,700 | public PNode visit(SimpleSSTNode node) {<NEW_LINE>PNode result = null;<NEW_LINE>switch(node.type) {<NEW_LINE>case BREAK:<NEW_LINE>result = new BreakNode();<NEW_LINE>result.assignSourceSection(createSourceSection(node.startOffset, node.endOffset));<NEW_LINE>break;<NEW_LINE>case CONTINUE:<NEW_LINE>result = new ContinueNo... | .startOffset, node.endOffset)); |
1,067,334 | protected void launchGroovy(final IType runType, final IJavaProject javaProject, final String mode) {<NEW_LINE>try {<NEW_LINE>boolean excludeTestCode = (runType != null && !hasTestAttribute(runType));<NEW_LINE>Map<String, String> <MASK><NEW_LINE>String launchName = (runType != null ? runType.getElementName() : javaProj... | launchProperties = createLaunchProperties(runType, javaProject); |
516,440 | public void run() {<NEW_LINE>status = Status.DOWNLOADING;<NEW_LINE>stateChanged();<NEW_LINE>RandomAccessFile file = null;<NEW_LINE>InputStream stream = null;<NEW_LINE>HttpURLConnection connection = null;<NEW_LINE>for (URL u : locations) {<NEW_LINE>try {<NEW_LINE>System.out.<MASK><NEW_LINE>// Open connection to URL.<NEW... | println("Trying location " + u + "..."); |
1,017,981 | public Result implement(MycatEnumerableRelImplementor implementor, Prefer pref) {<NEW_LINE>final BlockBuilder builder = new BlockBuilder();<NEW_LINE>final Result leftResult = implementor.visitChild(this, 0, (EnumerableRel) left, pref);<NEW_LINE>Expression leftExpression = toEnumerate(builder.append("left", leftResult.b... | ), pref.preferArray()); |
432,012 | private UserDashboardItemId createUserDashboardItemAndSave(@NonNull final UserDashboardId dashboardId, @NonNull final UserDashboardItemAddRequest request) {<NEW_LINE>//<NEW_LINE>// Get the KPI<NEW_LINE>final int kpiId = request.getKpiId();<NEW_LINE>if (kpiId <= 0) {<NEW_LINE>throw new AdempiereException("kpiId is not s... | trace("Created {} for dashboard {}", webuiDashboardItem, dashboardId); |
414,957 | public static PdfFunction type0(PdfWriter writer, float[] domain, float[] range, int[] size, int bitsPerSample, int order, float[] encode, float[] decode, byte[] stream) {<NEW_LINE>PdfFunction func = new PdfFunction(writer);<NEW_LINE>func.dictionary = new PdfStream(stream);<NEW_LINE>((PdfStream) func.dictionary).flateC... | RANGE, new PdfArray(range)); |
1,329,746 | protected FullHttpResponse newHandshakeResponse(FullHttpRequest req, HttpHeaders headers) {<NEW_LINE>CharSequence key = req.headers().get(HttpHeaderNames.SEC_WEBSOCKET_KEY);<NEW_LINE>if (key == null) {<NEW_LINE>throw new WebSocketServerHandshakeException("not a WebSocket request: missing key", req);<NEW_LINE>}<NEW_LINE... | logger.debug("Requested subprotocol(s) not supported: {}", subprotocols); |
1,487,067 | private Container lazyorToRun(ArrayContainer x) {<NEW_LINE>if (isFull()) {<NEW_LINE>return full();<NEW_LINE>}<NEW_LINE>// TODO: should optimize for the frequent case where we have a single run<NEW_LINE>RunContainer answer = new RunContainer(new char[2 * (this.nbrruns + x.getCardinality())], 0);<NEW_LINE>int rlepos = 0;... | PeekableCharIterator i = x.getCharIterator(); |
1,268,818 | public String call() {<NEW_LINE>try {<NEW_LINE>List<Address> addresses = geocoder.getFromLocation(latLng.<MASK><NEW_LINE>if (!addresses.isEmpty()) {<NEW_LINE>String formattedAddress = "";<NEW_LINE>Address address = addresses.get(0);<NEW_LINE>if (address.getSubThoroughfare() != null) {<NEW_LINE>formattedAddress += addre... | latitude, latLng.longitude, 1); |
370,955 | public List<String> idToIpLookup(List<String> nodeIds) {<NEW_LINE>log.info("Asked IDs -> IPs for: [%s]", String.join(",", nodeIds));<NEW_LINE>if (nodeIds.isEmpty()) {<NEW_LINE>return new ArrayList<>();<NEW_LINE>}<NEW_LINE>final String project = envConfig.getProjectId();<NEW_LINE>final String zone = envConfig.getZoneNam... | ).list(project, zone); |
148,653 | private static Map<String, int[][]> Categories() {<NEW_LINE>Map<String, int[][]> map = new HashMap<String, int[][]>();<NEW_LINE>map.put("Lu", Lu);<NEW_LINE>map.put("Ll", Ll);<NEW_LINE>map.put("Lt", Lt);<NEW_LINE>map.put("Lm", Lm);<NEW_LINE>map.put("Lo", Lo);<NEW_LINE>map.put("Mn", Mn);<NEW_LINE>map.put("Me", Me);<NEW_L... | map.put("Pd", Pd); |
541,195 | public final ChannelFuture handshake(Channel channel, final ChannelPromise promise) {<NEW_LINE>ChannelPipeline pipeline = channel.pipeline();<NEW_LINE>HttpResponseDecoder decoder = pipeline.get(HttpResponseDecoder.class);<NEW_LINE>if (decoder == null) {<NEW_LINE>HttpClientCodec codec = <MASK><NEW_LINE>if (codec == null... | pipeline.get(HttpClientCodec.class); |
753,312 | private HierarchyInfo updateHierarchyInfo() {<NEW_LINE>int depth = getArraySuperType().getHierarchyDepth() + 1;<NEW_LINE>Klass[] supertypes;<NEW_LINE>Klass[] superKlassTypes = getArraySuperType().getSuperTypes();<NEW_LINE>supertypes = new Klass[superKlassTypes.length + 1];<NEW_LINE>assert supertypes.length == depth + 1... | 0, supertypes, 0, depth); |
817,698 | private Bootstrap createClientBootstrap(EventLoopGroup eventLoopGroup) {<NEW_LINE>final Bootstrap bootstrap = new Bootstrap();<NEW_LINE>bootstrap.group(eventLoopGroup);<NEW_LINE>bootstrap.<MASK><NEW_LINE>bootstrap.option(ChannelOption.TCP_NODELAY, TransportSettings.TCP_NO_DELAY.get(settings));<NEW_LINE>bootstrap.option... | channel(NettyBootstrap.clientChannel()); |
209,583 | public static void fstat(EFile efile, String file_name) throws Pausable {<NEW_LINE>// System.err.println("trying entry for "+file_name);<NEW_LINE>try {<NEW_LINE>ZipEntry ent;<NEW_LINE>ent = get_entry(file_name + "/");<NEW_LINE>if (ent == null) {<NEW_LINE>ent = get_entry(file_name);<NEW_LINE>if (ent == null) {<NEW_LINE>... | long file_size = ent.getSize(); |
1,161,000 | public void onChunkReady(Vector3ic chunkPos) {<NEW_LINE>WorldProvider worldProvider = CoreRegistry.get(WorldProvider.class);<NEW_LINE>List<NetData.BlockChangeMessage> updateBlockMessages = awaitingChunkReadyBlockUpdates.removeAll(new Vector3i(chunkPos));<NEW_LINE>for (NetData.BlockChangeMessage message : updateBlockMes... | removeAll(new Vector3i(chunkPos)); |
1,721,131 | void emailOverallInvoice() {<NEW_LINE>try {<NEW_LINE>String invoiceFile = String.format("%s-%s.csv", invoiceFilePrefix, yearMonth);<NEW_LINE>BlobId invoiceFilename = BlobId.of(billingBucket, invoiceDirectoryPrefix + invoiceFile);<NEW_LINE>try (InputStream in = gcsUtils.openInputStream(invoiceFilename)) {<NEW_LINE>email... | e).getMessage())); |
848,941 | private synchronized void next(long jobId) {<NEW_LINE>WorkflowExecution workflowExecution = mWorkflows.get(jobId);<NEW_LINE>mChildren.putIfAbsent(jobId, new ConcurrentHashSet<>());<NEW_LINE>Set<JobConfig> childJobConfigs = workflowExecution.next();<NEW_LINE>if (childJobConfigs.isEmpty()) {<NEW_LINE>done(jobId);<NEW_LIN... | Long childJobId = childJobIdsIter.next(); |
1,055,703 | protected void onAfterInit() {<NEW_LINE>// Services<NEW_LINE>final IModelAttributeSetInstanceListenerService modelAttributeSetInstanceListenerService = Services.get(IModelAttributeSetInstanceListenerService.class);<NEW_LINE>modelAttributeSetInstanceListenerService.registerListener(new InOutLineCountryModelAttributeSetI... | .registerListener(new OrderLineMonthsUntilExpiryModelASIListener()); |
908,926 | private void addInfusionConversionRedstoneRecipes(Consumer<FinishedRecipe> consumer, String basePath) {<NEW_LINE>// Block<NEW_LINE>ItemStackToChemicalRecipeBuilder.infusionConversion(IngredientCreatorAccess.item().from(Tags.Items.STORAGE_BLOCKS_REDSTONE), MekanismInfuseTypes.REDSTONE.getStack(90)).build(consumer, Mekan... | .rl(basePath + "from_dust")); |
1,199,238 | public Optional<Credential> retrieve(Consumer<LogEvent> logger) throws IOException {<NEW_LINE>if (!Files.exists(dockerConfigFile)) {<NEW_LINE>return Optional.empty();<NEW_LINE>}<NEW_LINE>ObjectMapper objectMapper = new ObjectMapper().configure(MapperFeature.ACCEPT_CASE_INSENSITIVE_PROPERTIES, true);<NEW_LINE>try (Input... | DockerConfig(new DockerConfigTemplate(auths)); |
83,542 | ThymeleafViewResolver thymeleafViewResolver(ThymeleafProperties properties, SpringTemplateEngine templateEngine) {<NEW_LINE>ThymeleafViewResolver resolver = new ThymeleafViewResolver();<NEW_LINE>resolver.setTemplateEngine(templateEngine);<NEW_LINE>resolver.setCharacterEncoding(properties.getEncoding().name());<NEW_LINE... | setOrder(Ordered.LOWEST_PRECEDENCE - 5); |
1,543,953 | private long rangeQuery2(int i, int tl, int tr, int l, int r) {<NEW_LINE>if (tl == l && tr == r) {<NEW_LINE>return t[i];<NEW_LINE>}<NEW_LINE>int tm = (tl + tr) / 2;<NEW_LINE>// Test how the left and right segments of the interval [tl, tr] overlap with the query [l, r]<NEW_LINE>boolean overlapsLeftSegment = (l <= tm);<N... | .min(tm, r)); |
477,715 | public void visitFunctionDeclaration(FunctionDeclaration functionDeclaration) {<NEW_LINE>TypeDeclaration declaringType = getParent(TypeDeclaration.class);<NEW_LINE>if (declaringType != null && functionDeclaration.getType() != null && functionDeclaration.getType().getName() != null && !functionDeclaration.getType().getN... | setType(functionDeclaration.getType()); |
858,179 | public static void logOut(Simplenote application) {<NEW_LINE>application.getSimperium().deauthorizeUser();<NEW_LINE>application.getAccountBucket().reset();<NEW_LINE>application.getNotesBucket().reset();<NEW_LINE>application.getTagsBucket().reset();<NEW_LINE>application.getPreferencesBucket().reset();<NEW_LINE>applicati... | add(Type.SYNC, "Stopped account bucket (AuthUtils)"); |
210,068 | final TagResourceResult executeTagResource(TagResourceRequest tagResourceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(tagResourceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTi... | HandlerContextKey.SIGNING_REGION, getSigningRegion()); |
565,566 | private // complete.<NEW_LINE>MqttToken handleOldTokens(MqttToken token, MqttException reason) {<NEW_LINE>final String methodName = "handleOldTokens";<NEW_LINE>// @TRACE 222=><NEW_LINE>log.fine(CLASS_NAME, methodName, "222");<NEW_LINE>MqttToken tokToNotifyLater = null;<NEW_LINE>try {<NEW_LINE>// First the token that wa... | Enumeration toksToNotE = toksToNot.elements(); |
893,846 | public void createAsync(DataStore dataStore, DataObject dataObject, AsyncCompletionCallback<CreateCmdResult> callback) {<NEW_LINE>String iqn = null;<NEW_LINE>String errMsg = null;<NEW_LINE>try {<NEW_LINE>if (dataObject.getType() == DataObjectType.VOLUME) {<NEW_LINE>s_logger.debug("createAsync - creating volume");<NEW_L... | dataObject, dataStore.getId()); |
716,045 | private static Node createNode(Map<String, String> attributeMap, Node extendFromNode, Node parent, NodeRepository nodeRepository) {<NEW_LINE>String prototypeId = attributeMap.get("prototype");<NEW_LINE>String name = attributeMap.get("name");<NEW_LINE>String comment = attributeMap.get("comment");<NEW_LINE>String categor... | outputType = attributeMap.get("outputType"); |
588,800 | protected TableModel tableModel(SerializedFile serialized) {<NEW_LINE>SerializedFileMetadata metadata = serialized.metadata();<NEW_LINE>TableBuilder table = new TableBuilder();<NEW_LINE>table.row("Path ID", "Offset", "Length", "Type ID", "Class ID");<NEW_LINE>Class<ObjectInfo> factory = metadata.objectInfoTable().eleme... | ) info).scriptTypeIndex()); |
1,731,633 | public static void main(String[] args) throws Exception {<NEW_LINE>ExchangeSpecification exchangeSpecification = new ExchangeSpecification(BitcoiniumExchange.class);<NEW_LINE>// exchangeSpecification.setPlainTextUri("http://openexchangerates.org");<NEW_LINE>exchangeSpecification.setApiKey("42djci5kmbtyzrvglfdw3e2dgmh5m... | yAxisTitle("Price").build(); |
1,770,068 | public String downloadS3Template(S3TO s3, long id, String url, String name, ImageFormat format, boolean hvm, Long accountId, String descr, String cksum, String installPathPrefix, String user, String password, long maxTemplateSizeInBytes, Proxy proxy, ResourceType resourceType) {<NEW_LINE>UUID uuid = UUID.randomUUID();<... | throw new CloudRuntimeException("Unable to download from URL: " + url); |
1,813,637 | public static void main(String[] args) throws Exception {<NEW_LINE>// Prepare our context and sockets<NEW_LINE>try (ZContext context = new ZContext()) {<NEW_LINE>// Connect to task ventilator<NEW_LINE>ZMQ.Socket receiver = context.createSocket(SocketType.PULL);<NEW_LINE>receiver.connect("tcp://localhost:5557");<NEW_LIN... | System.out.println("process weather update"); |
1,551,537 | private TypeSymbolPair checkRecordLiteralKeyExpr(BLangExpression keyExpr, boolean computedKey, BRecordType recordType, AnalyzerData data) {<NEW_LINE>Name fieldName;<NEW_LINE>if (computedKey) {<NEW_LINE>checkExpr(keyExpr, symTable.stringType, data);<NEW_LINE>if (keyExpr.getBType() == symTable.semanticError) {<NEW_LINE>r... | pos, fieldSymbol, fieldName, recordType); |
1,156,749 | public void channelActive(ChannelHandlerContext ctx) throws Exception {<NEW_LINE>Promise<X509Certificate> unusedPromise = ctx.channel().attr(CLIENT_CERTIFICATE_PROMISE_KEY).get().addListener((Promise<X509Certificate> promise) -> {<NEW_LINE>if (promise.isSuccess()) {<NEW_LINE>sslClientCertificateHash = getCertificateHas... | (REMOTE_ADDRESS_KEY).get()); |
1,574,869 | private static boolean jsIsStatic(JSFunction jsFunction) {<NEW_LINE>if (jsFunction.getParent() instanceof JSAssignmentExpression) {<NEW_LINE>// pre-ES6 prototype assignment based classes<NEW_LINE>// Class.foo = function() {}; <- static<NEW_LINE>// Class.prototype.bar = function() {}; <- non-static<NEW_LINE>re... | , "statics")).isPresent(); |
31,718 | private void initControllerView(View v) {<NEW_LINE>mPauseButton = v.findViewById(R.id.play_button);<NEW_LINE>if (mPauseButton != null) {<NEW_LINE>mPauseButton.requestFocus();<NEW_LINE>mPauseButton.setOnClickListener(mPauseListener);<NEW_LINE>}<NEW_LINE>mFullscreenButton = v.findViewById(R.id.fullscreen_mode_button);<NE... | findViewById(R.id.end_time_text); |
1,390,749 | public Call newCall(Request request) {<NEW_LINE>// add extra headers<NEW_LINE>Request.Builder rb = request.newBuilder();<NEW_LINE>for (Map.Entry<String, String> header : this.extraHeaders.entrySet()) {<NEW_LINE>rb.addHeader(header.getKey(), header.getValue());<NEW_LINE>}<NEW_LINE>for (Map.Entry<String, String> cookie :... | .uri().getQuery(); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.