idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
697,343 | private // region Metadata<NEW_LINE>void onMetadataChanged(@NonNull final StreamInfo info) {<NEW_LINE>if (DEBUG) {<NEW_LINE>Log.d(TAG, "Playback - onMetadataChanged() called, playing: " + info.getName());<NEW_LINE>}<NEW_LINE>initThumbnail(info.getThumbnailUrl());<NEW_LINE>registerStreamViewed();<NEW_LINE>updateStreamRe... | setText(info.getName()); |
981,050 | private void init(@Nonnull IModObject modObject) {<NEW_LINE>SmartModelAttacher.registerNoProps(this);<NEW_LINE>PaintRegistry.registerModel(MODEL_UP, new ResourceLocation("minecraft:block/stone_pressure_plate_up"), PaintRegistry.PaintMode.ALL_TEXTURES);<NEW_LINE>PaintRegistry.registerModel(MODEL_DOWN, new ResourceLocati... | (BlockPressurePlateWeighted.POWER, 3)); |
1,839,207 | public synchronized void append(byte[] buffer, int offset, int size) throws IOException {<NEW_LINE>if (size == 0)<NEW_LINE>return;<NEW_LINE>if (myNextChunkBuffer == null)<NEW_LINE>loadAppendBuffer();<NEW_LINE>if (myNextChunkBuffer.length != myAppendBufferLength && myBufferPosition + size >= myNextChunkBuffer.length) {<... | Arrays.copyOf(myNextChunkBuffer, newBufferSize); |
1,822,606 | protected Mono<Void> doExecute(final ServerWebExchange exchange, final ShenyuPluginChain chain, final SelectorData selector, final RuleData rule) {<NEW_LINE>CryptorRuleHandler ruleHandle = CryptorResponsePluginDataHandler.CACHED_HANDLE.get().obtainHandle(CacheKeyUtils.INST.getKey(rule));<NEW_LINE>if (Objects.isNull(rul... | ruleHandle)).build()); |
503,110 | public void rip() throws IOException {<NEW_LINE>int index = 0;<NEW_LINE>logger.info("Retrieving " + this.url);<NEW_LINE>sendUpdate(STATUS.LOADING_RESOURCE, this.url.toExternalForm());<NEW_LINE>JSONObject json = getFirstPage();<NEW_LINE>while (json != null) {<NEW_LINE>List<String> imageURLs = getURLsFromJSON(json);<NEW_... | sendUpdate(STATUS.LOADING_RESOURCE, "next page"); |
810,886 | private static void validateType(Type type, boolean hasArrayOrCollectionWrapped) {<NEW_LINE>if (!(type instanceof ParameterizedType)) {<NEW_LINE>if (UNSUPPORTED_TYPES.contains(type)) {<NEW_LINE>throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format("Type '%s' is not supported. " + "Please use @Fiel... | logExceptionAsError(new IllegalArgumentException("Map and its subclasses are not supported")); |
1,440,570 | private void appendRpcServerSpanTags(Invoker<?> invoker, SofaTracerSpan sofaTracerSpan) {<NEW_LINE>if (sofaTracerSpan == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>RpcContext rpcContext = RpcContext.getContext();<NEW_LINE>Map<String, String<MASK><NEW_LINE>tagsStr.put(Tags.SPAN_KIND.getKey(), spanKind(rpcContext));<NE... | > tagsStr = sofaTracerSpan.getTagsWithStr(); |
842,820 | public void shutDown(CloseConnectionReason closeConnectionReason, @Nullable Runnable shutDownCompleteHandler) {<NEW_LINE>log.info("Connection shutdown started");<NEW_LINE>log.debug("shutDown: peersNodeAddressOptional={}, closeConnectionReason={}", peersNodeAddressOptional, closeConnectionReason);<NEW_LINE>connectionSta... | sendMessage(new CloseConnectionMessage(reason)); |
1,042,765 | public IPSetForwardedIPConfig unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>IPSetForwardedIPConfig iPSetForwardedIPConfig = new IPSetForwardedIPConfig();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>i... | class).unmarshall(context)); |
252,597 | private TypecheckingResult typecheckImplementation(ClassField field, Concrete.Expression implBody, ClassCallExpression fieldSetClass, boolean addImplicitLambdas) {<NEW_LINE>Expression type = fieldSetClass.getDefinition().getFieldType(field, fieldSetClass.getLevels(field.getParentClass()), new ReferenceExpression<MASK><... | (fieldSetClass.getThisBinding())); |
1,392,259 | final ListCrossAccountAuthorizationsResult executeListCrossAccountAuthorizations(ListCrossAccountAuthorizationsRequest listCrossAccountAuthorizationsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listCrossAccountAuthorizationsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = execu... | HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); |
394,585 | public void actionPerformed(final ActionEvent e) {<NEW_LINE>final IdeFocusManager fm = IdeFocusManager.findInstanceByContext(myContext);<NEW_LINE>final ActionCallback typeAhead = new ActionCallback();<NEW_LINE>final String id = ActionManager.getInstance().getId(myAction.getAction());<NEW_LINE>if (id != null) {<NEW_LINE... | getModifiers(), true, false); |
597,421 | private static boolean areArraysEquivalent(Object val1, Object val2, boolean shouldCompareCommonProps) {<NEW_LINE>if (val1 instanceof byte[]) {<NEW_LINE>return Arrays.equals((byte[]) val1, (byte[]) val2);<NEW_LINE>} else if (val1 instanceof short[]) {<NEW_LINE>return Arrays.equals((short[]) val1, (short[]) val2);<NEW_L... | , (int[]) val2); |
1,373,513 | private List<I_M_HU> generateLUTUHandlingUnitsForQtyToAllocate0(@NonNull final IAllocationRequest request) {<NEW_LINE>markNotConfigurable();<NEW_LINE>//<NEW_LINE>// Source: our line<NEW_LINE>final IAllocationSource source = createAllocationSource();<NEW_LINE>//<NEW_LINE>// Destination: our configured LU/TU Producer<NEW... | () || loader.isAllowPartialUnloads(); |
1,607,610 | public boolean apply(final VariantContext vc) {<NEW_LINE>if (vc.getStart() == vc.getEnd()) {<NEW_LINE>// This isn't a multi-allelic segment, so it can only be produced by a single segment.<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>final Collection<VcfPathSegment> intersectingSegments = multiSegmentDetectorPerFile.get(s... | LOG.debug("Found wide variant spanning multiple source segments: ", vc); |
1,436,063 | final DescribePackagesResult executeDescribePackages(DescribePackagesRequest describePackagesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describePackagesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEv... | awsRequestMetrics.startEvent(Field.RequestMarshallTime); |
406,936 | private // ////////////////<NEW_LINE>void onUDP(ProxyMessage msg) throws IOException {<NEW_LINE>if (msg.ip.getHostAddress().equals("0.0.0.0"))<NEW_LINE>msg<MASK><NEW_LINE>log("Creating UDP relay server for " + msg.ip + ":" + msg.port);<NEW_LINE>relayServer = new UDPRelayServer(msg.ip, msg.port, Thread.currentThread(), ... | .ip = sock.getInetAddress(); |
110,160 | protected void configure() {<NEW_LINE>bind(ConfigurationService.class).asEagerSingleton();<NEW_LINE>bind(SidecarService.class).asEagerSingleton();<NEW_LINE>bind(CollectorService.class).asEagerSingleton();<NEW_LINE>bind(<MASK><NEW_LINE>install(new FactoryModuleBuilder().implement(AdministrationFilter.class, Names.named(... | ConfigurationVariableService.class).asEagerSingleton(); |
403,348 | public void run(Metadata metaData) {<NEW_LINE>Table table = tableHandle.resolve(metaData);<NEW_LINE>try {<NEW_LINE>CreateTable cmd = spec.createCommandCreateTable(table.getName());<NEW_LINE>Collection<Column<MASK><NEW_LINE>List<TableColumn> pks = new LinkedList<TableColumn>();<NEW_LINE>for (Column column : columns) {<N... | > columns = table.getColumns(); |
562,756 | private String genConfig(String timerTrigger, String script, String authToken, String description) {<NEW_LINE>String scmTrigger = "* * * * *";<NEW_LINE>return "" + "<?xml version='1.1' encoding='UTF-8'?>\n" + "<flow-definition plugin=\"workflow-job@2.41\">\n" + " <actions>\n" + " <org.jenkinsci.plugins.pipeline.mod... | + authToken + "</authToken>\n" + " <disabled>false</disabled>\n" + "</flow-definition>"; |
1,025,335 | private void mountInternal(RpcContext rpcContext, LockedInodePath inodePath, AlluxioURI ufsPath, MountContext context) throws InvalidPathException, FileAlreadyExistsException, FileDoesNotExistException, IOException, AccessControlException {<NEW_LINE>// Check that the Alluxio Path does not exist<NEW_LINE>if (inodePath.f... | long mountId = IdUtils.createMountId(); |
123,703 | private /*<NEW_LINE>* Fills the main list view with model names.<NEW_LINE>* Handles filling the ArrayLists and attaching<NEW_LINE>* ArrayAdapters to main ListView<NEW_LINE>*/<NEW_LINE>void fillModelList() {<NEW_LINE>// Anonymous class for handling list item clicks<NEW_LINE>mModelDisplayList = new ArrayList<>(mModels.si... | mCardCounts.get(i))); |
910,760 | public int onUpdate(int type) {<NEW_LINE>if (type == Level.BLOCK_UPDATE_RANDOM) {<NEW_LINE>Block block = this.getLevel().getBlock(new Vector3(this.x, this.y, this.z));<NEW_LINE>if (block.up().getLightLevel() < 4) {<NEW_LINE>BlockSpreadEvent ev = new BlockSpreadEvent(block, this, new BlockDirt());<NEW_LINE>Server.getIns... | getPluginManager().callEvent(ev); |
1,675,228 | public HtmlResponse create(final CreateForm form) {<NEW_LINE>verifyCrudMode(form.crudMode, CrudMode.CREATE);<NEW_LINE>validate(form, messages -> {<NEW_LINE>}, this::asEditHtml);<NEW_LINE>validateFields(form, v -> throwValidationError(v, this::asEditHtml));<NEW_LINE>verifyToken(this::asEditHtml);<NEW_LINE>getDoc(form).i... | getCrawlingInfoHelper().generateId(entity); |
61,646 | private void generateCharacterEncodingRangeCheck(final StringBuilder sb, final String varName, final Token token) {<NEW_LINE>final String characterEncoding = token.encoding().characterEncoding();<NEW_LINE>if (null != characterEncoding) {<NEW_LINE>if (JavaUtil.isAsciiEncoding(characterEncoding)) {<NEW_LINE>imports.peek(... | + "\t\t}\n" + "\t}\n", varName)); |
631,939 | public static byte[] marshalWithLenientRetry(EppOutput eppOutput) {<NEW_LINE>checkState(eppOutput != null);<NEW_LINE>// We need to marshal to a string instead of writing the response directly to the servlet's<NEW_LINE>// response writer, so that partial results don't get written on failure.<NEW_LINE>try {<NEW_LINE>retu... | new String(lenient, UTF_8)); |
188,151 | public void run(RegressionEnvironment env) {<NEW_LINE>AtomicInteger milestone = new AtomicInteger();<NEW_LINE>String epl = "@name('s0') select symbol as mySymbol from " + "SupportMarketDataBean#length(5) " + "output every 6 events " + "order by mySymbol";<NEW_LINE>SupportUpdateListener listener = new SupportUpdateListe... | createAndSend(env, epl, milestone); |
1,774,413 | final CreateSecurityGroupResult executeCreateSecurityGroup(CreateSecurityGroupRequest createSecurityGroupRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createSecurityGroupRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequest... | HandlerContextKey.SIGNING_REGION, getSigningRegion()); |
363,581 | private static void encounter(List<String> textRecord, Encounter encounter) {<NEW_LINE>String encounterTime = dateFromTimestamp(encounter.start);<NEW_LINE>String clinician = "";<NEW_LINE>if (encounter.clinician != null) {<NEW_LINE>clinician = " (" + encounter.clinician.attributes.get(Clinician.NAME_PREFIX) + " " + enco... | get(Clinician.NAME) + ")"; |
818,094 | public static void main(String[] args) {<NEW_LINE>final ConfigBuilder configBuilder = new ConfigBuilder();<NEW_LINE>if (args.length > 0) {<NEW_LINE>configBuilder.withMasterUrl(args[0]);<NEW_LINE>}<NEW_LINE>try (OpenShiftClient client = new KubernetesClientBuilder().withConfig(configBuilder.build()).build().adapt(OpenSh... | "GitVersion : {}", openShiftVersionInfo.getGitVersion()); |
997,766 | private static ArrowType parseComplexFormat(String format, String payload) throws NumberFormatException, UnsupportedOperationException, IllegalStateException {<NEW_LINE>switch(format) {<NEW_LINE>case "d":<NEW_LINE>{<NEW_LINE>int[] parts = payloadToIntArray(payload);<NEW_LINE>Preconditions.checkState(parts.length == 2 |... | (Integer.parseInt(payload)); |
1,419,364 | public void endTessellation() {<NEW_LINE>if (root.tessUpdate) {<NEW_LINE>if (root.tessKind == TRIANGLES && hasPolys) {<NEW_LINE>pgl.bindBuffer(PGL.ARRAY_BUFFER, bufPolyVertex.glId);<NEW_LINE>tessGeo.finalPolyVerticesBuffer(firstModifiedPolyVertex, lastModifiedPolyVertex);<NEW_LINE>pgl.bindBuffer(PGL.ARRAY_BUFFER, bufPo... | tessGeo.finalPolySpecularBuffer(firstModifiedPolySpecular, lastModifiedPolySpecular); |
1,438,154 | public void run(RegressionEnvironment env) {<NEW_LINE>RegressionPath path = new RegressionPath();<NEW_LINE>env.compileDeploy("@name('typea') @public create schema TypeA()", path);<NEW_LINE>env.compileDeploy("@name('typeb') @public create schema TypeB()", path);<NEW_LINE>env.compileDeploy("@name('typec') @public create ... | a = env.deploymentId("typea"); |
246,270 | protected PropertyMetadata toProperty(CompiledPropertyMetadata compiledProperty, LocalizedMessageProvider messageProvider) {<NEW_LINE>StandardPropertyMetadata property = new StandardPropertyMetadata();<NEW_LINE>String name = compiledProperty.getName();<NEW_LINE>property.setName(name);<NEW_LINE>property.<MASK><NEW_LINE>... | setCategory(compiledProperty.getCategory()); |
475,166 | public static CodegenExpression codegen(ExprRelationalOpNodeForge forge, CodegenMethodScope codegenMethodScope, ExprForgeCodegenSymbol exprSymbol, CodegenClassScope codegenClassScope) {<NEW_LINE>ExprForge lhs = forge.getForgeRenderable().getChildNodes()[0].getForge();<NEW_LINE>ExprForge rhs = forge.getForgeRenderable()... | EPType lhsType = lhs.getEvaluationType(); |
1,028,304 | /*<NEW_LINE>* Download an image from a HTTP URL.<NEW_LINE>*<NEW_LINE>* @param String HTTP URL to download from.<NEW_LINE>* @param String The filename to save the remote image as.<NEW_LINE>* @return String Returns 'true' or 'false'. As Rhino does not like boolean, this is a String.<NEW_LINE>*/<NEW_LINE>public s... | write(buffer, 0, n); |
1,075,025 | public void onRestored(Context context, int[] oldWidgetIds, int[] newWidgetIds) {<NEW_LINE>SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);<NEW_LINE>SharedPreferences.Editor editor = prefs.edit();<NEW_LINE>for (int i = 0; i < oldWidgetIds.length; ++i) {<NEW_LINE>String oldKey = getUserI... | getInt(oldKey, -1)); |
982,788 | final GetChangeTokenStatusResult executeGetChangeTokenStatus(GetChangeTokenStatusRequest getChangeTokenStatusRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getChangeTokenStatusRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRe... | addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); |
557,795 | public void buttonPressed() {<NEW_LINE>MapActivity activity = getMapActivity();<NEW_LINE>if (activity != null) {<NEW_LINE>AlertDialog.Builder bld <MASK><NEW_LINE>bld.setMessage(R.string.recording_delete_confirm);<NEW_LINE>bld.setPositiveButton(R.string.shared_string_yes, new DialogInterface.OnClickListener() {<NEW_LINE... | = new AlertDialog.Builder(activity); |
525,070 | private String doGenerate() {<NEW_LINE>Map<ClassDeclaration, Set<String>> planClassMap = parentClassMap.entrySet().stream().filter(kv -> kv.getValue().contains("org.apache.doris.nereids.trees.plans.Plan")).filter(kv -> !kv.getKey().name.equals("GroupPlan")).filter(kv -> !Modifier.isAbstract(kv.getKey().modifiers.mod) &... | isLogical() ? -1 : 1; |
1,569,352 | protected void printSegmentAssignment(Map<String, Map<String, String>> mapping) throws Exception {<NEW_LINE>LOGGER.info(JsonUtils.objectToPrettyString(mapping));<NEW_LINE>Map<String, List<String>> serverToSegmentMapping = new TreeMap<>();<NEW_LINE>for (String segment : mapping.keySet()) {<NEW_LINE>Map<String, String> s... | list = serverToSegmentMapping.get(server); |
570,769 | public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {<NEW_LINE>View view = inflater.inflate(R.layout.skill_reusable__intent_fragment_extra_item, container, false);<NEW_LINE>editText_key = view.findViewById(R.id.editText_key);<NEW_LINE>editText_v... | editText_value.setText(item.value); |
1,823,046 | public MarkedObject[] queryRange(J9ObjectPointer base, J9ObjectPointer top) throws CorruptDataException {<NEW_LINE>ArrayList<MarkedObject> results = new ArrayList<MarkedObject>();<NEW_LINE>if (base.lt(_heapBase)) {<NEW_LINE>base = J9ObjectPointer.cast(_heapBase);<NEW_LINE>}<NEW_LINE>if (top.gt(_heapTop)) {<NEW_LINE>top... | compactTableEntry_addr = _heapMapBits.at(pageIndex); |
44,091 | final ListFargateProfilesResult executeListFargateProfiles(ListFargateProfilesRequest listFargateProfilesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listFargateProfilesRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ListFargat... | AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
667,029 | static void rtAssertEquals(final float[] a, final float[] b, final float eps) {<NEW_LINE>if ((a == null) && (b == null)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if ((a != null) && (b != null)) {<NEW_LINE>final int alen = a.length;<NEW_LINE>if (alen != b.length) {<NEW_LINE>error("Array lengths not equal: " + a.length + "... | [i] + ") > " + eps); |
1,734,213 | final UpdateJobStatusResult executeUpdateJobStatus(UpdateJobStatusRequest updateJobStatusRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateJobStatusRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(F... | awsRequestMetrics.startEvent(Field.RequestMarshallTime); |
1,230,769 | final CreateWebACLMigrationStackResult executeCreateWebACLMigrationStack(CreateWebACLMigrationStackRequest createWebACLMigrationStackRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createWebACLMigrationStackRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRe... | HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); |
1,485,256 | // @see SWTSkinObjectBasic#paintControl(org.eclipse.swt.graphics.GC)<NEW_LINE>@Override<NEW_LINE>public void paintControl(GC gc) {<NEW_LINE>super.paintControl(gc);<NEW_LINE>int fullWidth = maxSize.x == 0 || imageFGbounds == null ? canvas.getClientArea().width : imageFGbounds.width;<NEW_LINE>if (percent > 0 && imageFG !... | drawImage(imageThumb, xThumbPos, 0); |
572,226 | public static void launchQuPath(HostServices hostServices, boolean isSwing) {<NEW_LINE>QuPathGUI instance = getInstance();<NEW_LINE>if (instance != null) {<NEW_LINE>logger.info("Request to launch QuPath - will try to show existing instance instead");<NEW_LINE>if (Platform.isFxApplicationThread())<NEW_LINE>instance<MASK... | .getStage().show(); |
515,713 | public AggregateComplianceByConfigRule unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>AggregateComplianceByConfigRule aggregateComplianceByConfigRule = new AggregateComplianceByConfigRule();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.g... | ().unmarshall(context)); |
1,571,154 | // Extractor implementation.<NEW_LINE>@Override<NEW_LINE>public boolean sniff(ExtractorInput input) throws IOException {<NEW_LINE>// Skip any ID3 headers.<NEW_LINE>ParsableByteArray scratch = new ParsableByteArray(ID3_HEADER_LENGTH);<NEW_LINE>int startPosition = 0;<NEW_LINE>while (true) {<NEW_LINE>input.peekFully(scrat... | int syncBytes = scratch.readUnsignedShort(); |
676,683 | private static Lookup[] delegates(Lookup prevFolderLkp, String path) {<NEW_LINE>ClassLoader loader = Lookup.getDefault().lookup(ClassLoader.class);<NEW_LINE>LOG.log(Level.FINEST, "lkp loader: {0}", loader);<NEW_LINE>if (loader == null) {<NEW_LINE>loader = Thread.currentThread().getContextClassLoader();<NEW_LINE>LOG.log... | Level.FINER, "metaInfServices for {0}", loader); |
748,842 | protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>setContentView(R.layout.activity_main);<NEW_LINE>intentTextView = findViewById(R.id.intentView);<NEW_LINE>recordButton = findViewById(R.id.record_button);<NEW_LINE>// on android 11, RecognitionService has to be sp... | .getMessage(), ACCESS_KEY)); |
1,627,452 | final ListTagsForDeliveryStreamResult executeListTagsForDeliveryStream(ListTagsForDeliveryStreamRequest listTagsForDeliveryStreamRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listTagsForDeliveryStreamRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequest... | addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListTagsForDeliveryStream"); |
646,657 | public void deleteKeyword() {<NEW_LINE>// get the amount of selected keywords.<NEW_LINE><MASK><NEW_LINE>// if nothing is selected, leave<NEW_LINE>if (rowcount < 1) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// prepare the msg-string<NEW_LINE>String msg;<NEW_LINE>// if we have just a single selection, use phrasing for that ... | int rowcount = jTableKeywords.getSelectedRowCount(); |
881,428 | public final Lambdef_nocondContext lambdef_nocond() throws RecognitionException {<NEW_LINE>Lambdef_nocondContext _localctx = new Lambdef_nocondContext(_ctx, getState());<NEW_LINE>enterRule(_localctx, 108, RULE_lambdef_nocond);<NEW_LINE>int _la;<NEW_LINE>try {<NEW_LINE>enterOuterAlt(_localctx, 1);<NEW_LINE>{<NEW_LINE>se... | _errHandler.reportError(this, re); |
1,816,621 | static KV<Long, Integer> computePositionForIndex(Map<OffsetRange, Integer> nonOverlappingRangesToNumElementsPerPosition, int index) {<NEW_LINE>if (index < 0) {<NEW_LINE>throw new IndexOutOfBoundsException(String.format("Position %s was out of bounds for ranges %s.", index, nonOverlappingRangesToNumElementsPerPosition))... | , range.getValue())); |
785,227 | public void marshall(Flow flow, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (flow == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(flow.getAvailabilityZone(), AVAILABILITYZONE_BINDING);<NEW_LINE>protocol... | flow.getDescription(), DESCRIPTION_BINDING); |
539,909 | static Single<WebServer> startServer(int unsecured, int secured) {<NEW_LINE>SocketConfiguration socketConf = SocketConfiguration.builder().name("secured").port(secured).tls(tlsConfig()).build();<NEW_LINE>Single<WebServer> webServer = WebServer.builder().port(unsecured).routing(createPlainRouting()).addSocket(socketConf... | .port("secured") + "/"); |
975,184 | public ResponseEntity<AttackResult> checkout(@RequestHeader(value = "Authorization", required = false) String token) {<NEW_LINE>if (token == null) {<NEW_LINE>return ResponseEntity.status(HttpStatus.UNAUTHORIZED).build();<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>Jwt jwt = Jwts.parser().setSigningKey(JWT_PASSWORD).parse(token.... | ()).build()); |
103,344 | final ListCertificatesByCAResult executeListCertificatesByCA(ListCertificatesByCARequest listCertificatesByCARequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listCertificatesByCARequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRe... | false), new ListCertificatesByCAResultJsonUnmarshaller()); |
1,599,001 | InvokeRequest buildInvokeRequest(Method method, Object object) throws IOException {<NEW_LINE>final LambdaFunction lambdaFunction = method.getAnnotation(LambdaFunction.class);<NEW_LINE>final InvokeRequest invokeRequest = new InvokeRequest();<NEW_LINE>if (lambdaFunction.functionName().isEmpty()) {<NEW_LINE>invokeRequest.... | setLogType(lambdaFunction.logType()); |
956,283 | void initializeModuleLoader() {<NEW_LINE>ModuleResolverFactory moduleResolverFactory = null;<NEW_LINE>switch(options.getModuleResolutionMode()) {<NEW_LINE>case BROWSER:<NEW_LINE>moduleResolverFactory = BrowserModuleResolver.FACTORY;<NEW_LINE>break;<NEW_LINE>case NODE:<NEW_LINE>// processJsonInputs requires a module loa... | getPathEscaper()).build(); |
1,565,635 | private void generateHalideLibraryTarget(ImmutableXCodeNativeTargetAttributes.Builder xcodeNativeTargetAttributesBuilder, ImmutableSet.Builder<Path> xcconfigPathsBuilder, ImmutableSet.Builder<String> targetConfigNamesBuilder, TargetNode<HalideLibraryDescriptionArg> targetNode) throws IOException {<NEW_LINE>BuildTarget ... | compilerTarget = HalideLibraryDescription.createHalideCompilerBuildTarget(buildTarget); |
158,835 | protected void processAttributes(AbstractWmlConversionContext context, List<Property> properties, Element element) {<NEW_LINE>CTShd shd = null;<NEW_LINE>// the background color of the page is assumed as white<NEW_LINE>int bgColor = 0xffffff;<NEW_LINE>// the default color of the font is assumed as black<NEW_LINE>int fgC... | properties.size() - 1); |
106,594 | public void paintIcon(Component c, Graphics graphics, int x, int y) {<NEW_LINE>Graphics2D g2 = <MASK><NEW_LINE>g2.setColor(Color.WHITE);<NEW_LINE>int width = getIconWidth();<NEW_LINE>int height = getIconHeight();<NEW_LINE>g2.drawRect(1, 1, width - 2, height - 2);<NEW_LINE>g2.setFont(font);<NEW_LINE>g2.setRenderingHint(... | (Graphics2D) graphics.create(); |
298,537 | public static DescribeInstancesResponse unmarshall(DescribeInstancesResponse describeInstancesResponse, UnmarshallerContext context) {<NEW_LINE>describeInstancesResponse.setRequestId(context.stringValue("DescribeInstancesResponse.RequestId"));<NEW_LINE>describeInstancesResponse.setTotalCount(context.integerValue("Descr... | ("DescribeInstancesResponse.Instances[" + i + "].HsmStatus")); |
799,658 | public void handleEvent(Event event) {<NEW_LINE>final TOTorrent torrent = dms[0].getTorrent();<NEW_LINE>if (torrent == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String msg_key_prefix = "MyTorrentsView.menu.edit_source.";<NEW_LINE>SimpleTextEntryWindow text_entry = new SimpleTextEntryWindow();<NEW_LINE>text_entry.set... | text_entry.setTitle(msg_key_prefix + "title"); |
685,055 | public JsonElement serialize(Blacklists src, Type typeOfSrc, JsonSerializationContext context) {<NEW_LINE>JsonObject blacklists_obj = new JsonObject();<NEW_LINE>for (BlacklistDescriptor bl : src.mLists) {<NEW_LINE>JsonObject bl_obj = new JsonObject();<NEW_LINE>bl_obj.add("num_rules", new JsonPrimitive(bl.num_rules));<N... | new JsonPrimitive(src.mNumDomainRules)); |
650,602 | protected void onPostExecute(SaveGpxResult result) {<NEW_LINE>isSaving = false;<NEW_LINE>app.getNotificationHelper().refreshNotifications();<NEW_LINE>updateControl();<NEW_LINE>Map<String, GPXFile> gpxFilesByName = result.getGpxFilesByName();<NEW_LINE>GPXFile gpxFile = null;<NEW_LINE>File file = null;<NEW_LINE>if (!Algo... | .iterator().next(); |
224,403 | public S3Grant unmarshall(StaxUnmarshallerContext context) throws Exception {<NEW_LINE>S3Grant s3Grant = new S3Grant();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>if (context.isStartOfDocument())<NEW_LINE>targetDepth += 1;<NEW_LINE>while (true) {<NEW_LINE>XMLEvent xmlEvent = context.nextEven... | int originalDepth = context.getCurrentDepth(); |
644,218 | protected TokenResponse executeRefreshToken() throws IOException {<NEW_LINE>if (serviceAccountPrivateKey == null) {<NEW_LINE>return super.executeRefreshToken();<NEW_LINE>}<NEW_LINE>// service accounts: no refresh token; instead use private key to request new access token<NEW_LINE>JsonWebSignature.Header header = new Js... | (getTokenServerEncodedUrl()), "urn:ietf:params:oauth:grant-type:jwt-bearer"); |
1,566,537 | private UpdateShipmentScheduleRequest toUpdateShipmentScheduleRequestOrNull(@NonNull final JsonCreateShipmentInfo createShipmentInfo, @NonNull final ShippingInfoCache cache) {<NEW_LINE>final LocalDateTime deliveryDate = createShipmentInfo.getMovementDate();<NEW_LINE>final LocationBasicInfo bPartnerLocation = LocationBa... | orgId = cache.getOrgId(shipmentScheduleId); |
1,183,400 | public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {<NEW_LINE>View root = inflater.inflate(R.layout.about, container, false);<NEW_LINE>((TextView) root.findViewById(R.id.version)).setText(BuildConfig.VERSION_NAME);<NEW_LINE>((TextView) root.findViewById... | setOnClickListener(v -> onTermOfUseClick()); |
1,734,007 | public Request<AnalyzeIDRequest> marshall(AnalyzeIDRequest analyzeIDRequest) {<NEW_LINE>if (analyzeIDRequest == null) {<NEW_LINE>throw new AmazonClientException("Invalid argument passed to marshall(AnalyzeIDRequest)");<NEW_LINE>}<NEW_LINE>Request<AnalyzeIDRequest> request = new DefaultRequest<AnalyzeIDRequest>(analyzeI... | t.getMessage(), t); |
320,008 | private static KeyFile loadPrivateKey(String privateKeyURL) throws IOException {<NEW_LINE>try {<NEW_LINE>URLConnection urlConnection = new org.apache.pulsar.client.api.url.URL(privateKeyURL).openConnection();<NEW_LINE>try {<NEW_LINE>String protocol = urlConnection.getURL().getProtocol();<NEW_LINE>String contentType = u... | throw new IOException("Invalid privateKey format", e); |
1,760,891 | public void addInstances(InstanceList training) {<NEW_LINE>alphabet = training.getDataAlphabet();<NEW_LINE>numTypes = alphabet.size();<NEW_LINE>betaSum = beta * numTypes;<NEW_LINE>typeTopicCounts = new int[numTypes][numTopics];<NEW_LINE>typeTopicWeights = new double[numTypes][numTopics];<NEW_LINE>totalTopicWeights = ne... | (typeTopicWeights[type], beta); |
425,935 | final DeleteContactListResult executeDeleteContactList(DeleteContactListRequest deleteContactListRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteContactListRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.st... | HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); |
903,634 | public ListOutgoingCertificatesResult listOutgoingCertificates(ListOutgoingCertificatesRequest listOutgoingCertificatesRequest) throws AmazonServiceException, AmazonClientException {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listOutgoingCertificatesRequest);<NEW_LINE>AWSRequestMetrics awsReque... | invoke(request, responseHandler, executionContext); |
433,023 | public void run() throws Exception {<NEW_LINE>File socketFile = new File("/tmp/ClientAndServer.sock");<NEW_LINE>// Clean up from previous runs.<NEW_LINE>socketFile.delete();<NEW_LINE>MockWebServer server = new MockWebServer();<NEW_LINE>server.setServerSocketFactory(new UnixDomainServerSocketFactory(socketFile));<NEW_LI... | url("http://publicobject.com/helloworld.txt").build(); |
1,723,334 | public boolean onCreateOptionsMenu(Menu menu) {<NEW_LINE>getMenuInflater().inflate(<MASK><NEW_LINE>appUsageMenu = menu.findItem(R.id.action_app_usage);<NEW_LINE>logViewerMenu = menu.findItem(R.id.action_log_viewer);<NEW_LINE>MenuItem apkUpdaterMenu = menu.findItem(R.id.action_apk_updater);<NEW_LINE>try {<NEW_LINE>if (!... | R.menu.activity_main_actions, menu); |
23,351 | private static void parseObjectGotoArray(HippyArray array, Object obj) throws JSONException {<NEW_LINE>if (obj == null || obj == JSONObject.NULL) {<NEW_LINE>array.pushNull();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Class<?> cls = obj.getClass();<NEW_LINE>if (obj instanceof String) {<NEW_LINE>array<MASK><NEW_LINE>} else if... | .pushString((String) obj); |
1,697,988 | public boolean selectSuccess(TransportHelper helper, Object attachment) {<NEW_LINE>try {<NEW_LINE>int written = helper.write(bb, false);<NEW_LINE>if (bb.remaining() > 0) {<NEW_LINE>helper.registerForWriteSelects(this, null);<NEW_LINE>} else {<NEW_LINE>if (Logger.isEnabled()) {<NEW_LINE>Logger.log(new LogEvent(LOGID, "H... | .getNotionalAddress() + " closed")); |
1,660,628 | ActionResult<WrapOutId> execute(String appDictFlag, String appInfoFlag, String path0, String path1, JsonElement jsonElement) throws Exception {<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {<NEW_LINE>ActionResult<WrapOutId> <MASK><NEW_LINE>Business business = new Busines... | result = new ActionResult<>(); |
342,976 | private void updateInstance(Matrix4f worldMatrix, float[] store, int offset, Matrix3f tempMat3, Quaternion tempQuat) {<NEW_LINE>worldMatrix.toRotationMatrix(tempMat3);<NEW_LINE>tempMat3.invertLocal();<NEW_LINE>// NOTE: No need to take the transpose in order to encode<NEW_LINE>// into quaternion, the multiplication in t... | offset + 5] = worldMatrix.m11; |
197,890 | public static boolean isJavascriptMimeType(final String mimeType) {<NEW_LINE>if (mimeType == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>final String mimeTypeLC = <MASK><NEW_LINE>return "application/ecmascript".equals(mimeTypeLC) || APPLICATION_JAVASCRIPT.equals(mimeTypeLC) || "application/x-ecmascript".equals(m... | mimeType.toLowerCase(Locale.ROOT); |
315,013 | private void copyLuceneTextIndexIfExists(File segmentDirectory, File v3Dir) throws IOException {<NEW_LINE>// TODO: see if this can be done by reusing some existing methods<NEW_LINE>String suffix = V1Constants.Indexes.LUCENE_TEXT_INDEX_FILE_EXTENSION;<NEW_LINE>File[] textIndexFiles = segmentDirectory.listFiles(new Filen... | ), v3LuceneIndexFile.toPath()); |
1,391,847 | protected Control createDialogArea(Composite parent) {<NEW_LINE>setTitle("Select Deployment Manifest for project '" + model.getProjectName() + "'");<NEW_LINE>Composite container = (Composite) super.createDialogArea(parent);<NEW_LINE>final Composite composite = new Composite(container, parent.getStyle());<NEW_LINE>compo... | .getParent().layout(); |
1,728,817 | private void doInit() {<NEW_LINE>QueryRunner run = new QueryRunner(ds);<NEW_LINE>Boolean isInitialized;<NEW_LINE>try {<NEW_LINE>isInitialized = run.<MASK><NEW_LINE>} catch (SQLException e) {<NEW_LINE>isInitialized = false;<NEW_LINE>}<NEW_LINE>if (isInitialized) {<NEW_LINE>System.out.println("===========================... | query("SELECT * FROM gw_apis", rs -> true); |
479,282 | public void visit(StaticConstantAccess node) {<NEW_LINE>String clsName = CodeUtils.extractUnqualifiedClassName(node);<NEW_LINE>ClassElementAttribute c = getCurrentClassElement();<NEW_LINE>switch(clsName) {<NEW_LINE>case // NOI18N<NEW_LINE>"self":<NEW_LINE>if (c != null) {<NEW_LINE>clsName = c.getName();<NEW_LINE>}<NEW_... | lookup(name, Kind.CONST); |
90,460 | static int calcSize(int origDim, String requestedDim, int defaultDim, boolean negativeAllowed) {<NEW_LINE>if (requestedDim == null) {<NEW_LINE>return defaultDim;<NEW_LINE>}<NEW_LINE>boolean percent = false;<NEW_LINE>if (requestedDim.endsWith("%")) {<NEW_LINE>percent = true;<NEW_LINE>requestedDim = requestedDim.substrin... | dim = Integer.parseInt(requestedDim); |
887,585 | public boolean copyDir(URI srcUri, URI dstUri) throws IOException {<NEW_LINE>LOGGER.info("Copying uri {} to uri {}", srcUri, dstUri);<NEW_LINE>Preconditions.checkState(exists<MASK><NEW_LINE>if (srcUri.equals(dstUri)) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>if (!isDirectory(srcUri)) {<NEW_LINE>delete(dstUri, true);<... | (srcUri), "Source URI '%s' does not exist", srcUri); |
1,642,686 | void checkUnlabeledData() throws IOException {<NEW_LINE>File unClassifiedResource <MASK><NEW_LINE>FileLabelAwareIterator unClassifiedIterator = new FileLabelAwareIterator.Builder().addSourceFolder(unClassifiedResource).build();<NEW_LINE>MeansBuilder meansBuilder = new MeansBuilder((InMemoryLookupTable<VocabWord>) parag... | = new File(dataLocalPath, "paravec/unlabeled"); |
438,710 | protected AbstractBeanDefinition parseInternal(Element element, ParserContext parserContext) {<NEW_LINE><MASK><NEW_LINE>String instanceRefName = "instance";<NEW_LINE>String mode = "DISTRIBUTED";<NEW_LINE>if (attributes != null) {<NEW_LINE>for (int a = 0; a < attributes.getLength(); a++) {<NEW_LINE>Node att = attributes... | NamedNodeMap attributes = element.getAttributes(); |
1,663,140 | final GetServerDetailsResult executeGetServerDetails(GetServerDetailsRequest getServerDetailsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getServerDetailsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEv... | awsRequestMetrics.endEvent(Field.RequestMarshallTime); |
1,321,729 | public com.amazonaws.services.applicationdiscovery.model.ResourceNotFoundException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.applicationdiscovery.model.ResourceNotFoundException resourceNotFoundException = new com.amazonaws.services.applicationdiscovery.mo... | int originalDepth = context.getCurrentDepth(); |
1,706,062 | public Xid[] recover(int flag) throws XAException {<NEW_LINE>NodeEngine nodeEngine = getNodeEngine();<NEW_LINE>XAService xaService = getService();<NEW_LINE>OperationService operationService = nodeEngine.getOperationService();<NEW_LINE>ClusterService clusterService = nodeEngine.getClusterService();<NEW_LINE>Collection<M... | logger.warning("Member left while recovering", e); |
1,688,840 | public VoiceGatewayPayload<?> deserialize(JsonParser p, DeserializationContext ctxt) throws IOException {<NEW_LINE>JsonNode json = p.getCodec().readTree(p);<NEW_LINE>int op = json.get("op").asInt();<NEW_LINE>JsonNode d = json.get("d");<NEW_LINE>switch(op) {<NEW_LINE>case Hello.OP:<NEW_LINE>return new Hello(d.get<MASK><... | ("heartbeat_interval").asLong()); |
1,476,254 | public static List<JComponent> createTextTitles(@Nonnull ContentDiffRequest request, @Nonnull List<? extends Editor> editors) {<NEW_LINE>List<DiffContent> contents = request.getContents();<NEW_LINE>List<String> titles = request.getContentTitles();<NEW_LINE>boolean equalCharsets = TextDiffViewerUtil.areEqualCharsets(con... | titles.size(), null); |
71,266 | public ApiResponse<Void> recycleBinDeleteRecycleBinItemWithHttpInfo(String id) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// verify the required parameter 'id' is set<NEW_LINE>if (id == null) {<NEW_LINE>throw new ApiException(400, "Missing the required parameter 'id' when calling recycleBin... | localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.